summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng')
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch40
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd11
-rw-r--r--meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit8
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng_4.8.2.bb (renamed from meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb)34
4 files changed, 27 insertions, 66 deletions
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 @@
1From 896d77dd949b52d6ea5798e5a038ba97d6b802be Mon Sep 17 00:00:00 2001
2From: Peter Marko <peter.marko@siemens.com>
3Date: Thu, 4 Apr 2024 15:44:18 +0200
4Subject: [PATCH] macros: guard ipv6 code with SYSLOG_NG_ENABLE_IPV6
5
6With ipv6 disabled, there are linking errors currently.
7This fixes it by not using the symbols when IPv6 is disabled.
8
9Solves #4810 with my config options
10https://github.com/openembedded/meta-openembedded/blob/2487e65ee3842b6ae0c7a2628985be6189ed9ebf/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
11
12Upstream-Status: Submitted [https://github.com/syslog-ng/syslog-ng/pull/4880]
13
14Signed-off-by: Peter Marko <peter.marko@siemens.com>
15---
16 lib/template/macros.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/lib/template/macros.c b/lib/template/macros.c
20index 54142706c..fcb83637f 100644
21--- a/lib/template/macros.c
22+++ b/lib/template/macros.c
23@@ -277,12 +277,14 @@ _get_originating_ip_protocol(const LogMessage *msg)
24 return 0;
25 if (g_sockaddr_inet_check(msg->saddr))
26 return 4;
27+#if SYSLOG_NG_ENABLE_IPV6
28 if (g_sockaddr_inet6_check(msg->saddr))
29 {
30 if (g_sockaddr_inet6_is_v4_mapped(msg->saddr))
31 return 4;
32 return 6;
33 }
34+#endif
35 return 0;
36 }
37
38--
392.30.2
40
diff --git a/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd b/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd
index 851bf252b7..d3f3730105 100644
--- a/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd
+++ b/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd
@@ -1,5 +1,6 @@
1@version: 3.36 1@version: 4.8
2# 2@include "scl.conf"
3
3# Syslog-ng configuration file, compatible with default Debian syslogd 4# Syslog-ng configuration file, compatible with default Debian syslogd
4# installation. Originally written by anonymous (I can't find his name) 5# installation. Originally written by anonymous (I can't find his name)
5# Revised, and rewrited by me (SZALAY Attila <sasa@debian.org>) 6# Revised, and rewrited by me (SZALAY Attila <sasa@debian.org>)
@@ -10,9 +11,9 @@
10# Joe Slater <joe.slater@windriver.com> 11# Joe Slater <joe.slater@windriver.com>
11 12
12# First, set some global options. 13# First, set some global options.
13options { chain_hostnames(off); flush_lines(0); use_dns(no); dns_cache(no); use_fqdn(no); 14options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
14 owner("root"); group("adm"); perm(0640); stats_freq(0); 15 dns_cache(no); owner("root"); group("adm"); perm(0640);
15 bad_hostname("^gconfd$"); 16 stats(freq(0)); bad_hostname("^gconfd$");
16}; 17};
17 18
18######################## 19########################
diff --git a/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit b/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
index 70afd0da84..2b18dce89c 100644
--- a/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
+++ b/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
@@ -1,4 +1,4 @@
1@version: 3.36 1@version: 4.8
2# 2#
3# Syslog-ng configuration file, compatible with default Debian syslogd 3# Syslog-ng configuration file, compatible with default Debian syslogd
4# installation. Originally written by anonymous (I can't find his name) 4# installation. Originally written by anonymous (I can't find his name)
@@ -10,9 +10,9 @@
10# Joe Slater <joe.slater@windriver.com> 10# Joe Slater <joe.slater@windriver.com>
11 11
12# First, set some global options. 12# First, set some global options.
13options { chain_hostnames(off); flush_lines(0); use_dns(no); dns_cache(no); use_fqdn(no); 13options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
14 owner("root"); group("adm"); perm(0640); stats_freq(0); 14 dns_cache(no); owner("root"); group("adm"); perm(0640);
15 bad_hostname("^gconfd$"); 15 stats(freq(0)); bad_hostname("^gconfd$");
16}; 16};
17 17
18######################## 18########################
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.8.2.bb
index 4584944150..1b46d66d6c 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.8.2.bb
@@ -13,7 +13,7 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec" 13LIC_FILES_CHKSUM = "file://COPYING;md5=924958cefc9f7de3e0b818832b8a1cec"
14 14
15# util-linux added to get libuuid 15# util-linux added to get libuuid
16DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl" 16DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native curl json-c"
17 17
18SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ 18SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \
19 file://syslog-ng.conf.systemd \ 19 file://syslog-ng.conf.systemd \
@@ -23,11 +23,10 @@ SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta
23 file://syslog-ng-tmp.conf \ 23 file://syslog-ng-tmp.conf \
24 file://syslog-ng.service-the-syslog-ng-service.patch \ 24 file://syslog-ng.service-the-syslog-ng-service.patch \
25 file://0001-Fix-buildpaths-warning.patch \ 25 file://0001-Fix-buildpaths-warning.patch \
26 file://0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch \
27" 26"
28SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" 27SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch"
29 28
30SRC_URI[sha256sum] = "b69e3360dfb96a754a4e1cbead4daef37128b1152a23572356db4ab64a475d4f" 29SRC_URI[sha256sum] = "7d1ebe70746009dc06bd2fa5c412a1985579a9c887292f766cc775d169d60e68"
31 30
32UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases" 31UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases"
33 32
@@ -60,29 +59,22 @@ PACKAGECONFIG[dbi] = "--enable-sql,--disable-sql,libdbi,"
60PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet," 59PACKAGECONFIG[spoof-source] = "--enable-spoof-source --with-libnet=${STAGING_BINDIR_CROSS},--disable-spoof-source,libnet,"
61PACKAGECONFIG[http] = "--enable-http,--disable-http,curl," 60PACKAGECONFIG[http] = "--enable-http,--disable-http,curl,"
62PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp," 61PACKAGECONFIG[smtp] = "--enable-smtp --with-libesmtp=${STAGING_LIBDIR},--disable-smtp,libesmtp,"
62PACKAGECONFIG[stomp] = "--enable-stomp,--disable-stomp,,"
63PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c," 63PACKAGECONFIG[json] = "--enable-json,--disable-json,json-c,"
64PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers," 64PACKAGECONFIG[tcp-wrapper] = "--enable-tcp-wrapper,--disable-tcp-wrapper,tcp-wrappers,"
65PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip," 65PACKAGECONFIG[geoip] = "--enable-geoip,--disable-geoip,geoip,"
66PACKAGECONFIG[native] = "--enable-native,--disable-native,," 66PACKAGECONFIG[native] = "--enable-native,--disable-native,,"
67 67PACKAGECONFIG[examples] = "--enable-example-modules,--disable-example-modules,,"
68do_configure:prepend() {
69 olddir=$(pwd)
70 cd ${AUTOTOOLS_SCRIPT_PATH}
71
72 ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} -I ${S}/m4 ${ACLOCALEXTRAPATH} || die "extra autoreconf execution failed."
73
74 cd $olddir
75}
76 68
77do_install:append() { 69do_install:append() {
78 install -d ${D}${sysconfdir}/${BPN} 70 install -d ${D}${sysconfdir}/${BPN}
79 install -d ${D}${sysconfdir}/init.d 71 install -d ${D}${sysconfdir}/init.d
80 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog 72 install -m 755 ${UNPACKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
81 73
82 install -d ${D}${sysconfdir}/default/volatiles/ 74 install -d ${D}${sysconfdir}/default/volatiles/
83 install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng 75 install -m 644 ${UNPACKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng
84 install -d ${D}${sysconfdir}/tmpfiles.d/ 76 install -d ${D}${sysconfdir}/tmpfiles.d/
85 install -m 644 ${WORKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf 77 install -m 644 ${UNPACKDIR}/syslog-ng-tmp.conf ${D}${sysconfdir}/tmpfiles.d/syslog-ng.conf
86 78
87 install -d ${D}${localstatedir}/lib/${BPN} 79 install -d ${D}${localstatedir}/lib/${BPN}
88 # Remove /var/run as it is created on startup 80 # Remove /var/run as it is created on startup
@@ -94,7 +86,7 @@ do_install:append() {
94 86
95 # support for systemd 87 # support for systemd
96 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 88 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
97 install -m 644 ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf 89 install -m 644 ${UNPACKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf
98 90
99 install -d ${D}${systemd_unitdir}/system/ 91 install -d ${D}${systemd_unitdir}/system/
100 install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service 92 install -m 644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service
@@ -107,7 +99,7 @@ do_install:append() {
107 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants 99 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
108 ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service 100 ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service
109 else 101 else
110 install -m 644 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf 102 install -m 644 ${UNPACKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf
111 fi 103 fi
112 104
113 oe_multilib_header syslog-ng/syslog-ng-config.h 105 oe_multilib_header syslog-ng/syslog-ng-config.h
@@ -147,3 +139,11 @@ SYSTEMD_SERVICE:${PN} = "${BPN}@.service"
147 139
148INITSCRIPT_NAME = "syslog" 140INITSCRIPT_NAME = "syslog"
149INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." 141INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
142
143# Fails only with 32bit MACHINEs
144# http://errors.yoctoproject.org/Errors/Details/766956/
145# 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]
146# 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]
147# 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]
148# 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]
149CFLAGS += "-Wno-error=incompatible-pointer-types"