Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2000 12:01:04 +0200 (CEST)
From:      Dag-Erling Smørgrav <des@yes.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/19397: Diablo port is outdated and buggy
Message-ID:  <200006201001.MAA73166@des.follo.net>

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

>Number:         19397
>Category:       ports
>Synopsis:       Diablo port is outdated and buggy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 20 03:10:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Dag-Erling Smørgrav
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Yes Interactive AS
>Environment:

Current ports tree

>Description:

The current Diablo port (news/diablo) is severely outdated and buggy:

 1) the version of Diablo it builds is v. 1.15, dated February 1998; the
    current release of Diablo is 2.2-REL, dated May 2000.

 2) the master site in the Makefile is no longer correct, since Matt Dillon
    no longer maintains

 3) the Makefile has /usr/local hardcoded in several places and assumes that
    xmake is located in ${PREFIX}/bin, and will therefore not build or install
    properly if PREFIX or LOCALBASE is set to something else than /usr/local.

 4) the version of Diablo it builds has its own strlcpy() with a different
    argument list than the one in libc; therefore the build will fail on any
    FreeBSD system recent enough to have strlcpy() (3.3 or newer).

 5) the description of Diablo in pkg/DESCR is incorrect even for the obsolete
    version that the port actually installs, since 1.15 was the first version
    to include dreaderd and was therefore no longer "strictly a backbone news
    transit system".

>How-To-Repeat:

# cd /usr/ports/news/diablo
# make install PREFIX=/tmp/diablo

The build will fail for want of xmake; if xmake is where the Makefile expects
it to be, it will fail due to the strlcpy() conflict, unless your system is
old enough, in which case I *think* it will succeed (though I haven't
actually verified this) except for setting the news user's home directory
wrong.

>Fix:

Apply the patch included below.

Notes:

1) I've put myself up as maintainer since the listed maintainer hasn't touched
   the port since 1997 and doesn't respond to mail about the port. (oh well,
   there goes my resolve not to get involved in the ports collection...)

2) I don't actually run a news server, so I can only vouch that the port builds
   and installs properly, not that it works.

3) the patch makes some other improvements to the port, such as patching the
   XMakefile so Diablo will install and run in ${PREFIX}/news without the need
   for a /news symlink, and putting the post-install notes in pkg/MESSAGE so
   they'll show up when you install the package.

4) Also note that I think the NO_PACKAGE restriction can be lifted, since I
   don't think Diablo needs the 'news' user to have a valid shell or home
   directory, but I haven't verified this, so I've left NO_PACKAGE in place.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/news/diablo/Makefile,v
retrieving revision 1.11
diff -u -u -r1.11 Makefile
--- Makefile	2000/04/21 07:51:42	1.11
+++ Makefile	2000/06/20 09:59:22
@@ -1,77 +1,57 @@
 # New ports collection makefile for:		diablo
-# Date created:					June 2nd 1997
-# Whom:						jfitz
+# Date created:					June 20th 2000
+# Whom:						des
 #
 # $FreeBSD: ports/news/diablo/Makefile,v 1.11 2000/04/21 07:51:42 mharo Exp $
 #
 
 PORTNAME=	diablo
-PORTVERSION=	1.15
+PORTVERSION=	2.2
 CATEGORIES=	news
-MASTER_SITES=	http://www.backplane.com/diablo/
-DISTNAME=	${PKGNAME}-rel
+MASTER_SITES=	http://www.openusenet.org/diablo/download/
+DISTNAME=	${PKGNAME}-REL
 EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	jfitz@FreeBSD.org
+MAINTAINER=	des@FreeBSD.org
 
 BUILD_DEPENDS=	xmake:${PORTSDIR}/devel/xmake
 
-WRKSRC=		${WRKDIR}/diablo
-
 NO_PACKAGE=	"has to create/verify news user"
+
+MAN5=		diablo-kp.5 diablo-files.5
+MAN8=		dicmd.8 didump.8 dexpireover.8 dgrpctl.8 dclean.8 \
+		dilookup.8 diloadfromspool.8 doutq.8 dreadart.8 \
+		dreaderd.8 dpath.8 drcmd.8 dsyncgroups.8 dreadover.8 \
+		dkp.8 diablo.8 dexpire.8 dspoolout.8 dnewslink.8
+
+DOCDIR=		${PREFIX}/share/doc/diablo
 
-MAN5=		diablo-files.5 diablo-kp.5
-MAN8=		diablo.8 dclean.8 dicmd.8 dexpire.8 didump.8 \
-		dilookup.8 doutq.8 dspoolout.8 dkp.8 dnewslink.8 \
-		dreadart.8 dreaderd.8 dsyncgroups.8
+post-extract:
+	${CP} ${SCRIPTDIR}/diablo.sh ${WRKDIR}
 
 do-configure:
