From b8d3b5318b036931c0d9c4fd1a350991589d5258 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 16 Feb 2026 08:14:44 -0700 Subject: [PATCH] Removing blob file protection during build cleanup. --- debian-live-config/build.sh | 2 ++ pi-gen/build.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/debian-live-config/build.sh b/debian-live-config/build.sh index aff11ce2..44f0dad9 100755 --- a/debian-live-config/build.sh +++ b/debian-live-config/build.sh @@ -44,6 +44,8 @@ else fi # Clear out old builds. +# Remove immutable attribute from protected files before cleanup +chattr -i "${BUILD_DIR}"/chroot/opt/wrolpi-blobs/* 2>/dev/null || : [ -d "${BUILD_DIR}" ] && rm -rf "${BUILD_DIR}" mkdir "${BUILD_DIR}" cd "${BUILD_DIR}" || (echo "Work directory must exist" && exit 1) diff --git a/pi-gen/build.sh b/pi-gen/build.sh index 43b3fa8c..5721edee 100755 --- a/pi-gen/build.sh +++ b/pi-gen/build.sh @@ -62,6 +62,9 @@ cleanup() { fi done + # Remove immutable attribute from protected files before cleanup + chattr -i "${BUILD_DIR}"/work/*/stage*/rootfs/opt/wrolpi-blobs/* 2>/dev/null || : + # Final safety net – remove the whole build tree rm -rf "${BUILD_DIR}" }