diff options
author | Kristian Fiskerstrand <k_f@gentoo.org> | 2014-07-29 12:34:22 +0000 |
---|---|---|
committer | Kristian Fiskerstrand <k_f@gentoo.org> | 2014-07-29 12:34:22 +0000 |
commit | e94f02ba56d0dc690a98d3fedb057845c666e2b3 (patch) | |
tree | d731d42c4c8f70bf0acb01c021c49aeb0d973d6e /app-crypt/monkeysphere | |
parent | Version bump (diff) | |
download | gentoo-2-e94f02ba56d0dc690a98d3fedb057845c666e2b3.tar.gz gentoo-2-e94f02ba56d0dc690a98d3fedb057845c666e2b3.tar.bz2 gentoo-2-e94f02ba56d0dc690a98d3fedb057845c666e2b3.zip |
Revision bump to include serveral additional patches from my development overlay
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xFC3B17DE05E136A0!)
Diffstat (limited to 'app-crypt/monkeysphere')
5 files changed, 176 insertions, 1 deletions
diff --git a/app-crypt/monkeysphere/ChangeLog b/app-crypt/monkeysphere/ChangeLog index 5e575cb44b46..4680dd16edd6 100644 --- a/app-crypt/monkeysphere/ChangeLog +++ b/app-crypt/monkeysphere/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-crypt/monkeysphere # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/monkeysphere/ChangeLog,v 1.5 2014/07/28 19:03:09 k_f Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-crypt/monkeysphere/ChangeLog,v 1.6 2014/07/29 12:34:22 k_f Exp $ + +*monkeysphere-0.36-r2 (29 Jul 2014) + + 29 Jul 2014; Kristian Fiskerstrand <k_f@gentoo.org> + +files/monkeysphere-0.36_hd_od.patch, + +files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch, + +files/monkeysphere-0.36_tests_gnupg2.patch, +monkeysphere-0.36-r2.ebuild: + Revision bump to include serveral additional patches from my development + overlay 28 Jul 2014; Kristian Fiskerstrand <k_f@gentoo.org> metadata.xml: Taking over full maintainership instead of through proxy-maint diff --git a/app-crypt/monkeysphere/files/monkeysphere-0.36_hd_od.patch b/app-crypt/monkeysphere/files/monkeysphere-0.36_hd_od.patch new file mode 100644 index 000000000000..7cdaa74b5735 --- /dev/null +++ b/app-crypt/monkeysphere/files/monkeysphere-0.36_hd_od.patch @@ -0,0 +1,14 @@ +diff -r 6150774ec7f4 tests/keytrans +--- a/tests/keytrans Sun Feb 16 20:11:02 2014 +0100 ++++ b/tests/keytrans Sun Feb 16 20:11:40 2014 +0100 +@@ -104,8 +104,8 @@ + <(gpg --list-packets < "$TEMPDIR"/converted.secret.key) + + diff -u \ +- <(hd "$TEMPDIR"/secret.key) \ +- <(hd "$TEMPDIR"/converted.secret.key) ++ <(od -xc "$TEMPDIR"/secret.key) \ ++ <(od -xc "$TEMPDIR"/converted.secret.key) + + KEYFPR=$(gpg --fingerprint --with-colons --list-keys | grep ^fpr | cut -f10 -d:) + KEYID=$(printf "%s" "$KEYFPR" | cut -b25-40) diff --git a/app-crypt/monkeysphere/files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch b/app-crypt/monkeysphere/files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch new file mode 100644 index 000000000000..aec90eb07661 --- /dev/null +++ b/app-crypt/monkeysphere/files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch @@ -0,0 +1,34 @@ +diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication +index edc7995..2711ff2 100755 +--- a/src/monkeysphere-authentication ++++ b/src/monkeysphere-authentication +@@ -84,6 +84,13 @@ gpg_sphere() { + su_monkeysphere_user gpg --fixed-list-mode --no-greeting --quiet --no-tty "$@" + } + ++check_openpgp2ssh_sanity() { ++ if [[ `su_monkeysphere_user openpgp2ssh ABC &>/dev/null || echo $?` != "255" ]]; then ++ echo "openpgp2ssh command gives unexpected return code. This can lead to a scenario where no authorized keys are populated, even though they are otherwise valid. Aborting!" ++ exit 1 ++ fi; ++} ++ + # output to stdout the core fingerprint from the gpg core secret + # keyring + core_fingerprint() { +@@ -163,6 +170,7 @@ case $COMMAND in + 'update-users'|'update-user'|'update'|'u') + source "${MASHAREDIR}/setup" + setup ++ check_openpgp2ssh_sanity + source "${MASHAREDIR}/update_users" + OUTPUT_STDOUT= update_users "$@" + ;; +@@ -171,6 +179,7 @@ case $COMMAND in + (( $# > 0 )) || failure "Must specify user." + source "${MASHAREDIR}/setup" + setup ++ check_openpgp2ssh_sanity + source "${MASHAREDIR}/update_users" + OUTPUT_STDOUT=true update_users "$1" + ;; diff --git a/app-crypt/monkeysphere/files/monkeysphere-0.36_tests_gnupg2.patch b/app-crypt/monkeysphere/files/monkeysphere-0.36_tests_gnupg2.patch new file mode 100644 index 000000000000..712734459054 --- /dev/null +++ b/app-crypt/monkeysphere/files/monkeysphere-0.36_tests_gnupg2.patch @@ -0,0 +1,50 @@ +diff -r c13f4b11061e tests/keytrans +--- a/tests/keytrans Sun Feb 16 19:24:08 2014 +0100 ++++ b/tests/keytrans Sun Feb 16 19:27:42 2014 +0100 +@@ -131,9 +131,9 @@ + cat >"$TEMPDIR"/expectedout <<EOF + pub:u:1024:1:$KEYID:$timestamp:::u:::scSC: + uid:u::::$timestamp::E90EC72E68C6C2A0751DADC70F54F60D27B88C3D::monkeymonkey: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: + uid:u::::$timestamp::8200BD0425CC70C7D698DF3FE412044EAAB83F94::testtest: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: + EOF + + diff -u "$TEMPDIR"/expectedout <(gpg --check-sigs --with-colons | grep -v ^tru) +@@ -159,10 +159,10 @@ + cat >"$TEMPDIR"/expectedout <<EOF + pub:u:1024:1:$KEYID:$timestamp:::u:::scSC: + uid:u::::$timestamp::E90EC72E68C6C2A0751DADC70F54F60D27B88C3D::monkeymonkey: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: + uid:r::::::8200BD0425CC70C7D698DF3FE412044EAAB83F94::testtest: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: +-rev:!::1:$KEYID:$revtime::::monkeymonkey:30x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: ++rev:!::1:$KEYID:$revtime::::monkeymonkey:30x:::::8: + EOF + + +@@ -190,15 +190,15 @@ + cat >"$TEMPDIR"/expectedout <<EOF + pub:u:1024:1:$KEYID:$timestamp:::u:::scSC: + uid:u::::$timestamp::E90EC72E68C6C2A0751DADC70F54F60D27B88C3D::monkeymonkey: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: + uid:r::::::8200BD0425CC70C7D698DF3FE412044EAAB83F94::testtest: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: +-rev:!::1:$KEYID:$revtime::::monkeymonkey:30x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: ++rev:!::1:$KEYID:$revtime::::monkeymonkey:30x:::::8: + uid:u::::$timestamp::EDDC32D783E7F4C7B6982D9AE5DC4A61000648BA::baz: +-sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x: ++sig:!::1:$KEYID:$timestamp::::monkeymonkey:13x:::::8: + pub:-:1024:1:$NEWKEYID:$(($timestamp + 1)):::-:::caCA: + uid:-::::$(($timestamp + 1))::A0D708F51CC257DEFC01AEDE1E0A5F329DFD8F16::fubar: +-sig:!::1:$NEWKEYID:$(($timestamp + 1))::::fubar:13x: ++sig:!::1:$NEWKEYID:$(($timestamp + 1))::::fubar:13x:::::8: + EOF + + echo "test: diff expected gpg list output" diff --git a/app-crypt/monkeysphere/monkeysphere-0.36-r2.ebuild b/app-crypt/monkeysphere/monkeysphere-0.36-r2.ebuild new file mode 100644 index 000000000000..94345a8bb7ec --- /dev/null +++ b/app-crypt/monkeysphere/monkeysphere-0.36-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/monkeysphere/monkeysphere-0.36-r2.ebuild,v 1.1 2014/07/29 12:34:22 k_f Exp $ + +EAPI=5 +inherit eutils user + +DESCRIPTION="Leverage the OpenPGP web of trust for OpenSSH and Web authentication" +HOMEPAGE="http://web.monkeysphere.info/" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" +SRC_URI="mirror://debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${PV}.orig.tar.gz" +KEYWORDS="~arm ~amd64 ~x86" + +DOCS=( README Changelog ) + +# Tests fail upstream for SSH connection. Issue has been reported. +RESTRICT="test" + +DEPEND="app-crypt/gnupg + net-misc/socat + dev-perl/Crypt-OpenSSL-RSA + dev-perl/Digest-SHA1 + app-misc/lockfile-progs" + +RDEPEND="${DEPEND}" + +pkg_setup() +{ + einfo "Creating named group and user" + enewgroup monkeysphere + enewuser monkeysphere -1 -1 /var/lib/monkeysphere monkeysphere + # Using fperms and fowner in src_install leave unusable config with error + # Authentication refused: bad ownership or modes for directory /var/lib/monkeysphere + chown root:monkeysphere /var/lib/monkeysphere + chmod 751 /var/lib/monkeysphere +} + +src_prepare() +{ + epatch "${FILESDIR}/${P}_default_shell.patch"\ + "${FILESDIR}/${P}_non_default_port.patch"\ + "${FILESDIR}/${P}_userid_empty_line.patch"\ + "${FILESDIR}/${P}_openpgp2ssh_sanity_check.patch"\ + "${FILESDIR}/${P}_hd_od.patch" + + sed -i "s#share/doc/monkeysphere#share/doc/${PF}#" Makefile || die + + # Output format of gpg --check-sigs differ between 1.4 and 2.0 so test + # needs to be updated if 2.0 is used + if has_version '>=app-crypt/gnupg-2.0.0:0'; then + epatch "${FILESDIR}/${P}_tests_gnupg2.patch" + fi; +} + +src_install() +{ + default + dodir /var/lib/monkeysphere +} + +pkg_postinst() +{ + #This function is idempotent, make sure it is run at least once. + monkeysphere-authentication setup || die +} |