Bug 96054 - Update port: net/siproxd to 0.5.12
Summary: Update port: net/siproxd to 0.5.12
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 17:40 UTC by Frank W. Josellis
Modified: 2006-05-18 15:50 UTC (History)
0 users

See Also:


Attachments
siproxd-0.5.12.patch (4.52 KB, patch)
2006-04-19 17:40 UTC, Frank W. Josellis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank W. Josellis 2006-04-19 17:40:15 UTC
Regular update to version 0.5.12. 

Note that the supplied rc script has been renamed, to satisfy portlint.

Removed files:
files/siproxd.sh

Added files:
files/siproxd.sh.in
Comment 1 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-14 22:01:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

I'll take it.
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-14 22:19:14 UTC
State Changed
From-To: open->feedback

Doesn't compile on 4.x; do you want to fix it or do you want me to mark 
it broken on 4.x ? 
http://sce-tindy.tecnik93.com/tb/errors/4-STABLE-i386-myPT/siproxd-0.5.12.log
Comment 3 Frank W. Josellis 2006-05-15 12:07:24 UTC
With the following additional patch I was able to compile successfully on 
4.11-STABLE.

Added files:
files/patch-src:plugin_shortdial.c

Thanks!

--- siproxd-0.5.12-plugin_shortdial.patch begins here ---
diff -Nur siproxd.orig/files/patch-src:plugin_shortdial.c siproxd/files/patch-src:plugin_shortdial.c
--- siproxd.orig/files/patch-src:plugin_shortdial.c	Thu Jan  1 01:00:00 1970
+++ siproxd/files/patch-src:plugin_shortdial.c	Mon May 15 11:52:49 2006
@@ -0,0 +1,11 @@
+--- src/plugin_shortdial.c.orig	Sun Jan  1 21:31:31 2006
++++ src/plugin_shortdial.c	Mon May 15 11:50:12 2006
+@@ -24,7 +24,7 @@
+ //#include <errno.h>
+ #include <string.h>
+ //#include <stdlib.h>
+-//#include <unistd.h>
++#include <unistd.h>
+ //#include <signal.h>
+ #include <netinet/in.h>
+ //#include <arpa/inet.h>
--- siproxd-0.5.12-plugin_shortdial.patch ends here ---
Comment 4 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-15 12:19:48 UTC
State Changed
From-To: feedback->open

patch received
Comment 5 Ion-Mihai " IOnut " Tetcu 2006-05-15 13:07:40 UTC
On Mon, 15 May 2006 13:07:24 +0200 (CEST)
"Frank W. Josellis" <frank@dynamical-systems.org> wrote:

> With the following additional patch I was able to compile
> successfully on 4.11-STABLE.
> 
> Added files:
> files/patch-src:plugin_shortdial.c

OK, it compiles fine now.

Do you really need this instead of rc.d defaults ?

case $1 in
    start)
    run_rc_command "$1" 2> /dev/null
    ;;
    *)
    run_rc_command "$1"
    ;;
esac

If what you want is the redirection please take a look at rc.subr(8)
and mail/dspam/files/dspam.in


-- 
IOnut
Unregistered ;) FreeBSD "user"
Comment 6 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-15 13:08:40 UTC
State Changed
From-To: open->feedback

Ask for maintainer fix.
Comment 7 Frank W. Josellis 2006-05-15 17:20:35 UTC
On Mon, 15 May 2006, Ion-Mihai Tetcu wrote:

> Do you really need this instead of rc.d defaults ?
> 
> case $1 in
>     start)
>     run_rc_command "$1" 2> /dev/null
>     ;;
>     *)
>     run_rc_command "$1"
>     ;;
> esac
> 

This was done for a purely cosmetic purpose: the program prints an INFO 
level message to stderr when starting up, which is unnecessary for my 
personal taste. Obviously I had the desire to suppress it, as everything 
of interest is properly reported to the syslog. Just running the default 
`run_rc_command "$1"` has the same operational effect, and if you prefer 
to clean it up, that's OK with me.

Frank Josellis
Comment 8 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-15 23:50:29 UTC
State Changed
From-To: feedback->open

feedback received
Comment 9 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-16 01:04:19 UTC
On Mon, 15 May 2006 16:30:27 GMT
"Frank W. Josellis" <frank@dynamical-systems.org> wrote:

