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

Collapse All | Expand All

(-)Makefile (-6 / +15 lines)
Lines 2-23 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=	4
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
MASTER_SITE_SUBDIR=	${PORTVERSION}
9
MASTER_SITE_SUBDIR=	${PORTVERSION}
10
DISTNAME=	gateway-${PORTVERSION}
10
DISTNAME=	gateway-${PORTVERSION}
11
11
12
MAINTAINER=	ports@FreeBSD.org
12
MAINTAINER=	dbaio@bsd.com.br
13
COMMENT=	WAP/SMS gateway
13
COMMENT=	WAP/SMS gateway
14
14
15
LICENSE=	The_Kannel_Software_License
16
LICENSE_NAME=	The Kannel Software License, Version 1.0
17
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
19
15
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
20
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
16
21
17
USES=		tar:bzip2 gmake
22
USERS=	kannel
23
GROUPS=	kannel
24
25
USES=		tar:bzip2 gmake bison
26
USE_GCC=	yes
18
USE_GNOME=	libxml2
27
USE_GNOME=	libxml2
19
USE_OPENSSL=	yes
28
USE_OPENSSL=	yes
20
USE_RC_SUBR=	${PORTNAME}
29
USE_RC_SUBR=	${PORTNAME}_bearerbox ${PORTNAME}_smsbox ${PORTNAME}_wapbox
21
GNU_CONFIGURE=	yes
30
GNU_CONFIGURE=	yes
22
CONFIGURE_ARGS=	--with-cflags="${CPPFLAGS}" --with-libs="${LDFLAGS}" \
31
CONFIGURE_ARGS=	--with-cflags="${CPPFLAGS}" --with-libs="${LDFLAGS}" \
23
		--enable-pcre=yes --enable-docs=no --with-malloc=native \
32
		--enable-pcre=yes --enable-docs=no --with-malloc=native \
Lines 43-49 Link Here
43
	${INSTALL_DATA} ${WRKSRC}/gw/${filename} \
52
	${INSTALL_DATA} ${WRKSRC}/gw/${filename} \
44
		${STAGEDIR}${PREFIX}/etc/${filename}.sample
53
		${STAGEDIR}${PREFIX}/etc/${filename}.sample
45
.endfor
54
.endfor
46
.for filename in mtbatch seewbmp wmlsc wmlsdasm
55
.for filename in mtbatch seewbmp wmlsc wmlsdasm decode_emimsg
47
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${filename}
56
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${filename}
48
.endfor
57
.endfor
49
.for filename in bearerbox run_kannel_box smsbox wapbox
58
.for filename in bearerbox run_kannel_box smsbox wapbox
(-)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-debian_kannel.conf (+15 lines)
Line 0 Link Here
1
--- debian/kannel.conf.orig	2015-04-24 19:30:57 UTC
2
+++ debian/kannel.conf
3
@@ -13,10 +13,10 @@ admin-deny-ip = "*.*.*.*"
4
 admin-allow-ip = ""
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-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 (-6 / +2 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-157 Link Here
149
sbin/run_kannel_box
151
sbin/run_kannel_box
150
sbin/smsbox
152
sbin/smsbox
151
sbin/wapbox
153
sbin/wapbox
152
@dirrm lib/kannel
153
@dirrm include/kannel/wap
154
@dirrm include/kannel/gwlib
155
@dirrm include/kannel/gw/smsc
156
@dirrm include/kannel/gw
157
@dirrm include/kannel

Return to bug 200061