Package: partman-basicfilesystems Tags: patch In preparation for the parted3 transition, this patch fixes format_swap to go straight to using mkswap instead of trying to use parted_server first. It also removes ext2 support, which will be picked up by partman-ext3 and depends on dosfstools-udeb for fsck/mkfs. Finally, it removes check_swap, since there really is no such thing as fscking swap.
diff -Nru partman-basicfilesystems-90/active_partition/basicfilesystems/choices partman-basicfilesystems-91/active_partition/basicfilesystems/choices --- partman-basicfilesystems-90/active_partition/basicfilesystems/choices 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/active_partition/basicfilesystems/choices 2014-02-13 15:03:12.000000000 -0500 @@ -16,7 +16,7 @@ filesystem=$(cat $part/acting_filesystem) case "$filesystem" in - ext2|fat16|fat32) + fat16|fat32) : ;; *) @@ -26,7 +26,7 @@ choice_mountpoint () { case "$filesystem" in - ext2|fat16|fat32) + fat16|fat32) if [ -f $part/mountpoint ]; then mp=$(cat $part/mountpoint) else @@ -66,16 +66,6 @@ -o $part/formatted -ot $part/method \ -o $part/formatted -ot $part/filesystem ] || return 0 case "$filesystem" in - ext2) - if [ -f $part/label ]; then - label=$(cat $part/label) - else - db_metaget partman-basicfilesystems/text/none description - label=$RET - fi - db_metaget partman-basicfilesystems/text/specify_label description - printf "label\t%s\${!TAB}%s\n" "$RET" "$label" - ;; _no_fat16|_no_fat32) # we dont have tools to set label of FAT file systems if [ -f $part/label ]; then label=$(cat $part/label) @@ -89,41 +79,6 @@ esac } -choice_reserved () { - local reserved - [ "$filesystem" = ext2 ] || return 0 - # allow to set reserved space only if the partition is to be formatted - [ -f $part/format ] || return 0 - [ ! -f $part/formatted \ - -o $part/formatted -ot $part/method \ - -o $part/formatted -ot $part/filesystem ] || return 0 - if [ -f $part/reserved_for_root ]; then - reserved=$(cat $part/reserved_for_root) - else - reserved=5 - fi - db_metaget partman-basicfilesystems/text/reserved_for_root description - printf "reserved_for_root\t%s\${!TAB}%s\n" "$RET" "$reserved%" -} - -choice_usage () { - local usage - [ "$filesystem" = ext2 ] || return 0 - # allow to set usage only if the partition is to be formatted - [ -f $part/format ] || return 0 - [ ! -f $part/formatted \ - -o $part/formatted -ot $part/method \ - -o $part/formatted -ot $part/filesystem ] || return 0 - if [ -f $part/usage ]; then - usage=$(cat $part/usage) - else - db_metaget partman-basicfilesystems/text/typical_usage description - usage=$RET - fi - db_metaget partman-basicfilesystems/text/usage description - printf "usage\t%s\${!TAB}%s\n" "$RET" "$usage" -} - choice_mountpoint choice_options @@ -131,7 +86,3 @@ choice_format_swap choice_label - -choice_reserved - -choice_usage diff -Nru partman-basicfilesystems-90/active_partition/basicfilesystems/do_option partman-basicfilesystems-91/active_partition/basicfilesystems/do_option --- partman-basicfilesystems-90/active_partition/basicfilesystems/do_option 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/active_partition/basicfilesystems/do_option 2014-02-13 15:04:38.000000000 -0500 @@ -119,43 +119,6 @@ fi db_reset partman-basicfilesystems/choose_label ;; - reserved_for_root) - if [ -f $part/reserved_for_root ]; then - reserved=$(cat $part/reserved_for_root) - else - reserved=5 - fi - db_set partman-basicfilesystems/specify_reserved "$reserved%" - db_input critical partman-basicfilesystems/specify_reserved || true - db_go || exit 1 - db_get partman-basicfilesystems/specify_reserved - RET=`expr "$RET" : '\([0-9][0-9]\?\)\([,. %].*\)\?$'` - if [ "$RET" ]; then - echo "$RET" >$part/reserved_for_root - else - rm -f $part/reserved_for_root - fi - db_reset partman-basicfilesystems/specify_reserved - ;; - usage) - db_metaget partman-basicfilesystems/text/typical_usage description - typical_usage="$RET" - if [ -f $part/usage ]; then - usage=$(cat $part/usage) - else - usage="$typical_usage" - fi - db_subst partman-basicfilesystems/specify_usage CHOICES "$typical_usage, news, largefile, largefile4" - db_set partman-basicfilesystems/specify_usage "$usage" - db_input critical partman-basicfilesystems/specify_usage || true - db_go || exit 1 - db_get partman-basicfilesystems/specify_usage - if [ "$RET" != "$typical_usage" ]; then - echo "$RET" >$part/usage - else - rm -f $part/usage - fi - ;; esac exit 0 diff -Nru partman-basicfilesystems-90/check.d/check_basicfilesystems partman-basicfilesystems-91/check.d/check_basicfilesystems --- partman-basicfilesystems-90/check.d/check_basicfilesystems 2011-05-03 21:00:32.000000000 -0400 +++ partman-basicfilesystems-91/check.d/check_basicfilesystems 2014-02-13 16:30:28.000000000 -0500 @@ -30,9 +30,14 @@ db_subst $template PARTITION "$num" db_subst $template DEVICE $(humandev $(cat device)) name_progress_bar $template - open_dialog CHECK_FILE_SYSTEM $id - read_line status - close_dialog + if log-output -t partman --pass-stdout \ + dosfsck $device >/dev/null; then + status=OK + else + status=failed + fi + db_progress STOP + if [ "$status" != good ]; then db_subst partman-basicfilesystems/check_failed TYPE "$filesystem" db_subst partman-basicfilesystems/check_failed PARTITION "$num" diff -Nru partman-basicfilesystems-90/check.d/check_swap partman-basicfilesystems-91/check.d/check_swap --- partman-basicfilesystems-90/check.d/check_swap 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/check.d/check_swap 1969-12-31 19:00:00.000000000 -0500 @@ -1,58 +0,0 @@ -#!/bin/sh - -. /lib/partman/lib/base.sh - -swap=false - -for dev in $DEVICES/*; do - [ -d "$dev" ] || continue - cd $dev - partitions= - open_dialog PARTITIONS - while { read_line num id size type fs path name; [ "$id" ]; }; do - [ "$fs" != free ] || continue - partitions="$partitions $id,$num" - done - close_dialog - - for part in $partitions; do - id=${part%,*} - num=${part#*,} - [ -f $id/method ] || continue - method=$(cat $id/method) - if [ "$method" = swap ]; then - swap=: - fi - [ ! -f $id/format ] || continue - if [ "$method" = swap ]; then - log "Check the swap space in $dev/$id" - template=partman-basicfilesystems/progress_swap_checking - db_subst $template PARTITION "$num" - db_subst $template DEVICE $(humandev $(cat device)) - name_progress_bar $template - open_dialog CHECK_FILE_SYSTEM $id - read_line status - close_dialog - if [ "$status" != good ]; then - db_subst partman-basicfilesystems/swap_check_failed PARTITION "$num" - db_subst partman-basicfilesystems/swap_check_failed DEVICE $(humandev $(cat device)) - db_set partman-basicfilesystems/swap_check_failed true - db_input critical partman-basicfilesystems/swap_check_failed || true - db_go || true - db_get partman-basicfilesystems/swap_check_failed - if [ "$RET" = true ]; then - exit 1 - fi - fi - fi - done -done - -if ! $swap; then - db_input critical partman-basicfilesystems/no_swap || true - db_go || true - db_get partman-basicfilesystems/no_swap - if [ "$RET" = true ]; then - exit 1 - fi -fi diff -Nru partman-basicfilesystems-90/check.d/_numbers partman-basicfilesystems-91/check.d/_numbers --- partman-basicfilesystems-90/check.d/_numbers 2013-07-27 02:08:39.000000000 -0400 +++ partman-basicfilesystems-91/check.d/_numbers 2014-02-13 15:21:41.000000000 -0500 @@ -2,4 +2,3 @@ 09 nomountpoint_basicfilesystems 10 check_basicfilesystems 10 ext2_boot -10 check_swap diff -Nru partman-basicfilesystems-90/commit.d/format_basicfilesystems partman-basicfilesystems-91/commit.d/format_basicfilesystems --- partman-basicfilesystems-90/commit.d/format_basicfilesystems 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/commit.d/format_basicfilesystems 2014-02-13 14:59:35.000000000 -0500 @@ -22,7 +22,7 @@ -a -f $id/acting_filesystem ] || continue filesystem=$(cat $id/acting_filesystem) case $filesystem in - ext2|fat16|fat32) + fat16|fat32) if [ -f $id/formatted ] && \ [ $id/formatted -nt $id/method ] && \ ([ ! -f $id/filesystem ] || \ @@ -47,58 +47,15 @@ db_subst $template PARTITION "$num" db_subst $template DEVICE $(humandev $(cat device)) case $filesystem in - ext2) - options='' - if [ -f $id/usage ]; then - options="$options -T $(cat $id/usage)" - fi - if [ "$(udpkg --print-os)" = hurd ]; then - options="$options -b 4096 -I 128 -o hurd" - fi - if [ -z "$options" ]; then - name_progress_bar $template - open_dialog CREATE_FILE_SYSTEM $id $filesystem - read_line status - close_dialog - sync - else - status=failed - fi - if [ "$status" != OK ]; then - db_progress START 0 3 partman/text/formatting - db_progress INFO $template - db_progress SET 1 - if log-output -t partman --pass-stdout \ - mkfs.ext2 $device $options >/dev/null; then - sync - status=OK - else - status=failed - fi - db_progress STOP - fi - if [ "$status" = OK ]; then - label='' - if [ -f $id/label ]; then - label=$(cat $id/label | \ - sed 's/\(................\).*/\1/g') - fi - if [ "$label" ]; then - log-output -t partman --pass-stdout \ - tune2fs -L "$label" $device >/dev/null - fi - if [ -f $id/reserved_for_root ]; then - log-output -t partman --pass-stdout \ - tune2fs -m $(cat $id/reserved_for_root) $device >/dev/null - fi - fi - ;; fat16|fat32) name_progress_bar $template - open_dialog CREATE_FILE_SYSTEM $id $filesystem - read_line status - close_dialog - sync + if log-output -t partman --pass-stdout \ + mkfs.$filesystem $device >/dev/null; then + status=OK + else + status=failed + fi + db_progress STOP ;; esac diff -Nru partman-basicfilesystems-90/commit.d/format_swap partman-basicfilesystems-91/commit.d/format_swap --- partman-basicfilesystems-90/commit.d/format_swap 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/commit.d/format_swap 2014-02-12 15:56:03.000000000 -0500 @@ -31,23 +31,17 @@ db_subst $template PARTITION "$num" db_subst $template DEVICE $(humandev $(cat device)) name_progress_bar $template - open_dialog CREATE_FILE_SYSTEM $id linux-swap - read_line status - close_dialog - sync - if [ "$status" != OK ]; then - db_progress START 0 3 partman/text/formatting - db_progress INFO $template - db_progress SET 1 - if log-output -t partman --pass-stdout \ - mkswap $device >/dev/null; then - sync - status=OK - else - status=failed - fi - db_progress STOP + db_progress START 0 3 partman/text/formatting + db_progress INFO $template + db_progress SET 1 + if log-output -t partman --pass-stdout \ + mkswap $device >/dev/null; then + sync + status=OK + else + status=failed fi + db_progress STOP if [ "$status" != OK ]; then db_subst partman-basicfilesystems/create_swap_failed TYPE linux-swap diff -Nru partman-basicfilesystems-90/debian/changelog partman-basicfilesystems-91/debian/changelog --- partman-basicfilesystems-90/debian/changelog 2014-01-14 01:05:06.000000000 -0500 +++ partman-basicfilesystems-91/debian/changelog 2014-02-13 16:31:04.000000000 -0500 @@ -1,3 +1,14 @@ +partman-basicfilesystems (91) unstable; urgency=low + + * Use only mkswap instead of parted to format swap, since this is no + longer supported in parted3. + * Remove support for ext2, which will be moved to + partman-ext3. + * Remove check_swap, as there is no such thing as fscking swap + * Depend on dosfstools-udeb for mkfs and fsck + + -- Phillip Susi <psusi@ubuntu.com> Wed, 12 Feb 2014 15:56:24 -0500 + partman-basicfilesystems (90) unstable; urgency=low [ Updated translations ] diff -Nru partman-basicfilesystems-90/debian/control partman-basicfilesystems-91/debian/control --- partman-basicfilesystems-90/debian/control 2013-07-13 04:49:02.000000000 -0400 +++ partman-basicfilesystems-91/debian/control 2014-02-13 16:27:35.000000000 -0500 @@ -12,6 +12,6 @@ Package: partman-basicfilesystems Package-Type: udeb Architecture: all -Depends: ${misc:Depends}, e2fsprogs-udeb, ext2-modules, fat-modules +Depends: ${misc:Depends}, e2fsprogs-udeb, ext2-modules, fat-modules, dosfstools-udeb Provides: partman-filesystem -Description: Add to partman support for ext2, linux-swap, fat16 and fat32 +Description: Add to partman support for linux-swap, fat16 and fat32 diff -Nru partman-basicfilesystems-90/debian/partman-basicfilesystems.templates partman-basicfilesystems-91/debian/partman-basicfilesystems.templates --- partman-basicfilesystems-90/debian/partman-basicfilesystems.templates 2013-11-30 02:23:20.000000000 -0500 +++ partman-basicfilesystems-91/debian/partman-basicfilesystems.templates 2014-02-13 15:29:19.000000000 -0500 @@ -156,39 +156,12 @@ # :sl2: _Description: Reserved blocks: -Template: partman-basicfilesystems/specify_reserved -Type: string -# :sl2: -_Description: Percentage of the file system blocks reserved for the super-user: - Template: partman-basicfilesystems/text/usage Type: text # :sl2: # Up to 25 character positions _Description: Typical usage: -Template: partman-basicfilesystems/text/typical_usage -Type: text -# :sl2: -# In the following context: "Typical usage: standard" -_Description: standard - -Template: partman-basicfilesystems/specify_usage -Type: select -# :sl2: -# Translate "standard" the same way as in the -# partman-basicfilesystems/text/typical_usage template. Do not -# translate "news", "largefile" and "largefile4". -Choices: ${CHOICES} -_Description: Typical usage of this partition: - Please specify how the file system is going to be used, so that - optimal file system parameters can be chosen for that use. - . - standard = standard parameters, - news = one inode per 4KB block, - largefile = one inode per megabyte, - largefile4 = one inode per 4 megabytes. - Template: partman-basicfilesystems/text/specify_mountpoint Type: text # This is an item in the menu "Partition settings" @@ -201,17 +174,6 @@ # In the following context: "Mount point: none" _Description: none[ Do not translate what's inside the brackets and just put the translation for the word "none" in your language without any brackets. This "none" relates to "Mount point:" ] -Template: partman/filesystem_long/ext2 -Type: text -# :sl2: -_Description: Ext2 file system - -Template: partman/filesystem_short/ext2 -Type: text -# :sl1: -# Short file system name (untranslatable in many languages) -_Description: ext2 - Template: partman/filesystem_long/fat16 Type: text # :sl2: @@ -269,48 +231,6 @@ _Description: Mount options: Mount options can tune the behavior of the file system. -Template: partman-basicfilesystems/text/noatime -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: noatime - do not update inode access times at each access - -Template: partman-basicfilesystems/text/nodiratime -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: nodiratime - do not update directory inode access times - -Template: partman-basicfilesystems/text/relatime -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: relatime - update inode access times relative to modify time - -Template: partman-basicfilesystems/text/nodev -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: nodev - do not support character or block special devices - -Template: partman-basicfilesystems/text/nosuid -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: nosuid - ignore set-user-identifier or set-group-identifier bits - -Template: partman-basicfilesystems/text/noexec -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: noexec - do not allow execution of any binaries - Template: partman-basicfilesystems/text/ro Type: text # :sl2: @@ -325,27 +245,6 @@ # a 65 columns limit (which means 65 characters in single-byte languages) _Description: sync - all input/output activities occur synchronously -Template: partman-basicfilesystems/text/usrquota -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: usrquota - user disk quota accounting enabled - -Template: partman-basicfilesystems/text/grpquota -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: grpquota - group disk quota accounting enabled - -Template: partman-basicfilesystems/text/user_xattr -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: user_xattr - support user extended attributes - Template: partman-basicfilesystems/text/quiet Type: text # :sl2: @@ -353,13 +252,6 @@ # a 65 columns limit (which means 65 characters in single-byte languages) _Description: quiet - changing owner and permissions does not return errors -Template: partman-basicfilesystems/text/notail -Type: text -# :sl2: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: notail - disable packing of files into the file system tree - Template: partman-basicfilesystems/text/discard Type: text # :sl2: @@ -367,13 +259,6 @@ # a 65 columns limit (which means 65 characters in single-byte languages) _Description: discard - trim freed blocks from underlying block device -Template: partman-basicfilesystems/text/acls -Type: text -# :sl4: -# Note to translators: Please keep your translations of this string below -# a 65 columns limit (which means 65 characters in single-byte languages) -_Description: acls - support POSIX.1e Access Control List - Template: partman-basicfilesystems/text/shortnames Type: text # :sl4: diff -Nru partman-basicfilesystems-90/fstab.d/basic partman-basicfilesystems-91/fstab.d/basic --- partman-basicfilesystems-90/fstab.d/basic 2011-07-30 21:01:18.000000000 -0400 +++ partman-basicfilesystems-91/fstab.d/basic 2014-02-13 15:01:35.000000000 -0500 @@ -35,40 +35,6 @@ [ -f "$id/acting_filesystem" ] || continue filesystem=$(cat $id/acting_filesystem) case "$filesystem" in - ext2) - [ -f "$id/mountpoint" ] || continue - mountpoint=$(cat $id/mountpoint) - # due to #249322, #255135, #258117: - if [ "$mountpoint" = /tmp ]; then - rm -f $id/options/noexec - fi - options=$(get_mountoptions $dev $id) - if [ "$mountpoint" = / ]; then - if [ "$os" = hurd ] || [ "$os" = kfreebsd ] ; then - : # remount-ro not supported - elif [ "$options" = defaults ]; then - options="errors=remount-ro" - else - options="${options},errors=remount-ro" - fi - pass=1 - else - pass=2 - fi - if [ "$os" = kfreebsd ] ; then - if [ "$options" = "defaults" ] ; then - options="rw" - elif ! echo "$options" | grep -q '\(^\|,\)r\(o\|w\)\(,\|$\)' ; then - options="${options},rw" - fi - echo "$path" "$mountpoint" ext2fs $options 0 $pass - else - echo "$path" "$mountpoint" ext2 $options 0 $pass - fi - if [ "$os" = hurd ] ; then - settrans -pk "/target/$mountpoint" /hurd/ext2fs.static -T device "${path#/dev/}" - fi - ;; fat16|fat32) [ -f "$id/mountpoint" ] || continue mountpoint=$(cat $id/mountpoint) diff -Nru partman-basicfilesystems-90/mount.d/basic partman-basicfilesystems-91/mount.d/basic --- partman-basicfilesystems-90/mount.d/basic 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/mount.d/basic 2014-02-13 15:01:05.000000000 -0500 @@ -10,7 +10,7 @@ pass=$6 case $type in - ext2|vfat|ext2fs|msdosfs) + vfat|msdosfs) mount ${options:+-o "$options"} ${type:+-t "$type"} $fs /target$mp || exit 1 echo "umount /target$mp" exit 0 diff -Nru partman-basicfilesystems-90/mountoptions/ext2 partman-basicfilesystems-91/mountoptions/ext2 --- partman-basicfilesystems-90/mountoptions/ext2 2013-11-09 15:51:55.000000000 -0500 +++ partman-basicfilesystems-91/mountoptions/ext2 1969-12-31 19:00:00.000000000 -0500 @@ -1,11 +0,0 @@ -noatime -nodiratime -relatime -nodev -nosuid -noexec -ro -sync -usrquota -grpquota -user_xattr diff -Nru partman-basicfilesystems-90/mountoptions/ext2.kfreebsd partman-basicfilesystems-91/mountoptions/ext2.kfreebsd --- partman-basicfilesystems-90/mountoptions/ext2.kfreebsd 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/mountoptions/ext2.kfreebsd 1969-12-31 19:00:00.000000000 -0500 @@ -1,6 +0,0 @@ -acls -noatime -noexec -nosuid -ro -sync diff -Nru partman-basicfilesystems-90/parted_names/ext2 partman-basicfilesystems-91/parted_names/ext2 --- partman-basicfilesystems-90/parted_names/ext2 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/parted_names/ext2 1969-12-31 19:00:00.000000000 -0500 @@ -1 +0,0 @@ -ext2 diff -Nru partman-basicfilesystems-90/valid_filesystems/ext2 partman-basicfilesystems-91/valid_filesystems/ext2 --- partman-basicfilesystems-90/valid_filesystems/ext2 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/valid_filesystems/ext2 1969-12-31 19:00:00.000000000 -0500 @@ -1,25 +0,0 @@ -#!/bin/sh - -dev=$1 -id=$2 -method=$3 - -[ -f /var/lib/partman/ext2 ] || exit 0 - -case $method in - formatable) - echo ext2 - ;; - existing) - [ -f $id/detected_filesystem ] || exit 0 - fs=$(cat $id/detected_filesystem) - - case "$fs" in - ext2) - echo ext2 - ;; - esac - ;; -esac - - diff -Nru partman-basicfilesystems-90/valid_filesystems/_numbers partman-basicfilesystems-91/valid_filesystems/_numbers --- partman-basicfilesystems-90/valid_filesystems/_numbers 2011-01-18 23:57:21.000000000 -0500 +++ partman-basicfilesystems-91/valid_filesystems/_numbers 2014-02-13 15:00:00.000000000 -0500 @@ -1,2 +1 @@ -10 ext2 80 fat
Attachment:
signature.asc
Description: OpenPGP digital signature