mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
libsemanage: update to 3.2
* Merge inc file into bb file. * Drop obsolete patches: libsemanage-define-FD_CLOEXEC-as-necessary.patch Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
parent
e2895ba199
commit
bb2473e6d7
|
|
@ -1,35 +0,0 @@
|
|||
From 81f2e8b62ad2298a197c4b16e7182a133c1e116f Mon Sep 17 00:00:00 2001
|
||||
From: Joe MacDonald <joe.macdonald@windriver.com>
|
||||
Date: Tue, 15 Oct 2013 10:17:38 -0400
|
||||
Subject: [PATCH] libsemanage: define FD_CLOEXEC as necessary
|
||||
|
||||
In truly old systems, even FD_CLOEXEC may not be defined. Produce a
|
||||
warning and duplicate the #define for FD_CLOEXEC found in
|
||||
asm-generic/fcntl.h on more modern platforms.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
|
||||
---
|
||||
src/semanage_store.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/semanage_store.c b/src/semanage_store.c
|
||||
index 1a94545..b586a8f 100644
|
||||
--- a/src/semanage_store.c
|
||||
+++ b/src/semanage_store.c
|
||||
@@ -66,6 +66,11 @@ typedef struct dbase_policydb dbase_t;
|
||||
|
||||
#define TRUE 1
|
||||
|
||||
+#ifndef FD_CLOEXEC
|
||||
+#warning FD_CLOEXEC undefined on this platform, this may leak file descriptors
|
||||
+#define FD_CLOEXEC 1
|
||||
+#endif
|
||||
+
|
||||
enum semanage_file_defs {
|
||||
SEMANAGE_ROOT,
|
||||
SEMANAGE_TRANS_LOCK,
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
require selinux_20200710.inc
|
||||
require ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI[md5sum] = "d16eee8c1dc8cf43f59957d575d6bd29"
|
||||
SRC_URI[sha256sum] = "22d6c75526e40d1781c30bcf29abf97171bdfe6780923f11c8e1c76a75a21ff8"
|
||||
|
||||
SRC_URI += "\
|
||||
file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
|
||||
file://libsemanage-define-FD_CLOEXEC-as-necessary.patch \
|
||||
file://libsemanage-allow-to-disable-audit-support.patch \
|
||||
file://libsemanage-disable-expand-check-on-policy-load.patch \
|
||||
"
|
||||
|
|
@ -5,12 +5,22 @@ as by programs like load_policy that need to perform specific transformations \
|
|||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
require selinux_common.inc
|
||||
|
||||
inherit lib_package python3native
|
||||
|
||||
SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
|
||||
file://libsemanage-allow-to-disable-audit-support.patch \
|
||||
file://libsemanage-disable-expand-check-on-policy-load.patch \
|
||||
"
|
||||
|
||||
DEPENDS += "libsepol libselinux bzip2 python3 bison-native flex-native swig-native"
|
||||
DEPENDS_append_class-target = " audit"
|
||||
|
||||
S = "${WORKDIR}/git/libsemanage"
|
||||
|
||||
PACKAGES =+ "${PN}-python"
|
||||
|
||||
# For /usr/libexec/selinux/semanage_migrate_store
|
||||
|
|
@ -19,27 +29,26 @@ RDEPENDS_${PN}-python += "python3-core"
|
|||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
|
||||
${libexecdir}/selinux/semanage_migrate_store"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
|
||||
|
||||
FILES_${PN} += "${libexecdir}"
|
||||
|
||||
EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \
|
||||
PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}'
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \
|
||||
PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}'
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
oe_runmake install-pywrap \
|
||||
PYCEXT='.so' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
|
||||
PYCEXT='.so' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
|
||||
|
||||
# Update "policy-version" for semanage.conf
|
||||
sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 31/' \
|
||||
${D}/etc/selinux/semanage.conf
|
||||
sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 33/' \
|
||||
${D}/etc/selinux/semanage.conf
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Loading…
Reference in New Issue
Block a user