Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2015 13:47:21 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r388358 - in head/mail/smfsav: . files
Message-ID:  <201506021347.t52DlLkv026885@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Tue Jun  2 13:47:20 2015
New Revision: 388358
URL: https://svnweb.freebsd.org/changeset/ports/388358

Log:
  - Don't override upstream paths
  - Replace hardcoded /usr/local by ${PREFIX}
  - Add required_files and command_args to rc script
  - Fix REINPLACE_CMD args in Makefile
  
  PR:		199081
  Submitted by:	sasaki@fcc.ad.jp (maintainer)

Modified:
  head/mail/smfsav/Makefile
  head/mail/smfsav/files/patch-readme
  head/mail/smfsav/files/patch-smf-sav.c
  head/mail/smfsav/files/patch-smf-sav.conf
  head/mail/smfsav/files/pkg-message.in
  head/mail/smfsav/files/smfsav.in
  head/mail/smfsav/pkg-plist

Modified: head/mail/smfsav/Makefile
==============================================================================
--- head/mail/smfsav/Makefile	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/Makefile	Tue Jun  2 13:47:20 2015	(r388358)
@@ -3,7 +3,7 @@
 
 PORTNAME=	smfsav
 PORTVERSION=	1.4.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	SF/smfs
 DISTNAME=	smf-sav-${PORTVERSION}
@@ -25,18 +25,20 @@ USE_RC_SUBR=	smfsav
 CPPFLAGS+=	-D_REENTRANT
 LDFLAGS+=	-lmilter -lpthread
 
-SMFSAV_RUN_DIR?=/var/run/smfsav
+SMFSAV_RUN_DIR?=/var/run/smfs
 SUB_FILES+=	pkg-message
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/readme
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.c
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.conf
 
 do-build:
 	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin/smfsav
