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
=== modified file 'debian/changelog'
--- debian/changelog 2017-11-08 11:35:06 +0000
+++ debian/changelog 2017-11-14 07:45:33 +0000
@@ -1,3 +1,21 @@
1livecd-rootfs (2.408.24) UNRELEASED; urgency=medium
2
3 * Backport "minimized round 2" changes from trunk to Xenial (LP: #1731492)
4 * Remove apt, debconf, dpkg cruft files from /var/cache and /var/lib in
5 all our livefses.
6 * Pass --cache false to lb config; otherwise we copy around caches of
7 .debs that are never used properly, and which prevent us from emptying
8 /var/cache/apt in images.
9 * When building minimized cloud images, remove various packages that we
10 don't want installed by default. Some are tools that aren't needed for
11 non-interactive use; some are libraries whose reverse-dependencies
12 will have already been removed; and one, open-vm-tools, should only be
13 included in images that are targeted to VMWare (which is not the case
14 for any of the current minimal images), rather than being included
15 directly in the cloud-image seed.
16
17 -- Christopher Glass (Ubuntu) <tribaal@ubuntu.com> Fri, 10 Nov 2017 18:39:52 +0100
18
1livecd-rootfs (2.408.23) UNRELEASED; urgency=medium19livecd-rootfs (2.408.23) UNRELEASED; urgency=medium
220
3 [ Gary Wang ]21 [ Gary Wang ]
422
=== modified file 'live-build/auto/build'
--- live-build/auto/build 2017-10-22 03:53:00 +0000
+++ live-build/auto/build 2017-11-14 07:45:33 +0000
@@ -166,6 +166,10 @@
166 rm -f chroot/boot/initrd.img-*166 rm -f chroot/boot/initrd.img-*
167 fi167 fi
168168
169 # remove crufty files that shouldn't be left in an image
170 rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old
171 Chroot chroot apt clean
172
169 if [ -f config/oem-config-preinstalled ]; then173 if [ -f config/oem-config-preinstalled ]; then
170174
171# This is cargo-culted almost verbatim (with some syntax changes for175# This is cargo-culted almost verbatim (with some syntax changes for
172176
=== modified file 'live-build/auto/config'
--- live-build/auto/config 2017-11-08 11:35:06 +0000
+++ live-build/auto/config 2017-11-14 07:45:33 +0000
@@ -676,6 +676,7 @@
676 --initsystem none \676 --initsystem none \
677 --bootloader "$BOOTLOADER" \677 --bootloader "$BOOTLOADER" \
678 --initramfs-compression lzma \678 --initramfs-compression lzma \
679 --cache false \
679 ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \680 ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \
680 $OPTS \681 $OPTS \
681 "$@"682 "$@"
682683
=== modified file 'live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot'
--- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-10-21 06:10:26 +0000
+++ live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2017-11-14 07:45:33 +0000
@@ -160,6 +160,27 @@
160 rm "${rootd}/boot/initrd.img"160 rm "${rootd}/boot/initrd.img"
161fi161fi
162162
163if [ "${SUBPROJECT:-}" = minimized ]; then
164 # Remove various packages that we don't want in the minimized images.
165 # Some of these are tools that don't make sense by default
166 # non-interactively; some are libraries whose reverse-dependencies
167 # will have already been removed; open-vm-tools, it's a bug that this
168 # is in the common cloud seed because this should only be included
169 # in VMWare guest images, and we know none of the minimized images
170 # are targeted at VMWare.
171 _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
172 apt-mark auto '^lib.*' '^python*' vim-runtime 2>/dev/null
173 # FIXME: iso-codes is a dep of software-properties and shouldn't be
174 _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \
175 apt-get -y autoremove --purge iso-codes xauth pastebinit \
176 plymouth open-vm-tools git shared-mime-info vim vim-common \
177 console-setup ncurses-term tmux screen policykit-1 \
178 xdg-user-dirs less run-one apport-symptoms \
179 ubuntu-cloudimage-keyring file
180
181 _xchroot "${rootd}" apt clean
182fi
183
163#### END COMMON ARCH FUNCTIONS184#### END COMMON ARCH FUNCTIONS
164185
165186

Subscribers

People subscribed via source and target branches