-	${CP} ${FILESDIR}/post-install-notes ${WRKSRC}
 	${SETENV} ${MAKE_ENV} ${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' \
-		${WRKSRC}/post-install-notes
+		${WRKDIR}/diablo.sh ${WRKSRC}/XMakefile.inc
 
 do-build:
-	cd ${WRKSRC} && ${PREFIX}/bin/xmake clean all
+	cd ${WRKSRC} && xmake all
 
 pre-install:
-	@ ${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/createuser
-	${MKDIR} ${PREFIX}/news ${PREFIX}/news/dbin ${PREFIX}/news/spool \
-		${PREFIX}/news/spool/news ${PREFIX}/share/doc/diablo
-	${RM} -f /news
-	${LN} -sf ${PREFIX}/news /news
+	${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/createuser
+	${INSTALL} -d ${DOCDIR} ${PREFIX}/news ${PREFIX}/news/dbin \
+		${PREFIX}/news/spool ${PREFIX}/news/spool/dqueue \
+		${PREFIX}/news/spool/cache ${PREFIX}/news/spool/group \
+		${PREFIX}/news/spool/postq
 	${CHOWN} -R news.news ${PREFIX}/news
 
 do-install:
-	cd ${WRKSRC} && ${PREFIX}/bin/xmake install
+	cd ${WRKSRC} && xmake install
 .for file in COPYRIGHT INSTALL README.READER README.SERVER RELEASE_NOTES
-	${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/diablo
+	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCDIR}
 .endfor
-	${INSTALL_DATA} ${WRKSRC}/post-install-notes ${PREFIX}/share/doc/diablo
+	${INSTALL_SCRIPT} ${WRKDIR}/diablo.sh ${PREFIX}/etc/rc.d
 
 post-install:
-	${INSTALL} -c -o news -g news ${WRKSRC}/samples/* ${PREFIX}/news
-	@ ${ECHO} "Installing ${PREFIX}/etc/rc.d/diablo.sh startup script"
-	@ ${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "#" >> ${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "" >> ${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "# The line to run diablo is specifically commented out" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "# so that you don't start up diablo with a generic config" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "# Once you've configured diablo, uncomment the line below" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "" >> ${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "if [ -x ${PREFIX}/news/rc.news ]" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "then" >> ${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "#	${PREFIX}/news/rc.news && ${ECHO} -n ' diablo'" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "	${ECHO} -n ' diablo(disabled)'" >> \
-		${PREFIX}/etc/rc.d/diablo.sh
-	@ ${ECHO} "fi" >> ${PREFIX}/etc/rc.d/diablo.sh
-	${CHMOD} 0750 ${PREFIX}/etc/rc.d/diablo.sh
-.if !defined(BATCH)
-	@ /usr/bin/more -e ${PREFIX}/share/doc/diablo/post-install-notes
-.endif
+	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
Index: files/md5
===================================================================
RCS file: /home/ncvs/ports/news/diablo/files/md5,v
retrieving revision 1.3
diff -u -u -r1.3 md5
--- files/md5	1998/04/18 12:32:31	1.3
+++ files/md5	2000/06/20 09:25:20
@@ -1 +1 @@
-MD5 (diablo-1.15-rel.tgz) = a1976d3eee802bd13e5ba5819da87fa4
+MD5 (diablo-2.2-REL.tgz) = 62b1df59b49709ebef48d336ea8cfc87
Index: files/post-install-notes
===================================================================
RCS file: post-install-notes
diff -N post-install-notes
--- /tmp/cvssXbJX73126	Tue Jun 20 12:00:31 2000
+++ /dev/null	Tue Jun 20 11:28:18 2000
@@ -1,23 +0,0 @@
-Post-install notes for diablo
------------------------------
-
-The port of diablo installs a very basic diablo system.  You will certainly
-want to change paths and partitions before you start using diablo in a
-production environment.
-
-The directory tree, as installed, consists of :
-
-%%PREFIX%%/news
-%%PREFIX%%/news/dqueue
-%%PREFIX%%/news/dbin
-%%PREFIX%%/news/spool/news
-
-To keep with the author's suggestion, /news is symlinked to /usr/local/news
-on installation.  You will want to put /news/spool/news on it's own
-partition.
-
-Please refer to the documentation located at
-http://www.backplane.com/diablo/ for further information.
-
---
-j.
Index: patches/patch-aa
===================================================================
RCS file: patch-aa
diff -N patch-aa
--- /dev/null	Tue Jun 20 11:28:18 2000
+++ patch-aa	Tue Jun 20 10:43:48 2000
@@ -0,0 +1,20 @@
+--- XMakefile.inc.orig	Tue Jun 20 10:31:09 2000
++++ XMakefile.inc	Tue Jun 20 10:43:22 2000
+@@ -20,8 +20,8 @@
+ #endif
+ 
+ .set LFLAGS	-L$(BD)obj -lfilter -ldiablo -lutil -lm
+-.set IDIR	/news
+-.set MDIR	/news/man
++.set IDIR	%%PREFIX%%/news
++.set MDIR	%%PREFIX%%/man
+ .set INSTALL	install
+ 
+ #ifdef __FreeBSD__
+@@ -41,5 +41,5 @@
+ .set INSTALL	/usr/ucb/install
+ #endif
+ 
+-.set DIST /news
++.set DIST %%PREFIX%%/news
+ 
Index: pkg/COMMENT
===================================================================
RCS file: /home/ncvs/ports/news/diablo/pkg/COMMENT,v
retrieving revision 1.2
diff -u -u -r1.2 COMMENT
--- pkg/COMMENT	1999/06/26 19:08:13	1.2
+++ pkg/COMMENT	2000/06/20 09:48:34
@@ -1 +1 @@
-A news transit system for backbone news feeders
+A comprehensive newsfeeding and newsreading software package.
Index: pkg/DESCR
===================================================================
RCS file: /home/ncvs/ports/news/diablo/pkg/DESCR,v
retrieving revision 1.2
diff -u -u -r1.2 DESCR
--- pkg/DESCR	1999/05/03 05:07:24	1.2
+++ pkg/DESCR	2000/06/20 09:48:07
@@ -1,24 +1,6 @@
-DIABLO is a backbone news transit system, designed to replace INND on
-backbone machines. DIABLO UNDERSTANDS NEWSFEEDS ONLY, IT DOES NOT UNDERSTAND
-NEWSREADER CLIENTS!. You cannot run diablo on a machine which needs to
-accept nntp post commands or newsreading-related nntp commands. You cannot
-point your NNTPSERVER at a host running Diablo.
+Diablo is a comprehensive newsfeeding and newsreading software package
+that was originally developed by Matthew Dillon and is now run as an open
+source project.  Diablo is significantly faster and more robust than INN,
+and scales well to multi-server installations.
 
-Diablo is strictly a backbone news transit system. It will accept newsfeeds
-using the ihave or the streaming check/takethis protocols, and it can
-generate newsfeeds using ihave or streaming check/takethis protocols. Diablo
-maintains a news spool and dhistory file, but the spool and history file is
-arranged very differently from INN.
-
-Diablo is also between 10 and 20 times as fast as INN in regards to incoming
-feeds, and extremely efficient for outgoing feeds. I have been running
-Diablo on BEST Internet's backbone news machine for several weeks now, and
-it has run flawlessly.
-
-If you have a dedicated newsfeeds machine which does feeds, feeds, and
-nothing but feeds, Diablo may be for you.
-
-Diablo was written and is currently being maintained by Matthew Dillon,
-you can mail me at: dillon@backplane.com
-
-WWW: http://www.backplane.com/
+WWW: http://www.openusenet.org/diablo/
Index: pkg/MESSAGE
===================================================================
RCS file: MESSAGE
diff -N MESSAGE
--- /dev/null	Tue Jun 20 11:28:18 2000
+++ MESSAGE	Tue Jun 20 11:39:16 2000
@@ -0,0 +1,9 @@
+
+Post-install notes for Diablo
+-----------------------------
+
+This port installs a very basic Diablo system.  You will certainly
+want to change paths and partitions before you start using diablo in a
+production environment.  Please refer to the documentation located at
+http://www.openusenet.org/diablo/ for further information.
+
Index: pkg/PLIST
===================================================================
RCS file: /home/ncvs/ports/news/diablo/pkg/PLIST,v
retrieving revision 1.4
diff -u -u -r1.4 PLIST
--- pkg/PLIST	1998/08/19 18:38:05	1.4
+++ pkg/PLIST	2000/06/20 10:00:09
@@ -1,58 +1,70 @@
 etc/rc.d/diablo.sh
-news/dbin/dilookup
-news/dbin/dicmd
-news/dbin/didump
-news/dbin/diconvhist
+share/doc/diablo/COPYRIGHT
+share/doc/diablo/INSTALL
+share/doc/diablo/README.READER
+share/doc/diablo/README.SERVER
+share/doc/diablo/RELEASE_NOTES
+news/dbin/dexpireover
+news/dbin/.empty
+news/dbin/dclean
 news/dbin/dexpire
+news/dbin/diconvhist
+news/dbin/dgrpctl
+news/dbin/diablo
+news/dbin/dicmd
+news/dbin/dilookup
 news/dbin/didate
-news/dbin/dspaminfo
+news/dbin/didump
 news/dbin/diload
 news/dbin/doutq
-news/dbin/dclean
-news/dbin/dspoolout
-news/dbin/dreadart
 news/dbin/dkp
-news/dbin/pgpverify
-news/dbin/dsyncgroups
-news/dbin/dexpireover
-news/dbin/diablo
+news/dbin/diloadfromspool
+news/dbin/dprimehostcache
 news/dbin/dnewslink
+news/dbin/dpath
+news/dbin/dreadart
+news/dbin/drcmd
+news/dbin/dreaderd
+news/dbin/dreadover
+news/dbin/drequeue
+news/dbin/dspaminfo
+news/dbin/dspoolout
+news/dbin/dsyncgroups
+news/dbin/pgpverify
 news/dbin/plock
 news/dbin/showlocks
-news/dbin/dreaderd
+news/samples/adm/rot
+news/samples/adm/biweekly.atrim
+news/samples/adm/crontab.sample
+news/samples/adm/daily.atrim
+news/samples/adm/daily.dclean
+news/samples/adm/daily.reader
+news/samples/adm/hourly.expire
+news/samples/adm/quadhr.expire
+news/samples/adm/rc.news
+news/samples/adm/weekly.reader
+news/samples/dcontrol.ctl
+news/samples/dactive.kp
 news/samples/diablo.config
-news/samples/rc.news
 news/samples/dexpire.ctl
+news/samples/diablo.hosts
+news/samples/distrib.pats
 news/samples/dnewsfeeds
 news/samples/dnntpspool.ctl
-news/samples/diablo.hosts
-news/samples/dactive.kp
-news/samples/dreader.hosts
+news/samples/dreader.access
 news/samples/dserver.hosts
 news/samples/moderators
-news/samples/dcontrol.ctl
-news/dactive.kp
-news/dcontrol.ctl
-news/dexpire.ctl
-news/diablo.config
-news/diablo.hosts
-news/dnewsfeeds
-news/dnntpspool.ctl
-news/dreader.hosts
-news/dserver.hosts
-news/moderators
-news/rc.news
-share/doc/diablo/COPYRIGHT
-share/doc/diablo/INSTALL
-share/doc/diablo/README.READER
-share/doc/diablo/README.SERVER
-share/doc/diablo/RELEASE_NOTES
-share/doc/diablo/post-install-notes
-@unexec /bin/rm -f /news
+news/samples/pgp-sample
 @dirrm share/doc/diablo
-@dirrm news/dbin
-@dirrm news/dqueue
+@dirrm news/spool/postq
 @dirrm news/spool/news
+@dirrm news/spool/group
+@dirrm news/spool/dqueue
+@dirrm news/spool/cache
 @dirrm news/spool
+@dirrm news/samples/adm
 @dirrm news/samples
+@dirrm news/dqueue
+@dirrm news/dbin
+@dirrm news/adm
 @dirrm news
Index: scripts/createuser
===================================================================
RCS file: /home/ncvs/ports/news/diablo/scripts/createuser,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 createuser
--- scripts/createuser	1997/06/02 19:52:11	1.1.1.1
+++ scripts/createuser	2000/06/20 08:40:57
@@ -58,9 +58,9 @@
 
 
 if( ! $have_user ) {
-	$result = system( "pw useradd news -u $cUID -g $cGID -d \"/usr/local/news\" -c \"The Diablo News System\" -s \"/bin/sh\" -p \"*\"" );
+	$result = system( "pw useradd news -u $cUID -g $cGID -d \"$ENV{PREFIX}/news\" -c \"The Diablo News System\" -s \"/bin/sh\" -p \"*\"" );
 } else {
-	$result = system( "pw usermod news -u $cUID -g $cGID -d \"/usr/local/news\" -c \"The Diablo News System\" -s \"/bin/sh\" -p \"*\"" );
+	$result = system( "pw usermod news -u $cUID -g $cGID -d \"$ENV{PREFIX}/news\" -c \"The Diablo News System\" -s \"/bin/sh\" -p \"*\"" );
 }
 if( $result ) {
 	print "Failed to add/modify user news!\n";
Index: scripts/diablo.sh
===================================================================
RCS file: diablo.sh
diff -N diablo.sh
--- /dev/null	Tue Jun 20 11:28:18 2000
+++ diablo.sh	Tue Jun 20 11:16:34 2000
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -x %%PREFIX%%/news/rc.news ] ; then
+    %%PREFIX%%/news/rc.news && echo -n ' diablo'
+fi

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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