Commit | Line | Data |
---|---|---|
3fc145d4 | 1 | #!/bin/bash |
3e4c32c3 | 2 | |
725b460c IK |
3 | # Usage: $0 [-r] |
4 | # -r means dont refresh keys from keyservers | |
d27f8055 IK |
5 | # |
6 | # See https://gluestick.office.fsf.org/checklists/person/crypto-keys/ for | |
7 | # upload command. | |
725b460c | 8 | |
e9702c48 IK |
9 | shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 |
10 | set -eE -o pipefail | |
11 | trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR | |
3e4c32c3 | 12 | |
227fa583 IK |
13 | refresh-gpg-key() { |
14 | ||
15 | key=$1 | |
16 | ||
17 | error=999 | |
5aa63901 | 18 | for keyserver in keyring.debian.org keyserver.ubuntu.com pool.sks-keyservers.net; do |
227fa583 IK |
19 | set +e |
20 | cmd="gpg --keyserver $keyserver --recv-keys $key" | |
21 | # keyservers are not very reliable, so retry | |
22 | for x in {1..3}; do | |
23 | $cmd &>/dev/null | |
24 | ret=$? | |
55a1be4b IK |
25 | if (( ret == 0 )); then |
26 | break; fi | |
227fa583 IK |
27 | sleep 1 |
28 | done | |
29 | set -e | |
30 | error=$(( ret < error ? ret : error )) # use lowest return | |
31 | done | |
32 | ||
33 | return $error | |
34 | } | |
3e4c32c3 | 35 | |
e72d434b IK |
36 | refresh=true |
37 | if [[ $1 == -r ]]; then | |
38 | refresh=false | |
39 | fi | |
40 | ||
3e4c32c3 IK |
41 | KEYS+="A4626CBAFF376039D2D7554497BA9CE761A0963B " #johns |
42 | KEYS+="759C0A4A39A02A079712FB5061B826E87A80C8D6 " #johnh | |
5c18cac2 | 43 | KEYS+="22DD43AF4C1F68C7AF784F1A7F861E72F9682D6F " #andrew |
3e4c32c3 | 44 | KEYS+="13A0851D6307FC54FCCB81BA2C1008316F3E89B7 " #donald |
403f4f95 | 45 | KEYS+="8556112E9B88B1A8B3E3631B58A39239D50484E8 " #jeanne |
3e4c32c3 | 46 | KEYS+="04C45B4E3AF05E9EB140FD148B10E9C6407BD6E1 " #matt |
34ae62db | 47 | KEYS+="318C679D94F17700CC847DE646A70073E4E50D4E " #ruben |
3e4c32c3 IK |
48 | KEYS+="0CCB3494C13CCD8F6EC73AA06DA6B7D151C7643E " #dana |
49 | KEYS+="B125F60B7B287FF6A2B7DF8F170AF0E2954295DF " #ian | |
f4caeebe | 50 | KEYS+="36C9950D2F68254ED89C7C03F9C13A10581AB853 " #craigt |
3e4c32c3 | 51 | KEYS+="2C31130BF7D5A459AFF2A3F3C9DFFE4A33AA52D9 " #knauth |
06ea525c | 52 | KEYS+="43372794C8ADD5CA8FCFFA6CD03759DAB600E3C0 " #michael |
47309b71 | 53 | KEYS+="B102017CCF698F79423EF9CC069C04D206A59505 " #zoe |
7c4333a9 | 54 | KEYS+="7CCC7ECD3D78EB384F6C02C8966951617A149C73 " #gregf |
f8faa2d3 | 55 | KEYS+="D86097B5E291BA771FA64D357014A6BE08494155" #odile |
7c4333a9 | 56 | |
3e4c32c3 IK |
57 | |
58 | rm -f /tmp/keys.asc ./fsf-keyring.gpg | |
59 | ||
60 | for KEY in $KEYS ; do | |
e72d434b IK |
61 | if $refresh; then |
62 | refresh-gpg-key $KEY | |
63 | fi | |
3e4c32c3 IK |
64 | done |
65 | ||
7f8b8bae | 66 | gpg2 --armor --export $KEYS > fsf-keyring.gpg |
55a1be4b | 67 | |
77b92854 AE |
68 | echo "Please verify in another terminal window that the keyring doesn't contain many spam signatures before signing:" |
69 | echo | |
9aebde55 | 70 | echo "ls -lh fsf-keyring.gpg" |
77b92854 AE |
71 | echo |
72 | echo "Press [enter] to continue." | |
73 | echo | |
74 | read | |
7f8b8bae IK |
75 | gpg2 --armor --sign ./fsf-keyring.gpg |
76 | mv fsf-keyring.gpg.asc fsf-keyring.gpg | |
55a1be4b | 77 | rm -f fsf-keyring.gpg~ |