From 23dcc75d01f6383eca321d4c5915b0ebd0aab0c2 Mon Sep 17 00:00:00 2001 From: LIChengGang <43427321+Zeno-sole@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:26:43 +0800 Subject: [PATCH] Update 0012-changelog-specification.md --- rfcs/0012-changelog-specification.md | 59 +++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/rfcs/0012-changelog-specification.md b/rfcs/0012-changelog-specification.md index 90eae77..0542373 100644 --- a/rfcs/0012-changelog-specification.md +++ b/rfcs/0012-changelog-specification.md @@ -60,7 +60,8 @@ native软件包没有-的连字符,因此直接在上游版本号后添加+dee - 对于相同版本软件包需要在两个以上的版本中做安全更新(例如 v23 and v26)时,为确保版本号正确,必须大于当前软包版本且小于后续发行版中的软件包版本,请示在版本号后缀中添加+dp${version}u${num}形式 - 对于v23版本 `upstreamversion-${ver1}deepin${ver2}+dp23u1` 对于v26版本 `upstreamversion-${ver1}deepin${ver2}+dp26u1` ,对于首次更新${ver2}值应当增加假设{ver2}为1 更新后应该为1.1此举是为了区别于主线版本号避免影响主线上的rebuild版本机制,对于主线的安全更新版本{ver2}加1即可, 对于后续的更新,$num值都应当累加,由于版本号形式较多建议使用 `dpkg --compare-versions` 验证版本号是否符合要求。 -- 参考的形式 原版本 `upstreamversion-1deepin1` 安全更新版本 `upstreamversion-1deepin1.1+dp23u1` +- 参考的形式 原版本 `upstreamversion-1deepin1` 安全更新版本 `upstreamversion-1deepin1.1+dp23u1` +- 当deepin${ver2} 不存在时,此时安全更新的ver2版本应该使用0.1 主线版本使用1 避免与主线版本冲突, 参考的形式`upstreamversion-1deepin0.1+dp23u1` - 对于非上述情况时应当遵循上文的版本号规范提交。 > [!TIP] > 注: dp为deepin的缩写 @@ -70,6 +71,62 @@ native软件包没有-的连字符,因此直接在上游版本号后添加+dee #### 7. 总结 +##### BNF规则 +``` + ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" + ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" + ::= | +/* >= 1 */ + ::= | + + +/* This coresponds to the "upstream‐version" field in deb-version(7) */ + ::= "1.0.0" + +/* This coresponds to the "[epoch:]" field in deb-version(7) */ + ::= E | ":" + +/* This coresponds to the "debian‐revision" field in deb-version(7) */ + ::= + +/* ${ver1}deepin${ver2}, ver2 is incremental */ +/* 0deepinY: Y >= 1 */ +/* XdeepinY: Y=0 means rebuild, Y>1 means patching */ + ::= "0deepin" | "deepin" [0-9]+ + + ::= "-" + ::= "-" + ::= | + + ::= E | "+rb" + +/* We don't allow REBUILD_TAG after VER_MAINLINE_GITHUB_DEBIAN */ + ::= | + +/* Definition of CI version */ + ::= [0-9] [0-9] [0-9] + ::= E | "+u" + + ::= + +/* Definition of Security version */ + ::= "23" | "25" + ::= "+dp" "u" + +/* SECURITY_SUFFIX is used to override ver2 when needed */ +/* See: https://github.com/deepin-community/rfcs/pull/12/#discussion_r1721540877 */ +/* if mainline is 1.0.0-1, the security version should be 1.0.0-1deepin0.1+dp23u1 */ +/* if mainline is 1.0.0-1deepin0, the security version should be 1.0.0-1deepin1.1+dp23u1 too */ +/* if mainline is 1.0.0-1deepinY (Y>1), the security version should be 1.0.0-1deepinY.1+dp23u1 */ + ::= E | "." + ::= + ::= +``` + +附带一个 BNF Playground: https://bnfplayground.pauliankline.com/ + +> [!TIP] +> 可参考BNF验证自己写的版本号是否符合规范 ##### 完整的构造 `upstreamversion-${ver1}deepin${ver2}[+dp26u${num}][+u${ver3}][+rb${ver4}]`