Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Alternative system logger daemon" |
| 2 | DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ |
| 3 | but with new functionality for the new generation. The original syslogd \ |
| 4 | allows messages only to be sorted based on priority/facility pairs; \ |
| 5 | syslog-ng adds the possibility to filter based on message contents using \ |
| 6 | regular expressions. The new configuration scheme is intuitive and powerful. \ |
| 7 | Forwarding logs over TCP and remembering all forwarding hops makes it \ |
| 8 | ideal for firewalled environments. \ |
| 9 | " |
| 10 | HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" |
| 11 | |
| 12 | LICENSE = "GPLv2 & LGPLv2.1" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | |
| 15 | # util-linux added to get libuuid |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 17 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 18 | SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 19 | file://syslog-ng.conf \ |
| 20 | file://initscript \ |
| 21 | file://volatiles.03_syslog-ng \ |
| 22 | file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ |
| 23 | " |
| 24 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 25 | inherit autotools gettext systemd pkgconfig update-rc.d |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 26 | |
| 27 | EXTRA_OECONF = " \ |
| 28 | --enable-dynamic-linking \ |
| 29 | --disable-sub-streams \ |
| 30 | --disable-pacct \ |
| 31 | --localstatedir=${localstatedir}/lib/${BPN} \ |
| 32 | --sysconfdir=${sysconfdir}/${BPN} \ |
| 33 | --with-module-dir=${libdir}/${BPN} \ |
| 34 | --with-sysroot=${STAGING_DIR_HOST} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | --without-mongoc --disable-mongodb \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 36 | --with-librabbitmq-client=no \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | --disable-python \ |
| 38 | --disable-java --disable-java-modules \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | --with-pidfile-dir=${localstatedir}/run/${BPN} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 40 | ${CONFIG_TLS} \ |
| 41 | " |
| 42 | |
| 43 | CONFIG_TLS = "--enable-thread-tls" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | CONFIG_TLS_arm = "${@oe.utils.conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 45 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | PACKAGECONFIG ??= " \ |
| 47 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 48 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 49 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," |
| 50 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," |
| 51 | PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 52 | PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," |
| 53 | PACKAGECONFIG[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,libnet," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 55 | PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," |
| 56 | PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," |
| 57 | PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," |
| 58 | PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 59 | PACKAGECONFIG[native] = "--enable-native,--disable-native,," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 60 | |
| 61 | do_configure_prepend() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 62 | olddir=$(pwd) |
| 63 | cd ${AUTOTOOLS_SCRIPT_PATH} |
| 64 | |
| 65 | ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." |
| 66 | |
| 67 | cd $olddir |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 68 | } |
| 69 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 70 | do_install_prepend() { |
| 71 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service |
| 72 | sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service |
| 73 | sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service |
| 74 | } |
| 75 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 76 | do_install_append() { |
| 77 | install -d ${D}/${sysconfdir}/${BPN} |
| 78 | install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf |
| 79 | install -d ${D}/${sysconfdir}/init.d |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 80 | install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 81 | install -d ${D}/${sysconfdir}/default/volatiles/ |
| 82 | install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng |
| 83 | install -d ${D}/${localstatedir}/lib/${BPN} |
| 84 | # Remove /var/run as it is created on startup |
| 85 | rm -rf ${D}${localstatedir}/run |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools" |
| 89 | RDEPENDS_${PN} += "gawk" |
| 90 | |
| 91 | # This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error |
| 92 | PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${PN}-libs-dbg" |
| 93 | FILES_${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" |
| 94 | FILES_${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" |
| 95 | FILES_${PN}-libs-dbg = "${libdir}/${BPN}/.debug" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 96 | FILES_${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 97 | INSANE_SKIP_${PN}-libs = "dev-so" |
| 98 | RDEPENDS_${PN} += "${PN}-libs" |
| 99 | |
| 100 | CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" |
| 101 | |
| 102 | # syslog initscript is handled explicitly because order of |
| 103 | # update-rc.d and update-alternatives is important |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 104 | RDEPENDS_${PN} += " ${@oe.utils.conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 105 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 106 | RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" |
| 107 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 108 | RPROVIDES_${PN} += "${PN}-systemd" |
| 109 | RREPLACES_${PN} += "${PN}-systemd" |
| 110 | RCONFLICTS_${PN} += "${PN}-systemd" |
| 111 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" |
| 112 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 113 | INITSCRIPT_NAME = "syslog" |
| 114 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." |