From 2f189944d4c82c238898d425a70faa5647ab3bdd Mon Sep 17 00:00:00 2001 From: "J. S." Date: Wed, 25 Sep 2024 17:42:43 -0400 Subject: syslog-ng: upgrade 4.6.0 -> 4.7.0 Changelog : https://github.com/syslog-ng/syslog-ng/releases/tag/syslog-ng-4.7.0 Dropped patch - merged in this version : * 0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch New json-c dependency fixes configure failure. Signed-off-by: Jason Schonberg Signed-off-by: Khem Raj --- ...uard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch | 40 ------ .../recipes-support/syslog-ng/syslog-ng_4.6.0.bb | 157 --------------------- .../recipes-support/syslog-ng/syslog-ng_4.7.0.bb | 156 ++++++++++++++++++++ 3 files changed, 156 insertions(+), 197 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch delete mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb create mode 100644 meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb diff --git a/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch b/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch deleted file mode 100644 index f21ad5d70f..0000000000 --- a/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 896d77dd949b52d6ea5798e5a038ba97d6b802be Mon Sep 17 00:00:00 2001 -From: Peter Marko -Date: Thu, 4 Apr 2024 15:44:18 +0200 -Subject: [PATCH] macros: guard ipv6 code with SYSLOG_NG_ENABLE_IPV6 - -With ipv6 disabled, there are linking errors currently. -This fixes it by not using the symbols when IPv6 is disabled. - -Solves #4810 with my config options -https://github.com/openembedded/meta-openembedded/blob/2487e65ee3842b6ae0c7a2628985be6189ed9ebf/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb - -Upstream-Status: Submitted [https://github.com/syslog-ng/syslog-ng/pull/4880] - -Signed-off-by: Peter Marko ---- - lib/template/macros.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/template/macros.c b/lib/template/macros.c -index 54142706c..fcb83637f 100644 ---- a/lib/template/macros.c -+++ b/lib/template/macros.c -@@ -277,12 +277,14 @@ _get_originating_ip_protocol(const LogMessage *msg) - return 0; - if (g_sockaddr_inet_check(msg->saddr)) - return 4; -+#if SYSLOG_NG_ENABLE_IPV6 - if (g_sockaddr_inet6_check(msg->saddr)) - { - if (g_sockaddr_inet6_is_v4_mapped(msg->saddr)) - return 4; - return 6; - } -+#endif - return 0; - } - --- -2.30.2 - diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb deleted file mode 100644 index ab4a8d1825..0000000000 --- a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb +++ /dev/null @@ -1,157 +0,0 @@ -SUMMARY = "Alternative system logger daemon" -DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ -but with new functionality for the new generation. The original syslogd \ -allows messages only to be sorted based on priority/facility pairs; \ -syslog-ng adds the possibility to filter based on message contents using \ -regular expressions. The new configuration scheme is intuitive and powerful. \ -Forwarding logs over TCP and remembering all forwarding hops makes it \ -ideal for firewalled environments. \ -" -HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" - -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" - -# util-linux added to get libuuid -DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl" - -SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ - file://syslog-ng.conf.systemd \ - file://syslog-ng.conf.sysvinit \ - file://initscript \ - file://volatiles.03_syslog-ng \ - file://syslog-ng-tmp.conf \ - file://syslog-ng.service-the-syslog-ng-service.patch \ - file://0001-Fix-buildpaths-warning.patch \ - file://0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch \ -" -SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" - -SRC_URI[sha256sum] = "b69e3360dfb96a754a4e1cbead4daef37128b1152a23572356db4ab64a475d4f" - -UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" - -CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" - -inherit autotools gettext systemd pkgconfig update-rc.d multilib_header - -EXTRA_OECONF = " \ - --enable-dynamic-linking \ - --disable-sub-streams \ - --disable-pacct \ - --localstatedir=${localstatedir}/lib/${BPN} \ - --sysconfdir=${sysconfdir}/${BPN} \ - --with-module-dir=${libdir}/${BPN} \ - --with-sysroot=${STAGING_DIR_HOST} \ - --without-mongoc --disable-mongodb \ - --with-librabbitmq-client=no \ - --disable-python \ - --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ -" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," -PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," -PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," -PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," -PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," -PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," -PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," -PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," -PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," -PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," -PACKAGECONFIG[native] = "--enable-native,--disable-native,," - -do_configure:prepend() { - olddir=$(pwd) - cd ${AUTOTOOLS_SCRIPT_PATH} - - ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." - - cd $olddir -} - -do_install:append() { - install -d ${D}${sysconfdir}/${BPN} - install -d ${D}${sysconfdir}/init.d - install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog - - install -d ${D}${sysconfdir}/default/volatiles/ - install -m 644 ${UNPACKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng - install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 644 ${UNPACKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf - - install -d ${D}${localstatedir}/lib/${BPN} - # Remove /var/run as it is created on startup - rm -rf ${D}${localstatedir}/run - - # it causes install conflict when multilib enabled - # since python support is disabled, not deliver it - rm -f ${D}${bindir}/syslog-ng-update-virtualenv - - # support for systemd - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -m 644 ${UNPACKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf - - install -d ${D}${systemd_unitdir}/system/ - install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service - install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default - - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants - ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service - else - install -m 644 ${UNPACKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf - fi - - oe_multilib_header syslog-ng/syslog-ng-config.h -} - -FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" -RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" - -FILES:${PN}-jconf += " \ -${datadir}/${BPN}/include/scl/cim \ -${datadir}/${BPN}/include/scl/elasticsearch \ -${datadir}/${BPN}/include/scl/ewmm \ -${datadir}/${BPN}/include/scl/graylog2 \ -${datadir}/${BPN}/include/scl/loggly \ -${datadir}/${BPN}/include/scl/logmatic \ -" - -# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error -PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" -RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" -FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" -FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" -FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" -FILES:${PN} += "${systemd_unitdir}/system/*.service" -INSANE_SKIP:${PN}-libs = "dev-so" -RDEPENDS:${PN} += "${PN}-libs" - -CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" - -RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" -RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}@.service" - -INITSCRIPT_NAME = "syslog" -INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." - -# Fails only with 32bit MACHINEs -# http://errors.yoctoproject.org/Errors/Details/766956/ -# syslog-ng-4.6.0/modules/secure-logging/slog.c:937:63: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] -# syslog-ng-4.6.0/modules/secure-logging/slog.c:955:99: error: passing argument 5 of 'cmac' from incompatible pointer type [-Wincompatible-pointer-types] -# syslog-ng-4.6.0/modules/secure-logging/slog.c:959:74: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] -# syslog-ng-4.6.0/modules/secure-logging/slog.c:975:107: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] -CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb new file mode 100644 index 0000000000..588a38126b --- /dev/null +++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.7.0.bb @@ -0,0 +1,156 @@ +SUMMARY = "Alternative system logger daemon" +DESCRIPTION = "syslog-ng, as the name shows, is a syslogd replacement, \ +but with new functionality for the new generation. The original syslogd \ +allows messages only to be sorted based on priority/facility pairs; \ +syslog-ng adds the possibility to filter based on message contents using \ +regular expressions. The new configuration scheme is intuitive and powerful. \ +Forwarding logs over TCP and remembering all forwarding hops makes it \ +ideal for firewalled environments. \ +" +HOMEPAGE = "http://www.balabit.com/network-security/syslog-ng/opensource-logging-system" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" + +# util-linux added to get libuuid +DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl json-c" + +SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ + file://syslog-ng.conf.systemd \ + file://syslog-ng.conf.sysvinit \ + file://initscript \ + file://volatiles.03_syslog-ng \ + file://syslog-ng-tmp.conf \ + file://syslog-ng.service-the-syslog-ng-service.patch \ + file://0001-Fix-buildpaths-warning.patch \ +" +SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" + +SRC_URI[sha256sum] = "b601265362c633a25f26c497a7e57592739d5a583b7963b722ff58f01b853506" + +UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" + +CVE_STATUS[CVE-2022-38725] = "cpe-incorrect: cve-check wrongly matches cpe:2.3:a:oneidentity:syslog-ng:*:*:*:*:premium:*:*:* < 7.0.32" + +inherit autotools gettext systemd pkgconfig update-rc.d multilib_header + +EXTRA_OECONF = " \ + --enable-dynamic-linking \ + --disable-sub-streams \ + --disable-pacct \ + --localstatedir=${localstatedir}/lib/${BPN} \ + --sysconfdir=${sysconfdir}/${BPN} \ + --with-module-dir=${libdir}/${BPN} \ + --with-sysroot=${STAGING_DIR_HOST} \ + --without-mongoc --disable-mongodb \ + --with-librabbitmq-client=no \ + --disable-python \ + --disable-java --disable-java-modules \ + --with-pidfile-dir=${localstatedir}/run/${BPN} \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ +" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/,--disable-systemd --without-systemdsystemunitdir,systemd," +PACKAGECONFIG[linux-caps] = "--enable-linux-caps,--disable-linux-caps,libcap," +PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi," +PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," +PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," +PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," +PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," +PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," +PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," +PACKAGECONFIG[native] = "--enable-native,--disable-native,," + +do_configure:prepend() { + olddir=$(pwd) + cd ${AUTOTOOLS_SCRIPT_PATH} + + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed." + + cd $olddir +} + +do_install:append() { + install -d ${D}${sysconfdir}/${BPN} + install -d ${D}${sysconfdir}/init.d + install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + + install -d ${D}${sysconfdir}/default/volatiles/ + install -m 644 ${UNPACKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 644 ${UNPACKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf + + install -d ${D}${localstatedir}/lib/${BPN} + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run + + # it causes install conflict when multilib enabled + # since python support is disabled, not deliver it + rm -f ${D}${bindir}/syslog-ng-update-virtualenv + + # support for systemd + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 644 ${UNPACKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + + install -d ${D}${systemd_unitdir}/system/ + install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service + install -m 644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service + else + install -m 644 ${UNPACKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi + + oe_multilib_header syslog-ng/syslog-ng-config.h +} + +FILES:${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" +RDEPENDS:${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" + +FILES:${PN}-jconf += " \ +${datadir}/${BPN}/include/scl/cim \ +${datadir}/${BPN}/include/scl/elasticsearch \ +${datadir}/${BPN}/include/scl/ewmm \ +${datadir}/${BPN}/include/scl/graylog2 \ +${datadir}/${BPN}/include/scl/loggly \ +${datadir}/${BPN}/include/scl/logmatic \ +" + +# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error +PACKAGES =+ "${PN}-jconf ${PN}-libs ${PN}-libs-dev" +RPROVIDES:${PN}-dbg += "${PN}-libs-dbg" +FILES:${PN}-libs = "${libdir}/${BPN}/*.so ${libdir}/libsyslog-ng-*.so*" +FILES:${PN}-libs-dev = "${libdir}/${BPN}/lib*.la" +FILES:${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a" +FILES:${PN} += "${systemd_unitdir}/system/*.service" +INSANE_SKIP:${PN}-libs = "dev-so" +RDEPENDS:${PN} += "${PN}-libs" + +CONFFILES:${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf" + +RCONFLICTS:${PN} = "busybox-syslog sysklogd rsyslog" +RCONFLICTS:${PN}-libs = "busybox-syslog sysklogd rsyslog" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}@.service" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." + +# Fails only with 32bit MACHINEs +# http://errors.yoctoproject.org/Errors/Details/766956/ +# syslog-ng-4.6.0/modules/secure-logging/slog.c:937:63: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:955:99: error: passing argument 5 of 'cmac' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:959:74: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +# syslog-ng-4.6.0/modules/secure-logging/slog.c:975:107: error: passing argument 4 of 'g_io_channel_write_chars' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" -- cgit v1.2.3-54-g00ecf