2018-06-07 14:23:18 -07:00
|
|
|
#!/bin/bash -ex
|
|
|
|
# vi: ts=4 expandtab
|
|
|
|
#
|
|
|
|
# Generate the root directory/manifest for rootfs.tar.xz and squashfs
|
|
|
|
|
|
|
|
if [ -n "$SUBARCH" ]; then
|
|
|
|
echo "Skipping rootfs build for subarch flavor build"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
. config/functions
|
|
|
|
|
|
|
|
rootfs_dir=rootfs.dir
|
|
|
|
mkdir $rootfs_dir
|
|
|
|
cp -a chroot/* $rootfs_dir
|
|
|
|
|
|
|
|
setup_mountpoint $rootfs_dir
|
|
|
|
|
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
|
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get --purge remove --assume-yes '^grub-.*'
|
|
|
|
env DEBIAN_FRONTEND=noninteractive chroot $rootfs_dir apt-get autoremove --purge --assume-yes
|
2018-06-07 16:24:59 -07:00
|
|
|
rm -rf $rootfs_dir/boot/grub
|
2018-06-07 14:23:18 -07:00
|
|
|
|
2018-09-20 13:37:25 +02:00
|
|
|
# Keep this as some derivatives mount a tempfs here
|
|
|
|
mkdir -p $rootfs_dir/lib/modules
|
|
|
|
|
2024-08-15 11:40:27 -04:00
|
|
|
create_manifest $rootfs_dir "livecd.ubuntu-cpc.rootfs.manifest" "livecd.ubuntu-cpc.rootfs.spdx" "cloud-image-rootfs-$ARCH-$(date +%Y%m%dT%H:%M:%S)"
|
2018-06-07 14:23:18 -07:00
|
|
|
|
2024-08-15 11:40:27 -04:00
|
|
|
teardown_mountpoint $rootfs_dir
|