Subject: pkg/23542: mail/mailagent misuses dirname and id
To: None <gnats-bugs@gnats.netbsd.org>
From: None <snj@pobox.com>
List: netbsd-bugs
Date: 11/23/2003 07:33:39
>Number:         23542
>Category:       pkg
>Synopsis:       mail/mailagent misuses dirname and id
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 23 07:34:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Soren Jacobsen
>Release:        NetBSD 1.6.1
>Organization:
>Environment:
pkgsrc as of 11/20/2003.
>Description:
${DIRNAME} and ${ID} are the correct programs to use.
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/mailagent/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	2002/07/02 11:37:33	1.9
+++ Makefile	2003/11/23 07:32:11
@@ -21,7 +21,7 @@
 			-Dutmp='/var/run/utmp' \
 			-Dprefix='${PREFIX}' -Dmansrc='${PREFIX}/man/man1' \
 			-Dnotifypatches='false'
-MAKE_ENV=		PATH=`dirname ${PERL5}`:${PATH}
+MAKE_ENV=		PATH=`${DIRNAME} ${PERL5}`:${PATH}
 INSTALL_TARGET=		install install.man
 
 pre-extract:
@@ -29,7 +29,7 @@
 	  ${ECHO} "Please set umask to 022 before running make,"; \
 	  ${ECHO} "or mailagent will not build successfully."; \
 	  ${FALSE}; fi
-	@if [ `id -u` = 0 ]; then \
+	@if [ `${ID} -u` = 0 ]; then \
 	  ${ECHO} "Do not build mailagent as root or it won't pass the sanity tests."; \
 	  ${FALSE}; fi
 
>Release-Note:
>Audit-Trail:
>Unformatted: