ports/51010: Update to LPRng port - security fix, Reference: Debian Security Advisory DSA 285-1

Patrick Powell papowell at astart.com
Wed Apr 16 00:20:13 UTC 2003


>Number:         51010
>Category:       ports
>Synopsis:       Update to LPRng port - security fix, Reference: Debian Security Advisory DSA 285-1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 15 17:20:10 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Powell
>Release:        FreeBSD 4.6.2-RELEASE i386
>Organization:
LPRng.com
>Environment:
System: FreeBSD h110.private 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Wed Sep 4 12:34:57 PDT 2002 root at localhost:/usr/src/sys/compile/FW i386


	
>Description:
Reference: Debian Security Advisory DSA 285-1
This update fixes the security bug.

Port Maintainers:  please delete the existing /usr/ports/sysutils/LPRng
files and replace it with the current files.  The current port is VERY
out of date.

Please contact me (I am the port maintainer) if there are any questions
by phone at the number below, or send email to:  darin at astart.com
with any concerns.

Patrick Powell                 Astart Technologies
papowell at astart.com            6741 Convoy Court
Network and System             San Diego, CA 92111
  Consulting                   858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)
>How-To-Repeat:
Reference: Debian Security Advisory DSA 285-1
>Fix:

Please note that I am including both a DIFF and complete
set of files for the port.  Please make sure to delete all
of the existing /usr/ports/sysutils/LPRng files in the CVS repository
before installing the new ones.  This was not done last time and
problems occurred.

