New: net/kannel

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

New: net/kannel

Roman Kravchuk
Hello ports,

This is a port of kannel, compact and very powerful open source WAP
and SMS gateway

Tested on current amd64.

Ok? Comments?

Thanks.

- Roman

kannel.tgz (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Stuart Henderson
On 2013/03/31 10:02, Roman Kravchuk wrote:

> Hello ports,
>
> This is a port of kannel, compact and very powerful open source WAP
> and SMS gateway
>
> Tested on current amd64.
>
> Ok? Comments?
>
> Thanks.
>
> - Roman

- first thing to say is "ouch" that you had to patch MACHINE in so
many files to avoid a conflict with param.h!

- flavour handling is incorrect - pseudo flavours are *only* valid
with subpackages, to disable some subpackage/s from being built.
the options here all affect the main package, so they must be
FLAVORS, and in that case the no_XXX naming is awkward (for example
the package of the "no database" version would be name
kannel-$VER-no_mysql-no_pgsql-no_sqlite) so it would be better
to call them "pgsql" and "mysql".

- there isn't much point in having an option to disable sqlite3,
since it is in base OpenBSD. I don't think there is much point in
having no_pcre either, it's a fairly small and common dependency.
by having fewer build options, it's easier to test that the port
works correctly, and takes less time in bulk builds.

- please add the svn url in a comment near MASTER_SITES

- the shell scripts (files/*) hardcode /usr/local, the easiest way to
fix this is probably to use ${SUBST_CMD} -c to copy them into WRKDIR or
WRKSRC, and then ${INSTALL_SCRIPT} from there

- bad permission on the rc script; reset @mode/@owner/@group before
the @rcscript line in plist.

- "Kannel Software License" isn't well known, I think it would be
better to write something like this:

# BSD-like with naming restrictions, see http://kannel.org/license.shtml


Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Roman Kravchuk
This is updated port kannel.

Ok? Comments?

Thanks.

- Roman


2013/4/3 Stuart Henderson <[hidden email]>

> On 2013/03/31 10:02, Roman Kravchuk wrote:
> > Hello ports,
> >
> > This is a port of kannel, compact and very powerful open source WAP
> > and SMS gateway
> >
> > Tested on current amd64.
> >
> > Ok? Comments?
> >
> > Thanks.
> >
> > - Roman
>
> - first thing to say is "ouch" that you had to patch MACHINE in so
> many files to avoid a conflict with param.h!
>
> - flavour handling is incorrect - pseudo flavours are *only* valid
> with subpackages, to disable some subpackage/s from being built.
> the options here all affect the main package, so they must be
> FLAVORS, and in that case the no_XXX naming is awkward (for example
> the package of the "no database" version would be name
> kannel-$VER-no_mysql-no_pgsql-no_sqlite) so it would be better
> to call them "pgsql" and "mysql".
>
> - there isn't much point in having an option to disable sqlite3,
> since it is in base OpenBSD. I don't think there is much point in
> having no_pcre either, it's a fairly small and common dependency.
> by having fewer build options, it's easier to test that the port
> works correctly, and takes less time in bulk builds.
>
> - please add the svn url in a comment near MASTER_SITES
>
> - the shell scripts (files/*) hardcode /usr/local, the easiest way to
> fix this is probably to use ${SUBST_CMD} -c to copy them into WRKDIR or
> WRKSRC, and then ${INSTALL_SCRIPT} from there
>
> - bad permission on the rc script; reset @mode/@owner/@group before
> the @rcscript line in plist.
>
> - "Kannel Software License" isn't well known, I think it would be
> better to write something like this:
>
> # BSD-like with naming restrictions, see http://kannel.org/license.shtml
>
>
>

kannel.tgz (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Stuart Henderson-6
On 2013/04/07 23:41, Roman Kravchuk wrote:
> This is updated port kannel.
>
> Ok? Comments?

slightly tweaked version attached: diff against your version below.
notably I moved the primary category to telephony/ which I think makes
sense - net/ is fairly huge so I'd like to avoid putting new ports
there if there's a good alternative.

would anyone like to give me an OK to import this?


diff --git a/Makefile b/Makefile
index 4f9559b..e288f48 100644
--- a/Makefile
+++ b/Makefile
@@ -7,24 +7,20 @@ SVNREV = 5035
 DISTNAME = kannel-${VERSION}pre20130330
 PKGNAME = kannel-${VERSION}
 
-CATEGORIES = net
+CATEGORIES = telephony net
 MAINTAINER = Roman Kravchuk <[hidden email]>
 
 HOMEPAGE = http://kannel.org/
 
 # BSD-like with naming restrictions, see http://kannel.org/license.shtml
 PERMIT_PACKAGE_CDROM = Yes
-PERMIT_PACKAGE_FTP = Yes
-PERMIT_DISTFILES_FTP = Yes
-
-# MASTER_SITES = https://svn.kannel.org/gateway/trunk
-MASTER_SITES = http://spacehopper.org/mirrors/
-
-LDFLAGS="${LDFLAGS} -pthread"
 
 WANTLIB = c crypto m ssl z pthread ssl xml2 iconv \
  pcre pcreposix
 
+# checkout from https://svn.kannel.org/gateway/trunk
+MASTER_SITES = http://spacehopper.org/mirrors/
+
 LIB_DEPENDS = textproc/libxml,-main,no_python \
  converters/libiconv \
  devel/pcre
@@ -33,12 +29,13 @@ USE_GMAKE = Yes
 CONFIGURE_STYLE = gnu
 CONFIGURE_ARGS += --enable-warnings \
  --enable-pcre
+CONFIGURE_ENV = LDFLAGS="${LDFLAGS} -pthread"
 
 WRKDIST = ${WRKDIR}/gateway
 
 NO_TEST = Yes
 
-FLAVORS = sqlite3 pgsql mysql
+FLAVORS = sqlite3 pgsql mysql
 
 FLAVOR ?=
 .if empty(FLAVOR)
@@ -59,7 +56,7 @@ CONFIGURE_ARGS += --with-mysql
 WANTLIB += mysqlclient lib/mysql/mysqlclient_r
 LIB_DEPENDS += databases/mysql,-main
 .else
-ERRORS += "Fatal: Conflicting flavors: ${FLAVOR}";
+ERRORS += "Fatal: Conflicting flavors: ${FLAVOR}"
 .endif
 
 SH_SCRIPTS = kannelctl smsbox_enable wapbox_enable
@@ -68,9 +65,6 @@ pre-configure:
  @perl -pi -e 's,^svn,svn-r${SVNREV},' ${WRKSRC}/VERSION
 
 post-install:
-.for i in ${SH_SCRIPTS}
- ${SUBST_CMD} -c ${FILESDIR}/$i ${WRKDIR}/$i
-.endfor
  ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/kannel
  ${INSTALL_DATA} ${WRKSRC}/doc/examples/kannel.conf \
  ${WRKSRC}/doc/examples/modems.conf \
@@ -78,7 +72,8 @@ post-install:
  ${WRKSRC}/doc/examples/dlr-sqlite3.conf \
  ${PREFIX}/share/examples/kannel
 .for i in ${SH_SCRIPTS}
- ${INSTALL_SCRIPT} ${WRKDIR}/$i ${PREFIX}/sbin
+ ${SUBST_CMD} -c ${FILESDIR}/$i ${WRKDIR}/$i
+ ${INSTALL_SCRIPT} ${WRKDIR}/$i ${PREFIX}/sbin/
 .endfor
 
 .include <bsd.port.mk>
diff --git a/pkg/PLIST b/pkg/PLIST
index f14d635..4a95665 100644
--- a/pkg/PLIST
+++ b/pkg/PLIST
@@ -1,6 +1,8 @@
 @comment $OpenBSD$
 @newgroup _kannel:712
 @newuser _kannel:712:712:daemon:Kannel:/nonexistent:/sbin/nologin
+@extraunexec rm -rf /var/log/kannel/*
+@extraunexec rm -rf /var/spool/kannel/
 @bin bin/decode_emimsg
 bin/gw-config
 @bin bin/mtbatch
diff --git a/pkg/kannel.rc b/pkg/kannel.rc
index 670819e..26fe3a4 100644
--- a/pkg/kannel.rc
+++ b/pkg/kannel.rc
@@ -6,6 +6,8 @@ daemon="${TRUEPREFIX}/sbin/bearerbox"
 
 . /etc/rc.d/rc.subr
 
+rc_reload=NO
+
 rc_pre() {
  install -d -o _kannel /var/run/kannel
 }
@@ -18,6 +20,4 @@ rc_stop() {
  ${rcexec} "${TRUEPREFIX}/sbin/kannelctl stop"
 }
 
-rc_reload=NO
-
 rc_cmd $1


kannel.tgz (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Alexey Suslikov
Stuart Henderson <sthen <at> openbsd.org> writes:

> slightly tweaked version attached: diff against your version below.
> notably I moved the primary category to telephony/ which I think makes
> sense - net/ is fairly huge so I'd like to avoid putting new ports
> there if there's a good alternative.
>
> would anyone like to give me an OK to import this?

ping.

kannel is not a software mere mortals daily use, so receiving
grounded OKs maybe problematic.

Stuart, could you please commit this? Me and Roman use various
versions of this port on heavy loaded systems during many months,
if not years.

Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Stuart Henderson-6
On 2013/04/18 22:40, Alexey E. Suslikov wrote:

> Stuart Henderson <sthen <at> openbsd.org> writes:
>
> > slightly tweaked version attached: diff against your version below.
> > notably I moved the primary category to telephony/ which I think makes
> > sense - net/ is fairly huge so I'd like to avoid putting new ports
> > there if there's a good alternative.
> >
> > would anyone like to give me an OK to import this?
>
> ping.
>
> kannel is not a software mere mortals daily use, so receiving
> grounded OKs maybe problematic.
>
> Stuart, could you please commit this? Me and Roman use various
> versions of this port on heavy loaded systems during many months,
> if not years.
>

No I cannot commit it. I need an OK.

Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Landry Breuil-6
On Thu, Apr 18, 2013 at 11:49:24PM +0100, Stuart Henderson wrote:

> On 2013/04/18 22:40, Alexey E. Suslikov wrote:
> > Stuart Henderson <sthen <at> openbsd.org> writes:
> >
> > > slightly tweaked version attached: diff against your version below.
> > > notably I moved the primary category to telephony/ which I think makes
> > > sense - net/ is fairly huge so I'd like to avoid putting new ports
> > > there if there's a good alternative.
> > >
> > > would anyone like to give me an OK to import this?
> >
> > ping.
> >
> > kannel is not a software mere mortals daily use, so receiving
> > grounded OKs maybe problematic.
> >
> > Stuart, could you please commit this? Me and Roman use various
> > versions of this port on heavy loaded systems during many months,
> > if not years.
> >
>
> No I cannot commit it. I need an OK.

Some comments : cant the MACHINE/MACHINEWSP stuff be done via a perl -pi
subst instead of having so many patches just for that ?
be extra careful with the time_t patches, esp since 64-bits time_t is
around the corner.
the enable/kannelctl scripts are a bit cumbersome imo - all that could
be done with two rc scripts, and be simpler. Here, there are too many
indirections, with the enable/disable stuff etc. Unless the code itself
really relies on the presence/use of those scripts..

Landry

Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Stuart Henderson-6
On 2013/04/19 09:43, Landry Breuil wrote:
> Some comments : cant the MACHINE/MACHINEWSP stuff be done via a perl -pi
> subst instead of having so many patches just for that ?

oh yes, that makes a lot more sense.

> be extra careful with the time_t patches, esp since 64-bits time_t is
> around the corner.
> the enable/kannelctl scripts are a bit cumbersome imo - all that could
> be done with two rc scripts, and be simpler. Here, there are too many
> indirections, with the enable/disable stuff etc. Unless the code itself
> really relies on the presence/use of those scripts..

hmm yes, and I don't like storing the config for this in /usr/local
either. seems like a simple set of rc scripts should be enough.
rc.d/kannel could run bearerbox via run_kannel_box, and use separate
scripts for smsbox/wapbox. it's no more complicated to tell people
which order to use in pkg_scripts, as it is to tell them how to
use kannelctl / smsbox_enable / wapbox_enable.

Reply | Threaded
Open this post in threaded view
|

Re: New: net/kannel

Roman Kravchuk
This is updated port kannel

Changelog:
* MACHINE/MACHINEWSP replaced via a perl -pi
* Removed kannelctl / smsbox_enable / wapbox_enable scripts
* Add rc scripts for smsbox/wapbox

Ok? Comments?

Thanks.

- Roman

2013/4/19 Stuart Henderson <[hidden email]>

> On 2013/04/19 09:43, Landry Breuil wrote:
> > Some comments : cant the MACHINE/MACHINEWSP stuff be done via a perl -pi
> > subst instead of having so many patches just for that ?
>
> oh yes, that makes a lot more sense.
>
> > be extra careful with the time_t patches, esp since 64-bits time_t is
> > around the corner.
> > the enable/kannelctl scripts are a bit cumbersome imo - all that could
> > be done with two rc scripts, and be simpler. Here, there are too many
> > indirections, with the enable/disable stuff etc. Unless the code itself
> > really relies on the presence/use of those scripts..
>
> hmm yes, and I don't like storing the config for this in /usr/local
> either. seems like a simple set of rc scripts should be enough.
> rc.d/kannel could run bearerbox via run_kannel_box, and use separate
> scripts for smsbox/wapbox. it's no more complicated to tell people
> which order to use in pkg_scripts, as it is to tell them how to
> use kannelctl / smsbox_enable / wapbox_enable.
>
>

kannel.tgz (9K) Download Attachment