[Bug 1195391] New: identify and declare bash dependencies explicitly
https://bugzilla.suse.com/show_bug.cgi?id=1195391 Bug ID: 1195391 Summary: identify and declare bash dependencies explicitly Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: dmueller@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- There is a lot of fear that the openSUSE and SUSE distributions are, due to historic reason alone always assuming that /bin/sh is a symlink to bash, so that scripts executed with /bin/sh are actually only executable with bash. in order to explore that dependency, we need to figure out how many scripts actually use bash specifics when being invoked for /bin/sh and then fix these to declare the bash dependency if they have it. this bug is a tracker issue for fixes related to that. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1195391
Dirk Mueller
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c5
--- Comment #5 from Stefan Dirsch
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c6
--- Comment #6 from Stefan Dirsch
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c7
--- Comment #7 from Dirk Mueller
Is there a good reference about the differences between bourne shell and bash you could provide?
not really, I typically test with "dash" and use "checkbashisms" (packaged in factory and others) for clues on what goes wrong.
How can I test changes easily? Do we have some small shell being compatible to bourne shell but not compatible to bash, which would be recommended for testing? Apparently using "#!/bin/sh" doesn't do the job.
simply install "dash" and run the script with "dash" for local verification. (or busybox-sh if you want, which is the actual target)
What is the motivation for this? Do we plan to switch to a different shell (maybe for only some products) or do we want to be prepared for such a change - just in case?
For now its a correctness problem, but there's a project where we need a very minimal system, so busybox-sh will be /bin/sh (and there won't be a bin/bash). for openSUSE nothing is planned as far as I can say. while dash is faster in startup (and I happen to like the package maintainer), I am not planning to push it as default shell. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c8
--- Comment #8 from Dirk Mueller
So testing with dash would be the way to go here.
Thats what I'm doing. if you want to join the effort, there are a smallish handful of graphics and xorg related packages that fail :) my playground is https://build.opensuse.org/project/show/home:dirkmueller:branches:openSUSE:F... but beware, it might also contain random other breakages, as I use this for anything that I'm experimenting with. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1195391
Stefan Dirsch
https://bugzilla.suse.com/show_bug.cgi?id=1195391
Dan ��erm��k
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c10
--- Comment #10 from Dirk Mueller
But maybe it is supported in all shells that can provide /bin/sh.
Its fine to depend on bash for now, don't worry about it. if it becomes a problem we can look at making the script posix sh compatible.
Is there any document, which shell features can be used with #!/bin/sh?
Well, the answer is the POSIX:2008 or SUS specification ;) I find https://mywiki.wooledge.org/Bashism a good reference as well as the "checkbashism" utility. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1195391
Stefan Dirsch
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c20
--- Comment #20 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c22
--- Comment #22 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c25
--- Comment #25 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c27
--- Comment #27 from Swamp Workflow Management
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c32
--- Comment #32 from Maintenance Automation
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c33
--- Comment #33 from Maintenance Automation
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c34
--- Comment #34 from Maintenance Automation
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c38
--- Comment #38 from Maintenance Automation
https://bugzilla.suse.com/show_bug.cgi?id=1195391
https://bugzilla.suse.com/show_bug.cgi?id=1195391#c39
--- Comment #39 from Maintenance Automation
participants (1)
-
bugzilla_noreply@suse.com