A search for open source projects shows that spec files in the wild use bash constructors, such as cat info|while read .
cat info|while read
But is it really safe? The rpm documentation tells me that I can count on the %build section executed by Bash ?
%build
Bash
By default, the shell invoked for each of the specification stanzas is set to %_buildshell . The default value is /bin/sh , but can be overridden either globally or based on each line.
%_buildshell
/bin/sh
Short answer: yes
Long answer: although bash has become the de facto Linux shell standard, and in practice you can rely on bash, it doesnβt hurt to point %_buildshell to /bin/bash , as mentioned in @ Ignacio Vasquez-Abrams answers
/bin/bash