aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2016-10-16 12:08:53 -0700
committerArmin Kuster <akuster808@gmail.com>2016-11-01 09:03:15 -0700
commit0a795d49ac1b26aef4b25dcefeb97601fb527848 (patch)
treea30db13d31dc4a4102faa1d45a60338078bbb5cf
parent75bc31d94f9dca2bff4508a09450fba8a6a840cf (diff)
downloadmeta-security-0a795d49ac1b26aef4b25dcefeb97601fb527848.tar.gz
meta-security-0a795d49ac1b26aef4b25dcefeb97601fb527848.tar.bz2
meta-security-0a795d49ac1b26aef4b25dcefeb97601fb527848.zip
samhain: recipe cleanup
add a few distro feature checks. Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-security/samhain/samhain-client_4.1.5.bb7
-rw-r--r--recipes-security/samhain/samhain-server_4.1.5.bb16
-rw-r--r--recipes-security/samhain/samhain.inc52
3 files changed, 38 insertions, 37 deletions
diff --git a/recipes-security/samhain/samhain-client_4.1.5.bb b/recipes-security/samhain/samhain-client_4.1.5.bb
index bb47449..4b04326 100644
--- a/recipes-security/samhain/samhain-client_4.1.5.bb
+++ b/recipes-security/samhain/samhain-client_4.1.5.bb
@@ -12,11 +12,4 @@ EXTRA_OECONF += " \
--with-pid-file=/var/samhain/samhain.pid \
"
-
-INSANE_SKIP_${PN} = "already-stripped"
-
-FILES_${PN} += "\
- /run \
- "
-
RDEPENDS_${PN} = "acl zlib attr bash"
diff --git a/recipes-security/samhain/samhain-server_4.1.5.bb b/recipes-security/samhain/samhain-server_4.1.5.bb
index 0d76b9a..35f8775 100644
--- a/recipes-security/samhain/samhain-server_4.1.5.bb
+++ b/recipes-security/samhain/samhain-server_4.1.5.bb
@@ -3,13 +3,17 @@ INITSCRIPT_PARAMS = "defaults 14 86"
require samhain.inc
-DEPENDS = "gmp"
+DEPENDS = "gmp samhain-server-native"
EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} "
# supports mysql|postgresql|oracle|odbc but postgresql is the only one available
-PACKAGECONFG ??= "postgresql"
+PACKAGECONFIG ??= "postgresql"
+PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
+PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
+
PACKAGECONFIG[postgres] = "--with-database=postgresql --enable-xml-log, "", postgresql"
PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , "
PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , "
@@ -38,17 +42,13 @@ do_install_append() {
init/samhain.startLSB ${D}/var/lib/samhain
}
-INSANE_SKIP_${PN} = "already-stripped"
-
PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
-FILES_${PN} += " \
- ${sbindir}/* \
- /run \
- "
+FILES_${PN} += "${sbindir}/*"
FILES_${PN}-dbg += " \
${sbindir}/.debug/* \
"
RDEPENDS_${PN} += "gmp bash perl"
+BBCLASSEXTEND = "native"
diff --git a/recipes-security/samhain/samhain.inc b/recipes-security/samhain/samhain.inc
index 5bf2ee7..7987886 100644
--- a/recipes-security/samhain/samhain.inc
+++ b/recipes-security/samhain/samhain.inc
@@ -46,37 +46,39 @@ do_configure_prepend_aarch64() {
# use the prefix --oldincludedir=/usr/include which is not
# recognized by Samhain's configure script and would invariably
# throw back the error "unrecognized option: --oldincludedir=/usr/include"
-do_configure () {
- cat << EOF > ./config-site.${BP}
+do_configure_prepend () {
+ cat << EOF > ${S}/config-site.${BP}
ssp_cv_lib=no
sh_cv_va_copy=yes
EOF
+ export CONFIG_SITE=${S}/config-site.${BP}
+}
- export CONFIG_SITE=./config-site.${BP}
+do_configure () {
./configure \
- --build=${BUILD_SYS} \
- --host=${HOST_SYS} \
- --target=${TARGET_SYS} \
- --prefix=${prefix} \
- --exec_prefix=${exec_prefix} \
- --bindir=${bindir} \
- --sbindir=${sbindir} \
- --libexecdir=${libexecdir} \
- --datadir=${datadir} \
- --sysconfdir=${sysconfdir} \
- --sharedstatedir=${sharedstatedir} \
- --localstatedir=${localstatedir} \
- --libdir=${libdir} \
- --includedir=${includedir} \
- --infodir=${infodir} \
- --mandir=${mandir} \
- ${EXTRA_OECONF}
+ --build=${BUILD_SYS} \
+ --host=${HOST_SYS} \
+ --target=${TARGET_SYS} \
+ --prefix=${prefix} \
+ --exec_prefix=${exec_prefix} \
+ --bindir=${bindir} \
+ --sbindir=${sbindir} \
+ --libexecdir=${libexecdir} \
+ --datadir=${datadir} \
+ --sysconfdir=${sysconfdir} \
+ --sharedstatedir=${sharedstatedir} \
+ --localstatedir=${localstatedir} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --infodir=${infodir} \
+ --mandir=${mandir} \
+ ${EXTRA_OECONF}
}
# Install the init script, it's default file, and the extraneous
# documentation.
do_install_append () {
- cd ${S}
+ cd ${S}
oe_runmake install DESTDIR='${D}' INSTALL=install-boot
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \
@@ -89,5 +91,11 @@ do_install_append () {
install -d ${D}${docdir}/${PN}
cp -r docs/* ${D}${docdir}/${PN}
cp -r scripts ${D}${docdir}/${PN}
- install -d -m 755 ${D}/var/samhain
+ install -d -m 755 ${D}/var/samhain
}
+
+FILES_${PN} += "\
+ /run \
+ "
+
+INSANE_SKIP_${PN} = "already-stripped"