pkgsrc-Bugs archive

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

pkg/32654: print/teTeX3-bin doesn't quote environment variables correctly



>Number:         32654
>Category:       pkg
>Synopsis:       print/teTeX3-bin doesn't install correctly if there's a space 
>in PATH
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 27 19:30:00 +0000 2006
>Originator:     Peter Bex
>Release:        NetBSD 2.1_RC6
>Organization:
        
>Environment:
        
        
System: NetBSD frohike.homeunix.org 2.1_RC6 NetBSD 2.1_RC6 (GENERIC) #0: Wed 
Oct 12 17:26:21 UTC 2005 
builds%b2.netbsd.org@localhost:/home/builds/ab/netbsd-2-1-RC6/amd64/200510121548Z-obj/home/builds/ab/netbsd-2-1-RC6/src/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        When there is a space in the PATH environment variable, the
        installation of teTeX3-bin fails because it doesn't quote the
        path correctly.  Here's a transcript where it fails:

teTeX3-bin $ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/Applications/PLT
 Scheme v301/bin
teTeX3-bin $ bmake install
===> *** No /Volumes/Packages/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> *** skipping vulnerability checks. To fix, install
===> *** the pkgsrc/security/audit-packages package and run
===> *** '/usr/pkg/sbin/download-vulnerability-list'.
===> Installing for teTeX-bin-3.0nb6
===> Becoming root%byers.homeunix.org@localhost to install teTeX-bin.
/usr/bin/sudo esubdirs="libs/gd libs/xpdf  texk"; \
  for dir in $esubdirs; do \
    echo making all in $dir; \
    (if test -f $dir/Makefile; then cd $dir && /usr/bin/gnumake all; else true; 
fi) || exit 1; \
  done
making all in libs/gd
gnumake[1]: Nothing to be done for `all'.
making all in libs/xpdf
(cd xpdf; /usr/bin/gnumake libxpdf.a)
gnumake[2]: `libxpdf.a' is up to date.
(cd goo; /usr/bin/gnumake libGoo.a)
gnumake[2]: `libGoo.a' is up to date.
(cd fofi; /usr/bin/gnumake libfofi.a)
gnumake[2]: `libfofi.a' is up to date.
making all in texk
cd ./kpathsea && /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include ' 
LDFLAGS='-L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib ' prefix=/usr/pkg 
exec_prefix=/usr/pkg bindir=/usr/pkg/bin scriptdir=/usr/pkg/bin 
libdir=/usr/pkg/lib datadir=/usr/pkg/share infodir=/usr/pkg/info 
includedir=/usr/pkg/include mandir=/usr/pkg/man manext=1 
man1dir=/usr/pkg/man/man1 texmf=/usr/pkg/share/texmf 
web2cdir=/usr/pkg/share/texmf/web2c vartexfonts=/var/tmp/texfonts 
texinputdir=/usr/pkg/share/texmf/tex mfinputdir=/usr/pkg/share/texmf/metafont 
mpinputdir=/usr/pkg/share/texmf/metapost fontdir=/usr/pkg/share/texmf/fonts 
fmtdir=/usr/pkg/share/texmf/web2c/tex 
basedir=/usr/pkg/share/texmf/web2c/metafont 
memdir=/usr/pkg/share/texmf/web2c/metapost 
texpooldir=/usr/pkg/share/texmf/web2c mfpooldir=/usr/pkg/share/texmf/web2c 
mppooldir=/usr/pkg/share/texmf/web2c 
dvips_plain_macrodir=/usr/pkg/share/texmf/tex/plain/dvips 
dvilj_latex2e_macrodir=/usr/pkg/share
 /texmf/tex/latex/dvilj dvipsdir=/usr/pkg/share/texmf/dvips 
