diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-12-06 12:22:43 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-12-06 12:22:43 +0100 |
commit | 2d711650e210acee3323e747cbea628d41451464 (patch) | |
tree | 4af270180c0fb19283473d8963c962f2b6350240 | |
parent | Add builtins::version, ::build and ::help (diff) | |
download | smolbote-2d711650e210acee3323e747cbea628d41451464.tar.xz |
PKGBUILD: add gpg key signing for plugins
-rw-r--r-- | linux/makepkg/PKGBUILD | 9 | ||||
-rw-r--r-- | tools/gpgkey.preset | 18 |
2 files changed, 27 insertions, 0 deletions
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD index 9a45114..67b0245 100644 --- a/linux/makepkg/PKGBUILD +++ b/linux/makepkg/PKGBUILD @@ -74,5 +74,14 @@ package() { # Install cd $srcdir/build DESTDIR="$pkgdir" ninja install + + msg Creating signing key in $srcdir/build/gpg + mkdir $srcdir/build/gpg + gpg2 --homedir=$srcdir/build/gpg --batch --generate-key $srcdir/smolbote/tools/gpgkey.preset + + msg Signing plugins + for so in $pkgdir/usr/local/lib/smolbote/plugins/*.so; do + gpg2 --homedir=$srcdir/build/gpg --batch --yes --local-user=smolbote@localhost --detach-sign --output=$so.sig $so + done } diff --git a/tools/gpgkey.preset b/tools/gpgkey.preset new file mode 100644 index 0000000..c33c12c --- /dev/null +++ b/tools/gpgkey.preset @@ -0,0 +1,18 @@ +# https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html +# To generate key: gpg2 --homedir=gpg-fakehome --batch --generate-key --expert gpgkey.preset +# To list key: gpg2 --homedir=gpg-fakehome --list-keys +%echo Generating GPG key (ed25519-sign) + +Key-Type: EdDSA +Key-Curve: ed25519 +Key-Length: 256 +Key-Usage: sign + +Name-Real: smolbote build process +Name-Email: smolbote@localhost + +Passphrase: null + +%commit +%echo Generating key done + |