From 94ee9d0a42da5ecddc6a33b8e24f33f9fe195740 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 16 Dec 2023 16:21:37 +0800 Subject: selinux-python: upgrade 3.5 -> 3.6 * Refresh patch Signed-off-by: Yi Zhao Signed-off-by: Joe MacDonald --- .../selinux-python/fix-sepolicy-install-path.patch | 4 +- recipes-security/selinux/selinux-python_3.5.bb | 122 --------------------- recipes-security/selinux/selinux-python_3.6.bb | 122 +++++++++++++++++++++ 3 files changed, 124 insertions(+), 124 deletions(-) delete mode 100644 recipes-security/selinux/selinux-python_3.5.bb create mode 100644 recipes-security/selinux/selinux-python_3.6.bb diff --git a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch index 5eb2e54..bc048c1 100644 --- a/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch +++ b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch @@ -1,4 +1,4 @@ -From 2a0c2489e9d245502e7a9dc5878da01f9d64db2a Mon Sep 17 00:00:00 2001 +From fb449373ae92a05c324895cd7daee1461a0f0349 Mon Sep 17 00:00:00 2001 From: Xin Ouyang Date: Mon, 23 Sep 2013 21:17:59 +0800 Subject: [PATCH] sepolicy: fix install path for new pymodule sepolicy @@ -13,7 +13,7 @@ Signed-off-by: Yi Zhao 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepolicy/Makefile b/sepolicy/Makefile -index 4e9e93d..512aab5 100644 +index 1a26cfd..6e40691 100644 --- a/sepolicy/Makefile +++ b/sepolicy/Makefile @@ -27,7 +27,7 @@ test: diff --git a/recipes-security/selinux/selinux-python_3.5.bb b/recipes-security/selinux/selinux-python_3.5.bb deleted file mode 100644 index 79125d0..0000000 --- a/recipes-security/selinux/selinux-python_3.5.bb +++ /dev/null @@ -1,122 +0,0 @@ -SUMMARY = "Python modules and various SELinux utilities." -DESCRIPTION = "\ -This package contains Python modules sepolgen, sepolicy; And the \ -SELinux utilities audit2allow, chcat, semanage ..." -SECTION = "base" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833" - -require selinux_common.inc - -inherit python3targetconfig - -SRC_URI += "file://fix-sepolicy-install-path.patch \ - " - -S = "${WORKDIR}/git/python" - -DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native" - -RDEPENDS:${PN} = "\ - python3-core \ - python3-codecs \ - python3-io \ - python3-ipy \ - python3-stringold \ - python3-syslog \ - python3-unixadmin \ - libselinux-python \ - libsemanage-python \ - setools \ -" -RDEPENDS:${PN}-audit2allow = "\ - python3-core \ - libselinux-python \ - ${PN}-sepolgen \ -" -RDEPENDS:${PN}-chcat = "\ - python3-core \ - python3-codecs \ - python3-shell \ - python3-stringold \ - python3-unixadmin \ - libselinux-python \ - ${PN} \ -" -RDEPENDS:${PN}-semanage = "\ - python3-core \ - python3-ipy \ - python3-compression \ - python3-xml \ - python3-misc \ - libselinux-python \ - audit-python \ - ${PN} \ -" -RDEPENDS:${PN}-sepolicy = "\ - binutils \ - python3-core \ - python3-codecs \ - python3-distro \ - python3-syslog \ - python3-multiprocessing \ - ${PN} \ -" -RDEPENDS:${PN}-sepolgen-ifgen = "\ - python3-core \ - libselinux-python \ -" - -PACKAGES =+ "\ - ${PN}-audit2allow \ - ${PN}-sepolgen-ifgen \ - ${PN}-chcat \ - ${PN}-semanage \ - ${PN}-sepolgen \ - ${PN}-sepolicy \ -" -FILES:${PN}-audit2allow = "\ - ${bindir}/audit2allow \ - ${bindir}/audit2why \ -" -FILES:${PN}-chcat = "\ - ${bindir}/chcat \ -" -FILES:${PN}-semanage = "\ - ${sbindir}/semanage \ - ${datadir}/bash-completion/completions/semanage \ -" -# The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy -FILES:${PN}-sepolicy = "\ - ${bindir}/sepolgen \ - ${bindir}/sepolicy \ - ${datadir}/bash-completion/completions/sepolicy \ -" -FILES:${PN}-sepolgen-ifgen = "\ - ${bindir}/sepolgen-ifgen \ - ${bindir}/sepolgen-ifgen-attr-helper \ -" -FILES:${PN}-sepolgen = "\ - ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \ - ${localstatedir}/lib/sepolgen/perm_map \ -" - -FILES:${PN} += "\ - ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \ - ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \ - ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \ -" - -do_install() { - oe_runmake DESTDIR="${D}" \ - PYLIBVER='python${PYTHON_BASEVERSION}' \ - PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' \ - install - - # Remove .pyc files - find ${D} -name *.pyc -delete - - # Fix buildpaths issue - sed -i -e 's,${WORKDIR},,g' \ - ${D}${PYTHON_SITEPACKAGES_DIR}/sepolicy-${PV}.dist-info/direct_url.json -} diff --git a/recipes-security/selinux/selinux-python_3.6.bb b/recipes-security/selinux/selinux-python_3.6.bb new file mode 100644 index 0000000..79125d0 --- /dev/null +++ b/recipes-security/selinux/selinux-python_3.6.bb @@ -0,0 +1,122 @@ +SUMMARY = "Python modules and various SELinux utilities." +DESCRIPTION = "\ +This package contains Python modules sepolgen, sepolicy; And the \ +SELinux utilities audit2allow, chcat, semanage ..." +SECTION = "base" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=393a5ca445f6965873eca0259a17f833" + +require selinux_common.inc + +inherit python3targetconfig + +SRC_URI += "file://fix-sepolicy-install-path.patch \ + " + +S = "${WORKDIR}/git/python" + +DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native" + +RDEPENDS:${PN} = "\ + python3-core \ + python3-codecs \ + python3-io \ + python3-ipy \ + python3-stringold \ + python3-syslog \ + python3-unixadmin \ + libselinux-python \ + libsemanage-python \ + setools \ +" +RDEPENDS:${PN}-audit2allow = "\ + python3-core \ + libselinux-python \ + ${PN}-sepolgen \ +" +RDEPENDS:${PN}-chcat = "\ + python3-core \ + python3-codecs \ + python3-shell \ + python3-stringold \ + python3-unixadmin \ + libselinux-python \ + ${PN} \ +" +RDEPENDS:${PN}-semanage = "\ + python3-core \ + python3-ipy \ + python3-compression \ + python3-xml \ + python3-misc \ + libselinux-python \ + audit-python \ + ${PN} \ +" +RDEPENDS:${PN}-sepolicy = "\ + binutils \ + python3-core \ + python3-codecs \ + python3-distro \ + python3-syslog \ + python3-multiprocessing \ + ${PN} \ +" +RDEPENDS:${PN}-sepolgen-ifgen = "\ + python3-core \ + libselinux-python \ +" + +PACKAGES =+ "\ + ${PN}-audit2allow \ + ${PN}-sepolgen-ifgen \ + ${PN}-chcat \ + ${PN}-semanage \ + ${PN}-sepolgen \ + ${PN}-sepolicy \ +" +FILES:${PN}-audit2allow = "\ + ${bindir}/audit2allow \ + ${bindir}/audit2why \ +" +FILES:${PN}-chcat = "\ + ${bindir}/chcat \ +" +FILES:${PN}-semanage = "\ + ${sbindir}/semanage \ + ${datadir}/bash-completion/completions/semanage \ +" +# The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy +FILES:${PN}-sepolicy = "\ + ${bindir}/sepolgen \ + ${bindir}/sepolicy \ + ${datadir}/bash-completion/completions/sepolicy \ +" +FILES:${PN}-sepolgen-ifgen = "\ + ${bindir}/sepolgen-ifgen \ + ${bindir}/sepolgen-ifgen-attr-helper \ +" +FILES:${PN}-sepolgen = "\ + ${PYTHON_SITEPACKAGES_DIR}/sepolgen* \ + ${localstatedir}/lib/sepolgen/perm_map \ +" + +FILES:${PN} += "\ + ${PYTHON_SITEPACKAGES_DIR}/seobject.py* \ + ${PYTHON_SITEPACKAGES_DIR}/sepolicy*.dist-info \ + ${PYTHON_SITEPACKAGES_DIR}/sepolicy/* \ +" + +do_install() { + oe_runmake DESTDIR="${D}" \ + PYLIBVER='python${PYTHON_BASEVERSION}' \ + PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' \ + install + + # Remove .pyc files + find ${D} -name *.pyc -delete + + # Fix buildpaths issue + sed -i -e 's,${WORKDIR},,g' \ + ${D}${PYTHON_SITEPACKAGES_DIR}/sepolicy-${PV}.dist-info/direct_url.json +} -- cgit v1.2.3-54-g00ecf