sysexts: Drop some more cruft from sysext images - #4218
Merged
Conversation
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 <knowak@microsoft.com>
There was a problem hiding this comment.
Pull request overview
Removes unnecessary development/debug artifacts from OEM and sysext images to keep image size down and avoid shipping build-time cruft (notably debug directories and newly introduced CMake install paths from updated packages).
Changes:
- GCE OEM: drop
/usr/lib/debugfrom the rootfs during mangling. - AMI OEM: introduce a mangle script that drops
/usr/lib/debug. - Incus sysext: additionally drop
/usr/lib64/cmaketo handle new package-installed CMake files.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh | Removes debug symbols directory from the GCE OEM rootfs. |
| sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ami/files/manglefs.sh | New AMI OEM mangling step to remove debug symbols directory. |
| build_library/sysext_mangle_flatcar-incus | Extends sysext cleanup to remove /usr/lib64/cmake alongside other dev artifacts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
5
to
+7
| rootfs=${1} | ||
|
|
||
| rm -rf "${rootfs}/usr/lib/debug" |
Comment on lines
+5
to
+7
| rootfs="${1}" | ||
|
|
||
| rm -rf "${rootfs}/usr/lib/debug" |
Comment on lines
5
to
+8
|
|
||
| pushd "${rootfs}" | ||
|
|
||
| rm -rf ./usr/{lib/debug,lib64/pkgconfig,include}/ | ||
| rm -rf ./usr/{lib/debug,lib64/pkgconfig,include,lib64/cmake}/ |
chewi
approved these changes
Aug 14, 2026
chewi
left a comment
Contributor
There was a problem hiding this comment.
Cool, although we should probably unify this stuff. It's almost the same in every case.
Member
Author
Some day. ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
CI: https://jenkins.flatcar.org/job/container/job/packages_all_arches/543/