]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
cdrom+flash-images: Check if we would remove any libraries
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Jan 2026 12:55:09 +0000 (12:55 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Jan 2026 13:32:43 +0000 (13:32 +0000)
The filesystem-cleanup script has recently shown that it can create some
false-positives. By running it on top of the generated images we should
be able to catch these problems during the build stage.

I have unfortunately no way to run this for any add-on packages.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/cdrom
lfs/flash-images

index 52588fc8712bbabc0ce78542a9bb201cc22e2048..f250ed292b1be46e0f61076ff7c56d4ce08f4c19 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -153,6 +153,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Create mount points
        $(call CREATE_MOUNTPOINTS,$(DIR_TMP)/root)
 
+       # Run the filesystem cleanup script
+       chroot $(DIR_TMP)/root /usr/local/bin/filesystem-cleanup > $(DIR_TMP)/cleanup.log
+
+       # Check if any files have been deleted
+       [ -s "$(DIR_TMP)/cleanup.log" ]
+
        # Create the archive
        $(call COMPRESS_ZSTD,$(DIR_TMP)/root,$(DIR_TMP)/cdrom/distro.img)
 
index 36259acec427f8f8275a013a8d59e3f7224e8c68..e7e5ea8b2a6eab5cad0acee0aa17486111901d18 100644 (file)
@@ -156,6 +156,12 @@ endif
 
        chroot $(MNThdd) /usr/bin/perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
 
+       # Run the filesystem cleanup script
+       chroot $(MNThdd) /usr/local/bin/filesystem-cleanup > $(DIR_TMP)/cleanup.log
+
+       # Check if any files have been deleted
+       [ -s "$(DIR_TMP)/cleanup.log" ]
+
        # Create /etc/fstab
        printf "$(FSTAB_FMT)" "$$(blkid -o value -s UUID $(PART_BOOT))" "/boot" \
                "auto" "defaults,nodev,noexec,nosuid" 1 2 >  $(MNThdd)/etc/fstab