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

Collapse All | Expand All

(-)Makefile (-6 / +17 lines)
Lines 2-22 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	kannel
4
PORTNAME=	kannel
5
PORTVERSION=	1.5.0
5
PORTVERSION=	1.4.4
6
PORTREVISION=	5
6
PORTEPOCH=	1
7
CATEGORIES=	www
7
CATEGORIES=	www
8
MASTER_SITES=	http://www.kannel.org/download/${PORTVERSION}/
8
MASTER_SITES=	http://www.kannel.org/download/${PORTVERSION}/
9
DISTNAME=	gateway-${PORTVERSION}
9
DISTNAME=	gateway-${PORTVERSION}
10
10
11
MAINTAINER=	ports@FreeBSD.org
11
MAINTAINER=	dbaio@bsd.com.br
12
COMMENT=	WAP/SMS gateway
12
COMMENT=	WAP/SMS gateway
13
13
14
LICENSE=	The_Kannel_Software_License
15
LICENSE_NAME=	The Kannel Software License, Version 1.0
16
LICENSE_FILE=	${WRKSRC}/LICENSE
17
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
18
14
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
19
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
15
20
16
USES=		tar:bzip2 gmake
21
USERS=	kannel
22
GROUPS=	kannel
23
24
USES=		tar:bzip2 gmake bison
25
USE_GCC=	yes
17
USE_GNOME=	libxml2
26
USE_GNOME=	libxml2
18
USE_OPENSSL=	yes
27
USE_OPENSSL=	yes
19
USE_RC_SUBR=	${PORTNAME}
28
USE_RC_SUBR=	${PORTNAME}_bearerbox ${PORTNAME}_smsbox ${PORTNAME}_wapbox
20
GNU_CONFIGURE=	yes
29
GNU_CONFIGURE=	yes
21
CONFIGURE_ARGS=	--with-cflags="${CPPFLAGS}" --with-libs="${LDFLAGS}" \
30
CONFIGURE_ARGS=	--with-cflags="${CPPFLAGS}" --with-libs="${LDFLAGS}" \
22
		--enable-pcre=yes --enable-docs=no --with-malloc=native \
31
		--enable-pcre=yes --enable-docs=no --with-malloc=native \
Lines 42-52 Link Here
42
	${INSTALL_DATA} ${WRKSRC}/gw/${filename} \
51
	${INSTALL_DATA} ${WRKSRC}/gw/${filename} \
43
		${STAGEDIR}${PREFIX}/etc/${filename}.sample
52
		${STAGEDIR}${PREFIX}/etc/${filename}.sample
44
.endfor
53
.endfor
45
.for filename in mtbatch seewbmp wmlsc wmlsdasm
54
.for filename in mtbatch seewbmp wmlsc wmlsdasm decode_emimsg
46
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${filename}
55
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${filename}
47
.endfor
56
.endfor
48
.for filename in bearerbox run_kannel_box smsbox wapbox
57
.for filename in bearerbox run_kannel_box smsbox wapbox
49
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/${filename}
58
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/${filename}
50
.endfor
59
.endfor
60
	@${MKDIR} ${STAGEDIR}/var/log/kannel
61
	@${MKDIR} ${STAGEDIR}/var/run/kannel
51
62
52
.include <bsd.port.mk>
63
.include <bsd.port.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (gateway-1.5.0.tar.bz2) = e882cd2641985922a6629788691f12deb3e1d36a96cc1091df9416825bb1506a
1
SHA256 (gateway-1.4.4.tar.bz2) = df665b600d1960708637d0c2875f11d296677b931add0a6b3cdd102024d1a717
2
SIZE (gateway-1.5.0.tar.bz2) = 2897146
2
SIZE (gateway-1.4.4.tar.bz2) = 2949852
(-)files/kannel.in (-80 lines)
Lines 1-80 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: kannel_smsbox kannel_wapbox kannel_bearerbox
6
# REQUIRE: NETWORKING SERVERS 
7
# BEFORE: LOGIN
8
# KEYWORD: shutdown
9
10
. /etc/rc.subr
11
12
name=kannel
13
rcvar=kannel_enable
14
15
command="%%PREFIX%%/sbin/run_kannel_box"
16
extra_commands="reload"
17
sig_reload=SIGUSR1
18
19
load_rc_config $name
20
# Set defaults
21
kannel_config=${kannel_config:-"%%PREFIX%%/etc/kannel.conf"}
22
kannel_user=${kannel_user:-"kannel"}
23
# Config file is required
24
if [ ! -r ${kannel_config} ]; then
25
    warn "${kannel_config} is not readable."
26
    case $1 in
27
	force*) : ;;
28
	*) exit 1 ;;
29
    esac
30
fi
31
32
if test -n ${kannel_enable:-""} && checkyesno kannel_enable; then
33
    kannel_bearerbox_enable=${kannel_bearerbox_enable:-"YES"}
34
    kannel_smsbox_enable=${kannel_smsbox_enable:-"YES"}
35
    kannel_wapbox_enable=${kannel_wapbox_enable:-"YES"}
36
fi
37
38
# bearerbox
39
name=kannel_bearerbox
40
rcvar=kannel_bearerbox_enable
41
pidfile=/var/run/kannel/${name}.pid
42
# Defaults
43
kannel_bearerbox_user=${kannel_bearerbox_user:-"${kannel_user}"}
44
kannel_bearerbox_enable=${kannel_bearerbox_enable:-"NO"}
45
kannel_bearerbox_config=${kannel_bearerbox_config:-"${kannel_config}"}
46
kannel_bearerbox_flags=${kannel_bearerbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/bearerbox ${kannel_bearerbox_flags} ${kannel_bearerbox_config}"}
47
#
48
load_rc_config $name
49
run_rc_command "$1"
50
#
51
_rc_restart_done=false
52
53
# smsbox
54
name=kannel_smsbox
55
rcvar=kannel_smsbox_enable
56
pidfile=/var/run/kannel/${name}.pid
57
# Defaults
58
kannel_smsbox_user=${kannel_smsbox_user:-"${kannel_user}"}
59
kannel_smsbox_enable=${kannel_smsbox_enable:-"NO"}
60
kannel_smsbox_config=${kannel_smsbox_config:-"${kannel_config}"}
61
kannel_smsbox_flags=${kannel_smsbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/smsbox ${kannel_smsbox_flags} ${kannel_smsbox_config}"}
62
#
63
load_rc_config $name
64
run_rc_command "$1"
65
#
66
_rc_restart_done=false
67
68
# wapbox
69
name=kannel_wapbox
70
rcvar=kannel_wapbox_enable
71
pidfile=/var/run/kannel/${name}.pid
72
# Defaults
73
kannel_wapbox_user=${kannel_wapbox_user:-"${kannel_user}"}
74
kannel_wapbox_enable=${kannel_wapbox_enable:-"NO"}
75
kannel_wapbox_config=${kannel_wapbox_config:-"${kannel_config}"}
76
kannel_wapbox_flags=${kannel_wapbox_flags:-"--pidfile ${pidfile} %%PREFIX%%/sbin/wapbox ${kannel_wapbox_flags} ${kannel_wapbox_config}"}
77
#
78
load_rc_config $name
79
run_rc_command "$1"
80
(-)files/kannel_bearerbox.in (+55 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: bearerbox
6
# REQUIRE: LOGIN
7
# KEYWORD: shutdown
8
#
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# to enable this service:
11
#
12
# kannel_bearerbox_enable (bool):	Set to NO by default.
13
#				Set it to YES to enable kannel_bearerbox.
14
# kannel_bearerbox_config (path):	Set to %%PREFIX%%/etc/kannel.conf
15
#				by default.
16
17
. /etc/rc.subr
18
19
name=kannel_bearerbox
20
rcvar=${name}_enable
21
kannel_piddir="/var/run/kannel"
22
23
load_rc_config $name
24
25
: ${kannel_bearerbox_enable:="NO"}
26
: ${kannel_bearerbox_config="%%PREFIX%%/etc/kannel.conf"}
27
: ${kannel_bearerbox_user:="kannel"}
28
: ${kannel_bearerbox_group:="kannel"}
29
30
command="%%PREFIX%%/sbin/run_kannel_box"
31
start_precmd="${name}_prestart"
32
extra_commands="reload"
33
sig_reload=SIGUSR1
34
35
pidfile="${kannel_piddir}/${name}.pid"
36
37
command_args="--pidfile ${pidfile} %%PREFIX%%/sbin/bearerbox ${kannel_bearerbox_flags} ${kannel_bearerbox_config}"
38
39
kannel_bearerbox_prestart()
40
{
41
	if [ ! -d "${kannel_piddir}" ]; then
42
		install -d -o $kannel_bearerbox_user -g $kannel_bearerbox_group $kannel_piddir
43
	fi
44
	kannel_bearerbox_checkconfig
45
}
46
47
kannel_bearerbox_checkconfig() {
48
	# Config file is required
49
	if [ ! -r ${kannel_bearerbox_config} ]; then
50
		warn "${kannel_bearerbox_config} is not readable."
51
		exit 1
52
	fi
53
}
54
55
run_rc_command "$1"
(-)files/kannel_smsbox.in (+65 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: smsbox
6
# REQUIRE: LOGIN bearerbox
7
# KEYWORD: shutdown
8
#
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# to enable this service:
11
#
12
# kannel_smsbox_enable (bool):	Set to NO by default.
13
#				Set it to YES to enable kannel_smsbox.
14
# kannel_smsbox_config (path):	Set to %%PREFIX%%/etc/kannel.conf
15
#				by default.
16
17
. /etc/rc.subr
18
19
name=kannel_smsbox
20
rcvar=${name}_enable
21
kannel_piddir="/var/run/kannel"
22
23
load_rc_config $name
24
25
: ${kannel_smsbox_enable:="NO"}
26
: ${kannel_smsbox_config="%%PREFIX%%/etc/kannel.conf"}
27
: ${kannel_smsbox_user:="kannel"}
28
: ${kannel_smsbox_group:="kannel"}
29
30
command="%%PREFIX%%/sbin/run_kannel_box"
31
start_precmd="${name}_prestart"
32
extra_commands="reload"
33
sig_reload=SIGUSR1
34
35
pidfile="${kannel_piddir}/${name}.pid"
36
bearerbox_pidfile="${kannel_piddir}/kannel_bearerbox.pid"
37
38
command_args="--pidfile ${pidfile} %%PREFIX%%/sbin/smsbox ${kannel_smsbox_flags} ${kannel_smsbox_config}"
39
40
kannel_smsbox_prestart()
41
{
42
	if [ ! -d "${kannel_piddir}" ]; then
43
		install -d -o $kannel_smsbox_user -g $kannel_smsbox_group $kannel_piddir
44
	fi
45
	kannel_smsbox_checkconfig
46
	kannel_bearerbox_checkpid
47
}
48
49
kannel_smsbox_checkconfig() {
50
	# Config file is required
51
	if [ ! -r ${kannel_smsbox_config} ]; then
52
		warn "${kannel_smsbox_config} is not readable."
53
		exit 1
54
	fi
55
}
56
57
kannel_bearerbox_checkpid() {
58
	# Check if kannel bearerbox is running
59
	if [ ! -e "${bearerbox_pidfile}" ]; then
60
		warn "In order to run ${name} you need to run first kannel_bearerbox."
61
		exit 1
62
	fi
63
}
64
65
run_rc_command "$1"
(-)files/kannel_wapbox.in (+65 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# $FreeBSD$
4
#
5
# PROVIDE: wapbox
6
# REQUIRE: LOGIN bearerbox
7
# KEYWORD: shutdown
8
#
9
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
10
# to enable this service:
11
#
12
# kannel_wapbox_enable (bool):	Set to NO by default.
13
#				Set it to YES to enable kannel_wapbox.
14
# kannel_wapbox_config (path):	Set to %%PREFIX%%/etc/kannel.conf
15
#				by default.
16
17
. /etc/rc.subr
18
19
name=kannel_wapbox
20
rcvar=${name}_enable
21
kannel_piddir="/var/run/kannel"
22
23
load_rc_config $name
24
25
: ${kannel_wapbox_enable:="NO"}
26
: ${kannel_wapbox_config="%%PREFIX%%/etc/kannel.conf"}
27
: ${kannel_wapbox_user:="kannel"}
28
: ${kannel_wapbox_group:="kannel"}
29
30
command="%%PREFIX%%/sbin/run_kannel_box"
31
start_precmd="${name}_prestart"
32
extra_commands="reload"
33
sig_reload=SIGUSR1
34
35
pidfile="${kannel_piddir}/${name}.pid"
36
bearerbox_pidfile="${kannel_piddir}/kannel_bearerbox.pid"
37
38
command_args="--pidfile ${pidfile} %%PREFIX%%/sbin/wapbox ${kannel_wapbox_flags} ${kannel_wapbox_config}"
39
40
kannel_wapbox_prestart()
41
{
42
	if [ ! -d "${kannel_piddir}" ]; then
43
		install -d -o $kannel_wapbox_user -g $kannel_wapbox_group $kannel_piddir
44
	fi
45
	kannel_wapbox_checkconfig
46
	kannel_bearerbox_checkpid
47
}
48
49
kannel_wapbox_checkconfig() {
50
	# Config file is required
51
	if [ ! -r ${kannel_wapbox_config} ]; then
52
		warn "${kannel_wapbox_config} is not readable."
53
		exit 1
54
	fi
55
}
56
57
kannel_bearerbox_checkpid() {
58
	# Check if kannel bearerbox is running
59
	if [ ! -e "${bearerbox_pidfile}" ]; then
60
		warn "In order to run ${name} you need to run first kannel_bearerbox."
61
		exit 1
62
	fi
63
}
64
65
run_rc_command "$1"
(-)files/patch-debian__kannel.conf (-15 lines)
Lines 1-15 Link Here
1
--- debian/kannel.conf.orig	Mon Dec 11 14:00:30 2000
2
+++ debian/kannel.conf	Wed Jan  3 20:11:13 2001
3
@@ -13,10 +13,10 @@
4
 admin-allow-ip = "127.0.0.1"
5
 wapbox-port = 13002
6
 wdp-interface-name = "*"
7
-log-file = "/var/log/kannel/bearerbox.log"
8
+log-file = "/var/log/bearerbox.log"
9
 box-deny-ip = "*.*.*.*"
10
 box-allow-ip = "127.0.0.1"
11
 
12
 group = wapbox
13
 bearerbox-host = localhost
14
-log-file = "/var/log/kannel/wapbox.log"
15
+log-file = "/var/log/wapbox.log"
(-)files/patch-gw_smskannel.conf (+29 lines)
Line 0 Link Here
1
--- gw/smskannel.conf.orig	2009-02-10 16:15:58 UTC
2
+++ gw/smskannel.conf
3
@@ -41,12 +41,12 @@ admin-password = bar
4
 #status-password = foo
5
 #admin-deny-ip = ""
6
 #admin-allow-ip = ""
7
-#log-file = "/tmp/kannel.log"
8
+#log-file = "/var/log/kannel/kannel.log"
9
 #log-level = 0
10
 box-deny-ip = "*.*.*.*"
11
 box-allow-ip = "127.0.0.1"
12
 #unified-prefix = "+358,00358,0;+,00"
13
-#access-log = "/tmp/access.log"
14
+#access-log = "/var/log/kannel/access.log"
15
 #store-file = "kannel.store"
16
 #ssl-server-cert-file = "cert.pem"
17
 #ssl-server-key-file = "key.pem"
18
@@ -80,9 +80,9 @@ bearerbox-host = 127.0.0.1
19
 sendsms-port = 13013
20
 global-sender = 13013
21
 #sendsms-chars = "0123456789 +-"
22
-#log-file = "/tmp/smsbox.log"
23
+#log-file = "/var/log/kannel/smsbox.log"
24
 #log-level = 0
25
-#access-log = "/tmp/access.log"
26
+#access-log = "/var/log/kannel/access.log"
27
 
28
 #---------------------------------------------
29
 # SEND-SMS USERS
(-)files/patch-gw_wapkannel.conf (+28 lines)
Line 0 Link Here
1
--- gw/wapkannel.conf.orig	2009-02-10 16:15:58 UTC
2
+++ gw/wapkannel.conf
3
@@ -28,20 +28,20 @@ admin-password = bar
4
 #admin-deny-ip = ""
5
 #admin-allow-ip = ""
6
 wdp-interface-name = "127.0.0.1"
7
-#log-file = "/tmp/bearerbox.log"
8
+#log-file = "/var/log/kannel/bearerbox.log"
9
 #log-level = 0
10
 box-deny-ip = "*.*.*.*"
11
 box-allow-ip = "127.0.0.1"
12
-#access-log = "/tmp/access.log"
13
-#store-file = "/tmp/kannel.store"
14
+#access-log = "/var/log/kannel/access.log"
15
+#store-file = "/var/log/kannel/kannel.store"
16
 #ssl-server-cert-file = "cert.pem"
17
 #ssl-server-key-file = "key.pem"
18
 #ssl-certkey-file = "mycertandprivkeyfile.pem"
19
 
20
 group = wapbox
21
 bearerbox-host = 127.0.0.1
22
-#log-file = "/tmp/wapbox.log"
23
+#log-file = "/var/log/kannel/wapbox.log"
24
 #log-level = 0
25
 syslog-level = none
26
-#access-log = "/tmp/wapaccess.log"
27
+#access-log = "/var/log/kannel/wapaccess.log"
28
 
(-)files/patch-gwlib__gwthread-pthread.c (-45 lines)
Lines 1-45 Link Here
1
--- gwlib/gwthread-pthread.c.orig	Thu Aug 12 19:53:30 2004
2
+++ gwlib/gwthread-pthread.c	Mon Dec 20 00:53:57 2004
3
@@ -125,6 +125,11 @@
4
 static pthread_key_t tsd_key;
5
 
6
 static pthread_mutex_t threadtable_lock;
7
+/*
8
+ * Thread creation parameters.
9
+ */
10
+static pthread_attr_t thread_attr;
11
+#define MIN_THREAD_STACK_SIZE (256 * 1024)
12
 
13
 static void lock(void)
14
 {
15
@@ -263,6 +268,7 @@
16
 {
17
     int ret;
18
     int i;
19
+    size_t stack_size;
20
 
21
     pthread_mutex_init(&threadtable_lock, NULL);
22
 
23
@@ -275,6 +281,13 @@
24
         threadtable[i] = NULL;
25
     }
26
     active_threads = 0;
27
+/*
28
+ * Make sure that thread stack is large enough.
29
+ */
30
+    pthread_attr_init(&thread_attr);
31
+    pthread_attr_getstacksize(&thread_attr, &stack_size);
32
+    if (stack_size < MIN_THREAD_STACK_SIZE)
33
+            pthread_attr_setstacksize(&thread_attr, MIN_THREAD_STACK_SIZE);
34
 
35
     create_threadinfo_main();
36
 }
37
@@ -443,7 +456,7 @@
38
         return -1;
39
     }
40
 
41
-    ret = pthread_create(&id, NULL, &new_thread, p);
42
+    ret = pthread_create(&id, &thread_attr, &new_thread, p);
43
     if (ret != 0) {
44
         unlock();
45
         error(ret, "Could not create new thread.");
(-)pkg-descr (-2 / +3 lines)
Lines 1-4 Link Here
1
Kannel is an open source project to make a WAP gateway; it also can work as
1
Kannel is a compact and very powerful open source WAP and SMS gateway, used 
2
an SMS gateway.
2
widely across the globe both for serving trillions of short messages (SMS), 
3
WAP Push service indications and mobile internet connectivity.
3
4
4
WWW: http://www.kannel.org/
5
WWW: http://www.kannel.org/
(-)pkg-plist (+8 lines)
Lines 71-76 Link Here
71
include/kannel/gwlib/gw-getopt.h
71
include/kannel/gwlib/gw-getopt.h
72
include/kannel/gwlib/gw-prioqueue.h
72
include/kannel/gwlib/gw-prioqueue.h
73
include/kannel/gwlib/gw-rwlock.h
73
include/kannel/gwlib/gw-rwlock.h
74
include/kannel/gwlib/gw-timer.h
74
include/kannel/gwlib/gw_uuid.h
75
include/kannel/gwlib/gw_uuid.h
75
include/kannel/gwlib/gw_uuid_types.h
76
include/kannel/gwlib/gw_uuid_types.h
76
include/kannel/gwlib/gwassert.h
77
include/kannel/gwlib/gwassert.h
Lines 139-144 Link Here
139
lib/kannel/libgw.a
140
lib/kannel/libgw.a
140
lib/kannel/libgwlib.a
141
lib/kannel/libgwlib.a
141
lib/kannel/libwap.a
142
lib/kannel/libwap.a
143
lib/kannel/libwmlscript.a
142
man/man1/mtbatch.1.gz
144
man/man1/mtbatch.1.gz
143
man/man1/seewbmp.1.gz
145
man/man1/seewbmp.1.gz
144
man/man1/wmlsc.1.gz
146
man/man1/wmlsc.1.gz
Lines 149-151 Link Here
149
sbin/run_kannel_box
151
sbin/run_kannel_box
150
sbin/smsbox
152
sbin/smsbox
151
sbin/wapbox
153
sbin/wapbox
154
@owner kannel
155
@group kannel
156
@dir /var/log/kannel
157
@dir /var/run/kannel
158
@group
159
@owner

Return to bug 200061