From 28156e43673288ecfb9d43b1aecfd01256c71585 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 21 Feb 2021 17:28:36 -0800 Subject: nettle: Upgrade to 3.7.1 bugfix release [1] [1] https://lists.gnu.org/archive/html/info-gnu/2021-02/msg00011.html Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...d-target-to-only-build-tests-not-run-them.patch | 45 ----------------- ...k-header-files-of-openssl-only-if-enable_.patch | 36 -------------- .../nettle/nettle-3.7/dlopen-test.patch | 29 ----------- meta/recipes-support/nettle/nettle-3.7/run-ptest | 36 -------------- ...d-target-to-only-build-tests-not-run-them.patch | 45 +++++++++++++++++ ...k-header-files-of-openssl-only-if-enable_.patch | 36 ++++++++++++++ .../nettle/nettle/dlopen-test.patch | 29 +++++++++++ meta/recipes-support/nettle/nettle/run-ptest | 36 ++++++++++++++ meta/recipes-support/nettle/nettle_3.7.1.bb | 56 ++++++++++++++++++++++ meta/recipes-support/nettle/nettle_3.7.bb | 56 ---------------------- 10 files changed, 202 insertions(+), 202 deletions(-) delete mode 100644 meta/recipes-support/nettle/nettle-3.7/Add-target-to-only-build-tests-not-run-them.patch delete mode 100644 meta/recipes-support/nettle/nettle-3.7/check-header-files-of-openssl-only-if-enable_.patch delete mode 100644 meta/recipes-support/nettle/nettle-3.7/dlopen-test.patch delete mode 100644 meta/recipes-support/nettle/nettle-3.7/run-ptest create mode 100644 meta/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch create mode 100644 meta/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch create mode 100644 meta/recipes-support/nettle/nettle/dlopen-test.patch create mode 100644 meta/recipes-support/nettle/nettle/run-ptest create mode 100644 meta/recipes-support/nettle/nettle_3.7.1.bb delete mode 100644 meta/recipes-support/nettle/nettle_3.7.bb diff --git a/meta/recipes-support/nettle/nettle-3.7/Add-target-to-only-build-tests-not-run-them.patch b/meta/recipes-support/nettle/nettle-3.7/Add-target-to-only-build-tests-not-run-them.patch deleted file mode 100644 index e3f5c6de7d..0000000000 --- a/meta/recipes-support/nettle/nettle-3.7/Add-target-to-only-build-tests-not-run-them.patch +++ /dev/null @@ -1,45 +0,0 @@ -Add target to only build tests (not run them) - -Not sending upstream as this is only a start of a solution to -installable tests: It's useful for us already as is. - -Upstream-Status: Inappropriate [not a complete solution] - -Signed-off-by: Jussi Kukkonen -Refactored for 3.4 -Signed-off-by: Armin Kuster ---- - Makefile.in | 3 +++ - testsuite/Makefile.in | 2 ++ - 2 files changed, 5 insertions(+) - -diff --git a/Makefile.in b/Makefile.in -index e5ccfc7..15c9275 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -52,6 +52,9 @@ clean distclean mostlyclean maintainer-clean tags: - echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done - $(MAKE) $@-here - -+buildtest: -+ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@) -+ - check-here: - true - -diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in -index 3f5e5f6..8fd68a3 100644 ---- a/testsuite/Makefile.in -+++ b/testsuite/Makefile.in -@@ -122,6 +122,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ - # data. - VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes - -+buildtest: $(TS_ALL) -+ - check: $(TS_ALL) - TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \ - srcdir="$(srcdir)" \ --- -2.17.1 - diff --git a/meta/recipes-support/nettle/nettle-3.7/check-header-files-of-openssl-only-if-enable_.patch b/meta/recipes-support/nettle/nettle-3.7/check-header-files-of-openssl-only-if-enable_.patch deleted file mode 100644 index d5f266681e..0000000000 --- a/meta/recipes-support/nettle/nettle-3.7/check-header-files-of-openssl-only-if-enable_.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001 -From: Haiqing Bai -Date: Fri, 9 Dec 2016 15:23:17 +0800 -Subject: [PATCH] nettle: check header files of openssl only if - 'enable_openssl=yes'. - -The original configure script checks openssl header files to generate -config.h even if 'enable_openssl' is not set to yes, this made inconsistent -building for nettle. - -Upstream-Status: Pending -Signed-off-by: Haiqing Bai - -refactored for 3.4. pending not in as of 3.4 - -Signed-off-by: Armin Kuster - -Index: nettle-3.4/configure.ac -=================================================================== ---- nettle-3.4.orig/configure.ac -+++ nettle-3.4/configure.ac -@@ -185,9 +185,11 @@ AC_HEADER_TIME - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(size_t) - --AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],, --[enable_openssl=no -- break]) -+if test "x$enable_openssl" = "xyes"; then -+ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],, -+ [enable_openssl=no -+ break]) -+fi - - # For use by the testsuite - AC_CHECK_HEADERS([valgrind/memcheck.h]) diff --git a/meta/recipes-support/nettle/nettle-3.7/dlopen-test.patch b/meta/recipes-support/nettle/nettle-3.7/dlopen-test.patch deleted file mode 100644 index ab9b91f88b..0000000000 --- a/meta/recipes-support/nettle/nettle-3.7/dlopen-test.patch +++ /dev/null @@ -1,29 +0,0 @@ -Remove the relative path for libnettle.so so the test -program can find it. -Relative paths are not suitable, as the folder strucure for ptest -is different from the one expected by the nettle testsuite. - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Juro Bystricky -Signed-off-by: Mingli Yu ---- - testsuite/dlopen-test.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c -index 4265bf7..1a25d17 100644 ---- a/testsuite/dlopen-test.c -+++ b/testsuite/dlopen-test.c -@@ -15,7 +15,7 @@ int - main (int argc UNUSED, char **argv UNUSED) - { - #if HAVE_LIBDL -- void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW); -+ void *handle = dlopen ("libnettle.so", RTLD_NOW); - int (*get_version)(void); - if (!handle) - { --- -2.17.1 - diff --git a/meta/recipes-support/nettle/nettle-3.7/run-ptest b/meta/recipes-support/nettle/nettle-3.7/run-ptest deleted file mode 100644 index b90bed66d2..0000000000 --- a/meta/recipes-support/nettle/nettle-3.7/run-ptest +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh - -cd testsuite - -failed=0 -all=0 - -for f in *-test; do - if [ "$f" = "sha1-huge-test" ] ; then - echo "SKIP: $f (skipped for ludicrous run time)" - continue - fi - - "./$f" - case "$?" in - 0) - echo "PASS: $f" - all=$((all + 1)) - ;; - 77) - echo "SKIP: $f" - ;; - *) - echo "FAIL: $f" - failed=$((failed + 1)) - all=$((all + 1)) - ;; - esac -done - -if [ "$failed" -eq 0 ] ; then - echo "All $all tests passed" -else - echo "$failed of $all tests failed" -fi - diff --git a/meta/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch b/meta/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch new file mode 100644 index 0000000000..e3f5c6de7d --- /dev/null +++ b/meta/recipes-support/nettle/nettle/Add-target-to-only-build-tests-not-run-them.patch @@ -0,0 +1,45 @@ +Add target to only build tests (not run them) + +Not sending upstream as this is only a start of a solution to +installable tests: It's useful for us already as is. + +Upstream-Status: Inappropriate [not a complete solution] + +Signed-off-by: Jussi Kukkonen +Refactored for 3.4 +Signed-off-by: Armin Kuster +--- + Makefile.in | 3 +++ + testsuite/Makefile.in | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/Makefile.in b/Makefile.in +index e5ccfc7..15c9275 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -52,6 +52,9 @@ clean distclean mostlyclean maintainer-clean tags: + echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done + $(MAKE) $@-here + ++buildtest: ++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@) ++ + check-here: + true + +diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in +index 3f5e5f6..8fd68a3 100644 +--- a/testsuite/Makefile.in ++++ b/testsuite/Makefile.in +@@ -122,6 +122,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ + # data. + VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes + ++buildtest: $(TS_ALL) ++ + check: $(TS_ALL) + TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \ + srcdir="$(srcdir)" \ +-- +2.17.1 + diff --git a/meta/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch b/meta/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch new file mode 100644 index 0000000000..d5f266681e --- /dev/null +++ b/meta/recipes-support/nettle/nettle/check-header-files-of-openssl-only-if-enable_.patch @@ -0,0 +1,36 @@ +From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001 +From: Haiqing Bai +Date: Fri, 9 Dec 2016 15:23:17 +0800 +Subject: [PATCH] nettle: check header files of openssl only if + 'enable_openssl=yes'. + +The original configure script checks openssl header files to generate +config.h even if 'enable_openssl' is not set to yes, this made inconsistent +building for nettle. + +Upstream-Status: Pending +Signed-off-by: Haiqing Bai + +refactored for 3.4. pending not in as of 3.4 + +Signed-off-by: Armin Kuster + +Index: nettle-3.4/configure.ac +=================================================================== +--- nettle-3.4.orig/configure.ac ++++ nettle-3.4/configure.ac +@@ -185,9 +185,11 @@ AC_HEADER_TIME + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(size_t) + +-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],, +-[enable_openssl=no +- break]) ++if test "x$enable_openssl" = "xyes"; then ++ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],, ++ [enable_openssl=no ++ break]) ++fi + + # For use by the testsuite + AC_CHECK_HEADERS([valgrind/memcheck.h]) diff --git a/meta/recipes-support/nettle/nettle/dlopen-test.patch b/meta/recipes-support/nettle/nettle/dlopen-test.patch new file mode 100644 index 0000000000..ab9b91f88b --- /dev/null +++ b/meta/recipes-support/nettle/nettle/dlopen-test.patch @@ -0,0 +1,29 @@ +Remove the relative path for libnettle.so so the test +program can find it. +Relative paths are not suitable, as the folder strucure for ptest +is different from the one expected by the nettle testsuite. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Juro Bystricky +Signed-off-by: Mingli Yu +--- + testsuite/dlopen-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c +index 4265bf7..1a25d17 100644 +--- a/testsuite/dlopen-test.c ++++ b/testsuite/dlopen-test.c +@@ -15,7 +15,7 @@ int + main (int argc UNUSED, char **argv UNUSED) + { + #if HAVE_LIBDL +- void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW); ++ void *handle = dlopen ("libnettle.so", RTLD_NOW); + int (*get_version)(void); + if (!handle) + { +-- +2.17.1 + diff --git a/meta/recipes-support/nettle/nettle/run-ptest b/meta/recipes-support/nettle/nettle/run-ptest new file mode 100644 index 0000000000..b90bed66d2 --- /dev/null +++ b/meta/recipes-support/nettle/nettle/run-ptest @@ -0,0 +1,36 @@ +#! /bin/sh + +cd testsuite + +failed=0 +all=0 + +for f in *-test; do + if [ "$f" = "sha1-huge-test" ] ; then + echo "SKIP: $f (skipped for ludicrous run time)" + continue + fi + + "./$f" + case "$?" in + 0) + echo "PASS: $f" + all=$((all + 1)) + ;; + 77) + echo "SKIP: $f" + ;; + *) + echo "FAIL: $f" + failed=$((failed + 1)) + all=$((all + 1)) + ;; + esac +done + +if [ "$failed" -eq 0 ] ; then + echo "All $all tests passed" +else + echo "$failed of $all tests failed" +fi + diff --git a/meta/recipes-support/nettle/nettle_3.7.1.bb b/meta/recipes-support/nettle/nettle_3.7.1.bb new file mode 100644 index 0000000000..d6bb1c84c6 --- /dev/null +++ b/meta/recipes-support/nettle/nettle_3.7.1.bb @@ -0,0 +1,56 @@ +SUMMARY = "A low level cryptographic library" +HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/" +DESCRIPTION = "It tries to solve a problem of providing a common set of \ +cryptographic algorithms for higher-level applications by implementing a \ +context-independent set of cryptographic algorithms" +SECTION = "libs" +LICENSE = "LGPLv3+ | GPLv2+" + +LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \ + file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e" + +DEPENDS += "gmp" + +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://Add-target-to-only-build-tests-not-run-them.patch \ + file://run-ptest \ + file://check-header-files-of-openssl-only-if-enable_.patch \ + " + +SRC_URI_append_class-target = "\ + file://dlopen-test.patch \ + " + +SRC_URI[sha256sum] = "156621427c7b00a75ff9b34b770b95d34f80ef7a55c3407de94b16cbf436c42e" + +UPSTREAM_CHECK_REGEX = "nettle-(?P\d+(\.\d+)+)\.tar" + +inherit autotools ptest multilib_header + +EXTRA_AUTORECONF += "--exclude=aclocal" + +EXTRA_OECONF = "--disable-openssl" + +do_compile_ptest() { + oe_runmake buildtest +} + +do_install_append() { + oe_multilib_header nettle/version.h +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/testsuite/ + install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/ + install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ + # tools can be found in PATH, not in ../tools/ + sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test + install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ +} + +RDEPENDS_${PN}-ptest += "${PN}-dev" +INSANE_SKIP_${PN}-ptest += "dev-deps" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/nettle/nettle_3.7.bb b/meta/recipes-support/nettle/nettle_3.7.bb deleted file mode 100644 index 2c219c2a12..0000000000 --- a/meta/recipes-support/nettle/nettle_3.7.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "A low level cryptographic library" -HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/" -DESCRIPTION = "It tries to solve a problem of providing a common set of \ -cryptographic algorithms for higher-level applications by implementing a \ -context-independent set of cryptographic algorithms" -SECTION = "libs" -LICENSE = "LGPLv3+ | GPLv2+" - -LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \ - file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e" - -DEPENDS += "gmp" - -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://Add-target-to-only-build-tests-not-run-them.patch \ - file://run-ptest \ - file://check-header-files-of-openssl-only-if-enable_.patch \ - " - -SRC_URI_append_class-target = "\ - file://dlopen-test.patch \ - " - -SRC_URI[sha256sum] = "f001f64eb444bf13dd91bceccbc20acbc60c4311d6e2b20878452eb9a9cec75a" - -UPSTREAM_CHECK_REGEX = "nettle-(?P\d+(\.\d+)+)\.tar" - -inherit autotools ptest multilib_header - -EXTRA_AUTORECONF += "--exclude=aclocal" - -EXTRA_OECONF = "--disable-openssl" - -do_compile_ptest() { - oe_runmake buildtest -} - -do_install_append() { - oe_multilib_header nettle/version.h -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/testsuite/ - install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/ - install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ - # tools can be found in PATH, not in ../tools/ - sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test - install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/ -} - -RDEPENDS_${PN}-ptest += "${PN}-dev" -INSANE_SKIP_${PN}-ptest += "dev-deps" - -BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg