From 01c453103bbb37555bde065ef6e00dfe5a87aedd Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 25 Apr 2025 10:45:31 +0200 Subject: [PATCH] overlay coreos/config: Add Flatcar modifications for sys-libs/libsemanage Signed-off-by: Krzesimir Nowak --- .../coreos/config/env/sys-libs/libsemanage | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/libsemanage diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/libsemanage b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/libsemanage new file mode 100644 index 0000000000..b2c9deab5b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/libsemanage @@ -0,0 +1,17 @@ +# A hack to modify semanage.conf before it gets copied by +# multilib_copy_sources. +if declare -pf multilib_copy_sources >/dev/null 2>/dev/null; then + if ! declare -pf flatcar_hacked_multilib_copy_sources >/dev/null 2>&1; then + eval "$(echo 'flatcar_hacked_multilib_copy_sources()'; declare -pf multilib_copy_sources | tail -n +2)" + fi + multilib_copy_sources() { + # Enable compression in semanage.conf + sed -i \ + -e 's/^\(bzip-blocksize\)=0/\1=1/' \ + "${S}/src/semanage.conf" + flatcar_hacked_multilib_copy_sources "${@}" + } +fi +if [[ $(flatcar_target) = 'generic-prod' ]]; then + INSTALL_MASK+=" /usr/lib/python* " +fi