initscript: completely broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysfsutils (Debian) |
Fix Released
|
Unknown
|
|||
sysfsutils (Ubuntu) |
Invalid
|
High
|
Martin Pitt |
Bug Description
Automatically imported from Debian bug report #341060 http://
Debian Bug Importer (debzilla) wrote : | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Message-ID: <email address hidden>
Date: Mon, 28 Nov 2005 00:22:57 -0200
From: Henrique de Moraes Holschuh <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: initscript: completely broken
Package: sysfsutils
Version: 1.3.0-3
Severity: grave
Justification: renders package unusable
if [ "$f1" ] ;... is NOT valid shell syntax. Nor is [ ... -a "$f2" ].
You're missing a "-n" in front of all bare string tests inside [ ].
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.
Locale: LANG=pt_
Versions of packages sysfsutils depends on:
ii libc6 2.3.5-8.1 GNU C Library: Shared libraries an
ii libsysfs1 1.3.0-3 interface library to sysfs
sysfsutils recommends no packages.
-- no debconf information
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Martin Pitt (pitti) wrote : | #3 |
This is really a bogus report; I track it in Debian as normal
severity/
In Debian Bug tracker #341060, Martin Pitt (pitti) wrote : Re: Bug#341060: initscript: completely broken | #4 |
severity 341060 normal
tag 341060 unreproducible moreinfo
thanks
Hi Henrique!
Henrique de Moraes Holschuh [2005-11-28 0:22 -0200]:
> Package: sysfsutils
> Version: 1.3.0-3
> Severity: grave
> Justification: renders package unusable
>
> if [ "$f1" ] ;... is NOT valid shell syntax. Nor is [ ... -a "$f2" ].
> You're missing a "-n" in front of all bare string tests inside [ ].
The script runs fine with bash and dash, and [ "$foo" ] is common
practice and described in test(1):
-n STRING
the length of STRING is nonzero
STRING equivalent to -n STRING
Downgrading severity since this runs fine at least on the majority of
installations.
So what exactly breaks for you? According to your initial report you
have /bin/sh linked to /bin/bash, do you use another shell?
Please give me the output of sh -nx /etc/init.
really breaks for you.
Thanks,
Martin
--
Martin Pitt http://
Ubuntu Developer http://
Debian Developer http://
In a world without walls and fences, who needs Windows and Gates?
Debian Bug Importer (debzilla) wrote : | #5 |
Message-ID: <email address hidden>
Date: Mon, 28 Nov 2005 12:42:46 +0100
From: Martin Pitt <email address hidden>
To: Henrique de Moraes Holschuh <email address hidden>,
<email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#341060: initscript: completely broken
--pvezYHf7grwyp3Bc
Content-Type: text/plain; charset=us-ascii
Content-
Content-
severity 341060 normal
tag 341060 unreproducible moreinfo
thanks
Hi Henrique!
Henrique de Moraes Holschuh [2005-11-28 0:22 -0200]:
> Package: sysfsutils
> Version: 1.3.0-3
> Severity: grave
> Justification: renders package unusable
>=20
> if [ "$f1" ] ;... is NOT valid shell syntax. Nor is [ ... -a "$f2" ].
> You're missing a "-n" in front of all bare string tests inside [ ].
The script runs fine with bash and dash, and [ "$foo" ] is common
practice and described in test(1):
-n STRING
the length of STRING is nonzero
STRING equivalent to -n STRING
Downgrading severity since this runs fine at least on the majority of
installations.
So what exactly breaks for you? According to your initial report you
have /bin/sh linked to /bin/bash, do you use another shell?
Please give me the output of sh -nx /etc/init.
really breaks for you.
Thanks,
Martin
--=20
Martin Pitt http://
Ubuntu Developer http://
Debian Developer http://
In a world without walls and fences, who needs Windows and Gates?
--pvezYHf7grwyp3Bc
Content-Type: application/
Content-
Content-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDiu01Dec
MUn7OiXdndrxkEc
=w8DD
-----END PGP SIGNATURE-----
--pvezYHf7grwyp
In Debian Bug tracker #341060, Henrique de Moraes Holschuh (hmh) wrote : | #6 |
severity 341060 grave
thanks
(I am setting it back to grave so that apt-listbugs warns people off until
an upload fixing the bug hits the archive. See the rest of the email).
On Mon, 28 Nov 2005, Martin Pitt wrote:
> The script runs fine with bash and dash, and [ "$foo" ] is common
Well, here it broke with bash from sid depending on the values of $foo,
which is probably why you could not reproduce it.
> practice and described in test(1:
>
> -n STRING
> the length of STRING is nonzero
>
> STRING equivalent to -n STRING
Braindamaged common practice, that one is. If with "-<something test
recognizes>" the string is, stupid things test will do.
Never use naked strings with test, it is courting an error mode. I *think*
it is smart enough not to croak if you [ "$string" ], but it will on [
"$string" -a something -a "$string2" ]...
In this case it barfs when some of the strings are "-1", see attached error
dump.
Try this:
a=1 ; b=-1 ; [ -n "$a" -a "$b" ] && echo ok
Interestingly enough,
a=1 ; b=-1 ; [ "$a" -a "$b" ] && echo ok
won't croak. This is bash trying to be smart, as
a=1 ; b=-1 ; /usr/bin/[ "$a" -a "$b" ] && echo ok
WILL croak.
> Please give me the output of sh -nx /etc/init.
> really breaks for you.
"if it really breaks"? I'd have worded that request very differently, the
way you did is not nice at all. I hope you did so because of the @d.o
address, and would not write something like that to a regular user.
Output attached, and sysfs.conf attached too. BTW, "-nx" gives no output, I
ran it with -x only.
also, just for completeness:
khazad-dum:/etc# ls -lad /bin/sh
lrwxrwxrwx 1 root root 4 Oct 14 19:47 /bin/sh -> bash
and
khazad-dum:/etc# head -n 1 /etc/init.
#! /bin/sh -e
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
Debian Bug Importer (debzilla) wrote : | #7 |
Message-ID: <email address hidden>
Date: Tue, 29 Nov 2005 10:39:00 -0200
From: Henrique de Moraes Holschuh <email address hidden>
To: Martin Pitt <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#341060: initscript: completely broken
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-
severity 341060 grave
thanks
(I am setting it back to grave so that apt-listbugs warns people off until
an upload fixing the bug hits the archive. See the rest of the email).
On Mon, 28 Nov 2005, Martin Pitt wrote:
> The script runs fine with bash and dash, and [ "$foo" ] is common
Well, here it broke with bash from sid depending on the values of $foo,
which is probably why you could not reproduce it.
> practice and described in test(1:
>
> -n STRING
> the length of STRING is nonzero
>
> STRING equivalent to -n STRING
Braindamaged common practice, that one is. If with "-<something test
recognizes>" the string is, stupid things test will do.
Never use naked strings with test, it is courting an error mode. I *think*
it is smart enough not to croak if you [ "$string" ], but it will on [
"$string" -a something -a "$string2" ]...
In this case it barfs when some of the strings are "-1", see attached error
dump.
Try this:
a=1 ; b=-1 ; [ -n "$a" -a "$b" ] && echo ok
Interestingly enough,
a=1 ; b=-1 ; [ "$a" -a "$b" ] && echo ok
won't croak. This is bash trying to be smart, as
a=1 ; b=-1 ; /usr/bin/[ "$a" -a "$b" ] && echo ok
WILL croak.
> Please give me the output of sh -nx /etc/init.
> really breaks for you.
"if it really breaks"? I'd have worded that request very differently, the
way you did is not nice at all. I hope you did so because of the @d.o
address, and would not write something like that to a regular user.
Output attached, and sysfs.conf attached too. BTW, "-nx" gives no output, I
ran it with -x only.
also, just for completeness:
khazad-dum:/etc# ls -lad /bin/sh
lrwxrwxrwx 1 root root 4 Oct 14 19:47 /bin/sh -> bash
and
khazad-dum:/etc# head -n 1 /etc/init.
#! /bin/sh -e
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-
#
# /etc/sysfs.conf - Configuration file for setting sysfs attributes.
#
# The sysfs mount directory is automatically prepended to the attribute paths.
#
# Examples:
#
# Always use the powersave CPU frequency governor
# devices/
#
# Use userspace CPU frequency governor and set initial speed
# devices/
# devices/
##
## ADM-1027 temperature monitor / fan controller
##
# Device setup (maybe overriden later by /etc/sensors.conf)
# Generated using sensors.conf, look there.
class/i2c-
class/i2c-
In Debian Bug tracker #341060, Martin Pitt (pitti) wrote : Bug#341060: fixed in sysfsutils 1.3.0-4 | #8 |
Source: sysfsutils
Source-Version: 1.3.0-4
We believe that the bug you reported is fixed in the latest version of
sysfsutils, which is due to be installed in the Debian FTP archive:
libsysfs-
to pool/main/
libsysfs1-
to pool/main/
libsysfs1_
to pool/main/
sysfsutils_
to pool/main/
sysfsutils_
to pool/main/
sysfsutils_
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Martin Pitt <email address hidden> (supplier of updated sysfsutils package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 2 Dec 2005 17:13:53 +0100
Source: sysfsutils
Binary: libsysfs1-udeb sysfsutils libsysfs1 libsysfs-dev
Architecture: source i386
Version: 1.3.0-4
Distribution: unstable
Urgency: low
Maintainer: Martin Pitt <email address hidden>
Changed-By: Martin Pitt <email address hidden>
Description:
libsysfs-dev - interface library to sysfs - development files
libsysfs1 - interface library to sysfs
libsysfs1-udeb - interface library to sysfs (udeb)
sysfsutils - sysfs query tool and boot-time setup
Closes: 341060
Changes:
sysfsutils (1.3.0-4) unstable; urgency=low
.
* debian/
- Use -n "$variable" instead of naked "$variable" in test invocations
since the latter breaks with values that start with a dash.
- Thanks to Henrique de Moraes Holschuh for making me aware of this issue.
- Closes: #341060
Files:
f43eae0157ff9f
1120ecd1f1403e
9a91609da435f4
27a14365f1c109
b5e08ef03fc476
e84042d537ec95
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDkHd+
yWSrah42R5I3MVs
=H0m3
-----END PGP SIGNATURE-----
Debian Bug Importer (debzilla) wrote : | #9 |
Message-Id: <email address hidden>
Date: Fri, 02 Dec 2005 08:47:10 -0800
From: Martin Pitt <email address hidden>
To: <email address hidden>
Subject: Bug#341060: fixed in sysfsutils 1.3.0-4
Source: sysfsutils
Source-Version: 1.3.0-4
We believe that the bug you reported is fixed in the latest version of
sysfsutils, which is due to be installed in the Debian FTP archive:
libsysfs-
to pool/main/
libsysfs1-
to pool/main/
libsysfs1_
to pool/main/
sysfsutils_
to pool/main/
sysfsutils_
to pool/main/
sysfsutils_
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Martin Pitt <email address hidden> (supplier of updated sysfsutils package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 2 Dec 2005 17:13:53 +0100
Source: sysfsutils
Binary: libsysfs1-udeb sysfsutils libsysfs1 libsysfs-dev
Architecture: source i386
Version: 1.3.0-4
Distribution: unstable
Urgency: low
Maintainer: Martin Pitt <email address hidden>
Changed-By: Martin Pitt <email address hidden>
Description:
libsysfs-dev - interface library to sysfs - development files
libsysfs1 - interface library to sysfs
libsysfs1-udeb - interface library to sysfs (udeb)
sysfsutils - sysfs query tool and boot-time setup
Closes: 341060
Changes:
sysfsutils (1.3.0-4) unstable; urgency=low
.
* debian/
- Use -n "$variable" instead of naked "$variable" in test invocations
since the latter breaks with values that start with a dash.
- Thanks to Henrique de Moraes Holschuh for making me aware of this issue.
- Closes: #341060
Files:
f43eae0157ff9f
1120ecd1f1403e
9a91609da435f4
27a14365f1c109
b5e08ef03fc476
e84042d537ec95
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDkHd+
yWSrah42R5I3MVs
=H0m3
-----END PGP SIGNATURE-----
Automatically imported from Debian bug report #341060 http:// bugs.debian. org/341060