From d9de2701897608710ed97e206ee29f28af8cc82a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 12 Aug 2020 08:52:01 -0700 Subject: [PATCH] Revert "Remove fstab from squashfs images" This reverts commit f96e874ed12e7e080111d27aa14c4f97aa6bec87. --- live-build/auto/config | 1 - live-build/functions | 11 ----------- live-build/squashfs-exclude-files | 1 - .../ubuntu-cpc/hooks.d/base/root-squashfs.binary | 9 ++++----- .../ubuntu-server/hooks/030-root-squashfs.binary | 4 +++- .../ubuntu-server/hooks/032-installer-squashfs.binary | 4 +++- 6 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 live-build/squashfs-exclude-files diff --git a/live-build/auto/config b/live-build/auto/config index 89e25277..9935d24f 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -35,7 +35,6 @@ mkdir -p config cp -af /usr/share/livecd-rootfs/live-build/functions config/functions cp -af /usr/share/livecd-rootfs/live-build/lb_*_layered config/ cp -af /usr/share/livecd-rootfs/live-build/snap-seed-parse.py config/snap-seed-parse -cp -af /usr/share/livecd-rootfs/live-build/squashfs-exclude-files config/ mkdir -p config/package-lists diff --git a/live-build/functions b/live-build/functions index e4b90425..e9d06d22 100644 --- a/live-build/functions +++ b/live-build/functions @@ -289,17 +289,6 @@ create_vmdk() { rm -rf ${scratch_d} } -create_squashfs() { - local config_dir rootfs_dir squashfs_file - rootfs_dir="$1" - squashfs_file="$2" - config_dir="$PWD/config" - (cd $rootfs_dir && - mksquashfs . $squashfs_file -no-progress -xattrs -comp xz \ - -ef "$config_dir/squashfs-exclude-files") - -} - create_derivative() { # arg1 is the disk type # arg2 is the new name diff --git a/live-build/squashfs-exclude-files b/live-build/squashfs-exclude-files deleted file mode 100644 index bcdcb274..00000000 --- a/live-build/squashfs-exclude-files +++ /dev/null @@ -1 +0,0 @@ -etc/fstab diff --git a/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary b/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary index bc56bc42..873cee59 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary @@ -8,15 +8,14 @@ if [ -n "$SUBARCH" ]; then exit 0 fi -. config/functions - # This is the directory created by create-root-dir.binary rootfs_dir=rootfs.dir squashfs_f="$PWD/livecd.ubuntu-cpc.squashfs" cp $rootfs_dir.manifest $squashfs_f.manifest -# fstab is omitted from the squashfs -grep -v '^/etc/fstab$' $rootfs_dir.filelist >$squashfs_f.filelist +cp $rootfs_dir.filelist $squashfs_f.filelist -create_squashfs $rootfs_dir $squashfs_f +(cd $rootfs_dir && + mksquashfs . $squashfs_f \ + -no-progress -xattrs -comp xz ) diff --git a/live-build/ubuntu-server/hooks/030-root-squashfs.binary b/live-build/ubuntu-server/hooks/030-root-squashfs.binary index 148490e9..41c15001 100755 --- a/live-build/ubuntu-server/hooks/030-root-squashfs.binary +++ b/live-build/ubuntu-server/hooks/030-root-squashfs.binary @@ -30,4 +30,6 @@ squashfs_f_manifest="${squashfs_f}.manifest" create_manifest "binary/boot/squashfs.dir" "${squashfs_f_manifest}" -create_squashfs "binary/boot/squashfs.dir/" ${squashfs_f} +(cd "binary/boot/squashfs.dir/" && + mksquashfs . ${squashfs_f} \ + -no-progress -xattrs -comp xz ) diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index a86deb35..c12c8bf1 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -91,4 +91,6 @@ find $OVERLAY_ROOT/var/lib/snapd/ -name 'lxd_*.snap' -delete squashfs_f="${PWD}/livecd.${PROJECT}.installer.squashfs" -create_squashfs "$OVERLAY_ROOT/" ${squashfs_f} +(cd "$OVERLAY_ROOT/" && + mksquashfs . ${squashfs_f} \ + -no-progress -xattrs -comp xz )