[SCM] live-initramfs branch, debian-next, updated. debian/1.177.2-1-2-gf28a622

Daniel Baumann daniel at debian.org
Fri Apr 30 15:50:04 UTC 2010


The following commit has been merged in the debian-next branch:
commit f28a6220998356d0081ac2c3f26b49a8307ef751
Author: Daniel Baumann <daniel at debian.org>
Date:   Fri Apr 30 17:44:27 2010 +0200

    Merging casper 1.178.

diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper
index 5457e52..533fd20 100644
--- a/docs/ChangeLog.casper
+++ b/docs/ChangeLog.casper
@@ -1,3 +1,24 @@
+casper (1.178) karmic; urgency=low
+
+  * Ensure that unionfs-fuse isn't killed by /etc/init.d/sendsigs on
+    shutdown (LP: #386010).
+  * Patches from "phl" (https://launchpad.net/~ubuntu-leledy), adjusted by
+    me, to fix snapshot resync:
+    - Avoid using cpio -u -d options if klibc cpio is in use (LP: #384059).
+    - Copy /etc/casper.conf into /root, otherwise we forget snapshot resync
+      settings (LP: #384061).
+    - Adjust the first field of *SNAP entries in casper.conf to be relative
+      to /cow, not /root (LP: #384066).
+    - Prefix $DEST with $MOUNTP in casper-snapshot (LP: #384068).
+    - /etc/init.d/casper is usually called with 'start', so handle that as
+      well as 'stop' to do snapshot resyncing and CD ejecting (LP: #384076).
+  * Fix casper-snapshot(1) syntax to avoid missing spaces between options
+    and their values.
+  * Fix showmounts when used in conjunction with unionfs-fuse; read-only
+    filesystems need to be bind-mounted rather than move-mounted.
+
+ -- Colin Watson <cjwatson at ubuntu.com>  Fri, 12 Jun 2009 13:24:28 +0100
+
 casper (1.177) karmic; urgency=low
 
   * Port from Debian (thanks, Daniel Baumann):
diff --git a/scripts/live b/scripts/live
index 3000d78..21c3d99 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1081,14 +1081,23 @@ try_snap ()
 			RES=$?
 		else
 			# cpio.gz snapshot
-			cd "${snap_mount}"
-			zcat "${snapback}/${snapfile}" | /bin/cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1
-			RES=$?
-			if [ "${RES}" != "0" ]
+
+			# Unfortunately klibc's cpio is incompatible with the
+			# rest of the world; everything else requires -u -d,
+			# while klibc doesn't implement them. Try to detect
+			# whether it's in use.
+			cpiopath="$(which cpio)" || true
+			if [ "$cpiopath" ] && grep -aq /lib/klibc "$cpiopath"
+			then
+				cpioargs=
+			else
+				cpioargs='--unconditional --make-directories'
+			fi
+
+			if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse 2>/dev/null)
 			then
-				log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | /bin/cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories\""
+				log_warning_msg "failure to \"zcat ${snapback}/${snapfile} | cpio $cpioargs --extract --preserve-modification-time --no-absolute-filenames --sparse\""
 			fi
-			cd "${OLDPWD}"
 		fi
 
 		umount "${snapback}" ||  log_warning_msg "failure to \"umount ${snapback}\""
@@ -1129,7 +1138,7 @@ try_snap ()
 		return 1
 	fi
 
-	echo "export ${snap_type}SNAP="${snap_mount}":${snapdev}:${snapfile}" >> /etc/live.conf # for resync on reboot/halt
+	echo "export ${snap_type}SNAP="/cow${snap_mount#$rootmnt}":${snapdev}:${snapfile}" >> /etc/live.conf # for resync on reboot/halt
 	return 0
 }
 
@@ -1419,6 +1428,8 @@ setup_unionfs ()
 			case "${UNIONTYPE}" in
 				unionfs-fuse)
 					(ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:${exposedrootfs}${dir} "${rootmnt}${dir}" || panic "mount ${UNIONTYPE} on ${rootmnt}${dir} failed with option cow,noinitgroups,default_permissions,allow_other,use_ino,suid=/cow=RW:${exposedrootfs}${dir}")
+					mkdir -p /dev/.initramfs/varrun
+					pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true
 					;;
 
 				*)
@@ -1430,6 +1441,8 @@ setup_unionfs ()
 		case "${UNIONTYPE}" in
 			unionfs-fuse)
 				(ulimit -n 16384; unionfs-fuse -o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid /cow=RW:${rofsstring} "${rootmnt}" || panic "mount ${UNIONTYPE} on ${rootmnt} failed with option cow,noinitgroups,default_permissions,allow_other,use_ino,suid=/cow:RW:${rofsstring}")
+				mkdir -p /dev/.initramfs/varrun
+				pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true
 				;;
 
 			*)
@@ -1860,4 +1873,8 @@ mountroot ()
 	exec 2>&7 7>&-
 	kill ${tailpid}
 	[ -w "${rootmnt}/var/log/" ] && cp live.log "${rootmnt}/var/log/" 2>/dev/null
+	if [ -f /etc/live.conf ]
+	then
+		cp /etc/live.conf "${rootmnt}/etc/"
+	fi
 }

-- 
live-initramfs



More information about the debian-live-changes mailing list