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.
我想使用正则表达式或 find 的输出列出要包含在我的包中的文件。
我怎样才能做到这一点?
TIA
您可以使用'-f'指令%files获取要从文件中包含的文件列表。这样您就可以生成要包含在%install部分末尾的文件
'-f'
%files
%install
... %install ... find %{buildroot} -regex '.*a$' > file-lists %files -f file-lists ...