File: install-gpg.sh

package info (click to toggle)
postgis-java 1%3A2021.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 876 kB
  • sloc: java: 5,546; xml: 1,656; sh: 12; makefile: 3
file content (38 lines) | stat: -rwxr-xr-x 730 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash

set -euf

sudo apt-get update
sudo apt-get install -y gnupg haveged

rm -rf ~/.gnupg
gpg --list-keys

cat >key-info <<EOF
    %echo Generating a key
    Key-Type: RSA
    Key-Length: 4096
    Subkey-Type: RSA
    Subkey-Length: 4096
    Name-Real: PostGIS Development Team
    Name-Comment: PostGIS Development Team
    Name-Email: test-key@postgis.net
    Expire-Date: 0
    %no-ask-passphrase
    %no-protection
    %commit
    %echo done
EOF

gpg --verbose --batch --gen-key key-info

echo -e "5\ny\n" |  gpg --no-tty --command-fd 0 --expert --edit-key test-key@postgis.net trust;

# test
gpg --list-keys
gpg -e -a -r test-key@postgis.net key-info
rm key-info
gpg -d key-info.asc
rm key-info.asc

set +euf