Debian Bug report logs - #530126
live-helper: bashism in /bin/sh script

version graph

Package: live-helper; Maintainer for live-helper is Debian Live Project <debian-live@lists.debian.org>;

Reported by: Raphael Geissert <atomo64@gmail.com>

Date: Sat, 23 May 2009 06:06:20 UTC

Severity: important

Found in version live-helper/1.0.4-1

Fixed in version 1.0.5-1

Done: Daniel Baumann <daniel@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Debian Live <debian-live@lists.debian.org>:
Bug#530126; Package live-helper. (Sat, 23 May 2009 06:06:23 GMT) Full text and rfc822 format available.

Message #3 received at maintonly@bugs.debian.org (full text, mbox):

From: Raphael Geissert <atomo64@gmail.com>
To: maintonly@bugs.debian.org
Subject: live-helper: bashism in /bin/sh script
Date: Sat, 23 May 2009 00:56:56 -0500
Package: live-helper
Severity: important
Version: 1.0.4-1
User: debian-release@lists.debian.org
Usertags: goal-dash

Hello maintainer,

While performing an archive wide checkbashisms (from the 'devscripts' package)
check I've found your package containing a /bin/sh script making use
of a bashism.

checkbashisms' output:
> possible bashism in ./etc/cron.daily/live-helper line 38
> ($HOST(TYPE|NAME)):
> echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin daily
> build." >> /var/log/live
> possible bashism in ./etc/cron.daily/live-helper line 154
> ($HOST(TYPE|NAME)):
> echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end daily build."
> >> /var/log/live


Not using bash (or a Debian Policy conformant shell interpreter which doesn't
provide such an extra feature) as /bin/sh is likely to lead to errors or
unexpected behaviours.
Please be aware that although bash is currently the default /bin/sh there was
a release goal for Lenny to make dash the default /bin/sh[1], and has been
proposed for squeeze as well[2].

If you want more information about dash as /bin/sh, you can read:
http://lists.debian.org/debian-release/2008/01/msg00189.html

For more information supporting this goal please refer to Debian Policy,
section 10.4, at:
http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

Hints about how to fix bashisms:
Sometimes these bugs are already fixed in Ubuntu, look at the PTS.
If not already fixed you can read:
https://wiki.ubuntu.com/DashAsBinSh

If you still don't know how to fix the bashisms don't hesitate to reply to
this email, or tag the bug as 'help'.

[1]http://release.debian.org/lenny/goals.txt
[2]http://lists.debian.org/debian-release/2009/04/msg00133.html

Thank you,
Raphael Geissert




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live@lists.debian.org>:
Bug#530126; Package live-helper. (Mon, 08 Jun 2009 05:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel@debian.org:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live@lists.debian.org>. (Mon, 08 Jun 2009 05:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 530126@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 530126@bugs.debian.org
Subject: Re: live-helper: bashism in /bin/sh script
Date: Mon, 08 Jun 2009 07:25:19 +0200
tags 530126 +pending
thanks

This has been fixed in git some weeks ago already.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Tags added: pending Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Mon, 08 Jun 2009 05:30:06 GMT) Full text and rfc822 format available.

Reply sent to daniel@debian.org:
You have taken responsibility. (Sun, 14 Jun 2009 14:48:04 GMT) Full text and rfc822 format available.

Notification sent to Raphael Geissert <atomo64@gmail.com>:
Bug acknowledged by developer. (Sun, 14 Jun 2009 14:48:05 GMT) Full text and rfc822 format available.

Message #15 received at 530126-done@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 530126-done@bugs.debian.org
Date: Sun, 14 Jun 2009 16:45:58 +0200
Version: 1.0.5-1

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Bug marked as found in version 1.0.5-1 and reopened. Request was from Raphael Geissert <geissert@debian.org> to control@bugs.debian.org. (Sun, 05 Jul 2009 18:30:02 GMT) Full text and rfc822 format available.

Reply sent to daniel@debian.org:
You have taken responsibility. (Wed, 08 Jul 2009 12:48:04 GMT) Full text and rfc822 format available.

Notification sent to Raphael Geissert <atomo64@gmail.com>:
Bug acknowledged by developer. (Wed, 08 Jul 2009 12:48:04 GMT) Full text and rfc822 format available.

Message #22 received at 530126-done@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: 530126-done@bugs.debian.org
Subject: Re: live-helper: bashism in /bin/sh script
Date: Wed, 08 Jul 2009 14:33:55 +0200
Version: 1.0.5-1

