version 1.1.17 of the DCC

Brian J. Murrell bd09b15aff634dc234daf7d9609d1bce@interlinx.bc.ca
Thu Jan 9 19:08:08 UTC 2003


On Wed, Jan 08, 2003 at 07:55:15PM -0700, Vernon Schryver wrote:
> Version 1.1.18 of the DCC source is in
> http://www.rhyolite.com/anti-spam/dcc/source/dccd.tar.Z and
> http://www.dcc-servers.net/dcc/source/dccd.tar.Z

OK, so I will finally, at long last, upgrade.  :-)

I am building an RPM SPEC file for this puppy to make future upgrades
easy.  Since I am taking the time to do it, I may as well do it right
though.  I will be happy to share the SPEC file here once I am done if
anyone is interested.

I notice that there are three "levels" of DCC packages, one each
layering on top of the other (dccproc, dccm and dccd, respectively).
I want to make RPMs in the same manner.  So I have grabbed the dccd
tarball and built it, but my question is, given the following list of
installed files:

/var/dcc/ids
/var/dcc/map
/var/dcc/dcc_db.hash
/var/dcc/flod
/var/dcc/dcc_conf
/var/dcc/map.txt
/var/dcc/dcc_db
/var/dcc/whitecommon
/var/dcc/cgi-bin/http2https
/var/dcc/cgi-bin/list-log
/var/dcc/cgi-bin/list-msg
/var/dcc/cgi-bin/chgpasswd
/var/dcc/cgi-bin/README
/var/dcc/cgi-bin/edit-whiteclnt
/var/dcc/cgi-bin/common
/var/dcc/cgi-bin/webuser-notify
/var/dcc/whiteclnt
/var/dcc/whitelist
/usr/bin/cdcc
/usr/bin/dccproc
/usr/lib/dcc/dbclean
/usr/lib/dcc/dccd
/usr/lib/dcc/dcc-stats-graph
/usr/lib/dcc/rcDCC
/usr/lib/dcc/wlist
/usr/lib/dcc/dccsight
/usr/lib/dcc/cron-dccd
/usr/lib/dcc/newwebuser
/usr/lib/dcc/na-spam
/usr/lib/dcc/dcc-stats-collect
/usr/lib/dcc/dblist
/usr/lib/dcc/dccifd
/usr/lib/dcc/ng-spam
/usr/lib/dcc/start-dccd
/usr/lib/dcc/start-dccm
/usr/lib/dcc/hackmc
/usr/lib/dcc/dcc-stats-init
/usr/lib/dcc/logger
/usr/lib/dcc/refeed
/usr/lib/dcc/stop-dccd
/usr/lib/dcc/start-dccifd
/usr/share/man/man8/dccd.8.bz2
/usr/share/man/man8/dccproc.8.bz2
/usr/share/man/man8/dcc.8.bz2
/usr/share/man/man8/dccifd.8.bz2
/usr/share/man/man8/cdcc.8.bz2
/usr/share/man/man8/dccm.8.bz2
/usr/share/man/man8/dccsight.8.bz2
/usr/share/man/man8/dbclean.8.bz2
/usr/share/man/man8/dblist.8.bz2

which should I put in the two inferior layers, dccm and dccproc (the
remainder of which obviously go in dccd)?  Assume that the RPMS are
installed in layers as well, so everything needed for dccm to work
should go in the dccm package, and only the _additional_ files needed
to make dccproc work should go in dccproc, with the remaining files in
dccd.

Also, which files should not be overwritten during an upgrade?

To support building in an RPM environment, I had to make the following
patches to the source:

--- cgi-bin/Makefile.in.orig	2003-01-09 12:45:53.000000000 -0500
+++ cgi-bin/Makefile.in	2003-01-09 12:46:07.000000000 -0500
@@ -34,8 +34,8 @@
 @MAKE_DOT@endif
 
 install:
-	$(INSTALL) -d -o $(BINOWN) -g $(BINGRP) -m 755 $(DCC_CGIBINDIR)
+	$(INSTALL) -d -o $(BINOWN) -g $(BINGRP) -m 755 $(DESTDIR)$(DCC_CGIBINDIR)
 	for NM in $(CSCRIPTS); do $(INSTALL) -o $(BINOWN) -g $(BINGRP) \
-		-m $(BINMODE) -c $$NM $(DCC_CGIBINDIR)/$$NM; done
+		-m $(BINMODE) -c $$NM $(DESTDIR)$(DCC_CGIBINDIR)/$$NM; done
 	for NM in $(OFILES); do $(INSTALL) -o $(BINOWN) -g $(BINGRP) \
-		-m 644 -c $$NM $(DCC_CGIBINDIR)/$$NM; done
+		-m 644 -c $$NM $(DESTDIR)$(DCC_CGIBINDIR)/$$NM; done
--- homedir/Makefile.in.orig	2003-01-09 12:48:45.000000000 -0500
+++ homedir/Makefile.in	2003-01-09 12:48:49.000000000 -0500
@@ -38,26 +38,26 @@
 	${DEPTH}/dbclean/dbclean -Nh .
 
 install:
-	if test ! -f $(DCC_PROTO_HOMEDIR)/dcc_conf; then \
+	if test ! -f $(DESTDIR)$(DCC_PROTO_HOMEDIR)/dcc_conf; then \
 	  for nm in $(DCC_PROTO_HOMEDIR) $(DCC_PROTO_HOMEDIR)/log; do \
