tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Make gpgkey2ssh use absolute path to gpg2, fixes #11912
Arda Xi
10 years ago
7c173028
ee0fae47
+36
-1
4 changed files
expand all
collapse all
unified
split
pkgs
tools
security
gnupg
20.nix
21.nix
gpgkey2ssh-20.patch
gpgkey2ssh-21.patch
+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
26
-
patchPhase = ''
26
26
+
patches = [ ./gpgkey2ssh-20.patch ];
27
27
+
28
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
39
+
40
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
23
+
patches = [ ./gpgkey2ssh-21.patch ];
24
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
28
+
29
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
1
+
diff --git a/tools/gpgkey2ssh.c b/tools/gpgkey2ssh.c
2
2
+
index 903fb5b..d5611dc 100644
3
3
+
--- a/tools/gpgkey2ssh.c
4
4
+
+++ b/tools/gpgkey2ssh.c
5
5
+
@@ -266,7 +266,7 @@ main (int argc, char **argv)
6
6
+
keyid = argv[1];
7
7
+
8
8
+
ret = asprintf (&command,
9
9
+
- "gpg --list-keys --with-colons --with-key-data '%s'",
10
10
+
+ "@out@/bin/gpg2 --list-keys --with-colons --with-key-data '%s'",
11
11
+
keyid);
12
12
+
assert (ret > 0);
13
13
+
14
14
+
+13
pkgs/tools/security/gnupg/gpgkey2ssh-21.patch
···
1
1
+
diff --git a/tools/gpgkey2ssh.c b/tools/gpgkey2ssh.c
2
2
+
index f12c5f4..2e3f2ac 100644
3
3
+
--- a/tools/gpgkey2ssh.c
4
4
+
+++ b/tools/gpgkey2ssh.c
5
5
+
@@ -281,7 +281,7 @@ main (int argc, char **argv)
6
6
+
keyid = argv[1];
7
7
+
8
8
+
asprintf (&command,
9
9
+
- "gpg2 --list-keys --with-colons --with-key-data '%s'",
10
10
+
+ "@out@/bin/gpg2 --list-keys --with-colons --with-key-data '%s'",
11
11
+
keyid);
12
12
+
if (! command)
13
13
+
{