--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Using multiple squashfs images does no longer work
- From: Gaudenz Steinlin <gaudenz@debian.org>
- Date: Fri, 21 Dec 2012 17:45:49 +0100
- Message-id: <20121221164549.22525.49835.reportbug@meteor.durcheinandertal.local>
Package: live-boot
Version: 3.0~b10-1
Severity: important
Tags: patch
The squeeze version of live-boot supported using multiple squashfs
images. This no longer works with the current version in sid. Multiple
squashfs images are important for large live systems that should work
from filesystems with a 4GB file size limit (e.g. iso9660).
While there was never support to create multiple squashfs images in
live-build this was working in previous versions if the squashafs are
manually split. IMO it's important to fix this regression in wheezy.
The attached patch fixes this bug.
Gaudenz
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (800, 'testing'), (700, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From a82bfc59e7046e5388545b9ae0e3b3306be3617d Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@debian.org>
Date: Fri, 21 Dec 2012 17:03:09 +0100
Subject: [PATCH] Fix support for multiple squashfs images
Support for multiple squashfs images got lost somewhen in the wheezy
release cycle. This add support for an arbitrary number of readonly
branches. Support for two branches was partially present, but not
working corectly in all cases.
---
scripts/boot/9990-misc-helpers.sh | 54 ++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
index 71ba7e1..d647c77 100755
--- a/scripts/boot/9990-misc-helpers.sh
+++ b/scripts/boot/9990-misc-helpers.sh
@@ -1197,11 +1197,12 @@ link_files ()
do_union ()
{
- local unionmountpoint unionrw unionro1 unionro2
+ local unionmountpoint unionrw unionro
unionmountpoint="${1}" # directory where the union is mounted
- unionrw="${2}" # branch where the union changes are stored
- unionro1="${3}" # first underlying read-only branch (optional)
- unionro2="${4}" # second underlying read-only branch (optional)
+ shift
+ unionrw="${1}" # branch where the union changes are stored
+ shift
+ unionro="${*}" # space separated list of read-only branches (optional)
case "${UNIONTYPE}" in
aufs)
@@ -1225,13 +1226,12 @@ do_union ()
unionfs-fuse)
unionmountopts="-o cow -o noinitgroups -o default_permissions -o allow_other -o use_ino -o suid"
unionmountopts="${unionmountopts} ${unionrw}=${rw_opt}"
- if [ -n "${unionro1}" ]
- then
- unionmountopts="${unionmountopts}:${unionro1}=${ro_opt}"
- fi
- if [ -n "${unionro2}" ]
+ if [ -n "${unionro}" ]
then
- unionmountopts="${unionmountopts}:${unionro2}=${ro_opt}"
+ for rofs in ${unionro}
+ do
+ unionmountopts="${unionmountopts}:${rofs}=${ro_opt}"
+ done
fi
( sysctl -w fs.file-max=391524 ; ulimit -HSn 16384
unionfs-fuse ${unionmountopts} "${unionmountpoint}" ) && \
@@ -1240,21 +1240,27 @@ do_union ()
;;
overlayfs)
- # XXX: can unionro2 be used? (overlayfs only handles two dirs, but perhaps they can be chained?)
- # XXX: and can unionro1 be optional? i.e. can overlayfs skip lowerdir?
- unionmountopts="-o noatime,lowerdir=${unionro1},upperdir=${unionrw}"
+ # XXX: can multiple unionro be used? (overlayfs only handles two dirs, but perhaps they can be chained?)
+ # XXX: and can unionro be optional? i.e. can overlayfs skip lowerdir?
+ if echo ${unionro} | grep -q " "
+ then
+ panic "Multiple lower filesystems are currently not supported with overlayfs (unionro = ${unionro})."
+ elif [ -z "${unionro}" ]
+ then
+ panic "Overlayfs needs at least one lower filesystem (read-only branch)."
+ fi
+ unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}"
mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
;;
*)
unionmountopts="-o noatime,${noxino_opt},dirs=${unionrw}=${rw_opt}"
- if [ -n "${unionro1}" ]
- then
- unionmountopts="${unionmountopts}:${unionro1}=${ro_opt}"
- fi
- if [ -n "${unionro2}" ]
+ if [ -n "${unionro}" ]
then
- unionmountopts="${unionmountopts}:${unionro2}=${ro_opt}"
+ for rofs in ${unionro}
+ do
+ unionmountopts="${unionmountopts}:${rofs}=${ro_opt}"
+ done
fi
mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}"
;;
@@ -1491,15 +1497,13 @@ activate_custom_mounts ()
do
if [ -n "${rootmnt}" ]
then
- rootfs_dest_backing="${d}/$(echo ${dest} | sed -e "s|${rootmnt}||")"
+ fs="${d}/$(echo ${dest} | sed -e "s|${rootmnt}||")"
else
- rootfs_dest_backing="${d}/${dest}"
+ fs="${d}/${dest}"
fi
- if [ -d "${rootfs_dest_backing}" ]
+ if [ -d "${fs}" ]
then
- break
- else
- rootfs_dest_backing=""
+ rootfs_dest_backing="${rootfs_dest_backing} ${fs}"
fi
done
fi
--
1.7.10.4
--- End Message ---
--- Begin Message ---
Source: live-boot
Source-Version: 3.0.0-1
We believe that the bug you reported is fixed in the latest version of
live-boot, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 696494@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-boot package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Tue, 12 Feb 2013 08:23:17 +0100
Source: live-boot
Binary: live-boot live-boot-doc live-boot-initramfs-tools
Architecture: source all
Version: 3.0.0-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description:
live-boot - Live System Boot Scripts
live-boot-doc - Live System Boot Scripts (documentation)
live-boot-initramfs-tools - Live System Boot Scripts (initramfs-tools backend)
Closes: 696494 696495 697873
Changes:
live-boot (3.0.0-1) unstable; urgency=low
.
[ Daniel Baumann ]
* Updating manpage year handling for 2013.
.
[ Richard Nelson ]
* Replace noprompt with noeject on manpage.
.
[ Daniel Baumann ]
* Updating noeject description in manpage.
.
[ chals ]
* Updating Spanish translation in respect to noeject.
.
[ Daniel Baumann ]
* Dropping dpkg compression level.
* Calling df with -P to avoid line wraps with overly long mountpoints.
.
[ Tails developers ]
* Improving test for /etc/fstab.d support by testing for its existence
instead of /run's one.
.
[ Daniel Baumann ]
* Removing some dead code in netbase parts.
.
[ Gaudenz Steinlin ]
* Fixing support for multiple squashfs images (Closes: #696494).
* Fixing mounting of rootfs, cow and medium filesystems (Closes:
#696495).
.
[ Daniel Baumann ]
* Correcting persistence-label handling fwrt/ legacy live-boot 2.x
support, thanks to Mike Gach <gach.mqt@gmail.com> (Closes: #697873).
Checksums-Sha1:
4b84d9ee3ccd6766f6e473bd09649925680ed44e 1369 live-boot_3.0.0-1.dsc
18204a278c603005415dbcc93701421bc3deff74 58680 live-boot_3.0.0.orig.tar.xz
b6f4422eaad02d9c41e265c9063466f5f8fb3d23 22336 live-boot_3.0.0-1.debian.tar.xz
e9ff4053da5b1aba67a0f1d4e2705ea38912537f 48746 live-boot_3.0.0-1_all.deb
372943dfba16ce1c99537d4816d1ae3b6eabf915 51726 live-boot-doc_3.0.0-1_all.deb
f43e6e59f93a7e8d8b86b438fa0cb3c865f7a952 26280 live-boot-initramfs-tools_3.0.0-1_all.deb
Checksums-Sha256:
3fdb8f02bb3e5cce457af2e973922a1e9be6968c05f50d2e530c8d58088fd35b 1369 live-boot_3.0.0-1.dsc
277b999f4fcd1511532479e21e8facbce2c288e1f3ed80bcf2cb54cec66615f0 58680 live-boot_3.0.0.orig.tar.xz
868afb2615e4cfc471ec0ba574d963705d3a81ed0bbdf5fb5791416c70953db0 22336 live-boot_3.0.0-1.debian.tar.xz
df253693957a1769dc48e477b745170d40999f3ce24261481d384778289a8387 48746 live-boot_3.0.0-1_all.deb
58ee0163efe688a065392b1f6214f1359a48754325efc18b6d31a3433c4e05c0 51726 live-boot-doc_3.0.0-1_all.deb
ca23c361bb08c886565c1daa3da4aac8f1f759bb7f6b828668b84a17b95be6fb 26280 live-boot-initramfs-tools_3.0.0-1_all.deb
Files:
61882150301dfe1137200d96d731de00 1369 misc optional live-boot_3.0.0-1.dsc
a6859198d0782ca9c968b2f210eb9212 58680 misc optional live-boot_3.0.0.orig.tar.xz
8fd7a18ad8e7c8ec5d80d4c03a98bc7d 22336 misc optional live-boot_3.0.0-1.debian.tar.xz
9c1d72dcc5279a2a368ab0d84e40373e 48746 misc optional live-boot_3.0.0-1_all.deb
13623fe33a1b96e291c8c244fa4a05bf 51726 doc optional live-boot-doc_3.0.0-1_all.deb
dd630cd123e12348800670f97326c46d 26280 misc optional live-boot-initramfs-tools_3.0.0-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlEZ7tkACgkQ+C5cwEsrK566zwCfY/CoOcNqpe7n9TF3nxXwS6bc
qaEAoI3TfVvhGfo4wP47dr7Ykd32TaHA
=x8xo
-----END PGP SIGNATURE-----
--- End Message ---