Merge lp:~tribaal/livecd-rootfs/xenial-proposed-minimized-round-two into lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed

Proposed by Chris Glass
Status: Merged
Merged at revision: 1443
Proposed branch: lp:~tribaal/livecd-rootfs/xenial-proposed-minimized-round-two
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/xenial-proposed
Diff against target: 82 lines (+44/-0)
4 files modified
debian/changelog (+18/-0)
live-build/auto/build (+4/-0)
live-build/auto/config (+1/-0)
live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot (+21/-0)
To merge this branch: bzr merge lp:~tribaal/livecd-rootfs/xenial-proposed-minimized-round-two
Reviewer Review Type Date Requested Status
Steve Langasek Needs Fixing
Review via email: mp+333554@code.launchpad.net

Description of the change

This branch is a backport of changes made in https://code.launchpad.net/~vorlon/livecd-rootfs/minimize-round-two/+merge/332529 to Xenial.

It further reduces the size of "minimized" (the ubuntu-cpc subproject) images, by removing some unneeded packages and files.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Just one change requested.

review: Needs Fixing
1445. By Chris Glass

* Remove apt, debconf, dpkg cruft files from /var/cache and /var/lib in
  all our livefses.
* Pass --cache false to lb config; otherwise we copy around caches of
  .debs that are never used properly, and which prevent us from emptying
  /var/cache/apt in images.
* When building minimized cloud images, remove various packages that we
  don't want installed by default. Some are tools that aren't needed for
  non-interactive use; some are libraries whose reverse-dependencies
  will have already been removed; and one, open-vm-tools, should only be
  included in images that are targeted to VMWare (which is not the case
  for any of the current minimal images), rather than being included
  directly in the cloud-image seed.

(expanded changelog)

Revision history for this message
Chris Glass (tribaal) wrote :

Changelog updated - this branch is ready for re-review.

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 2017-11-08 11:35:06 +0000
3+++ debian/changelog 2017-11-14 07:45:33 +0000
4@@ -1,3 +1,21 @@
5+livecd-rootfs (2.408.24) UNRELEASED; urgency=medium
6+
7+ * Backport "minimized round 2" changes from trunk to Xenial (LP: #1731492)
8+ * Remove apt, debconf, dpkg cruft files from /var/cache and /var/lib in
9+ all our livefses.
10+ * Pass --cache false to lb config; otherwise we copy around caches of
11+ .debs that are never used properly, and which prevent us from emptying
12+ /var/cache/apt in images.
13+ * When building minimized cloud images, remove various packages that we
14+ don't want installed by default. Some are tools that aren't needed for
15+ non-interactive use; some are libraries whose reverse-dependencies
16+ will have already been removed; and one, open-vm-tools, should only be
17+ included in images that are targeted to VMWare (which is not the case
18+ for any of the current minimal images), rather than being included
19+ directly in the cloud-image seed.
20+
21+ -- Christopher Glass (Ubuntu) <tribaal@ubuntu.com> Fri, 10 Nov 2017 18:39:52 +0100
22+
23 livecd-rootfs (2.408.23) UNRELEASED; urgency=medium
24
25 [ Gary Wang ]
26
27=== modified file 'live-build/auto/build'
28--- live-build/auto/build 2017-10-22 03:53:00 +0000
29+++ live-build/auto/build 2017-11-14 07:45:33 +0000
30@@ -166,6 +166,10 @@
31 rm -f chroot/boot/initrd.img-*
32 fi
33
34+ # remove crufty files that shouldn't be left in an image
35+ rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old
36+ Chroot chroot apt clean
37+
38 if [ -f config/oem-config-preinstalled ]; then
39
40 # This is cargo-culted almost verbatim (with some syntax changes for
41
42=== modified file 'live-build/auto/config'
43--- live-build/auto/config 2017-11-08 11:35:06 +0000
44+++ live-build/auto/config 2017-11-14 07:45:33 +0000
45@@ -676,6 +676,7 @@
46 --initsystem none \
47 --bootloader "$BOOTLOADER" \
48 --initramfs-compression lzma \
49+ --cache false \
50 ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \
51 $OPTS \
52 "$@"
53
54=== modified file 'live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot'
55--- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-10-21 06:10:26 +0000
56+++ live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-11-14 07:45:33 +0000
57@@ -160,6 +160,27 @@
58 rm "${rootd}/boot/initrd.img"
59 fi
60
61+if [ "${SUBPROJECT:-}" = minimized ]; then
62+ # Remove various packages that we don't want in the minimized images.
63+ # Some of these are tools that don't make sense by default
64+ # non-interactively; some are libraries whose reverse-dependencies
65+ # will have already been removed; open-vm-tools, it's a bug that this
66+ # is in the common cloud seed because this should only be included
67+ # in VMWare guest images, and we know none of the minimized images
68+ # are targeted at VMWare.
69+ _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
70+ apt-mark auto '^lib.*' '^python*' vim-runtime 2>/dev/null
71+ # FIXME: iso-codes is a dep of software-properties and shouldn't be
72+ _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
73+ apt-get -y autoremove --purge iso-codes xauth pastebinit \
74+ plymouth open-vm-tools git shared-mime-info vim vim-common \
75+ console-setup ncurses-term tmux screen policykit-1 \
76+ xdg-user-dirs less run-one apport-symptoms \
77+ ubuntu-cloudimage-keyring file
78+
79+ _xchroot "${rootd}" apt clean
80+fi
81+
82 #### END COMMON ARCH FUNCTIONS
83
84

Subscribers

People subscribed via source and target branches