From 1e32a0bae949e8be951d51ed836c457cddd79ed0 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 15 Sep 2025 13:27:35 +0200 Subject: [PATCH] overlay coreos/user-patches: Add a patch for crossdev Signed-off-by: Krzesimir Nowak --- ...001-Mask-selinux-when-building-glibc.patch | 33 +++++++++++++++++++ .../user-patches/sys-devel/crossdev/README.md | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/0001-Mask-selinux-when-building-glibc.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/README.md diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/0001-Mask-selinux-when-building-glibc.patch b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/0001-Mask-selinux-when-building-glibc.patch new file mode 100644 index 0000000000..506f34b7c0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/0001-Mask-selinux-when-building-glibc.patch @@ -0,0 +1,33 @@ +From dbd686eb40a1d7e8ac1daeb46d1deab32214fcac Mon Sep 17 00:00:00 2001 +From: Krzesimir Nowak +Date: Mon, 8 Sep 2025 14:02:29 +0200 +Subject: [PATCH] Mask selinux when building glibc + +Disabling selinux via USE=-selinux may not work, if the profile forces +it. +--- + crossdev | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/crossdev b/crossdev +index 1e5c4ac..e150d30 100755 +--- a/crossdev ++++ b/crossdev +@@ -1585,6 +1585,14 @@ for f in package.{accept_keywords,env,mask,use} env/${CROSSDEV_OVERLAY_CATEGORY} + rm -f "${f}/${CROSSDEV_OVERLAY_CATEGORY}" + done + ++# selinux won't work in bootstrap environment - libselinux may not be ++# available, need to mask selinux since it could be forced by the ++# profile ++if [[ ${LPKG} = 'glibc' ]]; then ++ LMASK+=" selinux" ++ LFORCE+=" -selinux" ++fi ++ + pkglist=( K L ) + if [[ ${LLVM} == "yes" ]] ; then + pkglist+=( R C ) +-- +2.49.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/README.md new file mode 100644 index 0000000000..3a2d259c70 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-devel/crossdev/README.md @@ -0,0 +1,2 @@ +This patch should be upstreamed when we can confirm that it works with +our modification to the glibc ebuild.