Drop 5 of my patches that have been integrated upstream.
authorMichael Prokop <mika@grml.org>
Sat, 20 Feb 2010 11:43:02 +0000 (12:43 +0100)
committerMichael Prokop <mika@grml.org>
Sat, 20 Feb 2010 15:19:53 +0000 (16:19 +0100)
01_add_rsync.dpatch
02_more_verbose_toram.dpatch
04_drop_usage_of_fstype.dpatch
06_support_fromiso_isofrom.dpatch
08_readonly_devices.dpatch

debian/patches/00list
debian/patches/01_add_rsync.dpatch [deleted file]
debian/patches/02_more_verbose_toram.dpatch [deleted file]
debian/patches/04_drop_usage_of_fstype.dpatch [deleted file]
debian/patches/06_support_fromiso_isofrom.dpatch [deleted file]
debian/patches/08_readonly_devices.dpatch [deleted file]

index d166435..530c098 100644 (file)
@@ -1,11 +1,6 @@
-01_add_rsync.dpatch
-02_more_verbose_toram.dpatch
 03_grml_version_file_hook.dpatch
-04_drop_usage_of_fstype.dpatch
 05_boot_failure_message_grml.dpatch
-06_support_fromiso_isofrom.dpatch
 07_support_findiso.dpatch
-08_readonly_devices.dpatch
 09_fix_resolvconf_pxeboot.dpatch
 10_support_ethdevice.dpatch
 11_dhcphostname.patch
