* fix

* set env & run gpg-agent

* wip

* wip

* wip

* .

* wip

* wip

* final

* final...

* gpg-agent should auto-start

* try with entrypoint

* .

* .

* wip

* wip

* wip

* .

* wip

* .

* omg :D

* .

* oops

* this is some kind of horror...

* .

---------

Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
Andrew 2023-11-12 01:34:33 +02:00 committed by GitHub
parent 53bc78474b
commit fec72e04a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 27 deletions

13
projects/gnupg.org/gpg Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
d=$(dirname "$0")
if [ ! -f "$GNUPGHOME/gpg.conf" ]; then
cat << EOF > $GNUPGHOME/gpg.conf
use-agent
pinentry-mode loopback
agent-program $d/gpg-agent
EOF
fi
$d/gpg-exec "$@"

View file

@ -9,6 +9,55 @@ versions:
- /gnupg-/ - /gnupg-/
- /.tar.bz2/ - /.tar.bz2/
dependencies:
zlib.net: '*'
sourceware.org/bzip2: '*'
gnupg.org/npth: '*'
gnupg.org/libgpg-error: '*'
gnupg.org/libksba: '*'
gnupg.org/libassuan: '*'
gnupg.org/libgcrypt: '*'
gnupg.org/pinentry: '*'
gnutls.org: '*'
openldap.org: '*'
gnu.org/readline: '*'
sqlite.org: '*'
darwin:
gnu.org/gettext: '*'
runtime:
env:
GNUPGHOME: "{{prefix}}/etc/gnupg"
build:
freedesktop.org/pkg-config: '*'
linux:
gnu.org/gcc: '*'
script:
- ./configure $ARGS
- make --jobs {{ hw.concurrency }}
- make --jobs {{ hw.concurrency }} install
- run: |
sed -i.bak "s|{{prefix}}|\$(dirname \$0)/..|g" gpg-wks-client
rm gpg-wks-client.bak
working-directory: "{{prefix}}/libexec"
- run: mkdir -p var/run etc/gnupg
working-directory: "{{prefix}}"
- run: |
mv ./gpg ./gpg-exec
working-directory: "{{prefix}}/bin"
- run: install gpg {{prefix}}/bin/
working-directory: props
env:
ARGS:
- --prefix={{prefix}}
- --libdir={{prefix}}/lib
- --sysconfdir={{prefix}}/etc
- --disable-debug
- --disable-dependency-tracking
- --disable-silent-rules
- --with-pinentry-pgm={{deps.gnupg.org/pinentry.prefix}}/bin/pinentry
provides: provides:
- bin/gpg - bin/gpg
- bin/gpg-agent - bin/gpg-agent
@ -26,31 +75,10 @@ provides:
- bin/kbxutil - bin/kbxutil
- bin/watchgnupg - bin/watchgnupg
dependencies:
zlib.net: 1
sourceware.org/bzip2: 1
gnupg.org/npth: 1
gnupg.org/libgpg-error: 1
gnupg.org/libksba: 1
gnupg.org/libassuan: 2
gnupg.org/libgcrypt: 1
build:
script: |
./configure --prefix={{prefix}}
make
make check
make install
test: test:
script: | script:
gpg --version - killall gpg-agent || true
MD5=$(echo foo | gpg --print-md MD5) - gpg --version | grep {{version}}
SHA1=$(echo foo | gpg --print-md SHA1) - gpg --quick-gen-key --batch --passphrase "" "Testing" default default never
SHA512=$(echo foo | gpg --print-md SHA512) - gpg --detach-sign test.txt
- gpg --verify test.txt.sig
test "$MD5" = "D3 B0 73 84 D1 13 ED EC 49 EA A6 23 8A D5 FF 00"
test "$SHA1" = "F1D2 D2F9 24E9 86AC 86FD F7B3 6C94 BCDF 32BE EC15"
# Yes, there's a newline in this string
test "$SHA512" = "0CF9180A 764ABA86 3A67B6D7 2F0918BC 131C6772 642CB2DC E5A34F0A 702F9470
DDC2BF12 5C12198B 1995C233 C34B4AFD 346C54A2 334C350A 948A51B6 E8B4E6B6"

View file

@ -0,0 +1 @@
Hello World!