lol

Make gpgkey2ssh use absolute path to gpg2, fixes #11912

Arda Xi 7c173028 ee0fae47

+36 -1
+5 -1
pkgs/tools/security/gnupg/20.nix
··· 23 23 = [ readline zlib libgpgerror libgcrypt libassuan libksba pth 24 24 openldap bzip2 libusb curl libiconv ]; 25 25 26 - patchPhase = '' 26 + patches = [ ./gpgkey2ssh-20.patch ]; 27 + 28 + prePatch = '' 27 29 find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i 28 30 '' + stdenv.lib.optionalString stdenv.isLinux '' 29 31 sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c ··· 34 36 ''; 35 37 36 38 configureFlags = optional x11Support "--with-pinentry-pgm=${pinentry}/bin/pinentry"; 39 + 40 + postConfigure = "substituteAllInPlace tools/gpgkey2ssh.c"; 37 41 38 42 checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; 39 43
+4
pkgs/tools/security/gnupg/21.nix
··· 20 20 sha256 = "1ybcsazjm21i2ys1wh49cz4azmqz7ghx5rb6hm4gm93i2zc5igck"; 21 21 }; 22 22 23 + patches = [ ./gpgkey2ssh-21.patch ]; 24 + 23 25 postPatch = stdenv.lib.optionalString stdenv.isLinux '' 24 26 sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c 25 27 ''; #" fix Emacs syntax highlighting :-( 28 + 29 + postConfigure = "substituteAllInPlace tools/gpgkey2ssh.c"; 26 30 27 31 buildInputs = [ 28 32 pkgconfig libgcrypt libassuan libksba libiconv npth
+14
pkgs/tools/security/gnupg/gpgkey2ssh-20.patch
··· 1 + diff --git a/tools/gpgkey2ssh.c b/tools/gpgkey2ssh.c 2 + index 903fb5b..d5611dc 100644 3 + --- a/tools/gpgkey2ssh.c 4 + +++ b/tools/gpgkey2ssh.c 5 + @@ -266,7 +266,7 @@ main (int argc, char **argv) 6 + keyid = argv[1]; 7 + 8 + ret = asprintf (&command, 9 + - "gpg --list-keys --with-colons --with-key-data '%s'", 10 + + "@out@/bin/gpg2 --list-keys --with-colons --with-key-data '%s'", 11 + keyid); 12 + assert (ret > 0); 13 + 14 +
+13
pkgs/tools/security/gnupg/gpgkey2ssh-21.patch
··· 1 + diff --git a/tools/gpgkey2ssh.c b/tools/gpgkey2ssh.c 2 + index f12c5f4..2e3f2ac 100644 3 + --- a/tools/gpgkey2ssh.c 4 + +++ b/tools/gpgkey2ssh.c 5 + @@ -281,7 +281,7 @@ main (int argc, char **argv) 6 + keyid = argv[1]; 7 + 8 + asprintf (&command, 9 + - "gpg2 --list-keys --with-colons --with-key-data '%s'", 10 + + "@out@/bin/gpg2 --list-keys --with-colons --with-key-data '%s'", 11 + keyid); 12 + if (! command) 13 + {