Clarify RPM packaging specification requirements - #72
Open
misaka00251 wants to merge 1 commit into
Open
Conversation
- clarify tag ordering and conditional fields - define Source, RemoteAsset, and BuildSystem requirements - document dependency, patch, and subpackage rules - sync the Chinese translation Signed-off-by: misaka00251 <liuxin@iscas.ac.cn>
Z572
approved these changes
Sep 4, 2026
Jingwiw
requested changes
Sep 4, 2026
| 1. `URL` MUST point to the upstream project's official homepage; if one does not exist, it MAY point to the source code repository. | ||
|
|
||
| 2. The `URL` tag MUST NOT dynamically construct its value using macros such as `%{name}`. | ||
| 2. When the upstream project does not provide an official homepage but provides a public source repository, the Spec MUST set `URL` to a meaningful project location, normally the source repository. |
Member
There was a problem hiding this comment.
1 和 2 逻辑有一定模糊, 在相同条件描述最终指向源码仓,但是 1 是 MAY 2 是 MUST ,建议 第一条 说 如果没有,就 MUST 什么,第二条解释 第二个 must 具体主要是指 source repository.(注意中文一起改)
| ### Source | ||
|
|
||
| 1. `Source` MUST specify the URI for downloading the upstream source archive (or a mathematically equivalent, reproducible archive). | ||
| 1. A Spec that consumes source files or other source inputs MUST declare those inputs using RPM source declarations such as `Source`, `SourceN`, or `%sourcelist`, as appropriate. It MUST specify the URI for downloading the upstream source archive (or a mathematically equivalent, reproducible archive). But if a package that does not consume any source input MAY omit source declarations entirely. Dependency-only meta-packages are a common example. |
Member
There was a problem hiding this comment.
Source 的来源不一定是上游,也可以是本地输入, 本地输入是需要做简单注释来辅助维持长期维护的
|
|
||
| 5. For any network-fetched `Source`, a `#!RemoteAsset` comment MUST immediately precede the `Source` declaration. If multiple external sources exist, each MUST be individually annotated. | ||
|
|
||
| 6. For any `Source` fetched using the HTTP or HTTPS protocol, the SHA-256 checksum of the source archive MUST be documented on the line following the `#!RemoteAsset` comment. |
Member
There was a problem hiding this comment.
有歧义,表达的是行中,但是断句是 on ,the line following xxx , 还是 on the line, following..
| 4. For any `Source` fetched using the HTTP or HTTPS protocol, the SHA-256 checksum of the source archive MUST be documented on the line following the `#!RemoteAsset` comment. | ||
| 4. If the `URL` tag value can serve as a valid prefix for the source link, `Source` MAY leverage the `%{url}` macro. | ||
|
|
||
| 5. For any network-fetched `Source`, a `#!RemoteAsset` comment MUST immediately precede the `Source` declaration. If multiple external sources exist, each MUST be individually annotated. |
|
|
||
| ### BuildRequires | ||
|
|
||
| 1. `BuildRequires` MUST list all build-time dependencies exhaustively. |
| 2. These dependencies MUST adhere to the "one dependency per line" formatting rule. | ||
|
|
||
| 3. For standard C/C++ applications, it is generally unnecessary to explicitly specify a compiler like `gcc`. | ||
| 3. When a package requires no additional build-time dependencies beyond the guaranteed basic build environment, the Spec MAY omit `BuildRequires`. For example, for standard C/C++ applications, it is generally unnecessary to explicitly specify a compiler like `gcc`. |
Member
There was a problem hiding this comment.
这里不能说默认不要 gcc 之类,建议是形成一个引用清单,有个 basic build environment 什么的注释 和引用链接,目标是尽量一份 spec 能自动推导出完整相关上下文,减少约定俗成
| TODO | ||
| The following example shows a valid minimal structure for a package that does not need upstream source input, a build system, build dependencies, or explicit runtime dependencies: | ||
|
|
||
| ```specfile |
| ### %files | ||
|
|
||
| The `%files` section MUST inventory all artifacts bundled into the resulting binary package, adhering to the following constraints: | ||
| Every Spec MUST contain a `%files` section for the main package. The `%files` section MUST inventory all artifacts bundled into the resulting binary package, adhering to the following constraints: |
Member
There was a problem hiding this comment.
有没有只有子包的 spec,有的话这样就一定有一个空主包,是必要的吗
| @@ -283,10 +368,12 @@ Source1: https://example.org/example-%{version}-additional.tar.gz | |||
| 4. 若使用 `BuildOption`,其位置应当位于 `BuildSystem` 与 `BuildRequires` 之间。 | |||
|
|
|||
| 5. `BuildOption` 的书写顺序,应当与 RPM 的构建过程保持一致,即: | |||
| openRuyi 项目需要大量第三方软件包以构建可用、可维护的发行版。为降低包维护与审查成本、提升仓库一致性与可预测性,本规范定义 openRuyi 软件包 RPM Spec 文件 (以下简称 Spec) 的最低一致性要求与格式约定。 | ||
|
|
||
| 本规范关注的对象是 Spec 这一 “目标产物” 本身:我们期望交付到仓库中的 Spec 在结构、字段、组织、命名与宏使用上应呈现的形态。任何满足本规范的 Spec,均应可被一致地理解、审查与复用。 | ||
| 本规范关注的对象是 Spec 这一 "目标产物" 本身:我们期望交付到仓库中的 Spec 在结构、字段、组织、命名与宏使用上应呈现的形态。任何满足本规范的 Spec,均应可被一致地理解、审查与复用。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the openRuyi RPM Packaging Specification and synchronize its Chinese translation.
Changes
BuildSystemis required or may be omitted.BuildOption.BuildRequiresand runtime dependency requirements.%files, package splitting, and upgrade continuity rules.Related to: openRuyi-Project/openRuyi#1227