From 25f6d2bf18436755f8989984cac1fbc1d56c01c6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 19 Feb 2023 20:30:31 +0100 Subject: gnutls: update 3.7.8 -> 3.8.0 Refresh patches. guile option removed upstream. License-update: formatting, urls https://github.com/gnutls/gnutls/commit/a39e528897184c6f6a33d245b82891a8dc8090ce (From OE-Core rev: 016025f1c77b9ffc00213e6056c5134f353ff541) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- ...mac-file-should-be-excuted-in-target-envi.patch | 21 +++-- .../gnutls/gnutls/Add-ptest-support.patch | 14 ++-- meta/recipes-support/gnutls/gnutls/arm_eabi.patch | 8 +- meta/recipes-support/gnutls/gnutls_3.7.8.bb | 96 ---------------------- meta/recipes-support/gnutls/gnutls_3.8.0.bb | 95 +++++++++++++++++++++ 5 files changed, 115 insertions(+), 119 deletions(-) delete mode 100644 meta/recipes-support/gnutls/gnutls_3.7.8.bb create mode 100644 meta/recipes-support/gnutls/gnutls_3.8.0.bb diff --git a/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch b/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch index e40b2be362..87ebd8059e 100644 --- a/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch +++ b/meta/recipes-support/gnutls/gnutls/0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch @@ -1,4 +1,4 @@ -From b729a356538d499fe25e82bfc78ea663bdaca0a8 Mon Sep 17 00:00:00 2001 +From 21a8295bac3805e4490ba2b5f136e7f4c121061b Mon Sep 17 00:00:00 2001 From: Lei Maohui Date: Mon, 23 May 2022 10:44:43 +0900 Subject: [PATCH] Creating .hmac file should be excuted in target environment, @@ -6,23 +6,22 @@ Subject: [PATCH] Creating .hmac file should be excuted in target environment, Upstream-Status: Inappropriate [https://gitlab.com/gnutls/gnutls/-/issues/1373] Signed-off-by: Lei Maohui + --- lib/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am -index 0b43ef9..cf263f0 100644 +index 6d4e8d2..24ef108 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am -@@ -206,8 +206,7 @@ hmac_files = .libs/.gnutls.hmac - - all-local: $(hmac_files) - --.libs/.gnutls.hmac: libgnutls.la fipshmac +@@ -206,8 +206,7 @@ hmac_file = .libs/.$(gnutls_so).hmac + + all-local: $(hmac_file) + +-$(hmac_file): libgnutls.la fipshmac - $(AM_V_GEN) $(builddir)/fipshmac > $@-t && mv $@-t $@ +.libs/.gnutls.hmac: - - CLEANFILES = $(hmac_files) + + CLEANFILES = $(hmac_file) endif --- -2.25.1 diff --git a/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch b/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch index 8ad6ba5ad5..f87cf536fa 100644 --- a/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch +++ b/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch @@ -1,10 +1,11 @@ -From 74080376904713a8e6cceefbc25c81512796bf0c Mon Sep 17 00:00:00 2001 +From 81861f7ba690956c064ebe8dce6c313951fa2a9f Mon Sep 17 00:00:00 2001 From: Ravineet Singh Date: Tue, 10 Jan 2023 16:11:10 +0100 Subject: [PATCH] gnutls: add ptest support Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Ravineet Singh + --- Makefile.am | 3 +++ configure.ac | 2 ++ @@ -12,7 +13,7 @@ Signed-off-by: Ravineet Singh 3 files changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am -index 843193f9f..816b09fec 100644 +index 843193f..816b09f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -191,6 +191,9 @@ dist-hook: @@ -26,7 +27,7 @@ index 843193f9f..816b09fec 100644 include $(top_srcdir)/cligen/cligen.mk diff --git a/configure.ac b/configure.ac -index baff1c007..f9f596abf 100644 +index b25ba14..860ddef 100644 --- a/configure.ac +++ b/configure.ac @@ -1150,6 +1150,8 @@ AC_SUBST(LIBGNUTLS_CFLAGS) @@ -39,10 +40,10 @@ index baff1c007..f9f596abf 100644 hw_features= diff --git a/tests/Makefile.am b/tests/Makefile.am -index 573e911a0..e8a26f8b9 100644 +index d530ad0..71c592f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -644,6 +644,12 @@ SH_LOG_COMPILER = $(SHELL) +@@ -648,6 +648,12 @@ SH_LOG_COMPILER = $(SHELL) AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind LOG_COMPILER = $(LOG_VALGRIND) @@ -55,6 +56,3 @@ index 573e911a0..e8a26f8b9 100644 distclean-local: rm -rf softhsm-*.db softhsm-*.config *.tmp tmp-* x509-crt-list-import-url.config.db port.lock.d --- -2.31.1 - diff --git a/meta/recipes-support/gnutls/gnutls/arm_eabi.patch b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch index 6eb1edbdb1..2b61a703cb 100644 --- a/meta/recipes-support/gnutls/gnutls/arm_eabi.patch +++ b/meta/recipes-support/gnutls/gnutls/arm_eabi.patch @@ -1,4 +1,4 @@ -From 8a5c96057cf305bbeac0d6e0e59ee24fbb9497fe Mon Sep 17 00:00:00 2001 +From 911213d9f72ddce468322d22d223127b93964409 Mon Sep 17 00:00:00 2001 From: Joe Slater Date: Wed, 25 Jan 2017 13:52:59 -0800 Subject: [PATCH] gnutls: account for ARM_EABI @@ -15,10 +15,10 @@ Signed-off-by: Joe Slater 1 file changed, 2 insertions(+) diff --git a/tests/seccomp.c b/tests/seccomp.c -index ed14d00..3c5b726 100644 +index a3148fe..443bc5f 100644 --- a/tests/seccomp.c +++ b/tests/seccomp.c -@@ -53,7 +53,9 @@ int disable_system_calls(void) +@@ -52,7 +52,9 @@ int disable_system_calls(void) ADD_SYSCALL(nanosleep, 0); ADD_SYSCALL(clock_nanosleep, 0); @@ -27,4 +27,4 @@ index ed14d00..3c5b726 100644 +#endif ADD_SYSCALL(getpid, 0); ADD_SYSCALL(gettimeofday, 0); - #if defined(HAVE_CLOCK_GETTIME) + # if defined(HAVE_CLOCK_GETTIME) diff --git a/meta/recipes-support/gnutls/gnutls_3.7.8.bb b/meta/recipes-support/gnutls/gnutls_3.7.8.bb deleted file mode 100644 index fee06393bd..0000000000 --- a/meta/recipes-support/gnutls/gnutls_3.7.8.bb +++ /dev/null @@ -1,96 +0,0 @@ -SUMMARY = "GNU Transport Layer Security Library" -DESCRIPTION = "a secure communications library implementing the SSL, \ -TLS and DTLS protocols and technologies around them." -HOMEPAGE = "https://gnutls.org/" -BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls" - -LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later" -LICENSE:${PN} = "LGPL-2.1-or-later" -LICENSE:${PN}-xx = "LGPL-2.1-or-later" -LICENSE:${PN}-bin = "GPL-3.0-or-later" -LICENSE:${PN}-openssl = "GPL-3.0-or-later" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ - file://doc/COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \ - file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" - -DEPENDS = "nettle gmp virtual/libiconv libunistring" -DEPENDS:append:libc-musl = " argp-standalone" - -SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" - -SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ - file://arm_eabi.patch \ - file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \ - file://run-ptest \ - file://Add-ptest-support.patch \ - " - -SRC_URI[sha256sum] = "c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114" - -inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest - -PACKAGECONFIG ??= "libidn ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}" - -# You must also have CONFIG_SECCOMP enabled in the kernel for -# seccomp to work. -PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp" -PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2" -PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1" -PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" -PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" -PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}" - -EXTRA_OECONF = " \ - --enable-doc \ - --disable-libdane \ - --disable-guile \ - --disable-rpath \ - --enable-openssl-compatibility \ - --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ - --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \ - --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ -" - -# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. -export POSIX_SHELL="${base_bindir}/sh" - -LDFLAGS:append:libc-musl = " -largp" - -do_configure:prepend() { - for dir in . lib; do - rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4 - done -} - -do_install:append:class-target() { - if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then - install -d ${D}${bindir}/bin - install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/ - fi -} - -do_compile:append() { - oe_runmake ${PARALLEL_MAKE} -C tests buildtest-TESTS -} - -PACKAGES =+ "${PN}-openssl ${PN}-xx ${PN}-fips" - -FILES:${PN}-dev += "${bindir}/gnutls-cli-debug" -FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*" -FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*" -FILES:${PN}-fips = "${bindir}/fipshmac" - -BBCLASSEXTEND = "native nativesdk" - -pkg_postinst_ontarget:${PN}-fips () { - if test -x ${bindir}/fipshmac - then - mkdir ${sysconfdir}/gnutls - touch ${sysconfdir}/gnutls/config - ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac - ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac - ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac - ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac - fi -} diff --git a/meta/recipes-support/gnutls/gnutls_3.8.0.bb b/meta/recipes-support/gnutls/gnutls_3.8.0.bb new file mode 100644 index 0000000000..835ab122d8 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls_3.8.0.bb @@ -0,0 +1,95 @@ +SUMMARY = "GNU Transport Layer Security Library" +DESCRIPTION = "a secure communications library implementing the SSL, \ +TLS and DTLS protocols and technologies around them." +HOMEPAGE = "https://gnutls.org/" +BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls" + +LICENSE = "GPL-3.0-or-later & LGPL-2.1-or-later" +LICENSE:${PN} = "LGPL-2.1-or-later" +LICENSE:${PN}-xx = "LGPL-2.1-or-later" +LICENSE:${PN}-bin = "GPL-3.0-or-later" +LICENSE:${PN}-openssl = "GPL-3.0-or-later" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ + file://doc/COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ + file://doc/COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "nettle gmp virtual/libiconv libunistring" +DEPENDS:append:libc-musl = " argp-standalone" + +SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" + +SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ + file://arm_eabi.patch \ + file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \ + file://run-ptest \ + file://Add-ptest-support.patch \ + " + +SRC_URI[sha256sum] = "0ea0d11a1660a1e63f960f157b197abe6d0c8cb3255be24e1fb3815930b9bdc5" + +inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest + +PACKAGECONFIG ??= "libidn ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}" + +# You must also have CONFIG_SECCOMP enabled in the kernel for +# seccomp to work. +PACKAGECONFIG[seccomp] = "--with-libseccomp-prefix=${STAGING_EXECPREFIXDIR},ac_cv_libseccomp=no,libseccomp" +PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn2" +PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1" +PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit" +PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers" +PACKAGECONFIG[fips] = "--enable-fips140-mode --with-libdl-prefix=${STAGING_BASELIBDIR}" + +EXTRA_OECONF = " \ + --enable-doc \ + --disable-libdane \ + --disable-rpath \ + --enable-openssl-compatibility \ + --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ + --with-librt-prefix=${STAGING_DIR_HOST}${prefix} \ + --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ +" + +# Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. +export POSIX_SHELL="${base_bindir}/sh" + +LDFLAGS:append:libc-musl = " -largp" + +do_configure:prepend() { + for dir in . lib; do + rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4 + done +} + +do_install:append:class-target() { + if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then + install -d ${D}${bindir}/bin + install -m 0755 ${B}/lib/.libs/fipshmac ${D}/${bindir}/ + fi +} + +do_compile:append() { + oe_runmake ${PARALLEL_MAKE} -C tests buildtest-TESTS +} + +PACKAGES =+ "${PN}-openssl ${PN}-xx ${PN}-fips" + +FILES:${PN}-dev += "${bindir}/gnutls-cli-debug" +FILES:${PN}-openssl = "${libdir}/libgnutls-openssl.so.*" +FILES:${PN}-xx = "${libdir}/libgnutlsxx.so.*" +FILES:${PN}-fips = "${bindir}/fipshmac" + +BBCLASSEXTEND = "native nativesdk" + +pkg_postinst_ontarget:${PN}-fips () { + if test -x ${bindir}/fipshmac + then + mkdir ${sysconfdir}/gnutls + touch ${sysconfdir}/gnutls/config + ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac + ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac + ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac + ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac + fi +} -- cgit v1.2.3-54-g00ecf