如何发布
本文主要介绍如何发布新版本的 Apache Fury。
介绍
源代码发布是 Apache 最重视以及最重要的部分。
请注意许可证和发布的软件签名问题。发布软件是一件严肃的事情,并会产生相应的法律后果。
release manager 第一次发布
环境要求
此发布过程在 Ubuntu 系统中运行,需要以下几个环境依赖:
- JDK 1.8+
- Apache Maven 3.x+
- Python 3.8
- GnuPG 2.x
- Git
- SVN(Apache 基金会使用 svn 来托管项目发布)
- 设置环境变量:如果您在不同的目录下配置了 gpg 密钥,请执行
export GNUPGHOME=$(xxx)
导出环境变量。
准备 GPG 密钥
如果您是第一次作为软件发布者,您需要准备一个 GPG 密钥。
您可以参考这里的快速开始获取一个 GPG 密钥或者获取更多相关信息。
安装 GPG
sudo apt install gnupg2
生成 GPG 密钥
请使用您的 Apache 名字和电子邮件地址生成 GPG 密钥:
$ gpg --full-gen-key
gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
(14) Existing key from card
Your selection? 1 # input 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096 # input 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0 # input 0
Key does not expire at all
Is this correct? (y/N) y # input y
GnuPG needs to construct a user ID to identify your key.
Real name: Chaokun Yang # input your name
Email address: chaokunyang@apache.org # input your email
Comment: CODE SIGNING KEY # input some annotations, optional
You selected this USER-ID:
"Chaokun <chaokunyang@apache.org>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # input O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
# Input the security key
┌──────────────────────────────────────────────────────┐
│ Please enter this passphrase │
│ │
│ Passphrase: _______________________________ │
│ │
│ <OK> <Cancel> │
└──────────────────────────────────────────────────────┘
# key generation will be done after your inputting the key with the following output
gpg: key E49B00F626B marked as ultimately trusted
gpg: revocation certificate stored as '/Users/chaokunyang/.gnupg/openpgp-revocs.d/1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4.rev'
public and secret key created and signed.
pub rsa4096 2022-07-12 [SC]
1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4
uid [ultimate] Chaokun <chaokunyang@apache.org>
sub rsa4096 2022-07-12 [E]
上传公钥至 GPG 密钥服务器
首先,列出您所创建的 GPG 密钥:
gpg --list-keys
执行相关命令之后,您将看到如下输出:
--------------------------------------------------
pub rsa4096 2024-03-27 [SC]
1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4
uid [ultimate] chaokunyang (CODE SIGNING KEY) <chaokunyang@apache.org>
sub rsa4096 2024-03-27 [E]
然后,将您的密钥 ID 发送到密钥服务器:
gpg --keyserver keys.openpgp.org --send-key <key-id> # e.g., 1E2CDAE4C08AD7D694D1CB139D7BE8E45E580BA4
其中,keys.openpgp.org
是一个随机选择的密钥服务器,可以使用 keyserver.ubuntu.com 或任何其他功能完备的密钥服务器。