Adapt to UNPACKDIR changes

Remove or update S definitions as required to work with oe-core
S/UNPACKDIR changes.  A default definition of S has been added to
selinux_common.inc to avoid duplication in the set of recipes that
use it to build packages from different subdirectories of the selinux
repo.  The three packagegroups test build successfully with these
changes.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
This commit is contained in:
Scott Murray 2025-06-27 11:09:15 -04:00 committed by Yi Zhao
parent 9c43c41e99
commit 05178ce178
18 changed files with 9 additions and 28 deletions

View File

@ -75,7 +75,7 @@ SRC_URI += " \
file://0057-policy-modules-system-logging-make-syslogd_runtime_t.patch \ file://0057-policy-modules-system-logging-make-syslogd_runtime_t.patch \
" "
S = "${WORKDIR}/refpolicy" S = "${UNPACKDIR}/refpolicy"
CONFFILES:${PN} = "${sysconfdir}/selinux/config" CONFFILES:${PN} = "${sysconfdir}/selinux/config"
FILES:${PN} += " \ FILES:${PN} += " \

View File

@ -1,5 +1,4 @@
S ?= "${WORKDIR}/sources" S = "${UNPACKDIR}"
UNPACKDIR = "${S}"
SECTION ?= "base" SECTION ?= "base"

View File