diff --git a/debian/patches/01_add_rsync.dpatch b/debian/patches/01_add_rsync.dpatch
deleted file mode 100755 (executable)
index 1bb04d3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_add_rsync.dpatch by  <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add support for rsync
-
-@DPATCH@
-
---- a/hooks/live       Thu Jul 17 14:16:44 2008 +0200
-+++ b/hooks/live       Thu Jul 17 14:17:05 2008 +0200
-@@ -86,6 +86,8 @@ manual_add_modules ext3
- # Filesystem: jffs2
- manual_add_modules jffs2
-+copy_exec /usr/bin/rsync /bin
-+
- # Filesystem: squashfs
- copy_exec /sbin/losetup /sbin
- manual_add_modules loop
diff --git a/debian/patches/02_more_verbose_toram.dpatch b/debian/patches/02_more_verbose_toram.dpatch
deleted file mode 100755 (executable)
index 7c08ece..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_more_verbose_toram.dpatch by <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Support more verbose version of toram via rsync
-
-@DPATCH@
-diff -urNad live-initramfs-grml~/scripts/live live-initramfs-grml/scripts/live
---- live-initramfs-grml~/scripts/live  2009-11-13 18:51:34.000000000 +0100
-+++ live-initramfs-grml/scripts/live   2009-11-13 18:55:37.366466532 +0100
-@@ -673,7 +673,7 @@
-       # begin copying (or uncompressing)
-       mkdir "${copyto}"
--      echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
-+      log_begin_msg "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
-       mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
-       if [ "${extension}" = "tgz" ]
-@@ -686,11 +686,23 @@
-       else
-               if [ -n "${MODULETORAMFILE}" ]
-               then
--                      cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
--              else
--                      mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
--                      cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}   # "cp -a" from busybox also copies hidden files
--              fi
-+                    if [ -x /bin/rsync ] ; then
-+                    echo " * Copying $MODULETORAMFILE to RAM" 1>/dev/console
-+                       rsync -a --progress ${MODULETORAMFILE} ${copyto} 1>/dev/console # copy only the filesystem module
-+                    else
-+                       cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module
-+                    fi
-+                 else
-+                    if [ -x /bin/rsync ] ; then
-+                       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
-+                       echo "   -> Tip: boot using 'grml2ram' or use 'grml toram=...'" 1>/dev/console
-+                       echo "           to copy the image only instead of the whole medium" 1>/dev/console
-+                    else
-+                       mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
-+                       cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}   # "cp -a" from busybox also copies hidden files
-+                    fi
-+                 fi
-               umount ${copyfrom}
-               mount -r -o move ${copyto} ${copyfrom}
diff --git a/debian/patches/04_drop_usage_of_fstype.dpatch b/debian/patches/04_drop_usage_of_fstype.dpatch
deleted file mode 100755 (executable)
index 9c2314f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_drop_usage_of_fstype.dpatch <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Avoid the use of fstype in a running live system, as it's
-## DP: a executable and not a shell function and causes problems
-## DP: for example within live-snapshot.
-## DP: Further switch from vol_id to blkid if using udev >=146-1.
-
-@DPATCH@
-diff -urNad live-initramfs-grml~/scripts/live-helpers live-initramfs-grml/scripts/live-helpers
---- live-initramfs-grml~/scripts/live-helpers  2009-11-13 23:45:28.000000000 +0100
-+++ live-initramfs-grml/scripts/live-helpers   2009-11-13 23:59:36.524643320 +0100
-@@ -76,25 +76,17 @@
- get_fstype ()
- {
--      local FSTYPE
--      local FSSIZE
--
--      # fstype misreports LUKS devices
--      if is_luks "${1}"
--      then
--          /lib/udev/vol_id -t ${1} 2>/dev/null
--          return
--      fi
--
--      eval $(fstype ${1} 2>/dev/null)
--
--      if [ "${FSTYPE}" != "unknown" ]
-+      # udev >=146-1 no longer provides vol_id:
-+      if [ -x /lib/udev/vol_id ]
-       then
--              echo ${FSTYPE}
--              return 0
-+              /lib/udev/vol_id -t ${1} 2>/dev/null
-+      else
-+              eval $(blkid -o udev "${1}")
-+              if [ -n "$ID_FS_TYPE" ]
-+              then
-+                      echo "${ID_FS_TYPE}"
-+              fi
-       fi
--
--      /lib/udev/vol_id -t ${1} 2>/dev/null
- }
- where_is_mounted ()
-@@ -357,10 +349,21 @@
-                               done
-                       fi
--                      if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
-+                      # udev >=146-1 no longer provides vol_id:
-+                      if [ -x /lib/udev/vol_id ]
-                       then
--                              echo "${devname}"
--                              return 0
-+                              if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
-+                              then
-+                                      echo "${devname}"
-+                                      return 0
-+                              fi
-+                      else
-+                              eval $(blkid -o udev "${devname}")
-+                              if [ "$ID_FS_LABEL" = "${pers_label}" ]
-+                              then
-+                                      echo "${devname}"
-+                                      return 0
-+                              fi
-                       fi
-                       if [ "${PERSISTENT}" = "nofiles" ]
diff --git a/debian/patches/06_support_fromiso_isofrom.dpatch b/debian/patches/06_support_fromiso_isofrom.dpatch
deleted file mode 100755 (executable)
index ee8bad9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 06_support_fromiso_isofrom.dpatch <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Support isofrom / fromiso bootoption
-
-@DPATCH@
-
---- a/scripts/live
-+++ b/scripts/live
-@@ -92,6 +92,11 @@ Arguments ()
-                               export HOSTNAME LIVECONF
-                               ;;
-+                      isofrom=*|fromiso=*)
-+                              FROMISO="${ARGUMENT#*=}"
-+                              export FROMISO
-+                              ;;
-+
-                       username=*)
-                               USERNAME="${ARGUMENT#username=}"
-                               LIVECONF="changed"
-@@ -1361,6 +1366,17 @@ check_dev ()
-       devname="${2}"
-       skip_uuid_check="${3}"
-+      # support for fromiso=.../isofrom=....
-+      if [ -n "$FROMISO" ]
-+      then
-+              mkdir /isofrom
-+              ISO_DEVICE="$(echo $FROMISO | sed 's|\(/dev/[a-z]*[0-9]*\).*|\1|')"
-+              mount "$ISO_DEVICE" /isofrom
-+              ISO_NAME="$(echo $FROMISO | sed 's|/dev/[a-z]*[0-9]*/||')"
-+              loopdevname=$(setup_loop "/isofrom/${ISO_NAME}" "loop" "/sys/block/loop*" "" '')
-+              devname="${loopdevname}"
-+      fi
-+
-       if [ -z "${devname}" ]
-       then
-               devname=$(sys2dev "${sysdev}")
-@@ -1632,6 +1648,15 @@ mountroot ()
-               log_end_msg
-       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 "$FROMISO" ] && [ "${TORAM}" ]
-+      then
-+        losetup -d /dev/loop0
-+        grep -q /isofrom /proc/mounts && umount /isofrom
-+      fi
-+
-       if [ -n "${MODULETORAMFILE}" ] || [ -n "${PLAIN_ROOT}" ]
-       then
-               setup_unionfs "${livefs_root}" "${rootmnt}"
diff --git a/debian/patches/08_readonly_devices.dpatch b/debian/patches/08_readonly_devices.dpatch
deleted file mode 100755 (executable)
index d42d0cf..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 08_readonly_devices.dpatch by  <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: set all harddisk devices to read-only mode for forensics investigations
-
-@DPATCH@
-diff -urNad live-initramfs-grml~/debian/rules live-initramfs-grml/debian/rules
---- live-initramfs-grml~/debian/rules  2009-02-23 13:55:01.000000000 +0100
-+++ live-initramfs-grml/debian/rules   2009-02-24 10:05:58.447777665 +0100
-@@ -59,6 +59,8 @@
-       install -m 755 grml/23networking \
-         ./debian/live-initramfs/usr/share/initramfs-tools/scripts/live-bottom/23networking
-+      chmod 755 ./debian/live-initramfs/usr/share/initramfs-tools/scripts/live-premount/readonly
-+
-       # Removing double files
-       rm -f debian/live-initramfs/usr/share/doc/live-initramfs/COPYING
-       rm -f debian/live-initramfs/usr/share/doc/live-initramfs/ChangeLog
-diff -urNad live-initramfs-grml~/hooks/live live-initramfs-grml/hooks/live
---- live-initramfs-grml~/hooks/live    2009-02-24 10:05:58.127763179 +0100
-+++ live-initramfs-grml/hooks/live     2009-02-24 10:05:58.447777665 +0100
-@@ -163,6 +163,12 @@
-       copy_exec /usr/bin/wget /bin
- fi
-+# Program: blockdev
-+if [ -x /sbin/blockdev ]
-+then
-+      copy_exec /sbin/blockdev /sbin
-+fi
-+
- # FUSE kernel module
- manual_add_modules fuse
-diff -urNad live-initramfs-grml~/scripts/live-premount/readonly live-initramfs-grml/scripts/live-premount/readonly
---- live-initramfs-grml~/scripts/live-premount/readonly        1970-01-01 01:00:00.000000000 +0100
-+++ live-initramfs-grml/scripts/live-premount/readonly 2009-02-24 10:06:38.771091722 +0100
-@@ -0,0 +1,32 @@
-+#!/bin/sh
-+
-+#set -e
-+
-+# initramfs-tools header
-+
-+PREREQ="udev"
-+
-+prereqs()
-+{
-+      echo "${PREREQ}"
-+}
-+
-+case "${1}" in
-+      prereqs)
-+              prereqs
-+              exit 0
-+              ;;
-+esac
-+
-+# live-initramfs script
-+
-+# make sure all harddisk devices are read-only
-+# this is important for forensic investigations
-+if grep -qe forensic -qe readonly /proc/cmdline ; then
-+   for device in /dev/hd* /dev/sd* /dev/vd* ; do
-+      if [ -b "$device" ] ; then
-+       printf " * Setting device %-9s to read-only mode: " $device >/dev/console
-+         blockdev --setro $device && printf "done [ execute \"blockdev --setrw %-9s\" to unlock]\n" $device >/dev/console || printf "failed\n" >/dev/console
-+       fi
-+   done
-+fi