summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/syslog-ng
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/syslog-ng')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch75
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch29
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch16
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd155
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit (renamed from meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf)2
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch39
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc51
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.16.1.bb16
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb11
9 files changed, 319 insertions, 75 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
new file mode 100644
index 000000000..0fc40be4a
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/0001-syslog-ng-fix-segment-fault-during-service-start.patch
@@ -0,0 +1,75 @@
+From caeccb7bec45f65bc89efa8195b3853368328361 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 17 Sep 2018 12:49:36 +0800
+Subject: [PATCH] syslog-ng: fix segment fault during service start on arm64
+
+service start failed since segment fault on arch arm64,
+syslog-ng have a submodule ivykis, from ivykis V0.42,
+it use pthread_atfork, but for arm64, this symbol is
+not included by libpthread, so cause segment fault.
+
+refer systemd, replace pthread_atfork with __register_atfork
+to fix this problem.
+
+I have create an issue, and this proposal to upstream.
+https://github.com/buytenh/ivykis/issues/15
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/ivykis/src/pthr.h | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/lib/ivykis/src/pthr.h b/lib/ivykis/src/pthr.h
+index a41eaf3..72c5190 100644
+--- a/lib/ivykis/src/pthr.h
++++ b/lib/ivykis/src/pthr.h
+@@ -24,6 +24,16 @@
+ #include <pthread.h>
+ #include <signal.h>
+
++#ifdef __GLIBC__
++/* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc
++ * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against
++ * libpthread, as it is part of glibc anyway. */
++extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle);
++extern void* __dso_handle __attribute__ ((__weak__));
++#else
++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child)
++#endif
++
+ #ifdef HAVE_PRAGMA_WEAK
+ #pragma weak pthread_create
+ #endif
+@@ -36,16 +46,7 @@ static inline int pthreads_available(void)
+
+ #ifdef HAVE_PRAGMA_WEAK
+
+-/*
+- * On Linux, pthread_atfork() is defined in libpthread_nonshared.a,
+- * a static library, and we want to avoid "#pragma weak" for that
+- * symbol because that causes it to be undefined even if you link
+- * libpthread_nonshared.a in explicitly.
+- */
+-#ifndef HAVE_LIBPTHREAD_NONSHARED
+-#pragma weak pthread_atfork
+-#endif
+-
++#pragma weak __register_atfork
+ #pragma weak pthread_create
+ #pragma weak pthread_detach
+ #pragma weak pthread_getspecific
+@@ -73,8 +74,7 @@ static inline int
+ pthr_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
+ {
+ if (pthreads_available())
+- return pthread_atfork(prepare, parent, child);
+-
++ return __register_atfork(prepare, parent, child, __dso_handle);
+ return ENOSYS;
+ }
+
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
deleted file mode 100644
index 5d481f232..000000000
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Fix the memory leak problem when HAVE_ENVIRON is defined
-
-Upstream-Status: Pending
-
-Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
----
-Index: syslog-ng-3.8.1/lib/gprocess.c
-===================================================================
---- syslog-ng-3.8.1.orig/lib/gprocess.c
-+++ syslog-ng-3.8.1/lib/gprocess.c
-@@ -1432,6 +1432,18 @@ g_process_startup_ok(void)
- void
- g_process_finish(void)
- {
-+#ifdef HAVE_ENVIRON
-+ int i = 0;
-+
-+ while (environ[i]) {
-+ g_free(environ[i]);
-+ ++i;
-+ }
-+ if (environ)
-+ g_free(environ);
-+ if (process_opts.argv_orig)
-+ free(process_opts.argv_orig);
-+#endif
- g_process_remove_pidfile();
- }
-
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
index c172e4e74..4f8a3d077 100644
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
@@ -10,21 +10,21 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
configure.ac | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
-Index: syslog-ng-3.8.1/configure.ac
+Index: syslog-ng-3.15.1/configure.ac
===================================================================
---- syslog-ng-3.8.1.orig/configure.ac
-+++ syslog-ng-3.8.1/configure.ac
-@@ -147,6 +147,9 @@ AC_ARG_ENABLE(gprof,
+--- syslog-ng-3.15.1.orig/configure.ac
++++ syslog-ng-3.15.1/configure.ac
+@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof,
AC_ARG_ENABLE(memtrace,
[ --enable-memtrace Enable alternative leak debugging code.])
+AC_ARG_ENABLE(thread-tls,
-+ [ --enable-thread-tls Enable Thread Transport Layer Security support.],,enable_thread_tls="no")
++ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no")
+
AC_ARG_ENABLE(dynamic-linking,
[ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto")
-@@ -486,12 +489,14 @@ dnl ************************************
+@@ -591,12 +594,14 @@ dnl ***************************************************************************
dnl Is the __thread keyword available?
dnl ***************************************************************************
@@ -33,14 +33,14 @@ Index: syslog-ng-3.8.1/configure.ac
-__thread int a;
-]],
-[a=0;])],
--[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")])
+-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")])
+if test "x$enable_thread_tls" != "xno"; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ __thread int a;
+ ]],
+ [a=0;])],
-+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Transport Layer Security is supported by the system")])
++ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")])
+fi
dnl ***************************************************************************
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd
new file mode 100644
index 000000000..9e910caa1
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd
@@ -0,0 +1,155 @@
+@version: 3.15
+#
+# Syslog-ng configuration file, compatible with default Debian syslogd
+# installation. Originally written by anonymous (I can't find his name)
+# Revised, and rewrited by me (SZALAY Attila <sasa@debian.org>)
+
+# First, set some global options.
+options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
+ owner("root"); group("adm"); perm(0640); stats_freq(0);
+ bad_hostname("^gconfd$");
+};
+
+########################
+# Sources
+########################
+# This is the default behavior of sysklogd package
+# Logs may come from unix stream, but not from another machine.
+#
+source s_src { systemd_journal(); internal();
+ file("/proc/kmsg" program_override("kernel"));
+};
+
+# If you wish to get logs from remote machine you should uncomment
+# this and comment the above source line.
+#
+#source s_net { tcp(ip(127.0.0.1) port(1000) authentication(required) encrypt(allow)); };
+
+########################
+# Destinations
+########################
+# First some standard logfile
+#
+destination d_auth { file("/var/log/auth.log"); };
+destination d_cron { file("/var/log/cron.log"); };
+destination d_daemon { file("/var/log/daemon.log"); };
+destination d_kern { file("/var/log/kern.log"); };
+destination d_lpr { file("/var/log/lpr.log"); };
+destination d_mail { file("/var/log/mail.log"); };
+destination d_syslog { file("/var/log/syslog"); };
+destination d_user { file("/var/log/user.log"); };
+destination d_uucp { file("/var/log/uucp.log"); };
+
+# This files are the log come from the mail subsystem.
+#
+destination d_mailinfo { file("/var/log/mail/mail.info"); };
+destination d_mailwarn { file("/var/log/mail/mail.warn"); };
+destination d_mailerr { file("/var/log/mail/mail.err"); };
+
+# Logging for INN news system
+#
+destination d_newscrit { file("/var/log/news/news.crit"); };
+destination d_newserr { file("/var/log/news/news.err"); };
+destination d_newsnotice { file("/var/log/news/news.notice"); };
+
+# Some 'catch-all' logfiles.
+#
+destination d_debug { file("/var/log/debug"); };
+destination d_error { file("/var/log/error"); };
+destination d_messages { file("/var/log/messages"); };
+
+# The root's console.
+#
+destination d_console { usertty("root"); };
+
+# Virtual console.
+#
+destination d_console_all { file("/dev/tty10"); };
+
+# The named pipe /dev/xconsole is for the nsole' utility. To use it,
+# you must invoke nsole' with the -file' option:
+#
+# $ xconsole -file /dev/xconsole [...]
+#
+destination d_xconsole { pipe("/dev/xconsole"); };
+
+# Send the messages to an other host
+#
+#destination d_net { tcp("127.0.0.1" port(1000) authentication(on) encrypt(on) log_fifo_size(1000)); };
+
+# Debian only
+destination d_ppp { file("/var/log/ppp.log"); };
+
+########################
+# Filters
+########################
+# Here's come the filter options. With this rules, we can set which
+# message go where.
+
+filter f_dbg { level(debug); };
+filter f_info { level(info); };
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_err { level(err); };
+filter f_crit { level(crit .. emerg); };
+
+filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
+filter f_error { level(err .. emerg) ; };
+filter f_messages { level(info,notice,warn) and
+ not facility(auth,authpriv,cron,daemon,mail,news); };
+
+filter f_auth { facility(auth, authpriv) and not filter(f_debug); };
+filter f_cron { facility(cron) and not filter(f_debug); };
+filter f_daemon { facility(daemon) and not filter(f_debug); };
+filter f_kern { facility(kern) and not filter(f_debug); };
+filter f_lpr { facility(lpr) and not filter(f_debug); };
+filter f_local { facility(local0, local1, local3, local4, local5,
+ local6, local7) and not filter(f_debug); };
+filter f_mail { facility(mail) and not filter(f_debug); };
+filter f_news { facility(news) and not filter(f_debug); };
+filter f_syslog3 { not facility(auth, authpriv, mail) and not filter(f_debug); };
+filter f_user { facility(user) and not filter(f_debug); };
+filter f_uucp { facility(uucp) and not filter(f_debug); };
+
+filter f_cnews { level(notice, err, crit) and facility(news); };
+filter f_cother { level(debug, info, notice, warn) or facility(daemon, mail); };
+
+filter f_ppp { facility(local2) and not filter(f_debug); };
+filter f_console { level(warn .. emerg); };
+
+########################
+# Log paths
+########################
+log { source(s_src); filter(f_auth); destination(d_auth); };
+log { source(s_src); filter(f_cron); destination(d_cron); };
+log { source(s_src); filter(f_daemon); destination(d_daemon); };
+log { source(s_src); filter(f_kern); destination(d_kern); };
+log { source(s_src); filter(f_lpr); destination(d_lpr); };
+log { source(s_src); filter(f_syslog3); destination(d_syslog); };
+log { source(s_src); filter(f_user); destination(d_user); };
+log { source(s_src); filter(f_uucp); destination(d_uucp); };
+
+log { source(s_src); filter(f_mail); destination(d_mail); };
+#log { source(s_src); filter(f_mail); filter(f_info); destination(d_mailinfo); };
+#log { source(s_src); filter(f_mail); filter(f_warn); destination(d_mailwarn); };
+#log { source(s_src); filter(f_mail); filter(f_err); destination(d_mailerr); };
+
+log { source(s_src); filter(f_news); filter(f_crit); destination(d_newscrit); };
+log { source(s_src); filter(f_news); filter(f_err); destination(d_newserr); };
+log { source(s_src); filter(f_news); filter(f_notice); destination(d_newsnotice); };
+#log { source(s_src); filter(f_cnews); destination(d_console_all); };
+#log { source(s_src); filter(f_cother); destination(d_console_all); };
+
+#log { source(s_src); filter(f_ppp); destination(d_ppp); };
+
+log { source(s_src); filter(f_debug); destination(d_debug); };
+log { source(s_src); filter(f_error); destination(d_error); };
+log { source(s_src); filter(f_messages); destination(d_messages); };
+
+log { source(s_src); filter(f_console); destination(d_console_all);
+ destination(d_xconsole); };
+log { source(s_src); filter(f_crit); destination(d_console); };
+
+# All messages send to a remote site
+#
+#log { source(s_src); destination(d_net); };
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
index 0c6f54355..fb183ee17 100644
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
@@ -1,4 +1,4 @@
-@version: 3.8
+@version: 3.15
#
# Syslog-ng configuration file, compatible with default Debian syslogd
# installation. Originally written by anonymous (I can't find his name)
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch
index 6b30c20c1..39c3f59ce 100644
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch
@@ -7,25 +7,40 @@ Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start
Upstream-Status: pending
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+Updated-by: Andrej Valek <andrej.valek@siemens.com>
---
contrib/systemd/syslog-ng.service | 5 ++---
1 file changed, 2 insertion(+), 3 deletions(-)
-diff --git a/contrib/systemd/syslog-ng.service b/contrib/systemd/syslog-ng.service
-index fc16f8d..8e09deb 100644
---- a/contrib/systemd/syslog-ng.service
-+++ b/contrib/systemd/syslog-ng.service
-@@ -4,8 +4,8 @@ Description=System Logger Daemon
-
- [Service]
+diff --git a/contrib/systemd/syslog-ng@.service b/contrib/systemd/syslog-ng@.service
+index a28640e..93aec94 100644
+--- a/contrib/systemd/syslog-ng@.service
++++ b/contrib/systemd/syslog-ng@.service
+@@ -7,8 +7,8 @@ Conflicts=emergency.service emergency.target
Type=notify
--ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS
+ EnvironmentFile=-/etc/default/syslog-ng@%i
+ EnvironmentFile=-/etc/sysconfig/syslog-ng@%i
+-ExecStart=/usr/sbin/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE
-ExecReload=/bin/kill -HUP $MAINPID
-+ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid
++ExecStart=@SBINDIR@/syslog-ng -F $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE
+ExecReload=@BASEBINDIR@/kill -HUP $MAINPID
- EnvironmentFile=-/etc/default/syslog-ng
- EnvironmentFile=-/etc/sysconfig/syslog-ng
StandardOutput=journal
+ StandardError=journal
+ Restart=on-failure
+diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default
+index 02da288..3a8215d 100644
+--- a/contrib/systemd/syslog-ng@default
++++ b/contrib/systemd/syslog-ng@default
+@@ -1,5 +1,5 @@
+-CONFIG_FILE=/etc/syslog-ng.conf
+-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist
+-CONTROL_FILE=/var/lib/syslog-ng/syslog-ng.ctl
+-PID_FILE=/var/run/syslog-ng.pid
++CONFIG_FILE=/etc/syslog-ng/syslog-ng.conf
++PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist
++CONTROL_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.ctl
++PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid
+ OTHER_OPTIONS="--enable-core"
+
--
1.8.4.2
-
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index 771cdb196..b52deff5e 100644
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -13,15 +13,18 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240"
# util-linux added to get libuuid
-DEPENDS = "libpcre flex eventlog glib-2.0 openssl util-linux"
+DEPENDS = "libpcre flex glib-2.0 openssl util-linux"
SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \
- file://syslog-ng.conf \
+ file://syslog-ng.conf.systemd \
+ file://syslog-ng.conf.sysvinit \
file://initscript \
file://volatiles.03_syslog-ng \
file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
"
+UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases"
+
inherit autotools gettext systemd pkgconfig update-rc.d
EXTRA_OECONF = " \
@@ -67,15 +70,8 @@ do_configure_prepend() {
cd $olddir
}
-do_install_prepend() {
- sed -i -e 's,@SBINDIR@,${sbindir},g' ${S}/contrib/systemd/*.service
- sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${S}/contrib/systemd/*.service
- sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${S}/contrib/systemd/*.service
-}
-
do_install_append() {
install -d ${D}/${sysconfdir}/${BPN}
- install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
install -d ${D}/${sysconfdir}/init.d
install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog
install -d ${D}/${sysconfdir}/default/volatiles/
@@ -83,16 +79,43 @@ do_install_append() {
install -d ${D}/${localstatedir}/lib/${BPN}
# Remove /var/run as it is created on startup
rm -rf ${D}${localstatedir}/run
+
+ # support for systemd
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf
+
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service
+ install -m 0644 ${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 ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf
+ fi
}
-FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
-RDEPENDS_${PN} += "gawk"
+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}-libs ${PN}-libs-dev ${PN}-libs-dbg"
+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}-libs-dbg = "${libdir}/${BPN}/.debug"
FILES_${PN}-staticdev += "${libdir}/${BPN}/libtest/*.a"
INSANE_SKIP_${PN}-libs = "dev-so"
RDEPENDS_${PN} += "${PN}-libs"
@@ -108,7 +131,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"
RPROVIDES_${PN} += "${PN}-systemd"
RREPLACES_${PN} += "${PN}-systemd"
RCONFLICTS_${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE_${PN} = "${BPN}.service"
+SYSTEMD_SERVICE_${PN} = "${BPN}@.service"
INITSCRIPT_NAME = "syslog"
INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.16.1.bb b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.16.1.bb
new file mode 100644
index 000000000..b5f42cf98
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.16.1.bb
@@ -0,0 +1,16 @@
+require syslog-ng.inc
+
+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://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
+ file://fix-config-libnet.patch \
+ file://fix-invalid-ownership.patch \
+ file://syslog-ng.service-the-syslog-ng-service.patch \
+ file://0001-syslog-ng-fix-segment-fault-during-service-start.patch \
+ "
+
+SRC_URI[md5sum] = "72d44ad02c2e9ba0748b3ecd3f15a7ff"
+SRC_URI[sha256sum] = "c7ee6f1d5e98d86f191964e580111bfa71081ecbb3275cea035bbba177b73a29"
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
deleted file mode 100644
index 91a0e4699..000000000
--- a/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require syslog-ng.inc
-
-SRC_URI += " \
- file://fix-config-libnet.patch \
- file://fix-invalid-ownership.patch \
- file://Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch \
- file://syslog-ng.service-the-syslog-ng-service.patch \
-"
-
-SRC_URI[md5sum] = "acf14563cf5ce435db8db35486ce66af"
-SRC_URI[sha256sum] = "84b081f6e5f98cbc52052e342bcfdc5de5fe0ebe9f5ec32fe9eaec5759224cc5"
OpenPOWER on IntegriCloud