-	${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smfsav.conf.sample
+	${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smf-sav.conf.sample
 	@${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR}

Modified: head/mail/smfsav/files/patch-readme
==============================================================================
--- head/mail/smfsav/files/patch-readme	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/files/patch-readme	Tue Jun  2 13:47:20 2015	(r388358)
@@ -1,28 +1,17 @@
---- readme.orig	2006-10-25 20:15:10 UTC
-+++ readme
-@@ -38,21 +38,18 @@ Under FreeBSD the BIND v8 is required (p
+--- readme.orig	2006-10-26 05:15:10.000000000 +0900
++++ readme	2015-06-02 13:24:39.167974000 +0900
+@@ -38,11 +38,11 @@
  make
  make install
  
 -  Inspect and edit the /etc/mail/smfs/smf-sav.conf file.
-+  Inspect and edit the %%PREFIX%%/etc/smfsav.conf file.
++  Inspect and edit the %%PREFIX%%/etc/smf-sav.conf file.
  
 -/usr/local/sbin/smf-sav
-+%%PREFIX%%/sbin/smfsav
++%%PREFIX%%/sbin/smf-sav
  or
 -/usr/local/sbin/smf-sav -c /etc/mail/smfs/smf-sav.conf
-+%%PREFIX%%/sbin/smfsav -c %%PREFIX%%/etc/smfsav.conf
++%%PREFIX%%/sbin/smf-sav -c %%PREFIX%%/etc/smf-sav.conf
  
    Add this milter to start-up scripts before starting a Sendmail daemon.
  Look at the contributed samples of start-up scripts.
- 
-   Add these lines to your Sendmail configuration file (usually sendmail.mc):
- define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl
--INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/smf-sav.sock, T=S:30s;R:4m')dnl
--
--IMPORTANT: make sure that /var/run is not a group writable directory! If so,
--or chmod 755 /var/run, or if it's impossible switch to another directory.
-+INPUT_MAIL_FILTER(`smfsav', `S=unix:/var/run/smfsav/smfsav.sock, T=S:30s;R:4m')dnl
- 
- IMPORTANT: make sure that libmilter is compiled with BROKEN_PTHREAD_SLEEP defined.
- If this symbol is not defined, libmilter will use sleep() in signal-handler thread,

Modified: head/mail/smfsav/files/patch-smf-sav.c
==============================================================================
--- head/mail/smfsav/files/patch-smf-sav.c	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/files/patch-smf-sav.c	Tue Jun  2 13:47:20 2015	(r388358)
@@ -1,5 +1,5 @@
---- smf-sav.c.orig	2006-10-25 20:15:10 UTC
-+++ smf-sav.c
+--- smf-sav.c.orig	2006-10-26 05:15:10.000000000 +0900
++++ smf-sav.c	2015-06-02 13:30:44.250725000 +0900
 @@ -20,11 +20,7 @@
  #endif
  
@@ -38,20 +38,7 @@
  #define hash_mask(x)		(hash_size(x) - 1)
  
 -#define CONFIG_FILE		"/etc/mail/smfs/smf-sav.conf"
-+#define CONFIG_FILE		"/usr/local/etc/smfsav.conf"
++#define CONFIG_FILE		"%%PREFIX%%/etc/smf-sav.conf"
  #define PUBLIC_NAME		"yourhost.yourdomain.tld"
  #define SAFE_CALLBACK		"postmaster@yourdomain.tld"
  #define SYSLOG_FACILITY		LOG_MAIL
-@@ -81,9 +69,9 @@
- #define TO_PASS_TTL		3600
- #define TO_TEMPFAIL_TTL		300
- #define TO_FAIL_TTL		3600
--#define WORK_SPACE		"/var/run/smfs"
--#define OCONN			"unix:" WORK_SPACE "/smf-sav.sock"
--#define USER			"smfs"
-+#define WORK_SPACE		"/var/run/smfsav"
-+#define OCONN			"unix:" WORK_SPACE "/smfsav.sock"
-+#define USER			"smfsav"
- 
- #define DNS_RETRANS		7
- #define DNS_RETRY		4

Modified: head/mail/smfsav/files/patch-smf-sav.conf
==============================================================================
--- head/mail/smfsav/files/patch-smf-sav.conf	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/files/patch-smf-sav.conf	Tue Jun  2 13:47:20 2015	(r388358)
@@ -1,28 +1,8 @@
---- smf-sav.conf.orig	2006-10-25 20:15:10 UTC
-+++ smf-sav.conf
+--- smf-sav.conf.orig	2006-10-26 05:15:10.000000000 +0900
++++ smf-sav.conf	2015-06-02 13:32:07.814150000 +0900
 @@ -1,4 +1,4 @@
 -# /etc/mail/smfs/smf-sav.conf
-+# /usr/local/etc/smfsav.conf
++# %%PREFIX%%/etc/smf-sav.conf
  #
  # smf-sav configuration file v1.4.0 (it's read at start)
  #
-@@ -97,15 +97,15 @@ SafeCallBack	postmaster@yourdomain.tld	#
- 
- # Run as a selected user (smf-sav must be started by root)
- #
--# Default: smfs
-+# Default: smfsav
- #
--#User		smfs
-+#User		smfsav
- 
- # Socket used to communicate with a Sendmail daemon
- #
--# Default: unix:/var/run/smfs/smf-sav.sock
-+# Default: unix:/var/run/smfsav/smfsav.sock
- #
--#Socket		unix:/var/run/smfs/smf-sav.sock
-+#Socket		unix:/var/run/smfsav/smfsav.sock
- 
- # Facility for logging via a Syslog daemon
- #

Modified: head/mail/smfsav/files/pkg-message.in
==============================================================================
--- head/mail/smfsav/files/pkg-message.in	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/files/pkg-message.in	Tue Jun  2 13:47:20 2015	(r388358)
@@ -3,7 +3,7 @@
 1. Inspect and edit the %%PREFIX%%/etc/smfsav.conf file
 2. Add these lines to your Sendmail configuration file (usually sendmail.mc):
     define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO`, {verify}')dnl
-    INPUT_MAIL_FILTER(`smfsav', `S=unix:/var/run/smfsav/smfsav.sock, T=S:30s;R:4m')dnl
+    INPUT_MAIL_FILTER(`smf-sav', `S=unix:/var/run/smfs/smf-sav.sock, T=S:30s;R:4m')dnl
 3. Put line smfsav_enable="YES" to /etc/rc.conf file
 4. Run `service smfsav start`
 =====================================================================================

Modified: head/mail/smfsav/files/smfsav.in
==============================================================================
--- head/mail/smfsav/files/smfsav.in	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/files/smfsav.in	Tue Jun  2 13:47:20 2015	(r388358)
@@ -17,7 +17,11 @@
 
 name="smfsav"
 rcvar=smfsav_enable
-command="%%PREFIX%%/sbin/smfsav"
 
 load_rc_config ${name}
+
+required_files=${smfsav_config:="%%PREFIX%%/etc/smf-sav.conf"}
+command="%%PREFIX%%/sbin/smf-sav"
+command_args="-c ${required_files}"
+
 run_rc_command "$1"

Modified: head/mail/smfsav/pkg-plist
==============================================================================
--- head/mail/smfsav/pkg-plist	Tue Jun  2 13:26:22 2015	(r388357)
+++ head/mail/smfsav/pkg-plist	Tue Jun  2 13:47:20 2015	(r388358)
@@ -1,5 +1,5 @@
-sbin/smfsav
-etc/smfsav.conf.sample
+sbin/smf-sav
+etc/smf-sav.conf.sample
 %%PORTDOCS%%%%DOCSDIR%%/ChangeLog
 %%PORTDOCS%%%%DOCSDIR%%/readme
-@dir(smfs,smfs,700) /var/run/smfsav
+@dir(smfs,smfs,700) /var/run/smfs



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