Merge branch 'debian'
authorEvgeni Golov <evgeni@debian.org>
Fri, 26 Jun 2015 05:49:43 +0000 (07:49 +0200)
committerEvgeni Golov <evgeni@debian.org>
Fri, 26 Jun 2015 05:49:43 +0000 (07:49 +0200)
Conflicts:
debian/control

33 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 [new file with mode: 0644]
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 [new file with mode: 0644]
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/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/15_networking_grml.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/29_support_dns_in_initramfs.patch [new file with mode: 0644]
debian/patches/32_add_kms.patch [new file with mode: 0644]
debian/patches/33_retry_phram.patch [new file with mode: 0644]
debian/patches/34_ignore_unknown_filesystems.patch [new file with mode: 0644]
debian/patches/39_persistence_with_forensic.patch [new file with mode: 0644]
debian/patches/40_support_multiple_hooks.patch [new file with mode: 0644]
debian/patches/41_vlan_support.patch [new file with mode: 0644]
debian/patches/grml-specific/boot_failure_message_grml.patch [new file with mode: 0644]
debian/patches/grml-specific/grml_defaults.patch [new file with mode: 0644]
debian/patches/grml-specific/grml_version_file_hook.patch [new file with mode: 0644]
debian/patches/grml-specific/package_rename.patch [new file with mode: 0644]
debian/patches/reverts/drop_nameserver_from_ip_option.patch [new file with mode: 0644]
debian/patches/reverts/restore_support_for_old_persistence.patch [new file with mode: 0644]
debian/patches/reverts/revert_toram_bootoption_to_expected_behaviour.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]

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 d50a0aa..cc0b229 100644 (file)
@@ -79,6 +79,26 @@ live-boot (4.0.2-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Wed, 10 Dec 2014 10:36:04 +0100
 
+live-boot (4.0.1-1+grml.3) unstable; urgency=medium
+
+  [ Evgeni Golov ]
+  * [ca03a16] update stop-using-etc-fstab.d.patch to latest upstream
+    version
+
+ -- Michael Prokop <mika@grml.org>  Thu, 13 Nov 2014 09:56:07 +0100
+
+live-boot (4.0.1-1+grml.2) unstable; urgency=medium
+
+  * stop using /etc/fstab.d
+
+ -- Evgeni Golov <evgeni@debian.org>  Thu, 30 Oct 2014 07:31:08 +0100
+
+live-boot (4.0.1-1+grml.1) unstable; urgency=medium
+
+  * Import 4.0.1-1 from Debian.
+
+ -- Evgeni Golov <evgeni@grml.org>  Sun, 26 Oct 2014 11:31:59 +0100
+
 live-boot (4.0.1-1) unstable; urgency=low
 
   [ victory ]
@@ -96,6 +116,12 @@ live-boot (4.0.1-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Sat, 25 Oct 2014 14:26:22 +0200
 
+live-boot (4.0.0-1+grml.1) unstable; urgency=medium
+
+  * Import 4.0.0-1 from Debian.
+
+ -- Evgeni Golov <evgeni@grml.org>  Thu, 28 Aug 2014 17:55:20 +0200
+
 live-boot (4.0.0-1) unstable; urgency=low
 
   [ Carlos Zuferri ]
@@ -109,6 +135,12 @@ live-boot (4.0.0-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Wed, 27 Aug 2014 19:52:09 +0200
 
+live-boot (4.0~alpha21-1+grml.1) UNRELEASED; urgency=medium
+
+  * Import 4.0~alpha21 from Debian.
+
+ -- Evgeni Golov <evgeni@grml.org>  Thu, 10 Apr 2014 08:29:49 +0200
+
 live-boot (4.0~alpha21-1) unstable; urgency=low
 
   * Building with dh --parallel.
@@ -127,6 +159,32 @@ live-boot (4.0~alpha20-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 31 Mar 2014 21:38:22 +0200
 
+live-boot (4.0~alpha19-1+grml.3) unstable; urgency=medium
+
+  * [8acc928] try to be smarter when booting a squashfs image from
+              the network and using resolvconf in it.
+
+ -- Evgeni Golov <evgeni@grml.org>  Tue, 25 Mar 2014 17:49:22 +0100
+
+live-boot (4.0~alpha19-1+grml.2) unstable; urgency=medium
+
+  * [805c218] VLAN support via boot option "vlan=<vid>:<phydevice>"
+
+ -- Michael Prokop <mika@grml.org>  Mon, 17 Mar 2014 23:43:24 +0100
+
+live-boot (4.0~alpha19-1+grml.1) unstable; urgency=medium
+
+  * Sync Debian's 4.0~alpha19-1.
+  * update our patches on top of Debian's 4.0~alpha19
+    Droped patches:
+     - 43_fix_udev_usage_in_is_nice_device.patch
+     - 44_fix_mdadm_usage_for_findiso.patch
+  * move Grml-specific patches to a separate subfolder
+  * move reverts/restores of old upstream behaviour to an own subdir
+  * consolidate Grml network related patches into 15_networking_grml.patch
+
+ -- Evgeni Golov <evgeni@grml.org>  Sat, 08 Mar 2014 13:59:28 +0100
+
 live-boot (4.0~alpha19-1) experimental; urgency=low
 
   * Updating copyright notices for 2014.
@@ -246,6 +304,49 @@ live-boot (4.0~a14-1) experimental; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Fri, 13 Sep 2013 14:17:30 +0200
 
+live-boot (4.0~a13-1+grml.5) unstable; urgency=medium
+
+  * [3b54472] Add support for label "persistence" to forensic mode
+
+ -- Michael Prokop <mika@grml.org>  Sat, 25 Jan 2014 11:45:16 +0100
+
+live-boot (4.0~a13-1+grml.4) unstable; urgency=low
+
+  * [3d46167] Add patch to properly boot from mdadm via findiso boot
+    option [Closes: issue1270] Thanks to thinkgear for the bug report
+    and providing a test VM
+
+ -- Michael Prokop <mika@grml.org>  Tue, 15 Oct 2013 16:58:17 +0200
+
+live-boot (4.0~a13-1+grml.3) unstable; urgency=low
+
+  * [79dceec] Update 9990-misc-helpers.sh to support latest udev version
+    [Closes: issue1278] Thanks to Michael Biebl <biebl@debian.org> for
+    helping in resolve this issue and Ulrich Dangel <mru@spamt.net>
+    for the initial patch
+
+ -- Michael Prokop <mika@grml.org>  Sat, 28 Sep 2013 11:44:52 +0200
+
+live-boot (4.0~a13-1+grml.2) unstable; urgency=low
+
+  * [61895ec] Do not "exit" if boot option nonetworking is set but
+    "return" instead [Closes: issue1276]
+  * [85bddc0] Refresh debian/patches/
+
+ -- Michael Prokop <mika@grml.org>  Fri, 20 Sep 2013 16:38:53 +0200
+
+live-boot (4.0~a13-1+grml.1) unstable; urgency=low
+
+  * Sync Debian's 4.0~a13.
+  * [ba11a22] drop patches that were previously backported from
+    the 4.x upstream branch
+  * [5eca029, 3a80a92, eae4296, e6023f8] refresh patches against
+    new upstream
+  * [2130827] more forwardporting of deprecated persistence options
+  * [c06cdf4] log to boot.log, not live-boot.log
+
+ -- Evgeni Golov <evgeni@grml.org>  Sun, 18 Aug 2013 10:53:12 +0200
+
 live-boot (4.0~a13-1) experimental; urgency=low
 
   * Increasing tftp blocksize to maximum value per RFC 2348, thanks to
@@ -438,6 +539,13 @@ live-boot (4.0~a1-1) experimental; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Fri, 30 Nov 2012 14:58:46 +0100
 
+live-boot (3.0.1-1+grml.1) unstable; urgency=low
+
+  * Sync Debian's 3.0.1.
+  * Backport some patches from Debian's debian-next (4.x) branch.
+
+ -- Evgeni Golov <evgeni@grml.org>  Wed, 06 Mar 2013 08:07:07 +0100
+
 live-boot (3.0.1-1) unstable; urgency=low
 
   [ chals ]
@@ -495,6 +603,16 @@ live-boot (3.0~b11-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Wed, 02 Jan 2013 11:32:21 +0100
 
+live-boot (3.0~b10-1+grml.1) unstable; urgency=low
+
+  [ Evgeni Golov ]
+  * [795263e] refresh 29_support_dns_in_initramfs.patch against
+    current upstream
+  * [2045fef] drop 43_do_not_fix_mountpoints_with_live-persistence.patch,
+    applied upstream
+
+ -- Michael Prokop <mika@grml.org>  Tue, 18 Dec 2012 01:41:16 +0100
+
 live-boot (3.0~b10-1) unstable; urgency=low
 
   [ Daniel Baumann ]
@@ -520,6 +638,23 @@ live-boot (3.0~b10-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 17 Dec 2012 20:22:50 +0100
 
+live-boot (3.0~b9-1+grml.1) unstable; urgency=low
+
+  [ Evgeni Golov ]
+  * [bdc44cd] drop 37_fix_legacy_persistence_handling.patch, applied
+    upstream
+
+  [ Michael Prokop ]
+  * [1aa780a] Refresh patches against current master
+  * [a133107] Add patch to drop nameserver handling from ip= boot
+    parameter
+  * [7782d4f] Add patch to restore support for persistence media with
+    LABEL=custom-ov (credits to Evgeni)
+  * [b7de9b2] Do not fix mountpoints with live-persistence.conf as
+    home-rw/live-rw (credits to Evgeni)
+
+ -- Michael Prokop <mika@grml.org>  Mon, 17 Dec 2012 18:22:27 +0100
+
 live-boot (3.0~b9-1) unstable; urgency=low
 
   [ Tails developers ]
@@ -530,6 +665,16 @@ live-boot (3.0~b9-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 10 Dec 2012 20:01:21 +0100
 
+live-boot (3.0~b8-1+grml.1) unstable; urgency=low
+
+  The "sync with Debian's 3.0~b8-1 version" release
+
+  [ Evgeni Golov ]
+  * [ce765d3] refresh patches against Debian's 3.0~b8-1
+  * [b484d6d] allow the use of multiple initramfs hooks and scripts again
+
+ -- Michael Prokop <mika@grml.org>  Thu, 06 Dec 2012 12:51:50 +0100
+
 live-boot (3.0~b8-1) unstable; urgency=low
 
   * Removing eject from recommends, the script that ejects the live medium
@@ -864,6 +1009,76 @@ live-boot (3.0~a28-1) experimental; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 04 Jun 2012 17:31:32 +0200
 
+live-boot (3.0~a27-1+grml.7) grml-testing; urgency=low
+
+  * [a488db6] Enable write-mode for persistency related devices in
+    readonly/forensic mode
+
+ -- Michael Prokop <mika@grml.org>  Fri, 14 Sep 2012 17:01:39 +0200
+
+live-boot (3.0~a27-1+grml.6) grml-testing; urgency=low
+
+  [ Lukas Schwaighofer ]
+  * [95fb70f] fixed legacy persistence handling
+
+  [ Michael Prokop ]
+  * [ed79f48] readonly: do not check for "forensic" boot option
+  * [72aebf1] Move changes to scripts/live-premount/readonly into debian
+    patch file
+
+ -- Michael Prokop <mika@grml.org>  Fri, 07 Sep 2012 13:43:08 +0200
+
+live-boot (3.0~a27-1+grml.5) grml-testing; urgency=low
+
+  * [8b51f69] Adjust 15_networking_grml.patch + 27_support_static_ip.patch
+    for klibc's ipconfig /run switch
+  * [bbeb928] Add "Breaks: klibc-utils (<< 2.0-2)" to live-boot-grml-
+    initramfs-tools for /run switch
+  * [cad0077] Refresh debian/patches/35_fix_findiso_umount.patch
+  * [7f450c2] Support overriding "nodhcp" boot option via "dhcp"
+  * [2b065a0] Adjust file permissions also of files that are added during
+    dh_quilt_patch stage
+
+ -- Michael Prokop <mika@grml.org>  Fri, 27 Jul 2012 15:06:38 +0200
+
+live-boot (3.0~a27-1+grml.4) grml-testing; urgency=low
+
+  * [6d32dfe] Check for presence of /tmp/net-${device}.conf before
+    sourcing it [Closes: issue1196] Thanks to Marc 'Zugschlus' Haber for
+    the bugreport and debugging this issue
+
+ -- Michael Prokop <mika@grml.org>  Mon, 23 Jul 2012 17:13:42 +0200
+
+live-boot (3.0~a27-1+grml.3) grml-testing; urgency=low
+
+  * [d978027] 35_fix_findiso_umount.patch: make sure ISO gets unmounted
+    correctly when using findiso/toram. Thanks to Christoph Biedl for the
+    bugreport and the patch
+  * [d621ee2] 34_ignore_unknown_filesystems.patch: also ignore fstype swap
+
+ -- Michael Prokop <mika@grml.org>  Mon, 28 May 2012 12:27:08 +0200
+
+live-boot (3.0~a27-1+grml.2) grml-testing; urgency=low
+
+  * [e161c2c] New patch to ignore "unknown" filesystems in
+    is_supported_fs() [Testing: issue1170]
+
+ -- Michael Prokop <mika@grml.org>  Sun, 20 May 2012 18:54:58 +0200
+
+live-boot (3.0~a27-1+grml.1) grml-testing; urgency=low
+
+  * [3039c63] Sync with Debian's upstream/3.0_a27 (new log file name,
+    persistency reworked,...)
+  * [06185b3] Bump Standards-Version, raise Build-Depends from dh 8 to dh
+    9 + raise compat version to 9
+  * [2998c28] Drop debian/patches/07_support_findiso.patch which is in
+    upstream nowadays
+  * [3967979] Drop deprecated debian/patches/14_no_blkid_on_lenny.patch
+  * [91460b9] Refresh debian/patches/ against new upstream code
+  * [7116647] Drop deprecated debian/patches/28_remove_localized_manpages.patch
+
+ -- Michael Prokop <mika@grml.org>  Wed, 09 May 2012 14:10:37 +0200
+
 live-boot (3.0~a27-1) experimental; urgency=low
 
   [ Daniel Baumann ]
@@ -1037,6 +1252,39 @@ live-boot (3.0~a25-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  Mon, 06 Feb 2012 23:27:38 +0100
 
+live-boot (3.0~a24-1+grml.2) grml-testing; urgency=low
+
+  [ Ulrich Dangel ]
+  * [87a8e76] Append nameservers provided via dns bootoption into
+    initramfs resolv.conf
+
+  [ Michael Prokop ]
+  * [1d25495] Add genext2fs to depends [Closes: issue1126] Thanks to
+    Charles A. Hewson for the bugreport
+
+ -- Michael Prokop <mika@grml.org>  Wed, 04 Jan 2012 16:48:38 +0100
+
+live-boot (3.0~a24-1+grml.1) grml-testing; urgency=low
+
+  * Resynchronized with Debian.
+
+  [ Christian Hofstaedtler ]
+  * Resynchronized with Debian.
+  * Drop upstream-applied patch: 01_fix_output_file
+  * Drop upstream-applied patch: 10_validateroot
+  * Drop upstream-applied patch: 25_support_lvm_for_live-media
+  * 07_support_findiso: remove upstream-applied parts
+  * Manually refreshd patch 31_package_rename
+
+  [ Ulrich Dangel ]
+  * Add kms modules to initramfs
+  * Install hook instead of specifying modules.d
+
+  [ Michael Prokop ]
+  * Try loading phram module twice to fix loading issue.
+
+ -- Christian Hofstaedtler <ch@grml.org>  Tue, 06 Dec 2011 22:26:32 +0100
+
 live-boot (3.0~a24-1) unstable; urgency=low
 
   * Removing quotes from udev path_id command to actually execute the
@@ -1143,6 +1391,38 @@ live-boot (3.0~a20-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  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
@@ -1165,6 +1445,51 @@ live-boot (3.0~a18-1) unstable; urgency=low
 
  -- Daniel Baumann <mail@daniel-baumann.ch>  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 22a06d0..54a98f6 100644 (file)
@@ -1,22 +1,26 @@
 Source: live-boot
 Section: misc
 Priority: optional
-Maintainer: Live Systems Maintainers <debian-live@lists.debian.org>
-Uploaders: Daniel Baumann <mail@daniel-baumann.ch>
-Build-Depends: debhelper (>= 9)
+Maintainer: Grml Team <team@grml.org>
+Build-Depends: debhelper (>= 9), quilt (>= 0.46-7~)
 Standards-Version: 3.9.6
-Homepage: http://live-systems.org/devel/live-boot/
-Vcs-Browser: http://live-systems.org/gitweb/?p=live-boot.git
-Vcs-Git: git://live-systems.org/git/live-boot.git
+Homepage: http://live.debian.net/devel/live-boot/
+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,
+ live-boot-grml-initramfs-tools | live-boot-backend,
+ genext2fs,
 Recommends:
- live-boot-doc,
+ live-boot-grml-doc,
  live-tools,
+ eject,
+ file,
  rsync,
  uuid-runtime,
 Suggests:
@@ -24,17 +28,21 @@ Suggests:
  cryptsetup,
  httpfs2,
  wget,
+Conflicts: live-boot
+Replaces: live-boot
+Provides: live-boot
 Description: Live System Boot Components
- The Live Systems project maintains the components to build Debian based Live
- systems and the official Debian Live images themselves.
- .
  live-boot contains the components to configure a live system during the boot
  process (early userspace).
  .
  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}
@@ -46,8 +54,12 @@ Description: Live System Boot Components (documentation)
  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},
@@ -65,3 +77,7 @@ Description: Live System Boot Components (initramfs-tools backend)
  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-initramfs-tools.triggers b/debian/live-boot-grml-initramfs-tools.triggers
new file mode 100644 (file)
index 0000000..6c9f454
--- /dev/null
@@ -0,0 +1 @@
+activate update-initramfs
diff --git a/debian/live-boot-grml.init b/debian/live-boot-grml.init
new file mode 100644 (file)
index 0000000..5799c44
--- /dev/null
@@ -0,0 +1,250 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:            live-boot
+# Required-Start:      $syslog bootmisc
+# Required-Stop:
+# Should-Start:                $local_fs
+# Should-Stop:         halt reboot
+# X-Stop-After:                umountroot
+# Default-Start:       S
+# Default-Stop:                0 6
+# Short-Description:   live-boot init script
+# Description:         Resyncs snapshots, evantually caches files in order to
+#                      let remove the media.
+### END INIT INFO
+
+# Authors: Tollef Fog Heen <tfheen@canonical.com>
+#         Marco Amadori <marco.amadori@gmail.com>
+
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+NAME=live-boot
+SCRIPTNAME=/etc/init.d/${NAME}
+DO_SNAPSHOT=/sbin/live-snapshot
+SNAPSHOT_CONF="/etc/live/boot.d/snapshot.conf"
+
+# Exit if system was not booted by live-boot
+grep -qs boot=live /proc/cmdline || exit 0
+
+# Read snapshot configuration variables
+[ -r ${SNAPSHOT_CONF} ] && . ${SNAPSHOT_CONF}
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+# Try to cache everything we're likely to need after ejecting.  This
+# is fragile and simple-minded, but our options are limited.
+cache_path()
+{
+       path="${1}"
+
+       if [ -d "${path}" ]
+       then
+               find "${path}" -type f | xargs cat > /dev/null 2>&1
+       elif [ -f "${path}" ]
+       then
+               if file -L "${path}" | grep -q 'dynamically linked'
+               then
+                       # ldd output can be of three forms:
+                       # 1. linux-vdso.so.1 =>  (0x00007fffe3fb4000)
+                       #    This is a virtual, kernel shared library and we want to skip it
+                       # 2. libc.so.6 => /lib/libc.so.6 (0x00007f5e9dc0c000)
+                       #    We want to cache the third word.
+                       # 3. /lib64/ld-linux-x86-64.so.2 (0x00007f5e9df8b000)
+                       #    We want to cache the first word.
+                       ldd "${path}" | while read line
+                       do
+                               if echo "$line" | grep -qs ' =>  '
+                               then
+                                       continue
+                               elif echo "$line" | grep -qs ' => '
+                               then
+                                       lib=$(echo "${line}" | awk '{ print $3 }')
+                               else
+                                       lib=$(echo "${line}" | awk '{ print $1 }')
+                               fi
+                               cache_path "${lib}"
+                       done
+               fi
+
+               cat "${path}" >/dev/null 2>&1
+       fi
+}
+
+get_boot_device()
+{
+       # search in /proc/mounts for the device that is mounted at /live/image
+       while read DEVICE MOUNT REST
+       do
+               if [ "${MOUNT}" = "/live/image" ]
+               then
+                       echo "${DEVICE}"
+                       exit 0
+               fi
+       done < /proc/mounts
+}
+
+device_is_USB_flash_drive()
+{
+       # remove leading "/dev/" and all trailing numbers from input
+       DEVICE=$(expr substr ${1} 6 3)
+
+       # check that device starts with "sd"
+       [ "$(expr substr ${DEVICE} 1 2)" != "sd" ] && return 1
+
+       # check that the device is an USB device
+       if readlink /sys/block/${DEVICE} | grep -q usb
+       then
+               return 0
+       fi
+
+       return 1
+}
+
+do_stop ()
+{
+       if ! grep -qs nopersistent /proc/cmdline && grep -qs persistent /proc/cmdline
+       then
+               # ROOTSNAP and HOMESNAP are defined in ${SNAPSHOT_CONF} file
+               if [ ! -z "${ROOTSNAP}" ]
+               then
+                       ${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"
+               fi
+
+               if [ ! -z "${HOMESNAP}" ]
+               then
+                       ${DO_SNAPSHOT} --resync-string="${HOMESNAP}"
+               fi
+       fi
+
+       # check for netboot
+       if [ ! -z "${NETBOOT}" ] || grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline  || grep -qsi root=/dev/cifs /proc/cmdline
+       then
+               return 0
+       fi
+
+       # check for toram
+       if grep -qs toram /proc/cmdline
+       then
+               return 0
+       fi
+
+       # Don't prompt to eject the SD card on Babbage board, where we reuse it
+       # as a quasi-boot-floppy. Technically this uses a bit of ubiquity
+       # (archdetect), but since this is mostly only relevant for
+       # installations, who cares ...
+       if type archdetect >/dev/null 2>&1
+       then
+               subarch="$(archdetect)"
+
+               case $subarch in
+                       arm*/imx51)
+                               return 0
+                               ;;
+               esac
+       fi
+
+       prompt=1
+       if [ "${NOPROMPT}" = "Yes" ]
+       then
+               prompt=
+       fi
+
+       for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty) /bin/plymouth
+       do
+               cache_path "${path}"
+       done
+
+       for x in $(cat /proc/cmdline)
+       do
+               case ${x} in
+                       quickreboot)
+                               QUICKREBOOT="Yes"
+                               ;;
+               esac
+       done
+
+       mount -o remount,ro /live/cow
+
+       if [ -z ${QUICKREBOOT} ]
+       then
+
+               # Exit if the system was booted from an ISO image rather than a physical CD
+               grep -qs find_iso= /proc/cmdline && return 0
+               # TODO: i18n
+               BOOT_DEVICE="$(get_boot_device)"
+
+               if device_is_USB_flash_drive ${BOOT_DEVICE}
+               then
+                       # do NOT eject USB flash drives!
+                       # otherwise rebooting with most USB flash drives
+                       # failes because they actually remember the
+                       # "ejected" state even after reboot
+                       MESSAGE="Please remove the USB flash drive"
+
+                       if [ "${NOPROMPT}" = "usb" ]
+                       then
+                               prompt=
+                       fi
+
+               else
+                       # ejecting is a very good idea here
+                       MESSAGE="Please remove the disc, close the tray (if any)"
+
+                       if [ -x /usr/bin/eject ]
+                       then
+                               eject -p -m /live/image >/dev/null 2>&1
+                       fi
+
+                       if [ ${NOPROMPT} = "cd" ]
+                       then
+                               prompt=
+                       fi
+
+               fi
+
+               [ "$prompt" ] || return 0
+
+               if [ -x /bin/plymouth ] && plymouth --ping
+               then
+                       plymouth message --text="${MESSAGE} and press ENTER to continue:"
+                       plymouth watch-keystroke > /dev/null
+               else
+                       stty sane < /dev/console
+
+                       printf "\n\n${MESSAGE} and press ENTER to continue:" > /dev/console
+
+                       read x < /dev/console
+               fi
+       fi
+}
+
+case "${1}" in
+       start|restart|reload|force-reload|status)
+               [ "${VERBOSE}" != no ] && log_end_msg 0
+               ;;
+
+       stop)
+               log_begin_msg "${NAME} is resyncing snapshots and caching reboot files..."
+               do_stop
+
+               case "${?}" in
+                       0|1)
+                               [ "${VERBOSE}" != no ] && log_end_msg 0
+                               ;;
+
+                       2)
+                               [ "${VERBOSE}" != no ] && log_end_msg 1
+                               ;;
+               esac
+               ;;
+
+       *)
+               log_success_msg "Usage: ${SCRIPTNAME} {start|stop|restart|force-reload}" >&2
+               exit 3
+               ;;
+esac
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/patches/12_uuid_support.patch b/debian/patches/12_uuid_support.patch
new file mode 100644 (file)
index 0000000..646a19c
--- /dev/null
@@ -0,0 +1,118 @@
+#! /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: live-boot-grml/components/9990-misc-helpers.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-misc-helpers.sh        2014-03-08 13:25:32.293262071 +0100
++++ live-boot-grml/components/9990-misc-helpers.sh     2014-03-08 13:25:32.289262541 +0100
+@@ -15,6 +15,42 @@
+       return 1
+ }
++grml_match_bootid()
++{
++      path="$1"
++
++      if [ -n "$IGNORE_BOOTID" ] ; then
++              echo " * Ignoring verification of bootid.txt as requested via ignore_bootid.">>/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.">>/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...">>/boot.log
++              return 1
++      fi
++
++      if [ "$BOOTID" = "$bootid_conf" ]
++      then
++              echo " * Successfully verified /conf/bootid.txt from ISO, continuing... ">>/boot.log
++      else
++              echo " * Warning: BOOTID of ISO does not match. Retrying and continuing search...">>/boot.log
++              return 1
++      fi
++
++      return 0
++}
++
++
+ matches_uuid ()
+ {
+       if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
+@@ -214,7 +250,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
+@@ -310,19 +346,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
+Index: live-boot-grml/components/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:25:32.293262071 +0100
++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:25:32.289262541 +0100
+@@ -18,6 +18,11 @@
+                               BOOTIF="${_PARAMETER#BOOTIF=}"
+                               ;;
++                      bootid=*)
++                              BOOTID="${_PARAMETER#bootid=}"
++                              export BOOTID
++                              ;;
++
+                       dhcp)
+                               # Force dhcp even while netbooting
+                               # Use for debugging in case somebody works on fixing dhclient
+@@ -79,6 +84,11 @@
+                               export FROMISO
+                               ;;
++                      ignore_bootid)
++                              IGNORE_BOOTID="Yes"
++                              export IGNORE_BOOTID
++                              ;;
++
+                       ignore_uuid)
+                               IGNORE_UUID="true"
+                               export IGNORE_UUID
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..c920102
--- /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: live-boot-grml/components/9990-initramfs-tools.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-initramfs-tools.sh     2014-03-08 13:26:25.866978105 +0100
++++ live-boot-grml/components/9990-initramfs-tools.sh  2014-03-08 13:26:25.862978575 +0100
+@@ -2,6 +2,17 @@
+ #set -e
++# 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/15_networking_grml.patch b/debian/patches/15_networking_grml.patch
new file mode 100644 (file)
index 0000000..510f84a
--- /dev/null
@@ -0,0 +1,174 @@
+#! /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: live-boot-grml/components/9990-grml-networking.sh
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ live-boot-grml/components/9990-grml-networking.sh  2014-03-08 16:34:29.800254396 +0100
+@@ -0,0 +1,120 @@
++#!/bin/sh
++
++#set -e
++
++Grml_Networking () {
++
++if [ -n "${NONETWORKING}" ]; then
++   return 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"
++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
++# 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=/run/net-${interface}.conf
++    if [ -n "$NODHCP" ] || [ -e "${netconfig}" ]; then
++        method="manual"
++    fi
++
++    # if boot option "nodhcp" is set but also boot option "dhcp" is
++    # set, then dhcp should win over it as we default to dhcp and if
++    # nodhcp is used as default boot option but "dhcp" is added then it
++    # would be confusing to not get a working network setup
++    if [ "$DHCP" = "true" ] ; then
++        method="dhcp"
++    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
++
++# 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
++
++}
+Index: live-boot-grml/components/9990-main.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-main.sh        2014-03-08 16:27:40.668243817 +0100
++++ live-boot-grml/components/9990-main.sh     2014-03-08 16:27:40.664244286 +0100
+@@ -195,6 +195,8 @@
+       Swap
++      Grml_Networking
++
+       case "${UNIONFS}" in
+               unionfs-fuse)
+                       umount "${rootmnt}/dev"
+Index: live-boot-grml/components/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 16:27:34.117012248 +0100
++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 16:33:20.536378749 +0100
+@@ -33,6 +33,8 @@
+                       nodhcp)
+                               DHCP=""
+                               export DHCP
++                              NODHCP="Yes"
++                              export NODHCP
+                               ;;
+                       ethdevice=*)
+@@ -150,6 +152,11 @@
+                               export NFS_COW
+                               ;;
++                      nodhcphostname)
++                              NODHCPHOSTNAME="Yes"
++                              export NODHCPHOSTNAME
++                              ;;
++
+                       nofstab)
+                               NOFSTAB="true"
+                               export NOFSTAB
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..0da7f73
--- /dev/null
@@ -0,0 +1,44 @@
+#! /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: live-boot-grml/components/9990-networking.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-networking.sh  2014-03-08 13:33:11.615385566 +0100
++++ live-boot-grml/components/9990-networking.sh       2014-03-08 13:33:11.611386038 +0100
+@@ -151,7 +151,7 @@
+                               echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
+                       fi
+-                      for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
++                      for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVER1} ${DNSSERVER2}
+                       do
+                               if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
+                               then
+Index: live-boot-grml/components/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:33:11.615385566 +0100
++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:33:11.611386038 +0100
+@@ -18,6 +18,19 @@
+                               BOOTIF="${_PARAMETER#BOOTIF=}"
+                               ;;
++                      dns=*)
++                              DNSSERVER="${_PARAMETER#*=}"
++                              if echo "${DNSSERVER}" | grep -q , ; then
++                                      DNSSERVER1="${DNSSERVER%,*}"
++                                      DNSSERVER2="${DNSSERVER#*,}"
++                                      export DNSSERVER1 DNSSERVER2
++                              else
++                                      DNSSERVER1="$DNSSERVER"
++                                      export DNSSERVER1
++                              fi
++                              unset DNSSERVER
++                              ;;
++
+                       bootid=*)
+                               BOOTID="${_PARAMETER#bootid=}"
+                               export BOOTID
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..77bec78
--- /dev/null
@@ -0,0 +1,176 @@
+#! /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: live-boot-grml/components/9990-networking.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-networking.sh  2014-03-08 13:35:17.832580835 +0100
++++ live-boot-grml/components/9990-networking.sh       2014-03-08 13:35:33.106789237 +0100
+@@ -44,7 +44,7 @@
+                               if [ "$bootif_mac" = "$current_mac" ]
+                               then
+-                                      DEVICE=${device##*/}
++                                      ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice
+                                       break
+                               fi
+                       fi
+@@ -52,6 +52,24 @@
+       fi
+ }
++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
+@@ -62,8 +80,20 @@
+       [ -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
++
+               # See if we can select the device from BOOTIF
+               Device_from_bootif
+@@ -73,14 +103,7 @@
+               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"
+@@ -89,42 +112,29 @@
+                       devlist="$devlist $device"
+               done
+-              # this is tricky (and ugly) because ipconfig sometimes just hangs/runs into
+-              # an endless loop; if 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 /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, if so let's use the device 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"
++                      if [ -e "/run/net-${device}.conf" ]; then
++                              . /run/net-${device}.conf
+                       fi
+-              done
+-      else
+-              for interface in ${DEVICE}; do
+-                      ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config
+-
+-                      [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf
+-
+-                      if [ "$IPV4ADDR" != "0.0.0.0" ]
+-                      then
+-                              break
++                      if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
++                              export DEVICE="$dev $DEVICE"
++                              # break  # exit loop as we just use the irst
+                       fi
+               done
+-      fi
++      unset devlist
+       for interface in ${DEVICE}
+       do
+Index: live-boot-grml/components/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:35:17.832580835 +0100
++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:35:17.828581304 +0100
+@@ -51,9 +51,8 @@
+                               ;;
+                       ethdevice=*)
+-                              DEVICE="${_PARAMETER#ethdevice=}"
+-                              ETHDEVICE="${DEVICE}"
+-                              export DEVICE ETHDEVICE
++                              ETHDEVICE="${_PARAMETER#ethdevice=}"
++                              export ETHDEVICE
+                               ;;
+                       ethdevice-timeout=*)
+@@ -110,13 +109,9 @@
+                               ;;
+                       ip=*)
+-                              STATICIP="${_PARAMETER#ip=}"
+-
+-                              if [ -z "${STATICIP}" ]
+-                              then
+-                                      STATICIP="frommedia"
+-                              fi
+-
++                              # copy complete ip=args into staticip, and
++                              # keep multiple uses.
++                              STATICIP="${STATICIP} ${_PARAMETER}"
+                               export STATICIP
+                               ;;
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..f481eea
--- /dev/null
@@ -0,0 +1,55 @@
+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/backend/initramfs-tools/live.hook
++++ b/backend/initramfs-tools/live.hook
+@@ -228,23 +228,26 @@
+ # Some experimental stuff
+-case "${LIVE_DNS}" in
+-      true)
+-              [ "${QUIET}" ] || echo -n " dns"
+-
+-              # /lib/libnss_dns.so.*:a   DNS
+-              # /lib/libnss_files.so.*:  /etc/hosts and /etc/passwd
+-              # /lib/libnss_compat.so.*: /etc/passwd
+-
+-              for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
+-              do
+-                      copy_exec "${_SHLIB}"
+-              done
+-
+-              # might be needed if /etc/hosts is used
+-              #mkdir -p "${DESTDIR}/etc"
+-              #cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
+-              ;;
+-esac
++[ "${QUIET}" ] || echo -n " dns"
++
++# /lib/libnss_dns.so.*:a   DNS
++# /lib/libnss_files.so.*:  /etc/hosts and /etc/passwd
++# /lib/libnss_compat.so.*: /etc/passwd
++
++for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
++do
++      copy_exec "${_SHLIB}"
++done
++
++# might be needed if /etc/hosts is used
++#mkdir -p "${DESTDIR}/etc"
++#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
++
++# vlan support
++if [ -x /sbin/vconfig ]
++then
++      copy_exec /sbin/vconfig
++      manual_add_modules 8021q
++fi
+ [ "${QUIET}" ] || echo .
diff --git a/debian/patches/32_add_kms.patch b/debian/patches/32_add_kms.patch
new file mode 100644 (file)
index 0000000..f908dfe
--- /dev/null
@@ -0,0 +1,30 @@
+Index: live-boot-grml/hooks/kms
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ live-boot-grml/backend/initramfs-tools/kms.hook    2011-12-06 22:09:55.000000000 +0100
+@@ -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/33_retry_phram.patch b/debian/patches/33_retry_phram.patch
new file mode 100644 (file)
index 0000000..6d37640
--- /dev/null
@@ -0,0 +1,21 @@
+commit d4619b77a669c70ae68d5da34de7655ffef80e04
+Author: Michael Prokop <mika@grml.org>
+Date:   Mon Jul 11 12:42:24 2011 +0200
+
+    Try loading phram module twice to fix loading issue.
+    
+    phram doesn't work on first modprobe, when loading once again it seems
+    to work. So let's try it this way.
+
+Index: live-boot-grml/components/9990-main.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-main.sh        2014-03-08 13:38:03.673128454 +0100
++++ live-boot-grml/components/9990-main.sh     2014-03-08 13:38:03.669128922 +0100
+@@ -58,6 +58,7 @@
+                               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
diff --git a/debian/patches/34_ignore_unknown_filesystems.patch b/debian/patches/34_ignore_unknown_filesystems.patch
new file mode 100644 (file)
index 0000000..05f4387
--- /dev/null
@@ -0,0 +1,17 @@
+Index: live-boot-grml/components/9990-misc-helpers.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-misc-helpers.sh        2014-03-08 13:38:26.286476006 +0100
++++ live-boot-grml/components/9990-misc-helpers.sh     2014-03-08 13:38:26.282476475 +0100
+@@ -443,6 +443,12 @@
+               return 1
+       fi
++      # get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists
++      if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ]
++      then
++              return 1
++      fi
++
+       # Try to look if it is already supported by the kernel
+       if grep -q ${fstype} /proc/filesystems
+       then
diff --git a/debian/patches/39_persistence_with_forensic.patch b/debian/patches/39_persistence_with_forensic.patch
new file mode 100644 (file)
index 0000000..e83ccb2
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/components/0020-read-only
++++ b/components/0020-read-only
+@@ -53,4 +53,20 @@
+                               ;;
+               esac
+       done
++
++      if grep -qe persistence /proc/cmdline
++              then
++              printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console
++
++              for label in custom-ov home-rw home-sn live-rw live-sn persistence
++              do
++                      if blkid -t LABEL="$label" | grep -q '.'
++                      then
++                              device=$(blkid -t LABEL="$label" | awk -F: '{print $1}')
++                              printf "   - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console
++                              blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console
++                      fi
++              done
++      fi
++
+ }
diff --git a/debian/patches/40_support_multiple_hooks.patch b/debian/patches/40_support_multiple_hooks.patch
new file mode 100644 (file)
index 0000000..ae7b111
--- /dev/null
@@ -0,0 +1,20 @@
+Index: live-boot-grml/Makefile
+===================================================================
+--- live-boot-grml.orig/Makefile       2014-03-08 13:42:04.748851311 +0100
++++ live-boot-grml/Makefile    2014-03-08 13:42:04.744851781 +0100
+@@ -47,9 +47,13 @@
+       # Installing executables
+       mkdir -p $(DESTDIR)/usr/share/initramfs-tools/hooks
+-      cp backend/initramfs-tools/live.hook $(DESTDIR)/usr/share/initramfs-tools/hooks/live
++      for f in backend/initramfs-tools/*.hook; do \
++              cp $${f} $(DESTDIR)/usr/share/initramfs-tools/hooks/$$(basename $${f} .hook); \
++      done
+       mkdir -p $(DESTDIR)/usr/share/initramfs-tools/scripts
+-      cp backend/initramfs-tools/live.script $(DESTDIR)/usr/share/initramfs-tools/scripts/live
++      for f in backend/initramfs-tools/*.script; do \
++              cp $${f} $(DESTDIR)/usr/share/initramfs-tools/scripts/$$(basename $${f} .script); \
++      done
+       mkdir -p $(DESTDIR)/bin
+       cp frontend/* $(DESTDIR)/bin
diff --git a/debian/patches/41_vlan_support.patch b/debian/patches/41_vlan_support.patch
new file mode 100644 (file)
index 0000000..9551b2c
--- /dev/null
@@ -0,0 +1,57 @@
+--- a/components/9990-cmdline-old
++++ b/components/9990-cmdline-old
+@@ -266,6 +266,11 @@
+                               UNIONTYPE="${_PARAMETER#union=}"
+                               export UNIONTYPE
+                               ;;
++
++                      vlan=*)
++                              VLANS="${VLANS} ${_PARAMETER#vlan=}"
++                              export VLANS
++                              ;;
+               esac
+       done
+--- a/components/9990-grml-networking.sh
++++ b/components/9990-grml-networking.sh
+@@ -67,10 +67,39 @@
+         method="dhcp"
+     fi
+-    cat >> $IFFILE << EOF
++    if [ -n "$VLANS" ] ; then
++      modprobe 8021q
++
++      # vlan=<vid>:<phydevice>
++      for line in $(echo $VLANS | sed 's/ /\n'/) ; do
++        vlandev=${line#*:}
++        vlanid=${line%:*}
++
++        if [ -n "$vlandev" ] && [ -n "$vlanid" ] ; then
++          case "$vlandev" in
++            "$interface")
++              vlan_raw_dev=$interface
++              interface="${vlandev}.${vlanid}"
++              ;;
++          esac
++        fi
++      done
++    fi
++
++    if [ -n "$vlan_raw_dev" ] ; then
++      cat >> $IFFILE << EOF
++auto ${interface}
++iface ${interface} inet ${method}
++        vlan-raw-device $vlan_raw_dev
++EOF
++    else
++      cat >> $IFFILE << EOF
+ allow-hotplug ${interface}
+ iface ${interface} inet ${method}
+ EOF
++    fi
++
++    unset vlandev vlanid vlan_raw_dev # unset variables to have clean state for next device
+     # DNS for resolvconf and /etc/resolv.conf
+     if [ -e "${netconfig}" ]; then
diff --git a/debian/patches/grml-specific/boot_failure_message_grml.patch b/debian/patches/grml-specific/boot_failure_message_grml.patch
new file mode 100644 (file)
index 0000000..794555a
--- /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: live-boot-grml/components/9990-initramfs-tools.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-initramfs-tools.sh     2014-03-08 13:20:10.746978063 +0100
++++ live-boot-grml/components/9990-initramfs-tools.sh  2014-03-08 13:20:10.742978533 +0100
+@@ -52,14 +52,20 @@
+       printf "\n\n"
+       printf "  \033[1;37mBOOT FAILED!\033[0m\n"
+       printf "\n"
+-      printf "  This Live System image failed to boot.\n\n"
++      printf "  This image failed to boot.\n\n"
+-      printf "  Please file a bug against the 'live-boot' package or email the Live Systems\n"
+-      printf "  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/grml-specific/grml_defaults.patch b/debian/patches/grml-specific/grml_defaults.patch
new file mode 100644 (file)
index 0000000..1784e75
--- /dev/null
@@ -0,0 +1,20 @@
+#! /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: live-boot-grml/components/9990-aaa-fixme.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-aaa-fixme.sh   2014-03-08 13:20:56.901564329 +0100
++++ live-boot-grml/components/9990-aaa-fixme.sh        2014-03-08 13:20:56.897564798 +0100
+@@ -10,7 +10,7 @@
+ alt_mountpoint="/media"
+ LIVE_MEDIA_PATH="live"
+-HOSTNAME="host"
++HOSTNAME="grml"
+ mkdir -p "${mountpoint}"
+ mkdir -p /var/lib/live/boot
diff --git a/debian/patches/grml-specific/grml_version_file_hook.patch b/debian/patches/grml-specific/grml_version_file_hook.patch
new file mode 100644 (file)
index 0000000..7aa4f24
--- /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: live-boot-grml/backend/initramfs-tools/live.hook
+===================================================================
+--- live-boot-grml.orig/backend/initramfs-tools/live.hook      2014-03-08 13:18:27.443095163 +0100
++++ live-boot-grml/backend/initramfs-tools/live.hook   2014-03-08 13:18:27.439095633 +0100
+@@ -16,6 +16,12 @@
+       fi
+ done
++# Grml version information:
++if [ -r /etc/grml_version ]
++then
++       cp /etc/grml_version "${DESTDIR}"/etc
++fi
++
+ # Checking live-boot
+ if [ ! -e /bin/live-boot ]
+ then
diff --git a/debian/patches/grml-specific/package_rename.patch b/debian/patches/grml-specific/package_rename.patch
new file mode 100644 (file)
index 0000000..7bd598b
--- /dev/null
@@ -0,0 +1,24 @@
+Index: live-boot-grml/Makefile
+===================================================================
+--- live-boot-grml.orig/Makefile       2014-03-08 13:36:52.857434829 +0100
++++ live-boot-grml/Makefile    2014-03-08 13:36:52.853435298 +0100
+@@ -55,8 +55,8 @@
+       cp frontend/* $(DESTDIR)/bin
+       # Installing docs
+-      mkdir -p $(DESTDIR)/usr/share/doc/live-boot
+-      cp -r COPYING $(DESTDIR)/usr/share/doc/live-boot
++      mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml
++      cp -r COPYING $(DESTDIR)/usr/share/doc/live-boot-grml
+       # Installing manpages
+       for MANPAGE in manpages/en/*; \
+@@ -90,7 +90,7 @@
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || 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 > /dev/null 2>&1 || true
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
diff --git a/debian/patches/reverts/drop_nameserver_from_ip_option.patch b/debian/patches/reverts/drop_nameserver_from_ip_option.patch
new file mode 100644 (file)
index 0000000..2f2f6bf
--- /dev/null
@@ -0,0 +1,41 @@
+Author: Michael Prokop <mika@grml.org>
+Date:   Mon Dec 17 16:31:42 CET 2012
+
+    Drop nameserver handling from ip= boot parameter.
+
+In commit ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2
+("Adding support for nameserver in ip= boot parameter.")
+Debian's live-boot added support for handling nameserver
+option inside the ip= boot parameter.
+
+This violates the ip= handling as documented in
+https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
+
+--- a/components/9990-netbase.sh
++++ b/components/9990-netbase.sh
+@@ -44,7 +44,6 @@
+                       ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
+                       ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
+                       ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
+-                      nameserver="$(echo ${ifline} | cut -f5 -d ':')"
+ cat >> "${IFFILE}" << EOF
+ allow-hotplug ${ifname}
+@@ -62,17 +61,6 @@
+ EOF
+                       fi
+-
+-                      if [ -n "${nameserver}" ]
+-                      then
+-                              if [ -e "${DNSFILE}" ]
+-                              then
+-                                      grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
+-                                      mv "${DNSFILE}.tmp" "${DNSFILE}"
+-                              fi
+-
+-                              echo "nameserver ${nameserver}" >> "${DNSFILE}"
+-                      fi
+               done
+       else
+               if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
diff --git a/debian/patches/reverts/restore_support_for_old_persistence.patch b/debian/patches/reverts/restore_support_for_old_persistence.patch
new file mode 100644 (file)
index 0000000..4e2a12c
--- /dev/null
@@ -0,0 +1,94 @@
+From: Evgeni Golov <evgeni@debian.org>
+Subject: restore support for old persistence media
+
+Index: live-boot-grml/components/9990-aaa-fixme.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-aaa-fixme.sh   2014-03-08 13:43:19.172121783 +0100
++++ live-boot-grml/components/9990-aaa-fixme.sh        2014-03-08 13:43:19.164122722 +0100
+@@ -26,5 +26,8 @@
+       export PATH
+ fi
++old_root_overlay_label="live-rw"
++old_home_overlay_label="home-rw"
+ custom_overlay_label="persistence"
++old_custom_overlay_label="custom-ov"
+ persistence_list="persistence.conf"
+Index: live-boot-grml/components/9990-misc-helpers.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-misc-helpers.sh        2014-03-08 13:43:19.172121783 +0100
++++ live-boot-grml/components/9990-misc-helpers.sh     2014-03-08 13:43:19.168122252 +0100
+@@ -1632,6 +1632,32 @@
+       echo ${used_devices}
+ }
++fix_backwards_compatibility ()
++{
++      local device dir opt backing include_list
++      device=${1}
++      dir=${2}
++      opt=${3}
++
++      if [ -n "${PERSISTENCE_READONLY}" ]
++      then
++              return
++      fi
++
++      backing="$(mount_persistence_media ${device})"
++      if [ -z "${backing}" ]
++      then
++              return
++      fi
++
++      include_list="${backing}/${persistence_list}"
++      if [ ! -r "${include_list}" ] && [ ! -r "${backing}/${old_persistence_list}" ]
++      then
++              echo "# persistence backwards compatibility:
++${dir} ${opt},source=." > "${include_list}"
++      fi
++}
++
+ is_mountpoint ()
+ {
+       directory="$1"
+Index: live-boot-grml/components/9990-overlay.sh
+===================================================================
+--- live-boot-grml.orig/components/9990-overlay.sh     2014-03-08 13:43:19.172121783 +0100
++++ live-boot-grml/components/9990-overlay.sh  2014-03-08 13:43:19.168122252 +0100
+@@ -210,7 +210,7 @@
+               if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD}
+               then
+-                      overlays="${custom_overlay_label}"
++                      overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label} ${old_custom_overlay_label}"
+               fi
+               local overlay_devices
+@@ -222,10 +222,27 @@
+                               media="$(echo ${media} | tr ":" " ")"
+                               case ${media} in
++                                      ${old_root_overlay_label}=*)
++                                              device="${media#*=}"
++                                              fix_backwards_compatibility ${device} / union
++                                              overlay_devices="${overlay_devices} ${device}"
++                                              ;;
++
++                                      ${old_home_overlay_label}=*)
++                                              device="${media#*=}"
++                                              fix_backwards_compatibility ${device} /home bind
++                                              overlay_devices="${overlay_devices} ${device}"
++                                              ;;
++
+                                       ${custom_overlay_label}=*)
+                                               device="${media#*=}"
+                                               overlay_devices="${overlay_devices} ${device}"
+                                               ;;
++
++                                      ${old_custom_overlay_label}=*)
++                                              device="${media#*=}"
++                                              overlay_devices="${overlay_devices} ${device}"
++                                              ;;
+                                esac
+                       done
+               fi
diff --git a/debian/patches/reverts/revert_toram_bootoption_to_expected_behaviour.patch b/debian/patches/reverts/revert_toram_bootoption_to_expected_behaviour.patch
new file mode 100644 (file)
index 0000000..5f3f3ff
--- /dev/null
@@ -0,0 +1,41 @@
+#! /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/components/9990-toram-todisk.sh
++++ b/components/9990-toram-todisk.sh
+@@ -86,8 +86,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/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..dce736d
--- /dev/null
@@ -0,0 +1,19 @@
+grml-specific/grml_version_file_hook.patch
+grml-specific/boot_failure_message_grml.patch
+grml-specific/grml_defaults.patch
+12_uuid_support.patch
+13_always_display_warnings_and_failures.patch
+15_networking_grml.patch
+reverts/revert_toram_bootoption_to_expected_behaviour.patch
+26_support_dns_bootoption.patch
+27_support_static_ip.patch
+29_support_dns_in_initramfs.patch
+grml-specific/package_rename.patch
+32_add_kms.patch
+33_retry_phram.patch
+34_ignore_unknown_filesystems.patch
+39_persistence_with_forensic.patch
+40_support_multiple_hooks.patch
+reverts/drop_nameserver_from_ip_option.patch
+reverts/restore_support_for_old_persistence.patch
+41_vlan_support.patch
index e59fceb..47cb519 100755 (executable)
@@ -1,20 +1,34 @@
 #!/usr/bin/make -f
 
+build:
+       # regular build.
+       dh build
+
 %:
-       dh ${@} --parallel
+       dh ${@} --with quilt --parallel
 
 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
+       rm -f debian/lib/live/boot/FIXME
 
        # 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
+
+       # this is needed because dpatch doesn't do file modes on diffs
+       # and we can't execute this fix during build stage as new files
+       # might be installed during dh_quilt_patch
+       chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/scripts/*
+       chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/hooks/*
 
 override_dh_builddeb:
        dh_builddeb -- -Zxz
 
 override_dh_install:
        dh_install --fail-missing
+
+override_dh_installinit:
+       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>.