pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42394: build-env target and ENV



>Number:         42394
>Category:       pkg
>Synopsis:       build-env target and ENV
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 01 04:20:00 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2009Q3
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.
>Description:
With the ENV environment variable set the shell invoked be build-env will 
source the file pointed to by ENV even with the fake home directory and the
ENV file can corrupt the build environment (eg change the PATH)

>How-To-Repeat:
As an example

# ENV="${HOME}/shrc-test" ;export ENV
# echo $ENV
/root/shrc-test
# echo 'PATH=/usr/i686-pc-linux/bin:$PATH' > $ENV
# echo 'date' >>$ENV
# make build-env
[.....]
Entering the build environment for shlock-20080529
Tue Dec  1 17:04:34 NZDT 2009
# echo $PATH
/usr/i686-pc-linux/bin:/usr/pkgsrc/shlock/work/.wrapper/bin:[......]

>Fix:
Index: mk/build/build.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/build/build.mk,v
retrieving revision 1.19
diff -u -p -r1.19 build.mk
--- mk/build/build.mk   10 Jan 2009 15:59:29 -0000      1.19
+++ mk/build/build.mk   1 Dec 2009 04:15:02 -0000
@@ -163,7 +163,7 @@ BUILD_ENV_SHELL?=   ${SH}
 build-env: .PHONY configure
        @${STEP_MSG} "Entering the build environment for ${PKGNAME}"
        ${RUN}${_ULIMIT_CMD}                                            \
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL}
+       cd ${WRKSRC} && ${SETENV} ENV=/dev/null ${MAKE_ENV} ${BUILD_ENV_SHELL}
 .else
 build-env: barrier
 .endif


-- 
Steven
  1: Linux - will work for fish.
  2: The Linux penguin - looks stuffed to the brim with herring.
  ( make your own conclusions )



Home | Main Index | Thread Index | Old Index