Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
搜索开源项目,向我展示了野外的规范文件确实使用 bash 结构,例如cat info|while read。
cat info|while read
但它真的安全吗?rpm 文档是否告诉我我可以依靠%build正在运行的部分Bash?
%build
Bash
为每个规范节调用的默认 shell 由 给出%_buildshell。这默认为/bin/sh,但可以全局或逐节覆盖。
%_buildshell
/bin/sh
简短的回答:是的
长答案:虽然 bash 已成为 Linux shell 的事实标准,并且在实践中您可以指望使用 bash,但正如 @Ignacio Vazquez-Abrams 的回答中已经提到的那样指定它并没有%_buildshell什么/bin/bash坏处
/bin/bash