From eb82724af7a1b3fa5f5a5e9fae0d4a1120cb3da4 Mon Sep 17 00:00:00 2001 From: kristianf Date: Wed, 18 Dec 2013 21:32:09 +0100 Subject: [PATCH] app-crypt/monkeysphere: add sanity check that openpgp2ssh is working --- app-crypt/monkeysphere/Manifest | 3 +- ...onkeysphere-0.36_openpgp2ssh_sanity_check.patch | 50 ++++++++++++++++++++++ app-crypt/monkeysphere/monkeysphere-0.36.ebuild | 7 +-- .../libgcrypt/files/libgcrypt-1.5.0-uscore.patch | 33 ++++++++++++++ .../files/libgcrypt-multilib-syspath.patch | 23 ++++++++++ perl-core/Math-BigInt/Manifest | 3 ++ perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild | 28 ++++++++++++ ...-BigInt-1.997.0_suppress_overload_warning.patch | 21 +++++++++ 8 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 app-crypt/monkeysphere/files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch create mode 100644 dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch create mode 100644 dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch create mode 100644 perl-core/Math-BigInt/Manifest create mode 100644 perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild create mode 100644 perl-core/Math-BigInt/files/Math-BigInt-1.997.0_suppress_overload_warning.patch diff --git a/app-crypt/monkeysphere/Manifest b/app-crypt/monkeysphere/Manifest index 46e2d4b..f7a70bf 100644 --- a/app-crypt/monkeysphere/Manifest +++ b/app-crypt/monkeysphere/Manifest @@ -1,6 +1,7 @@ AUX monkeysphere-0.36_default_shell.patch 466 SHA256 637f4cf6e83ea01e5a981f940618127512ca1171498b0d03a7779d2b50e80124 SHA512 c77042e07372ae2b7434c03529a10afd5d13f99af025cecf53bd433341a3c70ada4cedd904de67090f36cd3dcd7f77f7a46b739116b1248b432803fc137fa7e8 WHIRLPOOL 295bc1d61f26f214020f1ac753a002911e2d775a6d7e46e847b091980d385245be12961b79949d77826ead3852e5058c45b512f28a44a36f20afd3a8f98538d0 AUX monkeysphere-0.36_non_default_port.patch 418 SHA256 7d20a74a0ec3d49b93d1d881d22d5d13316b4c16c709cfab23782cd0ed03b41c SHA512 2a173500e0b659a79a7274e042e49a282f708cda0f6a78ce8fa126013e35c4f6f117e606b90ce31da5158e58ab52a236038a913cc98c5ae1fc8e04a5dcbf816e WHIRLPOOL 825bfa045f03444bdd301cac503a6932d0f75c52bfa72fa8f07e79a1ba359600c8f15e7a930d349bb8c2afa4aedc5f3a6e4f22436fccbf4f60a22060a66c8c4c +AUX monkeysphere-0.36_openpgp2ssh_sanity_check.patch 1677 SHA256 5d7371ac6fbc609d0df710c44be132ff41caa8b9f5eae1fe16daa6c4b202e957 SHA512 0ba8850cfa707fbceed029f3ace6244bf0865e0b825aeefe9d89efddbeb0e12363fad3abfc867c69e8f0cb79e7d6d6a14a775c6bc0aa240473dcb1c989f50a01 WHIRLPOOL aefdcd6124c32160eff3673b33690e040a0872dd8e2074e01e678e602a8f0ed07b5d7f7bc0a8b094d7af4fe5c05f9320e2b50ec8165eb7a82c39e93c60e91887 AUX monkeysphere-0.36_userid_empty_line.patch 292 SHA256 bf3eefe21edd72ad813888bcd91a9c6cef8a90d0e5f8272f847cb278750ab787 SHA512 15b8e8ff71537e79d069d0f298326cc6705931c58ff1cf2f16c5486e587fe69f610dc1e0ebd0006e0bdef12f936685a0594dc3f9dbdadb928fba25a8e2982eb7 WHIRLPOOL bf27a00f18407a616e22340d10d15837fca21b659ab57fbd603718c49fb15533734d660ee061bc544cb281c6d4bb073aabff6c85d3f4b232b0872da512ae8964 DIST monkeysphere_0.36.orig.tar.gz 98876 SHA256 6ae4edeff2cc29b6913346e15b61500ea7cc06d761a9f42e67de83b7d2607be7 SHA512 eb6776bd9996db8a5d6a1d16b5b06e6733069cbb3cb35f4e3965508575e084c6f08576f31c71429432daf93910d145804ecf155c3d7550a0f4550a056cb4f0c8 WHIRLPOOL c163d0be77d3c6d838f752c8f53d967b17aeafd798e4fca694a31bf55628fb57d18b6a4664ca9552bd3daf3b89b6f86452d430529985ca0a31c3c4aa48470bc0 -EBUILD monkeysphere-0.36.ebuild 1201 SHA256 a7fb595b64b47c6cd9dfe8a662b249142d566017975bb472fd3b96bb085d3f35 SHA512 c44e9bfd1a7dccaf6c999a1ea59e8d8abe37b5ea4dae684180f55bcb794394f3fbf3dc1d967e1b7e656f41aeae2643cf424f4b7798450f5e07ae269b1423baa4 WHIRLPOOL 37d75ea2c67399d3161d22c01c558a1665de608d6860ff4240a4d9df83702dc88e423b6cc5726efc8ab30cce3b52d2521c3ae7c79e02cca81d1db982498559f3 +EBUILD monkeysphere-0.36.ebuild 1269 SHA256 02c536d1fafbe8aae053222cb9215e34ac4a8dd23ca4fb67b07e629acd2f7efd SHA512 40f62212aead72edafb9da7a26f9fce0d38619af5e6a2a4c8b93e363061b5bd5f04a3b908444e9a8be98d38d7d098bf4276c8b23cf3a4f63d2f9e4ce5c60b274 WHIRLPOOL 0f298db2a02d3e4d06f8d5a35c5696ada2d02b2573480fce09d5ae421636b7a564b53e558acef96e0286cc052269b6efd06a61b76c5fe10fc06a2ad4cf6dc763 MISC metadata.xml 209 SHA256 1395b5c18e78e85c534a39796fdd1d97be9e17d1800cca5e9a8b1341743f847c SHA512 ba9a5a751095aa33d737e0a6647b78f067497aad54ab0193a5aa2ec01c92a30f613ed85015f2ffda846acea85e892ea498b300f7ebae2e8f31c9cf3e4839db98 WHIRLPOOL b1d84fa003d98e38b81d14580a881417aac75958e924fcbad16cb8803b0b1e6831dc8fbfcb758d5b96e38c6f5f27bdc290bade36adb0a8d67121e169b7cbf2ff 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 0000000..12c2fb4 --- /dev/null +++ b/app-crypt/monkeysphere/files/monkeysphere-0.36_openpgp2ssh_sanity_check.patch @@ -0,0 +1,50 @@ +From c6498dd5d5703887c8b45619879e1ec33fb771d4 Mon Sep 17 00:00:00 2001 +From: Kristian Fiskerstrand +Date: Wed, 18 Dec 2013 21:28:41 +0100 +Subject: [PATCH] Add a sanity check that openpgp2ssh is working before + allowing update-users or keys-for-user to run. Failure of this can result in + a scenario where no keys are added even though they are otherwise valid. + +--- + src/monkeysphere-authentication | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication +index edc7995..d9f3f03 100755 +--- a/src/monkeysphere-authentication ++++ b/src/monkeysphere-authentication +@@ -84,6 +84,15 @@ gpg_sphere() { + su_monkeysphere_user gpg --fixed-list-mode --no-greeting --quiet --no-tty "$@" + } + ++check_openpgp2ssh_sanity() ++{ ++ su_monkeysphere_user openpgp2ssh ABC &> /dev/null ++ if [ "$?" != "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"; ++ exit ++ fi; ++} ++ + # output to stdout the core fingerprint from the gpg core secret + # keyring + core_fingerprint() { +@@ -163,6 +172,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 +181,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" + ;; +-- +1.8.3.2 + diff --git a/app-crypt/monkeysphere/monkeysphere-0.36.ebuild b/app-crypt/monkeysphere/monkeysphere-0.36.ebuild index 7e26aad..47cb002 100644 --- a/app-crypt/monkeysphere/monkeysphere-0.36.ebuild +++ b/app-crypt/monkeysphere/monkeysphere-0.36.ebuild @@ -32,9 +32,10 @@ pkg_setup() src_prepare() { - epatch "${FILESDIR}/${P}_default_shell.patch" - epatch "${FILESDIR}/${P}_non_default_port.patch" - epatch "${FILESDIR}/${P}_userid_empty_line.patch" + epatch "${FILESDIR}/${P}_default_shell.patch"\ + "${FILESDIR}/${P}_non_default_port.patch"\ + "${FILESDIR}/${P}_userid_empty_line.patch"\ + "${FILESDIR}/${P}_openpgp2ssh_sanity_check.patch" sed -i "s#share/doc/monkeysphere#share/doc/${PF}#" Makefile || die } diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch new file mode 100644 index 0000000..1d4f650 --- /dev/null +++ b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch @@ -0,0 +1,33 @@ +The version taken from GnuPG 1.4 assumes any cross-compiled package have +prefixed underscores, which is not the case; by using libtool's own macro, +we can avoid the whole issue. + +diff --git a/configure.ac b/configure.ac +index ab160c3..6df49bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -886,7 +886,7 @@ fi + # + # Setup assembler stuff. + # +-GNUPG_SYS_SYMBOL_UNDERSCORE() ++LT_SYS_SYMBOL_USCORE + AC_ARG_ENABLE(mpi-path, + AC_HELP_STRING([--enable-mpi-path=EXTRA_PATH], + [prepend EXTRA_PATH to list of CPU specific optimizations]), +diff --git a/mpi/config.links b/mpi/config.links +index 7e910ee..9696828 100644 +--- a/mpi/config.links ++++ b/mpi/config.links +@@ -291,7 +291,7 @@ fi + + # Make sysdep.h + echo '/* created by config.links - do not edit */' >./mpi/sysdep.h +-if test x$ac_cv_sys_symbol_underscore = xyes; then ++if test x$sys_symbol_underscore = xyes; then + cat <>./mpi/sysdep.h + #if __STDC__ + #define C_SYMBOL_NAME(name) _##name +-- +1.7.6.1 + diff --git a/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch b/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch new file mode 100644 index 0000000..7859851 --- /dev/null +++ b/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch @@ -0,0 +1,23 @@ +diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in +index c052638..4c8ddc3 100644 +--- a/src/libgcrypt-config.in ++++ b/src/libgcrypt-config.in +@@ -154,9 +154,12 @@ if test "$echo_libs" = "yes"; then + libs_final="$libs" + + # Set up `libdirs'. +- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then +- libdirs="-L$libdir" +- fi ++ case "$libdir" in ++ /usr/lib|/usr/lib64|/lib|/lib64) ;; ++ *) ++ libdirs="-L$libdir" ++ ;; ++ esac + + # Set up `libs_final'. + libs_final="$libs_final $gpg_error_libs" +-- +1.7.6.1 + diff --git a/perl-core/Math-BigInt/Manifest b/perl-core/Math-BigInt/Manifest new file mode 100644 index 0000000..e83691c --- /dev/null +++ b/perl-core/Math-BigInt/Manifest @@ -0,0 +1,3 @@ +AUX Math-BigInt-1.997.0_suppress_overload_warning.patch 883 SHA256 8cefeffe723083d14cdd639b81874076cfd5d4744d09d066e1452016d1df096c SHA512 ef787d63286c263189fe27a2800da530228f06e8e938b596e40054345ba53e52d8c8cbe8f38a7bcd72aa73346877b5ae03686969074dc78e2b71759da04889d6 WHIRLPOOL 317d34f6669eece6b5b1969afaf307413675d53be4ae22794162480547cca881fedf9c079e975d8aa5c0bf8571a2b94548237017b41e9ad8be274c21c683ebac +DIST Math-BigInt-1.997.tar.gz 213533 SHA256 a80b0c77e650ff5ca85203f464be297dbac3f61c5c6e50bf77c99a5bf850099a SHA512 4cd62a5a3df3c6a71f32be2b3ffd8efb8420da1b6a4027f480566342620ca0f0183aa32b22546d7d2fb7997e0ccb2626efa88fb3df7edad7bbf946ce49d3baa0 WHIRLPOOL 50268a508a8f6833b4f42123651204e32464fbb1e3810d2614990bfaab9cc8fb7d401ede974ab10765fbf620ec4592b5f3e001622cac4efe7275f9a0ef4d6355 +EBUILD Math-BigInt-1.997.0.ebuild 766 SHA256 a7ef1ce0d06609658f3429624ed0eadc9ab505136b293f40ad660f539848186f SHA512 51554348c09ba4600d3c90b6e6a01b20ec3128c52c8d7498b3087c21c9426acd76470c6bfd8ecb8fcc4f12c9c841a6c3e9c68a3d890355e737965e714459ac05 WHIRLPOOL 7d44bfab783230c2b1d021773d79e9873f8980ce4573174d712b31d421953b99eddb39b8049a3062a43f791c7b41af5efac6481ed8e8fd73e8e65328f596db46 diff --git a/perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild b/perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild new file mode 100644 index 0000000..7112853 --- /dev/null +++ b/perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/perl-core/Math-BigInt/Math-BigInt-1.997.0.ebuild,v 1.1 2011/09/05 17:13:28 tove Exp $ + +EAPI=4 + +MODULE_AUTHOR=PJACKLAM +MODULE_VERSION=1.997 +inherit perl-module eutils + +DESCRIPTION="Arbitrary size floating point math package" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~ppc-macos ~x86-solaris" +IUSE="" + +RDEPEND=">=virtual/perl-Scalar-List-Utils-1.140.0" +DEPEND="${RDEPEND}" + +PDEPEND=">=virtual/perl-Math-BigInt-FastCalc-0.270.0 + >=perl-core/bignum-0.220.0 + >=perl-core/Math-BigRat-0.260.200" + +SRC_TEST="do" + +src_prepare() { + epatch "${FILESDIR}/${P}_suppress_overload_warning.patch" +} diff --git a/perl-core/Math-BigInt/files/Math-BigInt-1.997.0_suppress_overload_warning.patch b/perl-core/Math-BigInt/files/Math-BigInt-1.997.0_suppress_overload_warning.patch new file mode 100644 index 0000000..d62e869 --- /dev/null +++ b/perl-core/Math-BigInt/files/Math-BigInt-1.997.0_suppress_overload_warning.patch @@ -0,0 +1,21 @@ +diff -u Math-BigInt-1.997/lib/Math/BigInt.pm Math-BigInt-1.997-r1/lib/Math/BigInt.pm +--- Math-BigInt-1.997/lib/Math/BigInt.pm 2011-09-03 02:26:41.000000000 -0400 ++++ Math-BigInt-1.997-r1/lib/Math/BigInt.pm 2012-07-17 20:32:26.630203065 -0400 +@@ -40,6 +40,9 @@ + # Thus inheritance of overload operators becomes possible and transparent for + # our subclasses without the need to repeat the entire overload section there. + ++# https://github.com/ilmari/perl/commit/5e0688b6067afdfb59fdfa9923e658ed40c9f246 ++# We register ops that are not registerable yet, so suppress warnings ++{ no warnings; + use overload + '=' => sub { $_[0]->copy(); }, + +@@ -151,6 +154,7 @@ + '""' => sub { $_[0]->bstr(); }, + '0+' => sub { $_[0]->numify(); } + ; ++} # no warnings scope + + ############################################################################## + # global constants, flags and accessory -- 2.16.4