Commit 0ca9290f authored by Anton Zinoviev's avatar Anton Zinoviev

The components of partman added to the official repository.

r7449
parents
62 change_name
65 toggle_bootable
66 change_flags
70 resize
75 copy
85 delete
#!/bin/sh
exit 0
. /usr/share/debconf/confmodule
db_metaget partman-partitioning/text/set_flags description
printf "setflags\t${RET}\n"
#!/bin/sh
. /lib/partman/definitions.sh
dev=$2
id=$3
cd $dev
open_dialog VALID_FLAGS $id
valid_flags=$(read_list)
close_dialog
open_dialog GET_FLAGS $id
old_flags=$(read_list)
close_dialog
db_fset partman-partitioning/set_flags seen false
db_set partman-partitioning/set_flags "$old_flags"
db_subst partman-partitioning/set_flags CHOICES "$valid_flags"
db_input high partman-partitioning/set_flags || true
db_go || exit 1
db_get partman-partitioning/set_flags
log "New flags:" $RET
open_dialog SET_FLAGS $id
IFS=','
for flag in $RET; do
restore_ifs
write_line $flag
done
write_line NO_MORE
restore_ifs
close_dialog
partitions=''
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
[ "$fs" != free ] || continue
partitions="$partitions $id"
done
close_dialog
for id in $partitions; do
update_partition $dev $id
done
#!/bin/sh
. /lib/partman/definitions.sh
dev=$1
cd $dev
open_dialog USES_NAMES
read_line x
close_dialog
if [ "$x" = yes ]; then
db_metaget partman-partitioning/text/set_name description
printf "setname\t${RET}\n"
fi
#!/bin/sh
. /lib/partman/definitions.sh
dev=$2
id=$3
cd $dev
open_dialog PARTITION_INFO $id
read_line x1 id x2 x3 x2 x3 x4 old_name
close_dialog
[ "$id" ] || exit 1
db_fset partman-partitioning/set_name seen false
db_set partman-partitioning/set_name "$old_name"
db_input high partman-partitioning/set_name || true
db_go || exit 1
db_get partman-partitioning/set_name
open_dialog SET_NAME "$id" "$RET"
close_dialog
update_partition $dev $id
#!/bin/sh
. /usr/share/debconf/confmodule
db_metaget partman-partitioning/text/copy description
printf "copy\t${RET}\n"
#!/bin/sh
. /lib/partman/definitions.sh
dev=$2
id=$3
cd $dev
db_set partman-partitioning/confirm_copy 'Cancel'
db_fset partman-partitioning/confirm_copy seen false
db_input high partman-partitioning/confirm_copy || true
db_go || exit 0
db_get partman-partitioning/confirm_copy
[ "$RET" = 'Continue' ] || exit 0
ask_for_source () {
local noninteractive
noninteractive=true
while true; do
source_dev=''
source_id=''
while [ ! "$source_id" ]; do
db_fset partman-partitioning/source_partition seen false
choices=$(partition_tree_choices)
debconf_select critical partman-partitioning/source_partition "$choices" asdfasdfasdf
case $? in
1)
$noninteractive
;;
255)
return 1
;;
esac
noninteractive='return 1'
source_dev=${RET%//*}
source_id=${RET#*//}
done
source_dev=${source_dev##*/}
if perform_copying; then break; fi
done
return 0
}
perform_copying () {
for s in /lib/partman/commit.d/*; do
if [ -x $s ]; then
$s || {
db_fset partman-partitioning/copy_commit_failed seen false
db_input high partman-partitioning/copy_commit_failed || true
db_go || true
exit 0
}
fi
done
name_progress_bar partman-partitioning/progress_copying
open_dialog COPY_PARTITION $id $source_dev $source_id
close_dialog
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 0
fi
done
}
ask_for_source
#!/bin/sh
. /usr/share/debconf/confmodule
db_metaget partman-partitioning/text/delete description
printf "delete\t${RET}\n"
#!/bin/sh
. /lib/partman/definitions.sh
dev=$2
id=$3
cd $dev
open_dialog DELETE_PARTITION $id
close_dialog
partitions=''
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
partitions="$partitions $id"
done
close_dialog
for id in $partitions; do
update_partition $dev $id
done
exit 100
#!/bin/sh
. /usr/share/debconf/confmodule
db_metaget partman-partitioning/text/resize description
printf "resize\t${RET}\n"
#!/bin/sh
. /lib/partman/definitions.sh
dev=$2
oldid=$3
cd $dev
open_dialog GET_RESIZE_RANGE $oldid
read_line minsize cursize maxsize
close_dialog
[ "$maxsize" ] || exit 1
hminsize=$(longint2human $minsize)
hcursize=$(longint2human $cursize)
hmaxsize=$(longint2human $maxsize)
db_set partman-partitioning/confirm_resize 'Cancel'
db_fset partman-partitioning/confirm_resize seen false
db_input high partman-partitioning/confirm_resize || true
db_go || exit 0
db_get partman-partitioning/confirm_resize
[ "$RET" = 'Continue' ] || exit 0
ask_for_size () {
local noninteractive
noninteractive=true
while true; do
newsize=''
while [ ! "$newsize" ]; do
db_set partman-partitioning/new_size "$hcursize"
db_fset partman-partitioning/new_size seen false
db_subst partman-partitioning/new_size MINSIZE "$hminsize"
db_subst partman-partitioning/new_size MAXSIZE "$hmaxsize"
db_input high partman-partitioning/new_size || $noninteractive
noninteractive="return 1"
db_go || return 1
db_get partman-partitioning/new_size
if valid_human "$RET"; then
hnewsize="$RET"
newsize=$(human2longint "$hnewsize")
else
db_fset partman-partitioning/bad_new_size seen false
db_input high partman-partitioning/bad_new_size || true
db_go || true
fi
done
if perform_resizing; then break; fi
done
return 0
}
perform_resizing () {
for s in /lib/partman/commit.d/*; do
if [ -x $s ]; then
$s || {
db_fset partman-partitioning/new_size_commit_failed seen false
db_input high partman-partitioning/new_size_commit_failed || true
db_go || true
exit 100
}
fi
done
name_progress_bar partman-partitioning/progress_resizing
open_dialog RESIZE_PARTITION $oldid $newsize
read_line newid
close_dialog
if [ -n "$newid" -a "$newid" != "$oldid" ]; then
[ ! -e "$newid" ] || rm -rf $newid
mkdir $newid
cp -r $oldid/* $newid/
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 100
fi
done
fi
}
ask_for_size
exit 100
#!/bin/sh
. /lib/partman/definitions.sh
dev=$1
id=$2
cd $dev
valid_boot=no
open_dialog VALID_FLAGS $id
while { read_line flag; [ "$flag" ]; }; do
if [ "$flag" = boot ]; then
valid_boot=yes
fi
done
close_dialog
[ $valid_boot = yes ] || exit 0
bootable=no
open_dialog GET_FLAGS $id
while { read_line flag; [ "$flag" ]; }; do
if [ "$flag" = boot ]; then
bootable=yes
fi
done
close_dialog
if [ $bootable = yes ]; then
db_metaget partman-partitioning/text/bootable_off description
printf "unbootable\t${RET}\n"
else
db_metaget partman-partitioning/text/bootable_on description
printf "bootable\t${RET}\n"
fi
#!/bin/sh
. /lib/partman/definitions.sh
task=$1
dev=$2
id=$3
cd $dev
new_flags=''
open_dialog GET_FLAGS $id
while { read_line flag; [ "$flag" ]; }; do
if [ "$flag" != boot ]; then
if [ "$new_flags" ]; then
new_flags="$new_flags
$flag"
else
new_flags="$flag"
fi
fi
done
close_dialog
if [ $task = bootable ]; then
new_flags="$new_flags
boot"
fi
open_dialog SET_FLAGS $id
write_line "$new_flags"
write_line NO_MORE
close_dialog
partitions=''
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
[ "$fs" != free ] || continue
partitions="$partitions $id"
done
close_dialog
for id in $partitions; do
update_partition $dev $id
done
partman-partitioning (4) unstable; urgency=low
* Uses debconf-po.
* Use db_metaget to translate strings.
* storage_device/label/do_option: Runs update_partition for free spaces
also.
-- Anton Zinoviev <zinoviev@debian.org> Wed, 23 Dec 2003 20:22:12 +0200
partman-partitioning (3) unstable; urgency=low
* active_partition/resize/do_option: invoke `name_progress_bar' before
open_dialog RESIZE_PARTITION.
* active_partition/copy/do_option: invoke `name_progress_bar' before
open_dialog COPY_PARTITION.
* Uses `exit 0' and `return 0' instead of just `exit' and `return'.
-- Anton Zinoviev <zinoviev@debian.org> Fri, 12 Dec 2003 09:08:53 +0200
partman-partitioning (2) unstable; urgency=low
* Package renaming partman-parted-partitioning -> partman-partitioning.
* Creation of new label (partition table) moved here from
partman-parted.
-- Anton Zinoviev <zinoviev@debian.org> Tue, 18 Nov 2003 00:02:01 +0200
partman-parted-partitioning (1) unstable; urgency=low
* First version.
-- Anton Zinoviev <zinoviev@debian.org> Wed, 27 Aug 2003 07:03:28 +0200
Source: partman-partitioning
Section: debian-installer
Priority: optional
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Uploaders: Anton Zinoviev <zinoviev@debian.org>
Build-Depends: debhelper (>= 4.1.13), po-debconf (>= 0.5.0)
Standards-Version: 3.5.6
Package: partman-partitioning
Architecture: all
Description: Partitioning operations for partman
This udeb provides partman with with editing operations for creation
of new partitions, deletion of partitions and initialisation of the
partition table.
This package is under the GNU GPL version 2, or any later
version at your option.
On Debian system, the GPL is available in
/usr/share/common-licenses/GPL-2
#!/bin/sh
set -e
PACKAGE=$(dh_listpackages)
partman=debian/${PACKAGE}/lib/partman
install -d $partman/$1
cp -r $1/* $partman/$1/
if [ -f $partman/$1/_numbers ]; then
numbers=$(cat $partman/$1/_numbers)
rm $partman/$1/_numbers
echo "$numbers" |
while read number name; do
set -e
mv $partman/$1/$name $partman/$1/${number}${name}
done
fi
[type: gettext/rfc822deb] templates
#
# Translators, if you are not familiar with the PO format, gettext
# documentation is worth reading, especially sections dedicated to
# this format, e.g. by running:
# info -n '(gettext)PO Files'
# info -n '(gettext)Header Entry'
#
# Some information specific to po-debconf are available at
# /usr/share/doc/po-debconf/README-trans
# or http://www.debian.org/intl/l10n/po-debconf/README-trans
#
# Developers do not need to manually edit POT or PO files.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-12-22 22:28+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: text
#. Description
#: ../templates:3
msgid "The partition is being resized..."
msgstr ""
#. Type: text
#. Description
#: ../templates:7
msgid "The partition is being copied..."
msgstr ""
#. Type: select
#. Description
#: ../templates:12
msgid ""
"In order to copy to this partition the data from another partition it is "
"necessary to write to the storage devices the changes made. You won't be "
"able to undo them any more. The copying can not be undone too. Are you "
"sure you want to continue?"
msgstr ""
#. Type: select
#. Description
#: ../templates:21
msgid "Please choose the partition containing the data to copy"
msgstr ""
#. Type: note
#. Description
#: ../templates:25
msgid "Impossible to copy"
msgstr ""
#. Type: note
#. Description
#: ../templates:25
msgid ""
"The attempt to write to the storage devices the changes made failed. In such "
"circumstances no atempts to copy partitions will be made."
msgstr ""
#. Type: select
#. Choices
#: ../templates:31
msgid "Continue"
msgstr ""
#. Type: select
#. Choices
#: ../templates:31
msgid "Cancel"
msgstr ""
#. Type: select
#. Description
#: ../templates:32
msgid "Can not be undone. Continue?"
msgstr ""
#. Type: select
#. Description
#: ../templates:32
msgid ""
"In order to resize the partition it is necessary to write to the storage "
"devices the changes made. You won't be able to undo them any more. The "
"resizing can not be undone too. Are you sure you want to continue?"
msgstr ""
#. Type: string
#. Description
#: ../templates:40
msgid "Please enter the new size of the partition"
msgstr ""
#. Type: string
#. Description
#: ../templates:40
msgid ""
"The minimal size you can use is ${MINSIZE} and the maximal size is "
"${MAXSIZE}."
msgstr ""
#. Type: note
#. Description
#: ../templates:50
msgid "Impossible to resize"
msgstr ""
#. Type: note
#. Description
#: ../templates:50
msgid ""
"The attempt to write to the storage devices the changes made failed. In such "
"circumstances no atempts to resize the partition will be made."
msgstr ""
#. Type: string
#. Default
#: ../templates:56
msgid "some number"
msgstr ""
#. Type: string
#. Description
#: ../templates:57
msgid "Please enter the size of the new partition"
msgstr ""
#. Type: string
#. Description
#: ../templates:57
msgid "The maximal size you can use is ${MAXSIZE}"
msgstr ""
#. Type: note
#. Description
#: ../templates:62
msgid "This is not a valid size"
msgstr ""
#. Type: select
#. Choices
#: ../templates:66
msgid "Beginning"
msgstr ""
#. Type: select
#. Choices
#: ../templates:66
msgid "End"
msgstr ""
#. Type: select
#. Description
#: ../templates:67
msgid "Please choose the place of the new partition"
msgstr ""
#. Type: select
#. Description
#: ../templates:72
msgid "Please choose the file system for the new partition"
msgstr ""
#. Type: select
#. Choices
#: ../templates:76
msgid "Primary"
msgstr ""
#. Type: select
#. Choices
#: ../templates:76
msgid "Logical"
msgstr ""
#. Type: select
#. Description
#: ../templates:77
msgid "Please choose the type of the new partition"
msgstr ""
#. Type: multiselect
#. Description
#: ../templates:82
msgid "Please choose the flags of the partition"
msgstr ""
#. Type: string
#. Description
#: ../templates:86
msgid "Please type the name of the partition"
msgstr ""
#. Type: select
#. Description
#: ../templates:91
msgid "Please choose the type of the new label"
msgstr ""
#. Type: text
#. Description
#: ../templates:95
msgid "Set the flags of the partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:99
msgid "Set the name of the partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:103
msgid "Copy to here the data from another partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:107
msgid "Delete the partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:111
msgid "Resize the partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:115
msgid "Turn bootable flag off"
msgstr ""
#. Type: text
#. Description
#: ../templates:119
msgid "Turn bootable flag on"
msgstr ""
#. Type: text
#. Description
#: ../templates:123
msgid "Create new partition"
msgstr ""
#. Type: text
#. Description
#: ../templates:127
msgid "Create new empty partition table on this device"
msgstr ""
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=4
PACKAGE=$(shell dh_listpackages)
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
ARCH=$(shell dpkg --print-architecture)
FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb
PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
build: build-stamp
build-stamp:
dh_testdir
touch build-stamp