https://bugzilla.novell.com/show_bug.cgi?id=800607 https://bugzilla.novell.com/show_bug.cgi?id=800607#c3 Guido Berhörster <gber@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CLOSED Resolution| |INVALID --- Comment #3 from Guido Berhörster <gber@opensuse.org> 2013-01-27 22:23:59 UTC --- (In reply to comment #2)
If a script is being run, it is either not working or being ignored.
The rpmlint check (http://gitorious.org/opensuse/rpmlint-checks/blobs/master/BashismsCheck.py) only produces a warning, not an error, so it's possible that package maintainers ignore that (I actually tried to have this enforced more strictly but people objected, look in the opensuse packaging archives around 2010 for the discussion).
I gave an example that doesn't work in a posix compliant shell: one for logrotate.
That looks like a bug, so file a report against logrotate or send a submitrequest.
I found several others on my system that used '[[':
dhcpd dhcpd6 kbd dictd cifs monit named zfs-fuse
I just wasted my time looking at those, dhcpd, dhcpd6, kbd, and zfs-fuse use #!/bin/bash, cifs and named do not use [[ at all, and there is no dictd package in openSUSE.
Just now I tried to run a build of "modules-pam".
The build script uses "pushd" -- a bashism which fails under a posix compliant shell.
Running dash -n doesn't catch bashisms, since [[ and ARRAYS are both illegal syntax -- nor does it catch those bashims where non-existent bash builtins are called (like pushd).
checkbashisms actually does catch [[, pushd/popd, and arrays, however even with the combination of checkbashisms and dash it isn't possible to programatically catch every bashism with 100% certainty at build time.
If you feel this is not an issue, please change /bin/sh -> /bin/dash instead of /bin/bash, as dash also is attempting to be POSIX compliant, just as bash is... You'll find quickly what things don't work. ... like try rebooting your system then.
I'm actually one of the few people who care about this and I wrote the above rpmlint check that scans shellscripts with dash/checkbashisms at buildtime. If you actually find further bashisms then file individual bug reports against the packages. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.