From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 6 04:10:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9B4011CC for ; Wed, 6 Mar 2013 04:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBD8F4D for ; Wed, 6 Mar 2013 04:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r264A07M078356 for ; Wed, 6 Mar 2013 04:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r264A0C6078355; Wed, 6 Mar 2013 04:10:00 GMT (envelope-from gnats) Resent-Date: Wed, 6 Mar 2013 04:10:00 GMT Resent-Message-Id: <201303060410.r264A0C6078355@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lawrence Chen Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18CA4152 for ; Wed, 6 Mar 2013 04:00:56 +0000 (UTC) (envelope-from lchen@zen.lhaven.homeip.net) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id BA2F0F1C for ; Wed, 6 Mar 2013 04:00:54 +0000 (UTC) Received: from ip70-179-144-108.fv.ks.cox.net ([70.179.144.108] helo=zen.lhaven.homeip.net) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UD5XC-000ORQ-48 for FreeBSD-gnats-submit@freebsd.org; Wed, 06 Mar 2013 04:00:54 +0000 Received: from zen.lhaven.homeip.net (localhost [127.0.0.1]) by zen.lhaven.homeip.net (8.14.6/8.14.5) with ESMTP id r2640ngv038503; Tue, 5 Mar 2013 22:00:49 -0600 (CST) (envelope-from lchen@zen.lhaven.homeip.net) Received: (from lchen@localhost) by zen.lhaven.homeip.net (8.14.6/8.14.5/Submit) id r2640nV5038502; Tue, 5 Mar 2013 22:00:49 -0600 (CST) (envelope-from lchen) Message-Id: <201303060400.r2640nV5038502@zen.lhaven.homeip.net> Date: Tue, 5 Mar 2013 22:00:49 -0600 (CST) From: Lawrence Chen To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/176676: [patch] net/ss5: syslog option is noisy Cc: beastie_t@lhaven.homeip.net X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Lawrence Chen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2013 04:10:01 -0000 >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@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 --- 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 +@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 +@exec if [ ! -f %D/etc/ss5/ss5.conf ]; then cp %B/%f %D/etc/ss5/ss5.conf; fi +@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 +@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: