summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-07-17 05:37:08 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2014-07-24 15:31:50 +0200
commit1a6e16bcb1145df51b15c19df0d7ef655b683f5e (patch)
tree836b30d519b105b5a6a49d8c81ab83a4eb38258b /meta-oe/recipes-support/syslog-ng/syslog-ng.inc
parentb8a40ca5d4cdd457eb3fa25359e56d2e64c94b88 (diff)
downloadmeta-openembedded-1a6e16bcb1145df51b15c19df0d7ef655b683f5e.tar.gz
syslog-ng: uprev to 3.5.4.1
- initscript: add status, PIDFILE and xconsole - syslog-ng.conf: dump the version - Fix some memory leak problems we found - Some backport patches - scl: fix wrong ownership issue - libnet: add libnet enable option and add it in PACKAGECONFIG - add HOMEPAGE - remove INC_PR - change some config into PACKAGECONFIG - add PACKAGE syslog-ng-libs to fix QA issue - use volatiles - inherit update-rc.d and update-alternative Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/syslog-ng.inc')
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng.inc134
1 files changed, 63 insertions, 71 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index e0c905597..01c9b202c 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -1,98 +1,90 @@
1DESCRIPTION = "Alternative system logger daemon" 1SUMMARY = "Alternative system logger daemon"
2DEPENDS = "libol flex eventlog glib-2.0" 2DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \
3LICENSE = "GPL LGPL" 3but with new functionality for the new generation. The original syslogd \
4LIC_FILES_CHKSUM = "file://COPYING;md5=7ec1bcc46f28b11f4722e20d9b7dd4d5" 4allows messages only to be sorted based on priority/facility pairs; \
5 5syslog-ng adds the possibility to filter based on message contents using \
6# syslog initscript is handled explicitly because order of 6regular expressions. The new configuration scheme is intuitive and powerful. \
7# update-rc.d and update-alternatives is important 7Forwarding logs over TCP and remembering all forwarding hops makes it \
8RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" 8ideal for firewalled environments. \
9"
10HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system"
9 11
10INC_PR = "r12" 12LICENSE = "GPLv2 & LGPLv2.1"
13LIC_FILES_CHKSUM = "file://COPYING;md5=e0e8658d9be248f01b7933df24dc1408"
11 14
12inherit autotools systemd 15DEPENDS = "flex eventlog glib-2.0"
13 16
14SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${BPN}_${PV}.tar.gz" 17SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${BPN}_${PV}.tar.gz \
18 file://syslog-ng.conf \
19 file://initscript \
20 file://volatiles.03_syslog-ng \
21"
15 22
16noipv6 = "${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}" 23inherit autotools systemd pkgconfig update-rc.d update-alternatives
17 24
18EXTRA_OECONF = " \ 25EXTRA_OECONF = " \
19 --with-libnet=${STAGING_BINDIR_CROSS} \
20 --enable-dynamic-linking \ 26 --enable-dynamic-linking \
21 ${noipv6} \
22 --enable-ssl \
23 --disable-sub-streams \ 27 --disable-sub-streams \
24 --disable-pacct \ 28 --disable-pacct \
25 --disable-linux-caps \ 29 --localstatedir=${localstatedir}/run/${BPN} \
26 --disable-pcre \ 30 --sysconfdir=${sysconfdir}/${BPN} \
27 --disable-sql \ 31 --with-module-dir=${libdir}/${BPN} \
32 --with-sysroot=${STAGING_DIR_HOST} \
28" 33"
29 34
30EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" 35PACKAGECONFIG ??= "openssl \
31EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '--disable-systemd', d)}" 36 ${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
37 ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
38"
39PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl,openssl,"
40PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,,"
41PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd,"
42PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap,"
43PACKAGECONFIG[pcre] = "--enable-pcre,--disable-pcre,libpcre,"
44PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi,"
45PACKAGECONFIG[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,libnet,"
46PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp,"
32 47
33do_configure_prepend() { 48do_configure_prepend() {
34 eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "s/-D_LARGEFILE_SOURCE//" -e "s/-D_FILE_OFFSET_BITS=64//" ${S}/configure.in', d)}" 49 eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "s/-D_LARGEFILE_SOURCE//" -e "s/-D_FILE_OFFSET_BITS=64//" ${S}/configure.in', d)}"
35} 50}
36 51
37# rename modules.conf because it breaks update-modules
38# see http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-October/035537.html
39do_install_append() { 52do_install_append() {
40 mv ${D}/${sysconfdir}/modules.conf ${D}/${sysconfdir}/scl-modules.conf 53 install -d ${D}/${sysconfdir}/${BPN}
41 sed -i "s#@include 'modules.conf'#@include 'scl-modules.conf'#g" ${D}/${sysconfdir}/scl.conf 54 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
42 install -d ${D}/${sysconfdir}/${PN}
43 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${PN}.conf
44 install -d ${D}/${sysconfdir}/init.d 55 install -d ${D}/${sysconfdir}/init.d
45 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN} 56 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${BPN}
57 install -d ${D}/${sysconfdir}/default/volatiles/
58 install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng
59
60 # Remove /var/run as it is created on startup
61 rm -rf ${D}${localstatedir}/run
46} 62}
47 63
48FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \ 64FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
49 ${sysconfdir} ${sharedstatedir} ${localstatedir} \ 65
50 ${base_bindir}/* ${base_sbindir}/* \ 66# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error
51 ${base_libdir}/*${SOLIBS} \ 67PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${PN}-libs-dbg"
52 ${datadir}/${BPN} ${libdir}/${BPN}/*${SOLIBS} \ 68FILES_${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*"
53 ${datadir}/include/scl/ ${datadir}/xsd" 69FILES_${PN}-libs-dev = "${libdir}/${BPN}/lib*.la"
54FILES_${PN}-dev += "${libdir}/${BPN}/lib*.la ${libdir}/${BPN}/*${SOLIBSDEV}" 70FILES_${PN}-libs-dbg = "${libdir}/${BPN}/.debug"
55CONFFILES_${PN} = "${sysconfdir}/${PN}.conf ${sysconfdir}/scl.conf ${sysconfdir}/scl-modules.conf" 71INSANE_SKIP_${PN}-libs = "dev-so"
72RDEPENDS_${PN} += "${PN}-libs"
73
74CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
75
76# syslog initscript is handled explicitly because order of
77# update-rc.d and update-alternatives is important
78RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
56 79
57RPROVIDES_${PN} += "${PN}-systemd" 80RPROVIDES_${PN} += "${PN}-systemd"
58RREPLACES_${PN} += "${PN}-systemd" 81RREPLACES_${PN} += "${PN}-systemd"
59RCONFLICTS_${PN} += "${PN}-systemd" 82RCONFLICTS_${PN} += "${PN}-systemd"
60SYSTEMD_SERVICE_${PN} = "${PN}.service" 83SYSTEMD_SERVICE_${PN} = "${PN}.service"
61 84
62pkg_postinst_${PN} () { 85ALTERNATIVE_${PN} = "syslog-init"
63 /etc/init.d/syslog stop 86ALTERNATIVE_PRIORITY[syslog-init] = "200"
64 update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 200 87ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
65
66 if test "x$D" != "x"; then
67 OPT="-r $D"
68 else
69 OPT="-s"
70 fi
71 # remove all rc.d-links potentially created from alternative
72 # syslog packages before creating new ones
73 update-rc.d $OPT -f syslog remove
74 update-rc.d $OPT syslog start 20 2 3 4 5 . stop 90 0 1 6 .
75}
76 88
77pkg_prerm_${PN} () { 89INITSCRIPT_NAME = "syslog"
78 if test "x$D" = "x"; then 90INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
79 if test "$1" = "upgrade" -o "$1" = "remove"; then
80 /etc/init.d/syslog stop
81 fi
82 fi
83
84 update-alternatives --remove syslog-init syslog.${PN}
85}
86
87pkg_postrm_${PN} () {
88 if test "x$D" != "x"; then
89 OPT="-r $D"
90 else
91 OPT=""
92 fi
93 if test "$1" = "remove" -o "$1" = "purge"; then
94 if ! test -e "/etc/init.d/syslog"; then
95 update-rc.d $OPT syslog remove
96 fi
97 fi
98}