Skip to contentSkip to conversation

Updates to fix building with oe-core master branch

PATCH Superseded Scott Murray 2 participants 6 messages Jun 25, 2025 – Jun 26, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Updates to fix building with oe-core master branch

A couple of patches to handle the switch to whinlatter and adapt the recipes for the subsequent S/UNPACKDIR changes.

Scott Murray (2):
Set compatible layers to whinlatter
Adapt to UNPACKDIR changes

 conf/layer.conf                                     | 2 +-
 recipes-security/refpolicy/refpolicy_common.inc     | 2 +-
 recipes-security/selinux-scripts/selinux-initsh.inc | 3 +--
 recipes-security/selinux/checkpolicy_3.8.1.bb       | 2 --
 recipes-security/selinux/libselinux-python_3.8.1.bb | 2 +-
 recipes-security/selinux/libselinux_3.8.1.bb        | 2 --
 recipes-security/selinux/libsemanage_3.8.1.bb       | 2 --
 recipes-security/selinux/libsepol_3.8.1.bb          | 2 --
 recipes-security/selinux/mcstrans_3.8.1.bb          | 2 --
 recipes-security/selinux/policycoreutils_3.8.1.bb   | 2 --
 recipes-security/selinux/restorecond_3.8.1.bb       | 2 --
 recipes-security/selinux/secilc_3.8.1.bb            | 2 --
 recipes-security/selinux/selinux-dbus_3.8.1.bb      | 2 +-
 recipes-security/selinux/selinux-gui_3.8.1.bb       | 2 +-
 recipes-security/selinux/selinux-python_3.8.1.bb    | 2 +-
 recipes-security/selinux/selinux-sandbox_3.8.1.bb   | 2 +-
 recipes-security/selinux/selinux_common.inc         | 2 ++
 recipes-security/selinux/semodule-utils_3.8.1.bb    | 2 --
 recipes-security/setools/setools_4.5.1.bb           | 2 --
 19 files changed, 10 insertions(+), 29 deletions(-)
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/2 Set compatible layers to whinlatter

whinlatter is the next release, set it as compatible layer since it is not backwards compatible.

---
 conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/layer.conf +1 -1
index b0dc48b..6ec4380 100644
@@ -17,7 +17,7 @@ BBFILE_PRIORITY_selinux = "5"
 # cause compatibility issues with other layers
 LAYERVERSION_selinux = "1"
 
-LAYERSERIES_COMPAT_selinux = "walnascar styhead"
+LAYERSERIES_COMPAT_selinux = "whinlatter"
 
 LAYERDEPENDS_selinux = " \
     core \
Signature · 1 line
2.49.0
#2 lore raw

PATCH 2/2 Adapt to UNPACKDIR changes

In reply to Scott Murray

Remove or update S definitions as required to work with oe-core S/UNPACKDIR changes. The three packagegroups test build successfully with these changes.

---
 recipes-security/refpolicy/refpolicy_common.inc     | 2 +-
 recipes-security/selinux-scripts/selinux-initsh.inc | 3 +--
 recipes-security/selinux/checkpolicy_3.8.1.bb       | 2 --
 recipes-security/selinux/libselinux-python_3.8.1.bb | 2 +-
 recipes-security/selinux/libselinux_3.8.1.bb        | 2 --
 recipes-security/selinux/libsemanage_3.8.1.bb       | 2 --
 recipes-security/selinux/libsepol_3.8.1.bb          | 2 --
 recipes-security/selinux/mcstrans_3.8.1.bb          | 2 --
 recipes-security/selinux/policycoreutils_3.8.1.bb   | 2 --
 recipes-security/selinux/restorecond_3.8.1.bb       | 2 --
 recipes-security/selinux/secilc_3.8.1.bb            | 2 --
 recipes-security/selinux/selinux-dbus_3.8.1.bb      | 2 +-
 recipes-security/selinux/selinux-gui_3.8.1.bb       | 2 +-
 recipes-security/selinux/selinux-python_3.8.1.bb    | 2 +-
 recipes-security/selinux/selinux-sandbox_3.8.1.bb   | 2 +-
 recipes-security/selinux/selinux_common.inc         | 2 ++
 recipes-security/selinux/semodule-utils_3.8.1.bb    | 2 --
 recipes-security/setools/setools_4.5.1.bb           | 2 --
 18 files changed, 9 insertions(+), 28 deletions(-)
recipes-security/refpolicy/refpolicy_common.inc +1 -1
index 0661e6c..736e67b 100644
@@ -75,7 +75,7 @@ SRC_URI += " \
         file://0057-policy-modules-system-logging-make-syslogd_runtime_t.patch \
         "
 
-S = "${WORKDIR}/refpolicy"
+S = "${UNPACKDIR}/refpolicy"
 
 CONFFILES:${PN} = "${sysconfdir}/selinux/config"
 FILES:${PN} += " \
recipes-security/selinux-scripts/selinux-initsh.inc +1 -2
index efe7e88..1fc1ec1 100644
@@ -1,5 +1,4 @@
-S ?= "${WORKDIR}/sources"
-UNPACKDIR = "${S}"
+S = "${UNPACKDIR}"
 
 SECTION ?= "base"
 
recipes-security/selinux/checkpolicy_3.8.1.bb +0 -2
index 60f506d..7ee9269 100644
@@ -13,8 +13,6 @@ require selinux_common.inc
 
 DEPENDS = "libsepol bison-native"
 
-S = "${WORKDIR}/git/checkpolicy"
-
 do_install:append() {
     install test/dismod ${D}/${bindir}/sedismod
     install test/dispol ${D}/${bindir}/sedispol
recipes-security/selinux/libselinux-python_3.8.1.bb +1 -1
index 3c5c489..dd0ccd2 100644
@@ -17,7 +17,7 @@ SRC_URI += "\
         file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \
         "
 
-S = "${WORKDIR}/git/libselinux"
+S = "${UNPACKDIR}/${BP}/libselinux"
 
 DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native"
 DEPENDS:append:libc-musl = " fts"
recipes-security/selinux/libselinux_3.8.1.bb +0 -2
index b0dcde6..d58d646 100644
@@ -15,8 +15,6 @@ SRC_URI += "\
         file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \
         "
 
-S = "${WORKDIR}/git/libselinux"
-
 DEPENDS = "libsepol libpcre2"
 DEPENDS:append:libc-musl = " fts"
 
recipes-security/selinux/libsemanage_3.8.1.bb +0 -2
index ef22957..9f825cd 100644
@@ -20,8 +20,6 @@ DEPENDS = "libsepol libselinux python3 bison-native swig-native"
 
 DEPENDS:append:class-target = " audit"
 
-S = "${WORKDIR}/git/libsemanage"
-
 EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y"
 
 PACKAGES =+ "${PN}-python"
recipes-security/selinux/libsepol_3.8.1.bb +0 -2
index 0c28e9b..0423a2a 100644
@@ -11,8 +11,6 @@ require selinux_common.inc
 
 inherit lib_package
 
-S = "${WORKDIR}/git/libsepol"
-
 DEPENDS = "flex-native"
 
 BBCLASSEXTEND = "native"
recipes-security/selinux/mcstrans_3.8.1.bb +0 -2
index 4c8aed3..964a566 100644
@@ -22,8 +22,6 @@ EXTRA_OEMAKE = "SBINDIR=${base_sbindir} \
                 SYSTEMDDIR=${systemd_unitdir} \
                "
 
-S = "${WORKDIR}/git/mcstrans"
-
 do_install:append() {
     install -d ${D}${sbindir}
     install -m 755 utils/untranscon ${D}${sbindir}/
recipes-security/selinux/policycoreutils_3.8.1.bb +0 -2
index 9e59c4b..5a67c3b 100644
@@ -21,8 +21,6 @@ PAM_SRC_URI = "file://pam.d/newrole \
 DEPENDS = "libsepol libselinux libsemanage gettext-native"
 DEPENDS:append:class-target = " libcap-ng"
 
-S = "${WORKDIR}/git/policycoreutils"
-
 inherit selinux python3native
 
 RDEPENDS:${PN}-fixfiles = "\
recipes-security/selinux/restorecond_3.8.1.bb +0 -2
index 8e57283..e3746b6 100644
@@ -18,8 +18,6 @@ EXTRA_OEMAKE = "SYSTEMDSYSTEMUNITDIR=${systemd_system_unitdir} \
                  SYSTEMDUSERUNITDIR=${systemd_user_unitdir} \
                 "
 
-S = "${WORKDIR}/git/restorecond"
-
 FILES:${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \
                 ${systemd_user_unitdir}/* \
                "
recipes-security/selinux/secilc_3.8.1.bb +0 -2
index 5e0da3f..efe046b 100644
@@ -10,6 +10,4 @@ require selinux_common.inc
 
 DEPENDS = "libsepol xmlto-native"
 
-S = "${WORKDIR}/git/secilc"
-
 BBCLASSEXTEND = "native"
recipes-security/selinux/selinux-dbus_3.8.1.bb +1 -1
index b1198af..972f36a 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
 
 require selinux_common.inc
 
-S = "${WORKDIR}/git/dbus"
+S = "${UNPACKDIR}/${BP}/dbus"
 
 RDEPENDS:${PN} = "python3-core selinux-python-sepolicy"
 
recipes-security/selinux/selinux-gui_3.8.1.bb +1 -1
index fbd5e70..22175cc 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
 
 require selinux_common.inc
 
-S = "${WORKDIR}/git/gui"
+S = "${UNPACKDIR}/${BP}/gui"
 
 DEPENDS = "gettext-native"
 RDEPENDS:${PN} = "python3-core"
recipes-security/selinux/selinux-python_3.8.1.bb +1 -1
index e2dc932..5a4e2d6 100644
@@ -14,7 +14,7 @@ SRC_URI += "file://fix-sepolicy-install-path.patch \
             file://0001-sepolicy-set-conf.substitutions-releasever-to-empty-.patch \
            "
 
-S = "${WORKDIR}/git/python"
+S = "${UNPACKDIR}/${BP}/python"
 
 DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native"
 
recipes-security/selinux/selinux-sandbox_3.8.1.bb +1 -1
index 2cb55d6..d0db69b 100644
@@ -12,7 +12,7 @@ require selinux_common.inc
 SRC_URI += "file://sandbox-de-bashify.patch \
            "
 
-S = "${WORKDIR}/git/sandbox"
+S = "${UNPACKDIR}/${BP}/sandbox"
 
 DEPENDS = "libselinux libcap-ng gettext-native"
 
recipes-security/selinux/selinux_common.inc +2 -0
index 63b048b..c2aa3b8 100644
@@ -3,6 +3,8 @@ HOMEPAGE = "https://github.com/SELinuxProject"
 SRC_URI = "git://github.com/SELinuxProject/selinux.git;branch=main;protocol=https"
 SRCREV = "8e9157bbeea1899b7b8b257e7eaa71efef3fffed"
 
+S = "${UNPACKDIR}/${BP}/${BPN}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 do_compile() {
recipes-security/selinux/semodule-utils_3.8.1.bb +0 -2
index 0c1c189..2015811 100644
@@ -10,8 +10,6 @@ require selinux_common.inc
 
 DEPENDS = "libsepol"
 
-S = "${WORKDIR}/git/semodule-utils"
-
 PACKAGES =+ "\
         ${PN}-semodule-expand \
         ${PN}-semodule-link \
recipes-security/setools/setools_4.5.1.bb +0 -2
index 723eeb0..c9d0bb3 100644
@@ -14,8 +14,6 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=69a7b68f0a4a570d7c0c43465333ecbc \
                     file://${S}/COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://${S}/COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
 
-S = "${WORKDIR}/git"
-
 DEPENDS = "libsepol libselinux"
 
 RDEPENDS:${PN} = "python3-networkx python3-logging libselinux-python"
Signature · 1 line
2.49.0
#3 lore raw

Re: [yocto-patches] [meta-selinux][PATCH 2/2] Adapt to UNPACKDIR changes

recipes-security/selinux/libselinux-python_3.8.1.bb SRC_URI += "\ · line 20

Quoted 2 lines · Scott Murray via lists.yoctoproject.org
recipes-security/selinux/libselinux-python_3.8.1.bb +1 -1
-S = "${WORKDIR}/git/libselinux"
+S = "${UNPACKDIR}/${BP}/libselinux"

This is correct...

Quoted 1 line

-S = "${WORKDIR}/git/libsemanage"

...but how can this be correct? In the absence of S in the recipe, default S from bitbake.conf is used, that default is set to ${UNPACKDIR}/${BP}, which doesn't include the 'libsemanage' suffix.

There are several other spots in the patch with the same inconsistency.

Alex

#4 lore raw

Re: [yocto-patches] [meta-selinux][PATCH 2/2] Adapt to UNPACKDIR changes

Quoted 7 lines · Alexander Kanavin via lists.yoctoproject.org

recipes-security/selinux/libselinux-python_3.8.1.bb SRC_URI += "\ · line 20

Quoted 2 lines · Scott Murray via lists.yoctoproject.org
recipes-security/selinux/libselinux-python_3.8.1.bb +1 -1
-S = "${WORKDIR}/git/libselinux"
+S = "${UNPACKDIR}/${BP}/libselinux"

This is correct...

Quoted 7 lines
Quoted 1 line

-S = "${WORKDIR}/git/libsemanage"

...but how can this be correct? In the absence of S in the recipe, default S from bitbake.conf is used, that default is set to ${UNPACKDIR}/${BP}, which doesn't include the 'libsemanage' suffix.

There are several other spots in the patch with the same inconsistency.

Those recipes all pull in selinux_common.inc, to which I've added:

S = "${UNPACKDIR}/${BP}/${BPN}"

to avoid the duplication for all the recipes where the subdirectory matches the recipe name. If that seems too opaque, I can mention the change in the commit message, or if that doesn't seem enough, I can change all of those recipes back to defining S separately.

Scott

#5 lore raw

Re: [yocto-patches] [meta-selinux][PATCH 2/2] Adapt to UNPACKDIR changes

Quoted 8 lines · Scott Murray

Those recipes all pull in selinux_common.inc, to which I've added:

S = "${UNPACKDIR}/${BP}/${BPN}"

to avoid the duplication for all the recipes where the subdirectory matches the recipe name. If that seems too opaque, I can mention the change in the commit message, or if that doesn't seem enough, I can change all of those recipes back to defining S separately.

Right, this just wasn't clear from reading the changes. Perhaps adjusting the commit message is fine.

Alex