From root@thanatos.institutoptique.fr  Thu Feb 27 16:21:47 2014
Return-Path: <root@thanatos.institutoptique.fr>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 1CF85508
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Feb 2014 16:21:42 +0000 (UTC)
Received: from smtp.institutoptique.fr (smtp.institutoptique.fr [IPv6:2001:660:302d:4001:0:7:1445:afd9])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id D58C51739
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Feb 2014 16:21:41 +0000 (UTC)
Received: from thanatos.institutoptique.fr (unknown [10.117.100.121])
	by smtp.institutoptique.fr (Postfix) with ESMTP id 3880C261A2
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 Feb 2014 17:21:31 +0100 (CET)
Received: by thanatos.institutoptique.fr (Postfix, from userid 0)
	id 163651C2AAC; Thu, 27 Feb 2014 17:21:31 +0100 (CET)
Message-Id: <20140227162131.163651C2AAC@thanatos.institutoptique.fr>
Date: Thu, 27 Feb 2014 17:21:31 +0100 (CET)
From: Loic Blot <loic.blot@unix-experience.fr>
Reply-To: Loic Blot <loic.blot@unix-experience.fr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: siproxd outdated and not functional in a looping config (port update required)
X-Send-Pr-Version: 3.114
X-GNATS-Notify: frank@dynamical-systems.org

>Number:         187113
>Category:       ports
>Synopsis:       net/siproxd outdated and not functional in a looping config (port update required)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    swills
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 27 16:30:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Fri Mar 14 05:30:00 UTC 2014
>Originator:     Loic Blot
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
Institut Optique Graduate School
>Environment:
System: FreeBSD poudriere.institutoptique.fr 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

	FreeBSD 9.2-amd64 also
>Description:
	the siproxd version is outdated and unfunctional. OpenBSD has 0.8.1 and works well. I have patched the port to accept 0.8.1 and it works very well.
	It's compilable and runnable:
		17:16:55 INFO:siproxd.c:233 siproxd-0.8.1-56 amd64-portbld-freebsd9.2 starting up

	It also works very well on a looping config (if_inbound = if_outbound)
>How-To-Repeat:
	If you configure same interface on if_inbound and if_outbound siproxd 0.7 detect a SIP loop but don't handle it.
	On 0.8.1 this problem is fixed.
>Fix:
	I have no diff at this time but here is the manip.
	Please set version to 0.8.1 and remove the portversion.
	Also remove all patches, they are useless on this version.




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Feb 28 05:34:16 UTC 2014 
Responsible-Changed-Why:  
swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187113 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Feb 28 05:34:17 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187113 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: frank@dynamical-systems.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/187113: net/siproxd outdated and not functional in a looping config (port update required)
Date: Fri, 28 Feb 2014 05:34:17 UT

 Maintainer of net/siproxd,
 
 Please note that PR ports/187113 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/187113
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Steve Wills <swills@FreeBSD.org>
To: bug-followup@FreeBSD.org, loic.blot@unix-experience.fr
Cc:  
Subject: Re: ports/187113: net/siproxd outdated and not functional in a
 looping config (port update required)
