diff options
author | William A. Kennington III <william@wkennington.com> | 2015-08-01 19:18:08 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-08-01 19:18:08 -0700 |
commit | 1dab05033fc5b9df94b49b7c6dfb92bdd0095db9 (patch) | |
tree | d5c02c23b853787a0430bf1bcbe2e149be2c0e3c /pkgs/tools/security | |
parent | 559d2252e87e88a5c12d2314b151c2899081db32 (diff) | |
parent | da76816b0ccf503ab36e9e2b541315d296e5191b (diff) | |
download | nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar.gz nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar.bz2 nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar.lz nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar.xz nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.tar.zst nixlib-1dab05033fc5b9df94b49b7c6dfb92bdd0095db9.zip |
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/monkeysphere/default.nix | 44 | ||||
-rw-r--r-- | pkgs/tools/security/monkeysphere/monkeysphere.patch | 92 |
2 files changed, 136 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..f0d3a870676c --- /dev/null +++ b/pkgs/tools/security/monkeysphere/default.nix @@ -0,0 +1,44 @@ +{ 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 = "Leverage the OpenPGP web of trust for SSH and TLS authentication"; + longDescription = '' + 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; |