On Sat, 23 May 2009 01:19:41 -0500
Raphael Geissert <atom...@gmail.com> wrote:

> > > > possible bashism in ./usr/share/emdebian-tools/update-rc.d line 35
> > > > (unsafe echo with backslash):
> > > >   echo "update-rc.d: $initd/$bn: file does not exist\n"
> >
> > I'm afraid you've been misled. That file is in /usr/share/ because it
> > is "in storage" for placement into the Emdebian Crush root filesystem,
> > it is not for use within Debian at all. (If someone really wants to use
> > it on their Debian box, that's their own problem, not mine.)
> 
> Although it is not the goal of this report, it might be interesting to 
> discuss 
> it in devel and see if there's a more appropriate place for such kind of 
> files.

More likely, dpkg-vendor support will be utilised to make one of the
Emdebian cross-built packages provide the script directly and then it
won't need to be in Debian at all. (Or if it is, it would only exist in
the source package and only be put into a binary package when the
appropriate dpkg-vendor is set.)

> > > 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.
> >
> > Not when the contents root filesystem is dictated by the
> > emdebian-rootfs package - there is no release goal for dash in Emdebian.
> 
> Dash is the default /bin/sh in Emdebian, right?

No. busybox ash is the default /bin/sh in Emdebian Crush.

Neither dash nor bash are guaranteed to exist in Crush, so
checkbashisms isn't really suitable for our tests.

> > I'll probably fix the script later but, for the benefit of the bug
> > report, I thought I'd explain why I'm lowering severity and removing
> > the usertags. This script has nothing to do with any Debian release
> > goals, it's an Emdebian replacement for the Debian release goal script.
> 
> Thanks for spending some time to explain it, I appreciate it.

As it turns out, the "fix" is trivial - just removed the \n and added a
blank echo call.

--- update-rc.d (revision 6327)
+++ update-rc.d (working copy)
@@ -32,7 +32,8 @@
        exit 1
 fi
 if [ ! -f "$initd/$bn" ]; then
-       echo "update-rc.d: $initd/$bn: file does not exist\n"
+       echo "update-rc.d: $initd/$bn: file does not exist"
+       echo
        exit 1
 fi
 if [ "$1" = 'remove' ]; then

No point keeping the bug report around for something like that. I'll
put that fix in.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp8pvPfPeTP8.pgp
Description: PGP signature

Reply via email to