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

Bug#275140: marked as done (tetex-base: installation fails if "noclobber" is set)



Your message dated Sat, 9 Oct 2004 23:42:05 -0500
with message-id <20041010044205.GB27021@math.uchicago.edu>
and subject line close: user misconfiguration
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 6 Oct 2004 07:27:27 +0000
>From nbarth@beatrice.nbarth.net Wed Oct 06 00:27:26 2004
Return-path: <nbarth@beatrice.nbarth.net>
Received: from smtp808.mail.sc5.yahoo.com [66.163.168.187] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1CF6Cs-0002wC-00; Wed, 06 Oct 2004 00:27:26 -0700
Received: from unknown (HELO beatrice.nbarth.net) (nilsbarth@sbcglobal.net@68.253.190.58 with login)
  by smtp808.mail.sc5.yahoo.com with SMTP; 6 Oct 2004 07:27:25 -0000
Received: by beatrice.nbarth.net (Postfix, from userid 1000)
	id 2162B3700D; Wed,  6 Oct 2004 02:29:42 -0500 (CDT)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Nils Barth <nbarth@math.uchicago.edu>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: tetex-base: installation fails if "noclobber" is set
X-Mailer: reportbug 2.63
Date: Wed, 06 Oct 2004 02:29:41 -0500
Message-Id: <[🔎] 20041006072942.2162B3700D@beatrice.nbarth.net>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: tetex-base
Version: 2.0.2b-6
Severity: important

The postinst script:
/var/lib/dpkg/info/tetex-base.postinst
fails if you set bash's "noclobber" (say in your .bashrc via set -o noclobber).
(yes, I set noclobber in root's .bashrc -- I'm careful)

This is because it creates temporary files via:
tempfile=`mktemp`
echo hi > $tempfile

(more precisely, via stuff like:
  tempfile=`mktemp`
  sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT > $tempfile
)

If noclobber is set, this'll refuse to overwrite the existing file.

I don't know (and couldn't find) Debian policy on noclobber assumptions
in packaging scripts; however, this hasn't caused problems before
(though I haven't been using Debian long).

I can see 3 resolutions:
1: use >| to force clobbering
2: have "set +o noclobber" in the script to turn off noclobber
3: require folk to not set noclobber in their .bashrc
  (i.e., WONTFIX)
I recall reading something in my Googling about bash treating >| and >
(with noclobber unset) slightly differently, but I'm not sure if this is
an issue here.

Option #1 (use >| to explicitly clobber temporary files) seems the
simplest, safest and most correct (we do want to explicitly clobber it),
and shouldn't break anything.

This seems like a common issue -- is it documented somewhere (in some
packaging guidelines?)?

In any case, this occurs at a few points in 
/var/lib/dpkg/info/tetex-base.postinst
namely lines 103, 111, 141

It also occurs in docbook-dsssl (1.78-5) -- I think it's the same bug (I
get the same "can't overwrite" error, though there it's not used in a
mktemp context, though it probably should be).

Thanks!
-nils

-- Package-specific info:

######################################
 List of ls-R files

-rw-rw-r--  1 root staff 91 2004-10-06 01:43 /usr/local/lib/texmf/ls-R
-rw-rw-r--  1 root users 834 2004-10-06 01:43 /var/lib/texmf/ls-R
lrwxrwxrwx  1 root root 29 2004-10-06 01:41 /usr/share/texmf/ls-R -> /var/lib/texmf/ls-R-TEXMFMAIN

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-386
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages tetex-base depends on:
ii  debconf                       1.4.30.5   Debian configuration management sy
ii  dpkg                          1.10.23    Package maintenance system for Deb
ii  texinfo                       4.7-2.2    Documentation system for on-line i
ii  ucf                           1.09       Update Configuration File: preserv

Versions of packages tetex-bin depends on:
ii  debconf                  1.4.30.5        Debian configuration management sy
ii  debianutils              2.8.4           Miscellaneous utilities specific t
ii  dpkg                     1.10.23         Package maintenance system for Deb
ii  ed                       0.2-20          The classic unix line editor
ii  libc6                    2.3.2.ds1-16    GNU C Library: Shared libraries an
ii  libgcc1                  1:3.4.1-4sarge1 GCC support library
ii  libice6                  4.3.0.dfsg.1-4  Inter-Client Exchange library
ii  libkpathsea3             2.0.2-22        path search library for teTeX (run
ii  libpaper1                1.1.14-0.4      Library for handling paper charact
ii  libpng12-0               1.2.5.0-7       PNG library - runtime
ii  libsm6                   4.3.0.dfsg.1-4  X Window System Session Management
ii  libstdc++5               1:3.3.4-13      The GNU Standard C++ Library v3
ii  libt1-5                  5.0.2-3         Type 1 font rasterizer library - r
ii  libwww0                  5.4.0-9         The W3C WWW library
ii  libx11-6                 4.3.0.dfsg.1-4  X Window System protocol client li
ii  libxaw7                  4.3.0.dfsg.1-4  X Athena widget set library
ii  libxext6                 4.3.0.dfsg.1-4  X Window System miscellaneous exte
ii  libxmu6                  4.3.0.dfsg.1-4  X Window System miscellaneous util
ii  libxt6                   4.3.0.dfsg.1-4  X Toolkit Intrinsics
ii  mime-support             3.28-1          MIME files 'mime.types' & 'mailcap
ii  perl                     5.8.4-2.3       Larry Wall's Practical Extraction 
ii  sed                      4.1.2-1         The GNU sed stream editor
ii  ucf                      1.09            Update Configuration File: preserv
ii  xlibs                    4.3.0.dfsg.1-4  X Window System client libraries m
ii  zlib1g                   1:1.2.1.1-7     compression library - runtime

Versions of packages tetex-extra depends on:
ii  dpkg                      1.10.23        Package maintenance system for Deb
ii  gsfonts                   8.14+v8.11-0.1 Fonts for the Ghostscript interpre
ii  tetex-bin                 2.0.2-22       The teTeX binary files
ii  ucf                       1.09           Update Configuration File: preserv

-- debconf information:
  tetex-bin/updmap-failed:
  tetex-bin/hyphen: french[=patois], ngerman[=naustrian-neue_Rechtschreibung]
  tetex-base/olddat: true
  tetex-bin/oldcfg: true
* tetex-base/fmtutil-failed:
  tetex-base/oldupdm:
  tetex-bin/upd_map: true
  tetex-bin/cnf_name:
  tetex-bin/fmtutil: true
  tetex-base/updmap-failed:
  tetex-bin/use_debconf: false
  tetex-bin/fmtutil-failed:
  tetex-bin/groupname: users
  tetex-bin/userperm: false
  tetex-bin/groupperm: true
  tetex-bin/lsr-perms: true

---------------------------------------
Received: (at 275140-done) by bugs.debian.org; 10 Oct 2004 04:39:29 +0000
>From nbarth@beatrice.nbarth.net Sat Oct 09 21:39:29 2004
Return-path: <nbarth@beatrice.nbarth.net>
Received: from smtp802.mail.sc5.yahoo.com [66.163.168.181] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1CGVUX-0001iH-00; Sat, 09 Oct 2004 21:39:29 -0700
Received: from unknown (HELO beatrice.nbarth.net) (nilsbarth@sbcglobal.net@68.253.190.58 with login)
  by smtp802.mail.sc5.yahoo.com with SMTP; 10 Oct 2004 04:39:29 -0000
Received: by beatrice.nbarth.net (Postfix, from userid 1000)
	id 1636311C8D; Sat,  9 Oct 2004 23:42:06 -0500 (CDT)
Date: Sat, 9 Oct 2004 23:42:05 -0500
From: Nils Barth <nbarth@math.uchicago.edu>
To: 275140-done@bugs.debian.org
Subject: close: user misconfiguration
Message-ID: <20041010044205.GB27021@math.uchicago.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040722i
Delivered-To: 275140-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

This "bug" (post-install script assumes noclobber is unset)
is in fact a valid assumption for scripts to make (as noted
in the previous emails): users shouldn't sent a weird
environment for system scripts.

Thus the fault was on my end, and I've fixed my configuration.

In closing, I mentioned that documentation of this
misunderstanding (don't set anything beyond environment in
BASH_ENV) would be welcome.

salaam,
  -nils



Reply to: