Message ID | 848dd8066de86d3feeb520ef49e902548743fcdd.1750882005.git.scott.murray@konsulko.com |
---|---|
State | New |
Headers | show |
Series | Updates to fix building with oe-core master branch | expand |
On Wed, 25 Jun 2025 at 22:10, Scott Murray via lists.yoctoproject.org <scott.murray=konsulko.com@lists.yoctoproject.org> wrote: > -S = "${WORKDIR}/git/libselinux" > +S = "${UNPACKDIR}/${BP}/libselinux" This is correct... > -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
On Thu, 26 Jun 2025, Alexander Kanavin via lists.yoctoproject.org wrote: > On Wed, 25 Jun 2025 at 22:10, Scott Murray via lists.yoctoproject.org > <scott.murray=konsulko.com@lists.yoctoproject.org> wrote: > > -S = "${WORKDIR}/git/libselinux" > > +S = "${UNPACKDIR}/${BP}/libselinux" > > This is correct... > > > -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
On Thu, 26 Jun 2025 at 16:19, Scott Murray <scott.murray@konsulko.com> wrote: > 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
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc index 0661e6c..736e67b 100644 --- a/recipes-security/refpolicy/refpolicy_common.inc +++ b/recipes-security/refpolicy/refpolicy_common.inc @@ -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} += " \ diff --git a/recipes-security/selinux-scripts/selinux-initsh.inc b/recipes-security/selinux-scripts/selinux-initsh.inc index efe7e88..1fc1ec1 100644 --- a/recipes-security/selinux-scripts/selinux-initsh.inc +++ b/recipes-security/selinux-scripts/selinux-initsh.inc @@ -1,5 +1,4 @@ -S ?= "${WORKDIR}/sources" -UNPACKDIR = "${S}" +S = "${UNPACKDIR}" SECTION ?= "base" diff --git a/recipes-security/selinux/checkpolicy_3.8.1.bb b/recipes-security/selinux/checkpolicy_3.8.1.bb index 60f506d..7ee9269 100644 --- a/recipes-security/selinux/checkpolicy_3.8.1.bb +++ b/recipes-security/selinux/checkpolicy_3.8.1.bb @@ -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 diff --git a/recipes-security/selinux/libselinux-python_3.8.1.bb b/recipes-security/selinux/libselinux-python_3.8.1.bb index 3c5c489..dd0ccd2 100644 --- a/recipes-security/selinux/libselinux-python_3.8.1.bb +++ b/recipes-security/selinux/libselinux-python_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/libselinux_3.8.1.bb b/recipes-security/selinux/libselinux_3.8.1.bb index b0dcde6..d58d646 100644 --- a/recipes-security/selinux/libselinux_3.8.1.bb +++ b/recipes-security/selinux/libselinux_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/libsemanage_3.8.1.bb b/recipes-security/selinux/libsemanage_3.8.1.bb index ef22957..9f825cd 100644 --- a/recipes-security/selinux/libsemanage_3.8.1.bb +++ b/recipes-security/selinux/libsemanage_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/libsepol_3.8.1.bb b/recipes-security/selinux/libsepol_3.8.1.bb index 0c28e9b..0423a2a 100644 --- a/recipes-security/selinux/libsepol_3.8.1.bb +++ b/recipes-security/selinux/libsepol_3.8.1.bb @@ -11,8 +11,6 @@ require selinux_common.inc inherit lib_package -S = "${WORKDIR}/git/libsepol" - DEPENDS = "flex-native" BBCLASSEXTEND = "native" diff --git a/recipes-security/selinux/mcstrans_3.8.1.bb b/recipes-security/selinux/mcstrans_3.8.1.bb index 4c8aed3..964a566 100644 --- a/recipes-security/selinux/mcstrans_3.8.1.bb +++ b/recipes-security/selinux/mcstrans_3.8.1.bb @@ -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}/ diff --git a/recipes-security/selinux/policycoreutils_3.8.1.bb b/recipes-security/selinux/policycoreutils_3.8.1.bb index 9e59c4b..5a67c3b 100644 --- a/recipes-security/selinux/policycoreutils_3.8.1.bb +++ b/recipes-security/selinux/policycoreutils_3.8.1.bb @@ -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 = "\ diff --git a/recipes-security/selinux/restorecond_3.8.1.bb b/recipes-security/selinux/restorecond_3.8.1.bb index 8e57283..e3746b6 100644 --- a/recipes-security/selinux/restorecond_3.8.1.bb +++ b/recipes-security/selinux/restorecond_3.8.1.bb @@ -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}/* \ " diff --git a/recipes-security/selinux/secilc_3.8.1.bb b/recipes-security/selinux/secilc_3.8.1.bb index 5e0da3f..efe046b 100644 --- a/recipes-security/selinux/secilc_3.8.1.bb +++ b/recipes-security/selinux/secilc_3.8.1.bb @@ -10,6 +10,4 @@ require selinux_common.inc DEPENDS = "libsepol xmlto-native" -S = "${WORKDIR}/git/secilc" - BBCLASSEXTEND = "native" diff --git a/recipes-security/selinux/selinux-dbus_3.8.1.bb b/recipes-security/selinux/selinux-dbus_3.8.1.bb index b1198af..972f36a 100644 --- a/recipes-security/selinux/selinux-dbus_3.8.1.bb +++ b/recipes-security/selinux/selinux-dbus_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/selinux-gui_3.8.1.bb b/recipes-security/selinux/selinux-gui_3.8.1.bb index fbd5e70..22175cc 100644 --- a/recipes-security/selinux/selinux-gui_3.8.1.bb +++ b/recipes-security/selinux/selinux-gui_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/selinux-python_3.8.1.bb b/recipes-security/selinux/selinux-python_3.8.1.bb index e2dc932..5a4e2d6 100644 --- a/recipes-security/selinux/selinux-python_3.8.1.bb +++ b/recipes-security/selinux/selinux-python_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/selinux-sandbox_3.8.1.bb b/recipes-security/selinux/selinux-sandbox_3.8.1.bb index 2cb55d6..d0db69b 100644 --- a/recipes-security/selinux/selinux-sandbox_3.8.1.bb +++ b/recipes-security/selinux/selinux-sandbox_3.8.1.bb @@ -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" diff --git a/recipes-security/selinux/selinux_common.inc b/recipes-security/selinux/selinux_common.inc index 63b048b..c2aa3b8 100644 --- a/recipes-security/selinux/selinux_common.inc +++ b/recipes-security/selinux/selinux_common.inc @@ -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() { diff --git a/recipes-security/selinux/semodule-utils_3.8.1.bb b/recipes-security/selinux/semodule-utils_3.8.1.bb index 0c1c189..2015811 100644 --- a/recipes-security/selinux/semodule-utils_3.8.1.bb +++ b/recipes-security/selinux/semodule-utils_3.8.1.bb @@ -10,8 +10,6 @@ require selinux_common.inc DEPENDS = "libsepol" -S = "${WORKDIR}/git/semodule-utils" - PACKAGES =+ "\ ${PN}-semodule-expand \ ${PN}-semodule-link \ diff --git a/recipes-security/setools/setools_4.5.1.bb b/recipes-security/setools/setools_4.5.1.bb index 723eeb0..c9d0bb3 100644 --- a/recipes-security/setools/setools_4.5.1.bb +++ b/recipes-security/setools/setools_4.5.1.bb @@ -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"
Remove or update S definitions as required to work with oe-core S/UNPACKDIR changes. The three packagegroups test build successfully with these changes. Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- 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(-)