Searching open source projects, shows me that spec files in the wild do use bash constructs, for instance cat info|while read
.
But is it really safe? Does the rpm documentation tells me I can count on the %build
section being run by Bash
?
The default shell invoked for each of the spec stanzas is given by %_buildshell
. This defaults to /bin/sh
, but can be overridden either globally or on a per-stanza basis.
Short answer: yes
Long answer: While bash has become the de facto standard of Linux shells and in practice you can count on having bash around, it does not hurt to specify %_buildshell
to /bin/bash
as already mentioned in @Ignacio Vazquez-Abrams 's answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With