build-squashfs: Allow defining pseudo files

The `mksquashfs` command accepts a `-pf` argument, which specifies a
file that defines "pseudo files."  Each line in the file defines some
file path and an operation to perform on that path *in the generated
filesystem image*.  This allows, e.g. creating files, changing their
permissions, etc. that cannot be done in the source directory for
whatever reason.

Aimee OS now allows a variant to provide a pseudo file definition file
for `mksquashfs` by creating a `squashfs.pseudo` file in its
configuration directory.
master
Dustin 2023-03-29 11:01:33 -05:00
parent 4a2d63c8db
commit 111c5967fd
2 changed files with 6 additions and 0 deletions

View File

@ -59,9 +59,14 @@ $(O)/squashfs.exclude: \
mkdir -p $(O) mkdir -p $(O)
sort $^ > $@ sort $^ > $@
$(O)/squashfs.pseudo: \
$(wildcard $(CONFIGDIR)/squashfs.pseudo)
sort /dev/null $^ > $@
$(IMAGESDIR)/rootfs.squashfs: \ $(IMAGESDIR)/rootfs.squashfs: \
build-squashfs.sh \ build-squashfs.sh \
$(O)/squashfs.exclude \ $(O)/squashfs.exclude \
$(O)/squashfs.pseudo \
$(O)/.ready $(O)/.ready
./build-squashfs.sh "$(O)" "$(IMAGESDIR)" ./build-squashfs.sh "$(O)" "$(IMAGESDIR)"

View File

@ -14,6 +14,7 @@ mksquashfs \
"${IMAGESDIR}"/rootfs.squashfs \ "${IMAGESDIR}"/rootfs.squashfs \
-comp gzip \ -comp gzip \
-ef "${O}"/squashfs.exclude \ -ef "${O}"/squashfs.exclude \
-pf "${O}"/squashfs.pseudo \
-no-exports \ -no-exports \
-noappend \ -noappend \
-wildcards -wildcards