Merge lp:~oddbloke/livecd-rootfs/trunk into lp:livecd-rootfs

Proposed by Dan Watkins
Status: Merged
Merged at revision: 1681
Proposed branch: lp:~oddbloke/livecd-rootfs/trunk
Merge into: lp:livecd-rootfs
Diff against target: 124 lines (+47/-48)
4 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 (+5/-19)
live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary (+9/-29)
To merge this branch: bzr merge lp:~oddbloke/livecd-rootfs/trunk
Reviewer Review Type Date Requested Status
Adam Conrad (community) Approve
Robert C Jennings (community) Approve
Philip Roche (community) Approve
Review via email: [email protected]
To post a comment you must log in.
Revision history for this message
Philip Roche (philroche) :
review: Approve
Revision history for this message
Robert C Jennings (rcj) wrote :

+1

review: Approve
Revision history for this message
Adam Conrad (adconrad) wrote :

A few inline comments, but mostly +1ish. Respond with either code or words, and we're good to go.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Thanks for the review, those were all bits I missed. I have responded
with code.

Revision history for this message
Adam Conrad (adconrad) wrote :

LGTM, merging and uploading.

review: Approve
lp:~oddbloke/livecd-rootfs/trunk updated
1681. By Adam Conrad

ubuntu-cpc: Generate the root image contents once, and use it for both the
-root.tar.xz and the .squashfs.

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-06-07 00:34:19 +0000
3+++ debian/changelog 2018-06-07 23:26:01 +0000
4@@ -1,3 +1,10 @@
5+livecd-rootfs (2.532) cosmic; urgency=medium
6+
7+ * ubuntu-cpc: Generate the root image contents once, and use it for both the
8+ -root.tar.xz and the .squashfs.
9+
10+ -- Daniel Watkins <[email protected]> Thu, 07 Jun 2018 11:11:02 -0700
11+
12 livecd-rootfs (2.531) cosmic; urgency=medium
13
14 [ Daniel Watkins ]
15
16=== added file 'live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary'
17--- live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary 1970-01-01 00:00:00 +0000
18+++ live-build/ubuntu-cpc/hooks/031-0-create-root-dir.binary 2018-06-07 23:26:01 +0000
19@@ -0,0 +1,26 @@
20+#!/bin/bash -ex
21+# vi: ts=4 expandtab
22+#
23+# Generate the root directory/manifest for rootfs.tar.xz and squashfs
24+
25+if [ -n "$SUBARCH" ]; then
26+ echo "Skipping rootfs build for subarch flavor build"
27+ exit 0
28+fi
29+
30+. config/functions
31+
32+rootfs_dir=rootfs.dir
33+mkdir $rootfs_dir
34+cp -a chroot/* $rootfs_dir
35+
36+setup_mountpoint $rootfs_dir
37+
38+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
39+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^grub-.*'
40+env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
41+rm -rf $rootfs_dir/boot/grub
42+
43+teardown_mountpoint $rootfs_dir
44+
45+dpkg-query --admindir=$rootfs_dir/var/lib/dpkg -W > $rootfs_dir.manifest
46
47=== renamed file 'live-build/ubuntu-cpc/hooks/031-root-xz.binary' => 'live-build/ubuntu-cpc/hooks/031-1-root-xz.binary' (properties changed: -x to +x)
48--- live-build/ubuntu-cpc/hooks/031-root-xz.binary 2018-06-06 23:04:45 +0000
49+++ live-build/ubuntu-cpc/hooks/031-1-root-xz.binary 2018-06-07 23:26:01 +0000
50@@ -8,22 +8,8 @@
51 exit 0
52 fi
53
54-. config/functions
55-
56-tardir=filesystem.dir
57-mkdir $tardir
58-cp -a chroot/* $tardir
59-
60-setup_mountpoint $tardir
61-
62-env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
63-env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get --purge remove --assume-yes '^grub-.*'
64-env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get autoremove --purge --assume-yes
65-
66-teardown_mountpoint $tardir
67-
68-dpkg-query --admindir=$tardir/var/lib/dpkg -W > livecd.ubuntu-cpc.rootfs.manifest
69-
70-(cd "$tardir/" && tar -c *) | xz > "livecd.ubuntu-cpc.rootfs.tar.xz"
71-
72-rm -rf $tardir
73+# This is the directory created by 031-0-create-root-dir.binary
74+rootfs_dir=rootfs.dir
75+
76+cp $rootfs_dir.manifest livecd.ubuntu-cpc.rootfs.manifest
77+(cd $rootfs_dir/ && tar -c *) | xz > livecd.ubuntu-cpc.rootfs.tar.xz
78
79=== renamed file 'live-build/ubuntu-cpc/hooks/032-root-squashfs.binary' => 'live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary'
80--- live-build/ubuntu-cpc/hooks/032-root-squashfs.binary 2018-04-24 16:01:44 +0000
81+++ live-build/ubuntu-cpc/hooks/031-2-root-squashfs.binary 2018-06-07 23:26:01 +0000
82@@ -17,33 +17,13 @@
83 exit 0
84 fi
85
86-. config/functions
87-
88-mkdir binary/boot/squashfs.dir
89-cp -a chroot/* binary/boot/squashfs.dir
90-
91-setup_mountpoint binary/boot/squashfs.dir
92-
93-chroot binary/boot/squashfs.dir dpkg-divert --local --rename /usr/sbin/grub-probe
94-chroot binary/boot/squashfs.dir touch /usr/sbin/grub-probe
95-chroot binary/boot/squashfs.dir chmod +x /usr/sbin/grub-probe
96-
97-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
98-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^grub-.*'
99-env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get autoremove --purge --assume-yes
100-rm -rf binary/boot/squashfs.dir/boot/grub
101-chroot binary/boot/squashfs.dir mkdir -p /lib/modules
102-
103-chroot binary/boot/squashfs.dir rm /usr/sbin/grub-probe
104-chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
105-
106-teardown_mountpoint binary/boot/squashfs.dir
107-
108-squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"
109-squashfs_f_manifest="${squashfs_f}.manifest"
110-
111-dpkg-query --admindir=binary/boot/squashfs.dir/var/lib/dpkg -W > ${squashfs_f_manifest}
112-
113-(cd "binary/boot/squashfs.dir/" &&
114- mksquashfs . ${squashfs_f} \
115+# This is the directory created by 031-0-create-root-dir.binary
116+rootfs_dir=rootfs.dir
117+
118+squashfs_f="$PWD/livecd.ubuntu-cpc.squashfs"
119+
120+cp $rootfs_dir.manifest $squashfs_f.manifest
121+
122+(cd $rootfs_dir &&
123+ mksquashfs . $squashfs_f \
124 -no-progress -xattrs -comp xz )

Subscribers

People subscribed via source and target branches