On Sat, Mar 19, 2022 at 03:03:47PM +1030, Simon Lees wrote:
On 3/19/22 03:15, Michal Suchánek wrote:
Hello
On Fri, Mar 18, 2022 at 10:14:30PM +1030, Simon Lees wrote:
On 3/18/22 06:51, Michal Suchánek wrote:
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.
As someone who cares about the build time of packages like the kernel I would be interested in looking at the differences in build time between using bash and dash as /bin/sh my suspicion is that the kernel build process still launches /bin/sh enough times that using a lighter alternative might make a difference. So if its not adding massive complexity i'd also appreciate keeping support for multiple /bin/sh here atleast until we can do better analysis on it.
Until better analysis is done I see this as a case of premature optimization. My suspicion is that the runtime of the scripts that are not run by bash explicitly is irrelevant.
Well Dirk's changes will allow us to properly analyse this.
Will it? The kernel is built on different builder each time with build times varying wildly. Running a build with different shell once or twice gives absolutely no insight into the impact of using different shells. Thanks Michal