我正在添加一些资源到一个现有的rpm .spec文件,并没有被下载。有没有办法让rpmbuild下载源代码,而不是手动下载呢?
发布于 2018-08-22 23:49:58
如果您正在从(git)托管服务(github等)获取资源。有自动检查它已经内置的支持,当结合_disable_source_fetch.
https://fedoraproject.org/wiki/Packaging:SourceURL
例如,对于来自github的特定githash:
%global commit 40-CHARACTER-HASH-VALUE
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Source0: https://github.com/OWNER/PROJECT/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
...
%prep
%autosetup -n PROJECT-%{commit}https://stackoverflow.com/questions/33177450
复制相似问题