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.
我可以使用当前时间戳(或日期,或者 uniq 参数)作为规范 rpm 文件中的版本吗?
例如,像这样:
Release: 100%{?dist}.test.%{timestamp}
您可以做的是在序言之前定义一个变量,然后在 Release 行中使用它。以下示例将发布号设置为(假设为 2013 年 9 月 12 日)20130912。
%define build_timestamp %(date +"%Y%m%d") ... Release: %{build_timestamp}