View | Details | Raw Unified | Return to bug 187113 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 187113