Consolidated re-send of previously submitted patches
cover Consolidated re-send of previously submitted patches
Andre McCurdy (2):
gnutls: update 3.3.27 -> 3.3.28
elfutils_0.148: musl build fixes
Phong Tran (1):
gettext: fix compilation with securityflags enabled
...grep-fix-compile-error-Werror-format-secu.patch | 88 ++++++++++++++ recipes-core/gettext/gettext_0.16.1.bb | 1 + .../musl-support-for-elfutils-0.148.patch | 133 +++++++++++++++++++++ recipes-devtools/elfutils/elfutils_0.148.bb | 9 +- recipes-support/gnutls/gnutls.inc | 9 +- recipes-support/gnutls/gnutls_3.3.27.bb | 17 --- recipes-support/gnutls/gnutls_3.3.28.bb | 8 ++ 7 files changed, 241 insertions(+), 24 deletions(-) create mode 100644 recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch create mode 100644 recipes-devtools/elfutils/elfutils-0.148/musl-support-for-elfutils-0.148.patch delete mode 100644 recipes-support/gnutls/gnutls_3.3.27.bb create mode 100644 recipes-support/gnutls/gnutls_3.3.28.bb
Signature · 1 line
1.9.1
PATCH 1/3 gnutls: update 3.3.27 -> 3.3.28
* Version 3.3.28 (released 2017-07-04)
** libgnutls: Fixed issue when rehandshaking without a client certificate in
a session which initially used one. Reported by Frantisek Sumsal.
** libgnutls: fix issue in RSA-PSK client callback which resulted in no username
being sent to the peer. Patch by Nicolas Dufresne.
** libgnutls: no longer parse the ResponseID field of the status response
TLS extension. The field is not used by GnuTLS nor is made available to calling applications. That addresses a null pointer dereference on server side caused by packets containing the ResponseID field. Reported by Hubert Kario. [GNUTLS-SA-2017-4]
** libgnutls: Handle specially HSMs which request explicit authentication.
There are HSMs which return CKR_USER_NOT_LOGGED_IN on the first private key operation. Detect that state and try to login.
** libgnutls: the GNUTLS_PKCS11_OBJ_FLAG_LOGIN will force a login on HSMs.
That is, even in tokens which do not have a CKF_LOGIN_REQUIRED flag a login will be forced. This improves operation on certain Safenet HSMs.
** libgnutls: do not set leading zeros when copying integers on HSMs.
PKCS#11 defines integers as unsigned having most significant byte first, e.g., 32768 = 0x80 0x00. This is interpreted literraly by some HSMs which do not accept an integer with a leading zero. This improves operation with certain Atos HSMs.
** libgnutls: Backported PKCS#11 key generation functionality for DSA keys.
** libgnutls: Improve check for /dev/urandom uniqueness. Ensure that when
gnutls_global_init() is called for a second time that /dev/urandom is re-opened when the inode or device ID has changed.
** API and ABI modifications:
No changes since last version.
--- recipes-support/gnutls/gnutls.inc | 9 ++++----- recipes-support/gnutls/gnutls_3.3.27.bb | 17 ----------------- recipes-support/gnutls/gnutls_3.3.28.bb | 8 ++++++++ 3 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 recipes-support/gnutls/gnutls_3.3.27.bb create mode 100644 recipes-support/gnutls/gnutls_3.3.28.bb
recipes-support/gnutls/gnutls.inc +4 -5
@@ -8,9 +8,8 @@ LICENSE_${PN}-xx = "LGPLv2.1+" LICENSE_${PN}-bin = "GPLv3+" LICENSE_${PN}-openssl = "GPLv3+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \ - file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" DEPENDS = "nettle gmp virtual/libiconv" DEPENDS_append_libc-musl = " argp-standalone"
@@ -21,9 +20,8 @@ SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz" inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc -PACKAGECONFIG ??= "libidn zlib" +PACKAGECONFIG ??= "zlib" -PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn" 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"
@@ -31,6 +29,7 @@ PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" EXTRA_OECONF = " \ --enable-doc \ + --disable-crywrap \ --disable-libdane \ --disable-guile \ --disable-rpath \
recipes-support/gnutls/gnutls_3.3.27.bb deleted +0 -17
@@ -1,17 +0,0 @@ -require gnutls.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343" - -SRC_URI += " \ - file://configure.ac-fix-sed-command.patch \ - file://use-pkg-config-to-locate-zlib.patch \ -" -SRC_URI[md5sum] = "8ee8cebd7f7575b11f232766a21c31d3" -SRC_URI[sha256sum] = "8dfda16c158ef5c134010d51d1a91d02aa5d43b8cb711b1572650a7ffb56b17f" - -# This version doesn't support this option added in newer gnutls -# ERROR: gnutls-3.3.27-r0 do_configure: QA Issue: gnutls: configure was passed unrecognised options: --with-idn [unknown-configure-option] -PACKAGECONFIG[libidn] = "" -# but it still has the libidn dependency, without this option -EXTRA_OECONF += "--disable-crywrap"
recipes-support/gnutls/gnutls_3.3.28.bb new file +8 -0
@@ -0,0 +1,8 @@ +require gnutls.inc + +SRC_URI += " \ + file://configure.ac-fix-sed-command.patch \ + file://use-pkg-config-to-locate-zlib.patch \ +" +SRC_URI[md5sum] = "e19718d97cee5279edf3f3b9318f926c" +SRC_URI[sha256sum] = "608f63441abc209c5bd5f61e35f2b6128c22e06fa2ad6248a08d8a643feeb807"
Signature · 1 line
1.9.1
PATCH 2/3 elfutils_0.148: musl build fixes
In reply to Andre McCurdy--- .../musl-support-for-elfutils-0.148.patch | 133 +++++++++++++++++++++ recipes-devtools/elfutils/elfutils_0.148.bb | 9 +- 2 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 recipes-devtools/elfutils/elfutils-0.148/musl-support-for-elfutils-0.148.patch
recipes-devtools/elfutils/elfutils-0.148/musl-support-for-elfutils-0.148.patch new file +133 -0
@@ -0,0 +1,133 @@ +From 8a6cefcd35fb0ba6e12afc6611cfeb600865ca17 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <[email protected]> +Date: Wed, 27 Sep 2017 21:32:27 -0700 +Subject: [PATCH] musl build fixes + +Upstream-Status: Inappropriate [legacy version] + +Signed-off-by: Andre McCurdy <[email protected]> +--- + lib/fixedsizehash.h | 4 ++-- + lib/system.h | 11 +++++++++++ + libelf/elf.h | 8 ++++++-- + libelf/elf_begin.c | 4 ++-- + libelf/elf_getarsym.c | 2 +- + libelf/libelf.h | 1 + + 6 files changed, 23 insertions(+), 7 deletions(-) + +diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h +index a686051..3118954 100644 +--- a/lib/fixedsizehash.h ++++ b/lib/fixedsizehash.h +@@ -51,12 +51,12 @@ + #include <errno.h> + #include <stdlib.h> + #include <string.h> +-#include <sys/cdefs.h> + #include <sys/param.h> + + #include <system.h> + +-#define CONCAT(t1,t2) __CONCAT (t1,t2) ++#define CONCAT1(x,y) x##y ++#define CONCAT(x,y) CONCAT1(x,y) + + /* Before including this file the following macros must be defined: + +diff --git a/lib/system.h b/lib/system.h +index 10b4734..a9cb35e 100644 +--- a/lib/system.h ++++ b/lib/system.h +@@ -52,6 +52,17 @@ + #include <stddef.h> + #include <stdint.h> + ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ ++#define error(status, errno, ...) err(status, __VA_ARGS__) ++ + extern void *xmalloc (size_t) __attribute__ ((__malloc__)); + extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); + extern void *xrealloc (void *, size_t) __attribute__ ((__malloc__)); +diff --git a/libelf/elf.h b/libelf/elf.h +index 4158764..6d9af96 100644 +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -23,7 +23,9 @@ + + #include <features.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Standard ELF types. */ + +@@ -2909,6 +2911,8 @@ typedef Elf32_Addr Elf32_Conflict; + #define R_M32R_NUM 256 /* Keep this the last entry. */ + + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* elf.h */ +diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c +index 0b38991..9083736 100644 +--- a/libelf/elf_begin.c ++++ b/libelf/elf_begin.c +@@ -819,7 +819,7 @@ __libelf_next_arhdr_wrlock (elf) + } + + /* Copy the raw name over to a NUL terminated buffer. */ +- *((char *) __mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0'; ++ *((char *) mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0'; + + elf_ar_hdr = &elf->state.ar.elf_ar_hdr; + +@@ -911,7 +911,7 @@ __libelf_next_arhdr_wrlock (elf) + const char *string = ar_hdr->FIELD; \ + if (ar_hdr->FIELD[sizeof (ar_hdr->FIELD) - 1] != ' ') \ + { \ +- *((char *) __mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD))) \ ++ *((char *) mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD))) \ + = '\0'; \ + string = buf; \ + } \ +diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c +index 9ff7f29..74339ce 100644 +--- a/libelf/elf_getarsym.c ++++ b/libelf/elf_getarsym.c +@@ -257,7 +257,7 @@ elf_getarsym (elf, ptr) + else + arsym[cnt].as_off = file_data[cnt]; + arsym[cnt].as_hash = _dl_elf_hash (str_data); +- str_data = rawmemchr (str_data, '\0') + 1; ++ str_data = memchr (str_data, '\0', SIZE_MAX) + 1; + } + /* At the end a special entry. */ + arsym[n].as_name = NULL; +diff --git a/libelf/libelf.h b/libelf/libelf.h +index b0b3a8d..ec15c43 100644 +--- a/libelf/libelf.h ++++ b/libelf/libelf.h +@@ -50,6 +50,7 @@ + #ifndef _LIBELF_H + #define _LIBELF_H 1 + ++#include <fcntl.h> + #include <sys/types.h> + + /* Get the ELF types. */ +-- +1.9.1 +
recipes-devtools/elfutils/elfutils_0.148.bb +7 -2
@@ -40,6 +40,10 @@ SRC_URI += "\ file://0001-Make-it-compile-with-GCC-7.patch \ file://0002-Make-it-build-with-GCC-7-and-compile-time-hardening-.patch \ " + +# Only apply when building musl based target recipe +SRC_URI_append_libc-musl = " file://musl-support-for-elfutils-0.148.patch" + # Only apply when building uclibc based target recipe SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.patch"
@@ -63,10 +67,11 @@ do_configure_prepend() { cp ${WORKDIR}/*dis.h ${S}/libcpu } -# we can not build complete elfutils when using uclibc +# we can not build complete elfutils when using uclibc or musl # but some recipes e.g. gcc 4.5 depends on libelf so we -# build only libelf for uclibc case +# build only libelf for uclibc and musl cases +EXTRA_OEMAKE_libc-musl = "-C libelf" EXTRA_OEMAKE_libc-uclibc = "-C libelf" EXTRA_OEMAKE_class-native = "" EXTRA_OEMAKE_class-nativesdk = ""
Signature · 1 line
1.9.1
PATCH 3/3 gettext: fix compilation with securityflags enabled
In reply to Andre McCurdyFrom: Phong Tran <[email protected]>
--- ...grep-fix-compile-error-Werror-format-secu.patch | 88 ++++++++++++++++++++++ recipes-core/gettext/gettext_0.16.1.bb | 1 + 2 files changed, 89 insertions(+) create mode 100644 recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch
recipes-core/gettext/gettext-0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch new file +88 -0
@@ -0,0 +1,88 @@ +From b0e57fc44ee102c668f13a324360fb2f27ee7538 Mon Sep 17 00:00:00 2001 +From: Phong Tran <[email protected]> +Date: Fri, 8 Dec 2017 07:56:58 +0700 +Subject: [PATCH] gettext libgrep fix compile error -Werror=format-security + +--- + gettext-tools/libgrep/m-fgrep.c | 4 ++-- + gettext-tools/libgrep/m-regex.c | 12 ++++++------ + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/gettext-tools/libgrep/m-fgrep.c b/gettext-tools/libgrep/m-fgrep.c +index 28f900c..2e49a74 100644 +--- a/gettext-tools/libgrep/m-fgrep.c ++++ b/gettext-tools/libgrep/m-fgrep.c +@@ -55,7 +55,7 @@ Fcompile (const char *pattern, size_t pattern_size, + for (lim = beg; lim < pattern + pattern_size && *lim != '\n'; ++lim) + ; + if ((err = kwsincr (ckwset->kwset, beg, lim - beg)) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + if (lim < pattern + pattern_size) + ++lim; + beg = lim; +@@ -63,7 +63,7 @@ Fcompile (const char *pattern, size_t pattern_size, + while (beg < pattern + pattern_size); + + if ((err = kwsprep (ckwset->kwset)) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + return ckwset; + } + +diff --git a/gettext-tools/libgrep/m-regex.c b/gettext-tools/libgrep/m-regex.c +index 6f7aae3..70f04b3 100644 +--- a/gettext-tools/libgrep/m-regex.c ++++ b/gettext-tools/libgrep/m-regex.c +@@ -73,7 +73,7 @@ struct compiled_regex { + void + dfaerror (const char *mesg) + { +- error (exit_failure, 0, mesg); ++ error (exit_failure, 0, "%s", mesg); + } + + /* If the DFA turns out to have some set of fixed strings one of +@@ -99,7 +99,7 @@ kwsmusts (struct compiled_regex *cregex, + continue; + cregex->kwset_exact_matches++; + if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + } + /* Now, we compile the substrings that will require + the use of the regexp matcher. */ +@@ -108,10 +108,10 @@ kwsmusts (struct compiled_regex *cregex, + if (dm->exact) + continue; + if ((err = kwsincr (cregex->ckwset.kwset, dm->must, strlen (dm->must))) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + } + if ((err = kwsprep (cregex->ckwset.kwset)) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + } + } + +@@ -161,7 +161,7 @@ Gcompile (const char *pattern, size_t pattern_size, + + if ((err = re_compile_pattern (motif, len, + &(cregex->patterns[cregex->pcount].regexbuf))) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + cregex->pcount++; + + motif = sep; +@@ -247,7 +247,7 @@ compile (const char *pattern, size_t pattern_size, + + if ((err = re_compile_pattern (motif, len, + &(cregex->patterns[cregex->pcount].regexbuf))) != NULL) +- error (exit_failure, 0, err); ++ error (exit_failure, 0, "%s", err); + cregex->pcount++; + + motif = sep; +-- +2.7.4 +
recipes-core/gettext/gettext_0.16.1.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ file://fix_aclocal_version.patch \ file://fix_gnu_source_circular.patch \ file://hardcode_macro_version.patch \ + file://0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch \ " SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
Signature · 1 line
1.9.1
Burton, Ross
AppliedMerged to master, sorry for the delay. The gnutls one was already merged locally but I forgot to push...
Ross
Quoted 27 lines · Andre McCurdy
Andre McCurdy (2):
gnutls: update 3.3.27 -> 3.3.28
elfutils_0.148: musl build fixesPhong Tran (1):
gettext: fix compilation with securityflags enabled...grep-fix-compile-error-Werror-format-secu.patch | 88 ++++++++++++++ recipes-core/gettext/gettext_0.16.1.bb | 1 + .../musl-support-for-elfutils-0.148.patch | 133 +++++++++++++++++++++ recipes-devtools/elfutils/elfutils_0.148.bb | 9 +- recipes-support/gnutls/gnutls.inc | 9 +- recipes-support/gnutls/gnutls_3.3.27.bb | 17 --- recipes-support/gnutls/gnutls_3.3.28.bb | 8 ++ 7 files changed, 241 insertions(+), 24 deletions(-) create mode 100644 recipes-core/gettext/gettext- 0.16.1/0001-gettext-libgrep-fix-compile-error-Werror-format-secu.patch create mode 100644 recipes-devtools/elfutils/elfutils-0.148/musl-support- for-elfutils-0.148.patch delete mode 100644 recipes-support/gnutls/gnutls_3.3.27.bb create mode 100644 recipes-support/gnutls/gnutls_3.3.28.bb--
1.9.1