Skip to contentSkip to conversation

libsemanage-native: remove audit-native dependency

PATCH Applied [email protected] 2 participants 4 messages Jan 20, 2014

lore
Share & tools
lore
#0 lore raw

cover libsemanage-native: remove audit-native dependency

From: Wenzong Fan <[email protected]>

* native tools don't need audit support;
* audit 2.3.2 or laters require kernel headers >= 2.6.30, this causes audit-native can't be built on some older distributions.

The following changes since commit 3fee4a09cc26816862dacfb2081dc7e0fa7ca47e:

psmisc: inherit enable-selinux and backport to fix build issue (2014-01-13 17:50:00 +0800)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/disable-audit
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/disable-audit

Wenzong Fan (2):
Revert "libsemanage: add audit dependency"
libsemanage-native: remove audit-native dependency

 recipes-security/audit/audit_2.3.2.bb              |    8 +-
 recipes-security/selinux/libsemanage.inc           |    5 +-
 ...ibsemanage-allow-to-disable-audit-support.patch |  126 ++++++++++++++++++++
 recipes-security/selinux/libsemanage_2.2.bb        |    1 +
 recipes-security/selinux/libsemanage_git.bb        |    1 +
 5 files changed, 133 insertions(+), 8 deletions(-)
 create mode 100644 recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 Revert "libsemanage: add audit dependency"

From: Wenzong Fan <[email protected]>

This reverts commit 146bd8c6bc3bc0e9e96a8517263f28f7915b871d.

---
 recipes-security/audit/audit_2.3.2.bb    |    8 +-------
 recipes-security/selinux/libsemanage.inc |    2 +-
 2 files changed, 2 insertions(+), 8 deletions(-)
recipes-security/audit/audit_2.3.2.bb +1 -7
index 8ab0c7b..edcb881 100644
@@ -26,7 +26,6 @@ SRC_URI[md5sum] = "4e8d065b5cc16b77b9b61e93a9ed160e"
 SRC_URI[sha256sum] = "8872e0b5392888789061db8034164305ef0e1b34543e1e7004d275f039081d29"
 
 DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)"
-DEPENDS_class-native = ""
 
 EXTRA_OECONF += "--without-prelude \
 	--with-libwrap \
@@ -38,9 +37,6 @@ EXTRA_OECONF += "--without-prelude \
 	--sbindir=${base_sbindir} \
 	"
 
-# Remove extra configs for native build
-EXTRA_OECONF_class-native = "--with-python=no"
-
 EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \
 	PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \
 	pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
@@ -66,7 +62,7 @@ FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
 FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
 
-do_install_append_class-target() {
+do_install_append() {
 	rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a
 	rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la
 
@@ -79,5 +75,3 @@ do_install_append_class-target() {
 	install -D -m 0755 ${S}/../auditd ${D}/etc/init.d/auditd
 	rm -rf ${D}/etc/rc.d
 }
-
-BBCLASSEXTEND = "native"
recipes-security/selinux/libsemanage.inc +1 -1
index a978c75..dfc3006 100644
@@ -10,7 +10,7 @@ LICENSE = "LGPLv2.1+"
 
 inherit lib_package
 
-DEPENDS += "libsepol libselinux ustr bzip2 python audit bison-native flex-native"
+DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native"
 
 PACKAGES += "${PN}-python"
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 libsemanage-native: remove audit-native dependency

In reply to [email protected]

From: Wenzong Fan <[email protected]>

* native tools don't need audit support;
* audit 2.3.2 or laters require kernel headers >= 2.6.30, this causes audit-native can't be built on some older distributions.

---
 recipes-security/selinux/libsemanage.inc           |    3 +
 ...ibsemanage-allow-to-disable-audit-support.patch |  126 ++++++++++++++++++++
 recipes-security/selinux/libsemanage_2.2.bb        |    1 +
 recipes-security/selinux/libsemanage_git.bb        |    1 +
 4 files changed, 131 insertions(+)
 create mode 100644 recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch
recipes-security/selinux/libsemanage.inc +3 -0
index dfc3006..9424358 100644
@@ -11,11 +11,14 @@ LICENSE = "LGPLv2.1+"
 inherit lib_package
 
 DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native"
+DEPENDS_class-target += "audit"
 
 PACKAGES += "${PN}-python"
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
 FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
 
+EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y"
+
 do_compile_append() {
     oe_runmake pywrap \
             INCLUDEDIR='${STAGING_INCDIR}' \
recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch new file +126 -0

126 lines not on this page · raw message

recipes-security/selinux/libsemanage_2.2.bb +1 -0
index 4ee93c0..93daf9f 100644
@@ -14,4 +14,5 @@ SRC_URI += "\
 	file://libsemanage-fix-path-nologin.patch \
 	file://libsemanage-drop-Wno-unused-but-set-variable.patch \
 	file://libsemanage-define-FD_CLOEXEC-as-necessary.patch;striplevel=2 \
+	file://libsemanage-allow-to-disable-audit-support.patch \
 	"
recipes-security/selinux/libsemanage_git.bb +1 -0
index c3799fd..a32ebc3 100644
@@ -12,4 +12,5 @@ SRC_URI += "\
 	file://libsemanage-fix-path-nologin.patch \
 	file://libsemanage-drop-Wno-unused-but-set-variable.patch \
 	file://libsemanage-define-FD_CLOEXEC-as-necessary.patch;striplevel=2 \
+	file://libsemanage-allow-to-disable-audit-support.patch \
 	"
Signature · 1 line
1.7.9.5
#3 lore raw
In reply to [email protected]
Quoted 19 lines · 于 14-1-20 下午6:15, [email protected] 写道:

From: Wenzong Fan <[email protected]>

* native tools don't need audit support;
* audit 2.3.2 or laters require kernel headers >= 2.6.30, this causes audit-native can't be built on some older distributions.

The following changes since commit 3fee4a09cc26816862dacfb2081dc7e0fa7ca47e:

psmisc: inherit enable-selinux and backport to fix build issue (2014-01-13 17:50:00 +0800)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/disable-audit
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/disable-audit

Wenzong Fan (2):
Revert "libsemanage: add audit dependency"
libsemanage-native: remove audit-native dependency

Quoted 8 lines
  recipes-security/audit/audit_2.3.2.bb              |    8 +-
  recipes-security/selinux/libsemanage.inc           |    5 +-
  ...ibsemanage-allow-to-disable-audit-support.patch |  126 ++++++++++++++++++++
  recipes-security/selinux/libsemanage_2.2.bb        |    1 +
  recipes-security/selinux/libsemanage_git.bb        |    1 +
  5 files changed, 133 insertions(+), 8 deletions(-)

create mode 100644 recipes-security/selinux/libsemanage/libsemanage-allow-to-disable-audit-support.patch

Merged to meta-selinux:master.

Thanks. :)

Signature · 1 line
- Pascal