Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 1999 13:33:07 -0500 (EST)
From:      Mikhail Teterin <mi@misha.cisco.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        ian@broken.net
Subject:   ports/14805: www/ijb port installs DOS-formatted samples; lacks startup script
Message-ID:  <199911091833.NAA96151@misha.cisco.com>

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

>Number:         14805
>Category:       ports
>Synopsis:       www/ijb port installs DOS-formatted samples; lacks startup script
>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 Nov  9 10:40:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail Teterin
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
Virtual Estates, Inc.
>Environment:

>Description:

	The sample configuration files come from the software authors in
	the DOS/Windoz  format with the  infamous 015 characters  at the
	end of every  line. The current port takes care  of renaming the
	from sWHATEVER.ini  to WHATEVER.sample, but does  not remove the
	garbage.

	The port is also missing  the startup script (for etc/rc.d). I'm
	just putting it, what I use at home, which starts the junkbuster
	as user nobody. It does not have the "stop" or "restart" rule...

	I also put in a brief  instruction on how to proceed to have the
	junkbuster work properly (pkg/MESSAGE).

>How-To-Repeat:

>Fix:

	This patches  also contain the patch from the  earlier submitted
	ports/14802, which removes the requirement for GNU-make.
	
diff -r -U1 -N ./Makefile /usr/ports/www/ijb/Makefile
--- ./Makefile	Tue Aug 31 03:13:40 1999
+++ /usr/ports/www/ijb/Makefile	Tue Nov  9 13:18:30 1999
@@ -15,3 +15,2 @@
 
-USE_GMAKE=	yes
 ALL_TARGET=	# yes, an empty target.
@@ -26,12 +25,23 @@
 # We have to do the install ourselves...
+JDIR=		${PREFIX}/etc/junkbuster
 do-install:
-	${INSTALL_PROGRAM} ${WRKDIR}/$(DISTNAME)/junkbuster ${PREFIX}/bin/junkbuster
-	${MKDIR} -m 755 ${PREFIX}/etc/junkbuster
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/junkbstr.ini ${PREFIX}/etc/junkbuster/configfile.sample
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/sblock.ini ${PREFIX}/etc/junkbuster/blockfile.sample
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/saclfile.ini ${PREFIX}/etc/junkbuster/aclfile.sample
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/scookie.ini ${PREFIX}/etc/junkbuster/cookiefile.sample
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/sforward.ini ${PREFIX}/etc/junkbuster/forwardfile.sample
-	${INSTALL_DATA} ${WRKDIR}/$(DISTNAME)/strust.ini ${PREFIX}/etc/junkbuster/trustfile.sample
-	$(INSTALL_MAN) $(WRKDIR)/$(DISTNAME)/junkbuster.1 $(PREFIX)/man/man1/
+	${INSTALL_PROGRAM} ${WRKSRC}/junkbuster ${PREFIX}/bin/
+	${MKDIR} -m 755 ${JDIR}
+	umask 222
+	# Converting the samples from DOS to Unix format
+	${TR} -d \\15 < ${WRKSRC}/junkbstr.ini > ${JDIR}/configfile.sample
+	${TR} -d \\15 < ${WRKSRC}/sblock.ini > ${JDIR}/blockfile.sample
+	${TR} -d \\15 < ${WRKSRC}/saclfile.ini > ${JDIR}/aclfile.sample
+	${TR} -d \\15 < ${WRKSRC}/scookie.ini > ${JDIR}/cookiefile.sample
+	${TR} -d \\15 < ${WRKSRC}/sforward.ini > ${JDIR}/forwardfile.sample
+	${TR} -d \\15 < ${WRKSRC}/strust.ini > ${JDIR}/trustfile.sample
+	# Creating the startup script. JB will be running as user nobody
+	${SED} -e 's%JDIR%${JDIR}%g' -e 's%PREFIX%${PREFIX}%g' \
+		< ${FILESDIR}/junkbuster.sh.in > ${PREFIX}/etc/rc.d/junkbuster.sh
+	${CHMOD} 755 ${PREFIX}/etc/rc.d/junkbuster.sh
+	${INSTALL_MAN} ${WRKSRC}/junkbuster.1 ${PREFIX}/man/man1/
+	#
+	#
+	@${CAT} ${PKGMESSAGE}
+	#
 
diff -r -U1 -N ./files/junkbuster.sh.in /usr/ports/www/ijb/files/junkbuster.sh.in
--- ./files/junkbuster.sh.in	Wed Dec 31 19:00:00 1969
+++ /usr/ports/www/ijb/files/junkbuster.sh.in	Tue Nov  9 13:07:03 1999
@@ -0,0 +1,5 @@
+#!/bin/sh
+test -d JDIR -a -x PREFIX/bin/junkbuster -a -f JDIR/configfile || exit 1
+cd JDIR
+su -m nobody -c "PREFIX/bin/junkbuster configfile &"
+echo -n " junkbuster"
diff -r -U1 -N ./pkg/MESSAGE /usr/ports/www/ijb/pkg/MESSAGE
--- ./pkg/MESSAGE	Wed Dec 31 19:00:00 1969
+++ /usr/ports/www/ijb/pkg/MESSAGE	Tue Nov  9 13:15:08 1999
@@ -0,0 +1,3 @@
+Please,  review the  samples of  the configuration  files (somewhere  in
+/usr/local/etc/junkbuster/*.sample)  and create  your own  config files.
+Read the junkbuster man-page (man junkbuster) for even more information.
diff -r -U1 -N ./pkg/PLIST /usr/ports/www/ijb/pkg/PLIST
--- ./pkg/PLIST	Sun Jan  3 13:24:26 1999
+++ /usr/ports/www/ijb/pkg/PLIST	Tue Nov  9 13:00:18 1999
@@ -7,2 +7,3 @@
 etc/junkbuster/trustfile.sample
+etc/rc.d/junkbuster.sh
 @dirrm etc/junkbuster

>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?199911091833.NAA96151>