Merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-yakkety into lp:~ubuntu-core-dev/livecd-rootfs/yakkety-proposed

Proposed by Balint Reczey
Status: Merged
Merged at revision: 1451
Proposed branch: lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-yakkety
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/yakkety-proposed
Diff against target: 275 lines (+140/-10)
12 files modified
debian/changelog (+17/-0)
debian/tests/control (+3/-0)
debian/tests/default-bootstraps (+97/-0)
live-build/ubuntu-cpc/functions (+14/-1)
live-build/ubuntu-cpc/hooks/032-disk-image.binary (+2/-2)
live-build/ubuntu-cpc/hooks/032-root-squashfs.binary (+1/-1)
live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary (+1/-1)
live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary (+1/-1)
live-build/ubuntu-cpc/hooks/040-qcow2-image.binary (+1/-1)
live-build/ubuntu-cpc/hooks/040-vmdk-image.binary (+1/-1)
live-build/ubuntu-cpc/hooks/042-vagrant.binary (+1/-1)
live-build/ubuntu-cpc/hooks/999-extras.binary (+1/-1)
To merge this branch: bzr merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-yakkety
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+323933@code.launchpad.net
To post a comment you must log in.
1456. By Balint Reczey

Update changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-17 18:47:25 +0000
+++ debian/changelog 2017-05-12 20:07:00 +0000
@@ -1,3 +1,20 @@
1livecd-rootfs (2.435.3) UNRELEASED; urgency=medium
2
3 [ Balint Reczey ]
4 * Source ubuntu-cpc functions from the right place
5 * Use all config hooks from the proper place, not from /build/
6 * Add basic but configurable autopkgtest (LP: #1690440)
7 * sync before calling kpartx to let writing to loop devices finish
8
9 [ Steve Langasek ]
10 * Mark autopkgtests isolation-machine since debootstrap won't work in a container.
11 * Resurrect Balint's fix from
12 lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix to wrap kpartx
13 and trap spurious errors, since the problem is still being seen
14 intermittently on i386 despite us calling sync before kpartx. (LP: #1684090)
15
16 -- Balint Reczey <balint.reczey@canonical.com> Thu, 11 May 2017 16:18:20 +0200
17
1livecd-rootfs (2.435.2) yakkety; urgency=medium18livecd-rootfs (2.435.2) yakkety; urgency=medium
219
3 [ Chris Glass ]20 [ Chris Glass ]
421
=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control 1970-01-01 00:00:00 +0000
+++ debian/tests/control 2017-05-12 20:07:00 +0000
@@ -0,0 +1,3 @@
1Tests: default-bootstraps
2Depends: @, lsb-release
3Restrictions: needs-root isolation-machine
04
=== added file 'debian/tests/default-bootstraps'
--- debian/tests/default-bootstraps 1970-01-01 00:00:00 +0000
+++ debian/tests/default-bootstraps 2017-05-12 20:07:00 +0000
@@ -0,0 +1,97 @@
1#!/bin/sh
2# autopkgtest check: Build default rootfs for all supported project:subproject pairs
3# (C) 2017 Canonical Ltd.
4# Author: Balint Reczey <balint.reczey@canonical.com>
5
6set -e
7
8if [ -z "$SUITE"]; then
9 SUITE=$(lsb_release -c -s)
10fi
11
12# Known project:subproject:template combinations.
13# Listed subprojects can be combined with other projects as well,
14# but this list gives reasonable coverage.
15ALL_TRIPLETS="
16 base::
17 edubuntu::
18 edubuntu-dvd::
19 kubuntu::
20 kubuntu-active::
21 kubuntu-dvd::
22 kubuntu-plasma5::
23 lubuntu::
24 lubuntu-next::
25 mythbuntu::
26 ubuntu::
27 ubuntu-base::
28 ubuntu-budgie::
29 ubuntu-budgie-desktop::
30 ubuntu-budgie-live::
31 ubuntu-core:system-image:ubuntu-core
32 ubuntu-cpc::ubuntu-cpc
33 ubuntu-desktop-next:system-image:ubuntu-desktop-next
34 ubuntu-desktop-next::ubuntu-desktop-next
35 ubuntu-dvd::
36 ubuntu-gnome::
37 ubuntukylin::
38 ubuntu-mate::
39 ubuntu-mate-core::
40 ubuntu-mate-desktop::
41 ubuntu-mate-live::
42 ubuntu-netbook::
43 ubuntu-server::
44 ubuntu-server:ubuntu-rtm:
45 ubuntu-server:ubuntu-rtm/foo:
46 ubuntu-server:wubi:
47 ubuntu-touch-custom::ubuntu-touch-custom
48 ubuntu-touch::ubuntu-touch
49 xubuntu::"
50
51if [ -z "$SELECTED_TRIPLETS" ]; then
52 SELECTED_TRIPLETS="
53 ubuntu-base::
54 ubuntu-cpc::ubuntu-cpc
55"
56fi
57
58live_build_rootfs() {
59 PROJECT=${1%%:*}
60 local SUBPROJECT_TMP=${1%:*}
61 SUBPROJECT=${SUBPROJECT_TMP#*:}
62 TEMPLATE=${1##*:}
63 ARCH=$(dpkg --print-architecture)
64 echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
65 cp -a /usr/share/livecd-rootfs/live-build/auto .
66 if [ -n "$TEMPLATE" ]; then
67 cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE .
68 fi
69 (env PROJECT=$PROJECT \
70 SUBPROJECT=$SUBPROJECT \
71 SUITE=$SUITE \
72 ARCH=$ARCH \
73 lb config
74 )
75 mkdir chroot
76 # this part needs root rights, but right now the whole script ran as root by autopkgtest
77 (env PROJECT=$PROJECT \
78 SUBPROJECT=$SUBPROJECT \
79 ARCH=$ARCH \
80 lb build
81 )
82 echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
83 du -sh *
84 echo ""
85}
86
87WORKDIR=$(mktemp -d)
88trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM
89cd $WORKDIR
90
91for i in $SELECTED_TRIPLETS; do
92 mkdir $i
93 (cd $i && live_build_rootfs $i)
94 # clean up after build to avoid filling the disk, needs root rights
95 rm -rf $i
96done
97
098
=== modified file 'live-build/ubuntu-cpc/functions'
--- live-build/ubuntu-cpc/functions 2017-03-17 18:46:27 +0000
+++ live-build/ubuntu-cpc/functions 2017-05-12 20:07:00 +0000
@@ -11,9 +11,22 @@
11apt-get -qqy install dosfstools gdisk11apt-get -qqy install dosfstools gdisk
1212
13clean_loops() {13clean_loops() {
14 local kpartx_ret
15 local kpartx_stdout
1416
15 if [ -n "${backing_img}" ]; then17 if [ -n "${backing_img}" ]; then
16 kpartx -v -d "${backing_img}"18 # sync before removing loop to avoid "Device or resource busy" errors
19 sync
20 kpartx_ret=""
21 kpartx_stdout=$(kpartx -v -d "${backing_img}") || kpartx_ret=$?
22 echo "$kpartx_stdout"
23 if [ -n "$kpartx_ret" ]; then
24 if echo "$kpartx_stdout" | grep -q "loop deleted: "; then
25 echo "Suppressing kpartx returning error (#860894)"
26 else
27 exit $kpartx_ret
28 fi
29 fi
17 unset backing_img30 unset backing_img
18 fi31 fi
1932
2033
=== modified file 'live-build/ubuntu-cpc/hooks/032-disk-image.binary'
--- live-build/ubuntu-cpc/hooks/032-disk-image.binary 2016-06-09 09:47:25 +0000
+++ live-build/ubuntu-cpc/hooks/032-disk-image.binary 2017-05-12 20:07:00 +0000
@@ -1,6 +1,6 @@
1#!/bin/bash -ex1#!/bin/bash -ex
22
3. /build/config/functions3. config/functions
44
5BOOTPART_START=5BOOTPART_START=
6BOOTPART_END=6BOOTPART_END=
@@ -92,7 +92,7 @@
92 # not the best place for this, but neither flash-kernel nor92 # not the best place for this, but neither flash-kernel nor
93 # u-boot have provisions for installing u-boot via maintainer93 # u-boot have provisions for installing u-boot via maintainer
94 # script94 # script
95 /build/config/hooks/raspi2/mkknlimg --dtok \95 config/hooks/raspi2/mkknlimg --dtok \
96 mountpoint/usr/lib/u-boot/rpi_2/u-boot.bin \96 mountpoint/usr/lib/u-boot/rpi_2/u-boot.bin \
97 mountpoint/boot/firmware/uboot.bin97 mountpoint/boot/firmware/uboot.bin
98 ;;98 ;;
9999
=== modified file 'live-build/ubuntu-cpc/hooks/032-root-squashfs.binary'
--- live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2016-06-09 09:47:25 +0000
+++ live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2017-05-12 20:07:00 +0000
@@ -8,7 +8,7 @@
8 exit 08 exit 0
9fi9fi
1010
11. /build/config/functions11. config/functions
1212
13mkdir binary/boot/squashfs.dir13mkdir binary/boot/squashfs.dir
14cp -a chroot/* binary/boot/squashfs.dir14cp -a chroot/* binary/boot/squashfs.dir
1515
=== modified file 'live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary'
--- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-03-17 18:46:27 +0000
+++ live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary 2017-05-12 20:07:00 +0000
@@ -9,7 +9,7 @@
9 ;;9 ;;
10esac10esac
1111
12. /build/config/functions12. config/functions
1313
14apt-get -qqy install dosfstools gdisk14apt-get -qqy install dosfstools gdisk
1515
1616
=== modified file 'live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary'
--- live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2017-03-17 18:46:27 +0000
+++ live-build/ubuntu-cpc/hooks/034-disk-image-ppc64el.binary 2017-05-12 20:07:00 +0000
@@ -7,7 +7,7 @@
7 ;;7 ;;
8esac8esac
99
10. /build/config/functions10. config/functions
1111
12create_partitions() {12create_partitions() {
13 disk_image="$1"13 disk_image="$1"
1414
=== modified file 'live-build/ubuntu-cpc/hooks/040-qcow2-image.binary'
--- live-build/ubuntu-cpc/hooks/040-qcow2-image.binary 2016-06-09 09:47:25 +0000
+++ live-build/ubuntu-cpc/hooks/040-qcow2-image.binary 2017-05-12 20:07:00 +0000
@@ -12,7 +12,7 @@
1212
13apt-get install -qqy qemu-utils13apt-get install -qqy qemu-utils
1414
15. /build/config/functions15. config/functions
1616
17if [ -f binary/boot/disk-uefi.ext4 ]; then17if [ -f binary/boot/disk-uefi.ext4 ]; then
18 convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img18 convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img
1919
=== modified file 'live-build/ubuntu-cpc/hooks/040-vmdk-image.binary'
--- live-build/ubuntu-cpc/hooks/040-vmdk-image.binary 2016-06-09 09:47:25 +0000
+++ live-build/ubuntu-cpc/hooks/040-vmdk-image.binary 2017-05-12 20:07:00 +0000
@@ -9,7 +9,7 @@
9 exit 0;;9 exit 0;;
10esac10esac
1111
12. /build/config/functions12. config/functions
1313
14if [ -e binary/boot/disk-uefi.ext4 ]; then14if [ -e binary/boot/disk-uefi.ext4 ]; then
15 create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.vmdk15 create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.vmdk
1616
=== modified file 'live-build/ubuntu-cpc/hooks/042-vagrant.binary'
--- live-build/ubuntu-cpc/hooks/042-vagrant.binary 2017-03-17 18:45:42 +0000
+++ live-build/ubuntu-cpc/hooks/042-vagrant.binary 2017-05-12 20:07:00 +0000
@@ -35,7 +35,7 @@
35 exit 0;;35 exit 0;;
36esac36esac
3737
38. /build/config/functions38. config/functions
3939
40# Virtualbox is needed for making a small VMDK40# Virtualbox is needed for making a small VMDK
41apt-get -qqy install genisoimage qemu-utils41apt-get -qqy install genisoimage qemu-utils
4242
=== modified file 'live-build/ubuntu-cpc/hooks/999-extras.binary'
--- live-build/ubuntu-cpc/hooks/999-extras.binary 2016-01-28 10:07:33 +0000
+++ live-build/ubuntu-cpc/hooks/999-extras.binary 2017-05-12 20:07:00 +0000
@@ -9,7 +9,7 @@
9fi9fi
1010
11# Export the common functions to the extras11# Export the common functions to the extras
12. /build/config/functions12. config/functions
1313
14# Cleaner execution14# Cleaner execution
15/bin/run-parts --regex ".*\.binary" "${extra_d}"15/bin/run-parts --regex ".*\.binary" "${extra_d}"

Subscribers

People subscribed via source and target branches