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.
我一直在尝试找出在rpm创建过程中设置固定文件名的最简单方法。它可以设置在 .spec 文件中的某处或作为rpmbuild参数吗?默认名称取决于版本和发行号。我的 rpm 名称必须始终相同。
rpm
rpmbuild
谢谢
同步
是的,覆盖%_rpmfilename宏。根据我的默认值rpm --showrc是:
%_rpmfilename
rpm --showrc
%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
因此,您可以将以下(或类似内容)添加到 .spec 文件的顶部:
%define _rpmfilename %%{NAME}.%%{OS}.%%{ARCH}.rpm