If you reopen a bug, you should say why you think it's not fixed. I
can't find any bashism in 1.0.5-1 (only a false positive about $HOSTNAME
in debian/live-initramfs.init).

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live@lists.debian.org>:
Bug#530126; Package live-helper. (Wed, 08 Jul 2009 18:06:07 GMT) Full text and rfc822 format available.

Message #25 received at 530126@bugs.debian.org (full text, mbox):

From: Raphael Geissert <geissert@debian.org>
To: 530126@bugs.debian.org
Subject: Re: live-helper: bashism in /bin/sh script
Date: Wed, 8 Jul 2009 12:59:14 -0500
On Wednesday 08 July 2009 07:33:55 Daniel Baumann wrote:
> Version: 1.0.5-1
>
> If you reopen a bug, you should say why you think it's not fixed. I
> can't find any bashism in 1.0.5-1

I'm still seeing the same bashisms I originally reported (I'll let you reopen 
the report to avoid BTS ping-pong):

Processing Deb/mirror/pool/main/l/live-helper/live-helper_1.0.5-1_all.deb...
possible bashism in ./etc/cron.daily/live-helper line 38 ($HOST(TYPE|NAME)):
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin daily build." 
>> /var/log/live
possible bashism in ./etc/cron.daily/live-helper line 154 ($HOST(TYPE|NAME)):
echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end daily build." 
>> /var/log/live
done

The only file being sourced by that cron script 
is /etc/default/live-helper_autobuild, which doesn't contain a definition of 
HOSTNAME.

> (only a false positive about $HOSTNAME in debian/live-initramfs.init).

Are you sure? for -initramfs (1.157.2-1) what I get is:
possible bashism in ./etc/init.d/live-initramfs line 164 (echo -e):
                echo -n -e "\n\n${MESSAGE} and press ENTER to continue:" 
> /dev/console

You can use the following script to check a package for bashisms (it is very 
similar to the one I use on my archive-wide checks), it takes one or more 
file names as parameters: 
http://git.debian.org/?p=users/atomo64-guest/misc-devscripts.git;a=blob;f=checkbashisms-in-package.sh;hb=HEAD

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live@lists.debian.org>:
Bug#530126; Package live-helper. (Wed, 08 Jul 2009 19:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to daniel@debian.org:
Extra info received and forwarded to list. Copy sent to Debian Live <debian-live@lists.debian.org>. (Wed, 08 Jul 2009 19:09:02 GMT) Full text and rfc822 format available.

Message #30 received at 530126@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: Raphael Geissert <geissert@debian.org>, 530126@bugs.debian.org
Subject: Re: Bug#530126: live-helper: bashism in /bin/sh script
Date: Wed, 08 Jul 2009 20:58:47 +0200
Raphael Geissert wrote:
> Processing Deb/mirror/pool/main/l/live-helper/live-helper_1.0.5-1_all.deb...
> possible bashism in ./etc/cron.daily/live-helper line 38 ($HOST(TYPE|NAME)):
> echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin daily build." 
>>> /var/log/live
> possible bashism in ./etc/cron.daily/live-helper line 154 ($HOST(TYPE|NAME)):
> echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end daily build." 
>>> /var/log/live
> done

that one is fixed in git now.

>> (only a false positive about $HOSTNAME in debian/live-initramfs.init).
> 
> Are you sure? for -initramfs (1.157.2-1) what I get is:
> possible bashism in ./etc/init.d/live-initramfs line 164 (echo -e):
>                 echo -n -e "\n\n${MESSAGE} and press ENTER to continue:" 
>> /dev/console

this has been fixed in git weeks ago.

> You can use the following script to check a package for bashisms (it is very 
> similar to the one I use on my archive-wide checks), it takes one or more 
> file names as parameters: 
> http://git.debian.org/?p=users/atomo64-guest/misc-devscripts.git;a=blob;f=checkbashisms-in-package.sh;hb=HEAD

we use checkbashism for more than a year in the test target of the
makefiles, but thanks.

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Bug No longer marked as found in versions live-helper/1.0.5-1. Request was from Daniel Baumann <daniel@debian.org> to control@bugs.debian.org. (Wed, 24 Mar 2010 04:57:06 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 21 Apr 2010 07:33:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 23:40:09 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.