Merge remote-tracking branch 'debian/debian' into ch/new_version
authorChristian Hofstaedtler <ch@grml.org>
Sun, 24 Jul 2011 19:57:36 +0000 (21:57 +0200)
committerChristian Hofstaedtler <ch@grml.org>
Sun, 24 Jul 2011 19:57:36 +0000 (21:57 +0200)
Conflicts:
Makefile
debian/changelog
debian/control
debian/rules

33 files changed:
Makefile
debian/changelog
debian/control
debian/live-boot-grml-doc.install [moved from debian/live-boot-doc.install with 100% similarity]
debian/live-boot-grml-initramfs-tools.postinst [moved from debian/live-boot-initramfs-tools.postinst with 100% similarity]
debian/live-boot-grml-initramfs-tools.triggers [moved from debian/live-boot-initramfs-tools.triggers with 100% similarity]
debian/live-boot-grml.bug-presubj [moved from debian/live-boot.bug-presubj with 100% similarity]
debian/live-boot-grml.bug-script [moved from debian/live-boot.bug-script with 100% similarity]
debian/live-boot-grml.init [moved from debian/live-boot.init with 100% similarity]
debian/live-boot-grml.install [moved from debian/live-boot.install with 100% similarity]
debian/live-boot-grml.lintian-overrides [new file with mode: 0644]
debian/live-boot.lintian-overrides [deleted file]
debian/patches/01_fix_output_file.patch [new file with mode: 0644]
debian/patches/03_grml_version_file_hook.patch [new file with mode: 0644]
debian/patches/05_boot_failure_message_grml.patch [new file with mode: 0644]
debian/patches/07_support_findiso.patch [new file with mode: 0644]
debian/patches/08_grml_defaults.patch [new file with mode: 0644]
debian/patches/10_validateroot.patch [new file with mode: 0644]
debian/patches/11_dhcphostname.patch [new file with mode: 0644]
debian/patches/12_uuid_support.patch [new file with mode: 0644]
debian/patches/13_always_display_warnings_and_failures.patch [new file with mode: 0644]
debian/patches/14_no_blkid_on_lenny.patch [new file with mode: 0644]
debian/patches/15_networking_grml.patch [new file with mode: 0644]
debian/patches/16_nodhcp.patch [new file with mode: 0644]
debian/patches/19_revert_toram_bootoption_to_expected_behaviour.patch [new file with mode: 0644]
debian/patches/25_support_lvm_for_live-media.patch [new file with mode: 0644]
debian/patches/26_support_dns_bootoption.patch [new file with mode: 0644]
debian/patches/27_support_static_ip.patch [new file with mode: 0644]
debian/patches/28_remove_localized_manpages.patch [new file with mode: 0644]
debian/patches/29_support_dns_in_initramfs.patch [new file with mode: 0644]
debian/patches/30_support_multiarch_dns.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules

index a2ab1b9..ed2471f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,18 +45,18 @@ install:
        mkdir -p $(DESTDIR)/sbin
        cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
 
-       mkdir -p $(DESTDIR)/usr/share/live-boot
-       cp bin/live-preseed bin/live-reconfigure local/languagelist $(DESTDIR)/usr/share/live-boot
+       mkdir -p $(DESTDIR)/usr/share/live-boot-grml
+       cp bin/live-preseed bin/live-reconfigure local/languagelist $(DESTDIR)/usr/share/live-boot-grml
 
        mkdir -p $(DESTDIR)/usr/share/initramfs-tools
        cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
 
        # Installing docs
-       mkdir -p $(DESTDIR)/usr/share/doc/live-boot
-       cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-boot
+       mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml
+       cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-boot-grml
 
-       mkdir -p $(DESTDIR)/usr/share/doc/live-boot/examples
-       cp -r etc/* $(DESTDIR)/usr/share/doc/live-boot/examples
+       mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml/examples
+       cp -r etc/* $(DESTDIR)/usr/share/doc/live-boot-grml/examples
        # (FIXME)
 
        # Installing manpages
@@ -80,7 +80,7 @@ uninstall:
        rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/sbin || true
 
-       rm -rf $(DESTDIR)/usr/share/live-boot
+       rm -rf $(DESTDIR)/usr/share/live-boot-grml
 
        rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
        rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
@@ -94,7 +94,7 @@ uninstall:
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
 
        # Uninstalling docs
-       rm -rf $(DESTDIR)/usr/share/doc/live-boot
+       rm -rf $(DESTDIR)/usr/share/doc/live-boot-grml
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc || true
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share || true
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
index fde7ac9..997b433 100644 (file)
@@ -20,6 +20,51 @@ live-boot (3.0~a18-1) unstable; urgency=low
 
  -- Daniel Baumann <daniel@debian.org>  Sat, 11 Jun 2011 11:24:15 +0200
 
+live-boot (3.0~a17-1+grml.01) unstable; urgency=low
+
+  * [6666658] Do not fail in multiarch environment when
+    installing libnss_dns.so.
+  * [ebdefd9] Drop installation of localized manpages
+    from upstream Makefile.
+
+ -- Michael Prokop <mika@grml.org>  Wed, 08 Jun 2011 12:15:23 +0200
+
+live-boot (3.0~a17-1+grml.00) unstable; urgency=low
+
+  [ Christian Hofstaedtler ]
+  * [c9a70fd] Add dpatch support to build process.
+  * [a9ddc0a] Readd Grml patches.
+  * [675f2b2] Remove unused boot scripts.
+  * [c4993d4] Update debian/control for Grml.
+  * [0716b66] Ensure 10validateroot is executable.
+  * [b5b937f] Always honor the "nodhcp" boot option.
+  * [10cf847] Don't mess around with kernel/initramfs-tools' ip=.
+  * [aa93321] Networking_grml: DNS for systems without resolvconf.
+  * [2a859b8] Merge dhcphostname support into 23networking-grml.
+  * [10caf0b] Support DNS in boot environment.
+
+  [ Michael Prokop ]
+  * [6cd3977] Add patch number 19 to revert the toram bootoption
+    to expected behaviour.
+  * [65fa11b] Support dns bootoption.
+
+  [ Ulrich Dangel ]
+  * [df17b43] Support lvm devices for live-media.
+  * [8ff045c] Support raid devices as well.
+  * [2ad3c30] Change output to live-boot.log.
+  * [34b4518] Explicit specify offset parameter for setup_loop.
+    [Closes: issue1003]
+  * [3ac64e5] Remove dba from uploader as this is a Grml project.
+  * [b289379] Support static ip configuration.
+  * [1371673] Improve static version.
+  * [9487c5d] Change nodhcp patch to unset the DHCP option as well.
+  * [1662374] Support nodhcp bootoption.
+  * [7847abd] Ignore devices with no file matching the findiso parameter.
+  * [7158e84] Don't show an error message if /live/image is already
+    unmounted.
+
+ -- Michael Prokop <mika@grml.org>  Sun, 05 Jun 2011 21:29:14 +0200
+
 live-boot (3.0~a17-1) unstable; urgency=low
 
   [ Daniel Baumann ]
index f574af7..14477ca 100644 (file)
@@ -1,18 +1,20 @@
 Source: live-boot
 Section: misc
 Priority: optional
-Maintainer: Debian Live Project <debian-live@lists.debian.org>
-Uploaders: Daniel Baumann <daniel@debian.org>
-Build-Depends: debhelper (>= 8)
+Maintainer: Grml Team <team@grml.org>
+Build-Depends: debhelper (>= 8), quilt
 Standards-Version: 3.9.2
 Homepage: http://live.debian.net/devel/live-boot/
-Vcs-Browser: http://live.debian.net/gitweb/?p=live-boot.git
-Vcs-Git: git://live.debian.net/git/live-boot.git
+Vcs-Browser: http://git.grml.org/?p=live-boot-grml.git
+Vcs-Git: git://git.grml.org/live-boot-grml.git
 
-Package: live-boot
+Package: live-boot-grml
 Architecture: all
-Depends: ${misc:Depends}, live-boot-initramfs-tools | live-boot-backend
-Recommends: live-boot-doc, eject, file, rsync, uuid-runtime
+Depends: ${misc:Depends}, live-boot-grml-initramfs-tools
+Recommends: live-boot-grml-doc, eject, file, rsync, uuid-runtime
+Conflicts: live-boot
+Replaces: live-boot
+Provides: live-boot
 Suggests: curlftpfs, cryptsetup, httpfs2, unionfs-fuse, wget
 Description: Debian Live - System Boot Scripts
  live-boot contains the scripts that configure a Debian Live system during the
@@ -20,19 +22,28 @@ Description: Debian Live - System Boot Scripts
  .
  In addition to live-boot, a backend for the initrd generation is required, such
  as live-boot-initramfs-tools.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
 
-Package: live-boot-doc
+Package: live-boot-grml-doc
 Architecture: all
 Depends: ${misc:Depends}
-Conflicts: live-boot (<< 3.0~a18~)
-Replaces: live-boot
+Conflicts: live-boot (<< 3.0~a18~), live-boot-doc
+Replaces: live-boot, live-boot-doc
+Provides: live-boot-doc
 Description: Debian Live - System Boot Scripts (documentation)
  live-boot contains the scripts that configure a Debian Live system during the
  boot process (early userspace).
  .
  This package contains the documentation.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
 
-Package: live-boot-initramfs-tools
+Package: live-boot-grml-initramfs-tools
 Architecture: all
 Depends:
  ${misc:Depends}, busybox | busybox-initramfs, initramfs-tools, udev
@@ -44,3 +55,7 @@ Description: Debian Live - System Boot Scripts (initramfs-tools backend)
  boot process (early userspace).
  .
  This package contains the initramfs-tools backend.
+ .
+ Please notice that this package is maintained by the grml.org team.
+ This is NOT a fork of Debian's live-boot, it's just a customized
+ version to better fit Grml's needs.
diff --git a/debian/live-boot-grml.lintian-overrides b/debian/live-boot-grml.lintian-overrides
new file mode 100644 (file)
index 0000000..001198f
--- /dev/null
@@ -0,0 +1,4 @@
+# false positives, not applicable to live systems
+live-boot-grml: init.d-script-missing-dependency-on-remote_fs /etc/init.d/live-boot-grml: required-start
+live-boot-grml: init.d-script-missing-dependency-on-remote_fs /etc/init.d/live-boot-grml: required-stop
+live-boot-grml: init.d-script-possible-missing-stop /etc/init.d/live-boot-grml 1
diff --git a/debian/live-boot.lintian-overrides b/debian/live-boot.lintian-overrides
deleted file mode 100644 (file)
index aa345a5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# false positives, not applicable to live systems
-live-boot: init.d-script-missing-dependency-on-remote_fs /etc/init.d/live-boot: required-start
-live-boot: init.d-script-missing-dependency-on-remote_fs /etc/init.d/live-boot: required-stop
-live-boot: init.d-script-possible-missing-stop /etc/init.d/live-boot 1
diff --git a/debian/patches/01_fix_output_file.patch b/debian/patches/01_fix_output_file.patch
new file mode 100644 (file)
index 0000000..4dce5d4
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/scripts/live
++++ b/scripts/live
+@@ -1590,7 +1590,7 @@
+                               loopdevname=$(setup_loop "/isofrom/${ISO_NAME}" "loop" "/sys/block/loop*" "" '')
+                               devname="${loopdevname}"
+                       else
+-                              echo "Warning: unable to mount $ISO_DEVICE." >>/live.log
++                              echo "Warning: unable to mount $ISO_DEVICE." >>/live-boot.log
+                       fi
+               fi
+       fi
diff --git a/debian/patches/03_grml_version_file_hook.patch b/debian/patches/03_grml_version_file_hook.patch
new file mode 100644 (file)
index 0000000..df27676
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_grml_version_file_hook.dpatch by <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Copy /etc/grml_version to initrd
+
+@DPATCH@
+
+--- a/hooks/live
++++ b/hooks/live
+@@ -40,6 +40,12 @@
+       done
+ fi
++# Grml version information:
++if [ -r /etc/grml_version ]
++then
++       cp /etc/grml_version "${DESTDIR}"/etc
++fi
++
+ # Handling live-boot
+ [ "${QUIET}" ] || echo -n " "core
diff --git a/debian/patches/05_boot_failure_message_grml.patch b/debian/patches/05_boot_failure_message_grml.patch
new file mode 100644 (file)
index 0000000..1e31090
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_boot_failure_message_grml.dpatch by  <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Copy /etc/grml_version to initrd
+
+@DPATCH@
+
+--- a/scripts/live-functions
++++ b/scripts/live-functions
+@@ -88,14 +88,20 @@
+       printf "     ${DEB_1}\n"
+       printf "     ${DEB_2}  \033[1;37mBOOT FAILED!\033[0m\n"
+       printf "     ${DEB_3}\n"
+-      printf "     ${DEB_4}  This Debian Live image failed to boot.\n\n"
++      printf "     ${DEB_4}  This image failed to boot.\n\n"
+-      printf "  Please file a bug against the 'live-boot' package or email the Debian\n"
+-      printf "  Live mailing list at <debian-live@lists.debian.org>, making sure to note the\n"
+-      printf "  exact version, name and distribution of the image you were attempting to boot.\n\n"
++      printf "  Please file a bug at your distributors bug tracking system, making\n"
++      printf "  sure to note the exact version, name and distribution of the image\n"
++      printf "  you were attempting to boot.\n\n"
++
++      if [ -r /etc/grml_version ]
++      then
++              GRML_VERSION="$(cat /etc/grml_version)"
++              printf "  $GRML_VERSION\n\n"
++      fi
+       printf "  The file ${LIVELOG} contains some debugging information but booting with the\n"
+-      printf "  ${DEBUG} command-line parameter will greatly increase its verbosity which is\n"
++      printf "  ${DEBUG}=1 command-line parameter will greatly increase its verbosity which is\n"
+       printf "  extremely useful when diagnosing issues.\n\n"
+       if [ -n "${panic}" ]; then
diff --git a/debian/patches/07_support_findiso.patch b/debian/patches/07_support_findiso.patch
new file mode 100644 (file)
index 0000000..e0b0367
--- /dev/null
@@ -0,0 +1,79 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07_support_findiso.dpatch by Michael Schierl <schierlm@gmx.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: support for findoiso bootoption
+# When booting with findiso=/grml_2010.05.iso, it will look for
+# that .iso file on all disks where it usually looks for the .squashfs
+# file. When it is found, the disk containing the iso is read-only mounted
+# as /live/findiso (and exposed there after boot completed). The squashfs
+# file is searched inside that ISO file then.
+
+@DPATCH@
+--- a/scripts/live
++++ b/scripts/live
+@@ -106,6 +106,11 @@
+                               export FETCH
+                               ;;
++                      findiso=*)
++                              FINDISO="${ARGUMENT#findiso=}"
++                              export FINDISO
++                              ;;
++
+                       forcepersistentfsck)
+                               FORCEPERSISTENTFSCK="Yes"
+                               export FORCEPERSISTENTFSCK
+@@ -1629,13 +1634,28 @@
+               mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
+               [ -n "$devuid" ] && echo "$devuid" >> $tried
++              if [ -n "${FINDISO}" ]
++              then
++                      if [ -f ${mountpoint}/${FINDISO} ]
++                      then
++                              umount ${mountpoint}
++                              mkdir /live/findiso -p
++                              mount -t ${fstype} -o ro,noatime "${devname}" /live/findiso
++                              loopdevname=$(setup_loop "/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" 0 "")
++                              devname="${loopdevname}"
++                              mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
++                      else
++                              umount ${mountpoint}
++                      fi
++              fi
++
+               if is_live_path ${mountpoint} && \
+                       ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
+               then
+                       echo ${mountpoint}
+                       return 0
+               else
+-                      umount ${mountpoint}
++                      umount ${mountpoint} 2>/dev/null
+               fi
+       fi
+@@ -1933,6 +1953,22 @@
+       # when booting FAI, this simple workaround solves it
+       ls /root/* >/dev/null 2>&1
++      # Move findiso directory to the new root filesystem so that programs there can get at it.
++      if [ -d /live/findiso -a ! -d /root/live/findiso ]
++      then
++              mkdir -p /root/live/findiso
++              mount -n --move /live/findiso /root/live/findiso
++      fi
++
++      # if we do not unmount the ISO we can't run "fsck /dev/ice" later on
++      # because the mountpoint is left behind in /proc/mounts, so let's get
++      # rid of it when running from RAM
++      if [ -n "$FINDISO" ] && [ "${TORAM}" ]
++      then
++              losetup -d /dev/loop0
++              grep -q /live/findiso /proc/mounts && umount /root/live/findiso
++      fi
++
+       # copy snapshot configuration if exists
+       if [ -f snapshot.conf ]
+       then
diff --git a/debian/patches/08_grml_defaults.patch b/debian/patches/08_grml_defaults.patch
new file mode 100644 (file)
index 0000000..89b0f3c
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08_grml_defaults.dpatch by Christian Hofstaedtler <ch@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Pseudo-brand as grml
+
+@DPATCH@
+--- a/scripts/live
++++ b/scripts/live
+@@ -16,9 +16,9 @@
+ root_snapshot_label="live-sn"
+ home_snapshot_label="home-sn"
+-USERNAME="user"
+-USERFULLNAME="Live user"
+-HOSTNAME="host"
++USERNAME="grml"
++USERFULLNAME="grml user"
++HOSTNAME="grml"
+ mkdir -p "${mountpoint}"
+ tried="/tmp/tried"
diff --git a/debian/patches/10_validateroot.patch b/debian/patches/10_validateroot.patch
new file mode 100644 (file)
index 0000000..042fb19
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_validateroot.dpatch by Christian Hofstaedtler <ch@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add live-bottom/10validateroot
+
+@DPATCH@
+--- /dev/null
++++ b/scripts/live-bottom/10validateroot
+@@ -0,0 +1,27 @@
++#!/bin/sh
++
++#set -e
++
++# initramfs-tools header
++
++PREREQ=""
++
++prereqs()
++{
++        echo "${PREREQ}"
++}
++
++case "${1}" in
++        prereqs)
++                prereqs
++                exit 0
++                ;;
++esac
++
++. /scripts/live-functions
++. /scripts/live-helpers
++
++if ! [ -x "/root/sbin/init" ] ; then
++  panic "rootfs can not be mounted as supposed because of fatal error during bootup."
++fi
++
diff --git a/debian/patches/11_dhcphostname.patch b/debian/patches/11_dhcphostname.patch
new file mode 100644 (file)
index 0000000..dbffc7c
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_dhcphostname.dpatch by Andreas Thienemann <andreas@bawue.net>
+## and Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support disabling setting hostname via DNS info
+
+@DPATCH@
+
+Support 'nodhcphostname' option which will disable setting the
+hostname of the booted system according to the DNS information.
+This patch takes care of the netboot case.
+
+--- a/scripts/live
++++ b/scripts/live
+@@ -220,6 +220,11 @@
+                               export NOACCESSIBILITY
+                               ;;
++                      nodhcphostname)
++                              NODHCPHOSTNAME="Yes"
++                              export NODHCPHOSTNAME
++                              ;;
++
+                       nofastboot)
+                               NOFASTBOOT="Yes"
+                               export NOFASTBOOT
diff --git a/debian/patches/12_uuid_support.patch b/debian/patches/12_uuid_support.patch
new file mode 100644 (file)
index 0000000..34cee3d
--- /dev/null
@@ -0,0 +1,112 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_uuid_support.dpatch by Michael Prokop <prokop@grml-forensic.org>
+##
+## DP: This patch enables support for verifying the ISO through bootid=.... bootoption.
+## DP: Logic behind bootoptions and possible combinations:
+## DP: * bootid.txt + wrong bootid=...                    => fails to boot
+## DP: * bootid.txt + right bootid=...                    => boots
+## DP: * bootid.txt + ignore_bootid                       => boots
+## DP: * bootid.txt + no bootid=... + no ignore_bootid    => fails to boot
+## DP: * no bootid.txt + no bootid=... + no ignore_bootid => boots
+## DP: * no bootid.txt + bootid=...                       => fails to boot
+## DP: * no bootid.txt + ignore_bootid=...                => boots
+
+@DPATCH@
+--- a/scripts/live
++++ b/scripts/live
+@@ -63,6 +63,11 @@
+                               export ACCESS
+                               ;;
++                      bootid=*)
++                              BOOTID="${ARGUMENT#bootid=}"
++                              export BOOTID
++                              ;;
++
+                       console=*)
+                               DEFCONSOLE="${ARGUMENT#*=}"
+                               export DEFCONSOLE
+@@ -144,6 +149,11 @@
+                               export FROMISO
+                               ;;
++                      ignore_bootid)
++                              IGNORE_BOOTID="Yes"
++                              export IGNORE_BOOTID
++                              ;;
++
+                       ignore_uuid)
+                               IGNORE_UUID="Yes"
+                               export IGNORE_UUID
+@@ -410,6 +420,42 @@
+       return 1
+ }
++grml_match_bootid()
++{
++      path="$1"
++
++      if [ -n "$IGNORE_BOOTID" ] ; then
++              echo " * Ignoring verification of bootid.txt as requested via ignore_bootid.">>/live-boot.log
++              return 0
++      fi
++
++      if [ -n "$BOOTID" ] && ! [ -r "${path}/conf/bootid.txt" ] ; then
++              echo "  * Warning: bootid=... specified but no bootid.txt found on currently requested device.">>/live-boot.log
++              return 1
++      fi
++
++      [ -r "${path}/conf/bootid.txt" ] || return 0
++
++      bootid_conf=$(cat "${path}/conf/bootid.txt")
++
++      if [ -z "$BOOTID" -a -z "$IGNORE_BOOTID" ]
++      then
++              echo " * Warning: bootid.txt found but ignore_bootid / bootid=.. bootoption missing...">>/live-boot.log
++              return 1
++      fi
++
++      if [ "$BOOTID" = "$bootid_conf" ]
++      then
++              echo " * Successfully verified /conf/bootid.txt from ISO, continuing... ">>/live-boot.log
++      else
++              echo " * Warning: BOOTID of ISO does not match. Retrying and continuing search...">>/live-boot.log
++              return 1
++      fi
++
++      return 0
++}
++
++
+ matches_uuid ()
+ {
+       if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
+@@ -1655,7 +1701,7 @@
+               fi
+               if is_live_path ${mountpoint} && \
+-                      ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
++                      ([ "${skip_uuid_check}" ] || grml_match_bootid ${mountpoint})
+               then
+                       echo ${mountpoint}
+                       return 0
+@@ -1769,19 +1815,6 @@
+                                       return 0
+                               fi
+                       done
+-              elif [ "${fstype}" = "squashfs" -o \
+-                      "${fstype}" = "btrfs" -o \
+-                      "${fstype}" = "ext2" -o \
+-                      "${fstype}" = "ext3" -o \
+-                      "${fstype}" = "ext4" -o \
+-                      "${fstype}" = "jffs2" ]
+-              then
+-                      # This is an ugly hack situation, the block device has
+-                      # an image directly on it.  It's hopefully
+-                      # live-boot, so take it and run with it.
+-                      ln -s "${devname}" "${devname}.${fstype}"
+-                      echo "${devname}.${fstype}"
+-                      return 0
+               fi
+       done
diff --git a/debian/patches/13_always_display_warnings_and_failures.patch b/debian/patches/13_always_display_warnings_and_failures.patch
new file mode 100644 (file)
index 0000000..f85217f
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_always_display_warnings_and_failures.dpatch by Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Always display failure and warning messages.
+
+@DPATCH@
+--- a/scripts/live-functions
++++ b/scripts/live-functions
+@@ -2,6 +2,17 @@
+ . /scripts/functions
+ . /live.vars
++# we definitely want this stuff visible
++log_failure_msg()
++{
++        printf "Failure: $@\n"
++}
++
++log_warning_msg()
++{
++        printf "Warning: $@\n"
++}
++
+ log_wait_msg ()
+ {
+       # Print a message and wait for enter
diff --git a/debian/patches/14_no_blkid_on_lenny.patch b/debian/patches/14_no_blkid_on_lenny.patch
new file mode 100644 (file)
index 0000000..75e1c1b
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_no_blkid_on_lenny.dpatch by Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: util-linux of lenny doesn't ship the initramfs-tools file
+## DP: /usr/share/initramfs-tools/hooks/utillinux yet which ensures
+## DP: that blkid is available, so therefore fall back to
+## DP: /lib/udev/vol_id in /scripts/live as well
+
+@DPATCH@
+--- a/scripts/live
++++ b/scripts/live
+@@ -1680,7 +1680,12 @@
+       if is_supported_fs ${fstype}
+       then
+-              devuid=$(blkid -o value -s UUID "$devname")
++              # lenny
++              if command -v blkid >/dev/null 2>&1 ; then
++                      devuid=$(blkid -o value -s UUID "${devname}")
++              elif [ -x /lib/udev/vol_id ]; then
++                      devuid=$(/lib/udev/vol_id --uuid "${devname}" 2>/dev/null)
++              fi
+               [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
+               mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
+               [ -n "$devuid" ] && echo "$devuid" >> $tried
diff --git a/debian/patches/15_networking_grml.patch b/debian/patches/15_networking_grml.patch
new file mode 100644 (file)
index 0000000..bb36204
--- /dev/null
@@ -0,0 +1,121 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 15_networking_grml.dpatch by Christian Hofstaedtler <ch@grml.org>
+## Licensed under GPLv2+.
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Ship our own networking script, which is compatible with the kernel's
+## DP: notion of ip= as well as resolvconf.
+
+@DPATCH@
+
+diff a/scripts/live-bottom/23networking_grml b/scripts/live-bottom/23networking_grml
+--- /dev/null
++++ b/scripts/live-bottom/23networking_grml
+@@ -0,0 +1,107 @@
++#!/bin/sh
++
++#set -e
++
++# initramfs-tools header
++
++PREREQ=""
++
++prereqs()
++{
++   echo "${PREREQ}"
++}
++
++case "${1}" in
++   prereqs)
++      prereqs
++      exit 0
++   ;;
++esac
++
++. /scripts/live-functions
++
++if [ -n "${NONETWORKING}" ]; then
++   exit 0
++fi
++
++modprobe af_packet # req'd for DHCP
++
++# initialize udev
++# (this /might/ be required for firmware loading to complete)
++if grep -q noudev /proc/cmdline; then
++   log_begin_msg "Networking: Skipping udev as requested via bootoption noudev."
++else
++   udevadm trigger
++   udevadm settle
++fi
++
++if [ -n "${IP}" ]; then
++   # call into initramfs-tools provided network setup functions, so basic
++   # networking is fine.
++   log_begin_msg "Networking: Waiting for basic network to come up..."
++   configure_networking
++fi
++
++# prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
++IFFILE="/root/etc/network/interfaces"
++RESOLVCONF="/root/etc/resolv.conf"
++
++# config for loopback networking
++cat > $IFFILE << EOF
++# Initially generated on boot by initramfs' 23networking.
++
++auto lo
++iface lo inet loopback
++
++EOF
++
++unset HOSTNAME
++
++# generate config for each present network device
++for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*; do
++    [ -e ${interface} ] || continue
++    interface=$(basename ${interface})
++    method="dhcp"
++
++    # NODHCP or a previously run ipconfig mean that ifupdown should never
++    # touch this interface (IP-stack wise).
++    netconfig=/tmp/net-${interface}.conf
++    if [ -n "$NODHCP" ] || [ -e "${netconfig}" ]; then
++        method="manual"
++    fi
++
++    cat >> $IFFILE << EOF
++allow-hotplug ${interface}
++iface ${interface} inet ${method}
++EOF
++
++    # DNS for resolvconf and /etc/resolv.conf
++    if [ -e "${netconfig}" ]; then
++        . "${netconfig}"
++        if [ -n "${DNSDOMAIN}" ]; then
++            echo "    dns-search ${DNSDOMAIN}" >> $IFFILE
++        fi
++        # make sure we don't have any 0.0.0.0 nameservers
++        IPV4DNSLIST=""
++        for IPV4DNS in ${IPV4DNS0} ${IPV4DNS1}; do
++            [ -n "${IPV4DNS}" ] || continue
++            [ "${IPV4DNS}" != "0.0.0.0" ] || continue
++            IPV4DNSLIST="${IPV4DNSLIST}${IPV4DNS} "
++        done
++        if [ -n "${IPV4DNSLIST}" ]; then
++            echo "    dns-nameservers ${IPV4DNSLIST}" >> $IFFILE
++            for IPV4DNS in ${IPV4DNSLIST}; do
++                echo "nameserver ${IPV4DNS}" >> $RESOLVCONF
++            done
++        fi
++    fi
++
++    if [ -z "$NODHCPHOSTNAME" -a -n "$HOSTNAME" ]; then
++        echo $HOSTNAME > /root/etc/hostname
++    fi
++
++    unset DEVICE IPV4ADDR IPV4BROADCAST IPV4NETMASK IPV4GATEWAY IPV4DNS0 IPV4DNS1 HOSTNAME DNSDOMAIN NISDOMAIN ROOTSERVER ROOTPATH filename
++    unset IPV4DNS IPV4DNSLIST
++
++    echo>> $IFFILE
++done
diff --git a/debian/patches/16_nodhcp.patch b/debian/patches/16_nodhcp.patch
new file mode 100644 (file)
index 0000000..45a2e33
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16_nodhcp.dpatch by Ulrich Dangel <mru@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle explicit "nodhcp"
+
+@DPATCH@
+
+--- a/scripts/live
++++ b/scripts/live
+@@ -93,6 +93,8 @@
+                       nodhcp)
+                               unset DHCP
++                              NODHCP="Yes"
++                              export NODHCP
+                               ;;
+                       ethdevice=*)
diff --git a/debian/patches/19_revert_toram_bootoption_to_expected_behaviour.patch b/debian/patches/19_revert_toram_bootoption_to_expected_behaviour.patch
new file mode 100644 (file)
index 0000000..d3717cd
--- /dev/null
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 19_revert_toram_bootoption_to_expected_behaviour.dpatch by Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Revert toram bootoption to expected behaviour.
+## DP:
+## DP: In commit 36bb11382c81d5bce4b69f6d3d618dfd1c38dffb
+## DP: of live-initramfs-grml (when merging Debian's version 1.157.4-1)
+## DP: the behaviour of toram bootoption was modified, see
+## DP: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534878
+## DP:
+## DP: On Grml we want to have the option to load the whole medium
+## DP: into RAM to e.g. have additional directories like /deb,
+## DP: /scripts or whatever. This is possible using the toram bootoption
+## DP: without any additional arguments.
+## DP:
+## DP: If you do NOT want to load the whole medium to RAM just
+## DP: boot using toram=grml.squashfs (or whatever it's named,
+## DP: there's a ready-to-use bootoption in Grml's bootsplash
+## DP: menu available) instead.
+## DP:
+## DP: Ammusingly the requested behaviour is available in Debian's
+## DP: live-boot if rsync is not available, so this patch
+## DP: actually just unifies the code paths and reverts the
+## DP: behaviour change back to what the log message says.
+
+@DPATCH@
+
+index d79beed..1b6926e 100755
+--- a/scripts/live
++++ b/scripts/live
+@@ -563,7 +563,7 @@
+       if [ -z "${MODULETORAM}" ]
+       then
+-              size=$(fs_size "" ${copyfrom}/${LIVE_MEDIA_PATH} "used")
++              size=$(fs_size "" ${copyfrom}/ "used")
+       else
+               MODULETORAMFILE="${copyfrom}/${LIVE_MEDIA_PATH}/${MODULETORAM}"
+@@ -639,8 +639,7 @@
+                               echo " * Copying whole medium to RAM" 1>/dev/console
+                               rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console  # "cp -a" from busybox also copies hidden files
+                       else
+-                              mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
+-                              cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}
++                              cp -a ${copyfrom}/* ${copyto}/
+                               if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ]
+                               then
+                                       cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto}
diff --git a/debian/patches/25_support_lvm_for_live-media.patch b/debian/patches/25_support_lvm_for_live-media.patch
new file mode 100644 (file)
index 0000000..d699738
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_support_lvm_for_live-media.dpatch by  <mru@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support lvm and raid devices for live-media
+
+@DPATCH@
+
+--- a/scripts/live
++++ b/scripts/live
+@@ -1669,6 +1669,29 @@
+                       umount $mountpoint
+               fi
+       fi
++
++      IFS=","
++      for device in ${devname} ; do
++              case "$device" in
++                      *mapper*)  # add lvm support
++                      if [ -x /scripts/local-top/lvm2 ] ; then
++                              ROOT="$device" resume="" /scripts/local-top/lvm2
++                      fi
++                      ;;
++                      /dev/md*)
++                      if [ -x /scripts/local-top/mdadm ] ; then
++                              cp /conf/conf.d/md /conf/conf.d/md.orig
++                              echo "MD_DEVS=$device " >> /conf/conf.d/md
++                              /scripts/local-top/mdadm
++                              mv /conf/conf.d/md.orig /conf/conf.d/md
++                      fi
++                      ;;
++              esac
++      done
++      unset IFS
++
++      [ -n "$device" ] && devname="$device"
++
+       [ -e "$devname" ] || continue
+       if [ -n "${LIVE_MEDIA_OFFSET}" ]
diff --git a/debian/patches/26_support_dns_bootoption.patch b/debian/patches/26_support_dns_bootoption.patch
new file mode 100644 (file)
index 0000000..ce1fc47
--- /dev/null
@@ -0,0 +1,62 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 26_support_dns_bootoption.dpatch by Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4
+
+@DPATCH@
+--- a/scripts/live
++++ b/scripts/live
+@@ -77,6 +77,18 @@
+                               BOOTIF="${x#BOOTIF=}"
+                               ;;
++                      dns=*)
++                              DNSSERVER="${ARGUMENT#*=}"
++                              if echo "${DNSSERVER}" | grep -q , ; then
++                                      DNSSERVER1="${DNSSERVER%,*}"
++                                      DNSSERVER2="${DNSSERVER#*,}"
++                                      export DNSSERVER1 DNSSERVER2
++                              else
++                                      DNSSERVER1="$DNSSERVER"
++                                      export DNSSERVER1
++                              fi
++                              unset DNSSERVER
++                              ;;
+                       debug)
+                               DEBUG="Yes"
+                               export DEBUG
+--- a/scripts/live-bottom/23networking_grml
++++ b/scripts/live-bottom/23networking_grml
+@@ -44,7 +44,12 @@
+ # prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
+ IFFILE="/root/etc/network/interfaces"
+-RESOLVCONF="/root/etc/resolv.conf"
++if [ -L /root/etc/resolv.conf ] ; then
++  # assume we have resolvconf
++  RESOLVCONF=/root/etc/resolvconf/resolv.conf.d/base
++else
++  RESOLVCONF="/root/etc/resolv.conf"
++fi
+ # config for loopback networking
+ cat > $IFFILE << EOF
+@@ -105,3 +110,17 @@
+     echo>> $IFFILE
+ done
++
++# dns bootoption
++if [ -n "$DNSSERVER1" ]
++then
++      # disable any existing entries
++      if [ -r $RESOLVCONF ]
++      then
++              sed -i 's/nameserver/# nameserver/' $RESOLVCONF
++      fi
++      for i in $DNSSERVER1 $DNSSERVER2
++      do
++              echo "nameserver $i" >> $RESOLVCONF
++      done
++fi
diff --git a/debian/patches/27_support_static_ip.patch b/debian/patches/27_support_static_ip.patch
new file mode 100644 (file)
index 0000000..03cd679
--- /dev/null
@@ -0,0 +1,163 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 27_support_staticip.dpatch by  <mru@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+
+--- a/scripts/live
++++ b/scripts/live
+@@ -110,9 +110,8 @@
+                               ;;
+                       ethdevice=*)
+-                              DEVICE="${ARGUMENT#ethdevice=}"
+-                              ETHDEVICE="${DEVICE}"
+-                              export DEVICE ETHDEVICE
++                              ETHDEVICE="${ARGUMENT#ethdevice=}"
++                              export ETHDEVICE
+                               ;;
+                       ethdevice-timeout=*)
+@@ -179,13 +178,9 @@
+                               ;;
+                       ip=*)
+-                              STATICIP="${ARGUMENT#ip=}"
+-
+-                              if [ -z "${STATICIP}" ]
+-                              then
+-                                      STATICIP="frommedia"
+-                              fi
+-
++                              # copy complete ip=args into staticip, and
++                              # keep multiple uses.
++                              STATICIP="${STATICIP} ${ARGUMENT}"
+                               export STATICIP
+                               ;;
+@@ -667,6 +662,24 @@
+       return 0
+ }
++get_ipconfig_para()
++{
++      if [ $# != 1 ] ; then
++              echo "Missin parameter for $0"
++              return
++      fi
++      devname=$1
++      for ip in ${STATICIP} ; do
++              case $ip in
++                      *:$devname:*)
++                      echo $ip
++                      return
++                      ;;
++              esac
++      done
++      echo $devname
++}
++
+ do_netsetup ()
+ {
+       modprobe -q af_packet # For DHCP
+@@ -677,9 +690,19 @@
+       [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15
+       echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration."
+-      if [ -z "${NETBOOT}" ] && [ -z "${FETCH}" ] && \
+-         [ -z "${HTTPFS}" ] && [ -z "${FTPFS}" ]
+-      then
++      # Our modus operandi for getting a working network setup is this:
++      # * If ip=* is set, pass that to ipconfig and be done
++      # * Else, try dhcp on all devices in this order:
++      #   ethdevice= bootif= <all interfaces>
++
++      ALLDEVICES="$(cd /sys/class/net/ && ls -1 2>/dev/null | grep -v '^lo$' )"
++
++      # Turn on all interfaces before doing anything, to avoid timing problems
++      # during link negotiation.
++      echo "Net: Turning on all device links..."
++      for device in ${ALLDEVICES}; do
++              ipconfig -c none -d $device -t 1 2>/dev/null >/dev/null
++      done
+       # support for Syslinux IPAPPEND parameter
+@@ -722,7 +745,7 @@
+                               if [ "$bootif_mac" = "$current_mac" ]
+                               then
+-                                      DEVICE=${device##*/}
++                                      ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice
+                                       break
+                               fi
+                       fi
+@@ -734,12 +757,7 @@
+       # for *every* present network device (except for loopback of course)
+       if [ -z "$ETHDEVICE" ] ; then
+               echo "If you want to boot from a specific device use bootoption ethdevice=..."
+-              for device in /sys/class/net/*; do
+-                      dev=${device##*/} ;
+-                      if [ "$dev" != "lo" ] ; then
+-                              ETHDEVICE="$ETHDEVICE $dev"
+-                      fi
+-              done
++        ETHDEVICE="$ALLDEVICES"
+       fi
+       # split args of ethdevice=eth0,eth1 into "eth0 eth1"
+@@ -747,38 +765,27 @@
+               devlist="$devlist $device"
+       done
+-      # this is tricky (and ugly) because ipconfig sometimes just hangs/runs into
+-      # an endless loop; iff execution fails give it two further tries, that's
+-      # why we use '$devlist $devlist $devlist' for the other for loop
+-      for dev in $devlist $devlist $devlist ; do
+-              echo "Executing ipconfig -t $ETHDEV_TIMEOUT $dev"
+-              ipconfig -t "$ETHDEV_TIMEOUT" $dev | tee -a /netboot.config &
+-              jobid=$!
+-              sleep "$ETHDEV_TIMEOUT" ; sleep 1
+-              if [ -r /proc/"$jobid"/status ] ; then
+-                      echo "Killing job $jobid for device $dev as ipconfig ran into recursion..."
+-                      kill -9 $jobid
++      for dev in $devlist ; do
++              param="$(get_ipconfig_para $dev)"
++              if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
++                      echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
++                      continue
+               fi
++              echo "Executing ipconfig -t $ETHDEV_TIMEOUT $param"
++              ipconfig -t "$ETHDEV_TIMEOUT" "$param" | tee -a /netboot.config
+               # if configuration of device worked we should have an assigned
+               # IP address, iff so let's use the according as $DEVICE for later usage
+               # simple and primitive approach which seems to work fine
+-              if ifconfig $dev | grep -q 'inet.*addr:' ; then
+-                      export DEVICE="$dev"
+-                      break
++              IPV4ADDR="0.0.0.0"
++              . /tmp/net-${device}.conf
++              if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
++                      export DEVICE="$dev $DEVICE"
++                      # break  # exit loop as we just use the irst
+               fi
+-      done
+-      else
+-              for interface in ${DEVICE}; do
+-                      ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config
+-                      [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
+-                      if [ "$IPV4ADDR" != "0.0.0.0" ]
+-                      then
+-                              break
+-                      fi
+-              done
+-      fi
++      done
++      unset devlist
+       for interface in ${DEVICE}; do
+               # source relevant ipconfig output
diff --git a/debian/patches/28_remove_localized_manpages.patch b/debian/patches/28_remove_localized_manpages.patch
new file mode 100644 (file)
index 0000000..327667c
--- /dev/null
@@ -0,0 +1,31 @@
+commit ebdefd9601c017c5a7264a94cee2c7af914bca76
+Author: Michael Prokop <mika@grml.org>
+Date:   Wed Jun 8 10:19:29 2011 +0200
+
+    Drop installation of localized manpages from upstream Makefile.
+    
+    Upstream's Makefile currently results in:
+    
+      E: live-boot: manpage-in-wrong-directory usr/share/man/en/man/live-boot.7..gz
+      E: live-boot: manpage-in-wrong-directory usr/share/man/en/man/live-snapshot.1..gz
+    
+    So lets drop the localized manpages and just install the english ones.
+
+--- a/Makefile
++++ b/Makefile
+@@ -66,15 +66,6 @@
+               install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \
+       done
+-      for LANGUAGE in $(LANGUAGES); \
+-      do \
+-              for MANPAGE in manpages/$${LANGUAGE}/*; \
+-              do \
+-                      SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
+-                      install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
+-              done; \
+-      done
+-
+ uninstall:
+       # Uninstalling executables
+       rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
diff --git a/debian/patches/29_support_dns_in_initramfs.patch b/debian/patches/29_support_dns_in_initramfs.patch
new file mode 100644 (file)
index 0000000..856913d
--- /dev/null
@@ -0,0 +1,35 @@
+commit 10caf0b2db3fc04fae24ca896cf21f6aed12bbbc
+Author: Christian Hofstaedtler <ch@grml.org>
+Date:   Fri Mar 25 23:02:38 2011 +0100
+
+    support DNS in boot environment
+    
+    Thanks to Ulrich Dangel for discovering this. [Closes: issue848]
+
+--- a/hooks/live
++++ b/hooks/live
+@@ -258,17 +258,14 @@
+       manual_add_modules crc32c
+ fi
+-if [ "${LIVE_DNS}" = "true" ]
+-then
+-      [ "${QUIET}" ] || echo -n " "dns
+-      #copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
+-      copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
+-      #copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
++# DNS for initramfs
++#copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
++copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
++#copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
+-      # Configuration file - may be needed if /etc/hosts is used.
+-      #mkdir -p $DESTDIR/etc
+-      #cp -p /etc/nsswitch.conf $DESTDIR/etc
+-fi
++# Configuration file - may be needed if /etc/hosts is used.
++#mkdir -p $DESTDIR/etc
++#cp -p /etc/nsswitch.conf $DESTDIR/etc
+ if [ "${LIVE_UNIONMOUNT}" = "true" ]
+ then
diff --git a/debian/patches/30_support_multiarch_dns.patch b/debian/patches/30_support_multiarch_dns.patch
new file mode 100644 (file)
index 0000000..90d1b66
--- /dev/null
@@ -0,0 +1,34 @@
+commit 6666658535b255cb71d48ddeb415aeb3023e1251
+Author: Michael Prokop <mika@grml.org>
+Date:   Tue Jun 7 10:15:52 2011 +0200
+
+    Do not fail in multiarch environment when installing libnss_dns.so.
+    
+    Updating initramfs fails with:
+    
+    | live-boot: core filesystems devices utils:memdisk udev wget blockdevE: /usr/share/initramfs-tools/hooks/live failed with return 1.
+    
+    with multiarch libc because the filename is no longer necessarily
+    /lib/libnss_dns.so.* but could also be e.g.
+    /lib/x86_64-linux-gnu/libnss_dns.so.*.
+
+--- a/hooks/live
++++ b/hooks/live
+@@ -260,7 +260,16 @@
+ # DNS for initramfs
+ #copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
+-copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
++# DNS server:
++if ls /lib/libnss_dns.so.* >/dev/null 2>&1 ; then # non-multiarch libc
++        copy_exec /lib/libnss_dns.so.*      /lib
++elif ls /lib/*/libnss_dns.so.* >/dev/null 2>&1 ; then # multiarch libc
++        for libnss in /lib/*/libnss_dns.so.* ; do
++                copy_exec "$libnss"
++        done
++else
++        echo "Warning: libnss_dns.so.* not found. DNS in initramfs not functional."
++fi
+ #copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
+ # Configuration file - may be needed if /etc/hosts is used.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..cfc8b5d
--- /dev/null
@@ -0,0 +1,19 @@
+01_fix_output_file.patch
+03_grml_version_file_hook.patch
+05_boot_failure_message_grml.patch
+07_support_findiso.patch
+08_grml_defaults.patch
+10_validateroot.patch
+11_dhcphostname.patch
+12_uuid_support.patch
+13_always_display_warnings_and_failures.patch
+14_no_blkid_on_lenny.patch
+15_networking_grml.patch
+16_nodhcp.patch
+19_revert_toram_bootoption_to_expected_behaviour.patch
+25_support_lvm_for_live-media.patch
+26_support_dns_bootoption.patch
+27_support_static_ip.patch
+28_remove_localized_manpages.patch
+29_support_dns_in_initramfs.patch
+30_support_multiarch_dns.patch
index 2720264..710e6fa 100755 (executable)
@@ -1,20 +1,31 @@
 #!/usr/bin/make -f
 
+build:
+       # this is needed because dpatch doesn't do file modes on diffs.
+       chmod a+rx scripts/live-bottom/*
+       # regular build.
+       dh build
+
 %:
-       dh ${@}
+       dh ${@} --with quilt
 
 override_dh_auto_install:
        dh_auto_install -- DESTDIR=debian/tmp
 
        # Removing useless files
-       rm -f debian/tmp/usr/share/doc/live-boot/COPYING
+       rm -f debian/tmp/usr/share/doc/live-boot-grml/COPYING
+       # Some more useless files
+       rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/12fstab
+       rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/23networking
+       rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/24preseed
+       rm -f debian/tmp/usr/share/initramfs-tools/scripts/live-bottom/30accessibility
 
        # live-boot-initramfs-tools
-       mkdir -p debian/live-boot-initramfs-tools/usr/share
-       mv debian/tmp/usr/share/initramfs-tools debian/live-boot-initramfs-tools/usr/share
+       mkdir -p debian/live-boot-grml-initramfs-tools/usr/share
+       mv debian/tmp/usr/share/initramfs-tools debian/live-boot-grml-initramfs-tools/usr/share
 
 override_dh_installinit:
-       dh_installinit -p live-boot --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
+       dh_installinit -p live-boot-grml --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
 
 override_dh_install:
        dh_install --fail-missing