Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2006 15:49:19 -0200 (BRST)
From:      Marcus Alves Grando <mnag@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        clsung@FreeBSD.org
Subject:   ports/91713: Update port: security/clamsmtp to 1.6
Message-ID:  <20060112174919.220C3286@marcus.grupos.com.br>
Resent-Message-ID: <200601121750.k0CHo4qk014525@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91713
>Category:       ports
>Synopsis:       Update port: security/clamsmtp to 1.6
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 12 17:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Marcus Alves Grando
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
Grupos Internet S/A
>Environment:
System: FreeBSD marcus.grupos.com.br 6.0-STABLE FreeBSD 6.0-STABLE #6: Thu Jan 12 09:49:27 BRST 2006 root@marcus.grupos.com.br:/usr/obj/usr/src/sys/MARCUS i386


	
>Description:
- Update to 1.6
- Use USE_RC_SUBR=clamsmtpd.sh instead =YES
- Use PORTDOCS=* not need test NOPORTDOCS
- Only depend of security/clamav if already installed. clamsmtp can run in another machine then clamav.

Tinderbox test:
http://marcus.grupos.com.br:8080/logs/4-STABLE-FreeBSD/clamsmtp-1.6.log
http://marcus.grupos.com.br:8080/logs/6-STABLE-FreeBSD/clamsmtp-1.6.log

	
>How-To-Repeat:
	
>Fix:

	

--- clamsmtp.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/security/clamsmtp/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile	5 Sep 2005 03:16:20 -0000	1.18
+++ Makefile	12 Jan 2006 17:41:13 -0000
@@ -6,37 +6,37 @@
 #
 
 PORTNAME=	clamsmtp
-PORTVERSION=	1.5
-PORTREVISION=	2
+PORTVERSION=	1.6
 CATEGORIES=	security
 MASTER_SITES=	http://memberwebs.com/nielsen/software/clamsmtp/
 
 MAINTAINER=	clsung@FreeBSD.org
 COMMENT=	An ClamAV anti-virus SMTP Filter
 
-RUN_DEPENDS=	${LOCALBASE}/sbin/clamd:${PORTSDIR}/security/clamav
-
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_REINPLACE=	yes
-USE_RC_SUBR=	yes
-RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} CLAMAV_PID_DIR=${CLAMAV_PID_DIR}
-STARTUP_FILE=	${PREFIX}/etc/rc.d/clamsmtpd.sh
+USE_RC_SUBR=	clamsmtpd.sh
+SUB_LIST=	CLAMAV_PID_DIR=${CLAMAV_PID_DIR}
+
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
 CLAMAV_PID_DIR?=	/var/run/clamav
 
 MAN5=		clamsmtpd.conf.5
 MAN8=		clamsmtpd.8
 
-.if !defined(NOPORTDOCS)
 PORTDOCS=	*
+
+.if exists(${LOCALBASE}/sbin/clamd)
+RUN_DEPENDS+=	${LOCALBASE}/sbin/clamd:${PORTSDIR}/security/clamav
 .endif
 
+post-patch:
+	@${REINPLACE_CMD} -e "s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS}," ${WRKSRC}/configure
+
 post-install:
-	@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
-		${FILESDIR}/clamsmtpd.sh.tmpl > ${STARTUP_FILE}
 	@${INSTALL_DATA} ${WRKSRC}/doc/clamsmtpd.conf ${PREFIX}/etc/clamsmtpd.conf-sample