Patrick Powell

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	LPRng
#	LPRng/Makefile
#	LPRng/pkg-message
#	LPRng/pkg-install
#	LPRng/pkg-descr
#	LPRng/pkg-deinstall
#	LPRng/pkg-comment
#	LPRng/files-pkg-message
#	LPRng/distinfo
#	LPRng/pkg-plist
#
echo c - LPRng
mkdir -p LPRng > /dev/null 2>&1
echo x - LPRng/Makefile
sed 's/^X//' >LPRng/Makefile << 'END-of-LPRng/Makefile'
X# New ports collection makefile for:	LPRng
X# Date created:		2 Apr 1997
X# Whom:			desmo at bandwidth.org
X#
X# $FreeBSD: ports/sysutils/LPRng/Makefile,v 1.22 2003/01/03 08:26:35 ijliao Exp $
X#
X
XPORTNAME=LPRng
XPORTVERSION=3.8.21
XCATEGORIES=	sysutils print
XMASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
X		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
X		ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
X		ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
X		ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
XMASTER_SITE_SUBDIR=	LPRng/LPRng
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	papowell at astart.com
X
XGNU_CONFIGURE=	yes
XINSTALLS_SHLIB=	yes
X
XCONFIGURE_ARGS= \
X	--with-ldopts="-L${LOCALBASE}/lib" \
X	--with-ccopts="-I${LOCALBASE}/include" \
X	--with-filterdir=${PREFIX}/libexec/filters \
X	--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
X	--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin"
X.if defined(PREFIX)
X  CONFIGURE_ARGS+=  --prefix="${PREFIX}"
X.endif
X.if defined(SYSCONFDIR)
X  CONFIGURE_ARGS+=  --sysconfdir="${SYSCONFDIR}"
X.endif
X
X
XMAN1=lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 lpstat.1 lpq.1 lpr.1 lprm.1 monitor.1 pclbanner.1 lpbanner.1
XMAN5=printcap.5 lpd.conf.5 lpd.perms.5
XMAN8=lpc.8 checkpc.8 lpd.8
X
Xpre-everything::
X	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
X	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc clean all install"
X	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
X		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
X		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
X		${ECHO_MSG} "   ln -s /usr/share/man /usr/man"; \
X		${ECHO_MSG} "If you do not, you will retain the old FreeBSD man pages."; \
X		${ECHO_MSG} "See the hier(7) man page for details of the FreeBSD file system"; \
X		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
X		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
X	fi
X
Xpost-install:
X.if !defined(NOPORTSDOCS)
X	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
X.for ext in html pdf ppt ps txt gif jpg png
X	for i in `ls ${WRKSRC}/HOWTO | ${GREP} "\.${ext}$$"`; \
X		do ${INSTALL_DATA} ${WRKSRC}/HOWTO/$$i ${DOCSDIR}; done
X.endfor
X.endif
X	@${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-LPRng/Makefile
echo x - LPRng/pkg-message
sed 's/^X//' >LPRng/pkg-message << 'END-of-LPRng/pkg-message'
X
XTo activate the LPRng printing system do the following:
X
X- set `lpd_enable=NO' in /etc/rc.conf.
X  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
X
X- run checkpc -f to make sure that necessary files have been created
X
X- reboot or kill the old lpd (`killall lpd') and
X  start the new one (/usr/local/etc/rc.d/lprng.sh start)
X
XLPRng uses the printcap, lpd.conf, and lpd.perms configuration files
X
XFor further information, see the LPRng Documentation:
X  /usr/local/share/doc/LPRng
X
XThe LPRng Web Site is http://www.lprng.com
X
XCommercial support is available from Astart Technologies:
X
XPatrick Powell                 Astart Technologies
Xpapowell at astart.com            6741 Convoy Court
XNetwork and System             San Diego, CA 92111
X  Consulting                   858-874-6543 FAX 858-751-2435
XLPRng - Print Spooler (http://www.lprng.com)
END-of-LPRng/pkg-message
echo x - LPRng/pkg-install
sed 's/^X//' >LPRng/pkg-install << 'END-of-LPRng/pkg-install'
X#!/bin/sh
XPREFIX=/usr/local
XLPD_PATH="/usr/local/sbin/lpd"
XINSTALL="/usr/bin/install -c -o root -g wheel"
XLPD_PERMS_PATH="/usr/local/etc/lpd.perms"
XLPD_CONF_PATH="/usr/local/etc/lpd.conf"
XPRINTCAP_PATH="/usr/local/etc/printcap"
XSYSCONFDIR=/usr/local/etc
XSBINDIR=/usr/local/sbin
XFILTER_DIR=/usr/local/libexec/filters
XLOCKFILE="/var/run/lpd"
XPSHOWALL="-ax"
XVERSION=3.8.21
XINIT=
XMANDIR=/usr/local/man
X#
X# -- START --
X# postinstall.freebsd.sh,v 1.1 2001/08/21 20:33:16 root Exp
X#
X#  If you are building a PORT, see the
X#  DISTRIBUTIONS/Freebsd directory for a complete port
X#  building package.
X# 
X# This is the shell script that does the postinstall
X# dynamic fixup
X#  It needs to be massaged with the information for
X#  various paths.
X# If you are building a package,  then you do NOT want
X#  to have this executed - it will put the sample files
X#  in place.  You need to do this during the postinstall
X#  step in the package installation.
X#
Xecho RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
Xif [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
Xfix () {
X    v=`echo $1 | sed -e 's/[:;].*//'`;
X    p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
X    if expr "$p" : "\|" >/dev/null ; then
X        echo "$v is a filter '$p'" 
X        return 0
X    fi
X    echo "Putting $p in $d, using $v.sample"
X    if [ ! -d "$d" ] ; then
X        echo "Directory $d does not exist!"
X        mkdir -p $d
X    fi
X    if [ -f $v.sample ] ; then
X        if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
X    elif [ -f $v ] ; then
X        if [ $v != $p.sample ] ; then cp $v $p.sample; fi
X    else
X        echo "Do not have $v.sample or $v"
X    fi
X    if [ ! -f $p.sample ] ; then
X        echo "Do not have $p.sample"
X    elif [ ! -f $p ] ; then
X        chmod 644 $p.sample
X        cp $p.sample $p;
X        chmod 644 $p;
X    fi;
X}
X# we use the /usr/local/etc/rc.d method to start
X# lpd
X# we have to take them from one place and put in another
Xif [ "X$MAKEPACKAGE" = "XYES" ] ; then
X    hold=${DESTDIR}${PREFIX}/etc
X    echo "Setting up configuration files path for package" ${hold}
X    # we put files into the destination
X    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
X    cp lpd.perms ${hold}/lpd.perms.sample
X    cp lpd.conf ${hold}/lpd.conf.sample
X    cp printcap ${hold}/printcap.sample
X    if [ "$INIT" != no ] ; then
X        cp init.freebsd ${hold}/lprng.sh
X    fi
Xelif [ "X$MAKEINSTALL" = XYES ] ; then
X	# we have the port pre-install operation
X	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
X		# we have the dreaded standard installation
X		# try to make a symbolic link to 
X		echo "Creating symbolic link from /usr/man to /usr/share/man"
X		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
X	fi
X    echo "Setting up configuration files path for installation" ${hold}
X    hold=${DESTDIR}${PREFIX}/etc
X    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
X    cp lpd.perms ${hold}/lpd.perms.sample
X    cp lpd.conf ${hold}/lpd.conf.sample
X    cp printcap ${hold}/printcap.sample
X
X    fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
X    fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
X    fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
X
X    if [ "$INIT" != no ] ; then
X		if [ -f /etc/rc.conf ] ; then
X			perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf 
X		fi
X		cp init.freebsd ${hold}/lprng.sh
X		init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
X		echo "Setting up init script $init using init.freebsd"
X		if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
X		rm -f $init
X		cp init.freebsd $init
X		chmod 744 $init
X
X		echo "Stopping LPD"
X		kill -INT `ps ${PSHOWALL} | awk '/lpd/{ print $1;}'` >/dev/null 2>&1
X		sleep 2;
X		# check the printcap information
X		echo "Checking Printcap Info and fixing permissions"
X		${SBINDIR}/checkpc -f
X		# restart the server
X		echo "Restarting server"
X		sh $init start
X    fi
Xelif [ "X$2" = "XPOST-INSTALL" ] ; then
X    # when doing an install from a package we get the file from the package
X    hold=etc
X    if [ -f ${hold}/lpd.perms.sample ] ; then
X        fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
X        fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
X        fix ${hold}/printcap "${PRINTCAP_PATH}"
X		if [ "$INIT" != no ] ; then
X			init=/usr/local/etc/rc.d/lprng.sh
X			cp ${hold}/lprng.sh $init;
X			chmod 755 $init;
X			if [ -f /etc/rc.conf ] ; then
X				perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf 
X			fi
X		fi
X    else
X        echo "WARNING: configuration files missing from package! CWD " `pwd`
X        ls
X        exit 1
X    fi
Xelif [ "X$2" = "XPRE-INSTALL" ] ; then
X	# we have the port pre-install operation
X	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
X		# we have the dreaded standard installation
X		# try to make a symbolic link to 
X		echo "Creating symbolic link from /usr/man to /usr/share/man"
X		v=`ln -s /usr/share/man /usr/man`;
X	fi
Xfi
Xexit 0
END-of-LPRng/pkg-install
echo x - LPRng/pkg-descr
sed 's/^X//' >LPRng/pkg-descr << 'END-of-LPRng/pkg-descr'
XThe LPRng software is an enhanced, extended, and portable implementation
Xof the Berkeley LPR print spooler functionality.  While providing the
Xsame interface and meeting RFC1179 requirements, the implementation is
Xcompletely different and provides support for the following features:
Xlightweight (no databases needed) lpr, lpc, and lprm programs; dynamic
Xredirection of print queues; automatic job holding; highly verbose
Xdiagnostics; multiple printers serving a single queue; client programs
Xdo not need to run SUID root; greatly enhanced security checks; and a
Xgreatly improved permission and authorization mechanism.
X
XWWW: http://www.lprng.com/
XFTP: ftp://ftp.lprng.com/
END-of-LPRng/pkg-descr
echo x - LPRng/pkg-deinstall
sed 's/^X//' >LPRng/pkg-deinstall << 'END-of-LPRng/pkg-deinstall'
X#!/bin/sh
XPREFIX=/usr/local
XLPD_PATH="/usr/local/sbin/lpd"
XINSTALL="/usr/bin/install -c -o root -g wheel"
XLPD_PERMS_PATH="/usr/local/etc/lpd.perms"
XLPD_CONF_PATH="/usr/local/etc/lpd.conf"
XPRINTCAP_PATH="/usr/local/etc/printcap"
XSYSCONFDIR=/usr/local/etc
XSBINDIR=/usr/local/sbin
XFILTER_DIR=/usr/local/libexec/filters
XLOCKFILE="/var/run/lpd"
XPSHOWALL="-ax"
XVERSION=3.8.21
XINIT=
XMANDIR=/usr/local/man
X#
X# -- START --
X# preremove.freebsd.sh,v 1.1 2001/08/21 20:33:17 root Exp
X#
X# This is the shell script that does the preremove
X# lpd shutdown.  It is the script from hell
Xecho RUNNING preremove.freebsd.sh parms "'$0 $@'"
Xif [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
Xif [ "X$2" = "XDEINSTALL" ] ; then
X	echo "Stopping LPD"
X	killall -INT lpd
Xfi
Xexit 0
END-of-LPRng/pkg-deinstall
echo x - LPRng/pkg-comment
sed 's/^X//' >LPRng/pkg-comment << 'END-of-LPRng/pkg-comment'
XAn Enhanced Printer Spooler
END-of-LPRng/pkg-comment
echo x - LPRng/files-pkg-message
sed 's/^X//' >LPRng/files-pkg-message << 'END-of-LPRng/files-pkg-message'
X
XTo activate the LPRng printing system do the following:
X
X- set `lpd_enable=NO' in /etc/rc.conf.
X  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
X
X- run checkpc -f to make sure that necessary files have been created
X
X- reboot or kill the old lpd (`killall lpd') and
X  start the new one (/usr/local/etc/rc.d/lprng.sh start)
X
XLPRng uses the printcap, lpd.conf, and lpd.perms configuration files
X
XFor further information, see the LPRng Documentation:
X  DOCSDIR
X
XThe LPRng Web Site is http://www.lprng.com
X
XCommercial support is available from Astart Technologies:
X
XPatrick Powell                 Astart Technologies
Xpapowell at astart.com            6741 Convoy Court
XNetwork and System             San Diego, CA 92111
X  Consulting                   858-874-6543 FAX 858-751-2435
XLPRng - Print Spooler (http://www.lprng.com)
END-of-LPRng/files-pkg-message
echo x - LPRng/distinfo
sed 's/^X//' >LPRng/distinfo << 'END-of-LPRng/distinfo'
XMD5 (LPRng-3.8.21.tgz) = 396d0a49a4533ad973176efa9bf054b1
END-of-LPRng/distinfo
echo x - LPRng/pkg-plist
sed 's/^X//' >LPRng/pkg-plist << 'END-of-LPRng/pkg-plist'
Xbin/lpq
Xbin/lpr
Xbin/lprm
Xbin/lpstat
Xetc/lpd.conf.sample
Xetc/lpd.perms.sample
Xetc/lprng.sh
Xetc/printcap.sample
Xlib/liblpr.a
Xlib/liblpr.la
Xlib/liblpr.so.0
Xlibexec/filters/lpbanner
Xlibexec/filters/lpf
Xlibexec/filters/pclbanner
Xlibexec/filters/psbanner
Xsbin/checkpc
Xsbin/lpc
Xsbin/lpd
Xsbin/lprng_certs
Xsbin/lprng_index_certs
Xshare/doc/LPRng/LISA98.ppt
Xshare/doc/LPRng/LPRng-HOWTO.html
Xshare/doc/LPRng/LPRng-HOWTO.pdf
Xshare/doc/LPRng/LPRng.jpg
Xshare/doc/LPRng/LPRngT-L.jpg
Xshare/doc/LPRng/LPRngT-S.jpg
Xshare/doc/LPRng/license.txt
Xshare/doc/LPRng/rfc1179.txt
Xshare/doc/LPRng/y2k.txt
X at dirrm  share/doc/LPRng
END-of-LPRng/pkg-plist
exit

####################################  --- DIFFS #################################
diff -rNu /usr/ports/sysutils/LPRng/Makefile LPRng/Makefile
--- /usr/ports/sysutils/LPRng/Makefile	Fri Jan 24 19:29:44 2003
+++ LPRng/Makefile	Tue Apr 15 16:55:39 2003
@@ -5,14 +5,12 @@
 # $FreeBSD: ports/sysutils/LPRng/Makefile,v 1.22 2003/01/03 08:26:35 ijliao Exp $
 #
 
-PORTNAME=	LPRng
-PORTVERSION=	3.8.10
+PORTNAME=LPRng
+PORTVERSION=3.8.21
 CATEGORIES=	sysutils print
 MASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
-		ftp://ftp.astart.com/pub/%SUBDIR%/ \
 		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
 		ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
-		ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng/LPRng/ \
 		ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
 		ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
 MASTER_SITE_SUBDIR=	LPRng/LPRng
@@ -20,32 +18,48 @@
 
 MAINTAINER=	papowell at astart.com
 
-LIB_DEPENDS=	gdbm.3:${PORTSDIR}/databases/gdbm
-
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	\
-		--with-sbindir=${PREFIX}/sbin \
-		--with-filterdir=${PREFIX}/libexec/filters \
-		--with-lpd_conf_path=${PREFIX}/etc/lpd.conf \
-		--with-lpd_perms_path=${PREFIX}/etc/lpd.perms \
-		--with-printcap_path=/etc/printcap \
-		--enable-gdbm=${LOCALBASE}
-USE_LIBTOOL=	yes
-
-MAN1=		cancel.1 lp.1 lpbanner.1 lpf.1 \
-		lpq.1 lpr.1 lprm.1 lpstat.1 monitor.1 \
-		pclbanner.1 psbanner.1
-MAN5=		lpd.conf.5 lpd.perms.5 printcap.5
-MAN8=		checkpc.8 lpc.8 lpd.8
-MANCOMPRESSED=	yes
+INSTALLS_SHLIB=	yes
 
-DOC_FILES=	CHANGES LPRng-HOWTO.* *.jpg LISA98.ppt
+CONFIGURE_ARGS= \
+	--with-ldopts="-L${LOCALBASE}/lib" \
+	--with-ccopts="-I${LOCALBASE}/include" \
+	--with-filterdir=${PREFIX}/libexec/filters \
+	--with-ld_library_path="${PREFIX}/lib:/lib:/usr/lib:/${LOCALBASE}/lib" \
+	--with-filter_path="${PREFIX}/bin:/bin:/usr/bin:${PREFIX}/sbin:/sbin:/usr/sbin"
+.if defined(PREFIX)
+  CONFIGURE_ARGS+=  --prefix="${PREFIX}"
+.endif
+.if defined(SYSCONFDIR)
+  CONFIGURE_ARGS+=  --sysconfdir="${SYSCONFDIR}"
+.endif
+
+
+MAN1=lpf.1 psbanner.1 lp.1 cancel.1 lprng_certs.1 lprng_index_certs.1 lpstat.1 lpq.1 lpr.1 lprm.1 monitor.1 pclbanner.1 lpbanner.1
+MAN5=printcap.5 lpd.conf.5 lpd.perms.5
+MAN8=lpc.8 checkpc.8 lpd.8
+
+pre-everything::
+	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
+	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc clean all install"
+	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
+		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
+		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
+		${ECHO_MSG} "   ln -s /usr/share/man /usr/man"; \
+		${ECHO_MSG} "If you do not, you will retain the old FreeBSD man pages."; \
+		${ECHO_MSG} "See the hier(7) man page for details of the FreeBSD file system"; \
+		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
+		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
+	fi
 
 post-install:
+.if !defined(NOPORTSDOCS)
 	@${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 0555 ${DOCSDIR}
-.for file in ${DOC_FILES}
-	@${INSTALL_DATA} ${WRKSRC}/HOWTO/${file} ${DOCSDIR}
+.for ext in html pdf ppt ps txt gif jpg png
+	for i in `ls ${WRKSRC}/HOWTO | ${GREP} "\.${ext}$$"`; \
+		do ${INSTALL_DATA} ${WRKSRC}/HOWTO/$$i ${DOCSDIR}; done
 .endfor
-	@${CAT} ${PKGMESSAGE} | ${SED} -e "s|@@PREFIX@@|${PREFIX}|g"
+.endif
+	@${SED} -e "s!DOCSDIR!${DOCSDIR}/!" ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -rNu /usr/ports/sysutils/LPRng/README.html LPRng/README.html
--- /usr/ports/sysutils/LPRng/README.html	Fri Jan 10 13:02:35 2003
+++ LPRng/README.html	Wed Dec 31 16:00:00 1969
@@ -1,30 +0,0 @@
-<html>
-<title> The FreeBSD Ports Collection (sysutils/LPRng)</title>
-<head><h1> The FreeBSD Ports Collection ("sysutils/LPRng")</h1> </head> <hr>
-<body>
-
-<p>You are now in the directory for the port "sysutils/LPRng" (package name "LPRng-3.8.10").
-
-<p>This is the one-line description for this port:
-
-<p><hr><p>
-An Enhanced Printer Spooler
-<p><hr>
-
-<p>Please read the "<a href="pkg-descr">description file</a>" for a
-longer description.
-
-<p>Go to the <a href="../../README.html">top of the ports tree</a> for
-a summary on how to use the ports collection.
-
-<p>
-This port requires package(s) "gdbm-1.8.0 libtool-1.3.4_4" to build.
-<p>
-This port requires package(s) "gdbm-1.8.0" to run.
-
-<p><hr><p>
-<a href="../README.html"> Go up one level</a>
-|
-<a href="../../README.html"> Go to top of ports tree</a>
-</body>
-</html>
diff -rNu /usr/ports/sysutils/LPRng/distinfo LPRng/distinfo
--- /usr/ports/sysutils/LPRng/distinfo	Sun May  5 15:16:27 2002
+++ LPRng/distinfo	Tue Apr 15 16:55:39 2003
@@ -1 +1 @@
-MD5 (LPRng-3.8.10.tgz) = 3127e3793b94bd4a403a3809b1d8467b
+MD5 (LPRng-3.8.21.tgz) = 396d0a49a4533ad973176efa9bf054b1
diff -rNu /usr/ports/sysutils/LPRng/files/patch-ah LPRng/files/patch-ah
--- /usr/ports/sysutils/LPRng/files/patch-ah	Mon Jul 30 11:18:38 2001
+++ LPRng/files/patch-ah	Wed Dec 31 16:00:00 1969
@@ -1,24 +0,0 @@
---- src/common/vars.c.orig	Thu Dec 28 05:06:11 2000
-+++ src/common/vars.c	Tue Jul  3 19:44:29 2001
-@@ -62,10 +62,10 @@
- #error Missing REQUIRE_CONFIGFILES definition
- #endif
- #if !defined(FILTER_PATH)
--#define FILTER_PATH "/bin:/usr/bin:/usr/contrib/bin:/usr/local/bin:/usr/ucb:/usr/sbin:/usr/etc:/etc"
-+#define FILTER_PATH "/bin:/usr/bin:/usr/libexec:/usr/local/libexec:/usr/sbin:/var/spool/bin"
- #endif
- #if !defined(LD_LIBRARY_PATH)
--#define LD_LIBRARY_PATH "/lib:/usr/lib:/usr/5lib:/usr/ucblib"
-+#define LD_LIBRARY_PATH "/lib:/usr/lib:/usr/local/lib"
- #endif
- #if !defined(LOCKFILE)
- #error Missing LOCKFILE definition
-@@ -242,7 +242,7 @@
- 	/* remote server principal for server to server forwarding */
- { "kerberos_forward_principal", 0, STRING_K, &Kerberos_forward_principal_DYN,0,0},
- 	/* keytab file location for kerberos, used by server */
--{ "kerberos_keytab", 0, STRING_K, &Kerberos_keytab_DYN,0,0,"=/etc/lpd.keytab"},
-+{ "kerberos_keytab", 0, STRING_K, &Kerberos_keytab_DYN,0,0,"=/usr/local/etc/lpd.keytab:/etc/lpd.keytab"},
- 	/* key lifetime for kerberos, used by server */
- { "kerberos_life", 0, STRING_K, &Kerberos_life_DYN,0,0},
- 	/* key renewal time for kerberos, used by server */
diff -rNu /usr/ports/sysutils/LPRng/files/patch-ai LPRng/files/patch-ai
--- /usr/ports/sysutils/LPRng/files/patch-ai	Sun May  5 15:16:28 2002
+++ LPRng/files/patch-ai	Wed Dec 31 16:00:00 1969
@@ -1,33 +0,0 @@
---- man/Makefile.in.orig	Sun Mar 31 21:50:56 2002
-+++ man/Makefile.in	Sun Apr 28 16:56:03 2002
-@@ -18,7 +18,7 @@
- INSTALL=@INSTALL@
- 
- # change MANEXT to .gz or .Z if you use compressed manpages.
--MANEXT =
-+MANEXT =.gz
- 
- ## fix up prefix to be a make variable
- prefix = @prefix@
-@@ -111,8 +111,11 @@
- 		    ${SRC}/mkinstalldirs $(DESTDIR)$(MAN)/man$${suffix}; \
- 	    fi; \
- 	    for i in *.$$suffix; do \
--		echo   $(INSTALL) -m 644 $$i $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
--		$(INSTALL)   -m 644 $$i $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
-+		echo $(COMPRESS) $$i ; \
-+		$(COMPRESS) < $$i >_ ; \
-+		echo   $(INSTALL) -m 644 _ $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
-+		$(INSTALL)   -m 644 _  $(DESTDIR)$(MAN)/man$$suffix/`basename $$i`$(MANEXT); \
-+		rm _ ; \
- 	    done; \
- 	  fi; \
- 	done;
-@@ -126,7 +129,6 @@
- 	    done; \
- 	  fi; \
- 	done;
--	
- realclean mostlyclean distclean:: clean
- 
- clean::
diff -rNu /usr/ports/sysutils/LPRng/files/patch-src_common_lpd__jobs.c LPRng/files/patch-src_common_lpd__jobs.c
--- /usr/ports/sysutils/LPRng/files/patch-src_common_lpd__jobs.c	Mon Dec 30 12:14:32 2002
+++ LPRng/files/patch-src_common_lpd__jobs.c	Wed Dec 31 16:00:00 1969
@@ -1,13 +0,0 @@
-
-$FreeBSD: ports/sysutils/LPRng/files/patch-src_common_lpd__jobs.c,v 1.1 2002/12/30 20:14:32 naddy Exp $
-
---- src/common/lpd_jobs.c.orig	Mon Dec 30 20:33:17 2002
-+++ src/common/lpd_jobs.c	Mon Dec 30 20:33:27 2002
-@@ -189,7 +189,6 @@
- {   
-     struct line_list *l, *r;
- 	int tr, tl;
--	tr = (int)p;
- 	l = ((struct line_list **)left)[0];
- 	r = ((struct line_list **)right)[0];
- 	tl = Find_flag_value(l,DONE_TIME,Value_sep);
diff -rNu /usr/ports/sysutils/LPRng/files-pkg-message LPRng/files-pkg-message
--- /usr/ports/sysutils/LPRng/files-pkg-message	Wed Dec 31 16:00:00 1969
+++ LPRng/files-pkg-message	Tue Apr 15 16:55:39 2003
@@ -0,0 +1,25 @@
+
+To activate the LPRng printing system do the following:
+
+- set `lpd_enable=NO' in /etc/rc.conf.
+  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
+
+- run checkpc -f to make sure that necessary files have been created
+
+- reboot or kill the old lpd (`killall lpd') and
+  start the new one (/usr/local/etc/rc.d/lprng.sh start)
+
+LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
+
+For further information, see the LPRng Documentation:
+  DOCSDIR
+
+The LPRng Web Site is http://www.lprng.com
+
+Commercial support is available from Astart Technologies:
+
+Patrick Powell                 Astart Technologies
+papowell at astart.com            6741 Convoy Court
+Network and System             San Diego, CA 92111
+  Consulting                   858-874-6543 FAX 858-751-2435
+LPRng - Print Spooler (http://www.lprng.com)
diff -rNu /usr/ports/sysutils/LPRng/pkg-deinstall LPRng/pkg-deinstall
--- /usr/ports/sysutils/LPRng/pkg-deinstall	Wed Dec 31 16:00:00 1969
+++ LPRng/pkg-deinstall	Tue Apr 15 16:55:39 2003
@@ -0,0 +1,28 @@
+#!/bin/sh
+PREFIX=/usr/local
+LPD_PATH="/usr/local/sbin/lpd"
+INSTALL="/usr/bin/install -c -o root -g wheel"
+LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
+LPD_CONF_PATH="/usr/local/etc/lpd.conf"
+PRINTCAP_PATH="/usr/local/etc/printcap"
+SYSCONFDIR=/usr/local/etc
+SBINDIR=/usr/local/sbin
+FILTER_DIR=/usr/local/libexec/filters
+LOCKFILE="/var/run/lpd"
+PSHOWALL="-ax"
+VERSION=3.8.21
+INIT=
+MANDIR=/usr/local/man
+#
+# -- START --
+# preremove.freebsd.sh,v 1.1 2001/08/21 20:33:17 root Exp
+#
+# This is the shell script that does the preremove
+# lpd shutdown.  It is the script from hell
+echo RUNNING preremove.freebsd.sh parms "'$0 $@'"
+if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
+if [ "X$2" = "XDEINSTALL" ] ; then
+	echo "Stopping LPD"
+	killall -INT lpd
+fi
+exit 0
diff -rNu /usr/ports/sysutils/LPRng/pkg-descr LPRng/pkg-descr
--- /usr/ports/sysutils/LPRng/pkg-descr	Mon Jul 30 11:18:38 2001
+++ LPRng/pkg-descr	Tue Apr 15 16:55:39 2003
@@ -1,12 +1,12 @@
 The LPRng software is an enhanced, extended, and portable implementation
 of the Berkeley LPR print spooler functionality.  While providing the
 same interface and meeting RFC1179 requirements, the implementation is
-completely new and provides support for the following features:
+completely different and provides support for the following features:
 lightweight (no databases needed) lpr, lpc, and lprm programs; dynamic
 redirection of print queues; automatic job holding; highly verbose
 diagnostics; multiple printers serving a single queue; client programs
 do not need to run SUID root; greatly enhanced security checks; and a
 greatly improved permission and authorization mechanism.
 
-Author: Patrick Powell <papowell at lprng.com>
-WWW: http://www.astart.com/lprng/LPRng.html
+WWW: http://www.lprng.com/
+FTP: ftp://ftp.lprng.com/
diff -rNu /usr/ports/sysutils/LPRng/pkg-install LPRng/pkg-install
--- /usr/ports/sysutils/LPRng/pkg-install	Wed Dec 31 16:00:00 1969
+++ LPRng/pkg-install	Tue Apr 15 16:55:39 2003
@@ -0,0 +1,146 @@
+#!/bin/sh
+PREFIX=/usr/local
+LPD_PATH="/usr/local/sbin/lpd"
+INSTALL="/usr/bin/install -c -o root -g wheel"
+LPD_PERMS_PATH="/usr/local/etc/lpd.perms"
+LPD_CONF_PATH="/usr/local/etc/lpd.conf"
+PRINTCAP_PATH="/usr/local/etc/printcap"
+SYSCONFDIR=/usr/local/etc
+SBINDIR=/usr/local/sbin
+FILTER_DIR=/usr/local/libexec/filters
+LOCKFILE="/var/run/lpd"
+PSHOWALL="-ax"
+VERSION=3.8.21
+INIT=
+MANDIR=/usr/local/man
+#
+# -- START --
+# postinstall.freebsd.sh,v 1.1 2001/08/21 20:33:16 root Exp
+#
+#  If you are building a PORT, see the
+#  DISTRIBUTIONS/Freebsd directory for a complete port
+#  building package.
+# 
+# This is the shell script that does the postinstall
+# dynamic fixup
+#  It needs to be massaged with the information for
+#  various paths.
+# If you are building a package,  then you do NOT want
+#  to have this executed - it will put the sample files
+#  in place.  You need to do this during the postinstall
+#  step in the package installation.
+#
+echo RUNNING postinstall.freebsd.sh parms "'$0 $@'" MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" INIT="$INIT" cwd `pwd`
+if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
+fix () {
+    v=`echo $1 | sed -e 's/[:;].*//'`;
+    p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
+    if expr "$p" : "\|" >/dev/null ; then
+        echo "$v is a filter '$p'" 
+        return 0
+    fi
+    echo "Putting $p in $d, using $v.sample"
+    if [ ! -d "$d" ] ; then
+        echo "Directory $d does not exist!"
+        mkdir -p $d
+    fi
+    if [ -f $v.sample ] ; then
+        if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
+    elif [ -f $v ] ; then
+        if [ $v != $p.sample ] ; then cp $v $p.sample; fi
+    else
+        echo "Do not have $v.sample or $v"
+    fi
+    if [ ! -f $p.sample ] ; then
+        echo "Do not have $p.sample"
+    elif [ ! -f $p ] ; then
+        chmod 644 $p.sample
+        cp $p.sample $p;
+        chmod 644 $p;
+    fi;
+}
+# we use the /usr/local/etc/rc.d method to start
+# lpd
+# we have to take them from one place and put in another
+if [ "X$MAKEPACKAGE" = "XYES" ] ; then
+    hold=${DESTDIR}${PREFIX}/etc
+    echo "Setting up configuration files path for package" ${hold}
+    # we put files into the destination
+    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
+    cp lpd.perms ${hold}/lpd.perms.sample
+    cp lpd.conf ${hold}/lpd.conf.sample
+    cp printcap ${hold}/printcap.sample
+    if [ "$INIT" != no ] ; then
+        cp init.freebsd ${hold}/lprng.sh
+    fi
+elif [ "X$MAKEINSTALL" = XYES ] ; then
+	# we have the port pre-install operation
+	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
+		# we have the dreaded standard installation
+		# try to make a symbolic link to 
+		echo "Creating symbolic link from /usr/man to /usr/share/man"
+		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
+	fi
+    echo "Setting up configuration files path for installation" ${hold}
+    hold=${DESTDIR}${PREFIX}/etc
+    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
+    cp lpd.perms ${hold}/lpd.perms.sample
+    cp lpd.conf ${hold}/lpd.conf.sample
+    cp printcap ${hold}/printcap.sample
+
+    fix ${hold}/lpd.perms "${DESTDIR}${LPD_PERMS_PATH}"
+    fix ${hold}/lpd.conf "${DESTDIR}${LPD_CONF_PATH}"
+    fix ${hold}/printcap "${DESTDIR}${PRINTCAP_PATH}"
+
+    if [ "$INIT" != no ] ; then
+		if [ -f /etc/rc.conf ] ; then
+			perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' ${DESTDIR}/etc/rc.conf 
+		fi
+		cp init.freebsd ${hold}/lprng.sh
+		init=${DESTDIR}/usr/local/etc/rc.d/lprng.sh
+		echo "Setting up init script $init using init.freebsd"
+		if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
+		rm -f $init
+		cp init.freebsd $init
+		chmod 744 $init
+
+		echo "Stopping LPD"
+		kill -INT `ps ${PSHOWALL} | awk '/lpd/{ print $1;}'` >/dev/null 2>&1
+		sleep 2;
+		# check the printcap information
+		echo "Checking Printcap Info and fixing permissions"
+		${SBINDIR}/checkpc -f
+		# restart the server
+		echo "Restarting server"
+		sh $init start
+    fi
+elif [ "X$2" = "XPOST-INSTALL" ] ; then
+    # when doing an install from a package we get the file from the package
+    hold=etc
+    if [ -f ${hold}/lpd.perms.sample ] ; then
+        fix ${hold}/lpd.perms "${LPD_PERMS_PATH}"
+        fix ${hold}/lpd.conf "${LPD_CONF_PATH}"
+        fix ${hold}/printcap "${PRINTCAP_PATH}"
+		if [ "$INIT" != no ] ; then
+			init=/usr/local/etc/rc.d/lprng.sh
+			cp ${hold}/lprng.sh $init;
+			chmod 755 $init;
+			if [ -f /etc/rc.conf ] ; then
+				perl -spi.bak -e 's/^lpd_enable/#lpd_enable/;' /etc/rc.conf 
+			fi
+		fi
+    else
+        echo "WARNING: configuration files missing from package! CWD " `pwd`
+        ls
+        exit 1
+    fi
+elif [ "X$2" = "XPRE-INSTALL" ] ; then
+	# we have the port pre-install operation
+	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
+		# we have the dreaded standard installation
+		# try to make a symbolic link to 
+		echo "Creating symbolic link from /usr/man to /usr/share/man"
+		v=`ln -s /usr/share/man /usr/man`;
+	fi
+fi
+exit 0
diff -rNu /usr/ports/sysutils/LPRng/pkg-message LPRng/pkg-message
--- /usr/ports/sysutils/LPRng/pkg-message	Sun Sep 26 18:50:06 1999
+++ LPRng/pkg-message	Tue Apr 15 16:55:39 2003
@@ -1,16 +1,25 @@
 
-To activate the new printing system do the following:
+To activate the LPRng printing system do the following:
+
+- set `lpd_enable=NO' in /etc/rc.conf.
+  The LPRng startup script is in /usr/local/etc/rc.d/lprng.sh
 
-- save your old printcap (`cp /etc/printcap /etc/printcap.save')
-- set `lpd_enable=NO' in /etc/rc.conf
 - run checkpc -f to make sure that necessary files have been created
+
 - reboot or kill the old lpd (`killall lpd') and
-  start the new one (`@@PREFIX@@/sbin/lpd')
-- remember to adjust your aliases or your PATH to use the new programs
+  start the new one (/usr/local/etc/rc.d/lprng.sh start)
+
+LPRng uses the printcap, lpd.conf, and lpd.perms configuration files
+
+For further information, see the LPRng Documentation:
+  /usr/local/share/doc/LPRng
+
+The LPRng Web Site is http://www.lprng.com
 
-Note that LPRng uses /etc/printcap, /etc/lpd.conf, and /etc/lpd.perms
+Commercial support is available from Astart Technologies:
 
-For further information, have a look at:
-  @@PREFIX@@/share/doc/LPRng
-also:
-  WWW: http://www.astart.com/lprng.html
+Patrick Powell                 Astart Technologies
+papowell at astart.com            6741 Convoy Court
+Network and System             San Diego, CA 92111
+  Consulting                   858-874-6543 FAX 858-751-2435
+LPRng - Print Spooler (http://www.lprng.com)
diff -rNu /usr/ports/sysutils/LPRng/pkg-plist LPRng/pkg-plist
--- /usr/ports/sysutils/LPRng/pkg-plist	Sat Sep 14 15:29:46 2002
+++ LPRng/pkg-plist	Tue Apr 15 16:55:39 2003
@@ -1,19 +1,13 @@
-bin/cancel
-bin/lp
 bin/lpq
 bin/lpr
 bin/lprm
 bin/lpstat
- at unexec if [ -f %D/etc/lpd.conf ]; then cmp -s %D/etc/lpd.conf.sample %D/etc/lpd.conf && rm -f %D/etc/lpd.conf || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/lpd.conf`` to remove config files left." | fmt ; fi
 etc/lpd.conf.sample
- at unexec if [ -f %D/etc/lpd.perms ]; then cmp -s %D/etc/lpd.perms.sample %D/etc/lpd.perms && rm -f %D/etc/lpd.perms || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/lpd.perms`` to remove config files left." | fmt ; fi
 etc/lpd.perms.sample
 etc/lprng.sh
 etc/printcap.sample
-etc/rc.d/lprng.sh
 lib/liblpr.a
 lib/liblpr.la
-lib/liblpr.so
 lib/liblpr.so.0
 libexec/filters/lpbanner
 libexec/filters/lpf
@@ -22,15 +16,15 @@
 sbin/checkpc
 sbin/lpc
 sbin/lpd
-share/doc/LPRng/CHANGES
+sbin/lprng_certs
+sbin/lprng_index_certs
 share/doc/LPRng/LISA98.ppt
-share/doc/LPRng/LPRng-HOWTO.dsl
-share/doc/LPRng/LPRng-HOWTO.dtd
 share/doc/LPRng/LPRng-HOWTO.html
 share/doc/LPRng/LPRng-HOWTO.pdf
-share/doc/LPRng/LPRng-HOWTO.sgml
 share/doc/LPRng/LPRng.jpg
 share/doc/LPRng/LPRngT-L.jpg
 share/doc/LPRng/LPRngT-S.jpg
- at dirrm libexec/filters
- at dirrm share/doc/LPRng
+share/doc/LPRng/license.txt
+share/doc/LPRng/rfc1179.txt
+share/doc/LPRng/y2k.txt
+ at dirrm  share/doc/LPRng
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list