pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net Siproxd is a proxy daemon for the SIP protocol. It...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f9dccb12a99f
branches: trunk
changeset: 387306:f9dccb12a99f
user: hauke <hauke%pkgsrc.org@localhost>
date: Wed Nov 14 15:25:28 2018 +0000
description:
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.
diffstat:
net/Makefile | 3 +-
net/siproxd/DESCR | 4 +
net/siproxd/MESSAGE | 7 ++
net/siproxd/Makefile | 75 ++++++++++++++++++++++
net/siproxd/PLIST | 25 +++++++
net/siproxd/distinfo | 10 ++
net/siproxd/files/siproxd.sh | 41 ++++++++++++
net/siproxd/hacks.mk | 17 ++++
net/siproxd/patches/patch-doc_Makefile.in | 21 ++++++
net/siproxd/patches/patch-doc_siproxd.conf.example | 60 +++++++++++++++++
net/siproxd/patches/patch-src_plugins.h | 20 +++++
net/siproxd/patches/patch-src_rtpproxy.h | 11 +++
12 files changed, 293 insertions(+), 1 deletions(-)
diffs (truncated from 352 to 300 lines):
diff -r f58dbe683317 -r f9dccb12a99f net/Makefile
--- a/net/Makefile Wed Nov 14 13:00:05 2018 +0000
+++ b/net/Makefile Wed Nov 14 15:25:28 2018 +0000
@@ -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+= ser
SUBDIR+= sharity-light
SUBDIR+= sipcalc
+SUBDIR+= siproxd
SUBDIR+= sipsak
SUBDIR+= sitescooper
SUBDIR+= slurm
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/DESCR Wed Nov 14 15:25:28 2018 +0000
@@ -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).
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/MESSAGE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/MESSAGE Wed Nov 14 15:25:28 2018 +0000
@@ -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.
+
+===========================================================================
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/Makefile Wed Nov 14 15:25:28 2018 +0000
@@ -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"
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/PLIST Wed Nov 14 15:25:28 2018 +0000
@@ -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
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/distinfo Wed Nov 14 15:25:28 2018 +0000
@@ -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
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/files/siproxd.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/files/siproxd.sh Wed Nov 14 15:25:28 2018 +0000
@@ -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"
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/hacks.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/hacks.mk Wed Nov 14 15:25:28 2018 +0000
@@ -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
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/patches/patch-doc_Makefile.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/patches/patch-doc_Makefile.in Wed Nov 14 15:25:28 2018 +0000
@@ -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)/
diff -r f58dbe683317 -r f9dccb12a99f net/siproxd/patches/patch-doc_siproxd.conf.example
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/siproxd/patches/patch-doc_siproxd.conf.example Wed Nov 14 15:25:28 2018 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index