added my Recipes
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
From d85a7a3ae2bb9f5267b2af43784633ae8f011f21 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Mon, 13 Mar 2023 09:50:15 +0800
|
||||
Subject: [PATCH] Fix buildpaths warning
|
||||
|
||||
Fix buildpath warning:
|
||||
WARNING: syslog-ng-4.0.1-r0 do_package_qa: QA Issue: File /usr/include/syslog-ng/syslog-ng-config-64.h in package syslog-ng-dev contains reference to TMPDIR [buildpaths]
|
||||
WARNING: syslog-ng-4.0.1-r0 do_package_qa: QA Issue: File /usr/bin/syslog-ng-update-virtualenv in package syslog-ng contains reference to TMPDIR
|
||||
File /usr/bin/pdbtool in package syslog-ng contains reference to TMPDIR [buildpaths]
|
||||
WARNING: syslog-ng-4.0.1-r0 do_package_qa: QA Issue: File /usr/lib/syslog-ng/libdbparser.so in package syslog-ng-libs contains reference to TMPDIR [buildpaths]
|
||||
|
||||
* SYSLOG_NG_PATH_TOPSRC_DIR is /yocto/build/tmp/work/core2-64-poky-linux/syslog-ng/4.0.1-r0,
|
||||
which is used to get xsd dir in build SYSLOG_NG_PATH_TOPSRC_DIR/doc/xsd,
|
||||
which is not suitable for target, set it to "/source" for fixing this buildpath warning
|
||||
|
||||
* SYSTEM_PYTHON is /yocto/build/tmp/hosttools/python3, set to python3
|
||||
for target.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
scripts/syslog-ng-update-virtualenv.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 79a1502..1ad6508 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1930,7 +1930,7 @@ AC_DEFINE_UNQUOTED(PYTHON_SYSCONF_MODULE_DIR, "$python_sysconf_moduledir", [Pyth
|
||||
AC_DEFINE_UNQUOTED(PATH_LOGGENPLUGINDIR, "$loggenplugindir", [loggenplugin installation directory])
|
||||
AC_DEFINE_UNQUOTED(MODULE_PATH, "$module_path", [module search path])
|
||||
AC_DEFINE_UNQUOTED(JAVA_MODULE_PATH, "$java_module_path", [java module search path])
|
||||
-AC_DEFINE_UNQUOTED(PATH_TOPSRC_DIR, "$abs_topsrcdir", [self-defined top_srcdir path])
|
||||
+AC_DEFINE_UNQUOTED(PATH_TOPSRC_DIR, "/source", [self-defined top_srcdir path])
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$PACKAGE_NAME", [package name])
|
||||
|
||||
|
||||
diff --git a/scripts/syslog-ng-update-virtualenv.in b/scripts/syslog-ng-update-virtualenv.in
|
||||
index ed85baf..b1a9e34 100755
|
||||
--- a/scripts/syslog-ng-update-virtualenv.in
|
||||
+++ b/scripts/syslog-ng-update-virtualenv.in
|
||||
@@ -62,7 +62,7 @@ done
|
||||
set -e
|
||||
|
||||
REQUIREMENTS_FILE=${python_moduledir}/requirements.txt
|
||||
-SYSTEM_PYTHON=@PYTHON@
|
||||
+SYSTEM_PYTHON=python3
|
||||
VENV_PYTHON=${python_venvdir}/bin/python
|
||||
|
||||
if [ "$display_prompt" -ne 0 ]; then
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 616446afab61ab98b28c81605e2efd4a689f37d1 Mon Sep 17 00:00:00 2001
|
||||
From: Chen Qi <Qi.Chen@windriver.com>
|
||||
Date: Fri, 20 Jan 2023 14:59:14 +0800
|
||||
Subject: [PATCH] plugin.c: workaround powerpc64le segfaults error
|
||||
|
||||
syslog-ng segfaults on powerpc64le, workaround this error.
|
||||
See https://github.com/syslog-ng/syslog-ng/issues/4285 and
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30062 for more details.
|
||||
This patch should be dropped once the above issues are fixed.
|
||||
|
||||
Upstream-Status: Inappropriate [OE Specific]
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
lib/plugin.c | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/plugin.c b/lib/plugin.c
|
||||
index fbbfb92..3a03617 100644
|
||||
--- a/lib/plugin.c
|
||||
+++ b/lib/plugin.c
|
||||
@@ -528,10 +528,7 @@ plugin_discover_candidate_modules(PluginContext *context)
|
||||
}
|
||||
}
|
||||
g_free(module_name);
|
||||
- if (mod)
|
||||
- g_module_close(mod);
|
||||
- else
|
||||
- mod = NULL;
|
||||
+ mod = NULL;
|
||||
}
|
||||
}
|
||||
g_dir_close(dir);
|
||||
@@ -663,8 +660,7 @@ plugin_list_modules(FILE *out, gboolean verbose)
|
||||
first = FALSE;
|
||||
}
|
||||
g_free(module_name);
|
||||
- if (mod)
|
||||
- g_module_close(mod);
|
||||
+ mod = NULL;
|
||||
}
|
||||
}
|
||||
g_dir_close(dir);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
d /var/run/syslog-ng 0755 root root
|
||||
@@ -0,0 +1,160 @@
|
||||
@version: 3.36
|
||||
#
|
||||
# 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>)
|
||||
#
|
||||
# Move to 3.19
|
||||
# Only change is to add dns_cache(no) to options to suppress initialization warning.
|
||||
#
|
||||
# Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
# First, set some global options.
|
||||
options { chain_hostnames(off); flush_lines(0); use_dns(no); dns_cache(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); };
|
||||
@@ -0,0 +1,160 @@
|
||||
@version: 3.36
|
||||
#
|
||||
# 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>)
|
||||
#
|
||||
# Move to 3.19
|
||||
# Only change is to add dns_cache(no) to options to suppress initialization warning.
|
||||
#
|
||||
# Joe Slater <joe.slater@windriver.com>
|
||||
|
||||
# First, set some global options.
|
||||
options { chain_hostnames(off); flush_lines(0); use_dns(no); dns_cache(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); };
|
||||
@@ -0,0 +1,46 @@
|
||||
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>
|
||||
Updated-by: Andrej Valek <andrej.valek@siemens.com>
|
||||
|
||||
Update for 3.24.1
|
||||
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
|
||||
---
|
||||
contrib/systemd/syslog-ng@.service | 4 ++--
|
||||
contrib/systemd/syslog-ng@default | 6 +++---
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
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
|
||||
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 $OTHER_OPTIONS --cfgfile $CONFIG_FILE --control $CONTROL_FILE --persist-file $PERSIST_FILE --pidfile $PID_FILE
|
||||
+ExecReload=@BASEBINDIR@/kill -HUP $MAINPID
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
Restart=on-failure
|
||||
diff --git a/contrib/systemd/syslog-ng@default b/contrib/systemd/syslog-ng@default
|
||||
index 0ccc2b9..7f08c0e 100644
|
||||
--- a/contrib/systemd/syslog-ng@default
|
||||
+++ b/contrib/systemd/syslog-ng@default
|
||||
@@ -1,5 +1,5 @@
|
||||
CONFIG_FILE=/etc/syslog-ng/syslog-ng.conf
|
||||
-PERSIST_FILE=/var/lib/syslog-ng/syslog-ng.persist
|
||||
-CONTROL_FILE=/var/run/syslog-ng.ctl
|
||||
-PID_FILE=/var/run/syslog-ng.pid
|
||||
+PERSIST_FILE=@LOCALSTATEDIR@/lib/syslog-ng/syslog-ng.persist
|
||||
+CONTROL_FILE=@LOCALSTATEDIR@/run/syslog-ng/syslog-ng.ctl
|
||||
+PID_FILE=@LOCALSTATEDIR@/run/syslog-ng.pid
|
||||
OTHER_OPTIONS="--enable-core"
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
d root root 0755 /var/run/syslog-ng none
|
||||
@@ -0,0 +1,146 @@
|
||||
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=71d15c2fb22f43e1a380f3f799ebde30"
|
||||
|
||||
# util-linux added to get libuuid
|
||||
DEPENDS = "libpcre flex glib-2.0 openssl util-linux bison-native"
|
||||
|
||||
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] = "c16eafe447191c079f471846182876b7919d3d789af8c1f9fe55ab14521ceb2c"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/balabit/syslog-ng/releases"
|
||||
|
||||
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 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
|
||||
|
||||
install -d ${D}${sysconfdir}/default/volatiles/
|
||||
install -m 644 ${WORKDIR}/volatiles.03_syslog-ng ${D}${sysconfdir}/default/volatiles/03_syslog-ng
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d/
|
||||
install -m 644 ${WORKDIR}/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 ${WORKDIR}/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 ${WORKDIR}/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 ."
|
||||
Reference in New Issue
Block a user