From: Michael Tremer Date: Wed, 21 Jan 2026 12:55:09 +0000 (+0000) Subject: cdrom+flash-images: Check if we would remove any libraries X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e8a27fd7641547a815aa13af052c191d586751a;p=ipfire-2.x.git cdrom+flash-images: Check if we would remove any libraries 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 --- diff --git a/lfs/cdrom b/lfs/cdrom index 52588fc87..f250ed292 100644 --- 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) diff --git a/lfs/flash-images b/lfs/flash-images index 36259acec..e7e5ea8b2 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -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