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

Bug#219156: marked as done (texconfig script should use IFS safely)



Your message dated Sat, 4 Dec 2010 16:45:55 +0100
with message-id <20101204154555.GA14196@preusse-16223.user.cis.dfn.de>
and subject line Re: Bug#219156: tetex-bin: postinst script fails to run texconfig under dash
has caused the Debian Bug report #219156,
regarding texconfig script should use IFS safely
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
219156: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=219156
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tetex-bin
Version: 2.0.2-5
Severity: normal
Tags: patch

"texconfig init" fails when called by tetex-bin.postinst, run under ash/dash.
There is no problem when /bin/sh points to bash.

The problem occurs in the check_environ() procedure while parsing $envvars,
and seems to be caused by the variable contents split on multiple lines
(contains embedded "newline"). 

IFS is changed by the postinst script not to include "newline" before
texconfig is called. bash and dash seem to behave differently on word
expansion wrt IFS (dunno which one is posixly correct ;)
  
A simple patch to save/restore IFS in the postinst script seemed to cure
the problem (note that texconfig does the same) :

--- tetex-bin.postinst~	2003-10-24 02:51:24.000000000 +0200
+++ tetex-bin.postinst	2003-11-04 17:41:04.000000000 +0100
@@ -176,6 +176,7 @@
       (cd ${LDATD} ; ln -s ${LDAT} .)
     fi
       db_get tetex-bin/hyphen || true
+      OIFS=$IFS
       IFS=' ,'
       lang="$RET"
       for l in $lang; do
@@ -195,6 +196,7 @@
 	*) sed -e "s/%! $l/$l/" $LDAT > $LDAT_$$; mv $LDAT_$$ $LDAT ;;
         esac
       done
+      IFS=$OIFS
 else
     if [ -f ${ELDAT} ]; then
 	rm -f ${LDATD}/language.dat

