On Thu, Mar 17, 2022 at 07:29:51PM +0100, Dirk Müller wrote:
Hi Michal,
Am Mi., 16. März 2022 um 14:50 Uhr schrieb Michal Suchánek <msuchanek@suse.de>:
You can specify it via the %__spec_build_cmd macro. For instance, you could
add a %define __spec_build_cmd /bin/bash -e
This is actually pullrequested already for a while, see here:
https://github.com/openSUSE/rpm-config-SUSE/pull/53
you don't need to worry about not using bash as the build shell. there are two cases where it could change:
* when somebody forcefully changes /bin/sh to find issues where we depend on bash * when shell invocation are used, like %()
And I'm sure the review team will decline them if there is no proper reason to do this - if you don't have at least *some* complexity in the build section.
There is no point in changing this for build, that would be entirely madness, there are thousands of packages that rely on bashism.
So now I have recieved this patch for kernel:
Yes, because it fixes the subshell usage of being a bit more compatible on a wider range.
And rather than making the code more complex I would opt for BuildRequires: bash-sh that way there will be no surprises even for %(). While the kernel should be installable on a minimal system I don't see any reason why it should be buildable on a minimal system. Surely the fact that kernel requires gcc (specific version, not clang), bison, openssl or dwarves to build does not offend anybody. In the same way I see no problem with requiring bash for build when it makes the build scripts simpler and more reliable. Thanks Michal