Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 22:28:34 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r359425 - in head: . comms/smstools3 comms/smstools3/files
Message-ID:  <201406262228.s5QMSYmk054117@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Thu Jun 26 22:28:34 2014
New Revision: 359425
URL: http://svnweb.freebsd.org/changeset/ports/359425
QAT: https://qat.redports.org/buildarchive/r359425/

Log:
  - Modify startup script to let smsd change user by itself [1]
  - Change the sample configuration file to have same behaviour as
    old startup script did by default
  
  While here:
  
  - Make strip command silent
  - Fix some staging glitches
  - Use new @sample directive
  
  PR:		191361 [1]
  Submitted by:	timp87@gmail.com

Added:
  head/comms/smstools3/files/patch-examples-smsd.conf.easy   (contents, props changed)
Modified:
  head/UPDATING
  head/comms/smstools3/Makefile
  head/comms/smstools3/files/smsd.in
  head/comms/smstools3/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Jun 26 22:16:37 2014	(r359424)
+++ head/UPDATING	Thu Jun 26 22:28:34 2014	(r359425)
@@ -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

Modified: head/comms/smstools3/Makefile
==============================================================================
--- head/comms/smstools3/Makefile	Thu Jun 26 22:16:37 2014	(r359424)
+++ head/comms/smstools3/Makefile	Thu Jun 26 22:28:34 2014	(r359425)
@@ -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}/; \

Added: head/comms/smstools3/files/patch-examples-smsd.conf.easy
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/smstools3/files/patch-examples-smsd.conf.easy	Thu Jun 26 22:28:34 2014	(r359425)
@@ -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

Modified: head/comms/smstools3/files/smsd.in
==============================================================================
--- head/comms/smstools3/files/smsd.in	Thu Jun 26 22:16:37 2014	(r359424)
+++ head/comms/smstools3/files/smsd.in	Thu Jun 26 22:28:34 2014	(r359425)
@@ -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"

Modified: head/comms/smstools3/pkg-plist
==============================================================================
--- head/comms/smstools3/pkg-plist	Thu Jun 26 22:16:37 2014	(r359424)
+++ head/comms/smstools3/pkg-plist	Thu Jun 26 22:28:34 2014	(r359425)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406262228.s5QMSYmk054117>