[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#592671: partman-target: /target/etc/fstab is not created on Hurd



Package: partman-target
Version: 68
Tags: patch
Usertags: gsoc2010

Hello,

The following pieces are missing to have /target/etc/fstab created on Hurd:
  - finish.d/create_fstab_header has no 'hurd' case;
  - the default "mount style" must be 'traditional' on Hurd, since there
    is no volume id support at the moment.

The attached patch adds them. The default value for partman/mount_style
is changed by debian/rules at build time, using an approach similar to
what partman-base does for partman/default_filesystem.

NB: if you commit this patch, remember to substitute the bug number in
debian/changelog.

Thanks,
-- 
Jeremie Koenig <jk@jk.fr.eu.org>
http://jk.fr.eu.org
Index: partman-target/debian/changelog
===================================================================
--- partman-target/debian/changelog	(revision 64302)
+++ partman-target/debian/changelog	(working copy)
@@ -1,10 +1,17 @@
 partman-target (69) UNRELEASED; urgency=low
 
+  [ Colin Watson ]
   * Use 'dh $@ --options' rather than 'dh --options $@', for
     forward-compatibility with debhelper v8.
 
- -- Colin Watson <cjwatson@debian.org>  Tue, 13 Jul 2010 10:53:29 +0100
+  [ Jeremie Koenig ]
+  * Hurd support (closes: #<please fill-in>):
+    - finish.d/create_fstab_header: add a hurd case;
+    - debian/rules: set as OS-dependant default for partman/mount_style,
+      using the same method as partman-base for partman/default_filesystem.
 
+ -- Jeremie Koenig <jk@jk.fr.eu.org>  Wed, 11 Aug 2010 20:02:47 +0000
+
 partman-target (68) unstable; urgency=low
 
   [ Updated translations ]
Index: partman-target/debian/rules
===================================================================
--- partman-target/debian/rules	(revision 64302)
+++ partman-target/debian/rules	(working copy)
@@ -1,3 +1,20 @@
 #! /usr/bin/make -f
 %:
 	dh $@ --with d-i
+
+ARCH_OS=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+ifeq ($(ARCH_OS),linux)
+DEFAULT_STYLE=uuid
+endif
+ifeq ($(ARCH_OS),kfreebsd)
+DEFAULT_STYLE=uuid
+endif
+ifeq ($(ARCH_OS),hurd)
+DEFAULT_STYLE=traditional
+endif
+
+override_dh_installdebconf:
+	dh_installdebconf
+	sed -i '/^Template: partman\/mount_style/,/^$$/s/^Default: .*/Default: $(DEFAULT_STYLE)/' \
+		debian/partman-target/DEBIAN/templates
Index: partman-target/finish.d/create_fstab_header
===================================================================
--- partman-target/finish.d/create_fstab_header	(revision 64302)
+++ partman-target/finish.d/create_fstab_header	(working copy)
@@ -28,5 +28,13 @@
 		printf "%-15s %-15s %-7s %-15s %-7s %s\n" sys /sys linsysfs rw 0 0 >> /target/etc/fstab
 		printf "%-15s %-15s %-7s %-15s %-7s %s\n" fdesc /dev/fd fdescfs rw 0 0 >> /target/etc/fstab
 	;;
+
+	hurd)
+		cat >/target/etc/fstab <<EOF
+# /etc/fstab: static file system information.
+#
+EOF
+		printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>' >> /target/etc/fstab
+	;;
 esac
 

Reply to: