Skip to content

Commit ebd06b5

Browse files
committed
ops/package: More details about Signed-By
1 parent 7276cf9 commit ebd06b5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/ops/package.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,23 @@ Trusted: yes
11561156
11571157
!!! warning "`Signed-By` 与 GPG 签名"
11581158

1159-
[从 apt 2.9.24 开始,没有 `Signed-By` 字段的源会视作废弃状态](https://salsa.debian.org/apt-team/apt/-/commit/61f8f40f921cde13c5b97abbdf900646745e8e30#b3f55b8d9783f2ed27acfd1f0fe06dfc461e2aba_1_6)。以上不包含 GPG 签名的仓库在未来的 Debian 版本上可能会被拒绝使用。
1159+
[从 apt 2.9.24 开始,没有 `Signed-By` 字段的源会视作废弃状态](https://salsa.debian.org/apt-team/apt/-/commit/61f8f40f921cde13c5b97abbdf900646745e8e30#b3f55b8d9783f2ed27acfd1f0fe06dfc461e2aba_1_6),并弹出警告信息:
1160+
1161+
```console
1162+
Notice: Missing Signed-By in the sources.list(5) entry for 'https://deb.example.com/repo'
1163+
```
1164+
1165+
由于添加了 `Trusted: yes`,因此一种绕过的方案是添加一个不相关的 `Signed-By`,例如:
1166+
1167+
```yaml
1168+
Types: deb
1169+
URIs: https://deb.example.com/repo/
1170+
Suites: ./
1171+
Trusted: yes
1172+
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
1173+
```
1174+
1175+
当然了,如果需要在生产环境自行搭建软件源,仍然建议使用 GPG 签名保障软件包不被篡改。只需要给 `Release` 文件签名即可,可以将签名存储在 `Release.gpg` 文件中,或者将签名附加在 `Release` 文件中生成 `InRelease` 文件,然后将公钥提供给用户。软件包本身的完整性则由 `Release` 文件中的哈希值保障。如果需要进一步的安全性保障,软件包维护者还可以给软件包本身签名,此处不再赘述。
11601176

11611177
### 官方源结构 {#official-structure}
11621178

0 commit comments

Comments
 (0)