mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
gpg fix (#3996)
* 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:
parent
53bc78474b
commit
fec72e04a0
13
projects/gnupg.org/gpg
Normal file
13
projects/gnupg.org/gpg
Normal 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 "$@"
|
|
@ -9,6 +9,55 @@ versions:
|
|||
- /gnupg-/
|
||||
- /.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:
|
||||
- bin/gpg
|
||||
- bin/gpg-agent
|
||||
|
@ -26,31 +75,10 @@ provides:
|
|||
- bin/kbxutil
|
||||
- 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:
|
||||
script: |
|
||||
gpg --version
|
||||
MD5=$(echo foo | gpg --print-md MD5)
|
||||
SHA1=$(echo foo | gpg --print-md SHA1)
|
||||
SHA512=$(echo foo | gpg --print-md SHA512)
|
||||
|
||||
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"
|
||||
script:
|
||||
- killall gpg-agent || true
|
||||
- gpg --version | grep {{version}}
|
||||
- gpg --quick-gen-key --batch --passphrase "" "Testing" default default never
|
||||
- gpg --detach-sign test.txt
|
||||
- gpg --verify test.txt.sig
|
||||
|
|
1
projects/gnupg.org/test.txt
Normal file
1
projects/gnupg.org/test.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Hello World!
|
Loading…
Reference in a new issue