aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING12
-rw-r--r--comms/smstools3/Makefile8
-rw-r--r--comms/smstools3/files/patch-examples-smsd.conf.easy16
-rw-r--r--comms/smstools3/files/smsd.in11
-rw-r--r--comms/smstools3/pkg-plist13
5 files changed, 44 insertions, 16 deletions
diff --git a/UPDATING b/UPDATING
index 87fa5f3c6f86..a9210d5f1ac3 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,18 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20140626:
+ AFFECTS: users of comms/smstools3
+ AUTHOR: madpilot@FreeBSD.org
+
+ The smstools3 startup screen has been modified to allow smsd to
+ change uid/gid by itself. The rc options smsd_logfile, smsd_user
+ and smsd_group are not supported anymore, user, group and log
+ filename should be specified in the configuration file.
+
+ The sample configuration file has been updated to have defaults
+ equivalent to the old ones.
+
20140624:
AFFECTS: users of databases/p5-Bucardo
AUTHOR: mat@FreeBSD.org
diff --git a/comms/smstools3/Makefile b/comms/smstools3/Makefile
index 437ef7881070..23c0f65b794a 100644
--- a/comms/smstools3/Makefile
+++ b/comms/smstools3/Makefile
@@ -3,7 +3,7 @@
PORTNAME= smstools
PORTVERSION= 3.1.15
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= comms
MASTER_SITES= http://smstools3.kekekasvi.com/packages/
DISTNAME= smstools3-${PORTVERSION}
@@ -56,7 +56,9 @@ post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%STAGEDIR%%|${STAGEDIR}|g' \
${WRKSRC}/Makefile ${WRKSRC}/install.sh ${WRKSRC}/src/smsd_cfg.h
- @${REINPLACE_CMD} 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \
+ @${REINPLACE_CMD} -e 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \
+ -e 's|%%SMSD_USER%%|${SMSD_USER}|' \
+ -e 's|%%SMSD_GROUP%%|${SMSD_GROUP}|' \
${WRKSRC}/examples/smsd.conf.easy \
${WRKSRC}/examples/smsd.conf.full \
${WRKSRC}/examples/smsd.conf.non-root
@@ -64,7 +66,7 @@ post-patch:
${WRKSRC}/scripts/*
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd
@${MKDIR} ${STAGEDIR}${DATADIR}
@for file in `${FIND} ${WRKSRC}/scripts -type f ! -name 'README' ! -name '*.bak'`; do \
${INSTALL_SCRIPT} $$file ${STAGEDIR}${DATADIR}/; \
diff --git a/comms/smstools3/files/patch-examples-smsd.conf.easy b/comms/smstools3/files/patch-examples-smsd.conf.easy
new file mode 100644
index 000000000000..f3e198c677de
--- /dev/null
+++ b/comms/smstools3/files/patch-examples-smsd.conf.easy
@@ -0,0 +1,16 @@
+--- examples/smsd.conf.easy.orig 2006-02-04 20:52:06.000000000 +0100
++++ examples/smsd.conf.easy 2014-06-26 15:07:50.021638337 +0200
+@@ -1,9 +1,12 @@
+ # Example smsd.conf. Read the manual for a description
+
+ devices = GSM1
+-logfile = /var/log/smsd.log
++logfile = /var/log/smsd/smsd.log
+ loglevel = 7
+
++user = %%SMSD_USER%%
++group = %%SMSD_GROUP%%
++
+ [GSM1]
+ device = /dev/ttyS0
+ incoming = yes
diff --git a/comms/smstools3/files/smsd.in b/comms/smstools3/files/smsd.in
index e5e941b1c54f..1f96997aab00 100644
--- a/comms/smstools3/files/smsd.in
+++ b/comms/smstools3/files/smsd.in
@@ -10,12 +10,6 @@
#
# smsd_enable="YES"
#
-# NOTE: to make smsd log to syslog specify:
-#
-# smsd_logfile="syslog"
-#
-# in rc.conf
-#
. /etc/rc.subr
name=smsd
@@ -25,13 +19,10 @@ load_rc_config ${name}
: ${smsd_enable:=NO}
: ${smsd_pidfile:="%%PIDDIR%%/smsd.pid"}
: ${smsd_infofile:="%%PIDDIR%%/smsd.working"}
-: ${smsd_logfile:="%%LOGDIR%%/smsd.log"}
: ${smsd_config:="%%PREFIX%%/etc/smsd.conf"}
-: ${smsd_user:=uucp}
-: ${smsd_group:=dialer}
pidfile=${smsd_pidfile}
command="%%PREFIX%%/bin/smsd"
-command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile} -l${smsd_logfile} -u${smsd_user} -g${smsd_group}"
+command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile}"
run_rc_command "$1"
diff --git a/comms/smstools3/pkg-plist b/comms/smstools3/pkg-plist
index 3bf6fec71319..76d8771dc003 100644
--- a/comms/smstools3/pkg-plist
+++ b/comms/smstools3/pkg-plist
@@ -25,7 +25,14 @@ bin/unicode2sms
%%DATADIR%%/smstest.php
%%DATADIR%%/sql_demo
%%DATADIR%%/unicode2sms
-@unexec if [ -f %D/etc/smsd.conf ] && cmp -s %D/etc/smsd.conf %D/etc/smsd.conf.sample; then rm -f %D/etc/smsd.conf; fi
-etc/smsd.conf.sample
-@exec if [ ! -f %D/etc/smsd.conf ] ; then cp -p %D/%F %B/smsd.conf; fi
+@sample etc/smsd.conf.sample
@dirrm %%DATADIR%%
+@cwd /
+@owner %%SMSD_USER%%
+@group %%SMSD_GROUP%%
+@dirrmtry %%SPOOLDIR%%/incoming
+@dirrmtry %%SPOOLDIR%%/outgoing
+@dirrmtry %%SPOOLDIR%%/checked
+@dirrmtry %%LOGDIR%%
+@dirrmtry %%PIDDIR%%
+@dirrmtry %%SPOOLDIR%%