pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net



Module Name:    pkgsrc
Committed By:   hauke
Date:           Wed Nov 14 15:25:28 UTC 2018

Modified Files:
        pkgsrc/net: Makefile
Added Files:
        pkgsrc/net/siproxd: DESCR MESSAGE Makefile PLIST distinfo hacks.mk
        pkgsrc/net/siproxd/files: siproxd.sh
        pkgsrc/net/siproxd/patches: patch-doc_Makefile.in
            patch-doc_siproxd.conf.example patch-src_plugins.h
            patch-src_rtpproxy.h

Log Message:
Siproxd is a proxy daemon for the SIP protocol. It handles
registrations of SIP clients on a private IP network, and rewrites the
SIP message bodies to make SIP connections work via a NAT firewall.

Imported from wip/siproxd.


To generate a diff of this commit:
cvs rdiff -u -r1.1232 -r1.1233 pkgsrc/net/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/net/siproxd/DESCR pkgsrc/net/siproxd/MESSAGE \
    pkgsrc/net/siproxd/Makefile pkgsrc/net/siproxd/PLIST \
    pkgsrc/net/siproxd/distinfo pkgsrc/net/siproxd/hacks.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/net/siproxd/files/siproxd.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/siproxd/patches/patch-doc_Makefile.in \
    pkgsrc/net/siproxd/patches/patch-doc_siproxd.conf.example \
    pkgsrc/net/siproxd/patches/patch-src_plugins.h \
    pkgsrc/net/siproxd/patches/patch-src_rtpproxy.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/Makefile
diff -u pkgsrc/net/Makefile:1.1232 pkgsrc/net/Makefile:1.1233
--- pkgsrc/net/Makefile:1.1232  Tue Oct 23 03:18:06 2018
+++ pkgsrc/net/Makefile Wed Nov 14 15:25:28 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1232 2018/10/23 03:18:06 riastradh Exp $
+# $NetBSD: Makefile,v 1.1233 2018/11/14 15:25:28 hauke Exp $
 #
 
 COMMENT=       Networking tools
@@ -790,6 +790,7 @@ SUBDIR+=    sendfile
 SUBDIR+=       ser
 SUBDIR+=       sharity-light
 SUBDIR+=       sipcalc
+SUBDIR+=       siproxd
 SUBDIR+=       sipsak
 SUBDIR+=       sitescooper
 SUBDIR+=       slurm

Added files:

Index: pkgsrc/net/siproxd/DESCR
diff -u /dev/null pkgsrc/net/siproxd/DESCR:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/DESCR    Wed Nov 14 15:25:28 2018
@@ -0,0 +1,4 @@
+Siproxd is a proxy/masquerading daemon for the SIP protocol. It handles
+registrations of SIP clients on a private IP network and performs rewriting
+of the SIP message bodies to make SIP connections work via a masquerading
+firewall (NAT).
Index: pkgsrc/net/siproxd/MESSAGE
diff -u /dev/null pkgsrc/net/siproxd/MESSAGE:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/MESSAGE  Wed Nov 14 15:25:28 2018
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+To run siproxd chrooted on NetBSD, in ${PKG_SYSCONFDIR}/siproxd.conf
+set 'chrootjail', and in /etc/rc.conf set 'siproxd_chrootdir' accordingly.
+
+===========================================================================
Index: pkgsrc/net/siproxd/Makefile
diff -u /dev/null pkgsrc/net/siproxd/Makefile:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/Makefile Wed Nov 14 15:25:28 2018
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+DISTNAME=      siproxd-0.8.2
+PKGREVISION=   2
+CATEGORIES=    net
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=siproxd/}
+
+MAINTAINER=    schwarz%NetBSD.org@localhost
+HOMEPAGE=      http://siproxd.sourceforge.net/
+COMMENT=       Session Initiation Protocol Application-Level Gateway (SIP ALG)
+LICENSE=       gnu-gpl-v2
+
+GNU_CONFIGURE= YES
+USE_TOOLS+=    gmake
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=           VARBASE
+
+SIPROXD_USER?=         siproxd
+SIPROXD_GROUP?=                siproxd
+SIPROXD_HOME?=         ${VARBASE}/chroot/siproxd
+
+PKG_GROUPS=            ${SIPROXD_GROUP}
+PKG_USERS=             ${SIPROXD_USER}:${SIPROXD_GROUP}
+
+PKG_GECOS.${SIPROXD_USER}= SIP proxy
+PKG_HOME.${SIPROXD_USER}=  ${SIPROXD_HOME}
+
+PKG_GROUPS_VARS+=      SIPROXD_GROUP
+PKG_USERS_VARS+=       SIPROXD_USER
+
+FILES_SUBST+=          SIPROXD_USER=${SIPROXD_USER:Q}
+FILES_SUBST+=          SIPROXD_GROUP=${SIPROXD_GROUP:Q}
+FILES_SUBST+=          SIPROXD_HOME=${SIPROXD_HOME:Q}
+
+RCD_SCRIPTS+=          siproxd
+PKG_SYSCONFSUBDIR=     siproxd
+
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --with-libosip-prefix=${BUILDLINK_PREFIX.libosip2}
+
+DOCDIR=                        share/doc/siproxd
+EGDIR=                 share/examples/siproxd
+
+CONF_FILES=            ${PREFIX}/${EGDIR}/siproxd.conf.example \
+                               ${PKG_SYSCONFDIR}/siproxd.conf
+CONF_FILES+=           ${PREFIX}/${EGDIR}/siproxd_passwd.cfg \
+                               ${PKG_SYSCONFDIR}/siproxd_passwd.cfg
+
+OWN_DIRS+=             ${SIPROXD_HOME}
+
+INSTALLATION_DIRS=     sbin ${DOCDIR} ${EGDIR}
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=      doc/siproxd.conf.example
+SUBST_MESSAGE.paths=    performing pathname substitutions
+SUBST_VARS.paths=       VARBASE PREFIX PKG_SYSCONFDIR SIPROXD_USER SIPROXD_HOME
+
+post-install:
+.for ff in README RELNOTES doc/FAQ doc/KNOWN_BUGS doc/RFC3261_compliance.txt
+       ${INSTALL_DATA} ${WRKSRC}/${ff} ${DESTDIR}${PREFIX}/${DOCDIR}/
+.endfor
+.for ff in sample_asterisk.txt sample_cfg_budgetone.txt sample_cfg_x-lite.txt
+       ${INSTALL_DATA} ${WRKSRC}/doc/${ff} ${DESTDIR}${PREFIX}/${EGDIR}/
+.endfor
+
+.include "../../mk/pthread.buildlink3.mk"
+# siproxd's configure does not check for PTHREAD_LDFLAGS
+PTHREAD_LIBS+= ${PTHREAD_LDFLAGS}
+
+.include "../../devel/libosip/buildlink3.mk"
+.include "../../devel/libltdl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/siproxd/PLIST
diff -u /dev/null pkgsrc/net/siproxd/PLIST:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/PLIST    Wed Nov 14 15:25:28 2018
@@ -0,0 +1,25 @@
+@comment $NetBSD: PLIST,v 1.1 2018/11/14 15:25:28 hauke Exp $
+lib/siproxd/plugin_codecfilter.la
+lib/siproxd/plugin_defaulttarget.la
+lib/siproxd/plugin_demo.la
+lib/siproxd/plugin_fix_DTAG.la
+lib/siproxd/plugin_fix_bogus_via.la
+lib/siproxd/plugin_fix_fbox_anoncall.la
+lib/siproxd/plugin_logcall.la
+lib/siproxd/plugin_prefix.la
+lib/siproxd/plugin_regex.la
+lib/siproxd/plugin_shortdial.la
+lib/siproxd/plugin_siptrunk.la
+lib/siproxd/plugin_stripheader.la
+lib/siproxd/plugin_stun.la
+sbin/siproxd
+share/doc/siproxd/FAQ
+share/doc/siproxd/KNOWN_BUGS
+share/doc/siproxd/README
+share/doc/siproxd/RELNOTES
+share/doc/siproxd/RFC3261_compliance.txt
+share/examples/siproxd/sample_asterisk.txt
+share/examples/siproxd/sample_cfg_budgetone.txt
+share/examples/siproxd/sample_cfg_x-lite.txt
+share/examples/siproxd/siproxd.conf.example
+share/examples/siproxd/siproxd_passwd.cfg
Index: pkgsrc/net/siproxd/distinfo
diff -u /dev/null pkgsrc/net/siproxd/distinfo:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/distinfo Wed Nov 14 15:25:28 2018
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+SHA1 (siproxd-0.8.2.tar.gz) = 065a72695a1182970a8f457a8c51809145f90ed4
+RMD160 (siproxd-0.8.2.tar.gz) = 57c76ef20ee4e9f1c5910526ed8e72129587a17e
+SHA512 (siproxd-0.8.2.tar.gz) = 25bc4fd4353574fff3253b06f75ad17435d993270780b9f3c8e520c982587247adb7794563083c349aee95e1fa2b0255187c8baa5ec3d72db39b67787f5a85b3
+Size (siproxd-0.8.2.tar.gz) = 846148 bytes
+SHA1 (patch-doc_Makefile.in) = 5cbd0460e12609f0551959e266ce4b9ca37c7559
+SHA1 (patch-doc_siproxd.conf.example) = 74be8af2124ec65e8f125ee81dedf666fd032088
+SHA1 (patch-src_plugins.h) = 678f5c87e8695137c3f9290f55b3070d5262e247
+SHA1 (patch-src_rtpproxy.h) = 4189e1fa35e878ba836eb860a7143515f51aa5c1
Index: pkgsrc/net/siproxd/hacks.mk
diff -u /dev/null pkgsrc/net/siproxd/hacks.mk:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/hacks.mk Wed Nov 14 15:25:28 2018
@@ -0,0 +1,17 @@
+# $NetBSD: hacks.mk,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+.if !defined(SIPROXD_HACKS_MK)
+SIPROXD_HACKS_MK=      # defined
+
+### [Sunday January  7 15:09:27 MET 2007 : schwarz]
+### Solaris (prior to Solaris 9) has inet_ntop in llib-lresolv,
+### but proper header files and some defines are missing
+###
+.if ${OPSYS} == "SunOS"
+.  if ${OS_VERSION} < 5.9
+PKG_HACKS+=    no-proper-inet_ntop
+CONFIGURE_ENV+=        ac_cv_func_inet_ntop="no"
+.  endif
+.endif
+
+.endif

