Subject: pkg/23477: net/ntp4 package 'make clean' fails
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <adrianp@stindustries.net>
List: netbsd-bugs
Date: 11/18/2003 15:05:58
>Number:         23477
>Category:       pkg
>Synopsis:       net/ntp4 package 'make clean' fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 18 15:07:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Adrian Portelli
>Release:        1.6.1
>Organization:
STIndustries
>Environment:
NetBSD otto.stindustries.org.uk 1.6.1 NetBSD 1.6.1 (OTTO) #0: Fri Oct 31 16:40:09 GMT 2003     root@otto.stindustries.org.uk:/usr/src/sys/arch/i386/compile/OTTO i386

>Description:
The pkgsrc net/ntp4 package sets the permissions on two subdirectories under ${WRKSRC} during the install phase. 

If 'make install' is run as a non-root user 'make clean' will fail due to the permissions the directories have been set to. 
>How-To-Repeat:
As a non-root user perform the following steps:

cd pkgsrc/net/ntp4
make install
make clean    <-- Error will happen here
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/ntp4/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile	2003/11/12 03:39:41	1.28
+++ Makefile	2003/11/18 14:56:07
@@ -18,15 +18,20 @@
 CONFIGURE_ENV+=	PATH_PERL="${PERL5}"
 
 DOCDIR=		${PREFIX}/share/doc/html
-EXAMPLESDIR=	${PREFIX}/share/examples
+EGDIR=		${PREFIX}/share/examples
 
 post-install:
-	cd ${WRKSRC} &&								\
-	    ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} conf html;			\
-	    ${FIND} conf html -type d -printx | ${XARGS} ${CHMOD} ${PKGDIRMODE}; \
-	    ${FIND} conf html -type f -printx | ${XARGS} ${CHMOD} ${SHAREMODE};	\
-	    ${PAX} -rw -pe -s "/html/ntp4/" html ${DOCDIR};			\
-	    ${PAX} -rw -pe -s "/conf/ntp4/" conf ${EXAMPLESDIR}
+	cd ${WRKSRC} &&	\
+		${PAX} -rw -pe -s "/html/ntp4/" html ${DOCDIR}; \
+		${PAX} -rw -pe -s "/conf/ntp4/" conf ${EGDIR}
+
+	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCDIR}/ntp4
+	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EGDIR}/ntp4
+
+	${FIND} ${DOCDIR}/ntp4 -type d -printx | ${XARGS} ${CHMOD} ${PKGDIRMODE}
+	${FIND} ${DOCDIR}/ntp4 -type f -printx | ${XARGS} ${CHMOD} ${SHAREMODE}
+	${FIND} ${EGDIR}/ntp4 -type d -printx | ${XARGS} ${CHMOD} ${PKGDIRMODE}
+	${FIND} ${EGDIR}/ntp4 -type f -printx | ${XARGS} ${CHMOD} ${SHAREMODE}
 
 .include "../../mk/bsd.prefs.mk"
 

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