Merge lp:~oddbloke/livecd-rootfs/bionic into lp:~ubuntu-core-dev/livecd-rootfs/bionic-proposed

Proposed by Dan Watkins
Status: Merged
Merged at revision: 1678
Proposed branch: lp:~oddbloke/livecd-rootfs/bionic
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/bionic-proposed
Diff against target: 157 lines (+77/-49)
5 files modified
debian/changelog (+7/-0)
live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary (+26/-0)
live-build/ubuntu-cpc/hooks/031-1-root-xz.binary (+15/-0)
live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary (+29/-0)
live-build/ubuntu-cpc/hooks/032-root-squashfs.binary (+0/-49)
To merge this branch: bzr merge lp:~oddbloke/livecd-rootfs/bionic
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+352522@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-08-02 04:00:39 +0000
3+++ debian/changelog 2018-08-06 20:28:06 +0000
4@@ -1,7 +1,14 @@
5 livecd-rootfs (2.525.6) UNRELEASED; urgency=medium
6
7+ [ Steve Langasek ]
8 * generate all tar files with --xattrs. LP: #1302192.
9
10+ [ Daniel Watkins ]
11+ * ubuntu-cpc: Reintroduce the -root.tar.xz artifact (LP: #1585233).
12+ * ubuntu-cpc: Generate the root image contents once, and use it for both the
13+ -root.tar.xz and the .squashfs.
14+ * ubuntu-cpc: Generate -root.tar.xz with --xattrs.
15+
16 -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 01 Aug 2018 20:57:14 -0700
17
18 livecd-rootfs (2.525.5) bionic; urgency=medium
19
20=== added file 'live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary'
21--- live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary 1970-01-01 00:00:00 +0000
22+++ live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary 2018-08-06 20:28:06 +0000
23@@ -0,0 +1,26 @@
24+#!/bin/bash -ex
25+# vi: ts=4 expandtab
26+#
27+# Generate the root directory/manifest for rootfs.tar.xz and squashfs
28+
29+if [ -n "$SUBARCH" ]; then
30+ echo "Skipping rootfs build for subarch flavor build"
31+ exit 0
32+fi
33+
34+. config/functions
35+
36+rootfs_dir=rootfs.dir
37+mkdir $rootfs_dir
38+cp -a chroot/* $rootfs_dir
39+
40+setup_mountpoint $rootfs_dir
41+
42+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
43+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^grub-.*'
44+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
45+rm -rf $rootfs_dir/boot/grub
46+
47+teardown_mountpoint $rootfs_dir
48+
49+dpkg-query --admindir=$rootfs_dir/var/lib/dpkg -W > $rootfs_dir.manifest
50
51=== added file 'live-build/ubuntu-cpc/hooks/031-1-root-xz.binary'
52--- live-build/ubuntu-cpc/hooks/031-1-root-xz.binary 1970-01-01 00:00:00 +0000
53+++ live-build/ubuntu-cpc/hooks/031-1-root-xz.binary 2018-08-06 20:28:06 +0000
54@@ -0,0 +1,15 @@
55+#!/bin/bash -ex
56+# vi: ts=4 expandtab
57+#
58+# Generate the rootfs.tar.xz and manifest
59+
60+if [ -n "$SUBARCH" ]; then
61+ echo "Skipping rootfs build for subarch flavor build"
62+ exit 0
63+fi
64+
65+# This is the directory created by 031-0-create-root-dir.binary
66+rootfs_dir=rootfs.dir
67+
68+cp $rootfs_dir.manifest livecd.ubuntu-cpc.rootfs.manifest
69+(cd $rootfs_dir/ && tar -c --xattrs *) | xz > livecd.ubuntu-cpc.rootfs.tar.xz
70
71=== added file 'live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary'
72--- live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary 1970-01-01 00:00:00 +0000
73+++ live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary 2018-08-06 20:28:06 +0000
74@@ -0,0 +1,29 @@
75+#!/bin/bash -ex
76+# vi: ts=4 noexpandtab
77+#
78+# Generate a squashfs root and manifest
79+
80+case $IMAGE_TARGETS in
81+ ""|*squashfs*)
82+ ;;
83+ *)
84+ echo "Skipping squashfs build"
85+ exit 0
86+ ;;
87+esac
88+
89+if [ -n "$SUBARCH" ]; then
90+ echo "Skipping rootfs build for subarch flavor build"
91+ exit 0
92+fi
93+
94+# This is the directory created by 031-0-create-root-dir.binary
95+rootfs_dir=rootfs.dir
96+
97+squashfs_f="$PWD/livecd.ubuntu-cpc.squashfs"
98+
99+cp $rootfs_dir.manifest $squashfs_f.manifest
100+
101+(cd $rootfs_dir &&
102+ mksquashfs . $squashfs_f \
103+ -no-progress -xattrs -comp xz )
104
105=== removed file 'live-build/ubuntu-cpc/hooks/032-root-squashfs.binary'
106--- live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2018-04-24 16:01:44 +0000
107+++ live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 1970-01-01 00:00:00 +0000
108@@ -1,49 +0,0 @@
109-#!/bin/bash -ex
110-# vi: ts=4 noexpandtab
111-#
112-# Generate a squashfs root and manifest
113-
114-case $IMAGE_TARGETS in
115- ""|*squashfs*)
116- ;;
117- *)
118- echo "Skipping squashfs build"
119- exit 0
120- ;;
121-esac
122-
123-if [ -n "$SUBARCH" ]; then
124- echo "Skipping rootfs build for subarch flavor build"
125- exit 0
126-fi
127-
128-. config/functions
129-
130-mkdir binary/boot/squashfs.dir
131-cp -a chroot/* binary/boot/squashfs.dir
132-
133-setup_mountpoint binary/boot/squashfs.dir
134-
135-chroot binary/boot/squashfs.dir dpkg-divert --local --rename /usr/sbin/grub-probe
136-chroot binary/boot/squashfs.dir touch /usr/sbin/grub-probe
137-chroot binary/boot/squashfs.dir chmod +x /usr/sbin/grub-probe
138-
139-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
140-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^grub-.*'
141-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get autoremove --purge --assume-yes
142-rm -rf binary/boot/squashfs.dir/boot/grub
143-chroot binary/boot/squashfs.dir mkdir -p /lib/modules
144-
145-chroot binary/boot/squashfs.dir rm /usr/sbin/grub-probe
146-chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
147-
148-teardown_mountpoint binary/boot/squashfs.dir
149-
150-squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"
151-squashfs_f_manifest="${squashfs_f}.manifest"
152-
153-dpkg-query --admindir=binary/boot/squashfs.dir/var/lib/dpkg -W > ${squashfs_f_manifest}
154-
155-(cd "binary/boot/squashfs.dir/" &&
156- mksquashfs . ${squashfs_f} \
157- -no-progress -xattrs -comp xz )

Subscribers

People subscribed via source and target branches