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/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-.patch47
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch63
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch25
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/initscript62
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf155
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch31
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/files/volatiles.03_syslog-ng1
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc114
-rw-r--r--meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb11
10 files changed, 538 insertions, 0 deletions
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
new file mode 100644
index 000000000..5d481f232
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/Fix-the-memory-leak-problem-when-HAVE_ENVIRON-defined.patch
@@ -0,0 +1,29 @@
+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
new file mode 100644
index 000000000..c172e4e74
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/configure.ac-add-option-enable-thread-tls-to-manage-.patch
@@ -0,0 +1,47 @@
+configure.ac: add option --enable-thread-tls to manage thread ssl support
+
+Add option --enable-thread-tls to manage the including of thread
+local storage, so we could explicitly disable it.
+
+Upstream-Status: Pending
+
+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
+===================================================================
+--- syslog-ng-3.8.1.orig/configure.ac
++++ syslog-ng-3.8.1/configure.ac
+@@ -147,6 +147,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")
++
+ AC_ARG_ENABLE(dynamic-linking,
+ [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto")
+
+@@ -486,12 +489,14 @@ dnl ************************************
+ dnl Is the __thread keyword available?
+ dnl ***************************************************************************
+
+-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")])
++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")])
++fi
+
+ dnl ***************************************************************************
+ dnl How to do static linking?
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch
new file mode 100644
index 000000000..553f4a517
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-config-libnet.patch
@@ -0,0 +1,63 @@
+Subject: [PATCH] add libnet enable option
+
+Upstream-Status: Pending
+
+This would avoid a implicit auto-detecting result.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 27 +++++++++++++++++----------
+ 1 files changed, 17 insertions(+), 10 deletions(-)
+
+Index: syslog-ng-3.8.1/configure.ac
+===================================================================
+--- syslog-ng-3.8.1.orig/configure.ac
++++ syslog-ng-3.8.1/configure.ac
+@@ -104,6 +104,9 @@ AC_CONFIG_HEADERS(config.h)
+ dnl ***************************************************************************
+ dnl Arguments
+
++AC_ARG_ENABLE(libnet,
++ [ --enable-libnet Enable libnet support.],, enable_libnet="no")
++
+ AC_ARG_WITH(libnet,
+ [ --with-libnet=path use path to libnet-config script],
+ ,
+@@ -893,22 +896,26 @@ dnl ************************************
+ dnl libnet headers/libraries
+ dnl ***************************************************************************
+ AC_MSG_CHECKING(for LIBNET)
+-if test "x$with_libnet" = "x"; then
+- LIBNET_CONFIG="`which libnet-config`"
+-else
+- LIBNET_CONFIG="$with_libnet/libnet-config"
+-fi
++if test "x$enable_libnet" = xyes; then
++ if test "x$with_libnet" = "x"; then
++ LIBNET_CONFIG="`which libnet-config`"
++ else
++ LIBNET_CONFIG="$with_libnet/libnet-config"
++ fi
++
++ if test -n "$LIBNET_CONFIG" -a -x "$LIBNET_CONFIG"; then
++ LIBNET_CFLAGS="`$LIBNET_CONFIG --defines`"
++ LIBNET_LIBS="`$LIBNET_CONFIG --libs`"
++ AC_MSG_RESULT(yes)
++ else
++ AC_MSG_ERROR([Could not find libnet, and libnet support was explicitly enabled.])
++ fi
+
+-if test -n "$LIBNET_CONFIG" -a -x "$LIBNET_CONFIG"; then
+- LIBNET_CFLAGS="`$LIBNET_CONFIG --defines`"
+- LIBNET_LIBS="`$LIBNET_CONFIG --libs`"
+- AC_MSG_RESULT(yes)
+ else
+ LIBNET_LIBS=
+ AC_MSG_RESULT(no)
+ fi
+
+-
+ if test "x$enable_spoof_source" = "xauto"; then
+ AC_MSG_CHECKING(whether to enable spoof source support)
+ if test "x$LIBNET_LIBS" != "x"; then
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch
new file mode 100644
index 000000000..54ecce57e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/fix-invalid-ownership.patch
@@ -0,0 +1,25 @@
+syslog-ng: fix wrong ownership issue
+
+Upstream-Status: Pending
+
+The ownership of build user is preserved for some target files, fixed it by
+adding --no-same-owner option to tar when extracting files.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+---
+ scl/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+Index: syslog-ng-3.8.1/scl/Makefile.am
+===================================================================
+--- syslog-ng-3.8.1.orig/scl/Makefile.am
++++ syslog-ng-3.8.1/scl/Makefile.am
+@@ -27,7 +27,7 @@ scl-install-data-local:
+ fi; \
+ done
+ $(mkinstalldirs) $(DESTDIR)/$(scldir)
+- (cd $(srcdir)/scl; tar cf - $(SCL_SUBDIRS)) | (cd $(DESTDIR)/$(scldir) && tar xf -)
++ (cd $(srcdir)/scl; tar cf - $(SCL_SUBDIRS)) | (cd $(DESTDIR)/$(scldir) && tar xf - --no-same-owner)
+ chmod -R u+rwX $(DESTDIR)/$(scldir)
+
+ scl-uninstall-local:
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/initscript b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/initscript
new file mode 100644
index 000000000..910030f41
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/initscript
@@ -0,0 +1,62 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/syslog-ng and type
+# > update-rc.d syslog-ng defaults 5
+#
+
+# Source function library
+. /etc/init.d/functions
+
+syslog_ng=/usr/sbin/syslog-ng
+test -x "$syslog_ng" || exit 0
+
+PIDFILE=/var/run/syslog-ng/syslog-ng.pid
+
+create_xconsole() {
+ test -e /dev/xconsole || mknod -m 640 /dev/xconsole p
+ test -x /sbin/restorecon && /sbin/restorecon /dev/xconsole
+}
+
+RETVAL=0
+
+case "$1" in
+ start)
+ [ "${VERBOSE}" != "no" ] && echo -n "Starting syslog-ng:"
+ create_xconsole
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $syslog_ng
+ [ "${VERBOSE}" != "no" ] && echo "."
+ ;;
+ stop)
+ [ "${VERBOSE}" != "no" ] && echo -n "Stopping syslog-ng:"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ [ "${VERBOSE}" != "no" ] && echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec $syslog_ng
+ ;;
+ restart)
+ echo "Stopping syslog-ng:"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ echo -n "Waiting for syslog-ng to die off"
+ for i in 1 2 3 ;
+ do
+ sleep 1
+ echo -n "."
+ done
+ echo ""
+ echo -n "Starting syslog-ng:"
+ create_xconsole
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $syslog_ng
+ echo "."
+ ;;
+ status)
+ status $syslog_ng
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|reload|restart|force-reload|status}"
+ exit 1
+esac
+
+exit $RETVAL
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
new file mode 100644
index 000000000..0c6f54355
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf
@@ -0,0 +1,155 @@
+@version: 3.8
+#
+# 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 { unix-dgram("/dev/log"); 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.service-the-syslog-ng-service.patch b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch
new file mode 100644
index 000000000..6b30c20c1
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch
@@ -0,0 +1,31 @@
+From 0be9c08dd3f825e92fa02d4a08d8aff743109e61 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Wed, 17 Jun 2015 14:46:30 +0900
+Subject: [PATCH] syslog-ng.service: the syslog-ng service can not start
+ successfully,so modify it.
+
+Upstream-Status: pending
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.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]
+ Type=notify
+-ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS
+-ExecReload=/bin/kill -HUP $MAINPID
++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid
++ExecReload=@BASEBINDIR@/kill -HUP $MAINPID
+ EnvironmentFile=-/etc/default/syslog-ng
+ EnvironmentFile=-/etc/sysconfig/syslog-ng
+ StandardOutput=journal
+--
+1.8.4.2
+
diff --git a/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/volatiles.03_syslog-ng b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/volatiles.03_syslog-ng
new file mode 100644
index 000000000..3c4a50d54
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/files/volatiles.03_syslog-ng
@@ -0,0 +1 @@
+d root root 0755 /var/run/syslog-ng none
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
new file mode 100644
index 000000000..771cdb196
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -0,0 +1,114 @@
+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 = "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"
+
+SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \
+ file://syslog-ng.conf \
+ file://initscript \
+ file://volatiles.03_syslog-ng \
+ file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
+"
+
+inherit autotools gettext systemd pkgconfig update-rc.d
+
+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} \
+ ${CONFIG_TLS} \
+"
+
+CONFIG_TLS = "--enable-thread-tls"
+CONFIG_TLS_arm = "${@oe.utils.conditional( "DEBUG_BUILD", "1", " --disable-thread-tls", " --enable-thread-tls", d )}"
+
+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[libnet] = "--enable-libnet --with-libnet=${STAGING_BINDIR_CROSS},--disable-libnet,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_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/
+ install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng
+ install -d ${D}/${localstatedir}/lib/${BPN}
+ # Remove /var/run as it is created on startup
+ rm -rf ${D}${localstatedir}/run
+}
+
+FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools"
+RDEPENDS_${PN} += "gawk"
+
+# This overcomes the syslog-ng rdepends on syslog-ng-dev QA Error
+PACKAGES =+ "${PN}-libs ${PN}-libs-dev ${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"
+
+CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
+
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important
+RDEPENDS_${PN} += " ${@oe.utils.conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
+
+RCONFLICTS_${PN} = "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 ."
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
new file mode 100644
index 000000000..91a0e4699
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.8.1.bb
@@ -0,0 +1,11 @@
+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