Bug#275186: marked as done (Debian policy is unclear about "noclobber" in (maintainer) scripts)
Your message dated Mon, 08 Nov 2004 20:05:14 +0100
with message-id <87hdo0i2l1.fsf@alhambra.bioz.unibas.ch>
and subject line Debian policy is unclear about "noclobber" in (maintainer) scripts
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 275186-done) by bugs.debian.org; 8 Nov 2004 19:09:43 +0000
>From frank@kuesterei.ch Mon Nov 08 11:09:43 2004
Return-path: <frank@kuesterei.ch>
Received: from idmailgate1.unizh.ch [130.60.68.105]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CREtb-0007XP-00; Mon, 08 Nov 2004 11:09:43 -0800
Received: from alhambra.bioz.unibas.ch ([130.60.169.112])
by idmailgate1.unizh.ch (8.12.10/8.12.10/Debian-2) with ESMTP id iA8J9e8E029840;
Mon, 8 Nov 2004 20:09:41 +0100
Received: from localhost ([127.0.0.1] helo=alhambra.bioz.unibas.ch)
by alhambra.bioz.unibas.ch with esmtp (Exim 3.35 #1 (Debian))
id 1CREpH-0005PM-00; Mon, 08 Nov 2004 20:05:15 +0100
To: 275186-done@bugs.debian.org, 275186-submitter@bugs.debian.org
Subject: Re: Debian policy is unclear about "noclobber" in (maintainer)
scripts
X-Attribution: fant
X-Ehrenamt: http://www.langau.de
From: frank@kuesterei.ch (=?iso-8859-1?q?Frank_K=FCster?=)
Date: Mon, 08 Nov 2004 20:05:14 +0100
Message-ID: <87hdo0i2l1.fsf@alhambra.bioz.unibas.ch>
User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/)
Delivered-To: 275186-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:
Hi,
it seems I mixed up bug numbers last time. The clone of this bug has yet
been closed by the submitter. The question whether there is any policy
problem is also clear: No problem. Therefore I close.
Regards, Frank
--=20
Frank K=FCster
Inst. f. Biochemie der Univ. Z=FCrich
Debian Developer
Reply to: