diff --git a/build_library/sysext_mangle_containerd-flatcar b/build_library/sysext_mangle_containerd-flatcar index 37b89e52dd..7798871644 100755 --- a/build_library/sysext_mangle_containerd-flatcar +++ b/build_library/sysext_mangle_containerd-flatcar @@ -3,17 +3,21 @@ set -euo pipefail rootfs="${1}" +pushd "${rootfs}" # No manpages on Flatcar, no need to ship "stress" tool -echo ">>> NOTICE: $0: removing 'gen-manpages', 'containerd-stress' from sysext" -rm -f "${rootfs}/usr/bin/gen-manpages" "${rootfs}/usr/bin/containerd-stress" +rm -rf ./usr/{bin/{containerd-stress,gen-manpages},lib/debug/} -script_root="$(cd "$(dirname "$0")/../"; pwd)" -files_dir="${script_root}/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd" +dir=$(dirname "${BASH_SOURCE[0]}") +files_dir="${dir}/../sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd" echo ">>> NOTICE $0: installing extra files from '${files_dir}'" # ATTENTION: don't preserve ownership as repo is owned by sdk user -cp -vdR --preserve=mode,timestamps "${files_dir}/"* "${rootfs}" +cp -vdR --preserve=mode,timestamps "${files_dir}/"* ./ -mkdir -p "${rootfs}/usr/lib/systemd/system/multi-user.target.d" -{ echo "[Unit]"; echo "Upholds=containerd.service"; } > "${rootfs}/usr/lib/systemd/system/multi-user.target.d/10-containerd-service.conf" +install -D -m0644 /dev/stdin ./usr/lib/systemd/system/multi-user.target.d/10-containerd-service.conf < "multi-user.target.d/10-incus.conf" @@ -23,4 +25,3 @@ mkdir -p ./usr/lib/userdb/ echo " " > ./usr/lib/userdb/core:incus-admin.membership popd - diff --git a/build_library/sysext_mangle_flatcar-overlaybd b/build_library/sysext_mangle_flatcar-overlaybd index 6233be8f19..ae89fbe28b 100755 --- a/build_library/sysext_mangle_flatcar-overlaybd +++ b/build_library/sysext_mangle_flatcar-overlaybd @@ -5,7 +5,11 @@ rootfs="${1}" pushd "${rootfs}" +rm -rf ./usr/lib/debug/ + pushd ./usr/lib/systemd/system mkdir -p "multi-user.target.d" { echo "[Unit]"; echo "Upholds=overlaybd-tcmu.service overlaybd-snapshotter.service"; } > "multi-user.target.d/10-overlaybd.conf" popd + +popd diff --git a/build_library/sysext_mangle_flatcar-podman b/build_library/sysext_mangle_flatcar-podman index ee1fc7fce5..2ea07c5576 100755 --- a/build_library/sysext_mangle_flatcar-podman +++ b/build_library/sysext_mangle_flatcar-podman @@ -5,7 +5,7 @@ rootfs="${1}" pushd "${rootfs}" -rm -rf ./usr/{lib/debug/,lib64/cmake/,lib64/pkgconfig,include/,share/fish,share/aclocal,share/SLSA} +rm -rf ./usr/{lib/debug,lib64/cmake,lib64/pkgconfig,include,share/aclocal,share/fish}/ mkdir -p ./usr/share/podman/etc cp -a ./etc/{fuse.conf,containers} ./usr/share/podman/etc/ diff --git a/changelog/bugfixes/2025-11-11-sysext-no-debug.md b/changelog/bugfixes/2025-11-11-sysext-no-debug.md new file mode 100644 index 0000000000..6992c772c5 --- /dev/null +++ b/changelog/bugfixes/2025-11-11-sysext-no-debug.md @@ -0,0 +1 @@ +- Dropped debug symbols from containerd, incus, and overlaybd system extensions to reduce download size.