psheaderdir=/usr/pkg/share/texmf/dvips default_texsizes='300:600' 
gnumake[2]: Nothing to be done for `default'.
for d in web2c afm2pl bibtex8 cjkutils detex devnag dtl dvi2tty dvidvi dviljk 
dvipdfm dvipng dvipsk gsftopk lacheck makeindexk musixflx odvipsk ps2pkm 
seetexk tetex tex4htk texlive ttf2pk tth xdvik; do if test -f $d/Makefile; then 
\
  (cd $d && /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include ' 
LDFLAGS='-L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib ' prefix=/usr/pkg 
exec_prefix=/usr/pkg bindir=/usr/pkg/bin scriptdir=/usr/pkg/bin 
libdir=/usr/pkg/lib datadir=/usr/pkg/share infodir=/usr/pkg/info 
includedir=/usr/pkg/include mandir=/usr/pkg/man manext=1 
man1dir=/usr/pkg/man/man1 texmf=/usr/pkg/share/texmf 
web2cdir=/usr/pkg/share/texmf/web2c vartexfonts=/var/tmp/texfonts 
texinputdir=/usr/pkg/share/texmf/tex mfinputdir=/usr/pkg/share/texmf/metafont 
mpinputdir=/usr/pkg/share/texmf/metapost fontdir=/usr/pkg/share/texmf/fonts 
fmtdir=/usr/pkg/share/texmf/web2c/tex 
basedir=/usr/pkg/share/texmf/web2c/metafont 
memdir=/usr/pkg/share/texmf/web2c/metapost 
texpooldir=/usr/pkg/share/texmf/web2c mfpooldir=/usr/pkg/share/texmf/web2c 
mppooldir=/usr/pkg/share/texmf/web2c 
dvips_plain_macrodir=/usr/pkg/share/texmf/tex/plain/dvips 
dvilj_latex2e_macrodir=/usr/pkg/share/texm
 f/tex/latex/dvilj dvipsdir=/usr/pkg/share/texmf/dvips 
psheaderdir=/usr/pkg/share/texmf/dvips default_texsizes='300:600'  all) || exit 
1; else true; fi; done
cd man && /usr/bin/gnumake all
gnumake[3]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
cd gui; /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include '  libgui.a
gnumake[3]: `libgui.a' is up to date.
for dir in texk; do \
   echo making install in $dir; \
     (cd $dir && 
PATH=/usr/pkg/bin:/usr/pkg/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.wrapper/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.buildlink/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.gcc/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.tools/bin:/usr/pkg/bin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/Applications/PLT
 Scheme v301/bin:/usr/pkg/bin:/usr/X11R6/bin \
                /usr/bin/gnumake install) || exit 1; \
done
making install in texk
/bin/sh: line 1: Scheme: command not found
gnumake: *** [install] Error 1
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/print/teTeX3-bin
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/print/teTeX3-bin
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/print/teTeX3-bin
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/print/teTeX3-bin
teTeX3-bin$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/Applications/PLT
 Scheme v301/bin
pkgsrc/print/teTeX3-bin$ export 
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
teTeX3-bin$ bmake install
===> *** No /Volumes/Packages/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> *** skipping vulnerability checks. To fix, install
===> *** the pkgsrc/security/audit-packages package and run
===> *** '/usr/pkg/sbin/download-vulnerability-list'.
===> Installing for teTeX-bin-3.0nb6
===> Becoming root%byers.homeunix.org@localhost to install teTeX-bin.
/usr/bin/sudo esubdirs="libs/gd libs/xpdf  texk"; \
  for dir in $esubdirs; do \
    echo making all in $dir; \
    (if test -f $dir/Makefile; then cd $dir && /usr/bin/gnumake all; else true; 
fi) || exit 1; \
  done
