[SCM] live-initramfs branch, upstream, updated. upstream/1.177.2-1-gf4a8f2b
Daniel Baumann
daniel at debian.org
Fri Apr 30 17:27:49 UTC 2010
The following commit has been merged in the upstream branch:
commit f4a8f2b8c6982224fdb2505db0edf0669835d08f
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Apr 30 19:21:53 2010 +0200
Adding upstream version 1.199.1.
diff --git a/bin/live-new-uuid b/bin/live-new-uuid
index 97cc7d4..2e29f6a 100755
--- a/bin/live-new-uuid
+++ b/bin/live-new-uuid
@@ -31,10 +31,10 @@ set -e
help() {
echo
- echo "USAGE: $0 initrd.gz <path-to-new-initrd.gz> <path-to-new-live-uuid> "
+ echo "USAGE: $0 initrd.{l,g}z <path-to-new-initrd> <path-to-new-live-uuid> "
echo
- echo "initrd.gz is the absolute path to the original gzipped initramfs"
- echo "<path-to-new-initrd.gz> is the destination directory for the new gzipped initramfs"
+ echo "initrd.{l,g}z is the absolute path to the original gzipped or lzmaed initramfs"
+ echo "<path-to-new-initrd> is the destination directory for the new compressed initramfs"
echo "<path-to-new-live-uuid> is the destination directory for the new live-uuid-TYPE "
echo
echo "if either path is absent, they will end up in the current directory "
@@ -50,10 +50,21 @@ CWD=`pwd`
TEMPDIR=`mktemp -d /tmp/uuid-XXXXXX`
TYPE=`uname -r | cut -d '-' -f 3`
+if echo "$1" | grep ".lz$" >/dev/null; then
+ COMPRESSOR="lzma"
+ SUFFIX=".lz"
+elif echo "$1" | grep ".gz$" >/dev/null; then
+ COMPRESSOR="gzip"
+ SUFFIX=".gz"
+else
+ echo "Unsupported archive type."
+ exit 2
+fi
+
if [ -z "$2" ] || [ ! -d "$2" ] || [ "$2" = "." ]; then
- GZIPDIR="$CWD"
+ COMPRESS_DIR="$CWD"
else
- GZIPDIR="$2"
+ COMPRESS_DIR="$2"
fi
if [ -z "$3" ] || [ ! -d "$3" ] || [ "$3" = "." ]; then
@@ -63,13 +74,13 @@ else
fi
cd "$TEMPDIR"
-zcat "$1" | cpio -id
+$COMPRESSOR -cd "$1" -S "$SUFFIX" | cpio -id
uuidgen -r > conf/uuid.conf
-find . | cpio --quiet --dereference -o -H newc | gzip > "$GZIPDIR/initrd.gz"
+find . | cpio --quiet --dereference -o -H newc | $COMPRESSOR -9c > "$COMPRESS_DIR/initrd$SUFFIX"
if [ "$(ls "$LIVEDIR/live-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then
- cp conf/uuid.conf "$LIVEDIR/live-uuid"-*
+ cp conf/uuid.conf "$LIVEDIR/live-uuid"-*
else
- cp conf/uuid.conf "$LIVEDIR/live-uuid-$TYPE"
+ cp conf/uuid.conf "$LIVEDIR/live-uuid-$TYPE"
fi
cd "$CWD"
rm -rf "$TEMPDIR"
diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper
index 5457e52..25b004d 100644
--- a/docs/ChangeLog.casper
+++ b/docs/ChangeLog.casper
@@ -1,3 +1,215 @@
+casper (1.199) karmic; urgency=low
+
+ [ Tormod Volden ]
+ * Scan device-mapper (RAID) devices for live filesystem (LP: #385305).
+
+ -- Colin Watson <cjwatson at ubuntu.com> Tue, 06 Oct 2009 23:39:57 +0100
+
+casper (1.198) karmic; urgency=low
+
+ * scripts/casper: Send PULSELOGO usplash command at startup. (LP: #438762)
+
+ -- Martin Pitt <martin.pitt at ubuntu.com> Fri, 02 Oct 2009 13:51:07 +0200
+
+casper (1.197) karmic; urgency=low
+
+ [ Colin Watson ]
+ * Fix tty device name construction to work with new upstart (LP: #438678).
+
+ [ Loïc Minier ]
+ * scripts/casper-bottom/22serialtty: pass -L to getty and set term to vt100.
+ * scripts/casper-bottom/22serialtty: set +x...
+
+ -- Colin Watson <cjwatson at ubuntu.com> Thu, 01 Oct 2009 23:27:45 +0100
+
+casper (1.196) karmic; urgency=low
+
+ * Extend our hack that arranges to run setupcon after usplash exits to
+ cover the new Upstartified usplash as well.
+
+ -- Colin Watson <cjwatson at ubuntu.com> Tue, 29 Sep 2009 01:36:55 +0100
+
+casper (1.195) karmic; urgency=low
+
+ [ Oliver Grawert ]
+ * add support for serialtty= cmdline option for debugging purposes in live
+ sessions
+
+ [ Colin Watson ]
+ * Upstart moved /etc/event.d/ to /etc/init/; adjust shell provision on VTs
+ to match (LP: #434769).
+
+ -- Colin Watson <cjwatson at ubuntu.com> Mon, 28 Sep 2009 10:52:32 +0100
+
+casper (1.194) karmic; urgency=low
+
+ * Fix 47unr_ubiquity shell code to make slightly more sense.
+ * Tell mkinitramfs that casper needs usplash (LP: #434980).
+
+ -- Colin Watson <cjwatson at ubuntu.com> Thu, 24 Sep 2009 01:29:21 +0100
+
+casper (1.193) karmic; urgency=low
+
+ * Sync LSB headers in init script with desired behaviour: don't start
+ casper at boot, and stop after umountroot but before halt/reboot.
+
+ -- Colin Watson <cjwatson at ubuntu.com> Mon, 14 Sep 2009 13:08:23 +0100
+
+casper (1.192) karmic; urgency=low
+
+ [ Colin Watson ]
+ * Upgrade to debhelper v7.
+
+ [ Jonathan Riddell ]
+ * Add 37kubuntu_netbook_installer_link to show ubiquity launcher
+
+ -- Jonathan Riddell <jriddell at ubuntu.com> Sat, 12 Sep 2009 00:10:03 +0100
+
+casper (1.191) karmic; urgency=low
+
+ * Slightly re-work 47unr_ubiquity, so that ubiquity doesn't keep getting
+ added to the favourites if persistence is used.·
+
+ -- Steve Kowalik <stevenk at ubuntu.com> Tue, 08 Sep 2009 20:35:00 +1000
+
+casper (1.190) karmic; urgency=low
+
+ [ Colin Watson ]
+ * Don't produce an invalid sed program when trying to remove an applet
+ which isn't in the panel (LP: #406188).
+
+ [ Tormod Volden ]
+ * do not remount filesystems that already have been probed when
+ searching for the livefs (LP: #424464)
+ * Fix quoting in try_snap (LP: #424742).
+ * Silence error messages for non-existent device nodes (LP: #425159).
+
+ -- Colin Watson <cjwatson at ubuntu.com> Mon, 07 Sep 2009 13:10:53 +0100
+
+casper (1.189) karmic; urgency=low
+
+ * In 10adduser fix path to ubiquity-kde.desktop file
+
+ -- Jonathan Riddell <jriddell at ubuntu.com> Wed, 02 Sep 2009 14:54:41 +0100
+
+casper (1.188) karmic; urgency=low
+
+ * Allow for platform-orion-ehci in ID_PATH to qualify as a "nice_device"
+ i.e. one which can host a livefs. This is the name of the USB device
+ driver on Marvell Dove boards.
+
+ -- Loïc Minier <loic.minier at ubuntu.com> Mon, 31 Aug 2009 14:16:21 +0200
+
+casper (1.187) karmic; urgency=low
+
+ * Stop recommending unionfs-fuse, as we're using aufs again in Karmic.
+
+ -- Colin Watson <cjwatson at ubuntu.com> Fri, 28 Aug 2009 12:07:14 +0100
+
+casper (1.186) karmic; urgency=low
+
+ [ Loïc Minier ]
+ * Allow for platform-mxsdhci in ID_PATH to qualify as a "nice_device" i.e.
+ one which can host a livefs. This is the new name of this device in
+ 2.6.31 kernels on Babbage i.MX51.
+
+ [ Steve Kowalik ]
+ * Rename 47unr-ubiquity as 47unr_ubiquity, as scripts with dashes don't
+ get installed into the initramfs. (LP: #411616)
+
+ -- Steve Kowalik <stevenk at ubuntu.com> Fri, 14 Aug 2009 17:39:34 +1000
+
+casper (1.185) karmic; urgency=low
+
+ * Actually set 47unr-ubiquity as executable.·
+
+ -- Steve Kowalik <stevenk at ubuntu.com> Wed, 12 Aug 2009 10:41:35 +1000
+
+casper (1.184) karmic; urgency=low
+
+ [ Evan Dandrea ]
+ * Apply the Ubuntu release version to the installer menu entries as well
+ (LP: #406187).
+
+ [ Colin Watson ]
+ * Fix disabling of apt-check (LP: #406191).
+
+ [ Steve Kowalik ]
+ * Remove the UNR ubiquity .desktop hack in 10adduser.
+ * Set ubiquity as a UNR Favourite in 47unr-ubiquity.
+
+ -- Steve Kowalik <stevenk at ubuntu.com> Fri, 07 Aug 2009 23:11:58 +0100
+
+casper (1.183) karmic; urgency=low
+
+ * Remove erroneous /root prefix on the ubiquity desktop files in
+ 10adduser.
+
+ -- Evan Dandrea <evand at ubuntu.com> Tue, 21 Jul 2009 14:02:34 +0100
+
+casper (1.182) karmic; urgency=low
+
+ [ Evan Dandrea ]
+ * Busybox sed does not preserve ownership, so chown after using it.
+
+ [ Colin Watson ]
+ * Set AutomaticLogin=$USERNAME, not =ubuntu (thanks, arky; LP: #401321).
+
+ [ Mario Limonciello ]
+ * Add support for lzma type archives to casper-new-uuid.
+
+ -- Mario Limonciello <mario_limonciello at dell.com> Mon, 20 Jul 2009 17:36:55 -0500
+
+casper (1.181) karmic; urgency=low
+
+ * Insert a version number in the name field for ubiquity's desktop file
+ (LP: #154506).
+
+ -- Evan Dandrea <evand at ubuntu.com> Wed, 15 Jul 2009 10:11:40 +0100
+
+casper (1.180) karmic; urgency=low
+
+ [ Colin Watson ]
+ * scripts/casper-bottom/15autologin: Minor consistency fixes.
+
+ [ Martin Pitt ]
+ * scripts/casper-bottom/15autologin: Update for new gdm custom configuration
+ file (/etc/gdm/custom.conf). (LP: #395861)
+
+ -- Martin Pitt <martin.pitt at ubuntu.com> Mon, 06 Jul 2009 16:40:00 +0200
+
+casper (1.179) karmic; urgency=low
+
+ [ Colin Watson ]
+ * If LIVE_MEDIA_PATH is set on the command line, record it in
+ /etc/casper.conf for the benefit of ubiquity.
+
+ [ Martin Pitt ]
+ * scripts/casper-bottom/15autologin: Update to work with new gdm.
+
+ -- Martin Pitt <martin.pitt at ubuntu.com> Fri, 03 Jul 2009 14:51:57 +0200
+
+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..76b0be4 100755
--- a/scripts/live
+++ b/scripts/live
@@ -20,6 +20,7 @@ USERFULLNAME="Live user"
HOSTNAME="host"
mkdir -p "${mountpoint}"
+tried="/tmp/tried"
# Create /etc/mtab for debug purpose and future syncs
if [ ! -d /etc ]
@@ -665,12 +666,15 @@ is_nice_device ()
{
sysfs_path="${1#/sys}"
- if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-|platform-mmc)"
+ if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-|platform-orion-ehci|platform-mmc|platform-mxsdhci|)"
then
return 0
elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$'
then
return 0
+ elif echo ${sysfs_path} | grep -q "^/block/dm-"
+ then
+ return 0
fi
return 1
@@ -1081,14 +1085,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 +1142,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 +1432,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 +1445,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
;;
*)
@@ -1550,6 +1567,7 @@ check_dev ()
umount $mountpoint
fi
fi
+ [ -e "$devname" ] || continue
if [ -n "${LIVE_MEDIA_OFFSET}" ]
then
@@ -1561,7 +1579,10 @@ check_dev ()
if is_supported_fs ${fstype}
then
+ devuid=$(blkid -o value -s UUID "$devname")
+ [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
+ [ -n "$devuid" ] && echo "$devuid" >> $tried
if is_live_path ${mountpoint} && \
([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
@@ -1661,6 +1682,7 @@ find_livefs ()
for sysblock in $devices_to_scan
do
devname=$(sys2dev "${sysblock}")
+ [ -e "$devname" ] || continue
fstype=$(get_fstype "${devname}")
if /lib/udev/cdrom_id ${devname} > /dev/null
@@ -1732,6 +1754,14 @@ integrity_check ()
fi
}
+start_usplash_pulse ()
+{
+ if [ -x /sbin/usplash_write ]
+ then
+ /sbin/usplash_write "PULSELOGO"
+ fi
+}
+
mountroot ()
{
if [ -x /scripts/local-top/cryptroot ]; then
@@ -1751,6 +1781,7 @@ mountroot ()
Arguments
set_usplash_timeout
+ start_usplash_pulse
maybe_break live-premount
log_begin_msg "Running /scripts/live-premount"
@@ -1860,4 +1891,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
}
diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin
index 38c3a8f..3f85d50 100755
--- a/scripts/live-bottom/15autologin
+++ b/scripts/live-bottom/15autologin
@@ -55,6 +55,18 @@ then
-e "s/^TimedLogin=.*\$/TimedLogin=${USERNAME}/" \
-e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \
${GDMCONF}
+elif [ -d /root/etc/gdm3 ]
+then
+
+cat > /root/etc/gdm3/custom.conf << EOF
+[daemon]
+AutomaticLoginEnable=true
+AutomaticLogin=$USERNAME
+TimedLoginEnable=true
+TimedLogin=$USERNAME
+TimedLoginDelay=10
+EOF
+
fi
if [ -d /root/etc/default/kdm.d/ ]
diff --git a/scripts/live-bottom/19keyboard b/scripts/live-bottom/19keyboard
index 52a6a58..f903f2b 100755
--- a/scripts/live-bottom/19keyboard
+++ b/scripts/live-bottom/19keyboard
@@ -107,6 +107,10 @@ then
if [ -f /root/etc/init.d/usplash ]
then
sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
+ elif [ -f /root/etc/init/usplash.conf ]
+ then
+ sed -i '/^post-stop script/a\
+ setupcon' /root/etc/init/usplash.conf
fi
fi
elif [ -e /root/usr/sbin/install-keymap ]
diff --git a/scripts/live-bottom/22serialtty b/scripts/live-bottom/22serialtty
new file mode 100755
index 0000000..a8008eb
--- /dev/null
+++ b/scripts/live-bottom/22serialtty
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+#set -e
+
+# initramfs-tools header
+
+PREREQ=""
+
+prereqs()
+{
+ echo "${PREREQ}"
+}
+
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# live-initramfs header
+
+# this bottom script currently only works with upstart
+if [ ! -d /root/etc/init ]
+then
+ exit 0
+fi
+
+. /scripts/live-functions
+
+# live-initramfs script
+
+for ARGUMENT in $(cat /proc/cmdline)
+do
+ case ${ARGUMENT} in
+ serialtty=*)
+ tty="${ARGUMENT#serialtty=}"
+
+ log_begin_msg "Setting up a serial tty..."
+
+cat > /root/etc/init/${tty}.conf <<EOF
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [!2345]
+
+respawn
+exec /sbin/getty -L 115200 ${tty} vt100
+EOF
+
+ log_end_msg
+ ;;
+ esac
+done
diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init
index f55dd0e..67e21a6 100755
--- a/scripts/live-bottom/25configure_init
+++ b/scripts/live-bottom/25configure_init
@@ -73,12 +73,11 @@ then
sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f ${USERNAME} </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
fi
- if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]
+ if [ "/root/etc/init/tty*" != "$(echo /root/etc/init/tty*)" ]
then
- for f in /root/etc/event.d/tty*
+ for f in /root/etc/init/tty*
do
- sed -i -e "/^respawn$/!s|^respawn.*|respawn /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}
- sed -i -e "s|^exec.*|exec /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}
+ sed -i -e "s|^exec.*|exec /bin/login -f $USERNAME </dev/$(basename $f .conf) > /dev/$(basename $f .conf) 2>\&1|" $f
done
fi
fi
diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility
index 3c51fa0..45d1aa1 100755
--- a/scripts/live-bottom/30accessibility
+++ b/scripts/live-bottom/30accessibility
@@ -57,6 +57,7 @@ remove_applet ()
local line_no prior_line next_line
line_no="$(grep -n "<string>$1</string>" /root/usr/share/gconf/defaults/05_panel-default-setup.entries | cut -f 1 -d :)"
+ [ "$line_no" ] || return
prior_line="$((line_no-1))"
next_line="$((line_no+1))"
diff --git a/scripts/live-bottom/31disable_update_notifier b/scripts/live-bottom/31disable_update_notifier
index e363049..0edf189 100755
--- a/scripts/live-bottom/31disable_update_notifier
+++ b/scripts/live-bottom/31disable_update_notifier
@@ -39,7 +39,7 @@ chroot /root dpkg-divert --add --rename --quiet \
if [ -e /root/usr/lib/update-notifier/apt-check ]
then
- ln -s /bin/true /root/usr/lib/update-notifier/apt-check
+ ln -sf /bin/true /root/usr/lib/update-notifier/apt-check
fi
# For KDE, adept_notifier's only useful function at the moment is an
--
live-initramfs
More information about the debian-live-changes
mailing list