resync with trunk

ubuntu/cosmic
Steve Langasek 7 years ago
commit 91f26e016c

18
debian/changelog vendored

@ -1,4 +1,4 @@
livecd-rootfs (2.529) UNRELEASED; urgency=medium
livecd-rootfs (2.531) UNRELEASED; urgency=medium
* live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary: don't manually
install grub-efi-amd64 since that forces off grub-pc, which is otherwise
@ -6,6 +6,22 @@ livecd-rootfs (2.529) UNRELEASED; urgency=medium
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 06 Jun 2018 15:39:27 -0700
livecd-rootfs (2.530) cosmic; urgency=medium
* ubuntu-cpc: Reintroduce the -root.tar.xz artifact (LP: #1585233).
-- Daniel Watkins <oddbloke@ubuntu.com> Wed, 06 Jun 2018 11:21:57 -0700
livecd-rootfs (2.529) cosmic; urgency=medium
* Improvements to the ubuntu-base (i.e. Docker) build:
- Customize the unminimize script to not install ubuntu-minimal.
- Divert /usr/bin/man to a script that points to the unminimize script.
- Remove apt lists that are currently removed downstream anyway.
(LP: #1699913)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 07 Jun 2018 05:59:12 +1200
livecd-rootfs (2.528) cosmic; urgency=medium
* Don't divert grub-probe; otherwise we're missing the filesystem UUIDs that

@ -115,7 +115,7 @@ echo ""
echo "Reinstallation of packages may fail due to changes to the system"
echo "configuration, the presence of third-party packages, or for other"
echo "reasons."
read -p "Would you like to continue? [y/N]" REPLY
read -p "Would you like to continue? [y/N] " REPLY
echo # (optional) move to a new line
if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ]
then
@ -153,6 +153,18 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp
fi
fi
if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then
# Remove diverted man binary
rm -f /usr/bin/man
dpkg-divert --quiet --remove --rename /usr/bin/man
fi
EOF
if [ "$PROJECT" != "ubuntu-base" ]; then
# ubuntu-minimal is too much for a docker container (it contains
# systemd and other things)
cat >> chroot/usr/local/sbin/unminimize <<'EOF'
if ! dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-minimal 2> /dev/null | grep -q '^installed$'; then
echo "Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system..."
DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal
@ -163,10 +175,12 @@ if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/
echo "Installing ubuntu-server recommends..."
DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common
fi
EOF
fi
cat >> chroot/usr/local/sbin/unminimize <<'EOF'
# unminimization succeeded, there is no need to mention it in motd
rm -f /etc/update-motd.d/60-unminimize
EOF
chmod +x chroot/usr/local/sbin/unminimize
@ -183,6 +197,18 @@ echo "To restore this content, you can run the 'unminimize' command."
EOF
chmod +x chroot/etc/update-motd.d/60-unminimize
Chroot chroot "dpkg-divert --quiet --add \
--divert /usr/bin/man.REAL --rename \
/usr/bin/man"
cat > chroot/usr/bin/man << EOF
#!/bin/sh
echo "This system has been minimized by removing packages and content that are"
echo "not required on a system that users do not log into."
echo ""
echo "To restore this content, including manpages, you can run the 'unminimize'"
echo "command. You will still need to ensure the 'man-db' package is installed."
EOF
chmod +x chroot/usr/bin/man
fi
Chroot chroot "dpkg-divert --quiet --add \
--divert /usr/sbin/update-initramfs.REAL --rename \
@ -232,6 +258,11 @@ EOF
# remove crufty files that shouldn't be left in an image
rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old
Chroot chroot apt clean
if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then
# Save even more size by removing apt lists (that are currently removed
# downstream anyway)
rm -rf chroot/var/lib/apt/lists/*
fi
if [ -f config/oem-config-preinstalled ]; then

@ -0,0 +1,29 @@
#!/bin/bash -ex
# vi: ts=4 expandtab
#
# Generate the rootfs.tar.xz and manifest
if [ -n "$SUBARCH" ]; then
echo "Skipping rootfs build for subarch flavor build"
exit 0
fi
. config/functions
tardir=filesystem.dir
mkdir $tardir
cp -a chroot/* $tardir
setup_mountpoint $tardir
env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get --purge remove --assume-yes '^grub-.*'
env DEBIAN_FRONTEND=noninteractive chroot $tardir apt-get autoremove --purge --assume-yes
teardown_mountpoint $tardir
dpkg-query --admindir=$tardir/var/lib/dpkg -W > livecd.ubuntu-cpc.rootfs.manifest
(cd "$tardir/" && tar -c *) | xz > "livecd.ubuntu-cpc.rootfs.tar.xz"
rm -rf $tardir
Loading…
Cancel
Save