making all in libs/gd
gnumake[1]: Nothing to be done for `all'.
making all in libs/xpdf
(cd xpdf; /usr/bin/gnumake libxpdf.a)
gnumake[2]: `libxpdf.a' is up to date.
(cd goo; /usr/bin/gnumake libGoo.a)
gnumake[2]: `libGoo.a' is up to date.
(cd fofi; /usr/bin/gnumake libfofi.a)
gnumake[2]: `libfofi.a' is up to date.
making all in texk
cd ./kpathsea && /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include ' 
LDFLAGS='-L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib ' prefix=/usr/pkg 
exec_prefix=/usr/pkg bindir=/usr/pkg/bin scriptdir=/usr/pkg/bin 
libdir=/usr/pkg/lib datadir=/usr/pkg/share infodir=/usr/pkg/info 
includedir=/usr/pkg/include mandir=/usr/pkg/man manext=1 
man1dir=/usr/pkg/man/man1 texmf=/usr/pkg/share/texmf 
web2cdir=/usr/pkg/share/texmf/web2c vartexfonts=/var/tmp/texfonts 
texinputdir=/usr/pkg/share/texmf/tex mfinputdir=/usr/pkg/share/texmf/metafont 
mpinputdir=/usr/pkg/share/texmf/metapost fontdir=/usr/pkg/share/texmf/fonts 
fmtdir=/usr/pkg/share/texmf/web2c/tex 
basedir=/usr/pkg/share/texmf/web2c/metafont 
memdir=/usr/pkg/share/texmf/web2c/metapost 
texpooldir=/usr/pkg/share/texmf/web2c mfpooldir=/usr/pkg/share/texmf/web2c 
mppooldir=/usr/pkg/share/texmf/web2c 
dvips_plain_macrodir=/usr/pkg/share/texmf/tex/plain/dvips 
dvilj_latex2e_macrodir=/usr/pkg/share
 /texmf/tex/latex/dvilj dvipsdir=/usr/pkg/share/texmf/dvips 