Date: Fri, 14 Mar 2014 05:29:04 +0000

 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Hi,
 
 Please see attached patch, I think this may help. I'm not familiar with
 siproxd, so please test. This also adds STAGEDIR support, but I did leave out
 the home dir, wasn't sure it's necessary. Feedback appreciated.
 
 Thanks,
 Steve
 
 --+QahgC5+KEYLbs62
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="siproxd.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 348099)
 +++ Makefile	(working copy)
 @@ -2,30 +2,34 @@
  # $FreeBSD$
  
  PORTNAME=	siproxd
 -PORTVERSION=	0.7.2
 -PORTREVISION=	2
 +PORTVERSION=	0.8.1
  CATEGORIES=	net
  MASTER_SITES=	SF
  
  MAINTAINER=	frank@dynamical-systems.org
 -COMMENT=	A proxy/masquerading daemon for the SIP protocol
 +COMMENT=	Proxy/masquerading daemon for the SIP protocol
  
 -LIB_DEPENDS=	osip2.9:${PORTSDIR}/net/libosip
 +LIB_DEPENDS=	libosip2.so:${PORTSDIR}/net/libosip
  
  USE_RC_SUBR=	siproxd
  GNU_CONFIGURE=	yes
  CONFIGURE_ARGS=	--disable-doc --with-libosip-prefix=${PREFIX}
  
 +USE_AUTOTOOLS=	autoconf autoheader automake aclocal libtool libtoolize libltdl
 +CFLAGS+=	-L${LOCALBASE}/lib -I${LOCALBASE}/include
 +AUTOMAKE_ARGS=	--add-missing
 +
  PORTDOCS1=	AUTHORS ChangeLog README RELNOTES
  PORTDOCS2=	FAQ KNOWN_BUGS RFC3261_compliance.txt \
  		sample_cfg_budgetone.txt sample_cfg_x-lite.txt
  PORTDOCS=	${PORTDOCS1} ${PORTDOCS2}
  
 -NO_STAGE=	yes
 +SIPROXD_GROUP=	nobody
 +PLIST_SUB=	SIPROXD_GROUP=${SIPROXD_GROUP}
 +
  .include <bsd.port.pre.mk>
  
  post-patch:
 -	@${REINPLACE_CMD} -e 's,-lgnugetopt,,g ; 24600d ; 23998s,doc/Makefile ,,g' ${WRKSRC}/${CONFIGURE_SCRIPT}
  	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
  	${WRKSRC}/doc/siproxd.conf.example
  	${REINPLACE_CMD} -e '22s,doc ,,' ${WRKSRC}/Makefile.am
 @@ -38,13 +42,10 @@
  
  post-install:
  .if !defined(NOPORTDOCS)
 -	${MKDIR} ${DOCSDIR}
 +	${MKDIR} ${STAGEDIR}${DOCSDIR}
  .for docs in ${PORTDOCS}
 -	${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
 +	${INSTALL_DATA} ${WRKSRC}/${docs} ${STAGEDIR}${DOCSDIR}
  .endfor
  .endif
 -	${CP} ${WRKSRC}/doc/siproxd.conf.example ${PREFIX}/etc
 -	${CP} ${WRKSRC}/doc/siproxd_passwd.cfg ${PREFIX}/etc
 -	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
  
  .include <bsd.port.post.mk>
 Index: distinfo
 ===================================================================
 --- distinfo	(revision 348099)
 +++ distinfo	(working copy)
 @@ -1,2 +1,2 @@
 -SHA256 (siproxd-0.7.2.tar.gz) = c586d0f8e66841189e1e236eb18a1b0c8126d6e28aa6d0a28b591b016ccebbcb
 -SIZE (siproxd-0.7.2.tar.gz) = 821009
 +SHA256 (siproxd-0.8.1.tar.gz) = df2df04faf5bdb4980cbdfd5516a47898fc47ca1ebc2c628aa48305b20a09dad
 +SIZE (siproxd-0.8.1.tar.gz) = 833170
 Index: files/patch-aclocal.m4
 ===================================================================
 --- files/patch-aclocal.m4	(revision 348099)
 +++ files/patch-aclocal.m4	(working copy)
 @@ -1,11 +0,0 @@
 ---- aclocal.m4.orig	2008-03-09 14:35:51.000000000 +0100
 -+++ aclocal.m4	2008-09-23 11:23:56.000000000 +0200
 -@@ -1276,7 +1276,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 Index: files/patch-configure
 ===================================================================
 --- files/patch-configure	(revision 348099)
 +++ files/patch-configure	(working copy)
 @@ -1,38 +0,0 @@
 ---- configure.orig	2008-03-09 14:35:57.000000000 +0100
 -+++ configure	2008-09-23 11:25:19.000000000 +0200
 -@@ -8063,7 +8063,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -11733,7 +11733,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -14867,7 +14867,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -17197,7 +17197,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 Index: files/patch-doc_siproxd.conf.example
 ===================================================================
 --- files/patch-doc_siproxd.conf.example	(revision 348099)
 +++ files/patch-doc_siproxd.conf.example	(working copy)
 @@ -1,49 +0,0 @@
 ---- doc/siproxd.conf.example.orig	2010-01-24 17:18:04.000000000 +0100
 -+++ doc/siproxd.conf.example	2010-01-24 17:21:34.000000000 +0100
 -@@ -17,8 +17,8 @@
 - #    or a hostname that resolves to that address (use a dyndns address for
 - #    example).
 - #
 --if_inbound  = eth0
 --if_outbound = ppp0
 -+if_inbound  = ed0
 -+if_outbound = tun0
 - # uncomment the following line ONLY IF YOU KNOW WHAT YOU ARE DOING!
 - # READ THE FAQ FIRST!
 - #host_outbound = 1.2.3.4
 -@@ -79,7 +79,7 @@
 - #   user:	uid/gid to switch to after startup
 - #   chrootjail:	path to chroot to (chroot jail)
 - user = nobody
 --#chrootjail = /var/lib/siproxd/
 -+chrootjail = %%PREFIX%%/siproxd/
 - 
 - ######################################################################
 - # Registration file:
 -@@ -88,7 +88,7 @@
 - #   the specified directory path does exist!
 - #   Note: If running in chroot jail, this path starts relative
 - #         to the jail.
 --registration_file = /var/lib/siproxd/siproxd_registrations
 -+registration_file = siproxd_registrations
 - 
 - ######################################################################
 - # Automatically save current registrations every 'n' seconds
 -@@ -101,7 +101,7 @@
 - #   This file holds the PID of the main thread of siproxd.
 - #   Note: If running in chroot jail, this path starts relative
 - #         to the jail.
 --pid_file = /var/run/siproxd/siproxd.pid
 -+pid_file = siproxd.pid
 - 
 - ######################################################################
 - # global switch to control the RTP proxy behaviour
 -@@ -292,7 +292,7 @@
 - # the processing order is given by the load order.
 - #
 - # plugin_dir: MUST be terminated with '/'
 --plugindir=/usr/lib/siproxd/
 -+plugindir=%%PREFIX%%/lib/siproxd/
 - #
 - # List of plugins to load. MUST use the .la file extension!
 - #load_plugin=plugin_demo.la
 Index: files/patch-libltdl_aclocal.m4
 ===================================================================
 --- files/patch-libltdl_aclocal.m4	(revision 348099)
 +++ files/patch-libltdl_aclocal.m4	(working copy)
 @@ -1,11 +0,0 @@
 ---- libltdl/aclocal.m4.orig	2008-02-02 18:16:08.000000000 +0100
 -+++ libltdl/aclocal.m4	2008-09-23 11:26:47.000000000 +0200
 -@@ -1276,7 +1276,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 Index: files/patch-libltdl_configure
 ===================================================================
 --- files/patch-libltdl_configure	(revision 348099)
 +++ files/patch-libltdl_configure	(working copy)
 @@ -1,38 +0,0 @@
 ---- libltdl/configure.orig	2008-02-02 18:16:08.000000000 +0100
 -+++ libltdl/configure	2008-09-23 11:28:19.000000000 +0200
 -@@ -7954,7 +7954,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -11518,7 +11518,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -14519,7 +14519,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 -@@ -16804,7 +16804,7 @@
 -   ;;
 - 
 - freebsd*)
 --  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 -+  objformat=elf
 -   version_type=freebsd-$objformat
 -   case $version_type in
 -     freebsd-elf*)
 Index: files/patch-src__siproxd.c
 ===================================================================
 --- files/patch-src__siproxd.c	(revision 348099)
 +++ files/patch-src__siproxd.c	(working copy)
 @@ -1,34 +0,0 @@
 ---- src/siproxd.c.orig	2008-02-04 21:38:47.000000000 +0100
 -+++ src/siproxd.c	2008-08-29 19:37:53.000000000 +0200
 -@@ -226,8 +226,6 @@
 - /*
 -  * Init stuff
 -  */
 --   INFO(PACKAGE"-"VERSION"-"BUILDSTR" "UNAME" starting up");
 --
 -    /* read the config file */
 -    if (read_config(configfile, config_search, main_cfg_opts, "") == STS_FAILURE) {
 -       exit(1);
 -@@ -237,6 +235,13 @@
 -    configuration.configfile = strdup(configfile);
 -    configuration.config_search = config_search;
 - 
 -+   /* 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) {
 -@@ -301,7 +306,7 @@
 -     * the jail, too. However, it will be owned by root and not deleted
 -     * on process termination... */
 -    if (configuration.chrootjail && ((getuid()==0) || (geteuid()==0))) {
 --      if (pidfilename) createpidfile(pidfilename);
 -+      if (pidfilename && *pidfilename == '/') createpidfile(pidfilename);
 -    }
 - 
 -    /* change user and group IDs */
 Index: pkg-deinstall
 ===================================================================
 --- pkg-deinstall	(revision 348099)
 +++ pkg-deinstall	(working copy)
 @@ -1,11 +0,0 @@
 -#!/bin/sh
 -
 -SIPROXD_HOME=${PKG_PREFIX}/siproxd
 -SIPROXD_PID=${SIPROXD_HOME}/siproxd.pid
 -
 -case $2 in
 -    DEINSTALL)
 -    [ -r ${SIPROXD_PID} ] && kill `cat ${SIPROXD_PID}`
 -    rm -f ${SIPROXD_HOME}/* && rmdir ${SIPROXD_HOME}
 -    ;;
 -esac
 Index: pkg-install
 ===================================================================
 --- pkg-install	(revision 348099)
 +++ pkg-install	(working copy)
 @@ -1,17 +0,0 @@
 -#!/bin/sh
 -
 -SIPROXD_HOME=${PKG_PREFIX}/siproxd
 -SIPROXD_USER=nobody
 -SIPROXD_GROUP=nobody
 -
 -case $2 in
 -    POST-INSTALL)
 -    mkdir ${SIPROXD_HOME} && \
 -	chown ${SIPROXD_USER}:${SIPROXD_GROUP} ${SIPROXD_HOME} && \
 -	chmod 750 ${SIPROXD_HOME}
 -    for i in siproxd.conf.example siproxd_passwd.cfg; do
 -	chgrp ${SIPROXD_GROUP} ${PKG_PREFIX}/etc/${i}
 -	chmod 640 ${PKG_PREFIX}/etc/${i}
 -    done
 -    ;;
 -esac
 Index: pkg-plist
 ===================================================================
 --- pkg-plist	(revision 348099)
 +++ pkg-plist	(working copy)
 @@ -1,4 +1,3 @@
 -etc/siproxd.conf.example
  etc/siproxd_passwd.cfg
  lib/siproxd/plugin_defaulttarget.a
  lib/siproxd/plugin_defaulttarget.la
 @@ -12,8 +11,22 @@
  lib/siproxd/plugin_logcall.a
  lib/siproxd/plugin_logcall.la
  lib/siproxd/plugin_logcall.so
 +lib/siproxd/plugin_prefix.a
 +lib/siproxd/plugin_prefix.la
 +lib/siproxd/plugin_prefix.so
 +lib/siproxd/plugin_regex.a
 +lib/siproxd/plugin_regex.la
 +lib/siproxd/plugin_regex.so
  lib/siproxd/plugin_shortdial.a
  lib/siproxd/plugin_shortdial.la
  lib/siproxd/plugin_shortdial.so
 +lib/siproxd/plugin_stun.a
 +lib/siproxd/plugin_stun.la
 +lib/siproxd/plugin_stun.so
  sbin/siproxd
 +@unexec if cmp -s %D/etc/siproxd.conf.example %D/etc/siproxd.conf; then rm -f %D/etc/siproxd.conf; fi
 +etc/siproxd.conf.example
 +@exec if [ ! -f %D/etc/siproxd.conf ] ; then cp -p %D/%F %B/siproxd.conf; fi
 +@exec chgrp %%SIPROXD_GROUP%% %D/etc/siproxd.conf.example %D/etc/siproxd.conf
 +@exec chmod 640 %D/etc/siproxd.conf.example %D/etc/siproxd.conf
  @dirrm lib/siproxd
 
 --+QahgC5+KEYLbs62--
>Unformatted:
