Bug#424173: freebsd-utils: bash dependencies in shell scripts run by portable shell

2007-05-15 Thread Thorsten Glaser
Package: freebsd-utils
Version: 6.2-3
Severity: important
Tags: patch

A few scripts from freebsd-utils contain calls that are not
pure bourne/posix shell, namely:

[EMAIL PROTECTED]:~ # fgrep -nr 'exec -a' /bin /sbin
  
/bin/mount:17:exec -a mount /lib/freebsd/mount ${args}
/bin/sysctl:29:exec -a sysctl /lib/freebsd/sysctl ${args}
/sbin/route:32:exec -a route /lib/freebsd/route ${cmd} ${args}  /dev/null

This could either be fixed (what is exec -a supposed to do?) or,
possibly better, be worked around by changing the first line of
all these scripts to #!/bin/bash which is installed anyway.


-- System Information:
Debian Release: lenny/sid
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 5.4-1-486
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_US.UTF-8)
Shell: /bin/sh linked to /bin/mksh

Versions of packages freebsd-utils depends on:
ii  freebsd-hackedutils6.1-1 FreeBSD utilities needed for GNU/k
ii  libbsd00.0-1.2+r1710 BSD compatibility library - shared
ii  libc0.12.5-7 GNU C Library: Shared libraries
ii  libfreebsd00.0-5 FreeBSD compatibility library - sh
ii  libgeom0   6.2-1 FreeBSD GEOM library
ii  libkiconv2 6.2-1 FreeBSD kernel side iconv library
ii  libkvm06.2-1 FreeBSD kvm (kernel memory interfa

freebsd-utils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#424173: freebsd-utils: bash dependencies in shell scripts run by portable shell

2007-05-15 Thread Cyril Brulebois
Thorsten Glaser [EMAIL PROTECTED] (15/05/2007):
 This could either be fixed (what is exec -a supposed to do?)

Quoting bash.1:
| If -a is supplied, the shell passes name as the zeroth argument to the
| executed command.

 or, possibly better, be worked around by changing the first line of
 all these scripts to #!/bin/bash which is installed anyway.

IMHO fixing is better than workarounding. Using a bash shebang would add
an (otherwise) unnecessary Depends:, and having POSIX-compliant scripts
sounds *much* better to me. Maybe checkbashisms (from devscripts) can
help find more problems like that.

Cheers,

-- 
Cyril Brulebois


pgpWB5b7e0zHL.pgp
Description: PGP signature


Bug#424173: freebsd-utils: bash dependencies in shell scripts run by portable shell

2007-05-15 Thread Martin Michlmayr
* Thorsten Glaser [EMAIL PROTECTED] [2007-05-15 20:34]:
 Package: freebsd-utils

Please report this to the mailing list.  This package isn't in Debian.
-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#424173: freebsd-utils: bash dependencies in shell scripts run by portable shell

2007-05-15 Thread Thorsten Glaser
Cyril Brulebois dixit:

IMHO fixing is better than workarounding. Using a bash shebang would add
an (otherwise) unnecessary Depends:

In Debian, it would not, because /bin/bash is, at the moment, required to
be always there.

and having POSIX-compliant scripts sounds *much* better to me.

Same for me, but I guess we can already be lucky that all scripts using
/bin/sh have to not use bashisms. If there's an easy way to fix this
problem without making the script use bash, ok, but I haven't heard of
such functionality in other shells, so I suppose changing the shebang
line here would be fine.

bye,
//mirabile
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.  -- Coywolf Qi Hunt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#424173: freebsd-utils: bash dependencies in shell scripts run by portable shell

2007-05-15 Thread Cyril Brulebois
Thorsten Glaser [EMAIL PROTECTED] (15/05/2007):
 In Debian, it would not, because /bin/bash is, at the moment, required
 to be always there.

Heh, never noticed Essential: yes on this one, thanks. I was only
thinking that bash isn't essential...ly pointed to by /bin/sh, so I
never thought it could be marked Essential.

Cheers,

-- 
Cyril Brulebois


pgpGaI1HeOW9B.pgp
Description: PGP signature