about summary refs log tree commit diff
path: root/pkgs/tools/security/monkeysphere
diff options
context:
space:
mode:
authorFabian Kirchner <kirchner@posteo.de>2015-08-01 11:03:40 +0200
committerAlexander Foremny <aforemny@posteo.de>2015-08-01 12:01:32 +0200
commitb80df37494407b0d5410365fe2446f573dd0d83a (patch)
tree0f578188b87c46144ad3aad4b3c9614760978693 /pkgs/tools/security/monkeysphere
parent49c14b1553e272506270ca1a37d12ad36cdd2b1d (diff)
downloadnixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar.gz
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar.bz2
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar.lz
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar.xz
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.tar.zst
nixlib-b80df37494407b0d5410365fe2446f573dd0d83a.zip
Add monkeysphere package
Diffstat (limited to 'pkgs/tools/security/monkeysphere')
-rw-r--r--pkgs/tools/security/monkeysphere/default.nix43
-rw-r--r--pkgs/tools/security/monkeysphere/monkeysphere.patch92
2 files changed, 135 insertions, 0 deletions
diff --git a/pkgs/tools/security/monkeysphere/default.nix b/pkgs/tools/security/monkeysphere/default.nix
new file mode 100644
index 000000000000..99d25007723b
--- /dev/null
+++ b/pkgs/tools/security/monkeysphere/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, perl, makeWrapper, perlPackages }:
+
+stdenv.mkDerivation rec {
+  name = "monkeysphere-${version}";
+  version = "0.37";
+
+  src = fetchurl {
+    url = "http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_0.37.orig.tar.gz";
+    sha256 = "0nbfd220miflah5l2y20qlmgfpbqi0j8h7qgx1b06h7v2jjbh45m";
+  };
+
+  buildInputs = [ makeWrapper perl ];
+
+  patches = [ ./monkeysphere.patch ];
+
+  makeFlags = ''
+    PREFIX=/
+    DESTDIR=$(out)
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/openpgp2ssh --prefix PERL5LIB : \
+      "${with perlPackages; stdenv.lib.makePerlPath [
+        CryptOpenSSLRSA
+        CryptOpenSSLBignum
+      ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://web.monkeysphere.info/;
+    description = ''
+      The Monkeysphere project's goal is to extend OpenPGP's web of
+      trust to new areas of the Internet to help us securely identify
+      servers we connect to, as well as each other while we work online.
+      The suite of Monkeysphere utilities provides a framework to
+      transparently leverage the web of trust for authentication of
+      TLS/SSL communications through the normal use of tools you are
+      familiar with, such as your web browser0 or secure shell.
+    '';
+    license = licenses.gpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/security/monkeysphere/monkeysphere.patch b/pkgs/tools/security/monkeysphere/monkeysphere.patch
new file mode 100644
index 000000000000..8b343b93454f
--- /dev/null
+++ b/pkgs/tools/security/monkeysphere/monkeysphere.patch
@@ -0,0 +1,92 @@
+diff -rupN monkeysphere-0.37/Makefile monkeysphere-0.37-patched/Makefile
+--- monkeysphere-0.37/Makefile	2014-08-06 19:27:38.000000000 +0200
++++ monkeysphere-0.37-patched/Makefile	2015-07-31 19:51:57.539373097 +0200
+@@ -42,11 +42,11 @@ install: all installman
+ 	mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
+ 	printf "Monkeysphere %s\n" $(MONKEYSPHERE_VERSION) > $(DESTDIR)$(PREFIX)/share/monkeysphere/VERSION
+ 	install src/monkeysphere $(DESTDIR)$(PREFIX)/bin
+-	sed -i 's:__SYSSHAREDIR_PREFIX__:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/monkeysphere
++	sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR):' $(DESTDIR)$(PREFIX)/bin/monkeysphere
+ 	install src/monkeysphere-host $(DESTDIR)$(PREFIX)/sbin
+-	sed -i 's:__SYSSHAREDIR_PREFIX__:$(PREFIX):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-host
++	sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-host
+ 	install src/monkeysphere-authentication $(DESTDIR)$(PREFIX)/sbin
+-	sed -i 's:__SYSSHAREDIR_PREFIX__:$(PREFIX):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-authentication
++	sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-authentication
+ 	install src/monkeysphere-authentication-keys-for-user $(DESTDIR)$(PREFIX)/share/monkeysphere
+ 	install -m 0755 src/share/common $(DESTDIR)$(PREFIX)/share/monkeysphere
+ 	install -m 0644 src/share/defaultenv $(DESTDIR)$(PREFIX)/share/monkeysphere
+@@ -59,8 +59,8 @@ install: all installman
+ 	ln -sf ../share/monkeysphere/keytrans $(DESTDIR)$(PREFIX)/bin/openpgp2pem
+ 	ln -sf ../share/monkeysphere/keytrans $(DESTDIR)$(PREFIX)/bin/openpgp2spki
+ 	install -m 0744 src/transitions/* $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions
+-	sed -i 's:__SYSSHAREDIR_PREFIX__:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions/0.23
+-	sed -i 's:__SYSSHAREDIR_PREFIX__:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions/0.28
++	sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR):' $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions/0.23
++	sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR):' $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions/0.28
+ 	install -m 0644 src/transitions/README.txt $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions
+ 	install -m 0644 src/share/m/* $(DESTDIR)$(PREFIX)/share/monkeysphere/m
+ 	install -m 0644 src/share/mh/* $(DESTDIR)$(PREFIX)/share/monkeysphere/mh
+diff -rupN monkeysphere-0.37/src/share/checkperms monkeysphere-0.37-patched/src/share/checkperms
+--- monkeysphere-0.37/src/share/checkperms	2014-08-06 19:27:38.000000000 +0200
++++ monkeysphere-0.37-patched/src/share/checkperms	2015-07-31 19:52:18.170675985 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -T
++#!/usr/bin/perl
+ 
+ # checkperms: ensure as best we can that a given file can only be
+ # modified by the given user (or the superuser, naturally).  This
+diff -rupN monkeysphere-0.37/src/share/keytrans monkeysphere-0.37-patched/src/share/keytrans
+--- monkeysphere-0.37/src/share/keytrans	2014-08-06 19:27:38.000000000 +0200
++++ monkeysphere-0.37-patched/src/share/keytrans	2015-07-31 20:13:36.664514290 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -T
++#!/usr/bin/perl
+ 
+ # keytrans: this is an RSA key translation utility; it is capable of
+ # transforming RSA keys (both public keys and secret keys) between
+@@ -1069,7 +1069,7 @@ sub packetwalk {
+ 
+ 
+ for (basename($0)) {
+-  if (/^pem2openpgp$/) {
++  if (/pem2openpgp/) {
+     my $rsa;
+     my $stdin;
+ 
+@@ -1107,7 +1107,7 @@ for (basename($0)) {
+ 		      }
+ 		     );
+   }
+-  elsif (/^openpgp2ssh$/) {
++  elsif (/openpgp2ssh/) {
+       my $fpr = shift;
+       my $instream;
+       open($instream,'-');
+@@ -1123,7 +1123,7 @@ for (basename($0)) {
+ 	die "No matching key found.\n";
+       }
+   }
+-  elsif (/^openpgp2pem$/) {
++  elsif (/openpgp2pem/) {
+       my $fpr = shift;
+       my $instream;
+       open($instream,'-');
+@@ -1139,7 +1139,7 @@ for (basename($0)) {
+ 	die "No matching key found.\n";
+       }
+   }
+-  elsif (/^openpgp2spki$/) {
++  elsif (/openpgp2spki/) {
+       my $fpr = shift;
+       my $instream;
+       open($instream,'-');
+@@ -1151,7 +1151,7 @@ for (basename($0)) {
+ 	die "No matching key found.\n";
+       }
+   }
+-  elsif (/^keytrans$/) {
++  elsif (/keytrans/) {
+     # subcommands when keytrans is invoked directly are UNSUPPORTED,
+     # UNDOCUMENTED, and WILL NOT BE MAINTAINED.
+     my $subcommand = shift;