-	@${CHMOD} 755 ${STARTUP_FILE}
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
@@ -44,7 +44,4 @@
 .endif
 	@${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${PKGMESSAGE}
 
-post-patch:
-	@${REINPLACE_CMD} -e "s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS}," ${WRKSRC}/configure
-
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/security/clamsmtp/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo	29 Aug 2005 04:08:55 -0000	1.13
+++ distinfo	12 Jan 2006 17:41:13 -0000
@@ -1,2 +1,3 @@
-MD5 (clamsmtp-1.5.tar.gz) = 521e43f5872cab8e53c21285041a759f
-SIZE (clamsmtp-1.5.tar.gz) = 148067
+MD5 (clamsmtp-1.6.tar.gz) = 19fed666c77bb26039c5412c2559249d
+SHA256 (clamsmtp-1.6.tar.gz) = b1e2c8144821bb305e659ce9ff71fa202a911ad9819e95d5f2b4e0dee2d3cbbb
+SIZE (clamsmtp-1.6.tar.gz) = 149113
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/security/clamsmtp/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist	14 Oct 2004 02:28:24 -0000	1.2
+++ pkg-plist	12 Jan 2006 17:41:13 -0000
@@ -1,5 +1,4 @@
 @comment $FreeBSD: ports/security/clamsmtp/pkg-plist,v 1.2 2004/10/14 02:28:24 clsung Exp $
 @unexec [ ! -f %%CLAMAV_PID_DIR%%/clamsmtpd.pid ] || %%PREFIX%%/etc/rc.d/clamsmtpd.sh stop || true
 sbin/clamsmtpd
-etc/rc.d/clamsmtpd.sh
 etc/clamsmtpd.conf-sample
Index: files/clamsmtpd.sh.in
===================================================================
RCS file: files/clamsmtpd.sh.in
diff -N files/clamsmtpd.sh.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/clamsmtpd.sh.in	12 Jan 2006 17:41:13 -0000
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: clamsmtpd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the fellowing line to /etc/rc.conf to enable clamsmtpd:
+#
+# clamsmtpd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name="clamsmtpd"
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/${name}
+sig_stop=-KILL
+
+load_rc_config ${name}
+
+clamsmtpd_enable=${clamsmtpd_enable-"NO"}
+clamsmtpd_conf=${clamsmtpd_conf-"%%PREFIX%%/etc/clamsmtpd.conf"}
+clamsmtpd_pid=${clamsmtpd_pid-"%%CLAMAV_PID_DIR%%/clamsmtpd.pid"}
+clamsmtpd_debug=${clamsmtpd_debug-"0"}
+
+command_args="-f ${clamsmtpd_conf} -p ${clamsmtpd_pid}"
+
+pidfile=${clamsmtpd_pid}
+
+run_rc_command "$1"
Index: files/clamsmtpd.sh.tmpl
===================================================================
RCS file: files/clamsmtpd.sh.tmpl
diff -N files/clamsmtpd.sh.tmpl
--- files/clamsmtpd.sh.tmpl	5 Sep 2005 03:16:20 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/security/clamsmtp/files/clamsmtpd.sh.tmpl,v 1.5 2005/09/05 03:16:20 clsung Exp $
-#
-# PROVIDE: clamsmtpd
-# REQUIRE: DAEMON
-# KEYWORD: FreeBSD
-#
-# Add the fellowing line to /etc/rc.conf to enable clamsmtpd:
-#
-# clamsmtpd_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=clamsmtpd
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/${name}
-sig_stop=-KILL
-
-load_rc_config ${name}
-
-clamsmtpd_enable=${clamsmtpd_enable-"NO"}
-clamsmtpd_conf=${clamsmtpd_conf-"%%PREFIX%%/etc/clamsmtpd.conf"}
-clamsmtpd_pid=${clamsmtpd_pid-"%%CLAMAV_PID_DIR%%/clamsmtpd.pid"}
-clamsmtpd_debug=${clamsmtpd_debug-"0"}
-
-command_args="-f ${clamsmtpd_conf} -p ${clamsmtpd_pid}"
-
-pidfile=${clamsmtpd_pid}
-
-run_rc_command "$1"
Index: files/patch-smtppass.c
===================================================================
RCS file: files/patch-smtppass.c
diff -N files/patch-smtppass.c
--- files/patch-smtppass.c	5 Sep 2005 03:16:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-diff -ur ../clamsmtp-1.5-orig/common/smtppass.c common/smtppass.c
---- common/smtppass.c	Tue Aug  2 01:23:05 2005
-+++ common/smtppass.c	Sun Sep  4 11:52:13 2005
-@@ -275,6 +275,26 @@
- 
-     sp_messagex(NULL, LOG_DEBUG, "starting up (%s)...", VERSION);
- 
-+    /* Drop privileges before daemonizing */
-+    drop_privileges();
-+    
-+    /* When set to this we daemonize */
-+    if(g_state.debug_level == -1)
-+    {
-+        /* Fork a daemon nicely here */
-+        if(daemon(0, 0) == -1)
-+        {
-+            sp_message(NULL, LOG_ERR, "couldn't run as daemon");
-+            exit(1);
-+        }
-+      
-+        sp_messagex(NULL, LOG_DEBUG, "running as a daemon");
-+        g_state.daemonized = 1;
-+
-+        /* Open the system log */
-+        openlog(g_state.name, 0, LOG_MAIL);
-+    }
-+
-     /* Create the socket */
-     sock = socket(SANY_TYPE(g_state.listenaddr), SOCK_STREAM, 0);
-     if(sock < 0)
-@@ -297,26 +317,6 @@
-         exit(1);
-     }
-       	
--    /* Drop privileges before daemonizing */
--    drop_privileges();
--    
--    /* When set to this we daemonize */
--    if(g_state.debug_level == -1)
--    {
--        /* Fork a daemon nicely here */
--        if(daemon(0, 0) == -1)
--        {
--            sp_message(NULL, LOG_ERR, "couldn't run as daemon");
--            exit(1);
--        }
--      
--        sp_messagex(NULL, LOG_DEBUG, "running as a daemon");
--        g_state.daemonized = 1;
--
--        /* Open the system log */
--        openlog(g_state.name, 0, LOG_MAIL);
--    }
--
-     sp_messagex(NULL, LOG_DEBUG, "created socket: %s", g_state.listenname);
- 
-     /* Handle some signals */
--- clamsmtp.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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