From 0bc861ced17e5e5e6373ce7d33f4318e6c5cb1b7 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 26 Mar 2023 11:50:09 -0500 Subject: [PATCH] Split out base squashfs.exclude Variants no longer need to specify the full contents of the `squashfs.exclude` file. The "base" file in the source directory gets combined with the one from the config directory (if it exists). --- Makefile | 10 ++++++++-- build-squashfs.sh | 5 +++-- yellow/squashfs.exclude => squashfs.exclude | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) rename yellow/squashfs.exclude => squashfs.exclude (96%) diff --git a/Makefile b/Makefile index 3d702eb..a45baa7 100644 --- a/Makefile +++ b/Makefile @@ -53,11 +53,17 @@ $(O)/.ready: \ ./build-rootfs.sh touch $(O)/.ready +$(O)/squashfs.exclude: \ + squashfs.exclude \ + $(shell test -f $(CONFIGDIR)/squashfs.exclude && echo $(CONFIGDIR)/squashfs.exclude) + mkdir -p $(O) + sort $^ > $@ + $(IMAGESDIR)/rootfs.squashfs: \ build-squashfs.sh \ - $(CONFIGDIR)/squashfs.exclude \ + $(O)/squashfs.exclude \ $(O)/.ready - ./build-squashfs.sh "$(IMAGESDIR)" + ./build-squashfs.sh "$(O)" "$(IMAGESDIR)" squashfs: $(IMAGESDIR)/rootfs.squashfs diff --git a/build-squashfs.sh b/build-squashfs.sh index 3e68516..c90af07 100755 --- a/build-squashfs.sh +++ b/build-squashfs.sh @@ -5,14 +5,15 @@ set -e . "${CONFIGDIR:=${PWD}}"/config -IMAGESDIR="${1}" +O="${1}" +IMAGESDIR="${2}" mkdir -p "${IMAGESDIR}" mksquashfs \ /mnt/gentoo \ "${IMAGESDIR}"/rootfs.squashfs \ -comp gzip \ - -ef "${CONFIGDIR}"/squashfs.exclude \ + -ef "${O}"/squashfs.exclude \ -no-exports \ -noappend \ -wildcards diff --git a/yellow/squashfs.exclude b/squashfs.exclude similarity index 96% rename from yellow/squashfs.exclude rename to squashfs.exclude index 98dba43..6af3f35 100644 --- a/yellow/squashfs.exclude +++ b/squashfs.exclude @@ -12,7 +12,6 @@ etc/python-exec etc/runlevels etc/selinux/semanage.conf etc/selinux/sepolgen.conf -usr/aarch64-unknown-linux-gnu usr/bin/2to3* usr/bin/audit2* usr/bin/chcat