tech-pkg archive

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

libtool wrapper PATH



libtool reorders PATH internally and ignores .wrapper/bin and/or
tools/bin somehow.  This patch limits the passed PATH to .wrapper/bin
and .tools/bin.  With this commands called from libtool are also
jailed.

To do this, all commands called by libtools have to be shown as either
wrapper or tools. Probably ar and ranlib are not enough, but you can
see the idea.
Index: mk/buildlink3/bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.218
diff -u -r1.218 bsd.buildlink3.mk
--- mk/buildlink3/bsd.buildlink3.mk     2 Feb 2013 01:04:59 -0000       1.218
+++ mk/buildlink3/bsd.buildlink3.mk     14 Apr 2013 15:23:21 -0000
@@ -1066,7 +1066,7 @@
 .endif
 _WRAP_ALIASES.LIBTOOL=         libtool
 _WRAP_ALIASES.SHLIBTOOL=       shlibtool
-_WRAP_ENV.LIBTOOL=             PATH="${WRAPPER_BINDIR}:${_WRAP_PATH}"; export 
PATH
+_WRAP_ENV.LIBTOOL=             PATH="${WRAPPER_BINDIR}:${TOOLS_DIR}/bin"; 
export PATH
 _WRAP_ENV.SHLIBTOOL=           ${_WRAP_ENV.LIBTOOL}
 _BLNK_LIBTOOL_FIX_LA=          ${WRAPPER_TMPDIR}/libtool-fix-la
 
Index: mk/wrapper/bsd.wrapper.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/bsd.wrapper.mk,v
retrieving revision 1.88
diff -u -r1.88 bsd.wrapper.mk
--- mk/wrapper/bsd.wrapper.mk   1 Mar 2013 13:27:38 -0000       1.88
+++ mk/wrapper/bsd.wrapper.mk   14 Apr 2013 15:23:21 -0000
@@ -138,6 +138,8 @@
 WRAPPEES+=     IMAKE
 .endif
 WRAPPEES+=     LD
+WRAPPEES+=     AR
+WRAPPEES+=     RANLIB
 
 .if !empty(PKGSRC_COMPILER:Mxlc) && ${OPSYS} == "AIX"
 CC_R?=         ${_XLC_DIR}/bin/cc_r
@@ -180,6 +182,8 @@
 _WRAP_ALIASES.FC=      f77 g77 gfortran
 _WRAP_ALIASES.IMAKE=   imake
 _WRAP_ALIASES.LD=      ld
+_WRAP_ALIASES.AR=      ar
+_WRAP_ALIASES.RANLIB=  ranlib
 
 # _WRAP_*.<wrappee> variables represent "template methods" of the main
 # wrapper script.  This allows individual wrappers to be customized to


Home | Main Index | Thread Index | Old Index