dev-libs/xmlsec: version bump
authorAlon Bar-Lev <alonbl@gentoo.org>
Tue, 16 Apr 2019 20:23:29 +0000 (23:23 +0300)
committerAlon Bar-Lev <alonbl@gentoo.org>
Tue, 16 Apr 2019 20:24:59 +0000 (23:24 +0300)
Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

dev-libs/xmlsec/Manifest
dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch [new file with mode: 0644]
dev-libs/xmlsec/xmlsec-1.2.26.ebuild
dev-libs/xmlsec/xmlsec-1.2.28.ebuild [new file with mode: 0644]

index 7b78da91ee148463a2caf7c67c75c5282e023da1..e8c42b63e1d77368b91a9839729f626da8f4c906 100644 (file)
@@ -1,2 +1,3 @@
 DIST xmlsec1-1.2.26.tar.gz 1922183 BLAKE2B 8cb8557a7d24df756655a7dfa45091445adc89cb67169a7620d9d1116f3fb3d982ea45199a53475e29300478c07e8e1168cec79cf9c3b5ff1dd6c840123b982b SHA512 1e3dc3c8c192eefee7b055787bef52ce3bcfafa786224f68af065aa45f4d7da93232da973359b3135615c5981ad4df7c124047d3934e552ab78439472685a7a4
 DIST xmlsec1-1.2.27.tar.gz 2013651 BLAKE2B fa46a25e3aaef432134d1c98a0e7bf0aba83f2ef6d1aff3774d6d37c5f6f392d1c2c11a0fe433ee910c39b56400c96b74ab061577948622b14a1116fa1ec2947 SHA512 01f7231d7d7ac8037aecc1f922acc572cbfe0903abf5bd5879d836438c36684e23402b803d20806fff6b1cdc5ad9af114d1341b10b336f71c0bce28b4716f920
