livecd-rootfs/live-build/ubuntu-cpc/hooks/030-root-tarball.binary
Steve Langasek 803cf10633 Import patches-unapplied version 2.408.17 to ubuntu/xenial-proposed
Imported using git-ubuntu import.

Changelog parent: d980e7008da283668653a90e6ee574b05dc19d74

New changelog entries:
  [ Robert C Jennings ]
  * live-build/ubuntu-cpc/functions: Add a function, teardown_mountpoint,
    to reverse the work done in setup_mountpoint.  Lack of this function
    has forced users of setup_mountpoint to implement this separately
    and the implementations have diverged. (LP: #1716992)
  * live-build/ubuntu-cpc/functions: Remove umount_settle function.
    The was only used where teardown_mountpoint was lacking.
2017-09-13 19:48:39 +00:00

28 lines
1.0 KiB
Bash
Executable File

#!/bin/bash -ex
if [ -n "$SUBARCH" ]; then
echo "Skipping rootfs build for subarch flavor build"
exit 0
fi
. config/functions
mkdir binary/boot/filesystem.dir
cp -a chroot/* binary/boot/filesystem.dir
setup_mountpoint binary/boot/filesystem.dir
chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir chmod +x /usr/sbin/grub-probe
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get --purge remove --assume-yes '^grub-.*'
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/filesystem.dir apt-get autoremove --purge --assume-yes
chroot binary/boot/filesystem.dir mkdir /lib/modules
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
teardown_mountpoint binary/boot/filesystem.dir