From 13b9ab29414da187660219250a9904a539b3f4a5 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 14 Aug 2026 17:41:15 +0200 Subject: [PATCH] sysexts: Drop some more cruft from sysext images GCE and AMI OEM images still had debug directories. Incus is about to get an update where two packages (blake3 and xdelta) are installing some cmake stuff. Signed-off-by: Krzesimir Nowak --- build_library/sysext_mangle_flatcar-incus | 2 +- .../coreos-overlay/coreos-base/oem-ami/files/manglefs.sh | 7 +++++++ .../coreos-overlay/coreos-base/oem-gce/files/manglefs.sh | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/manglefs.sh diff --git a/build_library/sysext_mangle_flatcar-incus b/build_library/sysext_mangle_flatcar-incus index c5e3f71c0a1..cc6fe41fed6 100755 --- a/build_library/sysext_mangle_flatcar-incus +++ b/build_library/sysext_mangle_flatcar-incus @@ -5,7 +5,7 @@ rootfs="${1}" pushd "${rootfs}" -rm -rf ./usr/{lib/debug,lib64/pkgconfig,include}/ +rm -rf ./usr/{lib/debug,lib64/pkgconfig,include,lib64/cmake}/ pushd ./usr/lib/systemd/system mkdir -p "multi-user.target.d" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/manglefs.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/manglefs.sh new file mode 100755 index 00000000000..f8e01ea09db --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/manglefs.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -euo pipefail + +rootfs="${1}" + +rm -rf "${rootfs}/usr/lib/debug" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh index b4db342cbe6..100bd007949 100755 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh @@ -4,6 +4,8 @@ set -euo pipefail rootfs=${1} +rm -rf "${rootfs}/usr/lib/debug" + # Remove test stuff from python - it's quite large. for p in "${rootfs}"/usr/lib/python*; do if [[ ! -d ${p} ]]; then