Compare commits

...

9 Commits

Author SHA1 Message Date
Steve Langasek
0259fee5dc releasing package livecd-rootfs version 2.441.5 2017-09-11 12:00:02 -07:00
Steve Langasek
91bde498cb Fix suppression of kpartx error. LP: #1684090. 2017-09-11 11:59:56 -07:00
Steve Langasek
af5510caf9 Mount and unmount /dev recursively, to cope with setups where there are
interesting bind-mounts under /dev (e.g. loop devices bind-mounted by
LXD).  LP: #1716465.
2017-09-11 11:51:09 -07:00
Steve Langasek
0129af508b releasing package livecd-rootfs version 2.441.4 2017-06-06 23:09:32 -07:00
Steve Langasek
60971f3ed3 changelog cleanup for SRU 2017-06-06 23:08:28 -07:00
Steve Langasek
5a068b569d Merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-zesty 2017-05-12 11:58:54 -07:00
Robert C Jennings
8c0354d18c live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure.
(LP: #1687752)
2017-05-12 11:56:40 -07:00
Steve Langasek
1b95302ef7 Resurrect Balint's fix from
lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
and trap spurious errors, since the problem is still being seen
intermittently on i386 despite us calling sync before kpartx. (LP: #1684090)
2017-05-11 15:31:29 +02:00
Steve Langasek
8b141ef85a Mark autopkgtests isolation-machine since debootstrap won't work in a
container.
2017-05-08 21:04:47 +02:00
6 changed files with 51 additions and 14 deletions

31
debian/changelog vendored
View File

@ -1,3 +1,34 @@
livecd-rootfs (2.441.5) zesty; urgency=medium
[ Colin Watson ]
* Mount and unmount /dev recursively, to cope with setups where there are
interesting bind-mounts under /dev (e.g. loop devices bind-mounted by
LXD). LP: #1716465.
[ Balint Reczey ]
* Fix suppression of kpartx error. LP: #1684090.
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 11 Sep 2017 11:59:59 -0700
livecd-rootfs (2.441.4) zesty; urgency=medium
[ Balint Reczey ]
* wrap kpartx and trap spurious errors, to work around kpartx
unreliability as seen in autopkgtests. (LP: #1684090)
[ Steve Langasek ]
* Mark autopkgtests isolation-machine since debootstrap won't work in a
container.
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 06 Jun 2017 23:09:10 -0700
livecd-rootfs (2.441.3) zesty; urgency=medium
* live-build/ubuntu-cpc/hooks/999-extras.binary: Exit on first failure.
(LP: #1687752)
-- Robert C Jennings <robert.jennings@canonical.com> Tue, 09 May 2017 13:46:01 -0700
livecd-rootfs (2.441.2) zesty; urgency=medium livecd-rootfs (2.441.2) zesty; urgency=medium
* The ubuntu-server:live should use a casper-based initramfs to work * The ubuntu-server:live should use a casper-based initramfs to work

View File

@ -1,3 +1,3 @@
Tests: default-bootstraps Tests: default-bootstraps
Depends: @, lsb-release Depends: @, lsb-release
Restrictions: needs-root Restrictions: needs-root isolation-machine

View File

@ -11,9 +11,22 @@ backing_img=
apt-get -qqy install dosfstools gdisk apt-get -qqy install dosfstools gdisk
clean_loops() { clean_loops() {
local kpartx_ret
local kpartx_stdout
if [ -n "${backing_img}" ]; then if [ -n "${backing_img}" ]; then
kpartx -v -d "${backing_img}" # sync before removing loop to avoid "Device or resource busy" errors
sync
kpartx_ret=""
kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
echo "$kpartx_stdout"
if [ -n "$kpartx_ret" ]; then
if echo "$kpartx_stdout" | grep -q "loop deleted"; then
echo "Suppressing kpartx returning error (#860894)"
else
exit $kpartx_ret
fi
fi
unset backing_img unset backing_img
fi fi
@ -69,8 +82,7 @@ mount_image() {
setup_mountpoint() { setup_mountpoint() {
local mountpoint="$1" local mountpoint="$1"
mount --bind /dev "$mountpoint/dev" mount --rbind /dev "$mountpoint/dev"
mount devpts-live -t proc "$mountpoint/dev/pts"
mount proc-live -t proc "$mountpoint/proc" mount proc-live -t proc "$mountpoint/proc"
mount sysfs-live -t sysfs "$mountpoint/sys" mount sysfs-live -t sysfs "$mountpoint/sys"
mount -t tmpfs none "$mountpoint/tmp" mount -t tmpfs none "$mountpoint/tmp"
@ -131,11 +143,7 @@ umount_settle() {
umount_partition() { umount_partition() {
local mountpoint=${1} local mountpoint=${1}
mv resolv.conf.tmp "$mountpoint/etc/resolv.conf" mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"
for submnt in proc sys dev/pts dev tmp; umount -R $mountpoint
do
umount $mountpoint/$submnt
done
umount $mountpoint
udevadm settle udevadm settle
if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then if [ -n "${rootfs_dev_mapper}" -a -b "${rootfs_dev_mapper}" ]; then

View File

@ -39,8 +39,7 @@ chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/
mv resolv.conf.tmp "binary/boot/squashfs.dir/etc/resolv.conf" mv resolv.conf.tmp "binary/boot/squashfs.dir/etc/resolv.conf"
umount "binary/boot/squashfs.dir/proc" umount "binary/boot/squashfs.dir/proc"
umount "binary/boot/squashfs.dir/sys" umount "binary/boot/squashfs.dir/sys"
umount "binary/boot/squashfs.dir/dev/pts" umount -R "binary/boot/squashfs.dir/dev"
umount "binary/boot/squashfs.dir/dev"
umount "binary/boot/squashfs.dir/tmp" umount "binary/boot/squashfs.dir/tmp"
apt-get -qqy install squashfs-tools apt-get -qqy install squashfs-tools

View File

@ -13,4 +13,4 @@ export CLOUD_IMG_STR="$IMAGE_STR"
export FS_LABEL="cloudimg-rootfs" export FS_LABEL="cloudimg-rootfs"
# Cleaner execution # Cleaner execution
/bin/run-parts --regex ".*\.binary" "${extra_d}" /bin/run-parts --exit-on-error --regex ".*\.binary" "${extra_d}"

View File

@ -155,8 +155,7 @@ umount "$SQUASH_ROOT"
# Then we can start unmounting the "real" root: # Then we can start unmounting the "real" root:
umount "binary/boot/squashfs.dir/proc" umount "binary/boot/squashfs.dir/proc"
umount "binary/boot/squashfs.dir/sys" umount "binary/boot/squashfs.dir/sys"
umount "binary/boot/squashfs.dir/dev/pts" umount -R "binary/boot/squashfs.dir/dev"
umount "binary/boot/squashfs.dir/dev"
umount "binary/boot/squashfs.dir/tmp" umount "binary/boot/squashfs.dir/tmp"
apt-get -qqy install squashfs-tools apt-get -qqy install squashfs-tools