+DIST xmlsec1-1.2.28.tar.gz 1995599 BLAKE2B 5d90646d9a72024856da2638adb6d0d00d5142f8d3eaa5b12a993e2e6ae78ad49aab69822ebe331191bf1fc5b98431b85e113545aec84e2bb7d5c5add9028df0 SHA512 17fa59e4ffee5e024caa4895e8ed21d1435f14e3a37d0ed781b1dd216333ae3b6099c460efd45d4a8097d0202522150b7b0ad543b47c1596d8473b6922270480
diff --git a/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch b/dev-libs/xmlsec/files/xmlsec-1.2.28-test.patch
new file mode 100644 (file)
index 0000000..fa1fa60
--- /dev/null
@@ -0,0 +1,121 @@
+From 9d5f2d172ab91fd9fb2c2eddaee86ba62eab2d67 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 16 Apr 2019 23:07:08 +0300
+Subject: [PATCH] tests: workout test --X509-skip-strict-checks
+
+The --X509-skip-strict-checks parameter is not accepted by all commands,
+result of skipping many tests.
+
+Reduce impact of the --X509-skip-strict-checks to a workaround to gnutls only.
+
+Filter double --X509-skip-strict-checks commands as cli does not accept
+multiple instances.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ tests/testrun.sh | 37 ++++++++++++++++++++++---------------
+ 1 file changed, 22 insertions(+), 15 deletions(-)
+
+diff --git a/tests/testrun.sh b/tests/testrun.sh
+index ea65802b..35f4a780 100755
+--- a/tests/testrun.sh
++++ b/tests/testrun.sh
+@@ -59,7 +59,11 @@ if [ "z$XMLSEC_DEFAULT_CRYPTO" != "z" ] ; then
+ elif [ "z$crypto" != "z" ] ; then
+     xmlsec_params="$xmlsec_params --crypto $crypto"
+ fi
+-xmlsec_params="$xmlsec_params --X509-skip-strict-checks --crypto-config $crypto_config"
++xmlsec_params="$xmlsec_params --crypto-config $crypto_config"
++xmlsec_x509_params=
++if [ "z${crypto}" = zgnutls ]; then
++    xmlsec_x509_params="--X509-skip-strict-checks"
++fi
+ #
+ # Setup keys config
+@@ -218,8 +222,8 @@ execKeysTest() {
+     if [ -f $keysfile ] ; then
+         params="$params --keys-file $keysfile"
+     fi
+-    echo "$VALGRIND $xmlsec_app keys $params $xmlsec_params $keysfile" >>  $curlogfile 
+-    $VALGRIND $xmlsec_app keys $params $xmlsec_params $keysfile >> $curlogfile 2>> $curlogfile
++    echo "$VALGRIND $xmlsec_app keys $params $xmlsec_x509_params $xmlsec_params $keysfile" >>  $curlogfile
++    $VALGRIND $xmlsec_app keys $params $xmlsec_x509_params $xmlsec_params $keysfile >> $curlogfile 2>> $curlogfile
+     printRes $expected_res $?
+     if [ $? != 0 ]; then
+         failures=`expr $failures + 1`
+@@ -307,9 +311,10 @@ execDSigTest() {
+     # run tests
+     if [ -n "$params1" ] ; then
++        echo "$params1" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params"
+         printf "    Verify existing signature                            "
+-        echo "$VALGRIND $xmlsec_app verify $xmlsec_params $params1 $full_file.xml" >> $curlogfile
+-        $VALGRIND $xmlsec_app verify $xmlsec_params $params1 $full_file.xml >> $curlogfile 2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params1 $full_file.xml" >> $curlogfile
++        $VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params1 $full_file.xml >> $curlogfile 2>> $curlogfile
+         printRes $expected_res $?
+         if [ $? != 0 ]; then
+             failures=`expr $failures + 1`
+@@ -317,9 +322,10 @@ execDSigTest() {
+     fi
+     if [ -n "$params2" -a -z "$PERF_TEST" ] ; then
++        echo "$params2" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params"
+         printf "    Create new signature                                 "
+-        echo "$VALGRIND $xmlsec_app sign $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile
+-        $VALGRIND $xmlsec_app sign $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app sign $_xmlsec_x509_params $_xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >> $curlogfile
++        $VALGRIND $xmlsec_app sign $_xmlsec_x509_params $_xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile
+         printRes $res_success $?
+         if [ $? != 0 ]; then
+             failures=`expr $failures + 1`
+@@ -327,9 +333,10 @@ execDSigTest() {
+     fi
+     if [ -n "$params3" -a -z "$PERF_TEST" ] ; then
++        echo "$params3" | grep -q -- "$xmlsec_x509_params" && _xmlsec_x509_params= || _xmlsec_x509_params="$xmlsec_x509_params"
+         printf "    Verify new signature                                 "
+-        echo "$VALGRIND $xmlsec_app verify $xmlsec_params $params3 $tmpfile" >> $curlogfile
+-        $VALGRIND $xmlsec_app verify $xmlsec_params $params3 $tmpfile >> $curlogfile 2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params3 $tmpfile" >> $curlogfile
++        $VALGRIND $xmlsec_app verify $_xmlsec_x509_params $xmlsec_params $params3 $tmpfile >> $curlogfile 2>> $curlogfile
+         printRes $res_success $?
+         if [ $? != 0 ]; then
+             failures=`expr $failures + 1`
+@@ -406,8 +413,8 @@ execEncTest() {
+     if [ -n "$params1" ] ; then
+         rm -f $tmpfile
+         printf "    Decrypt existing document                            "
+-        echo "$VALGRIND $xmlsec_app decrypt $xmlsec_params $params1 $full_file.xml" >>  $curlogfile 
+-        $VALGRIND $xmlsec_app decrypt $xmlsec_params $params1 --output $tmpfile $full_file.xml >> $curlogfile  2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params1 $full_file.xml" >>  $curlogfile
++        $VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params1 --output $tmpfile $full_file.xml >> $curlogfile  2>> $curlogfile
+         res=$?
+         echo "=== TEST RESULT: $res; expected: $expected_res" >> $curlogfile
+         if [ $res = 0 -a "$expected_res" = "$res_success" ]; then
+@@ -428,8 +435,8 @@ execEncTest() {
+     if [ -n "$params2" -a -z "$PERF_TEST" ] ; then
+         rm -f $tmpfile
+         printf "    Encrypt document                                     "
+-        echo "$VALGRIND $xmlsec_app encrypt $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >>  $curlogfile 
+-        $VALGRIND $xmlsec_app encrypt $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app encrypt $xmlsec_x509_params $xmlsec_params $params2 --output $tmpfile $full_file.tmpl" >>  $curlogfile
++        $VALGRIND $xmlsec_app encrypt $xmlsec_x509_params $xmlsec_params $params2 --output $tmpfile $full_file.tmpl >> $curlogfile 2>> $curlogfile
+         printRes $res_success $?
+         if [ $? != 0 ]; then
+             failures=`expr $failures + 1`
+@@ -439,8 +446,8 @@ execEncTest() {
+     if [ -n "$params3" -a -z "$PERF_TEST" ] ; then 
+         rm -f $tmpfile.2
+         printf "    Decrypt new document                                 "
+-        echo "$VALGRIND $xmlsec_app decrypt $xmlsec_params $params3 --output $tmpfile.2 $tmpfile" >>  $curlogfile
+-        $VALGRIND $xmlsec_app decrypt $xmlsec_params $params3 --output $tmpfile.2 $tmpfile >> $curlogfile 2>> $curlogfile
++        echo "$VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params3 --output $tmpfile.2 $tmpfile" >>  $curlogfile
++        $VALGRIND $xmlsec_app decrypt $xmlsec_x509_params $xmlsec_params $params3 --output $tmpfile.2 $tmpfile >> $curlogfile 2>> $curlogfile
+         res=$?
+         if [ $res = 0 ]; then
+             if [ "z$outputTransform" != "z" ] ; then
+-- 
+2.21.0
+
index f8f0ce257d5158be8d05bcdc7b02baecc79e85ce..16f8db947c10480a0c6df65a75853ae1d85d38fd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
diff --git a/dev-libs/xmlsec/xmlsec-1.2.28.ebuild b/dev-libs/xmlsec/xmlsec-1.2.28.ebuild
new file mode 100644 (file)
index 0000000..1e5834c
--- /dev/null
@@ -0,0 +1,74 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Command line tool for signing, verifying, encrypting and decrypting XML"
+HOMEPAGE="https://www.aleksey.com/xmlsec"
+SRC_URI="https://www.aleksey.com/xmlsec/download/${PN}1-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc gcrypt gnutls libressl nss +openssl static-libs test"
+REQUIRED_USE="|| ( gcrypt gnutls nss openssl )
+       gnutls? ( gcrypt )"
+
+RDEPEND=">=dev-libs/libxml2-2.7.4:=
+       >=dev-libs/libxslt-1.0.20:=
+       gcrypt? ( >=dev-libs/libgcrypt-1.4.0:0= )
+       gnutls? ( >=net-libs/gnutls-2.8.0:= )
+       nss? (
+               >=dev-libs/nspr-4.4.1:=
+               >=dev-libs/nss-3.9:=
+       )
+       openssl? (
+               !libressl? ( dev-libs/openssl:0= )
+               libressl? ( dev-libs/libressl:0= )
+       )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+       test? (
+               nss? (
+                       >=dev-libs/nss-3.9[utils]
+               )
+       )"
+
+S="${WORKDIR}/${PN}1-${PV}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-test.patch"
+)
+
+src_prepare() {
+       default
+       # conditionally install extra documentation
+       if ! use doc ; then
+               sed -i '/^SUBDIRS/s/docs//' Makefile.am || die
+               eautoreconf
+       fi
+}
+
+src_configure() {
+       econf \
+               --enable-pkgconfig \
+               --with-html-dir=/usr/share/doc/${PF}/html \
+               $(use_enable static-libs static) \
+               $(use_with gcrypt) \
+               $(use_with gnutls) \
+               $(use_with nss) \
+               $(use_with nss nspr) \
+               $(use_with openssl) \
+               $(use_enable openssl aes)
+}
+
+src_test() {
+       emake TMPFOLDER="${T}" check
+}
+
+src_install() {
+       default
+       find "${D}" -name '*.la' -delete || die
+}