Index: pkgsrc/net/siproxd/files/siproxd.sh
diff -u /dev/null pkgsrc/net/siproxd/files/siproxd.sh:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/files/siproxd.sh Wed Nov 14 15:25:28 2018
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# $NetBSD: siproxd.sh,v 1.1 2018/11/14 15:25:28 hauke Exp $
+#
+
+# PROVIDE: siproxd
+# REQUIRE: DAEMON
+# BEFORE:  LOGIN
+# KEYWORD: chrootdir
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="siproxd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/${name}/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/siproxd.conf"
+start_precmd="siproxd_precmd"
+
+siproxd_precmd()
+{
+        rc_flags="-p ${pidfile} $rc_flags"
+
+        local piddir="$(dirname "${pidfile}")"
+
+        # Make sure @VARBASE@/run/siproxd exists
+        mkdir -p "${siproxd_chrootdir}${piddir}"
+       chown @SIPROXD_USER@:@SIPROXD_GROUP@ "${siproxd_chrootdir}${piddir}"
+
+       # If chrooted, provide a link to the pid and registrations file
+       # Note: siproxd chroots itself, if so configured
+
+        if [ -n "${siproxd_chrootdir}" ]; then
+               ln -snf "${siproxd_chrootdir}${piddir}" "${piddir}"
+       fi
+
+        return 0
+}
+
+load_rc_config $name
+run_rc_command "$1"

