Package: rootskel Version: 1.86 Tags: patch Usertags: gsoc2010 Hi,
The rootskel udeb has been failing to build from source on Hurd for some time... The attached patch adds Hurd versions of the system-dependant files, and makes other fixes which produce a functional, up-to-date rootskel udeb on Hurd. If you apply this, please remember to fill-in the bug number in the changelog, create the empty src/etc/fstab-hurd, and set execute permissions on src/sbin/reopen-console-hurd. Thanks, -- Jeremie Koenig <j...@jk.fr.eu.org> http://jk.fr.eu.org
Index: debian/changelog =================================================================== --- debian/changelog (revision 64309) +++ debian/changelog (working copy) @@ -1,3 +1,17 @@ +rootskel (1.87) UNRELEASED; urgency=low + + * Fix lib/debian-installer.d/S40term-hurd. + * Provide a -hurd version for some files: (closes: #<please fill-in>) + - lib/debian-installer/detect-console + - lib/debian-installer/exit (skips umount, which is not available yet) + - etc/fstab (empty) + - etc/inittab (copied the Linux one) + - sbin/reopen-console (not much guesswork yet) + * Skip the creation of /etc/mtab on Hurd (our /proc/mounts is itself a + symlink to mtab). + + -- Jeremie Koenig <j...@jk.fr.eu.org> Thu, 12 Aug 2010 07:09:26 +0000 + rootskel (1.86) unstable; urgency=low [ Jeremie Koenig ] Index: src/lib/debian-installer.d/S40term-hurd =================================================================== --- src/lib/debian-installer.d/S40term-hurd (revision 64309) +++ src/lib/debian-installer.d/S40term-hurd (working copy) @@ -1,6 +1,6 @@ -+# Enable UTF-8 locale if it is available -+if [ "$TERM" = hurd ] && [ -d /usr/lib/locale/C.UTF-8 ]; then -+ TERM_UTF8=yes -+ : >/var/lib/UTF-8 -+ export LANG=C.UTF-8 -+fi +# Enable UTF-8 locale if it is available +if [ "$TERM" = hurd ] && [ -d /usr/lib/locale/C.UTF-8 ]; then + TERM_UTF8=yes + : >/var/lib/UTF-8 + export LANG=C.UTF-8 +fi Index: src/lib/debian-installer/detect-console-hurd =================================================================== --- src/lib/debian-installer/detect-console-hurd (revision 0) +++ src/lib/debian-installer/detect-console-hurd (revision 0) @@ -0,0 +1,18 @@ +if [ -z "$TERM_TYPE" ]; then + case $(tty) in + /dev/tty[0-9]*) + TERM_TYPE=virtual + ;; + /dev/console) + TERM_TYPE=serial #unsure (mach console) + ;; + /dev/com*) + TERM_TYPE=serial + ;; + /dev/tty[pq]*) + TERM_TYPE=pts + ;; + esac +fi + +export TERM_TYPE Index: src/lib/debian-installer/exit-hurd =================================================================== --- src/lib/debian-installer/exit-hurd (revision 0) +++ src/lib/debian-installer/exit-hurd (revision 0) @@ -0,0 +1,21 @@ +#!/bin/sh + +/lib/debian-installer/exit-command +CMDN=$? + +case "$CMDN" in +20) CMD=reboot;; +21) CMD=halt;; +22) CMD=poweroff;; +*) echo "got weird return code $CMDN";; +esac + +#/bin/umount -a -r +/sbin/swapoff -a + +$CMD + +# if possible, give init a chance to kill main-menu +if type sleep >/dev/null 2>&1; then + sleep 10 || true +fi Index: src/etc/fstab-hurd =================================================================== Index: src/etc/inittab-hurd =================================================================== --- src/etc/inittab-hurd (revision 0) +++ src/etc/inittab-hurd (revision 0) @@ -0,0 +1,21 @@ +# /etc/inittab +# busybox init configuration for debian-installer + +# main rc script +::sysinit:/sbin/reopen-console /sbin/debian-installer-startup + +# main setup program +::respawn:/sbin/reopen-console /sbin/debian-installer + +# convenience shells +tty2::askfirst:-/bin/sh +tty3::askfirst:-/bin/sh + +# logging +tty4::respawn:/usr/bin/tail -f /var/log/syslog + +# Stuff to do before rebooting +::ctrlaltdel:/sbin/shutdown > /dev/null 2>&1 + +# re-exec init on receipt of SIGHUP/SIGUSR1 +::restart:/sbin/init Index: src/etc/Makefile =================================================================== --- src/etc/Makefile (revision 64309) +++ src/etc/Makefile (working copy) @@ -14,7 +14,10 @@ passwd \ profile +# On Hurd, /proc/mounts won't exist or will be a symlink to /etc/mtab itself. install-local:: $(outdir) +ifeq ($(DEB_HOST_ARCH_OS),hurd) ln -fs /proc/mounts $(outdir)/mtab +endif include ../../Makefile.inc Index: src/sbin/reopen-console-hurd =================================================================== --- src/sbin/reopen-console-hurd (revision 0) +++ src/sbin/reopen-console-hurd (revision 0) @@ -0,0 +1,12 @@ +#!/bin/sh + +# In order to give proper access to the tty, we need to locate the device +# corresponding to the console we are actually using. + +console= +if ! [ -f /var/run/console-device ]; then + tty > /var/run/console-device +fi + +# Some other session may have it as ctty. Steal it from them +exec /sbin/steal-ctty $(cat /var/run/console-device) "$@" Property changes on: src/sbin/reopen-console-hurd ___________________________________________________________________ Added: svn:executable + *