psheaderdir=/usr/pkg/share/texmf/dvips default_texsizes='300:600' 
gnumake[2]: Nothing to be done for `default'.
for d in web2c afm2pl bibtex8 cjkutils detex devnag dtl dvi2tty dvidvi dviljk 
dvipdfm dvipng dvipsk gsftopk lacheck makeindexk musixflx odvipsk ps2pkm 
seetexk tetex tex4htk texlive ttf2pk tth xdvik; do if test -f $d/Makefile; then 
\
  (cd $d && /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include ' 
LDFLAGS='-L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib ' prefix=/usr/pkg 
exec_prefix=/usr/pkg bindir=/usr/pkg/bin scriptdir=/usr/pkg/bin 
libdir=/usr/pkg/lib datadir=/usr/pkg/share infodir=/usr/pkg/info 
includedir=/usr/pkg/include mandir=/usr/pkg/man manext=1 
man1dir=/usr/pkg/man/man1 texmf=/usr/pkg/share/texmf 
web2cdir=/usr/pkg/share/texmf/web2c vartexfonts=/var/tmp/texfonts 
texinputdir=/usr/pkg/share/texmf/tex mfinputdir=/usr/pkg/share/texmf/metafont 
mpinputdir=/usr/pkg/share/texmf/metapost fontdir=/usr/pkg/share/texmf/fonts 
fmtdir=/usr/pkg/share/texmf/web2c/tex 
basedir=/usr/pkg/share/texmf/web2c/metafont 
memdir=/usr/pkg/share/texmf/web2c/metapost 
texpooldir=/usr/pkg/share/texmf/web2c mfpooldir=/usr/pkg/share/texmf/web2c 
mppooldir=/usr/pkg/share/texmf/web2c 
dvips_plain_macrodir=/usr/pkg/share/texmf/tex/plain/dvips 
dvilj_latex2e_macrodir=/usr/pkg/share/texm
 f/tex/latex/dvilj dvipsdir=/usr/pkg/share/texmf/dvips 
psheaderdir=/usr/pkg/share/texmf/dvips default_texsizes='300:600'  all) || exit 
1; else true; fi; done
cd man && /usr/bin/gnumake all
gnumake[3]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
gnumake[2]: Nothing to be done for `all'.
cd gui; /usr/bin/gnumake  CC='gcc -pipe' CFLAGS='-O2 -Dunix -g 
-I/usr/pkg/include -I/usr/include -I/usr/X11R6/include '  libgui.a
gnumake[3]: `libgui.a' is up to date.
for dir in texk; do \
   echo making install in $dir; \
     (cd $dir && 
PATH=/usr/pkg/bin:/usr/pkg/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.wrapper/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.buildlink/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.gcc/bin:/Volumes/Packages/pkgsrc/print/teTeX3-bin/work/.tools/bin:/usr/pkg/bin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/X11R6/bin
 \
                /usr/bin/gnumake install) || exit 1; \
done
making install in texk
for d in kpathsea web2c afm2pl bibtex8 cjkutils detex devnag dtl dvi2tty dvidvi 
dviljk dvipdfm dvipng dvipsk gsftopk lacheck makeindexk musixflx odvipsk ps2pkm 
seetexk tetex tex4htk texlive ttf2pk tth xdvik; do if test -f $d/Makefile; then 
\
.
.
.
(etc)

        So a work-around is simply to work with a modified PATH which
        doesn't contain a space.

>How-To-Repeat:
        Add a directory with a space to your PATH and try to install teTeX3-bin
>Fix:
        The fix is simply to surround the PATH lines in the Makefiles with
        quotes.  This is where these two new patches come in:


patches/patch-aq:
==============================================================
$NetBSD$

--- Makefile.in.orig    Sun Jan 30 00:12:25 2005
+++ Makefile.in
@@ -51,7 +51,7 @@ default: all
 install: all 
        for dir in $(INSTDIRS); do \
           echo making $@ in $$dir; \
-            (cd $$dir && PATH=$(scriptdir):$(bindir):$(PATH) \
+            (cd $$dir && PATH="$(scriptdir):$(bindir):$(PATH)" \
                 $(MAKE) $@) || exit 1; \
        done
        if test -d $(texmf) && test -f $(srcdir)/release-tetex-src.txt; then \
@@ -64,29 +64,29 @@ install: all 
          cd texk/web2c/omegafonts; $(MAKE) install-links
        $(srcdir)/selfautofix "$(bindir)" "$(texmf)/web2c"
        - if test -f $(scriptdir)/mktexlsr; then \
-         TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
            $(scriptdir)/mktexlsr; \
        else :; fi
        - if test -f $(scriptdir)/fmtutil-sys; then \
-         TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
            $(scriptdir)/fmtutil-sys --all; \
        else :; fi
        - if test -f $(scriptdir)/texlinks; then \
-         TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
            $(scriptdir)/texlinks; \
        else :; fi
        - if test -f $(scriptdir)/updmap-sys \
-         && TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         && TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
               $(scriptdir)/kpsewhich --format='web2c files' updmap.cfg 
>/dev/null; \
        then \
-         TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
            $(scriptdir)/updmap-sys; \
        else :; fi
 
 install-exec:
        for dir in $(INSTDIRS); do \
           echo making $@ in $$dir; \
-          (cd $$dir && PATH=$(scriptdir):$(bindir):$(PATH) \
+          (cd $$dir && PATH="$(scriptdir):$(bindir):$(PATH)" \
               $(MAKE) $@) || exit 1; \
        done
 @FMU@
@@ -95,7 +95,7 @@ install-exec:
        test -f texk/web2c/omegafonts/omfonts && \
          cd texk/web2c/omegafonts; $(MAKE) install-links
        - if test -f $(scriptdir)/texlinks; then \
-         TEXMFMAIN=$(texmf) PATH=$(scriptdir):$(bindir):$(PATH) \
+         TEXMFMAIN=$(texmf) PATH="$(scriptdir):$(bindir):$(PATH)" \
            $(scriptdir)/texlinks; \
        else :; fi
==============================================================

patches/patch-ar:
==============================================================
$NetBSD$

--- texk/web2c/Makefile.in.orig Sun Feb  6 11:56:56 2005
+++ texk/web2c/Makefile.in
@@ -600,7 +600,7 @@ tex-check: trip tex.fmt
        TEXMFCNF=../kpathsea \
          ./tex --mltex --progname=initex --ini $(srcdir)/tests/mltextst
        -./tex </dev/null
-       -PATH=`pwd`:$(kpathsea_dir):$(kpathsea_srcdir):$$PATH \
+       -PATH="`pwd`:$(kpathsea_dir):$(kpathsea_srcdir):$$PATH" \
          WEB2C=$(kpathsea_srcdir) TMPDIR=.. \
          ./tex --progname=tex '\nonstopmode\font\foo=nonesuch\end'
 clean:: tex-clean
==============================================================

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index