Index: pkgsrc/net/siproxd/patches/patch-doc_Makefile.in
diff -u /dev/null pkgsrc/net/siproxd/patches/patch-doc_Makefile.in:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/patches/patch-doc_Makefile.in    Wed Nov 14 15:25:28 2018
@@ -0,0 +1,21 @@
+$NetBSD: patch-doc_Makefile.in,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+DESTDIR support for configuration files
+
+--- doc/Makefile.in.orig       2012-04-06 22:58:58.000000000 +0200
++++ doc/Makefile.in    2012-04-06 22:59:04.000000000 +0200
+@@ -547,10 +547,10 @@
+ # install local data
+ #
+ install-data-local:
+-      $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+-      $(INSTALL_DATA) $(srcdir)/siproxd.conf.example  $(DESTDIR)$(sysconfdir)/
+-      $(INSTALL_DATA) $(srcdir)/siproxd_passwd.cfg    $(DESTDIR)$(sysconfdir)/
+-      chmod 600 $(DESTDIR)$(sysconfdir)/siproxd_passwd.cfg
++      $(mkinstalldirs) $(DESTDIR)$(prefix)/share/examples/siproxd
++      $(INSTALL_DATA) $(srcdir)/siproxd.conf.example  $(DESTDIR)$(prefix)/share/examples/siproxd/
++      $(INSTALL_DATA) $(srcdir)/siproxd_passwd.cfg    $(DESTDIR)$(prefix)/share/examples/siproxd/
++      chmod 600 $(DESTDIR)$(prefix)/share/examples/siproxd/siproxd_passwd.cfg
+       $(mkinstalldirs) $(DESTDIR)$(docdir)
+ @have_docbook2pdf_TRUE@       $(INSTALL_DATA) $(srcdir)/pdf/*                 $(DESTDIR)$(docdir)/
+ @have_docbook2html_TRUE@      $(INSTALL_DATA) $(srcdir)/html/*                $(DESTDIR)$(docdir)/
Index: pkgsrc/net/siproxd/patches/patch-doc_siproxd.conf.example
diff -u /dev/null pkgsrc/net/siproxd/patches/patch-doc_siproxd.conf.example:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/patches/patch-doc_siproxd.conf.example   Wed Nov 14 15:25:28 2018
@@ -0,0 +1,60 @@
+$NetBSD: patch-doc_siproxd.conf.example,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+Substitute path and user information.
+
+--- doc/siproxd.conf.example.orig      2016-03-25 18:44:51.000000000 +0000
++++ doc/siproxd.conf.example
+@@ -1,5 +1,5 @@
+ #
+-# /etc/siproxd.conf - siproxd configuration file
++# @PKG_SYSCONFDIR@/siproxd.conf - siproxd configuration file
+ #
+ # !! This is a sample file, adapt it to your needs before using it !!
+ #
+@@ -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)
+-user = nobody
+-#chrootjail = /var/lib/siproxd/
++user = @SIPROXD_USER@
++#chrootjail = @SIPROXD_HOME@/
+ 
+ ######################################################################
+ # 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 = @VARBASE@/run/siproxd/siproxd_registrations
+ 
+ ######################################################################
+ # Automatically save current registrations every 'n' seconds
+@@ -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 = @VARBASE@/run/siproxd/siproxd.pid
+ 
+ ######################################################################
+ # global switch to control the RTP proxy behaviour
+@@ -213,7 +213,7 @@ tcp_keepalive = 20
+ #
+ # OR use individual per user passwords stored in a file
+ #
+-#proxy_auth_pwfile = /etc/siproxd_passwd.cfg
++#proxy_auth_pwfile = @PKG_SYSCONFDIR@/siproxd_passwd.cfg
+ #
+ # 'proxy_auth_pwfile' has precedence over 'proxy_auth_passwd'
+ 
+@@ -323,7 +323,7 @@ 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
Index: pkgsrc/net/siproxd/patches/patch-src_plugins.h
diff -u /dev/null pkgsrc/net/siproxd/patches/patch-src_plugins.h:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/patches/patch-src_plugins.h      Wed Nov 14 15:25:28 2018
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_plugins.h,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+using libtool 2.x
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/siproxd/files/siproxd-libtool-2.4.patch?view=markup
+
+--- src/plugins.h.orig 2015-10-15 15:29:20.000000000 +0200
++++ src/plugins.h      2017-04-03 22:25:39.000000000 +0200
+@@ -41,6 +41,12 @@
+ 
+ /* Plugins must return STS_SUCCESS / SUCCESS_FAILURE */
+ 
++#ifndef lt__PROGRAM__LTX_preloaded_symbols
++#define lt__PROGRAM__LTX_preloaded_symbols lt_libltdl_LTX_preloaded_symbols
++#endif
++#ifndef lt_libltdl_LTX_preloaded_symbols
++extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
++#endif
+ 
+ /*
+  * Processing stages for Plugins
Index: pkgsrc/net/siproxd/patches/patch-src_rtpproxy.h
diff -u /dev/null pkgsrc/net/siproxd/patches/patch-src_rtpproxy.h:1.1
--- /dev/null   Wed Nov 14 15:25:28 2018
+++ pkgsrc/net/siproxd/patches/patch-src_rtpproxy.h     Wed Nov 14 15:25:28 2018
@@ -0,0 +1,11 @@
+$NetBSD: patch-src_rtpproxy.h,v 1.1 2018/11/14 15:25:28 hauke Exp $
+
+Missing sys/time.h for struct timeval
+
+--- src/rtpproxy.h.orig        2011-05-28 15:47:15.000000000 +0000
++++ src/rtpproxy.h
+@@ -22,2 +22,4 @@
+ 
++#include <sys/time.h>
++
+ #define CALLIDNUM_SIZE        256



Home | Main Index | Thread Index | Old Index