> The following reply was made to PR ports/96054; it has been noted by GNATS.
> 
> From: "Frank W. Josellis" <frank@dynamical-systems.org>
> To: Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
> Cc: bug-followup@FreeBSD.org
> Subject: Re: ports/96054: Update port: net/siproxd to 0.5.12
> Date: Mon, 15 May 2006 18:20:35 +0200 (CEST)
> 
>  On Mon, 15 May 2006, Ion-Mihai Tetcu wrote:
>  
>  > Do you really need this instead of rc.d defaults ?
>  > 
>  > case $1 in
>  >     start)
>  >     run_rc_command "$1" 2> /dev/null
>  >     ;;
>  >     *)
>  >     run_rc_command "$1"
>  >     ;;
>  > esac
>  > 
>  
>  This was done for a purely cosmetic purpose: the program prints an INFO 
>  level message to stderr when starting up, which is unnecessary for my 
>  personal taste. Obviously I had the desire to suppress it, as everything 
>  of interest is properly reported to the syslog. Just running the default 
>  `run_rc_command "$1"` has the same operational effect, and if you prefer 
>  to clean it up, that's OK with me.


Could you replace this with:
command_args=" 2> /dev/null"
and test that it works OK (with and w/o siproxd_flags set)

Thanks,

-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #29:
It works the way the Wang did, what's the problem

Comment 10 Frank W. Josellis 2006-05-16 12:58:28 UTC
On Tue, 16 May 2006, Ion-Mihai IOnut Tetcu wrote:

> Could you replace this with:
> command_args=" 2> /dev/null"
> and test that it works OK (with and w/o siproxd_flags set)

Indeed, this appears to be a more elegant way to achieve the same goal. 
However, I became aware that there is a certain problem in all that 
redirection business because fatal errors (e.g., a missing config file) do 
not show up immediately. So I had another look into the sources, and I 
have another patch. By simply rearranging some initial directives one can 
prevent the program from logging informational messages to stderr in its 
normal operation. Then the rc script needs no special fetures. Please find 
the corresponding patch below.

Added files:
files/patch-src:siproxd.c

Thanks!


--- siproxd-0.5.12-rc.patch begins here ---
diff -Nur siproxd.orig/files/patch-src:siproxd.c siproxd/files/patch-src:siproxd.c
--- siproxd.orig/files/patch-src:siproxd.c	Thu Jan  1 01:00:00 1970
+++ siproxd/files/patch-src:siproxd.c	Tue May 16 12:47:54 2006
@@ -0,0 +1,29 @@
+--- src/siproxd.c.orig	Sun Jan  1 21:31:32 2006
++++ src/siproxd.c	Tue May 16 11:39:17 2006
+@@ -177,11 +177,16 @@
+ /*
+  * Init stuff
+  */
+-   INFO(PACKAGE"-"VERSION"-"BUILDSTR" "UNAME" starting up");
+-
+    /* read the config file */
+    if (read_config(configfile, config_search) == STS_FAILURE) exit(1);
+ 
++   /* Don't log to stderr if daemonizing is intended. */
++   if (configuration.daemonize) {
++      log_set_stderr(0);
++   }
++
++   INFO(PACKAGE"-"VERSION"-"BUILDSTR" "UNAME" starting up");
++
+    /* if a debug level > 0 has been given on the commandline use its
+       value and not what is in the config file */
+    if (cmdline_debuglevel != 0) {
+@@ -212,7 +217,6 @@
+       setsid();
+       if (fork()!=0) exit(0);
+ 
+-      log_set_stderr(0);
+       INFO("daemonized, pid=%i", getpid());
+    }
+ 
diff -Nur siproxd.orig/files/siproxd.sh.in siproxd/files/siproxd.sh.in
--- siproxd.orig/files/siproxd.sh.in	Tue May 16 11:29:24 2006
+++ siproxd/files/siproxd.sh.in	Tue May 16 12:47:54 2006
@@ -31,11 +31,4 @@
 
 load_rc_config $name
 
-case $1 in
-    start)
-    run_rc_command "$1" 2> /dev/null
-    ;;
-    *)
-    run_rc_command "$1"
-    ;;
-esac
+run_rc_command "$1"
--- siproxd-0.5.12-rc.patch ends here ---
Comment 11 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-16 13:36:18 UTC
On Tue, 16 May 2006 13:58:28 +0200 (CEST)
"Frank W. Josellis" <frank@dynamical-systems.org> wrote:

> 
> 
> On Tue, 16 May 2006, Ion-Mihai IOnut Tetcu wrote:
> 
> > Could you replace this with:
> > command_args=" 2> /dev/null"
> > and test that it works OK (with and w/o siproxd_flags set)
> 
> Indeed, this appears to be a more elegant way to achieve the same goal. 
> However, I became aware that there is a certain problem in all that 
> redirection business because fatal errors (e.g., a missing config file) do 
> not show up immediately. So I had another look into the sources, and I 
> have another patch. By simply rearranging some initial directives one can 
> prevent the program from logging informational messages to stderr in its 
> normal operation. Then the rc script needs no special fetures. Please find 
> the corresponding patch below.


Cool :)

OK, I'll commit like this.

-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #127:
Sticky bits on disk

Comment 12 Frank W. Josellis 2006-05-18 06:59:41 UTC
On Wed, 17 May 2006, Ion-Mihai Tetcu wrote:

> Please review the attached patch, I forgot if I have change something /
> incorporate all your feedback. :(
> ( I see the PR is in "open" state so it should be all approved by you,
> but please check)
> 
> Ahh, I modified at least the rc.d script (dropped prefix var and did
> the substitution directly).
> 
> 

OK, that's it. I only wondered about the USE_REINPLACE, which I dropped 
from the Makefile as portlint recommended to do so. Now it's back again, 
any special reason for keeping it?

Thanks!

Frank Josellis
Comment 13 Ion-Mihai " IOnut " Tetcu 2006-05-18 07:07:47 UTC
On Thu, 18 May 2006 07:59:41 +0200 (CEST)
"Frank W. Josellis" <frank@dynamical-systems.org> wrote:

> 
> 
> On Wed, 17 May 2006, Ion-Mihai Tetcu wrote:
> 
> > Please review the attached patch, I forgot if I have change something /
> > incorporate all your feedback. :(
> > ( I see the PR is in "open" state so it should be all approved by you,
> > but please check)
> > 
> > Ahh, I modified at least the rc.d script (dropped prefix var and did
> > the substitution directly).
> > 
> > 
> 
> OK, that's it. I only wondered about the USE_REINPLACE, which I dropped 
> from the Makefile as portlint recommended to do so. Now it's back again, 
> any special reason for keeping it?

Own lack of attention, thanks for pointing it out.
I'll commit today, hopefully.


-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #271:
The kernel license has expired
Comment 14 Ion-Mihai " IOnut " Tetcu 2006-05-18 07:12:56 UTC
On Thu, 18 May 2006 09:07:47 +0300
Ion-Mihai Tetcu <itetcu@people.tecnik93.com> wrote:

> On Thu, 18 May 2006 07:59:41 +0200 (CEST)
> "Frank W. Josellis" <frank@dynamical-systems.org> wrote:
> 
> > 
> > 
> > On Wed, 17 May 2006, Ion-Mihai Tetcu wrote:
> > 
> > > Please review the attached patch, I forgot if I have change something /
> > > incorporate all your feedback. :(
> > > ( I see the PR is in "open" state so it should be all approved by you,
> > > but please check)
> > > 
> > > Ahh, I modified at least the rc.d script (dropped prefix var and did
> > > the substitution directly).
> > > 
> > > 
> > 
> > OK, that's it. I only wondered about the USE_REINPLACE, which I dropped 
> > from the Makefile as portlint recommended to do so. Now it's back again, 
> > any special reason for keeping it?
> 
> Own lack of attention, thanks for pointing it out.
> I'll commit today, hopefully.

Actually ... I can't find USE_REINPLACE anywhere in the Makefile or the
patch I send you :)  I guess I'm cvs diff'ing ad it got removed from cvs :)


-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"

BOFH excuse #214:
Fluorescent lights are generating negative ions. If turning them
off doesn't work, take them out and put tin foil on the ends.
Comment 15 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2006-05-18 07:16:18 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 16 Frank W. Josellis 2006-05-18 15:46:10 UTC
On Thu, 18 May 2006, Ion-Mihai Tetcu wrote:

> Actually ... I can't find USE_REINPLACE anywhere in the Makefile or the
> patch I send you :)  I guess I'm cvs diff'ing ad it got removed from cvs :)

Yip, apparently Edwin erased the USE_REINPLACE on May 11. But I've tested 
your diff swiftly by taking an extract and patching a ports tree that was 
last updated on May 9. Anyway, it's ok now.

Thanks again,
Frank Josellis