Package: partman-basicfilesystems Version: 63 Severity: normal Usertags: gsoc2010 Tags: patch
Hello, partman-basicfilesystems needs a few special cases to work properly on Hurd, namely: - no kernel modules are needed for ext2 and vfat; - only 4k blocks, 128 bytes inodes are supported by ext2fs; - the "errors=remount-ro" option is not supported. See the attached patch. Thanks, -- Jeremie Koenig <j...@jk.fr.eu.org> http://jk.fr.eu.org
Index: partman-basicfilesystems/debian/changelog =================================================================== --- partman-basicfilesystems/debian/changelog (revision 63538) +++ partman-basicfilesystems/debian/changelog (working copy) @@ -7,8 +7,14 @@ * Remove no longer needed Lintian override for missing Standards- Version field. - -- Colin Watson <cjwat...@debian.org> Thu, 27 Aug 2009 10:58:41 +0100 + [ Jeremie Koenig ] + * Hurd support (closes: <please fill in>): + - disable errors=remount-ro, which is not supported; + - force 4k blocks and 128 bytes inodes on mkfs.ext2; + - mark ext2 and vfat as available and skip tests for kernel modules. + -- Jeremie Koenig <j...@jk.fr.eu.org> Wed, 23 Jun 2010 07:00:23 +0200 + partman-basicfilesystems (63) unstable; urgency=low [ Christian Perrier ] Index: partman-basicfilesystems/commit.d/format_basicfilesystems =================================================================== --- partman-basicfilesystems/commit.d/format_basicfilesystems (revision 63538) +++ partman-basicfilesystems/commit.d/format_basicfilesystems (working copy) @@ -48,7 +48,14 @@ db_subst $template DEVICE $(humandev $(cat device)) case $filesystem in ext2) - if [ ! -f $id/usage ]; then + 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 @@ -61,12 +68,8 @@ db_progress START 0 3 partman/text/formatting db_progress INFO $template db_progress SET 1 - usage='' - if [ -f $id/usage ]; then - usage="-T $(cat $id/usage)" - fi if log-output -t partman --pass-stdout \ - mkfs.ext2 $device $usage >/dev/null; then + mkfs.ext2 $device $options >/dev/null; then sync status=OK else Index: partman-basicfilesystems/fstab.d/basic =================================================================== --- partman-basicfilesystems/fstab.d/basic (revision 63538) +++ partman-basicfilesystems/fstab.d/basic (working copy) @@ -39,7 +39,9 @@ fi options=$(get_mountoptions $dev $id) if [ "$mountpoint" = / ]; then - if [ "$options" = defaults ]; then + if [ "$(udpkg --print-os)" = hurd ]; then + : # remount-ro not supported + elif [ "$options" = defaults ]; then options="errors=remount-ro" else options="${options},errors=remount-ro" Index: partman-basicfilesystems/init.d/kernelmodules_basicfilesystems =================================================================== --- partman-basicfilesystems/init.d/kernelmodules_basicfilesystems (revision 63538) +++ partman-basicfilesystems/init.d/kernelmodules_basicfilesystems (working copy) @@ -2,6 +2,13 @@ mkdir -p /var/lib/partman +# On Hurd they are always available +if [ "$(udpkg --print-os)" = hurd ]; then + >/var/lib/partman/ext2 + >/var/lib/partman/vfat + exit 0 +fi + cat /proc/modules | while read module_name x; do if [ "$module_name" = ext2 ]; then