FreeBSD Bugzilla – Attachment 218409 Details for
Bug 249984
sysutils/syslog-ng329: update rc.d script and patch for SO_REUSEPORT_LB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
syslog-ng.diff
syslog-ng.diff (text/plain), 8.11 KB, created by
Boris Korzun
on 2020-09-29 15:17:28 UTC
(
hide
)
Description:
syslog-ng.diff
Filename:
MIME Type:
Creator:
Boris Korzun
Created:
2020-09-29 15:17:28 UTC
Size:
8.11 KB
patch
obsolete
>diff -durN syslog-ng329.orig/files/patch-modules_afsocket_socket-options.c syslog-ng329/files/patch-modules_afsocket_socket-options.c >--- syslog-ng329.orig/files/patch-modules_afsocket_socket-options.c 1970-01-01 03:00:00.000000000 +0300 >+++ syslog-ng329/files/patch-modules_afsocket_socket-options.c 2020-09-24 20:35:40.059173000 +0300 >@@ -0,0 +1,20 @@ >+--- modules/afsocket/socket-options.c.orig 2020-08-10 18:04:39 UTC >++++ modules/afsocket/socket-options.c >+@@ -86,7 +86,16 @@ _setup_keepalive(gint fd) >+ static gboolean >+ _setup_reuseport(gint fd) >+ { >+-#ifdef SO_REUSEPORT >++#if defined(SO_REUSEPORT_LB) >++ gint on = 1; >++ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, &on, sizeof(on)) < 0) >++ { >++ msg_error("The kernel refused our SO_REUSEPORT_LB setting", >++ evt_tag_error("error")); >++ return FALSE; >++ } >++ return TRUE; >++#elif defined(SO_REUSEPORT) >+ gint on = 1; >+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0) >+ { >diff -durN syslog-ng329.orig/files/pkg-message.in syslog-ng329/files/pkg-message.in >--- syslog-ng329.orig/files/pkg-message.in 2020-09-11 12:47:08.863630000 +0300 >+++ syslog-ng329/files/pkg-message.in 2020-09-29 13:54:07.772913000 +0300 >@@ -30,4 +30,12 @@ > %%PREFIX%%/etc/rc.d/syslog-ng start > EOM > } >+{ type: upgrade >+ maximum_version: "3.29.1" >+ message: <<EOM >+Upgrading from before 3.29.1 should to replace these variables (if used): >+* syslog_ng_flags instead syslog_ng_config (but legacy syslog_ng_config still works); >+* syslog_ng_pidfile instead syslog_ng_pid (but syslog_ng_pid still works). >+EOM >+} > ] >diff -durN syslog-ng329.orig/files/syslog-ng.in syslog-ng329/files/syslog-ng.in >--- syslog-ng329.orig/files/syslog-ng.in 2020-09-11 12:47:08.864150000 +0300 >+++ syslog-ng329/files/syslog-ng.in 2020-09-28 19:07:59.649320000 +0300 >@@ -12,35 +12,47 @@ > # to enable this service: > # > #syslog_ng_enable="YES" >-#syslog_ng_config="-u daemon" >-#syslog_ng_pid="/var/run/syslog-ng.pid" >+#syslog_ng_flags="-u daemon" >+#syslog_ng_pidfile="/var/run/syslog-ng.pid" > # > >-syslog_ng_purgeklog=${syslog_ng_purgeklog-"NO"} >- > . /etc/rc.subr > > name=syslog_ng > rcvar=syslog_ng_enable > >-command=%%PREFIX%%/sbin/syslog-ng >-required_files=%%PREFIX%%/etc/syslog-ng.conf >-extra_commands=reload >+load_rc_config $name > >+: ${syslog_ng_enable:="NO"} >+: ${syslog_ng_purgeklog:="NO"} >+: ${syslog_ng_config:="%%PREFIX%%/etc/syslog-ng.conf"} >+: ${syslog_ng_pidfile:=/var/run/syslog.pid} >+ >+# backwards compatibility >+if [ -n "${syslog_ng_pid}" ]; then >+ syslog_ng_pidfile="${syslog_ng_pid}" >+fi >+if [ ! -f "${syslog_ng_config}" ]; then >+ syslog_ng_flags="${syslog_ng_config}" >+ syslog_ng_config="%%PREFIX%%/etc/syslog-ng.conf" >+fi >+ > if checkyesno syslog_ng_purgeklog; then >- start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1 $start_precmd"; >+ start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1" > fi > >-stop_postcmd=stop_postcmd >+pidfile="${syslog_ng_pidfile}" >+required_files="${syslog_ng_config}" > >-load_rc_config $name >+command="%%PREFIX%%/sbin/syslog-ng" >+command_args="-f ${syslog_ng_config} -p ${pidfile}" > >-: ${syslog_ng_enable:="NO"} >-pidfile=${syslog_ng_pid:-"/var/run/syslog.pid"} >-command_args="-p ${pidfile} ${syslog_ng_config}" >+stop_postcmd="stop_postcmd" >+extra_commands="reload" > >-stop_postcmd() { >- rm -f $pidfile >+stop_postcmd() >+{ >+ rm -f "${pidfile}" > } > > run_rc_command "$1" >diff -durN syslog-ng327.orig/files/pkg-message.in syslog-ng327/files/pkg-message.in >--- syslog-ng327.orig/files/pkg-message.in 2020-09-11 12:47:11.287124000 +0300 >+++ syslog-ng327/files/pkg-message.in 2020-09-29 18:05:59.655369000 +0300 >@@ -30,4 +30,12 @@ > %%PREFIX%%/etc/rc.d/syslog-ng start > EOM > } >+{ type: upgrade >+ maximum_version: "3.27.1_1" >+ message: <<EOM >+Upgrading from before 3.27.1_1 should to replace these variables (if used): >+* syslog_ng_flags instead syslog_ng_config (but legacy syslog_ng_config still works); >+* syslog_ng_pidfile instead syslog_ng_pid (but syslog_ng_pid still works). >+EOM >+} > ] >diff -durN syslog-ng327.orig/files/syslog-ng.in syslog-ng327/files/syslog-ng.in >--- syslog-ng327.orig/files/syslog-ng.in 2020-09-11 12:47:11.287619000 +0300 >+++ syslog-ng327/files/syslog-ng.in 2020-09-29 18:09:05.351174000 +0300 >@@ -12,35 +12,47 @@ > # to enable this service: > # > #syslog_ng_enable="YES" >-#syslog_ng_config="-u daemon" >-#syslog_ng_pid="/var/run/syslog-ng.pid" >+#syslog_ng_flags="-u daemon" >+#syslog_ng_pidfile="/var/run/syslog-ng.pid" > # > >-syslog_ng_purgeklog=${syslog_ng_purgeklog-"NO"} >- > . /etc/rc.subr > > name=syslog_ng > rcvar=syslog_ng_enable > >-command=%%PREFIX%%/sbin/syslog-ng >-required_files=%%PREFIX%%/etc/syslog-ng.conf >-extra_commands=reload >+load_rc_config $name > >+: ${syslog_ng_enable:="NO"} >+: ${syslog_ng_purgeklog:="NO"} >+: ${syslog_ng_config:="%%PREFIX%%/etc/syslog-ng.conf"} >+: ${syslog_ng_pidfile:=/var/run/syslog.pid} >+ >+# backwards compatibility >+if [ -n "${syslog_ng_pid}" ]; then >+ syslog_ng_pidfile="${syslog_ng_pid}" >+fi >+if [ ! -f "${syslog_ng_config}" ]; then >+ syslog_ng_flags="${syslog_ng_config}" >+ syslog_ng_config="%%PREFIX%%/etc/syslog-ng.conf" >+fi >+ > if checkyesno syslog_ng_purgeklog; then >- start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1 $start_precmd"; >+ start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1" > fi > >-stop_postcmd=stop_postcmd >+pidfile="${syslog_ng_pidfile}" >+required_files="${syslog_ng_config}" > >-load_rc_config $name >+command="%%PREFIX%%/sbin/syslog-ng" >+command_args="-f ${syslog_ng_config} -p ${pidfile}" > >-: ${syslog_ng_enable:="NO"} >-pidfile=${syslog_ng_pid:-"/var/run/syslog.pid"} >-command_args="-p ${pidfile} ${syslog_ng_config}" >+stop_postcmd="stop_postcmd" >+extra_commands="reload" > >-stop_postcmd() { >- rm -f $pidfile >+stop_postcmd() >+{ >+ rm -f "${pidfile}" > } > > run_rc_command "$1" >diff -durN syslog-ng328.orig/files/pkg-message.in syslog-ng328/files/pkg-message.in >--- syslog-ng328.orig/files/pkg-message.in 2020-09-29 18:16:10.046834000 +0300 >+++ syslog-ng328/files/pkg-message.in 2020-09-29 18:16:22.719110000 +0300 >@@ -30,4 +30,12 @@ > %%PREFIX%%/etc/rc.d/syslog-ng start > EOM > } >+{ type: upgrade >+ maximum_version: "3.28.1_1" >+ message: <<EOM >+Upgrading from before 3.28.1_1 should to replace these variables (if used): >+* syslog_ng_flags instead syslog_ng_config (but legacy syslog_ng_config still works); >+* syslog_ng_pidfile instead syslog_ng_pid (but syslog_ng_pid still works). >+EOM >+} > ] >diff -durN syslog-ng328.orig/files/syslog-ng.in syslog-ng328/files/syslog-ng.in >--- syslog-ng328.orig/files/syslog-ng.in 2020-09-11 12:47:10.811875000 +0300 >+++ syslog-ng328/files/syslog-ng.in 2020-09-29 18:09:41.077528000 +0300 >@@ -12,35 +12,47 @@ > # to enable this service: > # > #syslog_ng_enable="YES" >-#syslog_ng_config="-u daemon" >-#syslog_ng_pid="/var/run/syslog-ng.pid" >+#syslog_ng_flags="-u daemon" >+#syslog_ng_pidfile="/var/run/syslog-ng.pid" > # > >-syslog_ng_purgeklog=${syslog_ng_purgeklog-"NO"} >- > . /etc/rc.subr > > name=syslog_ng > rcvar=syslog_ng_enable > >-command=%%PREFIX%%/sbin/syslog-ng >-required_files=%%PREFIX%%/etc/syslog-ng.conf >-extra_commands=reload >+load_rc_config $name > >+: ${syslog_ng_enable:="NO"} >+: ${syslog_ng_purgeklog:="NO"} >+: ${syslog_ng_config:="%%PREFIX%%/etc/syslog-ng.conf"} >+: ${syslog_ng_pidfile:=/var/run/syslog.pid} >+ >+# backwards compatibility >+if [ -n "${syslog_ng_pid}" ]; then >+ syslog_ng_pidfile="${syslog_ng_pid}" >+fi >+if [ ! -f "${syslog_ng_config}" ]; then >+ syslog_ng_flags="${syslog_ng_config}" >+ syslog_ng_config="%%PREFIX%%/etc/syslog-ng.conf" >+fi >+ > if checkyesno syslog_ng_purgeklog; then >- start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1 $start_precmd"; >+ start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1" > fi > >-stop_postcmd=stop_postcmd >+pidfile="${syslog_ng_pidfile}" >+required_files="${syslog_ng_config}" > >-load_rc_config $name >+command="%%PREFIX%%/sbin/syslog-ng" >+command_args="-f ${syslog_ng_config} -p ${pidfile}" > >-: ${syslog_ng_enable:="NO"} >-pidfile=${syslog_ng_pid:-"/var/run/syslog.pid"} >-command_args="-p ${pidfile} ${syslog_ng_config}" >+stop_postcmd="stop_postcmd" >+extra_commands="reload" > >-stop_postcmd() { >- rm -f $pidfile >+stop_postcmd() >+{ >+ rm -f "${pidfile}" > } > > run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249984
:
218403
|
218408
| 218409