Merge branch 'debian'
authorChristian Hofstaedtler <ch@grml.org>
Tue, 6 Dec 2011 20:40:44 +0000 (21:40 +0100)
committerChristian Hofstaedtler <ch@grml.org>
Tue, 6 Dec 2011 20:40:44 +0000 (21:40 +0100)
Conflicts:
debian/changelog
debian/control
debian/rules

37 files changed:
bin/live-toram [deleted file]
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/31_package_rename.patch [new file with mode: 0644]
debian/patches/32_add_kms.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules
manpages/old/live-snapshot.it.1.txt [deleted file]
scripts/live

diff --git a/bin/live-toram b/bin/live-toram
deleted file mode 100755 (executable)
index b7740a2..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# Read cmdline
-for _PARAMETER in $(cat /proc/cmdline)
-do
-       case "${_PARAMETER}" in
-               module=*)
-                       _MODULE="${_PARAMETER#module=}"
-                       ;;
-       esac
-done
-
-# Assemble filesystems
-if [ -z "${_MODULE}" ]
-then
-       _FILESYSTEMS="/live/image/live/filesystem.squashfs"
-else
-       for _FILESYSTEM in _MODULE
-       do
-               _FILESYSTEMS="${_FILESYSTEMS} /live/image/live/${_FILESYSTEM}"
-       done
-fi
-
-# Exit if system is not debian live
-if [ ! -d /live/image ]
-then
-       echo "E: live-toram only works on Debian Live systems."
-
-       exit 1
-fi
-
-# Exit if filesystem not accessible
-for _FILESYSTEM in ${_FILESYSTEMS}
-do
-       if [ ! -r ${_FILESYSTEM} ]
-       then
-               echo "E: ${_FILESYSTEM}: No such file"
-               echo "I: live-toram already run?"
-
-               exit 1
-       fi
-done
-
-# Exit if user is unprivileged
-if [ "$(id -u)" -ne 0 ]
-then
-       echo "E: need root privileges"
-
-       exit 1
-fi
-
-# Exit if not enough free memory
-_SIZE=0
-
-for _FILESYSTEM in ${_FILESYSTEMS}
-do
-       _SIZE="$((${_SIZE} + $(du ${_FILESYSTEM} | awk '{ print $1 }')))"
-       _MEMORY="$(awk '/MemFree/ { print $2 }' /proc/meminfo)"
-done
-
-case ${@} in
-       -f|--force)
-               echo "W: Ignoring memory constrains as requested"
-               ;;
-
-       *)
-               if [ $_MEMORY -lt $_SIZE ]
-               then
-                       echo "E: not enough free memory available."
-                       echo "I: images need ${_SIZE}kB, free memory is ${_MEMORY}kB."
-
-                       exit 1
-               fi
-               ;;
-esac
-
-# Copying image to memory
-echo "P: Copying images to memory."
-echo "P: This may take a while..."
-
-# FIXME: doesn't work with multiple filesystems
-for _FILESYSTEM in ${_FILESYSTEMS}
-do
-       if [ ! -x "$(which rsync 2>/dev/null)" ]
-       then
-               rsync -a --progress ${_FILESYSTEM} /tmp/live
-       else
-               cp -av ${_FILESYSTEM} /tmp/live
-       fi
-
-LANGUAGE=C LANG=C LC_ALL=C perl << EOF
-open LOOP, '</dev/loop0' or die $!;
-open DEST, '</tmp/live' or die $!;
-ioctl(LOOP, 0x4C06, fileno(DEST)) or die $!
-close LOOP;
-close DEST;
-EOF
-
-done
-
-# Unmounting live media
-_DEVICE="$(awk '/\/live\/image / { print $1 }' /proc/mounts)"
-
-if [ -d /live/image ]
-then
-       umount /live/image
-       rmdir --ignore-fail-on-non-empty /live/image || true
-fi
-
-# Ejecting live media if it is not an optical device
-if [ "$(expr substr ${_DEVICE} 1 2)" != "sd" ] && \
-   ! readlink /sys/block/$(expr substr ${_DEVICE} 6 3) | grep -q usb
-then
-       if [ ! -x "$(which rsync 2>/dev/null)" ]
-       then
-               eject -p -m ${_DEVICE} >/dev/null 2>&1
-       fi
-fi
index 8a7eb5c..0115e5d 100644 (file)
@@ -104,6 +104,38 @@ live-boot (3.0~a20-1) unstable; urgency=low
 
  -- Daniel Baumann <daniel@debian.org>  Thu, 04 Aug 2011 21:20:47 +0200
 
+live-boot (3.0~a19-1+grml.01) grml-testing; urgency=low
+
+  * Depend on quilt with a version to quiet lintian
+  * Add debian/control headers Origin, Bugs
+
+ -- Christian Hofstaedtler <ch@grml.org>  Wed, 30 Nov 2011 13:24:41 +0100
+
+live-boot (3.0~a19-1+grml.00) unstable; urgency=low
+
+  * Resync with Debian. This brings in:
+    [ Daniel Baumann ]
+    * Updating and correcting sendsigs.omit support for /run (Closes: #628188).
+    * Removing accidentally twice included English files when installing manpages.
+    * Correct rmdir call in top-level Makefiles uninstall target to not fail if there was no prior live-boot installation.
+    * Making references to debian more distribution neutral.
+    * Replacing reference to old alioth page in live-snapshot.
+    * Splitting out documentation so that it can be accesses separately from the initramfs code.
+    * Adding conflicts/replaces for live-boot to live-boot-doc to not break upgrades.
+
+  * Grml changes:
+    [ Ulrich Dangel ]
+    * [8424e93] Use quilt instead of dpatch
+    * [86ca4d5] Remove old manpage live-snapshot.it.1.txt
+    * [7fb9e91] Support comma delimited devices in live-media-path
+    * [6b21c57] Depend on the same live-boot-initramfs-tools/live-boot-backend version.
+  
+    [ Christian Hofstaedtler ]
+    * Rename packages to not clash with Debian.
+    * Resynced with Debian.
+
+ -- Christian Hofstaedtler <ch@grml.org>  Mon, 25 Jul 2011 02:26:40 +0200
+
 live-boot (3.0~a19-1) unstable; urgency=low
 
   * Correct rmdir call in top-level Makefiles uninstall target to not
@@ -126,6 +158,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 301b583..4021c30 100644 (file)
@@ -1,18 +1,22 @@
 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 (>= 0.46-7~)
 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
+Origin: Grml
+Bugs: mailto:bugs@grml.org
 
-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,20 +24,29 @@ 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
 Section: 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
@@ -45,3 +58,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..455122c
--- /dev/null
@@ -0,0 +1,13 @@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:07:22.000000000 +0200
++++ b/scripts/live     2011-07-24 22:07:54.000000000 +0200
+@@ -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..fd7a7e5
--- /dev/null
@@ -0,0 +1,25 @@
+#! /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@
+
+Index: b/hooks/live
+===================================================================
+--- a/hooks/live       2011-07-24 22:07:22.000000000 +0200
++++ b/hooks/live       2011-07-24 22:07:55.000000000 +0200
+@@ -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..ebcf436
--- /dev/null
@@ -0,0 +1,38 @@
+#! /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@
+
+Index: b/scripts/live-functions
+===================================================================
+--- a/scripts/live-functions   2011-07-24 22:07:22.000000000 +0200
++++ b/scripts/live-functions   2011-07-24 22:07:56.000000000 +0200
+@@ -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..de1d9be
--- /dev/null
@@ -0,0 +1,81 @@
+#! /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@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:07:54.000000000 +0200
++++ b/scripts/live     2011-07-24 22:07:58.000000000 +0200
+@@ -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..b7e7a87
--- /dev/null
@@ -0,0 +1,24 @@
+#! /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@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:07:58.000000000 +0200
++++ b/scripts/live     2011-07-24 22:07:59.000000000 +0200
+@@ -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..59da1da
--- /dev/null
@@ -0,0 +1,39 @@
+#! /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@
+Index: b/scripts/live-bottom/10validateroot
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ b/scripts/live-bottom/10validateroot       2011-07-24 22:08:00.000000000 +0200
+@@ -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..c00a8b8
--- /dev/null
@@ -0,0 +1,29 @@
+#! /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.
+
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:07:59.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:02.000000000 +0200
+@@ -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..0a60612
--- /dev/null
@@ -0,0 +1,114 @@
+#! /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@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:02.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:03.000000000 +0200
+@@ -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..31277f5
--- /dev/null
@@ -0,0 +1,29 @@
+#! /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@
+Index: b/scripts/live-functions
+===================================================================
+--- a/scripts/live-functions   2011-07-24 22:07:56.000000000 +0200
++++ b/scripts/live-functions   2011-07-24 22:08:04.000000000 +0200
+@@ -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..22bc752
--- /dev/null
@@ -0,0 +1,28 @@
+#! /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@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:03.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:06.000000000 +0200
+@@ -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..fd257e1
--- /dev/null
@@ -0,0 +1,123 @@
+#! /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
+Index: b/scripts/live-bottom/23networking_grml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ b/scripts/live-bottom/23networking_grml    2011-07-24 22:08:07.000000000 +0200
+@@ -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..2be5a9b
--- /dev/null
@@ -0,0 +1,21 @@
+#! /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@
+
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:06.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:09.000000000 +0200
+@@ -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..627f709
--- /dev/null
@@ -0,0 +1,52 @@
+#! /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
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:09.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:10.000000000 +0200
+@@ -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..63b6f03
--- /dev/null
@@ -0,0 +1,42 @@
+#! /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@
+
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:10.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:11.000000000 +0200
+@@ -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..3df83d7
--- /dev/null
@@ -0,0 +1,66 @@
+#! /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@
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:11.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:13.000000000 +0200
+@@ -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
+Index: b/scripts/live-bottom/23networking_grml
+===================================================================
+--- a/scripts/live-bottom/23networking_grml    2011-07-24 22:08:07.000000000 +0200
++++ b/scripts/live-bottom/23networking_grml    2011-07-24 22:08:13.000000000 +0200
+@@ -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..fb99ba6
--- /dev/null
@@ -0,0 +1,165 @@
+#! /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@
+
+Index: b/scripts/live
+===================================================================
+--- a/scripts/live     2011-07-24 22:08:13.000000000 +0200
++++ b/scripts/live     2011-07-24 22:08:14.000000000 +0200
+@@ -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..e261f1b
--- /dev/null
@@ -0,0 +1,33 @@
+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.
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile 2011-07-24 22:07:22.000000000 +0200
++++ b/Makefile 2011-07-24 22:08:15.000000000 +0200
+@@ -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..33248d7
--- /dev/null
@@ -0,0 +1,37 @@
+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]
+
+Index: b/hooks/live
+===================================================================
+--- a/hooks/live       2011-07-24 22:07:55.000000000 +0200
++++ b/hooks/live       2011-07-24 22:08:17.000000000 +0200
+@@ -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..90bd12b
--- /dev/null
@@ -0,0 +1,36 @@
+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.*.
+
+Index: b/hooks/live
+===================================================================
+--- a/hooks/live       2011-07-24 22:08:17.000000000 +0200
++++ b/hooks/live       2011-07-24 22:08:18.000000000 +0200
+@@ -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/31_package_rename.patch b/debian/patches/31_package_rename.patch
new file mode 100644 (file)
index 0000000..a83724d
--- /dev/null
@@ -0,0 +1,29 @@
+Index: b/Makefile
+===================================================================
+--- a/Makefile 2011-07-24 23:49:55.000000000 +0200
++++ b/Makefile 2011-07-24 23:50:20.000000000 +0200
+@@ -52,11 +52,11 @@
+       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
+@@ -85,7 +85,7 @@
+       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
diff --git a/debian/patches/32_add_kms.patch b/debian/patches/32_add_kms.patch
new file mode 100644 (file)
index 0000000..ef2f35a
--- /dev/null
@@ -0,0 +1,28 @@
+--- /dev/null
++++ b/hooks/kms
+@@ -0,0 +1,25 @@
++#!/bin/sh
++# hook for adding kms modules
++
++set -e
++
++# initramfs-tools header
++
++PREREQ=""
++prereqs()
++{
++      echo "${PREREQ}"
++}
++
++case "${1}" in
++      prereqs)
++              prereqs
++              exit 0
++              ;;
++esac
++
++. /usr/share/initramfs-tools/hook-functions
++
++for module in i915 radeon nouveau ; do
++      manual_add_modules $module
++done
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..c082cba
--- /dev/null
@@ -0,0 +1,21 @@
+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
+31_package_rename.patch
+32_add_kms.patch
index 61a5e25..910523b 100755 (executable)
@@ -1,17 +1,29 @@
 #!/usr/bin/make -f
 
+build:
+       # this is needed because dpatch doesn't do file modes on diffs.
+       chmod a+rx scripts/live-bottom/*
+       chmod a+rx hooks/*
+       # 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_builddeb:
        dh_builddeb -- -Zgzip -z9
@@ -20,4 +32,4 @@ override_dh_install:
        dh_install --fail-missing
 
 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 .'
diff --git a/manpages/old/live-snapshot.it.1.txt b/manpages/old/live-snapshot.it.1.txt
deleted file mode 100644 (file)
index 2370de7..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-live-snapshot(1)
-================
-:man source: 1.157.3
-:man manual: Debian Live
-
-Name
-----
-live-snapshot - uno script per facilitare l'uso della persistenza sui sistemi live
-
-Synopsis
---------
-live-snapshot [-c|--cow **DIRECTORY**s] [-d|--device **DEVICE**] [-e|--exclude-list **FILE**] [-o|--output **FILE**] [-t|--type **TYPE**]
-
-live-snapshot [-r|--resync-string **STRING**]
-
-live-snapshot [-h|--help]
-
-live-snapshot [-u|--usage]
-
-live-snapshot [-v|--version]
-
-Description
------------
-
-live-snapshot `e uno script che pu`o essere usato per costruire un file immagine formattato
-correttamente per essere usato da live-initramfs(7); viene inoltre usato dallo script di
-init di live-initramfs in uscita per sincronizzare i device di snapshot riconosciuti al boot.
-
-Options
--------
-
-  -c, --cow **DIRECTORY**::
-
-specifica la directory da clonare nel file immagine. Il valore di default `e
-lo stesso default usato da live-initramfs per la sua directory COW (copy on
-write, un tempo situata in "/live/cow") ed `e sufficiente per gli usi comuni.
-Pu`o essere utile tuttavia specificare "/home" e come tipo "ext2" per
-preparare un file immagine adatto per essere montato da live-initramfs come
-"/home" al boot.
-
-  -d, --device **DEVICE**::
-
-seleziona il device dove il file/partizione di snapshot o persistenza dovr`a
-essere sistemato. Se il device non ha un filesystem, ne verr`a creato uno
-automaticamente, di tipo ext2 ed etichettato (label) in base al valore
-specificato nell'opzione "--output" o con un default. Se non viene specificato
-nessun device, verr`a usato un "tmpfs" linkato sul desktop dell'utente, in
-modo che port`a essere mosso dove si vuole.
-
-  -e, --exclude-list **FILE**::
-
-un file contenente una lista di file e percorsi che NON devono essere salvati.
-Questa lista verr`a inclusa nello snapshot per essere riutilizzata.
-
-  -o, --output **FILE**::
-
-il nome del file o l'etichetta (label) da usare per il file o la partizione di
-snapshot. Se non specificata, live-snapshot cercher\`a un file all'interno
-del device oppure user`a l'intera partizione.
-
-  -r, --resync-string **STRING**::
-
-usato internamente nelle sincronizzazioni dallo script di init di
-live-initramfs. Il formato pu\`o cambiare, usatelo a vostro rischio.
-
-  -f, --refresh::
-
-scatena la stessa operazione che verrebbe fatta al reboot o all'halt della
-macchina, provando a fare il resync degli snapshot trovati al boot, usabile
-per salvare le modifiche in vista di un crash o di una mancanza di corrente.
-
-  -t, --type **TYPE**::
-
-il tipo pu`o essere "cpio", "squashfs" o "ext2".
-
-  -h, --help::
-
-mostra l'aiuto ed esce
-
-  -u, --usage::
-
-mostra l'utilizzo ed esce
-
-  -v, --version::
-
-da informazioni sulla versione ed esce
-
-Files
------
-
-  /etc/live-snapshot.list
-
-Facoltativo, se presente cambia completamente il funzionamento di live-snapshot; solo i files e le directory elencate verranno effettivamente inclusi nello snapshot.
-Funziona attualmente solo con gli snapshot di tipo "cpio" e "partizione intera".
-
-  /etc/live-snapshot.exclude_list
-
-Facoltativo, se presente verrà utilizzato per filtrare i file da includere negli snapshot. Tutte i file che conterranno le stringhe elecate (come "grep -F -v") non verranno salvati da live-snapshot.
-Funziona attualmente solo con gli snapshot di tipo "cpio", "partizione intera" e "squashfs"; è utile per filtrare contenuti poco significativi come i file temporanei e la cache.
-
-See also
---------
-
-live-initramfs(8)
-
-Questo programma fa parte di live-initramfs.
-
-Bugs
-----
-
-Riportate i bug sul pacchetto live-initramfs
-link:http://packages.qa.debian.org/live-initramfs[http://packages.qa.debian.org/live-initramfs].
-
-Homepage
---------
-
-Ulteriori informazioni su progetto Debian Live possono essere trovate su
-link:http://debian-live.alioth.debian.org/[http://debian-live.alioth.debian.org/] e
-link:http://wiki.debian.org/DebianLive/[http://wiki.debian.org/DebianLive/].
-
-Authors
--------
-
-live-initramfs `e mantenuto da Daniel Baumann <daniel@debian.org> per il
-progetto Debian. live-initramfs `e un fork di
-link:http://packages.ubuntu.com/casper[casper]. casper `e stato scritto
-originariamente da Tollef Fog Heen <tfheen@canonical.com> e Matt Zimmerman
-<mdz@canonical.com>.
index 8ffbc20..584193e 100755 (executable)
@@ -1952,6 +1952,7 @@ mountroot ()
                                then
                                        # We found a memdisk, set up phram
                                        modprobe phram phram=memdisk,${MEMDISK}
+                                       modprobe phram phram=memdisk,${MEMDISK}
 
                                        # Load mtdblock, the memdisk will be /dev/mtdblock0
                                        modprobe mtdblock