Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 2009 17:14:40 GMT
From:      Craig Green <cgreen@sentex.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/135598: [patch] mail/dcc-dccd update to 1.3.108
Message-ID:  <200906151714.n5FHEeGG065012@www.freebsd.org>
Resent-Message-ID: <200906151720.n5FHK2AS070332@freefall.freebsd.org>

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

>Number:         135598
>Category:       ports
>Synopsis:       [patch] mail/dcc-dccd update to 1.3.108
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 15 17:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Craig Green
>Release:        7-STABLE
>Organization:
Sentex Communications
>Environment:
>Description:
Patch to update DCC to latest. 

The patch also makes some changes to the port to make using the package version of it easier, such as creating config files from the sample config files included in the package, generating unique passwords on package install rather than just using the random one generated during package compilation, and having all DCC binaries compiled by default so package users who need more than the basic DCC client don't have to jump through hoops to get it.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN dcc-dccd.orig/Makefile dcc-dccd/Makefile
--- dcc-dccd.orig/Makefile	2009-03-28 08:13:41.000000000 -0400
+++ dcc-dccd/Makefile	2009-06-15 10:25:07.000000000 -0400
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	dcc-dccd
-PORTVERSION=	1.3.103
+PORTVERSION=	1.3.108
 CATEGORIES=	mail
 MASTER_SITES=	http://www.dcc-servers.net/dcc/source/old/ \
 		http://www.rhyolite.com/anti-spam/dcc/source/old/ \
@@ -49,9 +49,9 @@
 #		to find dccifd's socket.
 #
 OPTIONS=	DCCIFD	"DCC interface daemon (for SpamAssassin etc)"	on \
-		DCCM	"DCC milter (for Sendmail only)"	off \
-		DCCD	"DCC server"	off \
-		DCCGREY	"DCC greylisting server"	off \
+		DCCM	"DCC milter (for Sendmail only)"	on \
+		DCCD	"DCC server"	on \
+		DCCGREY	"DCC greylisting server"	on \
 		IPV6	"IPv6 support"	on  \
 		ALT_HOME	"DCC home in /var/dcc"	off \
 		PORTS_SENDMAIL	"Use base Sendmail if off, ports if on"	off
@@ -63,6 +63,8 @@
 DCCGROUP?=	dcc
 DCCGID?=	112
 
+PLIST_SUB+=	DCCUSER="${DCCUSER}"
+
 ## Use the configure script to explicitly set the locations of all files,
 ## in case the standard locations have been locally overridden
 #
@@ -76,15 +78,17 @@
 ## /var/dcc home support
 #
 .if defined(WITH_ALT_HOME)
-CONFIGURE_ARGS+=	--homedir=/var/dcc --libexecdir=${PREFIX}/dcc/libexec --with-cgibin=${PREFIX}/dcc/cgi-bin
-SUB_LIST+=		DCCHOME=/var/dcc
+CONFIGURE_ARGS+=	--libexecdir=${PREFIX}/dcc/libexec --with-cgibin=${PREFIX}/dcc/cgi-bin
+DCCHOME=		/var/dcc
 PLIST_SUB+=		WITH_ALT_HOME=""
 .else
-CONFIGURE_ARGS+=	--homedir=${PREFIX}/dcc
-SUB_LIST+=		DCCHOME=${PREFIX}/dcc
+DCCHOME=		${PREFIX}/dcc
 PLIST_SUB+=		WITH_ALT_HOME="@comment "
 .endif
 
+SUB_LIST+=		DCCHOME=${DCCHOME}
+CONFIGURE_ARGS+=	--homedir=${DCCHOME}
+
 ## dccm milter support
 #
 .if defined(WITH_DCCM)
@@ -192,11 +196,7 @@
 
 ## Make certain DCC's config files are owned by DCC's user
 #
-.if defined(WITH_ALT_HOME)
-	@${CHOWN} ${DCCUSER} /var/dcc/*
-.else
-	@${CHOWN} ${DCCUSER} ${PREFIX}/dcc/*
-.endif
+	@${CHOWN} ${DCCUSER} ${DCCHOME}/*
 
 ## Print DCC installation notes and RESTRICTIONS file info
 #
diff -ruN dcc-dccd.orig/distinfo dcc-dccd/distinfo
--- dcc-dccd.orig/distinfo	2009-03-28 08:13:41.000000000 -0400
+++ dcc-dccd/distinfo	2009-06-15 10:25:25.000000000 -0400
@@ -1,3 +1,3 @@
-MD5 (dcc-1.3.103.tar.Z) = 58a875c8640111a7910660008e4a0944
-SHA256 (dcc-1.3.103.tar.Z) = 2cd817db118df77c7c5b49e3d7d519737a9b49aaadcd70eba43b4ec123094cb7
-SIZE (dcc-1.3.103.tar.Z) = 1456266
+MD5 (dcc-1.3.108.tar.Z) = 521b95c12fdb2c1a01ca6f96a3559ca6
+SHA256 (dcc-1.3.108.tar.Z) = 8f759074c49d1a2a52ae314a2d4a5f313549d8fd88390f3de28ac567ec9fc5fa
+SIZE (dcc-1.3.108.tar.Z) = 1561191
diff -ruN dcc-dccd.orig/files/pkg-message.in dcc-dccd/files/pkg-message.in
--- dcc-dccd.orig/files/pkg-message.in	2008-03-23 07:08:04.000000000 -0400
+++ dcc-dccd/files/pkg-message.in	2009-06-15 10:21:35.000000000 -0400
@@ -15,6 +15,12 @@
 run at least daily from the crontab to clean old checksums from the DB.
 
 
+If you just run the client, you may still wish to add
+/usr/local/dcc/libexec/cron-dccd to your crontab to clean up the
+client's log files on a regular basis. dcc_conf's DBCLEAN_LOGDAYS
+variable controls the number of days to keep logs.
+
+
 If your site handles more than 100,000 messages per day, to decrease the
 load on the public DCC servers and increase the responsiveness of your
 DCC clients, you should set up your own, local DCC server connected to 
diff -ruN dcc-dccd.orig/pkg-descr dcc-dccd/pkg-descr
--- dcc-dccd.orig/pkg-descr	2008-12-22 13:27:07.000000000 -0500
+++ dcc-dccd/pkg-descr	2009-06-15 10:21:35.000000000 -0400
@@ -7,7 +7,3 @@
 and documentation.
 
 WWW: http://www.rhyolite.com/dcc/
-
-- Dean
-
-dean@odyssey.apana.org.au
diff -ruN dcc-dccd.orig/pkg-install dcc-dccd/pkg-install
--- dcc-dccd.orig/pkg-install	2004-11-20 21:35:45.000000000 -0500
+++ dcc-dccd/pkg-install	2009-06-15 10:21:35.000000000 -0400
@@ -7,6 +7,7 @@
 DCCUID=%%DCCUID%%
 DCCGROUP=%%DCCGROUP%%
 DCCGID=%%DCCGID%%
+DCCHOME=%%DCCHOME%%
 
 if [ "$2" = "PRE-INSTALL" ]; then
 
@@ -21,7 +22,7 @@
 
 	if ! pw usershow "$DCCUSER" 2>/dev/null 1>&2; then
 		if pw useradd $DCCUSER -u $DCCUID -g $DCCGROUP -h - \
-			-s "/sbin/nologin" -d "/nonexistent" \
+			-s "/sbin/nologin" -d "$DCCHOME" \
 			-c "Distributed Checksum Clearinghouse"; \
 		then
 			echo "=> Added user \"$DCCUSER\"."
@@ -30,7 +31,22 @@
 			exit 1
 		fi
 	fi
+elif [ "$2" = "POST-INSTALL" ]; then
 
+	echo "=> Generating unique passwords for your DCC install..."
+	echo "=>"
+	echo "=> Note this will make map.sample, map.txt.sample and"
+	echo "=> ids.sample fail their MD5 checks on package removal."
+
+	/bin/sh $PREFIX/dcc/libexec/fix-map \
+	-n .sample \
+	-I $DCCHOME/ids.sample -i $DCCHOME/ids \
+	-T $DCCHOME/map.txt.sample -t $DCCHOME/map.txt \
+	-m $DCCHOME/map
+
+        for file in ids map map.txt ; do
+                /bin/cp -p $DCCHOME/$file $DCCHOME/${file}.sample
+        done
 fi
 
 exit 0
diff -ruN dcc-dccd.orig/pkg-plist dcc-dccd/pkg-plist
--- dcc-dccd.orig/pkg-plist	2009-03-28 08:13:41.000000000 -0400
+++ dcc-dccd/pkg-plist	2009-06-15 10:21:35.000000000 -0400
@@ -4,6 +4,7 @@
 dcc/cgi-bin/README
 dcc/cgi-bin/chgpasswd
 dcc/cgi-bin/common
+dcc/cgi-bin/common.pm
 dcc/cgi-bin/edit-whiteclnt
 dcc/cgi-bin/footer
 dcc/cgi-bin/header
@@ -11,6 +12,7 @@
 dcc/cgi-bin/list-log
 dcc/cgi-bin/list-msg
 dcc/cgi-bin/webuser-notify
+dcc/libexec/check_ip_range
 dcc/libexec/cron-dccd
 %%WITH_DCCIFD%%dcc/libexec/dccifd
 %%WITH_DCCM%%dcc/libexec/dccm
@@ -26,6 +28,7 @@
 dcc/libexec/fetchblack
 dcc/libexec/fetchids
 dcc/libexec/fetch-testmsg-whitelist
+dcc/libexec/fix-map
 dcc/libexec/hackmc
 dcc/libexec/list-clients
 dcc/libexec/logger
@@ -48,27 +51,54 @@
 %%WITH_DCCD%%@stopdaemon dccd
 %%WITH_DCCGREY%%@stopdaemon dccgrey
 %%WITH_ALT_HOME%%@cwd /var
+@comment -------------------------
+@comment The next group of three-line sets install/remove the config files
+@comment 
+@comment **** on uninstall, delete the config file if it matches the sample file
 @unexec if cmp -s %D/dcc/dcc_conf %D/dcc/dcc_conf.sample; then rm -f %D/dcc/dcc_conf; fi
+@comment 
+@comment **** the sample file is unilaterally installed/removed
 dcc/dcc_conf.sample
+@comment
+@comment **** on install, the config file is created from the sample file if it doesn't exist
 @exec [ -f %B/dcc_conf ] || cp %B/%f %B/dcc_conf
+@comment
 @unexec if cmp -s %D/dcc/flod %D/dcc/flod.sample; then rm -f %D/dcc/flod; fi
 dcc/flod.sample
+@exec [ -f %B/flod ] || cp %B/%f %B/flod
+@comment
 @unexec if cmp -s %D/dcc/grey_flod %D/dcc/grey_flod.sample; then rm -f %D/dcc/grey_flod; fi
 dcc/grey_flod.sample
+@exec [ -f %B/grey_flod ] || cp %B/%f %B/grey_flod
+@comment
 @unexec if cmp -s %D/dcc/grey_whitelist %D/dcc/grey_whitelist.sample; then rm -f %D/dcc/grey_whitelist; fi
 dcc/grey_whitelist.sample
+@exec [ -f %B/grey_whitelist ] || cp %B/%f %B/grey_whitelist
+@comment
 @unexec if cmp -s %D/dcc/ids %D/dcc/ids.sample; then rm -f %D/dcc/ids; fi
 dcc/ids.sample
+@exec [ -f %B/ids ] || cp -p %B/%f %B/ids
+@comment
 @unexec if cmp -s %D/dcc/map.txt %D/dcc/map.txt.sample; then rm -f %D/dcc/map.txt; fi
 dcc/map.txt.sample
+@exec [ -f %B/map.txt ] || cp -p %B/%f %B/map.txt
+@comment
 @unexec if cmp -s %D/dcc/map %D/dcc/map.sample; then rm -f %D/dcc/map; fi
 dcc/map.sample
+@exec [ -f %B/map ] || cp -p %B/%f %B/map
+@comment
 @unexec if cmp -s %D/dcc/whiteclnt %D/dcc/whiteclnt.sample; then rm -f %D/dcc/whiteclnt; fi
 dcc/whiteclnt.sample
+@exec [ -f %B/whiteclnt ] || cp %B/%f %B/whiteclnt
+@comment
 @unexec if cmp -s %D/dcc/whitecommon %D/dcc/whitecommon.sample; then rm -f %D/dcc/whitecommon; fi
 dcc/whitecommon.sample
+@exec [ -f %B/whitecommon ] || cp %B/%f %B/whitecommon
+@comment
 @unexec if cmp -s %D/dcc/whitelist %D/dcc/whitelist.sample; then rm -f %D/dcc/whitelist; fi
 dcc/whitelist.sample
+@exec [ -f %B/whitelist ] || cp %B/%f %B/whitelist
+@comment
 %%WITH_IFD_MILT%%@unexec [ -e %D/dcc/whiteclnt.dccw ] && rm -f %D/dcc/whiteclnt.dccw || true
 %%WITH_IFD_MILT%%@unexec [ -e %D/dcc/whiteclnt.dccx ] && rm -f %D/dcc/whiteclnt.dccx || true
 %%WITH_DCCD%%@unexec [ -e %D/dcc/dcc_db ] && rm -f %D/dcc/dcc_db || true
@@ -78,5 +108,7 @@
 %%WITH_DCCGREY%%@unexec [ -e %D/dcc/grey_db.hash ] && rm -f %D/dcc/grey_db.hash || true
 %%WITH_DCCGREY%%@unexec [ -e %D/dcc/grey_flod.map ] && rm -f %D/dcc/grey_flod.map || true
 %%WITH_DCCGREY%%@unexec [ -e %D/dcc/grey_clients ] && rm -f %D/dcc/grey_clients || true
-@dirrm dcc/log
+@exec mkdir -p %D/dcc/log
+@exec chown -R %%DCCUSER%% %D/dcc
+@dirrmtry dcc/log
 @dirrmtry dcc


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



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