Thanks
-- 
Michel Casabona


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux agenor 2.6.0-test9-1-386 #1 Sun Oct 26 22:32:52 EST 2003 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages tetex-bin depends on:
ii  debconf                      1.3.20      Debian configuration management sy
ii  debianutils                  2.6         Miscellaneous utilities specific t
ii  dpkg                         1.10.18     Package maintenance system for Deb
ii  ed                           0.2-20      The classic unix line editor
ii  libc6                        2.3.2.ds1-9 GNU C Library: Shared libraries an
ii  libgcc1                      1:3.3.2-3   GCC support library
ii  libkpathsea3                 2.0.2-5     path search library for teTeX (run
ii  libpng12-0                   1.2.5.0-4   PNG library - runtime
ii  libstdc++5                   1:3.3.2-3   The GNU Standard C++ Library v3
ii  libwww-ssl0 [libwww0]        5.4.0-9     The W3C-WWW library (SSL support)
ii  libxaw7                      4.2.1-13    X Athena widget set library
ii  mime-support                 3.23-1      MIME files 'mime.types' & 'mailcap
ii  perl                         5.8.1-4     Larry Wall's Practical Extraction 
ii  t1lib1                       1.3.1-3     Type 1 font rasterizer library - r
ii  tetex-base                   2.0.2-5     Basic library files of teTeX
ii  xlibs                        4.2.1-13    X Window System client libraries
ii  zlib1g                       1:1.1.4-16  compression library - runtime

-- debconf information:
* tetex-bin/upd_map: true
* tetex-bin/cnf_name: 
* tetex-bin/fmtutil: true
* tetex-bin/userperm: false
* tetex-bin/texmf: true
* tetex-bin/hyphen: 
  tetex-bin/oldcfg: true
* tetex-bin/use_debconf: true
* tetex-bin/groupname: users
* tetex-bin/groupperm: true
* tetex-bin/lsr-perms: true

-- contents of tempfile left by txconfig when it fails:
texconfig has found the following environment variables set:

 
AFMFONTS = $
AFMFONTS
 GFFONTS
GLYPHFONTS = 
GLYPHFONTS
 MPMEMS
MPPOOL = 
MPPOOL
 OVPFONTS
PKFONTS = 
PKFONTS
 TEXFONTMAPS
TEXFONTS = 
TEXFONTS
 TEXMFINI
TEXPICTS = 
TEXPICTS
 VFFONTS
XDVIFONTS = 
XDVIFONTS
 XDVIVFS
 = 


This path prohibits a default expansion. as it contains no : at either
end, nor :: somewhere in the middle.  Please make sure, that these paths
are ok, and otherwise change or unset them.  If you continue with wrong
values for the above variables, texconfig might run into trouble when
locating files on the disk.

Note that you can refer to the default path by giving an "empty" path
component (i.e. a colon in front or in the end, or a doubled colon
somewhere in the middle).

If you set TEXINPUTS, e.g. to :~/TeX/macros, (La)TeX will search along
the default path and then in ~/TeX/macros.

For more information, see the Kpathsea and the teTeX manual.

Press RETURN to continue (or Control-C to abort)... 

-- trace of failing piece of code in texinfo, using dash:
:/tmp# /var/lib/dpkg/info/tetex-bin.postinst configure 2.0.2-5
Regenerating /var/lib/texmf/web2c/texmf.cnf ... done
Regenerating /var/lib/texmf/web2c/fmtutil.cnf ... done
Regenerating /var/lib/texmf/web2c/updmap.cfg ... done
Running initex. This may take some time. ...
+ found=
+ eval var="$
AFMFONTS"
+ var=$
AFMFONTS
+ [ ! -z $
AFMFONTS ]
+ found= 
AFMFONTS
+ eval var="$BIBINPUTS"
+ var=
+ [ ! -z  ]
+ eval var="$BSTINPUTS"
+ var=
+ [ ! -z  ]
+ eval var="$DVILJFONTS"
+ var=
+ [ ! -z  ]
+ eval var="$DVIPSFONTS"
+ var=
+ [ ! -z  ]
+ eval var="$DVIPSHEADERS"
+ var=
+ [ ! -z  ]
+ eval var="$GFFONTS
GLYPHFONTS"
+ var=
GLYPHFONTS
+ [ ! -z 
GLYPHFONTS ]
+ found= 
AFMFONTS GFFONTS
GLYPHFONTS
+ eval var="$INDEXSTYLE"

-- same, using bash:
/tmp# /var/lib/dpkg/info/tetex-bin.postinst configure 2.0.2-5
Regenerating /var/lib/texmf/web2c/texmf.cnf ... done
Regenerating /var/lib/texmf/web2c/fmtutil.cnf ... done
Regenerating /var/lib/texmf/web2c/updmap.cfg ... done
Running initex. This may take some time. ...
+ found=
+ eval 'var="$AFMFONTS"'
++ var=
+ '[' '!' -z '' ']'
+ eval 'var="$BIBINPUTS"'
++ var=
+ '[' '!' -z '' ']'




--- End Message ---
--- Begin Message ---
Version: 2007-1

On 04.11.03 Michel Casabona (michel.casabona@free.fr) wrote:

> Package: tetex-bin
> Version: 2.0.2-5
> Severity: normal
> Tags: patch
> 
> "texconfig init" fails when called by tetex-bin.postinst, run under ash/dash.
> There is no problem when /bin/sh points to bash.
> 
> The problem occurs in the check_environ() procedure while parsing $envvars,
> and seems to be caused by the variable contents split on multiple lines
> (contains embedded "newline"). 
> 
I couldn't reproduce the issue using TeX Live 2007.

I did:
- removed /bin/sh, replaced it by a pointer to /bin/bash
- started eterm, became root in it
- started a dash in my root shell, run "texconfig init"

Everything worked fine. I assume that the problem is solved, yes the
variable IFS hat that magic value ' \t\n' in the shell starting
texconfig.

-> Closing. If you disagree call back.

Hilmar
-- 
sigmentation fault


--- End Message ---

Reply to: