diff options
author | Armin Kuster <akuster808@gmail.com> | 2016-10-16 12:08:53 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2016-11-01 09:03:15 -0700 |
commit | 0a795d49ac1b26aef4b25dcefeb97601fb527848 (patch) | |
tree | a30db13d31dc4a4102faa1d45a60338078bbb5cf | |
parent | 75bc31d94f9dca2bff4508a09450fba8a6a840cf (diff) | |
download | meta-security-0a795d49ac1b26aef4b25dcefeb97601fb527848.tar.gz |
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.bb | 7 | ||||
-rw-r--r-- | recipes-security/samhain/samhain-server_4.1.5.bb | 16 | ||||
-rw-r--r-- | recipes-security/samhain/samhain.inc | 52 |
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 += " \ | |||
12 | --with-pid-file=/var/samhain/samhain.pid \ | 12 | --with-pid-file=/var/samhain/samhain.pid \ |
13 | " | 13 | " |
14 | 14 | ||
15 | |||
16 | INSANE_SKIP_${PN} = "already-stripped" | ||
17 | |||
18 | FILES_${PN} += "\ | ||
19 | /run \ | ||
20 | " | ||
21 | |||
22 | RDEPENDS_${PN} = "acl zlib attr bash" | 15 | 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" | |||
3 | 3 | ||
4 | require samhain.inc | 4 | require samhain.inc |
5 | 5 | ||
6 | DEPENDS = "gmp" | 6 | DEPENDS = "gmp samhain-server-native" |
7 | 7 | ||
8 | EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} " | 8 | EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} " |
9 | 9 | ||
10 | # supports mysql|postgresql|oracle|odbc but postgresql is the only one available | 10 | # supports mysql|postgresql|oracle|odbc but postgresql is the only one available |
11 | 11 | ||
12 | PACKAGECONFG ??= "postgresql" | 12 | PACKAGECONFIG ??= "postgresql" |
13 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" | ||
14 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" | ||
15 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" | ||
16 | |||
13 | PACKAGECONFIG[postgres] = "--with-database=postgresql --enable-xml-log, "", postgresql" | 17 | PACKAGECONFIG[postgres] = "--with-database=postgresql --enable-xml-log, "", postgresql" |
14 | PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , " | 18 | PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , " |
15 | PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , " | 19 | PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , " |
@@ -38,17 +42,13 @@ do_install_append() { | |||
38 | init/samhain.startLSB ${D}/var/lib/samhain | 42 | init/samhain.startLSB ${D}/var/lib/samhain |
39 | } | 43 | } |
40 | 44 | ||
41 | INSANE_SKIP_${PN} = "already-stripped" | ||
42 | |||
43 | PACKAGES = "${PN} ${PN}-doc ${PN}-dbg" | 45 | PACKAGES = "${PN} ${PN}-doc ${PN}-dbg" |
44 | 46 | ||
45 | FILES_${PN} += " \ | 47 | FILES_${PN} += "${sbindir}/*" |
46 | ${sbindir}/* \ | ||
47 | /run \ | ||
48 | " | ||
49 | 48 | ||
50 | FILES_${PN}-dbg += " \ | 49 | FILES_${PN}-dbg += " \ |
51 | ${sbindir}/.debug/* \ | 50 | ${sbindir}/.debug/* \ |
52 | " | 51 | " |
53 | 52 | ||
54 | RDEPENDS_${PN} += "gmp bash perl" | 53 | RDEPENDS_${PN} += "gmp bash perl" |
54 | 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() { | |||
46 | # use the prefix --oldincludedir=/usr/include which is not | 46 | # use the prefix --oldincludedir=/usr/include which is not |
47 | # recognized by Samhain's configure script and would invariably | 47 | # recognized by Samhain's configure script and would invariably |
48 | # throw back the error "unrecognized option: --oldincludedir=/usr/include" | 48 | # throw back the error "unrecognized option: --oldincludedir=/usr/include" |
49 | do_configure () { | 49 | do_configure_prepend () { |
50 | cat << EOF > ./config-site.${BP} | 50 | cat << EOF > ${S}/config-site.${BP} |
51 | ssp_cv_lib=no | 51 | ssp_cv_lib=no |
52 | sh_cv_va_copy=yes | 52 | sh_cv_va_copy=yes |
53 | EOF | 53 | EOF |
54 | export CONFIG_SITE=${S}/config-site.${BP} | ||
55 | } | ||
54 | 56 | ||
55 | export CONFIG_SITE=./config-site.${BP} | 57 | do_configure () { |
56 | ./configure \ | 58 | ./configure \ |
57 | --build=${BUILD_SYS} \ | 59 | --build=${BUILD_SYS} \ |
58 | --host=${HOST_SYS} \ | 60 | --host=${HOST_SYS} \ |
59 | --target=${TARGET_SYS} \ | 61 | --target=${TARGET_SYS} \ |
60 | --prefix=${prefix} \ | 62 | --prefix=${prefix} \ |
61 | --exec_prefix=${exec_prefix} \ | 63 | --exec_prefix=${exec_prefix} \ |
62 | --bindir=${bindir} \ | 64 | --bindir=${bindir} \ |
63 | --sbindir=${sbindir} \ | 65 | --sbindir=${sbindir} \ |
64 | --libexecdir=${libexecdir} \ | 66 | --libexecdir=${libexecdir} \ |
65 | --datadir=${datadir} \ | 67 | --datadir=${datadir} \ |
66 | --sysconfdir=${sysconfdir} \ | 68 | --sysconfdir=${sysconfdir} \ |
67 | --sharedstatedir=${sharedstatedir} \ | 69 | --sharedstatedir=${sharedstatedir} \ |
68 | --localstatedir=${localstatedir} \ | 70 | --localstatedir=${localstatedir} \ |
69 | --libdir=${libdir} \ | 71 | --libdir=${libdir} \ |
70 | --includedir=${includedir} \ | 72 | --includedir=${includedir} \ |
71 | --infodir=${infodir} \ | 73 | --infodir=${infodir} \ |
72 | --mandir=${mandir} \ | 74 | --mandir=${mandir} \ |
73 | ${EXTRA_OECONF} | 75 | ${EXTRA_OECONF} |
74 | } | 76 | } |
75 | 77 | ||
76 | # Install the init script, it's default file, and the extraneous | 78 | # Install the init script, it's default file, and the extraneous |
77 | # documentation. | 79 | # documentation. |
78 | do_install_append () { | 80 | do_install_append () { |
79 | cd ${S} | 81 | cd ${S} |
80 | oe_runmake install DESTDIR='${D}' INSTALL=install-boot | 82 | oe_runmake install DESTDIR='${D}' INSTALL=install-boot |
81 | install -d ${D}${sysconfdir}/init.d | 83 | install -d ${D}${sysconfdir}/init.d |
82 | install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \ | 84 | install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \ |
@@ -89,5 +91,11 @@ do_install_append () { | |||
89 | install -d ${D}${docdir}/${PN} | 91 | install -d ${D}${docdir}/${PN} |
90 | cp -r docs/* ${D}${docdir}/${PN} | 92 | cp -r docs/* ${D}${docdir}/${PN} |
91 | cp -r scripts ${D}${docdir}/${PN} | 93 | cp -r scripts ${D}${docdir}/${PN} |
92 | install -d -m 755 ${D}/var/samhain | 94 | install -d -m 755 ${D}/var/samhain |
93 | } | 95 | } |
96 | |||
97 | FILES_${PN} += "\ | ||
98 | /run \ | ||
99 | " | ||
100 | |||
101 | INSANE_SKIP_${PN} = "already-stripped" | ||