syslog-ng: fix syslog-ng startup problem with systemd
PATCH 1/1 syslog-ng: fix syslog-ng startup problem with systemd
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket, bind() failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire /run/systemd/journal/syslog socket, disabling systemd-syslog source;
1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(define PATH_CONTROL_SOCKET SYSLOG_NG_PATH_PIDFILEDIR "/syslog-ng.ctl"), path of control socket also
will be /var/run/syslog-ng, but after boot, there is no directory syslog-ng under /var/run, so this will not work for systemd. here change initscript to /var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use /var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.
2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.
but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit
meta-oe/recipes-support/syslog-ng/files/initscript +1 -1
@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole p
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0 -155
155 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157 -0
157 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155 -0
155 lines not on this page · raw message
meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1 -1
@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ng
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +7 -3
@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \
@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "
@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/
Signature · 1 line
2.7.4
Can you rebase and resend it on top of master-next please
Quoted 591 lines · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-) delete mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-155@@ -1,155 +0,0 @@ -@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 <[email protected]>) - -# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157
-0@@ -0,0 +1,157 @@ +@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 <[email protected]>) + +# 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(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155
-0@@ -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 <[email protected]>) + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-4@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --2.7.4
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
OK, I will send later. :-)
Quoted 593 lines · Khem Raj
Can you rebase and resend it on top of master-next please
Quoted 590 lines · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/syslog-ng.confcreate mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-155@@ -1,155 +0,0 @@ -@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 <[email protected]>) - -# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157
-0@@ -0,0 +1,157 @@ +@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 <[email protected]>) + +# 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(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155
-0@@ -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 <[email protected]>) + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-4@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --2.7.4
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 4 lines
BRs Sandy(Li Changqing) +861084778653
By the way, I notice that there is no difference between master and master-next for "meta-oe/recipes-support/syslog-ng"
Can I know why we need a patch based on master-next? Seems the patch will same for master and master-next.
Thanks.
Quoted 593 lines · Khem Raj
Can you rebase and resend it on top of master-next please
Quoted 590 lines · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/syslog-ng.confcreate mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-155@@ -1,155 +0,0 @@ -@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 <[email protected]>) - -# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157
-0@@ -0,0 +1,157 @@ +@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 <[email protected]>) + +# 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(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155
-0@@ -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 <[email protected]>) + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-4@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --2.7.4
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 4 lines
BRs Sandy(Li Changqing) +861084778653
Quoted 4 lines · Changqing Li
By the way, I notice that there is no difference between master and master-next for "meta-oe/recipes-support/syslog-ng"
pwclient fails to cherry-pick this patch. and me solving conflicts here can be error prone.
Quoted 3 lines
Can I know why we need a patch based on master-next? Seems the patch will same for master and master-next.
since master-next is where the queue for upcoming patches is and sometimes there are related patches which should be sequenced. Look at my email sent about master-next
Quoted 603 lines
Thanks.
Quoted 588 lines · Khem Raj
Can you rebase and resend it on top of master-next please
Quoted 585 lines · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/syslog-ng.confcreate mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-155@@ -1,155 +0,0 @@ -@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 <[email protected]>) - -# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157
-0@@ -0,0 +1,157 @@ +@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 <[email protected]>) + +# 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(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155
-0@@ -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 <[email protected]>) + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-4@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --2.7.4
Quoted 5 lines
Quoted 5 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
BRsSandy(Li Changqing)
+861084778653
Quoted 8 lines · Khem Raj
Quoted 3 lines · Changqing Li
By the way, I notice that there is no difference between master and master-next for "meta-oe/recipes-support/syslog-ng"
pwclient fails to cherry-pick this patch. and me solving conflicts here can be error prone.
Quoted 6 lines
Quoted 3 lines
Can I know why we need a patch based on master-next? Seems the patch will same for master and master-next.
since master-next is where the queue for upcoming patches is and sometimes there are related patches which should be sequenced. Look at my email sent about master-next
Thanks. I can see this conflicts commit now. I use local mirror just now, so don't see the commit timely. Now I got your mean. And I will resend a patch based on master-next later.
//changqing li
Quoted 602 lines
Quoted 602 lines
Thanks.
Quoted 588 lines · Khem Raj
Can you rebase and resend it on top of master-next please
Quoted 585 lines · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the
systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/syslog-ng.confcreate mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pid create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-155@@ -1,155 +0,0 @@ -@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 <[email protected]>) - -# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +157
-0@@ -0,0 +1,157 @@ +@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 <[email protected]>) + +# 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(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +155
-0@@ -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 <[email protected]>) + +# 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +7
-4@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() { do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --2.7.4
Quoted 5 lines
Quoted 5 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
BRsSandy(Li Changqing)
+861084778653
Signature · 4 lines
BRs Sandy(Li Changqing) +861084778653
Quoted 27 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Changqing Li
Sent: den 15 juni 2018 10:08
To: Khem Raj <[email protected]>
Cc: openembeded-devel <[email protected]>
Subject: Re: [oe] [PATCH] syslog-ng: fix syslog-ng startup problem with systemdQuoted 5 lines · Khem Raj
Quoted 3 lines · Changqing Li
By the way, I notice that there is no difference between master and master-next for "meta-oe/recipes-support/syslog-ng"
Quoted 7 lines
pwclient fails to cherry-pick this patch. and me solving conflicts here can be error prone.
Quoted 3 lines
Can I know why we need a patch based on master-next? Seems the patch will same for master and master-next.
since master-next is where the queue for upcoming patches is and
sometimes there
Quoted 2 lines
are related patches which should be sequenced. Look at my email sent about master-next
Quoted 13 lines
Thanks. I can see this conflicts commit now. I use local mirror
just now, so don't see the commit
timely. Now I got your mean. And I will resend a patch based on
master-next later.//changqing li
Quoted 7 lines
Quoted 7 lines
Thanks.
Quoted 4 lines · Khem Raj
Can you rebase and resend it on top of master-next please
Quoted 1 line · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
A general recommendation for Git commits is to keep the line lengths within 72 characters. I do not know if OE has some actual requirements on this, but I've personally found it to be a good recommendation to make Git logs more readable.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.
I don't think switching to /var/lib is the right thing to do. /var/run is tmpfs, but /var/lib may be persistent if the rootfs is writable.
The non-existing directory is easily fixed by adding an ExecStartPre to the service file. We use this local patch to fix the problem:
From e4860d18a4e2811a5970a5ff8e66af993882172f Mon Sep 17 00:00:00 2001
From: Yang Lyu <[email protected]>
Date: Mon, 15 May 2017 14:36:20 +0200
Subject: [PATCH] syslog-ng: change path for persist file and pid file
--- contrib/systemd/syslog-ng.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
contrib/systemd/syslog-ng.service +2 -1
@@ -4,7 +4,8 @@ Documentation=man:syslog-ng(8) [Service] Type=notify -ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid +ExecStartPre=@BASEBINDIR@/mkdir -p @LOCALSTATEDIR@/run/syslog-ng +ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslog-ng/syslogd.pid -R @LOCALSTATEDIR@/run/syslog-ng/syslog-ng.persist ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ng
Signature · 1 line
2.1.4
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
2. To fix the Failed info:
According below content of admin guide of current version of syslog-ng, change source to systemd-journal of syslog-ng.conf for systemd.
1) for linux, If the host is running under systemd, syslog-ng OSE reads directly from the systemd journal file using the systemd-journal() source.
2) If possible, use the more reliable systemd-journal() driver instead.
3) The socket activation of systemd is buggy, causing some log messages to get lost during system startup.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
but sysvinit not recognize systemd-journal, so seperate it to 2 conf, and install according to current config.
This part of the patch is hard to review due to the removed file/added files. Can you use -M and/or -C as options to git format-patch so that the renamed/copied files are detected and the patch minimized?
Quoted 638 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Signed-off-by Changqing Li <[email protected]>--- meta-oe/recipes-support/syslog-ng/files/initscript | 2 +- .../recipes-support/syslog-ng/files/syslog-ng.conf | 155 -------------------- .../syslog-ng/files/syslog-ng.conf.systemd | 157 +++++++++++++++++++++ .../syslog-ng/files/syslog-ng.conf.sysvinit | 155 ++++++++++++++++++++ .../syslog-ng.service-the-syslog-ng-service.patch | 2 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- 6 files changed, 321 insertions(+), 160 deletions(-)delete mode 100644
meta-oe/recipes-support/syslog-ng/files/syslog-ng.confcreate mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd create mode 100644 meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinitmeta-oe/recipes-support/syslog-ng/files/initscript +1
-1@@ -11,7 +11,7 @@ syslog_ng=/usr/sbin/syslog-ng test -x "$syslog_ng" || exit 0 -PIDFILE=/var/run/syslog-ng/syslog-ng.pid +PIDFILE=/var/lib/syslog-ng/syslog-ng.pidQuoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 3
Quoted 11 lines
meta-oe/recipes-support/syslog-ng/files/initscript +0
-0create_xconsole() { test -e /dev/xconsole || mknod -m 640 /dev/xconsole pmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-3@@ -1,155 +0,0 @@ -@version: 3.8 -# -# Syslog-ng configuration file, compatible with default Debiansyslogd
Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 4
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-# installation. Originally written by anonymous (I can't find hisname)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 8
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-4-# Revised, and rewrited by me (SZALAY Attila <[email protected]>) - -# First, set some global options. -options { chain_hostnames(off); flush_lines(0); use_dns(no);
use_fqdn(no);Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-4- owner("root"); group("adm"); perm(0640); stats_freq(0); - bad_hostname("^gconfd$"); -}; -Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 20
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-8-######################## -# 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"));Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 23
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-3-}; - -# If you wish to get logs from remote machine you shoulduncomment
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 26
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-3-# this and comment the above source line. -# -#source s_net { tcp(ip(127.0.0.1) port(1000)authentication(required) encrypt(allow)); };
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-35- -######################## -# 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.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 69
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-8-# -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 useit,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 78
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-9-# 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)); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 86
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-8- -# Debian only -destination d_ppp { file("/var/log/ppp.log"); }; - -######################## -# Filters -######################## -# Here's come the filter options. With this rules, we can setwhich
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 96
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-10-# 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); };
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 99
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-3-filter f_error { level(err .. emerg) ; }; -filter f_messages { level(info,notice,warn) and - not
facility(auth,authpriv,cron,daemon,mail,news); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 101
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-2- -filter f_auth { facility(auth, authpriv) and not filter(f_debug);};
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 107
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-6-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);};
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 110
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-3-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); };Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 115
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-5-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); };Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-10- -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); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 133
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-8-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); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 134
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-#log { source(s_src); filter(f_mail); filter(f_warn);
destination(d_mailwarn); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 135
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-#log { source(s_src); filter(f_mail); filter(f_err);
destination(d_mailerr); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 137
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-2- -log { source(s_src); filter(f_news); filter(f_crit);
destination(d_newscrit); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 138
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-log { source(s_src); filter(f_news); filter(f_err);
destination(d_newserr); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 139
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-log { source(s_src); filter(f_news); filter(f_notice);
destination(d_newsnotice); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 140
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-#log { source(s_src); filter(f_cnews);
destination(d_console_all); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 141
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-1-#log { source(s_src); filter(f_cother);
destination(d_console_all); };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 147
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-6- -#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);};
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf line 149
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-2- -log { source(s_src); filter(f_console);
destination(d_console_all);Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf deleted +0
-6- 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd +0
-0Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 3
Quoted 8 lines
new file mode 100644
index 0000000..d21fa1fmeta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +3
-0@@ -0,0 +1,157 @@ +@version: 3.8 +# +# Syslog-ng configuration file, compatible with default Debiansyslogd
Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 4
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+# installation. Originally written by anonymous (I can't find hisname)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 8
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +4
-0+# Revised, and rewrited by me (SZALAY Attila <[email protected]>) + +# First, set some global options. +options { chain_hostnames(off); flush_lines(0); use_dns(no);
use_fqdn(no);Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +9
-0+ 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.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 25
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +8
-0+# +source s_src { + systemd-journal(); + file("/proc/kmsg" program-override("kernel")); + internal(); +}; + +# If you wish to get logs from remote machine you shoulduncomment
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 28
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +3
-0+# this and comment the above source line. +# +#source s_net { tcp(ip(127.0.0.1) port(1000)authentication(required) encrypt(allow)); };
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +35
-0+ +######################## +# 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.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 71
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +8
-0+# +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 useit,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 80
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +9
-0+# 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)); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 88
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +8
-0+ +# Debian only +destination d_ppp { file("/var/log/ppp.log"); }; + +######################## +# Filters +######################## +# Here's come the filter options. With this rules, we can setwhich
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 98
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +10
-0+# 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); };
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 101
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +3
-0+filter f_error { level(err .. emerg) ; }; +filter f_messages { level(info,notice,warn) and + not
facility(auth,authpriv,cron,daemon,mail,news); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 103
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +2
-0+ +filter f_auth { facility(auth, authpriv) and not filter(f_debug);};
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 109
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +6
-0+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);};
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 112
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +3
-0+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); };Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 117
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +5
-0+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); };Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +10
-0+ +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); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 135
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +8
-0+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); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 136
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+#log { source(s_src); filter(f_mail); filter(f_warn);
destination(d_mailwarn); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 137
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+#log { source(s_src); filter(f_mail); filter(f_err);
destination(d_mailerr); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 139
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +2
-0+ +log { source(s_src); filter(f_news); filter(f_crit);
destination(d_newscrit); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 140
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+log { source(s_src); filter(f_news); filter(f_err);
destination(d_newserr); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 141
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+log { source(s_src); filter(f_news); filter(f_notice);
destination(d_newsnotice); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 142
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+#log { source(s_src); filter(f_cnews);
destination(d_console_all); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 143
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +1
-0+#log { source(s_src); filter(f_cother);
destination(d_console_all); };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 149
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +6
-0+ +#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);};
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd line 151
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +2
-0+ +log { source(s_src); filter(f_console);
destination(d_console_all);Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.systemd new file +6
-0+ 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit +0
-0Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 3
Quoted 8 lines
new file mode 100644
index 0000000..4a059d4meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +3
-0@@ -0,0 +1,155 @@ +@version: 3.8 +# +# Syslog-ng configuration file, compatible with default Debiansyslogd
Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 4
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+# installation. Originally written by anonymous (I can't find hisname)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 8
Quoted 4 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +4
-0+# Revised, and rewrited by me (SZALAY Attila <[email protected]>) + +# First, set some global options. +options { chain_hostnames(off); flush_lines(0); use_dns(no);
use_fqdn(no);Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +7
-0+ owner("root"); group("adm"); perm(0640); stats_freq(0); + bad_hostname("^gconfd$"); +}; + +######################## +# Sources +########################Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 23
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +8
-0+# 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 shoulduncomment
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 26
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +3
-0+# this and comment the above source line. +# +#source s_net { tcp(ip(127.0.0.1) port(1000)authentication(required) encrypt(allow)); };
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +35
-0+ +######################## +# 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.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 69
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +8
-0+# +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 useit,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 78
Quoted 9 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +9
-0+# 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)); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 86
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +8
-0+ +# Debian only +destination d_ppp { file("/var/log/ppp.log"); }; + +######################## +# Filters +######################## +# Here's come the filter options. With this rules, we can setwhich
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 96
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +10
-0+# 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); };
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 99
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +3
-0+filter f_error { level(err .. emerg) ; }; +filter f_messages { level(info,notice,warn) and + not
facility(auth,authpriv,cron,daemon,mail,news); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 101
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +2
-0+ +filter f_auth { facility(auth, authpriv) and not filter(f_debug);};
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 107
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +6
-0+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);};
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 110
Quoted 3 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +3
-0+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); };Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 115
Quoted 5 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +5
-0+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); };Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +10
-0+ +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); };Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 133
Quoted 8 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +8
-0+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); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 134
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+#log { source(s_src); filter(f_mail); filter(f_warn);
destination(d_mailwarn); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 135
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+#log { source(s_src); filter(f_mail); filter(f_err);
destination(d_mailerr); };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 137
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +2
-0+ +log { source(s_src); filter(f_news); filter(f_crit);
destination(d_newscrit); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 138
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+log { source(s_src); filter(f_news); filter(f_err);
destination(d_newserr); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 139
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+log { source(s_src); filter(f_news); filter(f_notice);
destination(d_newsnotice); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 140
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+#log { source(s_src); filter(f_cnews);
destination(d_console_all); };Quoted 1 line
Quoted 1 line
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 141
Quoted 1 line
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +1
-0+#log { source(s_src); filter(f_cother);
destination(d_console_all); };Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 147
Quoted 6 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +6
-0+ +#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);};
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit line 149
Quoted 2 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +2
-0+ +log { source(s_src); filter(f_console);
destination(d_console_all);Quoted 60 lines
Quoted 60 lines
Quoted 43 lines
Quoted 43 lines
meta-oe/recipes-support/syslog-ng/files/syslog-ng.conf.sysvinit new file +6
-0+ 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); };meta-oe/recipes-support/syslog-ng/files/syslog-ng.service-the-syslog-ng-service.patch +1
-1@@ -21,7 +21,7 @@ index fc16f8d..8e09deb 100644 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 ++ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS +ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ngmeta-oe/recipes-support/syslog-ng/syslog-ng.inc +2
-2@@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" 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://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 \@@ -38,7 +39,6 @@ EXTRA_OECONF = " \ --with-librabbitmq-client=no \ --disable-python \ --disable-java --disable-java-modules \ - --with-pidfile-dir=${localstatedir}/run/${BPN} \ ${CONFIG_TLS} \ "@@ -77,7 +77,11 @@ do_install_prepend() {Quoted 14 lines
Quoted 12 lines
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +5
-2do_install_append() { install -d ${D}/${sysconfdir}/${BPN} - install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf + fi install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog install -d ${D}/${sysconfdir}/default/volatiles/ --Quoted 2 lines
2.7.4
--
BRs
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Sandy(Li Changqing)
+861084778653--
BRsSandy(Li Changqing)
+861084778653
//Peter
Quoted 35 lines · Peter Kjellerstedt
Quoted 35 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Changqing Li
Sent: den 15 juni 2018 10:08
To: Khem Raj <[email protected]>
Cc: openembeded-devel <[email protected]>
Subject: Re: [oe] [PATCH] syslog-ng: fix syslog-ng startup problem with systemdQuoted 5 lines · Khem Raj
Quoted 3 lines · Changqing Li
By the way, I notice that there is no difference between master and master-next for "meta-oe/recipes-support/syslog-ng"
Quoted 7 lines
pwclient fails to cherry-pick this patch. and me solving conflicts here can be error prone.
Quoted 3 lines
Can I know why we need a patch based on master-next? Seems the patch will same for master and master-next.
since master-next is where the queue for upcoming patches is and
sometimes there
Quoted 2 lines
are related patches which should be sequenced. Look at my email sent about master-next
Thanks. I can see this conflicts commit now. I use local mirror
just now, so don't see the commit
timely. Now I got your mean. And I will resend a patch based on
master-next later.//changqing li
Quoted 3 lines
Quoted 3 lines
Thanks.
On 06/15/2018 12:48 PM, Khem Raj wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Can you rebase and resend it on top of master-next please
Quoted 1 line · Changqing Li
There are one error and one fail when run "systemctl status syslog-ng"
A general recommendation for Git commits is to keep the line lengths within 72 characters. I do not know if OE has some actual requirements on this, but I've personally found it to be a good recommendation to make Git logs more readable.
Thanks, I will follow this next time.
Quoted 32 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Error opening control socket,
bind()failed; socket='/var/run/syslog-ng/syslog-ng.ctl', error='No such file or directory (2)' Failed to acquire/run/systemd/journal/syslogsocket, disabling systemd-syslog source;1. To fix the error info:
if config with "--with-pidfile-dir=${localstatedir}/run/${BPN}", according to syslog-ng code
(definePATH_CONTROL_SOCKETSYSLOG_NG_PATH_PIDFILEDIR"/syslog-ng.ctl"), path of control socket also
will be/var/run/syslog-ng, but after boot, there is no directory syslog-ng under/var/run, so this will not work for systemd. here change initscript to/var/lib/syslog-ng, and remove --with-pidfile, so that sysVinit and systemd all use/var/lib/syslog-ng, and also remove pid config in the syslog-ng service patch to align the pid file path. so both systemd and sysvinit can work.I don't think switching to
/var/libis the right thing to do./var/runis tmpfs, but/var/libmay be persistent if the rootfs is writable.The non-existing directory is easily fixed by adding an ExecStartPre to the service file. We use this local patch to fix the problem:
From
e4860d18a4e2811a5970a5ff8e66af993882172fMon Sep 17 00:00:00 2001
From: Yang Lyu <[email protected]>
Date: Mon, 15 May 2017 14:36:20 +0200
Subject: [PATCH] syslog-ng: change path for persist file and pid file--- contrib/systemd/syslog-ng.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)contrib/systemd/syslog-ng.service +0
-0
contrib/systemd/syslog-ng.service Documentation=man:syslog-ng(8) · line 11
Quoted 9 lines
contrib/systemd/syslog-ng.service +2
-1@@ -4,7 +4,8 @@ Documentation=man:syslog-ng(8) [Service] Type=notify -ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslogd.pid +ExecStartPre=@BASEBINDIR@/mkdir -p @LOCALSTATEDIR@/run/syslog-ng +ExecStart=@SBINDIR@/syslog-ng -F $SYSLOGNG_OPTS -p @LOCALSTATEDIR@/run/syslog-ng/syslogd.pid -R @LOCALSTATEDIR@/run/syslog-ng/syslog-ng.persist ExecReload=@BASEBINDIR@/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ng
Thanks. I will change like this if newly upgrade syslog-ng_3.15.1.bb still need this. Also, for the hard review part, I will make a new patch follow your suggestion.
//changqing
Signature · 4 lines
BRs Sandy(Li Changqing) +861084778653