Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/packaging-guidelines/sourceurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Replace `.tar.gz` with the archive format that upstream actually provides.

Note that the correct hostname is **`downloads.sourceforge.net`**, not `download.sourceforge.net`, and not an arbitrary mirror.

## Google Open Source

For software hosted on Google Open Source (i.e., the domain name `*.googlesource.com`), since the tarball provided is dynamically generated and does not have a fixed SHA256 value, you should refer to the last section of this article to obtain the source from the Git tag.

## Non-standard Download URLs

Sometimes upstream provides download URLs that do not end with the tarball filename. In such cases, RPM cannot automatically determine the source archive name from the URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Source: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar

将 `.tar.gz` 更改为与上游发行版匹配的任何格式。请注意,正确的 URL 是 `downloads.sourceforge.net`,而不是 `download.sourceforge.net`,也不是任意选择的镜像。

## Google Open Source

对于托管在 Google Open Source(即域名为 `*.googlesource.com`)上的软件包,因为其提供的源码压缩包为动态生成,不具有固定的 SHA256 值,所以应当参考本文的最后一部分,从 git 标签中获取源码。

## 奇奇怪怪的 URL

当上游的下载 URL 不以 tarball 名称结尾时,rpm 将无法从源码 URL 中解析出 tarball。一种适用于多种情况的变通方法是构建一个 URL,将 tarball 列在 "URL 片段" 中:
Expand Down