Skip to content

Commit b4e273a

Browse files
committed
feat(package-styling-manual): introduce the EPOCH variable
also fix existing typos.
1 parent 814fd2d commit b4e273a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

content/developer/packaging/package-styling-manual.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,16 @@ The `VER=`, or `$VER` variable defines the main version of the resulting package
7878

7979
### REL=
8080

81-
The `REL=`, or `$REL` variable defines the revision level of the resulting package. This variable defaults to 0 and, when a a revision is made to a package without any change to the main version (`VER=`), you should increment this value by 1. One exception is when handling Linux kernel packages in the RC (release candidate) stage, we customarily use 0.1, 0.2, 0.3, ..., etc. to indicate RC numbers (`REL=0.2` corresponds to `-rc2` in kernel version, for instance) and use a, b, c, ..., etc. to indicate revisions on the same RC version. Any further exception should be discussed before hand before they become rule.
81+
The `REL=`, or `$REL` variable defines the revision level of the resulting package. This variable defaults to 0 and, when a revision is made to a package without any change to the main version (`VER=`), you should increment this value by 1. One exception is when handling Linux kernel packages in the RC (release candidate) stage, we customarily use 0.1, 0.2, 0.3, ..., etc. to indicate RC numbers (`REL=0.2` corresponds to `-rc2` in kernel version, for instance) and use a, b, c, ..., etc. to indicate revisions on the same RC version. Any further exception should be discussed before hand before they become rule.
8282

8383
ACBS may automatically append a `~pre${ISO_8601-1_2019_TIMESTAMP}` suffix to `REL=` when packaging from a non-stable branch, see [Revision Marking Guidelines for Topic Packages](@/developer/packaging/topic-version-suffix.md).
8484

8585
When a package is updated, the `REL=` line should be removed to indicate a revision level of 0 (we typicall remove the `REL=` declaration in `spec` when doing so).
8686

87+
### EPOCH=
88+
89+
The `EPOCH=`, or `$EPOCH` variable defines the most significant field of a package's version string. This variable defaults to 0 and, when a downgrade is made to the main version (e.g., downgrading `VER=` from `32.0` to `25.2`), you should increment this value by 1. This variable allows the downgraded package to have a greater version string in spite of having a smaller `VER=` value (e.g., `1:25.2` vs `32.0`).
90+
8791
## Source Variables
8892

8993
Source variables define the package's source(s), and in the case of a VCS (version control system) based source, define in addition a specific source snapshot.

content/developer/packaging/package-styling-manual.zh.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ Executed Packager <[email protected]>
7979

8080
### REL=
8181

82-
`REL=` 行(`$REL` 变量)定义软件包的修订号。此变量默认值为 0,在主版本 ()`VER=`) 不变的情况下,每次修订应为该值递增 1。该规则的一个已知例外是 Linux 内核的 RC 版本标记法:此处我们使用 0.1, 0.2, 0.3, ... 的数值对应 RC 序号(`REL=0.2` 对应内核的 `-rc2` 版本),并使用 a, b, c, ... 作为同一 RC 版本下的修订号。如需引入其他规则例外,请提前与其他维护者讨论。
82+
`REL=` 行(`$REL` 变量)定义软件包的修订号。此变量默认值为 0,在主版本 (`VER=`) 不变的情况下,每次修订应为该值递增 1。该规则的一个已知例外是 Linux 内核的 RC 版本标记法:此处我们使用 0.1, 0.2, 0.3, ... 的数值对应 RC 序号(`REL=0.2` 对应内核的 `-rc2` 版本),并使用 a, b, c, ... 作为同一 RC 版本下的修订号。如需引入其他规则例外,请提前与其他维护者讨论。
8383

8484
ACBS 在构建非 `stable` 分支软件包时也会在 `REL=` 追加 `~pre${ISO_8601-1_2019_TIMESTAMP}` 后缀,详见[《测试源内软件包迭代版本规范》](@/developer/packaging/topic-version-suffix.zh.md)
8585

8686
更新软件包时应删除 `REL=` 行以将修订号复位为 0(此时一般做法是在 spec 中删除 `REL=`)。
8787

88+
### EPOCH=
89+
90+
`EPOCH` 行(`$EPOCH` 变量)定义软件包的“纪元”号,即 dpkg 在比较版本号时最优先比较的字段。此变量默认值为 0,在主版本 (`VER=`) 下降的情况下(例:从 `32.0` 降级到 `25.2`),每次修订应为该值递增 1。递增“纪元”值的作用是使降级包的实际版本号大于降级前的包(例:`1:25.2` 大于 `32.0`)。
91+
8892
## 源码文件
8993

9094
源码文件变量定义了软件源码的下载地址。对于使用了版本控制系统的软件,还额外定义了选取的快照。

0 commit comments

Comments
 (0)