ports/176676: [patch] net/ss5: syslog option is noisy
Lawrence Chen
beastie at tardisi.com
Wed Mar 6 04:10:01 UTC 2013
>Number: 176676
>Category: ports
>Synopsis: [patch] net/ss5: syslog option is noisy
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 06 04:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Lawrence Chen
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Changing to use syslog instead of ss5.log lot file, is noisy and
annoying.
Additionally, removing and reinstalling the package clobbers modified
configs.
>How-To-Repeat:
add '-s' to ss5_flags...
>Fix:
ss5 starts logging to syslog before it has initialized SyslogFacility
and SyslogLevel, so its sending syslog messages to 0.0 (kern.emerg)
which means everybody get's the startup log messages.
copy Syslog initialization parameters from SS5SetDynamic to
SS5SetStatic in SS5Server.c
Update install/post-install/pkg-plist to not clobber user configs.
Important since provided initial configs aren't useful.
--- patch.txt begins here ---
--- Makefile.orig 2012-11-17 00:00:21.000000000 -0600
+++ Makefile 2013-03-05 21:30:17.960426364 -0600
@@ -42,9 +42,17 @@
#.if !exists(${PREFIX}/etc/ss5/ss5.ha)
# ${TOUCH} ${PREFIX}/etc/ss5/ss5.ha
#.endif
+ ${INSTALL_DATA} ${WRKSRC}/conf/ss5.conf ${PREFIX}/etc/${PORTNAME}/ss5.conf.default
+ if [ ! -f ${PREFIX}/etc/${PORTNAME}/ss5.conf ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/conf/ss5.conf ${PREFIX}/etc/${PORTNAME}/ss5.conf ; \
+ fi
${INSTALL_DATA} ${WRKSRC}/conf/examples/ss5.ha ${PREFIX}/etc/${PORTNAME}/ss5.ha.default
- if [ ! -f ${PREFIX}/etc/${PORTNAME}.ha ]; then \
+ if [ ! -f ${PREFIX}/etc/${PORTNAME}/ss5.ha ]; then \
${INSTALL_DATA} ${WRKSRC}/conf/examples/ss5.ha ${PREFIX}/etc/${PORTNAME}/ss5.ha ; \
fi
+ ${INSTALL_DATA} ${WRKSRC}/conf/ss5.passwd ${PREFIX}/etc/${PORTNAME}/ss5.passwd.default
+ if [ ! -f ${PREFIX}/etc/${PORTNAME}/ss5.passwd ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/conf/ss5.passwd ${PREFIX}/etc/${PORTNAME}/ss5.passwd ; \
+ fi
.include <bsd.port.mk>
--- pkg-plist.orig 2011-05-11 14:34:28.000000000 -0500
+++ pkg-plist 2013-03-05 21:26:39.024425871 -0600
@@ -1,8 +1,12 @@
@unexec if cmp -s %D/etc/ss5/ss5.ha %D/etc/ss5/ss5.ha.default; then rm -f %D/etc/ss5/ss5.ha; fi
etc/ss5/ss5.ha.default
@exec if [ ! -f %D/etc/ss5/ss5.ha ]; then cp %B/%f %D/etc/ss5/ss5.ha; fi
-etc/ss5/ss5.conf
-etc/ss5/ss5.passwd
+ at unexec if cmp -s %D/etc/ss5/ss5.conf %D/etc/ss5/ss5.conf.default; then rm -f %D/etc/ss5/ss5.conf; fi
+etc/ss5/ss5.conf.default
+ at exec if [ ! -f %D/etc/ss5/ss5.conf ]; then cp %B/%f %D/etc/ss5/ss5.conf; fi
+ at unexec if cmp -s %D/etc/ss5/ss5.passwd %D/etc/ss5/ss5.passwd.default; then rm -f %D/etc/ss5/ss5.passwd; fi
+etc/ss5/ss5.passwd.default
+ at exec if [ ! -f %D/etc/ss5/ss5.passwd ]; then cp %B/%f %D/etc/ss5/ss5.passwd; fi
lib/ss5/mod_authentication.so
lib/ss5/mod_authorization.so
lib/ss5/mod_balance.so
--- files/patch-Makefile.in.orig 2011-05-11 14:34:28.000000000 -0500
+++ files/patch-Makefile.in 2013-03-05 21:07:42.074427423 -0600
@@ -1,5 +1,5 @@
---- Makefile.in.orig 2009-07-17 18:03:01.000000000 -0300
-+++ Makefile.in 2011-05-11 15:16:05.000000000 -0300
+--- Makefile.in.orig 2009-07-17 16:03:01.000000000 -0500
++++ Makefile.in 2013-03-05 21:07:07.620427120 -0600
@@ -10,6 +10,11 @@
log_path_base = @log_path_base@
trc_path_base = @trc_path_base@
@@ -49,7 +49,7 @@
@( if [ ! -d $(dst_dir)$(doc_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(doc_path_base)/ss5; fi )
@( cp License $(dst_dir)$(doc_path_base)/ss5 )
-@@ -80,32 +92,47 @@
+@@ -80,32 +92,46 @@
@( cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 )
@( if [ ! -d $(dst_dir)$(man_path_base)/man1 ]; then mkdir -p $(dst_dir)$(man_path_base)/man1; fi )
@@ -84,12 +84,13 @@
@( if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi )
@( if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi )
- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \
- else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi )
+- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \
+- else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi )
- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.ha ]; then cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5; \
- else cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5/ss5.ha.rpmnew ; fi )
- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; \
- else cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5/ss5.passwd.rpmnew ; fi )
++ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; fi )
+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.ha ]; then cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5; fi )
+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; fi )
@@ -112,7 +113,7 @@
@( if [ ! -d $(dst_dir)/var/run/ss5 ]; then mkdir -p $(dst_dir)/var/run/ss5; fi )
-@@ -122,40 +149,68 @@
+@@ -122,40 +148,68 @@
@( if [ -d $(dst_dir)$(doc_path_base)/ss5 ]; then rm -rf $(dst_dir)$(doc_path_base)/ss5; fi )
@( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1; fi )
--- files/patch-src-SS5Server.c.orig 1969-12-31 18:00:00.000000000 -0600
+++ files/patch-src-SS5Server.c 2013-03-05 19:50:33.143425693 -0600
@@ -0,0 +1,11 @@
+--- src/SS5Server.c.orig 2009-08-02 01:57:19.000000000 -0500
++++ src/SS5Server.c 2013-03-05 19:49:44.744425659 -0600
+@@ -44,6 +44,8 @@
+ SS5SocksOpt.PreforkProcesses = 1;
+ SS5SocksOpt.PropagateKey = 0;
+ SS5SocksOpt.Role = ALONE;
++ SS5SocksOpt.SyslogFa = LOG_LOCAL6;
++ SS5SocksOpt.SyslogLe = LOG_ERR;
+ S5Radius.AuthPort = RADIUS_AUTH_PORT;
+ S5Radius.AcctPort = RADIUS_ACCT_PORT;
+
--- patch.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list