On Tue, Oct 18, 2011 at 07:29:23PM -0400, Brad wrote: > On 18/10/11 7:15 PM, Stuart Henderson wrote: > >On 2011-10-18, Brad<b...@comstyle.com> wrote: > >>On 18/10/11 4:50 PM, Stuart Henderson wrote: > >>>On 2011-10-18, Christopher Zimmermann<madro...@zakweb.de> wrote: > >>>>here's an update to siproxd 0.8.1 and libosip2, on which it depends. > >>>> > >>>>Included is a patch against siproxd which fixes the behaviour of the > >>>>outbound_domain_* proxy configuration for domain names which are not > >>>>resolvable. I will send this patch to upstream. > >>> > >>>Lawrence Teo has updates for libosip2/siproxd in openbsd-wip, these fix a > >>>few more issues I pointed out to him (for example this needs USE_LIBTOOL, > >>>ltdl, and the shlib versions in your diff are incorrect), but we could > >>>do with a hand from someone who knows libtool; currently it has a really > >>>ugly define poked in via CFLAGS which I'm pretty sure can't be correct... > >>> > >>>-Dlt__PROGRAM__LTX_preloaded_symbols=lt_libltdl_LTX_preloaded_symbols > >>> > >>>Can anyone spare a clue as to what's going on here? > >> > >>I can't remember what port Jasper and I ran into that with but you have > >>to use USE_LIBTOOL= gnu. > >> > > > >thanks. anyone running siproxd want to give this diff a spin? > >(maintainer didn't reply to Lawrence's mails). > > Last time I asked msf about these ports he wasn't using them and that > was ages ago. I had updates for these ports in my tree but didn't > bother to send them out. > > Looking at the siproxd part of the diff I'd drop the ${LDFLAGS} from > CONFIGURE_ENV, set SHARED_ONLY and merge PFRAG.shared into the > PLIST as well as double check the .la files are actually necessary > for the plugins.
I have modified the diff according to Brad's feedback: - Dropped ${LDFLAGS} from CONFIGURE_ENV - Set SHARED_ONLY - Merged PFRAG.shared into PLIST I also confirmed that the .la files are actually not necessary; the .so files load just fine. The Makefile and example siproxd.conf file have been changed to reflect this. At the moment, I can only perform very basic testing of these ports; does anyone have the ability to test them more extensively? Thanks, Lawrence Index: libosip2/Makefile =================================================================== RCS file: /cvs/ports/telephony/libosip2/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- libosip2/Makefile 19 Oct 2010 07:43:05 -0000 1.8 +++ libosip2/Makefile 21 Oct 2011 03:50:04 -0000 @@ -2,10 +2,9 @@ COMMENT= GNU oSIP library -DISTNAME= libosip2-2.2.2 -REVISION= 0 -SHARED_LIBS= osip2 3.1 \ - osipparser2 3.1 +DISTNAME= libosip2-3.5.0 +SHARED_LIBS= osip2 4.0 \ + osipparser2 4.0 CATEGORIES= telephony devel @@ -20,7 +19,7 @@ PERMIT_DISTFILES_FTP= Yes MASTER_SITES= ${MASTER_SITE_GNU:=osip/} USE_LIBTOOL= Yes -USE_GROFF = Yes +USE_GROFF= Yes CONFIGURE_STYLE=gnu CONFIGURE_ARGS= --disable-debug \ Index: libosip2/distinfo =================================================================== RCS file: /cvs/ports/telephony/libosip2/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- libosip2/distinfo 13 Jun 2008 03:33:06 -0000 1.3 +++ libosip2/distinfo 21 Oct 2011 03:50:04 -0000 @@ -1,5 +1,5 @@ -MD5 (libosip2-2.2.2.tar.gz) = QO4+yJAw8Nbf2yz2EA5mhQ== -RMD160 (libosip2-2.2.2.tar.gz) = Saq6O7DxSD3KAtxbYQP0LiOcJSc= -SHA1 (libosip2-2.2.2.tar.gz) = ST0P87oHBWqIM6eYzW+QGIQePpE= -SHA256 (libosip2-2.2.2.tar.gz) = ThP+vWWi+PGMtVFRzRD18IiL8efcKkwNVPOfFwJV3hw= -SIZE (libosip2-2.2.2.tar.gz) = 664050 +MD5 (libosip2-3.5.0.tar.gz) = dpFUb2szSdEAB/war/D04A== +RMD160 (libosip2-3.5.0.tar.gz) = fAGToaJapbEjUuethYv+d+yPgpY= +SHA1 (libosip2-3.5.0.tar.gz) = JFtXLG7ecPnN34U7WX4giL4ogTo= +SHA256 (libosip2-3.5.0.tar.gz) = 3ZVdqiTZzi3mcJuME+fATrw6+orAlNahWgKgdb5xmpE= +SIZE (libosip2-3.5.0.tar.gz) = 597632 Index: libosip2/pkg/DESCR =================================================================== RCS file: /cvs/ports/telephony/libosip2/pkg/DESCR,v retrieving revision 1.2 diff -u -p -r1.2 DESCR --- libosip2/pkg/DESCR 20 May 2007 13:26:58 -0000 1.2 +++ libosip2/pkg/DESCR 21 Oct 2011 03:50:04 -0000 @@ -1,5 +1,5 @@ oSIP provides a SIP stack with a limited set of features common to -any kind of SIP Agents. Thus oSIP is not oriented towards any +any kind of SIP Agents. Thus oSIP is not oriented towards any particular implementations and can be used for implementing SIP End-Point, Proxy or any kind of more specific SIP Agent such as B2BUA. Index: libosip2/pkg/PLIST =================================================================== RCS file: /cvs/ports/telephony/libosip2/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- libosip2/pkg/PLIST 13 Jun 2008 03:33:06 -0000 1.2 +++ libosip2/pkg/PLIST 21 Oct 2011 03:50:04 -0000 @@ -6,7 +6,6 @@ include/osip2/osip_condv.h include/osip2/osip_dialog.h include/osip2/osip_fifo.h include/osip2/osip_mt.h -include/osip2/osip_negotiation.h include/osip2/osip_time.h include/osipparser2/ include/osipparser2/headers/ @@ -45,7 +44,6 @@ include/osipparser2/osip_md5.h include/osipparser2/osip_message.h include/osipparser2/osip_parser.h include/osipparser2/osip_port.h -include/osipparser2/osip_rfc3264.h include/osipparser2/osip_uri.h include/osipparser2/sdp_message.h lib/libosip2.a Index: siproxd/Makefile =================================================================== RCS file: /cvs/ports/telephony/siproxd/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- siproxd/Makefile 20 Nov 2010 19:56:47 -0000 1.6 +++ siproxd/Makefile 21 Oct 2011 03:50:04 -0000 @@ -1,41 +1,47 @@ # $OpenBSD: Makefile,v 1.6 2010/11/20 19:56:47 espie Exp $ +SHARED_ONLY= Yes COMMENT= proxy/masquerading daemon for the SIP protocol -DISTNAME= siproxd-0.5.13 -REVISION= 0 +DISTNAME= siproxd-0.8.1 CATEGORIES= telephony net HOMEPAGE= http://siproxd.sourceforge.net/ MAINTAINER= Mathieu Sauve-Frankel <m...@openbsd.org> -# GPL +# GPLv2+ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= c osip2 osipparser2 pthread +WANTLIB= c osip2 osipparser2 pthread ltdl MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=siproxd/} +USE_LIBTOOL= gnu + CONFIGURE_STYLE=gnu +CONFIGURE_ENV+= LDFLAGS="-L${PREFIX}/lib" -LIB_DEPENDS= telephony/libosip2 +LIB_DEPENDS= telephony/libosip2 \ + devel/libtool,-ltdl DOCDIR= ${PREFIX}/share/doc/siproxd EXDIR= ${PREFIX}/share/examples/siproxd +SUBST_VARS= PREFIX -do-install: - ${INSTALL_PROGRAM} ${WRKDIST}/src/siproxd ${PREFIX}/sbin +pre-build: + ${SUBST_CMD} ${WRKSRC}/doc/siproxd.conf.example +post-install: ${INSTALL_DATA_DIR} ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/doc/FAQ ${DOCDIR} ${INSTALL_DATA} ${WRKDIST}/doc/KNOWN_BUGS ${DOCDIR} - ${INSTALL_DATA_DIR} ${EXDIR} ${INSTALL_DATA} ${WRKDIST}/doc/siproxd.conf.example ${EXDIR} ${INSTALL_DATA} ${WRKDIST}/doc/siproxd_passwd.cfg ${EXDIR} + rm ${PREFIX}/lib/siproxd/plugin_*.a ${PREFIX}/lib/siproxd/plugin_*.la .include <bsd.port.mk> Index: siproxd/distinfo =================================================================== RCS file: /cvs/ports/telephony/siproxd/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- siproxd/distinfo 5 Apr 2007 17:26:13 -0000 1.3 +++ siproxd/distinfo 21 Oct 2011 03:50:04 -0000 @@ -1,5 +1,5 @@ -MD5 (siproxd-0.5.13.tar.gz) = kaVy+A3Vqa9aD38gf9NEeA== -RMD160 (siproxd-0.5.13.tar.gz) = xZF+R2Vao2PWxyq1oINs3vACs5o= -SHA1 (siproxd-0.5.13.tar.gz) = EIzpcDfhGcCRDhtJ42WEly3NbMs= -SHA256 (siproxd-0.5.13.tar.gz) = tBniZCz/KupD69MhOeL+NFADNH0J4ajcaiif3AjB980= -SIZE (siproxd-0.5.13.tar.gz) = 223109 +MD5 (siproxd-0.8.1.tar.gz) = Gm+dE66y1lA3XJo0asbLrw== +RMD160 (siproxd-0.8.1.tar.gz) = rC8+xA5Tnmn6gB/Fbmvm/VdqNXA= +SHA1 (siproxd-0.8.1.tar.gz) = YibuBLbwCAuzI8tzZO11jRy8u6E= +SHA256 (siproxd-0.8.1.tar.gz) = 3y3wT69b20mAy9/VUWpHiY/EfKHrwsYoqkgwWyCgna0= +SIZE (siproxd-0.8.1.tar.gz) = 833170 Index: siproxd/patches/patch-doc_siproxd_conf_example =================================================================== RCS file: /cvs/ports/telephony/siproxd/patches/patch-doc_siproxd_conf_example,v retrieving revision 1.1 diff -u -p -r1.1 patch-doc_siproxd_conf_example --- siproxd/patches/patch-doc_siproxd_conf_example 27 Nov 2006 11:16:50 -0000 1.1 +++ siproxd/patches/patch-doc_siproxd_conf_example 21 Oct 2011 03:50:04 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-doc_siproxd_conf_example,v 1.1 2006/11/27 11:16:50 msf Exp $ ---- doc/siproxd.conf.example.orig Mon Jun 19 01:28:42 2006 -+++ doc/siproxd.conf.example Sun Nov 26 00:15:43 2006 -@@ -80,15 +80,15 @@ log_calls = 1 +--- doc/siproxd.conf.example.orig Mon Jun 20 16:25:27 2011 ++++ doc/siproxd.conf.example Thu Oct 20 23:10:13 2011 +@@ -78,8 +78,8 @@ silence_log = 1 # Secure Enviroment settings: # user: uid/gid to switch to after startup # chrootjail: path to chroot to (chroot jail) @@ -11,21 +11,50 @@ $OpenBSD: patch-doc_siproxd_conf_example +chrootjail = /var/siproxd/ ###################################################################### - # Registration file: - # Where to store the current registrations. - # An empty value means we do not save registrations. Make sure that + # Memory settings +@@ -100,7 +100,7 @@ user = nobody # 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 -@@ -99,7 +99,7 @@ autosave_registrations = 300 - # PID file: - # Where to create the PID file. +@@ -113,7 +113,7 @@ autosave_registrations = 300 # 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 +@@ -323,17 +323,17 @@ debug_port = 0 + # 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 +-#load_plugin=plugin_shortdial.la +-load_plugin=plugin_logcall.la +-#load_plugin=plugin_defaulttarget.la +-#load_plugin=plugin_fix_bogus_via.la +-#load_plugin=plugin_stun.la +-#load_plugin=plugin_prefix.la +-#load_plugin=plugin_regex.la ++# List of plugins to load. ++#load_plugin=plugin_demo.so ++#load_plugin=plugin_shortdial.so ++load_plugin=plugin_logcall.so ++#load_plugin=plugin_defaulttarget.so ++#load_plugin=plugin_fix_bogus_via.so ++#load_plugin=plugin_stun.so ++#load_plugin=plugin_prefix.so ++#load_plugin=plugin_regex.so + + + ###################################################################### Index: siproxd/patches/patch-src_Makefile_in =================================================================== RCS file: /cvs/ports/telephony/siproxd/patches/patch-src_Makefile_in,v retrieving revision 1.2 diff -u -p -r1.2 patch-src_Makefile_in --- siproxd/patches/patch-src_Makefile_in 27 Nov 2006 11:16:50 -0000 1.2 +++ siproxd/patches/patch-src_Makefile_in 21 Oct 2011 03:50:04 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.2 2006/11/27 11:16:50 msf Exp $ ---- src/Makefile.in.orig Mon Jun 19 01:29:03 2006 -+++ src/Makefile.in Sat Nov 25 23:57:50 2006 -@@ -506,7 +506,7 @@ uninstall-am: uninstall-info-am uninstal +--- src/Makefile.in.orig Sun Jul 10 15:57:51 2011 ++++ src/Makefile.in Sat Sep 10 21:19:58 2011 +@@ -705,7 +705,7 @@ uninstall-am: uninstall-info-am uninstall-pkglibLTLIBR # count BUILDs - each time increment by one and define the # C macro BUILDNO. bind it to a file everybody includes (log.h) # Index: siproxd/patches/patch-src_resolve_c =================================================================== RCS file: siproxd/patches/patch-src_resolve_c diff -N siproxd/patches/patch-src_resolve_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ siproxd/patches/patch-src_resolve_c 21 Oct 2011 03:50:04 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ +--- src/resolve.c.orig Sat May 28 16:47:15 2011 ++++ src/resolve.c Mon Sep 26 20:42:59 2011 +@@ -20,8 +20,9 @@ + + #include "config.h" + +-#include <arpa/inet.h> ++#include <sys/types.h> + #include <netinet/in.h> ++#include <arpa/inet.h> + + #include <arpa/nameser.h> + #ifdef __APPLE__ Index: siproxd/patches/patch-src_siproxd_c =================================================================== RCS file: siproxd/patches/patch-src_siproxd_c diff -N siproxd/patches/patch-src_siproxd_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ siproxd/patches/patch-src_siproxd_c 21 Oct 2011 03:50:04 -0000 @@ -0,0 +1,18 @@ +$OpenBSD$ +This prevents siproxd from creating a redundant PID file outside the chroot jail +--- src/siproxd.c.orig Sun Jun 12 17:10:39 2011 ++++ src/siproxd.c Sun Sep 11 20:48:04 2011 +@@ -301,13 +301,6 @@ int main (int argc, char *argv[]) + /* prepare for creating PID file */ + if (pidfilename == NULL) pidfilename = configuration.pid_file; + +- /* If going to dive into a chroot jail, create a PID file outside +- * 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); +- } +- + /* change user and group IDs */ + secure_enviroment(); + Index: siproxd/pkg/PLIST =================================================================== RCS file: /cvs/ports/telephony/siproxd/pkg/PLIST,v retrieving revision 1.3 diff -u -p -r1.3 PLIST --- siproxd/pkg/PLIST 31 May 2007 15:51:23 -0000 1.3 +++ siproxd/pkg/PLIST 21 Oct 2011 03:50:04 -0000 @@ -1,7 +1,16 @@ @comment $OpenBSD: PLIST,v 1.3 2007/05/31 15:51:23 aanriot Exp $ @newgroup _siproxd:574 @newuser _siproxd:574:574:daemon:SIP proxy:/var/empty:/sbin/nologin -sbin/siproxd +lib/siproxd/ +lib/siproxd/plugin_defaulttarget.so +lib/siproxd/plugin_demo.so +lib/siproxd/plugin_fix_bogus_via.so +lib/siproxd/plugin_logcall.so +lib/siproxd/plugin_prefix.so +lib/siproxd/plugin_regex.so +lib/siproxd/plugin_shortdial.so +lib/siproxd/plugin_stun.so +@bin sbin/siproxd share/doc/siproxd/ share/doc/siproxd/FAQ share/doc/siproxd/KNOWN_BUGS @@ -14,3 +23,7 @@ share/examples/siproxd/siproxd_passwd.cf @owner root @group _siproxd @sample /var/siproxd/ +@mode +@owner +@group +@rcscript ${RCDIR}/siproxd Index: siproxd/pkg/siproxd.rc =================================================================== RCS file: siproxd/pkg/siproxd.rc diff -N siproxd/pkg/siproxd.rc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ siproxd/pkg/siproxd.rc 21 Oct 2011 03:50:04 -0000 @@ -0,0 +1,9 @@ +#!/bin/sh +# +# $OpenBSD$ + +daemon="${TRUEPREFIX}/sbin/siproxd" + +. /etc/rc.d/rc.subr + +rc_cmd $1