-	    $(HINSTALL) -m 755 -d $$nm; done; \
+	    $(HINSTALL) -m 755 -d $(DESTDIR)$$nm; done; \
 	  for nm in dcc_conf flod $(EMPTY_DCC_DB) \
 			whitelist whiteclnt whitecommon; do \
-	    if test -s $$nm -a ! -f $(DCC_PROTO_HOMEDIR)/$$nm; then \
-		$(HINSTALL) -m 644 $$nm $(DCC_PROTO_HOMEDIR)/$$nm; fi; \
+	    if test -s $$nm -a ! -f $(DESTDIR)$(DCC_PROTO_HOMEDIR)/$$nm; then \
+		$(HINSTALL) -m 644 $$nm $(DESTDIR)$(DCC_PROTO_HOMEDIR)/$$nm; fi; \
 	    done; \
-	  if test ! -f $(DCC_PROTO_HOMEDIR)/ids \
-		 -a ! -f $(DCC_PROTO_HOMEDIR)/map \
-		 -a ! -f $(DCC_PROTO_HOMEDIR)/map.txt; then \
+	  if test ! -f $(DESTDIR)$(DCC_PROTO_HOMEDIR)/ids \
+		 -a ! -f $(DESTDIR)$(DCC_PROTO_HOMEDIR)/map \
+		 -a ! -f $(DESTDIR)$(DCC_PROTO_HOMEDIR)/map.txt; then \
 	    PASSWD=`ps|cksum|tr ' ' 'x'`; \
-	    umask 077; touch $(DCC_PROTO_HOMEDIR)/map.txt; \
+	    umask 077; touch $(DESTDIR)$(DCC_PROTO_HOMEDIR)/map.txt; \
 	    sed -e "/^localhost/s/secret1/$$PASSWD/" map.txt \
-		| ${DEPTH}/cdcc/cdcc -qh $(DCC_PROTO_HOMEDIR) \
+		| ${DEPTH}/cdcc/cdcc -qh $(DESTDIR)$(DCC_PROTO_HOMEDIR) \
 			'new map; load -; info' \
-			2>/dev/null >$(DCC_PROTO_HOMEDIR)/map.txt; \
+			2>/dev/null >$(DESTDIR)$(DCC_PROTO_HOMEDIR)/map.txt; \
 	    sed -e "/^32768/s/secret1/$$PASSWD/" ids \
-			>$(DCC_PROTO_HOMEDIR)/ids; \
-	    set +e; chown $(DCC_SUID) $(DCC_PROTO_HOMEDIR)/map.txt \
-			$(DCC_PROTO_HOMEDIR)/map $(DCC_PROTO_HOMEDIR)/ids; \
+			>$(DESTDIR)$(DCC_PROTO_HOMEDIR)/ids; \
+	    set +e; chown $(DCC_SUID) $(DESTDIR)$(DCC_PROTO_HOMEDIR)/map.txt \
+			$(DESTDIR)$(DCC_PROTO_HOMEDIR)/map $(DESTDIR)$(DCC_PROTO_HOMEDIR)/ids; \
 	  fi; \
 	fi
--- misc/Makefile.in.orig	2003-01-09 13:11:09.000000000 -0500
+++ misc/Makefile.in	2003-01-09 13:11:12.000000000 -0500
@@ -29,4 +29,4 @@
 @MAKE_INC2@
 
 install:
-	for NM in $(SSCRIPTS); do $(BININSTALL) $$NM $(DCC_BINDIR)/$$NM;done
+	for NM in $(SSCRIPTS); do $(BININSTALL) $$NM $(DESTDIR)$(DCC_BINDIR)/$$NM;done
--- gmake.inc.in.orig	2003-01-09 13:02:23.000000000 -0500
+++ gmake.inc.in	2003-01-09 13:02:25.000000000 -0500
@@ -61,7 +61,7 @@
 
 proginstall:beforeinstall
 ifdef PROG
-	$(BININSTALL) $(PROG) $(BINDIR)
+	$(BININSTALL) $(PROG) $(DESTDIR)$(BINDIR)
 endif
 
 # gmake with gcc or IRIX compilers do not need the depend target"
--- Makefile.inc2.in.orig	2003-01-09 13:04:24.000000000 -0500
+++ Makefile.inc2.in	2003-01-09 13:46:53.000000000 -0500
@@ -28,8 +28,8 @@
 BININSTALL=$(INSTALL) -o $(BINOWN) -g $(BINGRP) -m $(BINMODE) -c
 
 # create the DCC home directory before trying to install files
-beforeinstall:$(BINDIR) $(MANDIR)8 depend all
-$(BINDIR):
+beforeinstall:$(DESTDIR)$(BINDIR) $(MANDIR)8 depend all
+$(DESTDIR)$(BINDIR):
 	$(INSTALL) -d -o $(BINOWN) -g $(BINGRP) -m 755 $@
 
 @USE_DCCMANINSTALL@
@@ -38,7 +38,7 @@
 @MAKE_DOT@ifdef MAN8
 	sh -c 'for NM in $(MAN8); do \
 	  $(INSTALL) -o $(MANOWN) -g $(MANGRP) -m $(MANMODE) \
-		$$NM $(MANDIR)8@MAN8INST@;\
+		$$NM ${DESTDIR}$(MANDIR)8@MAN8INST@;\
 	  done'
 @MAKE_DOT@endif
 @MAKE_DOT@endif

I think I got all the places where a test for file existance is done
or the creation of a file is done.

Thanx,
b.

-- 
Brian J. Murrell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://www.rhyolite.com/pipermail/dcc/attachments/20030109/05068392/attachment.bin>


More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.