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" |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=189c3826d32deaf83ad8d0d538a10023" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | |
| 15 | # util-linux added to get libuuid |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 16 | DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native" |
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 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | file://syslog-ng.conf.systemd \ |
| 20 | file://syslog-ng.conf.sysvinit \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 21 | file://initscript \ |
| 22 | file://volatiles.03_syslog-ng \ |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 23 | file://syslog-ng-tmp.conf \ |
| 24 | file://syslog-ng.service-the-syslog-ng-service.patch \ |
| 25 | file://0002-scl-fix-wrong-ownership-during-installation.patch \ |
| 26 | file://0005-.py-s-python-python3-exclude-tests.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 27 | " |
| 28 | |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 29 | SRC_URI[md5sum] = "69ef4dc5628d5e603e9e4a1b937592f8" |
| 30 | SRC_URI[sha256sum] = "2eeb8e0dbbcb556fdd4e50bc9f29bc8c66c9b153026f87caa7567bd3139c186a" |
| 31 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" |
| 33 | |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 34 | inherit autotools gettext systemd pkgconfig update-rc.d multilib_header |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | |
| 36 | EXTRA_OECONF = " \ |
| 37 | --enable-dynamic-linking \ |
| 38 | --disable-sub-streams \ |
| 39 | --disable-pacct \ |
| 40 | --localstatedir=${localstatedir}/lib/${BPN} \ |
| 41 | --sysconfdir=${sysconfdir}/${BPN} \ |
| 42 | --with-module-dir=${libdir}/${BPN} \ |
| 43 | --with-sysroot=${STAGING_DIR_HOST} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 44 | --without-mongoc --disable-mongodb \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 45 | --with-librabbitmq-client=no \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | --disable-python \ |
| 47 | --disable-java --disable-java-modules \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 48 | --with-pidfile-dir=${localstatedir}/run/${BPN} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 49 | " |
| 50 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 51 | PACKAGECONFIG ??= " \ |
| 52 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 53 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," |
| 55 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," |
| 56 | PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 57 | PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 58 | PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 59 | PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 60 | PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," |
| 61 | PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," |
| 62 | PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," |
| 63 | PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 64 | PACKAGECONFIG[native] = "--enable-native,--disable-native,," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 65 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | do_configure:prepend() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 67 | olddir=$(pwd) |
| 68 | cd ${AUTOTOOLS_SCRIPT_PATH} |
| 69 | |
| 70 | ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." |
| 71 | |
| 72 | cd $olddir |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 73 | } |
| 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | install -d ${D}${sysconfdir}/${BPN} |
| 77 | install -d ${D}${sysconfdir}/init.d |
| 78 | install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 79 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 80 | install -d ${D}${sysconfdir}/default/volatiles/ |
| 81 | install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng |
| 82 | install -d ${D}${sysconfdir}/tmpfiles.d/ |
| 83 | install -m 644 ${WORKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf |
Brad Bishop | 868407c | 2019-11-04 13:24:47 -0500 | [diff] [blame] | 84 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 85 | install -d ${D}${localstatedir}/lib/${BPN} |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 86 | # Remove /var/run as it is created on startup |
| 87 | rm -rf ${D}${localstatedir}/run |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 88 | |
| 89 | # support for systemd |
| 90 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 91 | install -m 644 ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 92 | |
| 93 | install -d ${D}${systemd_unitdir}/system/ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 94 | install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service |
| 95 | install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 96 | |
| 97 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default |
| 98 | sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default |
| 99 | sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default |
| 100 | |
| 101 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants |
| 102 | ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service |
| 103 | else |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 104 | install -m 644 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 105 | fi |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 106 | |
| 107 | oe_multilib_header syslog-ng/syslog-ng-config.h |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 108 | } |
| 109 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 110 | FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" |
| 111 | RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 112 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 113 | FILES:${PN}-jconf += " \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 114 | ${datadir}/${BPN}/include/scl/cim \ |
| 115 | ${datadir}/${BPN}/include/scl/elasticsearch \ |
| 116 | ${datadir}/${BPN}/include/scl/ewmm \ |
| 117 | ${datadir}/${BPN}/include/scl/graylog2 \ |
| 118 | ${datadir}/${BPN}/include/scl/loggly \ |
| 119 | ${datadir}/${BPN}/include/scl/logmatic \ |
| 120 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 121 | |
| 122 | # This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 123 | PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 124 | RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" |
| 125 | FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" |
| 126 | FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" |
| 127 | FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" |
| 128 | FILES:${PN} += "${systemd_unitdir}/system/*.service" |
| 129 | INSANE_SKIP:${PN}-libs = "dev-so" |
| 130 | RDEPENDS:${PN} += "${PN}-libs" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 131 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 132 | CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 133 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 134 | RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" |
| 135 | RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 136 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 137 | RPROVIDES:${PN} += "${PN}-systemd" |
| 138 | RREPLACES:${PN} += "${PN}-systemd" |
| 139 | RCONFLICTS:${PN} += "${PN}-systemd" |
| 140 | SYSTEMD_SERVICE:${PN} = "${BPN}@.service" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 141 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 142 | INITSCRIPT_NAME = "syslog" |
| 143 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." |