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

Bug#288616: marked as done (use of ">" in tetex postinst errors for sites using bash noclobber)



Your message dated Sat, 27 Aug 2005 22:37:57 +0200
with message-id <87psrz86ai.fsf@alhambra.kuesterei.ch>
and subject line Bug#288616: use of ">" in tetex postinst errors for sites using bash noclobber
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; 4 Jan 2005 17:37:01 +0000
>From george@galis.org Tue Jan 04 09:37:01 2005
Return-path: <george@galis.org>
Received: from sta.galis.org [66.250.170.210] 
	by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
	id 1Clsc8-00068H-00; Tue, 04 Jan 2005 09:37:00 -0800
Received: (qmail 26344 invoked by uid 2000); 4 Jan 2005 17:36:59 -0000
From: "George Georgalis" <george@galis.org>
Date: Tue, 4 Jan 2005 12:36:59 -0500
To: submit@bugs.debian.org
Subject: use of ">" in tetex postinst errors for sites using bash noclobber
Message-ID: <20050104173659.GB24751@sta.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(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_2005_01_02
X-Spam-Level: 

Package: tetex-base
Version 2.0.2c-3
 unstable from backports.org

The use of the noclobber bash option is akin to aliasing "-i" with the
rm, cp and mv commands. It will stop a redirect to a file if that file
already exists. I don't see anything in the debian policy that says root
should not use this option in ~/.bashrc.

Apparently the tetex postinst programs use > to write to a temp file,
just after it was created. and the postinst script fails if root has
"set -o noclobber" in his .bashrc

This and umask problems come up fairly often with deb updates. (sorry,
lost orig timestamp)

/var/lib/dpkg/info/tetex-base.postinst.orig 2005-01-04 12:22:58.000000000 -0500
+++ /var/lib/dpkg/info/tetex-base.postinst      2005-01-04 12:22:58.000000000 -0500
@@ -109,7 +109,7 @@
   fi
   # now look for the missing comment sign
   tempfile=`mktemp`
-  sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT > $tempfile
+  sed 's@^\(For use with ngerman\)@\% \1@' < $CUR_LDAT >>$tempfile
   chown --reference=$CUR_LDAT $tempfile
   chmod --reference=$CUR_LDAT $tempfile
   mv $tempfile $CUR_LDAT

In this case I think this is all that's required, but my systems with
tetex on them are already upgraded <sigh>.

Thanks for including umask in the script!

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org

---------------------------------------
Received: (at 288616-done) by bugs.debian.org; 27 Aug 2005 20:38:00 +0000
>From frank@kuesterei.ch Sat Aug 27 13:38:00 2005
Return-path: <frank@kuesterei.ch>
Received: from idmailgate1.unizh.ch [130.60.127.100] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E97RA-0000XG-00; Sat, 27 Aug 2005 13:38:00 -0700
Received: from localhost.localdomain ([130.60.169.214])
	by idmailgate1.unizh.ch (8.13.1/8.13.1/SuSE Linux 0.7) with ESMTP id j7RKbvfm010718;
	Sat, 27 Aug 2005 22:37:58 +0200
Received: from localhost
	([127.0.0.1] helo=localhost.localdomain ident=frank)
	by localhost.localdomain with esmtp (Exim 4.50)
	id 1E97R7-00085w-Nu; Sat, 27 Aug 2005 22:37:57 +0200
To: George Georgalis <george@galis.org>
Cc: 288616-done@bugs.debian.org
Subject: Re: Bug#288616: use of ">" in tetex postinst errors for sites using
 bash noclobber
X-Attribution: fant
X-Ehrenamt: http://www.langau.de
In-Reply-To: <20050717203740.GK2524@preusse> (Hilmar Preusse's message of
 "Sun, 17 Jul 2005 22:37:40 +0200")
References: <20050104173659.GB24751@sta.local>
	<20050105102524.GB1429@preusse-16223.user.cis.dfn.de>
	<20050108035221.GB8709@sta.local> <20050108041216.GC8709@sta.local>
	<87pt0dcsvp.fsf@alhambra.bioz.unibas.ch>
	<20050113150930.GB21044@sta.local>
	<87mzvd71ap.fsf@alhambra.bioz.unibas.ch>
	<20050717203740.GK2524@preusse>
From: =?iso-8859-1?q?Frank_K=FCster?= <frank@kuesterei.ch>
Date: Sat, 27 Aug 2005 22:37:57 +0200
Message-ID: <87psrz86ai.fsf@alhambra.kuesterei.ch>
User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: by amavisd-new
Delivered-To: 288616-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Hilmar Preusse <hille42@web.de> wrote:

> On 13.01.05 Frank K=FCster (frank@kuesterei.ch) wrote:
>> "George Georgalis" <george@galis.org> wrote:
>> > On Mon, Jan 10, 2005 at 02:31:54PM +0100, Frank K?ster wrote:
>> >>"George Georgalis" <george@galis.org> wrote:
>
> Hi George,
>
>> >>> http://bugs.debian.org/275140
>> >>>
>>=20
>> Do you think that the postinst scripts are run with a login shell, or do
>> you believe it? If you believe it, please give us some
>> evidence. For example, put some echo command into ~/.bash_profile which
>> is read by every login shell (we're speaking about bash, aren't we?) and
>> show us that it is echoed when you do dpkg-reconfigure.
>>=20
>> If it turns out that it does echo the message, we have to strace the
>> call and look which files are actuall read. If again it turns out that
>> it is not due to some misconfiguration on your system, but that dpkg
>> calls it as a login shell, this is a bug in dpkg.
>>=20
>> > I did find an exported BASH_ENV (which I don't normally use) in
>> > ~root/.profile I did check before, but somehow I missed it.
>>=20
>> So you mean this is the cause of the behavior you observed?
[...]
>> > It would seem the apt-get/dpkg process invokes tetex.postinst as a log=
in
>> > shell, because of the noclobber error creating the temp file -- feel
>> > free to correct me on this and I'll go away.
>>=20
>> I have no indication that it does invoke it as a login shell, except
>> that you report a problem with your noclobber setting. But it also seems
>> that you didn't completely understand the startup behavior of bash (I
>> also have to look it up always), so probably it *is* just a
>> misconfiguration?=20
[...]
> Frank K=FCster asked you some questions half a year ago, but you never
> reacted. Do still intend to help us to track down the problem?=20=20

Again no reaction for a couple of weeks.  There is no bug in tetex-bin,
and I guess nowhere at all.

Regars, Frank
--=20
Frank K=FCster
Inst. f. Biochemie der Univ. Z=FCrich
Debian Developer



Reply to: