diff --git a/docs/packaging-guidelines/sourceurl.md b/docs/packaging-guidelines/sourceurl.md index 917e713..3c97436 100644 --- a/docs/packaging-guidelines/sourceurl.md +++ b/docs/packaging-guidelines/sourceurl.md @@ -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. diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/packaging-guidelines/sourceurl.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/packaging-guidelines/sourceurl.md index 633d10d..732b47c 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/packaging-guidelines/sourceurl.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/packaging-guidelines/sourceurl.md @@ -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 片段" 中: