Reputation: 33583
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
?
Upvotes: 8
Views: 5654
Reputation: 39538
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
Upvotes: 1
Reputation: 798436
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.
Upvotes: 7