r912 - in trunk/utils/initrd-tools: . debian

Joshua Kwan joshk@haydn.debian.org
Tue, 20 Jul 2004 01:54:49 -0600


Author: joshk
Date: 2004-07-20 01:54:47 -0600 (Tue, 20 Jul 2004)
New Revision: 912

Modified:
   trunk/utils/initrd-tools/debian/changelog
   trunk/utils/initrd-tools/debian/rules
   trunk/utils/initrd-tools/mkinitrd
Log:
small fixes for debian/rules, apply /proc/self/fd fallback patch to tide sparc64 over


Modified: trunk/utils/initrd-tools/debian/changelog
===================================================================
--- trunk/utils/initrd-tools/debian/changelog	2004-07-18 17:39:27 UTC (rev 911)
+++ trunk/utils/initrd-tools/debian/changelog	2004-07-20 07:54:47 UTC (rev 912)
@@ -1,9 +1,15 @@
 initrd-tools (0.1.72) UNRELEASED; urgency=low
 
-  * Add support for user mode linux (UML) ubd devices, thanks to Matt
-    Zimmerman (closes: #257373).
+  * Martin Michlmayr
+    - Add support for user mode linux (UML) ubd devices, thanks to Matt
+      Zimmerman (closes: #257373).
+  * Joshua Kwan
+    - Clean up rules a little bit.
+    - Apply my own patch to fall back on /proc/self/fd if /dev/fd is not
+      available, thus tiding us over on sparc initrd kernels.
+      (Closes: ? (EBUGNUMBER))
 
- -- Martin Michlmayr <tbm@cyrius.com>  Mon, 05 Jul 2004 15:26:03 +0100
+ -- Joshua Kwan <joshk@triplehelix.org>  Tue, 20 Jul 2004 00:50:35 -0700
 
 initrd-tools (0.1.71) unstable; urgency=low
 
@@ -184,7 +190,7 @@
 
   * Restored fb/unix for MODULES=most (closes: #211295).
   * Fixed duplicate device symlinks (closes: #211880).
-  * Create /dev/lvm for devfs (Jö Fahlke, closes: #213408).
+  * Create /dev/lvm for devfs (Jö Fahlke, closes: #213408).
 
  -- Herbert Xu <herbert@debian.org>  Sat, 11 Oct 2003 21:52:45 +1000
 
@@ -351,7 +357,7 @@
 
 initrd-tools (0.1.35) unstable; urgency=low
 
-  * Use major number instead of device name when probing (Ingemar Fällman).
+  * Use major number instead of device name when probing (Ingemar Fällman).
   * Depend on debhelper >= 3.
   * Added support for module-init-tools (closes: #172810).
   * Added support for labels/UUID (closes: #174654).
@@ -362,7 +368,7 @@
 initrd-tools (0.1.34) unstable; urgency=low
 
   * Always load the unix module if it exists.
-  * Added rule for dasd devices (Jochen Röhrig, closes: #164878).
+  * Added rule for dasd devices (Jochen Röhrig, closes: #164878).
   * Include fb modules when boot is present.
   * Added ldd wrapper for static or non-binary executables (closes: #165367).
   * Documented INITRDDIR and MODULEDIR (Tomas Pospisek, closes: #165371).

Modified: trunk/utils/initrd-tools/debian/rules
===================================================================
--- trunk/utils/initrd-tools/debian/rules	2004-07-18 17:39:27 UTC (rev 911)
+++ trunk/utils/initrd-tools/debian/rules	2004-07-20 07:54:47 UTC (rev 912)
@@ -10,20 +10,15 @@
 # This is the debhelper compatibility version to use.
 export DH_COMPAT=3
 
-build: build-stamp
-build-stamp:
-	dh_testdir
+build binary-indep:
+# Ye olde no-op.
 
-	touch build-stamp
-
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp
-
 	dh_clean
 
-install: build
+install: 
 	dh_testdir
 	dh_testroot
 	dh_clean -k
@@ -35,10 +30,6 @@
 	cp mkinitrd debian/initrd-tools/usr/sbin
 	cp mkinitrd.conf modules debian/initrd-tools/etc/mkinitrd
 
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
 # Build architecture-dependent files here.
 binary-arch: build install
 	dh_testdir
@@ -57,5 +48,5 @@
 	dh_md5sums
 	dh_builddeb
 
-binary: binary-indep binary-arch
+binary: binary-arch
 .PHONY: build clean binary-indep binary-arch binary install

Modified: trunk/utils/initrd-tools/mkinitrd
===================================================================
--- trunk/utils/initrd-tools/mkinitrd	2004-07-18 17:39:27 UTC (rev 911)
+++ trunk/utils/initrd-tools/mkinitrd	2004-07-20 07:54:47 UTC (rev 912)
@@ -1193,10 +1193,15 @@
 ROOT=${croot-$ROOT}
 MKIMAGE=${cmkimage-$MKIMAGE}
 
-[ -d /dev/fd ] || {
-	echo "$PROG: /dev/fd does not exist" >&2
+if [ -d /dev/fd ]; then
+	FD=/dev/fd
+elif [ -d /proc/self/fd ]; then
+	FD=/proc/self/fd
+else
+	echo "$PROG: neither /dev/fd or /proc/self/fd exists!" >&2
+	echo "Try mounting the proc filesystem: mount -tproc none /proc" >&2
 	exit 1
-}
+fi
 
 DSIG=
 exittrap='if [ $DSIG ]; then trap - "$DSIG"; kill -s $DSIG $$; fi'
@@ -1222,4 +1227,4 @@
 
 umask "$UMASK"
 gendir $workdir
-eval "$(printf "$MKIMAGE" $workdir/initrd /dev/fd/3)" 3>&1 >&2
+eval "$(printf "$MKIMAGE" $workdir/initrd $FD/3)" 3>&1 >&2