@ -13,8 +13,6 @@ require selinux_common.inc
DEPENDS = "libsepol bison-native" DEPENDS = "libsepol bison-native"
S = "${WORKDIR}/git/checkpolicy"
do_install:append() { do_install:append() {
install test/dismod ${D}/${bindir}/sedismod install test/dismod ${D}/${bindir}/sedismod
install test/dispol ${D}/${bindir}/sedispol install test/dispol ${D}/${bindir}/sedispol

View File

@ -17,7 +17,7 @@ SRC_URI += "\
file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \ 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 = "libsepol libpcre2 swig-native python3-setuptools-scm-native"
DEPENDS:append:libc-musl = " fts" DEPENDS:append:libc-musl = " fts"

View File

@ -15,8 +15,6 @@ SRC_URI += "\
file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \ file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch \
" "
S = "${WORKDIR}/git/libselinux"
DEPENDS = "libsepol libpcre2" DEPENDS = "libsepol libpcre2"
DEPENDS:append:libc-musl = " fts" DEPENDS:append:libc-musl = " fts"

View File

@ -20,8 +20,6 @@ DEPENDS = "libsepol libselinux python3 bison-native swig-native"
DEPENDS:append:class-target = " audit" DEPENDS:append:class-target = " audit"
S = "${WORKDIR}/git/libsemanage"
EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y" EXTRA_OEMAKE:class-native = "DISABLE_AUDIT=y"
PACKAGES =+ "${PN}-python" PACKAGES =+ "${PN}-python"

View File

@ -11,8 +11,6 @@ require selinux_common.inc
inherit lib_package inherit lib_package
S = "${WORKDIR}/git/libsepol"
DEPENDS = "flex-native" DEPENDS = "flex-native"
BBCLASSEXTEND = "native" BBCLASSEXTEND = "native"

View File

@ -22,8 +22,6 @@ EXTRA_OEMAKE = "SBINDIR=${base_sbindir} \
SYSTEMDDIR=${systemd_unitdir} \ SYSTEMDDIR=${systemd_unitdir} \
" "
S = "${WORKDIR}/git/mcstrans"
do_install:append() { do_install:append() {
install -d ${D}${sbindir} install -d ${D}${sbindir}
install -m 755 utils/untranscon ${D}${sbindir}/ install -m 755 utils/untranscon ${D}${sbindir}/

View File

@ -21,8 +21,6 @@ PAM_SRC_URI = "file://pam.d/newrole \
DEPENDS = "libsepol libselinux libsemanage gettext-native" DEPENDS = "libsepol libselinux libsemanage gettext-native"
DEPENDS:append:class-target = " libcap-ng" DEPENDS:append:class-target = " libcap-ng"
S = "${WORKDIR}/git/policycoreutils"
inherit selinux python3native inherit selinux python3native
RDEPENDS:${PN}-fixfiles = "\ RDEPENDS:${PN}-fixfiles = "\

View File

@ -18,8 +18,6 @@ EXTRA_OEMAKE = "SYSTEMDSYSTEMUNITDIR=${systemd_system_unitdir} \
SYSTEMDUSERUNITDIR=${systemd_user_unitdir} \ SYSTEMDUSERUNITDIR=${systemd_user_unitdir} \
" "
S = "${WORKDIR}/git/restorecond"
FILES:${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \ FILES:${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \
${systemd_user_unitdir}/* \ ${systemd_user_unitdir}/* \
" "

View File

@ -10,6 +10,4 @@ require selinux_common.inc
DEPENDS = "libsepol xmlto-native" DEPENDS = "libsepol xmlto-native"
S = "${WORKDIR}/git/secilc"
BBCLASSEXTEND = "native" BBCLASSEXTEND = "native"

View File

@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
require selinux_common.inc require selinux_common.inc
S = "${WORKDIR}/git/dbus" S = "${UNPACKDIR}/${BP}/dbus"
RDEPENDS:${PN} = "python3-core selinux-python-sepolicy" RDEPENDS:${PN} = "python3-core selinux-python-sepolicy"

View File

@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833"
require selinux_common.inc require selinux_common.inc
S = "${WORKDIR}/git/gui" S = "${UNPACKDIR}/${BP}/gui"
DEPENDS = "gettext-native" DEPENDS = "gettext-native"
RDEPENDS:${PN} = "python3-core" RDEPENDS:${PN} = "python3-core"

View File

@ -14,7 +14,7 @@ SRC_URI += "file://fix-sepolicy-install-path.patch \
file://0001-sepolicy-set-conf.substitutions-releasever-to-empty-.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" DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native"

View File

@ -12,7 +12,7 @@ require selinux_common.inc
SRC_URI += "file://sandbox-de-bashify.patch \ SRC_URI += "file://sandbox-de-bashify.patch \
" "
S = "${WORKDIR}/git/sandbox" S = "${UNPACKDIR}/${BP}/sandbox"
DEPENDS = "libselinux libcap-ng gettext-native" DEPENDS = "libselinux libcap-ng gettext-native"

View File

@ -3,6 +3,8 @@ HOMEPAGE = "https://github.com/SELinuxProject"
SRC_URI = "git://github.com/SELinuxProject/selinux.git;branch=main;protocol=https" SRC_URI = "git://github.com/SELinuxProject/selinux.git;branch=main;protocol=https"
SRCREV = "8e9157bbeea1899b7b8b257e7eaa71efef3fffed" SRCREV = "8e9157bbeea1899b7b8b257e7eaa71efef3fffed"
S = "${UNPACKDIR}/${BP}/${BPN}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
do_compile() { do_compile() {

View File

@ -10,8 +10,6 @@ require selinux_common.inc
DEPENDS = "libsepol" DEPENDS = "libsepol"
S = "${WORKDIR}/git/semodule-utils"
PACKAGES =+ "\ PACKAGES =+ "\
${PN}-semodule-expand \ ${PN}-semodule-expand \
${PN}-semodule-link \ ${PN}-semodule-link \

View File

@ -14,8 +14,6 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=69a7b68f0a4a570d7c0c43465333ecbc \
file://${S}/COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://${S}/COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://${S}/COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" file://${S}/COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
S = "${WORKDIR}/git"
DEPENDS = "libsepol libselinux" DEPENDS = "libsepol libselinux"
RDEPENDS:${PN} = "python3-networkx python3-logging libselinux-python" RDEPENDS:${PN} = "python3-networkx python3-logging libselinux-python"