NetBSD Problem Report #18994
Received: (qmail 18274 invoked by uid 605); 9 Nov 2002 12:20:49 -0000
Message-Id: <200211091225.gA9CPoX17466@darkstar.local>
Date: Sat, 9 Nov 2002 13:25:50 +0100 (CET)
From: Julio Merino <jmmv@menta.net>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jmmv@menta.net
To: gnats-bugs@gnats.netbsd.org
Subject: Make print/apsfilter honor PKG_SYSCONFDIR
X-Send-Pr-Version: 3.95
>Number: 18994
>Category: pkg
>Synopsis: Make print/apsfilter honor PKG_SYSCONFDIR
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 09 12:21:00 +0000 2002
>Closed-Date: Tue Nov 26 11:29:44 +0000 2002
>Last-Modified: Tue Nov 26 11:29:44 +0000 2002
>Originator: Julio Merino
>Release: NetBSD 1.6K
>Organization:
HispaBSD
>Environment:
System: NetBSD darkstar.local 1.6K NetBSD 1.6K (DARKSTAR) #130: Thu Nov 7 23:22:44 CET 2002 jmmv@darkstar.local:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
print/apsfilter does some weird hacks to install configuration files
in ${PREFIX}/etc/apsfilter. The package should use PKG_SYSCONFDIR
stuff to do this (including PKG_SYSCONFSUBDIR).
Note that the package installs a symlink inside the configuration
directory, so this needs to be managed with an INSTALL script.
>How-To-Repeat:
>Fix:
Apply this patch:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/apsfilter/Makefile,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile
--- Makefile 2002/09/13 06:53:35 1.7
+++ Makefile 2002/11/09 12:15:42
@@ -2,7 +2,7 @@
#
DISTNAME= apsfilter-7.2.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= http://www.apsfilter.org/download/
@@ -18,8 +18,6 @@
DEPENDS+= a2ps-[0-9]*:../../print/a2ps
DEPENDS+= psutils-[0-9]*:../../print/psutils
-DEINSTALL_FILE= ${WRKDIR}/.DEINSTALL
-
WRKSRC= ${WRKDIR}/apsfilter
HAS_CONFIGURE= YES
@@ -27,6 +25,16 @@
CONFIGURE_ARGS+=--prefix=${LOCALBASE}
CONFIGURE_ARGS+=--with-shell=${SH}
+CONFIGURE_ARGS+=--sysconfdir=${PKG_SYSCONFDIR}
+
+PKG_SYSCONFSUBDIR?= apsfilter
+CONF_FILES= ${PREFIX}/share/apsfilter/template/apsfilterrc \
+ ${PKG_SYSCONFDIR}/apsfilterrc
+
+DEINSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+INSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+
+FILES_SUBST+= PREFIX="${PREFIX}"
post-patch:
for i in bin/apsfilter.in SETUP.in tools/prtmgmt; do \
@@ -35,8 +43,9 @@
${MV} ${WRKSRC}/$$i.done ${WRKSRC}/$$i; \
done
- ${SED} "s,@LOCALBASE@,${LOCALBASE},g" ${PKGDIR}/DEINSTALL \
- > ${DEINSTALL_FILE}
+# ${SED} "s,@LOCALBASE@,${LOCALBASE},g" ${PKGDIR}/DEINSTALL \
+# > ${DEINSTALL_FILE}
.include "../../mk/ghostscript.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/apsfilter/PLIST,v
retrieving revision 1.4
diff -u -u -r1.4 PLIST
--- PLIST 2002/03/09 13:58:03 1.4
+++ PLIST 2002/11/09 12:15:42
@@ -2,7 +2,6 @@
bin/aps2file
bin/apsfilter-bug
bin/apspreview
-etc/apsfilter/basedir
man/man1/aps2file.1
man/man1/apsfilter-bug.1
man/man1/apsfilter.1
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/apsfilter/distinfo,v
retrieving revision 1.4
diff -u -u -r1.4 distinfo
--- distinfo 2002/05/14 17:27:26 1.4
+++ distinfo 2002/11/09 12:15:42
@@ -2,5 +2,7 @@
SHA1 (apsfilter-7.2.2.tar.gz) = be43c7651cbec09cef09d6855c8e9b0fb59fb3c6
Size (apsfilter-7.2.2.tar.gz) = 352011 bytes
-SHA1 (patch-aa) = 144c2cfeb15d00d036dc468a9be7579d39c4581d
+SHA1 (patch-aa) = 200031f114ae994843c1961eba49b09a20fdb970
SHA1 (patch-ab) = 0da86a8669845a62ea356a61ad97bc961e2d01b8
+SHA1 (patch-ac) = a8ace4d2f9fcdf049981bb8f2c3f48b28e4f4cf9
+SHA1 (patch-ad) = 4a692324f2452aee9c588bd4ba8b15e3529de710
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/print/apsfilter/patches/patch-aa,v
retrieving revision 1.2
diff -u -u -r1.2 patch-aa
--- patch-aa 2002/03/09 13:58:04 1.2
+++ patch-aa 2002/11/09 12:15:42
@@ -1,8 +1,15 @@
$NetBSD: patch-aa,v 1.2 2002/03/09 13:58:04 martti Exp $
--- Makefile.in.orig Sun Feb 24 21:47:45 2002
-+++ Makefile.in Wed Feb 27 10:41:18 2002
-@@ -18,9 +18,9 @@
++++ Makefile.in
+@@ -12,15 +12,15 @@ docdir=${DESTDIR}@docdir@
+
+ APSSHARE=${datadir}/apsfilter
+ APSDOC=${docdir}/apsfilter
+-APSCONF=${sysconfdir}/apsfilter
++APSCONF=${sysconfdir}
+
+ MKDIR=mkdir -p
RM=rm -f
LN=ln -sfn
@@ -15,3 +22,19 @@
.PHONY: all install update clean distclean
+@@ -33,7 +33,6 @@ update:
+ ${MKDIR} ${mandir}/man1
+ ${MKDIR} ${mandir}/man5
+ ${MKDIR} ${APSDOC}
+- ${MKDIR} ${APSCONF}
+ ${MKDIR} ${APSSHARE}
+ ${MKDIR} ${APSSHARE}/bin
+ ${MKDIR} ${APSSHARE}/setup
+@@ -79,7 +78,6 @@ update:
+ ${INSTALL_DATA} man/apsfilter-bug.1 ${mandir}/man1/apsfilter-bug.1
+ ${INSTALL_DATA} man/apsfilterrc.5 ${mandir}/man5/apsfilterrc.5
+ tar cf - driver | ( cd ${APSSHARE} && tar xf -)
+- ${LN} ${APSSHARE} ${APSCONF}/basedir
+
+ clean:
+ (cd doc; make clean)
Now remove the DEINSTALL script and add this one, named INSTALL,
which will handle both (de)installation steps.
#!/bin/sh
#
# $NetBSD$
PREFIX="@PREFIX@"
case ${STAGE} in
POST-INSTALL)
${LN} -s ${PREFIX}/share/apsfilter ${PKG_SYSCONFDIR}/basedir
;;
DEINSTALL)
${RM} ${PKG_SYSCONFDIR}/basedir
cat << EOF
===========================================================================
If you will not be using apsfilter any longer, you may want to remove
apsfilter's configuration directory (${PKG_SYSCONFDIR}) and the
SETUP.cfg configuration file from apsfilter's directory
(${PREFIX}/share/apsfilter/SETUP.cfg).
===========================================================================
EOF
;;
esac
Add this patch as patch-ac (this is not really needed, but will avoid
confusion if somebody looks at configure's output):
$NetBSD$
--- configure.orig Thu Jan 10 21:44:48 2002
+++ configure
@@ -237,7 +237,6 @@ Using following values as defaults:
datadir $datadir
(will become $datadir/apsfilter)
sysconfdir $sysconfdir
- (will become $sysconfdir/apsfilter)
mandir $mandir
docdir $docdir
(will become $docdir/apsfilter)
And this other, as patch-ad (this is required because we are using
PKG_SYSCONFSUBDIR, so a user could change it):
$NetBSD$
--- SETUP.in.orig Sun Feb 24 21:47:45 2002
+++ SETUP.in
@@ -1816,7 +1816,7 @@ fail()
export APS_BASEDIR="@datadir@/apsfilter"
cd "$APS_BASEDIR"
-CONF_DIR="@sysconfdir@/apsfilter"
+CONF_DIR="@sysconfdir@"
SPOOL="@spooldir@"
# check read/write permissions
Thanks!
>Release-Note:
>Audit-Trail:
From: Julio Merino <jmmv@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18994 CVS commit: pkgsrc/print/apsfilter
Date: Tue, 26 Nov 2002 13:26:37 +0200 (EET)
Module Name: pkgsrc
Committed By: jmmv
Date: Tue Nov 26 11:26:36 UTC 2002
Modified Files:
pkgsrc/print/apsfilter: Makefile PLIST distinfo
pkgsrc/print/apsfilter/patches: patch-aa
Added Files:
pkgsrc/print/apsfilter: INSTALL
pkgsrc/print/apsfilter/patches: patch-ac patch-ad
Removed Files:
pkgsrc/print/apsfilter: DEINSTALL
Log Message:
Make this package behave properly when installing configuration files, that
is, using the PKG_SYSCONFDIR stuff. apsfilter needs a symlink in the
configuration directory, so add an INSTALL script to create it (which
handles all DEINSTALL stuff too). Bump PKGREVISION to 2.
Approved by wiz.
This closes PR 18994.
To generate a diff of this commit:
cvs rdiff -r1.1 -r0 pkgsrc/print/apsfilter/DEINSTALL
cvs rdiff -r0 -r1.1 pkgsrc/print/apsfilter/INSTALL
cvs rdiff -r1.7 -r1.8 pkgsrc/print/apsfilter/Makefile
cvs rdiff -r1.4 -r1.5 pkgsrc/print/apsfilter/PLIST \
pkgsrc/print/apsfilter/distinfo
cvs rdiff -r1.2 -r1.3 pkgsrc/print/apsfilter/patches/patch-aa
cvs rdiff -r0 -r1.1 pkgsrc/print/apsfilter/patches/patch-ac \
pkgsrc/print/apsfilter/patches/patch-ad
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: jmmv
State-Changed-When: Tue Nov 26 03:29:15 PST 2002
State-Changed-Why:
I have applied the fixes.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.