2018-03-20 14:00:30 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-21 10:09:04 +01:00
|
|
|
cat >keyparms <<EOF
|
|
|
|
%echo Generating a basic OpenPGP key
|
|
|
|
Key-Type: DSA
|
|
|
|
Key-Length: 1024
|
|
|
|
Subkey-Type: ELG-E
|
|
|
|
Subkey-Length: 1024
|
2018-05-14 16:34:10 +02:00
|
|
|
Name-Real: $USER_NAME
|
2018-03-21 10:09:04 +01:00
|
|
|
Name-Comment: dev deb repo
|
2018-05-14 16:34:10 +02:00
|
|
|
Name-Email: $USER_EMAIL
|
2018-03-21 10:09:04 +01:00
|
|
|
Expire-Date: 0
|
2018-05-14 16:34:10 +02:00
|
|
|
Passphrase: $PASSPHRASE
|
2018-03-21 10:09:04 +01:00
|
|
|
%commit
|
|
|
|
%echo done
|
|
|
|
EOF
|
|
|
|
export PINENTRY_USER_DATA="USE_CURSES=1"
|
|
|
|
gpg --gen-key --batch keyparms
|
|
|
|
gpg --export --armor > /signing-key/dev.pubkey
|
|
|
|
|
2018-03-20 14:00:30 +01:00
|
|
|
aptly repo create --component="main" --distribution="ubuntu" dev
|
|
|
|
aptly repo add dev /packages
|
2018-05-14 16:34:10 +02:00
|
|
|
aptly publish repo --batch --passphrase="$PASSPHRASE" dev
|
2018-03-20 14:00:30 +01:00
|
|
|
aptly serve
|