-root.tar.xz and the .squashfs.ubuntu/cosmic
parent
2e915c1eee
commit
605b97de97
@ -0,0 +1,25 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
teardown_mountpoint $rootfs_dir
|
||||||
|
|
||||||
|
dpkg-query --admindir=$rootfs_dir/var/lib/dpkg -W > $rootfs_dir.manifest
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
# This is the directory created by 031-0-create-root-dir.binary
|
||||||
|
rootfs_dir=rootfs.dir
|
||||||
|
|
||||||
|
cp $rootfs_dir.manifest livecd.ubuntu-cpc.rootfs.manifest
|
||||||
|
(cd "$rootfs_dir/" && tar -c *) | xz > "livecd.ubuntu-cpc.rootfs.tar.xz"
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
# vi: ts=4 noexpandtab
|
||||||
|
#
|
||||||
|
# Generate a squashfs root and manifest
|
||||||
|
|
||||||
|
case $IMAGE_TARGETS in
|
||||||
|
""|*squashfs*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping squashfs build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -n "$SUBARCH" ]; then
|
||||||
|
echo "Skipping rootfs build for subarch flavor build"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This is the directory created by 031-0-create-root-dir.binary
|
||||||
|
rootfs_dir=rootfs.dir
|
||||||
|
|
||||||
|
squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"
|
||||||
|
|
||||||
|
cp $rootfs_dir.manifest "${squashfs_f}.manifest"
|
||||||
|
|
||||||
|
(cd "$rootfs_dir" &&
|
||||||
|
mksquashfs . ${squashfs_f} \
|
||||||
|
-no-progress -xattrs -comp xz )
|
@ -1,29 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash -ex
|
|
||||||
# vi: ts=4 noexpandtab
|
|
||||||
#
|
|
||||||
# Generate a squashfs root and manifest
|
|
||||||
|
|
||||||
case $IMAGE_TARGETS in
|
|
||||||
""|*squashfs*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Skipping squashfs build"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "$SUBARCH" ]; then
|
|
||||||
echo "Skipping rootfs build for subarch flavor build"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
. config/functions
|
|
||||||
|
|
||||||
mkdir binary/boot/squashfs.dir
|
|
||||||
cp -a chroot/* binary/boot/squashfs.dir
|
|
||||||
|
|
||||||
setup_mountpoint binary/boot/squashfs.dir
|
|
||||||
|
|
||||||
chroot binary/boot/squashfs.dir dpkg-divert --local --rename /usr/sbin/grub-probe
|
|
||||||
chroot binary/boot/squashfs.dir touch /usr/sbin/grub-probe
|
|
||||||
chroot binary/boot/squashfs.dir chmod +x /usr/sbin/grub-probe
|
|
||||||
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^linux-.*' 'linux-base+'
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get --purge remove --assume-yes '^grub-.*'
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot binary/boot/squashfs.dir apt-get autoremove --purge --assume-yes
|
|
||||||
rm -rf binary/boot/squashfs.dir/boot/grub
|
|
||||||
chroot binary/boot/squashfs.dir mkdir -p /lib/modules
|
|
||||||
|
|
||||||
chroot binary/boot/squashfs.dir rm /usr/sbin/grub-probe
|
|
||||||
chroot binary/boot/squashfs.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
|
|
||||||
|
|
||||||
teardown_mountpoint binary/boot/squashfs.dir
|
|
||||||
|
|
||||||
squashfs_f="${PWD}/livecd.ubuntu-cpc.squashfs"
|
|
||||||
squashfs_f_manifest="${squashfs_f}.manifest"
|
|
||||||
|
|
||||||
dpkg-query --admindir=binary/boot/squashfs.dir/var/lib/dpkg -W > ${squashfs_f_manifest}
|
|
||||||
|
|
||||||
(cd "binary/boot/squashfs.dir/" &&
|
|
||||||
mksquashfs . ${squashfs_f} \
|
|
||||||
-no-progress -xattrs -comp xz )
|
|
Loading…
Reference in new issue