Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update validate-release.md with non-interactive mode #189

Merged
merged 7 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions content/cn/docs/contribution-guidelines/validate-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,25 @@ gpg --import KEYS

# 导入后可以看到如下输出, 这代表导入了 3 个用户公钥
gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
gpg: key B78B058CC255F6DC: public key "Imba Jin (apache mail) <[email protected]>" imported
gpg: key BA7E78F8A81A885E: public key "imbajin (apache mail) <[email protected]>" imported
gpg: key 818108E7924549CC: public key "vaughn <[email protected]>" imported
gpg: key 28DCAED849C4180E: public key "coderzc (CODE SIGNING KEY) <[email protected]>" imported
gpg: Total number processed: 3
gpg: imported: 3

# 2. 信任发版用户 (这里需要信任 3 个, 对 Imba Jin, vaughn, coderzc 依次执行相同操作)
gpg --edit-key Imba Jin # 以第一个为例, 进入交互模式
# 2. 信任发版用户 (你需要信任 x 个邮件里提到的 gpg 用户名, >1则依次执行相同操作)
imbajin marked this conversation as resolved.
Show resolved Hide resolved
gpg --edit-key $USER # 这里填写具体用户名或者公钥串, 回车进入交互模式
gpg> trust
...输出选项..
Your decision? 5 #选择5
imbajin marked this conversation as resolved.
Show resolved Hide resolved
Do you really want to set this key to ultimate trust? (y/N) y #选择y, 然后 q 退出信任下一个用户

# (可选) 你也可以直接使用非交互模式的如下命令:
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key $USER trust
# 或者是信任所有当前导入过的 gpg 公钥 (请小心检查)
for key in $(gpg --no-tty --list-keys --with-colons | awk -F: '/^pub/ {print $5}'); do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key "$key" trust
done

# 3. 检查签名(确保没有 Warning 输出, 每一个 source/binary 文件都提示 Good Signature)
#单个文件验证
Expand Down
13 changes: 10 additions & 3 deletions content/en/docs/contribution-guidelines/validate-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,26 @@ gpg --import KEYS

# After importing, you can see the following output, which means that 3 user public keys have been imported
gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
gpg: key B78B058CC255F6DC: public key "Imba Jin (apache mail) <[email protected]>" imported
gpg: key BA7E78F8A81A885E: public key "imbajin (apache mail) <[email protected]>" imported
gpg: key 818108E7924549CC: public key "vaughn <[email protected]>" imported
gpg: key 28DCAED849C4180E: public key "coderzc (CODE SIGNING KEY) <[email protected]>" imported
gpg: Total number processed: 3
gpg: imported: 3

# 2. Trust release users (here you need to trust 3 users, perform the same operation for Imba Jin, vaughn, coderzc in turn)
gpg --edit-key Imba Jin # Take the first one as an example, enter the interactive mode
# 2. Trust release users (you need trust x username mentioned in voting mail, if more than 1 user, just repeat the steps in turn or use script)
imbajin marked this conversation as resolved.
Show resolved Hide resolved
gpg --edit-key $USER # input the username, enter the interactive mode
gpg> trust
...output options..
Your decision? 5 #select five
imbajin marked this conversation as resolved.
Show resolved Hide resolved
Do you really want to set this key to ultimate trust? (y/N) y #slect y, then q quits trusting the next user

# (Optional) You could also use the command to trust one user in non-interactive mode:
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key $USER trust
# Or use the script to auto import all public gpg keys (be carefully):
for key in $(gpg --no-tty --list-keys --with-colons | awk -F: '/^pub/ {print $5}'); do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key "$key" trust
done


# 3. Check the signature (make sure there is no Warning output, every source/binary file prompts Good Signature)
#Single file verification
Expand Down