Skip to contentSkip to conversation

gnulib: Upgrade to 2018-03-07.03

PATCH New Khem Raj 1 participant 6 messages Dec 19, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/6 gnulib: Upgrade to 2018-03-07.03

Call check_git_config to setup git to function correctly on some builders git might not be setup for user and email address

Fixes:

Your branch is behind 'origin/master' by 584 commits, and can be
fast-forwarded.
(use "git pull" to update your local branch)
Cloning into 'TOPDIR/build/tmp/work/mips32r2-yoe-linux-musl/gnulib/2017-08-20.18-r0/image//usr/share/gnulib'... done.

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

---
 .../gnulib/gnulib/CVE-2018-17942.patch        | 88 -------------------
 ...17-08-20.18.bb => gnulib_2018-03-07.03.bb} |  8 +-
 2 files changed, 5 insertions(+), 91 deletions(-)
 delete mode 100644 meta-oe/recipes-support/gnulib/gnulib/CVE-2018-17942.patch
 rename meta-oe/recipes-support/gnulib/{gnulib_2017-08-20.18.bb => gnulib_2018-03-07.03.bb} (87%)
meta-oe/recipes-support/gnulib/gnulib/CVE-2018-17942.patch deleted +0 -88
deleted file mode 100644
index 77e82b1674..0000000000
@@ -1,88 +0,0 @@
-From e91600a7aae3bafbefbe13abf771e61badd16286 Mon Sep 17 00:00:00 2001
-From: Changqing Li <[email protected]>
-Date: Tue, 16 Oct 2018 14:26:11 +0800
-Subject: [PATCH] vasnprintf: Fix heap memory overrun bug.
-
-Reported by Ben Pfaff <[email protected]> in
-<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
-
-* lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
-memory.
-* tests/test-vasnprintf.c (test_function): Add another test.
-
-Upstream-Status: Backport [http://git.savannah.gnu.org/gitweb/?p=gnulib.git;
-a=commitdiff;h=278b4175c9d7dd47c1a3071554aac02add3b3c35]
-
-CVE: CVE-2018-17942
-
-Signed-off-by: Changqing Li <[email protected]>
----
- ChangeLog               |  8 ++++++++
- lib/vasnprintf.c        |  4 +++-
- tests/test-vasnprintf.c | 19 ++++++++++++++++++-
- 3 files changed, 29 insertions(+), 2 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 9864353..5ff76a3 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,11 @@
-+2018-09-23  Bruno Haible  <[email protected]>
-+ 	vasnprintf: Fix heap memory overrun bug.
-+	Reported by Ben Pfaff <[email protected]> in
-+	<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
-+	* lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
-+	memory.
-+	* tests/test-vasnprintf.c (test_function): Add another test.
-+
- 2017-08-21  Paul Eggert  <[email protected]>
- 
- 	vc-list-files: port to Solaris 10
-diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
-index 2e4eb19..45de49f 100644
---- a/lib/vasnprintf.c
-+++ b/lib/vasnprintf.c
-@@ -860,7 +860,9 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
-   size_t a_len = a.nlimbs;
-   /* 0.03345 is slightly larger than log(2)/(9*log(10)).  */
-   size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
--  char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
-+  /* We need extra_zeroes bytes for zeroes, followed by c_len bytes for the
-+     digits of a, followed by 1 byte for the terminating NUL.  */
-+  char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1));
-   if (c_ptr != NULL)
-     {
-       char *d_ptr = c_ptr;
-diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c
-index 2dd869f..ff68d5c 100644
---- a/tests/test-vasnprintf.c
-+++ b/tests/test-vasnprintf.c
-@@ -53,7 +53,24 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
-       ASSERT (result != NULL);
-       ASSERT (strcmp (result, "12345") == 0);
-       ASSERT (length == 5);
--      if (size < 6)
-+      if (size < 5 + 1)
-+        ASSERT (result != buf);
-+      ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
-+      if (result != buf)
-+        free (result);
-+    }
-+   /* Note: This test assumes IEEE 754 representation of 'double' floats.  */
-+  for (size = 0; size <= 8; size++)
-+    {
-+      size_t length;
-+      char *result;
-+       memcpy (buf, "DEADBEEF", 8);
-+      length = size;
-+      result = my_asnprintf (buf, &length, "%2.0f", 1.6314159265358979e+125);
-+      ASSERT (result != NULL);
-+      ASSERT (strcmp (result, "163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208") == 0);
-+      ASSERT (length == 126);
-+      if (size < 126 + 1)
-         ASSERT (result != buf);
-       ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
-       if (result != buf)
--- 
-2.7.4
-
meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb renamed from meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb +5 -3
similarity index 87%
rename from meta-oe/recipes-support/gnulib/gnulib_2017-08-20.18.bb
rename to meta-oe/recipes-support/gnulib/gnulib_2018-03-07.03.bb
index e048810554..be1aee5537 100644
@@ -11,16 +11,18 @@ SECTION = "devel"
 LICENSE = "LGPLv2+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=56a22a6e5bcce45e2c8ac184f81412b5"
-SRCREV = "b23000de1e47c7d580e0e220966dd1ee42a5e5bc"
+SRCREV = "0d6e3307bbdb8df4d56043d5f373eeeffe4cbef3"
 
-SRC_URI = "git://git.sv.gnu.org/gnulib;protocol=git \
-           file://CVE-2018-17942.patch \
+SRC_URI = "git://git.sv.gnu.org/gnulib.git \
 "
 
 S = "${WORKDIR}/git"
 
+inherit utils
+
 do_install () {
     cd ${S}
+    check_git_config
     git checkout master
     git clone ${S} ${D}/${datadir}/gnulib
     cd ${D}/${datadir}/gnulib
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 2/6 bdwgc: upgrade 7.6.8 -> 7.6.10

From: Ivan Maidanski <[email protected]>

Highlights of this upgrade:
* Fix races, deadlocks, bugs in disclaim finalization and find-leak mode

See the following for detailed changes:
* https://github.com/ivmai/bdwgc/releases/tag/v7.6.10

---
 .../recipes-support/bdwgc/{bdwgc_7.6.8.bb => bdwgc_7.6.10.bb}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-support/bdwgc/{bdwgc_7.6.8.bb => bdwgc_7.6.10.bb} (96%)
meta-oe/recipes-support/bdwgc/bdwgc_7.6.10.bb renamed from meta-oe/recipes-support/bdwgc/bdwgc_7.6.8.bb +1 -1
similarity index 96%
rename from meta-oe/recipes-support/bdwgc/bdwgc_7.6.8.bb
rename to meta-oe/recipes-support/bdwgc/bdwgc_7.6.10.bb
index bb78971381..fdf3d6c16d 100644
@@ -21,7 +21,7 @@ SECTION = "devel"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://README.QUICK;md5=728501f233050290314d33fb07d883eb"
 
-SRCREV = "8b2a98209a59c92e1be318e4acda507d83175f4d"
+SRCREV = "cef9cbed83f2b5101d4e65ca0f158600d26cbd34"
 SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-7_6 \
           "
 
Signature · 1 line
2.20.1
author
#2 lore raw

PATCH 3/6 catch2: Upgrade to 2.5.0 release

In reply to Khem Raj

Drop upstreamed patch and add a patch to fix build seen with clang and gcc9

---
 ...1-Fix-convert-from-char-on-ARM-build.patch | 46 -------------------
 .../catch2/0001-Remove-redundant-move.patch   | 36 +++++++++++++++
 .../{catch2_2.4.1.bb => catch2_2.5.0.bb}      | 16 ++++---
 3 files changed, 45 insertions(+), 53 deletions(-)
 delete mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
 create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Remove-redundant-move.patch
 rename meta-oe/recipes-test/catch2/{catch2_2.4.1.bb => catch2_2.5.0.bb} (70%)
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch deleted +0 -46
deleted file mode 100644
index 3073775630..0000000000
@@ -1,46 +0,0 @@
-From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001
-From: Miguel Gaio <[email protected]>
-Date: Wed, 3 Oct 2018 10:22:16 +0200
-Subject: [PATCH] Fix convert from char on ARM build
-
-Some platforms set the signedness of char to unsigned (eg. ARM).
-Convert from char should not assume the signedness of char.
-
-Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags.
-
-Signed-off-by: Miguel Gaio <[email protected]>
-
-Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff]
-
-Signed-off-by: Bartosz Golaszewski <[email protected]>
----
- include/internal/catch_tostring.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp
-index 4e0c027d..8cbabbf2 100644
---- a/include/internal/catch_tostring.cpp
-+++ b/include/internal/catch_tostring.cpp
-@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) {
-     return b ? "true" : "false";
- }
- 
--std::string StringMaker<char>::convert(char value) {
-+std::string StringMaker<signed char>::convert(signed char value) {
-     if (value == '\r') {
-         return "'\\r'";
-     } else if (value == '\f') {
-@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) {
-         return chstr;
-     }
- }
--std::string StringMaker<signed char>::convert(signed char c) {
--    return ::Catch::Detail::stringify(static_cast<char>(c));
-+std::string StringMaker<char>::convert(char c) {
-+    return ::Catch::Detail::stringify(static_cast<signed char>(c));
- }
- std::string StringMaker<unsigned char>::convert(unsigned char c) {
-     return ::Catch::Detail::stringify(static_cast<char>(c));
--- 
-2.19.1
-
meta-oe/recipes-test/catch2/catch2/0001-Remove-redundant-move.patch new file +36 -0
new file mode 100644
index 0000000000..c3f5fc9ce7
@@ -0,0 +1,36 @@
+From b2bd82a0c0d3d5dda588d12cc1672a03a9630784 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Dec 2018 17:27:43 -0800
+Subject: [PATCH] Remove redundant move
+
+fixes errors like below
+
+/mnt/a/yoe/build/tmp/work/aarch64-yoe-linux-musl/catch2/2.5.0-r0/git/include/internal/catch_session.cpp:52:29:
+error: redundant move in return statement [-Werror=redundant-move]
+   52 |             return std::move(multi);
+      |                    ~~~~~~~~~^~~~~~~
+/mnt/a/yoe/build/tmp/work/aarch64-yoe-linux-musl/catch2/2.5.0-r0/git/include/internal/catch_session.cpp:52:29:
+note: remove 'std::move' call
+
+Upstream-Status: Submitted [https://github.com/catchorg/Catch2/pull/1474]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ include/internal/catch_session.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp
+index 0920521c..b66d57ac 100644
+--- a/include/internal/catch_session.cpp
++++ b/include/internal/catch_session.cpp
+@@ -49,7 +49,7 @@ namespace Catch {
+                 multi->addListener(listener->create(Catch::ReporterConfig(config)));
+             }
+             multi->addReporter(createReporter(config->getReporterName(), config));
+-            return std::move(multi);
++            return multi;
+         }
+ 
+ 
+-- 
+2.20.1
+
meta-oe/recipes-test/catch2/catch2_2.5.0.bb renamed from meta-oe/recipes-test/catch2/catch2_2.4.1.bb +9 -7
similarity index 70%
rename from meta-oe/recipes-test/catch2/catch2_2.4.1.bb
rename to meta-oe/recipes-test/catch2/catch2_2.5.0.bb
index 0183c2e41a..14a1ebe80d 100644
@@ -6,19 +6,21 @@ LICENSE = "BSL-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
 
 SRC_URI = "git://github.com/catchorg/Catch2.git \
-           file://0001-Fix-convert-from-char-on-ARM-build.patch"
-SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007"
+           file://0001-Remove-redundant-move.patch \
+          "
+# v2.5.0
+SRCREV = "6ccd467094973824d89efb16cbc553e279f79823"
 
 S = "${WORKDIR}/git"
 
 inherit cmake python3native
 
+do_install_append() {
+    rm ${D}${datadir}/Catch2/lldbinit
+    rm ${D}${datadir}/Catch2/gdbinit
+    rmdir ${D}${datadir}/Catch2/
+}
 # Header-only library
 RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
-do_install_append() {
-    rm ${D}/${datadir}/Catch2/lldbinit
-    rm ${D}/${datadir}/Catch2/gdbinit
-    rmdir ${D}/${datadir}/Catch2/
-}
Signature · 1 line
2.20.1
author
#3 lore raw

PATCH 4/6 collectd: Upgrade to 5.8.1 release

In reply to Khem Raj

Fix build with gcc9

---
 .../0005-Disable-new-gcc8-warnings.patch      | 18 +++++------
 ...ctdclient-Fix-string-overflow-errors.patch | 31 +++++++++++++++++++
 .../{collectd_5.8.0.bb => collectd_5.8.1.bb}  |  5 +--
 3 files changed, 43 insertions(+), 11 deletions(-)
 create mode 100644 meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch
 rename meta-oe/recipes-extended/collectd/{collectd_5.8.0.bb => collectd_5.8.1.bb} (95%)
meta-oe/recipes-extended/collectd/collectd/0005-Disable-new-gcc8-warnings.patch +9 -9
index b12690b327..13510cdea0 100644
@@ -1,4 +1,4 @@
-From d65e48b68076d5b304e6d865967003ae1fea0e6c Mon Sep 17 00:00:00 2001
+From f82f8faf9942f51e9c3c773b56574652695bef5a Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 9 May 2018 21:45:38 -0700
 Subject: [PATCH] Disable new gcc8 warnings
@@ -7,17 +7,17 @@ GCC seems to be not able to detect the checks for size are
 already in place
 
 Signed-off-by: Khem Raj <[email protected]>
+
 ---
-Upstream-Status: Submitted [https://github.com/collectd/collectd/pull/2768]
  src/libcollectdclient/network_parse.c | 7 +++++++
  src/write_sensu.c                     | 7 +++++++
  2 files changed, 14 insertions(+)
 
 diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c
-index 2365ab0a..79e6ed96 100644
+index aa753ce..fef43a9 100644
 --- a/src/libcollectdclient/network_parse.c
 +++ b/src/libcollectdclient/network_parse.c
-@@ -163,6 +163,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) {
+@@ -148,6 +148,11 @@ static int parse_int(void *payload, size_t payload_size, uint64_t *out) {
    return 0;
  }
  
@@ -29,7 +29,7 @@ index 2365ab0a..79e6ed96 100644
  static int parse_string(void *payload, size_t payload_size, char *out,
                          size_t out_size) {
    char *in = payload;
-@@ -175,6 +180,8 @@ static int parse_string(void *payload, size_t payload_size, char *out,
+@@ -160,6 +165,8 @@ static int parse_string(void *payload, size_t payload_size, char *out,
    return 0;
  }
  
@@ -39,22 +39,22 @@ index 2365ab0a..79e6ed96 100644
                              lcc_value_list_t *state) {
    char buf[LCC_NAME_LEN];
 diff --git a/src/write_sensu.c b/src/write_sensu.c
-index ce23e654..63e1f599 100644
+index bd7a56d..6cb59d5 100644
 --- a/src/write_sensu.c
 +++ b/src/write_sensu.c
-@@ -569,6 +569,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
+@@ -570,6 +570,11 @@ static char *sensu_value_to_json(struct sensu_host const *host, /* {{{ */
    return ret_str;
  } /* }}} char *sensu_value_to_json */
  
 +#pragma GCC diagnostic push
-+#if __GNUC__ == 8
++#if __GNUC__ > 7
 +#pragma GCC diagnostic ignored "-Wstringop-overflow"
 +#pragma GCC diagnostic ignored "-Wstringop-truncation"
 +#endif
  /*
   * Uses replace_str2() implementation from
   * http://creativeandcritical.net/str-replace-c/
-@@ -631,6 +636,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */
+@@ -632,6 +637,8 @@ static char *replace_str(const char *str, const char *old, /* {{{ */
    return ret;
  } /* }}} char *replace_str */
  
meta-oe/recipes-extended/collectd/collectd/0006-libcollectdclient-Fix-string-overflow-errors.patch new file +31 -0
new file mode 100644
index 0000000000..3ed652f71f
@@ -0,0 +1,31 @@
+From 98719ea7f717750c790a1f9384ea8d0117e7f52d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Dec 2018 18:15:05 -0800
+Subject: [PATCH] libcollectdclient: Fix string overflow errors
+
+Ensure that string has a space for ending null char
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/libcollectdclient/network_parse.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c
+index fef43a9..6d65266 100644
+--- a/src/libcollectdclient/network_parse.c
++++ b/src/libcollectdclient/network_parse.c
+@@ -169,9 +169,9 @@ static int parse_string(void *payload, size_t payload_size, char *out,
+ 
+ static int parse_identifier(uint16_t type, void *payload, size_t payload_size,
+                             lcc_value_list_t *state) {
+-  char buf[LCC_NAME_LEN];
+-
+-  if (parse_string(payload, payload_size, buf, sizeof(buf)) != 0)
++  char buf[LCC_NAME_LEN+1];
++  buf[LCC_NAME_LEN] = '\0';
++  if (parse_string(payload, payload_size, buf, LCC_NAME_LEN) != 0)
+     return EINVAL;
+ 
+   switch (type) {
meta-oe/recipes-extended/collectd/collectd_5.8.1.bb renamed from meta-oe/recipes-extended/collectd/collectd_5.8.0.bb +3 -2
similarity index 95%
rename from meta-oe/recipes-extended/collectd/collectd_5.8.0.bb
rename to meta-oe/recipes-extended/collectd/collectd_5.8.1.bb
index df9fa233cd..6dff18c16b 100644
@@ -13,9 +13,10 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
            file://0001-fix-to-build-with-glibc-2.25.patch \
            file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
            file://0005-Disable-new-gcc8-warnings.patch \
+           file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
            "
-SRC_URI[md5sum] = "a841159323624f18bf03198e9f5aa364"
-SRC_URI[sha256sum] = "b06ff476bbf05533cb97ae6749262cc3c76c9969f032bd8496690084ddeb15c9"
+SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
+SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"
 
 inherit autotools pythonnative update-rc.d pkgconfig systemd
 
Signature · 1 line
2.20.1
author
#4 lore raw

PATCH 5/6 opensc: Upgrade to 0.19.0

In reply to Khem Raj

Switch fetcher to use github
Add patch to build with gcc9
Remove upstreamed patch
Inherit bash-completion

---
 ...-Fixed-gcc-8-compilation-errors-1353.patch | 73 -------------------
 .../0001-Remove-redundant-logging.patch       | 34 +++++++++
 .../{opensc_0.18.0.bb => opensc_0.19.0.bb}    | 19 ++---
 3 files changed, 42 insertions(+), 84 deletions(-)
 delete mode 100644 meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch
 create mode 100644 meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch
 rename meta-oe/recipes-support/opensc/{opensc_0.18.0.bb => opensc_0.19.0.bb} (74%)
meta-oe/recipes-support/opensc/opensc/0001-Fixed-gcc-8-compilation-errors-1353.patch deleted +0 -73
deleted file mode 100644
index 48d8327546..0000000000
@@ -1,73 +0,0 @@
-From 87857d5cae7db94fdd776904886392b1e86053bd Mon Sep 17 00:00:00 2001
-From: Florian Bezdeka <[email protected]>
-Date: Fri, 18 May 2018 18:54:56 +0200
-Subject: [PATCH] Fixed gcc 8 compilation errors (#1353)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The following errors occured during a compilation using gcc 8:
-
-In function »gids_create_file.constprop«,
-    inserted by »gids_save_certificate.isra.8« beicard-gids.c:1548:7:
-card-gids.c:465:2: Error: »strncpy« output may be truncated copying 8 bytes from a string of length 8 [-Werror=stringop-truncation]
-  strncpy(record->filename, filename, 8);
-  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-pkcs15-oberthur.c: In function »sc_pkcs15emu_oberthur_add_prvkey«:
-pkcs15-oberthur.c:741:5: Error: »strncpy« output may be truncated copying 254 bytes from a string of length 254 [-Werror=stringop-truncation]
-     strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
-     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/pull/1353]
-Signed-off-by Khem Raj <[email protected]>
----
- src/libopensc/card-gids.c       | 3 ++-
- src/libopensc/pkcs15-oberthur.c | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/libopensc/card-gids.c b/src/libopensc/card-gids.c
-index fc5d2a7..ac3e579 100644
---- a/src/libopensc/card-gids.c
-+++ b/src/libopensc/card-gids.c
-@@ -33,6 +33,7 @@ Some features are undocumented like the format used to store certificates. They
- 
- #include <stdlib.h>
- #include <string.h>
-+#include "../common/compat_strlcpy.h"
- 
- #ifdef ENABLE_OPENSSL
- /* openssl only needed for card administration */
-@@ -462,7 +463,7 @@ static int gids_create_file(sc_card_t *card, char* directory, char* filename) {
- 	memset(masterfilebuffer + offset, 0, sizeof(gids_mf_record_t));
- 	record = (gids_mf_record_t*) (masterfilebuffer + offset);
- 	strncpy(record->directory, directory, 8);
--	strncpy(record->filename, filename, 8);
-+	strlcpy(record->filename, filename, sizeof(record->filename));
- 	record->fileIdentifier = fileIdentifier;
- 	record->dataObjectIdentifier = dataObjectIdentifier;
- 
-diff --git a/src/libopensc/pkcs15-oberthur.c b/src/libopensc/pkcs15-oberthur.c
-index 4f841ed..3415be7 100644
---- a/src/libopensc/pkcs15-oberthur.c
-+++ b/src/libopensc/pkcs15-oberthur.c
-@@ -29,6 +29,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
-+#include "../common/compat_strlcpy.h"
- 
- #include "pkcs15.h"
- #include "log.h"
-@@ -738,7 +739,7 @@ sc_pkcs15emu_oberthur_add_prvkey(struct sc_pkcs15_card *p15card,
- 			unsigned int id = path.value[path.len - 2] * 0x100 + path.value[path.len - 1];
- 
- 			if (id == ccont.id_cert)   {
--				strncpy(kobj.label, objs[ii]->label, sizeof(kobj.label) - 1);
-+				strlcpy(kobj.label, objs[ii]->label, sizeof(kobj.label));
- 				break;
- 			}
- 		}
--- 
-2.18.0
-
meta-oe/recipes-support/opensc/opensc/0001-Remove-redundant-logging.patch new file +34 -0
new file mode 100644
index 0000000000..291f1a239a
@@ -0,0 +1,34 @@
+From c012f46965b3fe24e31367796e52c2d0b14ca5d9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 17 Dec 2018 18:44:23 -0800
+Subject: [PATCH] Remove redundant logging
+
+Same information is printed a few line below in same function, the only
+difference is that there it takes care of case when label is NULL pointer
+unlike this line
+
+secondly, every function call to cosm_write_tokeninfo() in this file
+passes label=NULL, and then it tries to print a null pointer
+
+Fixes errors like
+src/libopensc/log.h:48:47: error: '%s' directive argument is null
+[-Werror=format-overflow=]
+
+Upstream-Status: Submitted [https://github.com/OpenSC/OpenSC/pull/1557]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/pkcs15init/pkcs15-oberthur.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+Index: git/src/pkcs15init/pkcs15-oberthur.c
+===================================================================
+--- git.orig/src/pkcs15init/pkcs15-oberthur.c
++++ git/src/pkcs15init/pkcs15-oberthur.c
+@@ -70,7 +70,6 @@ cosm_write_tokeninfo (struct sc_pkcs15_c
+ 	ctx = p15card->card->ctx;
+ 
+ 	SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_VERBOSE);
+-	sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "cosm_write_tokeninfo() label '%s'; flags 0x%X", label, flags);
+ 	if (sc_profile_get_file(profile, COSM_TITLE"-token-info", &file)) {
+ 		rv = SC_ERROR_INCONSISTENT_PROFILE;
+ 		SC_TEST_GOTO_ERR(ctx, SC_LOG_DEBUG_NORMAL, rv, "Cannot find "COSM_TITLE"-token-info");
meta-oe/recipes-support/opensc/opensc_0.19.0.bb renamed from meta-oe/recipes-support/opensc/opensc_0.18.0.bb +8 -11
similarity index 74%
rename from meta-oe/recipes-support/opensc/opensc_0.18.0.bb
rename to meta-oe/recipes-support/opensc/opensc_0.19.0.bb
index 45c931e7bd..bc1722e394 100644
@@ -8,22 +8,19 @@ eID cards have also been confirmed to work."
 
 HOMEPAGE = "http://www.opensc-project.org/opensc/"
 SECTION = "System Environment/Libraries"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
 
-SRC_URI = "https://snapshot.debian.org/archive/debian/20180521T101428Z/pool/main/o/opensc/opensc_0.18.0.orig.tar.gz \
-           file://0001-Fixed-gcc-8-compilation-errors-1353.patch \
+#v0.19.0
+SRCREV = "f1691fc91fc113191c3a8aaf5facd6983334ec47"
+SRC_URI = "git://github.com/OpenSC/OpenSC \
+           file://0001-Remove-redundant-logging.patch \
           "
-
-SRC_URI[md5sum] = "bce516f752e0db5327aa06cc0136fe27"
-SRC_URI[sha256sum] = "6ef62b00e8fdbe3e386c3ee25c2cadb56c1931ea42f1a11dce8c947f51b45033"
-
 DEPENDS = "openct pcsc-lite virtual/libiconv openssl"
 
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-inherit autotools pkgconfig
+S = "${WORKDIR}/git"
+inherit autotools pkgconfig bash-completion
 
-S = "${WORKDIR}/OpenSC-${PV}"
 EXTRA_OECONF = " \
     --disable-static \
     --enable-openct \
Signature · 1 line
2.20.1
author
#5 lore raw

PATCH 6/6 rocksdb: Upgrade to 5.17.2

In reply to Khem Raj
---
 ...Fix-GitHub-issue-3716-gcc-8-warnings.patch | 194 ------------------
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb    |   7 +-
 2 files changed, 3 insertions(+), 198 deletions(-)
 delete mode 100644 meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch deleted +0 -194
deleted file mode 100644
index be498974af..0000000000
@@ -1,194 +0,0 @@
-From 8d65d70b54d1d306a0a0b00e036bc8ddd39d8ec1 Mon Sep 17 00:00:00 2001
-From: "[email protected]" <[email protected]>
-Date: Fri, 20 Apr 2018 13:28:05 -0700
-Subject: [PATCH] Fix GitHub issue #3716: gcc-8 warnings
-
-Summary:
-Fix the following gcc-8 warnings:
-- conflicting C language linkage declaration [-Werror]
-- writing to an object with no trivial copy-assignment [-Werror=class-memaccess]
-- array subscript -1 is below array bounds [-Werror=array-bounds]
-
-Solves https://github.com/facebook/rocksdb/issues/3716
-Closes https://github.com/facebook/rocksdb/pull/3736
-
-Differential Revision: D7684161
-
-Pulled By: yiwu-arbug
-
-fbshipit-source-id: 47c0423d26b74add251f1d3595211eee1e41e54a
----
-Signed-off-by: Khem Raj <[email protected]>
-Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/dee95a1afc6c63515e7d94dec33acdb79638b6d7.patch]
-
- db/c.cc                   | 77 ++++++++++++++-------------------------
- memtable/inlineskiplist.h | 12 +++---
- 2 files changed, 33 insertions(+), 56 deletions(-)
-
-diff --git a/db/c.cc b/db/c.cc
-index 064103ed4..0d485d096 100644
---- a/db/c.cc
-+++ b/db/c.cc
-@@ -1388,23 +1388,24 @@ void rocksdb_writebatch_put_log_data(
-   b->rep.PutLogData(Slice(blob, len));
- }
- 
-+class H : public WriteBatch::Handler {
-+ public:
-+  void* state_;
-+  void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
-+  void (*deleted_)(void*, const char* k, size_t klen);
-+  virtual void Put(const Slice& key, const Slice& value) override {
-+    (*put_)(state_, key.data(), key.size(), value.data(), value.size());
-+  }
-+  virtual void Delete(const Slice& key) override {
-+    (*deleted_)(state_, key.data(), key.size());
-+  }
-+};
-+
- void rocksdb_writebatch_iterate(
-     rocksdb_writebatch_t* b,
-     void* state,
-     void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
-     void (*deleted)(void*, const char* k, size_t klen)) {
--  class H : public WriteBatch::Handler {
--   public:
--    void* state_;
--    void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
--    void (*deleted_)(void*, const char* k, size_t klen);
--    virtual void Put(const Slice& key, const Slice& value) override {
--      (*put_)(state_, key.data(), key.size(), value.data(), value.size());
--    }
--    virtual void Delete(const Slice& key) override {
--      (*deleted_)(state_, key.data(), key.size());
--    }
--  };
-   H handler;
-   handler.state_ = state;
-   handler.put_ = put;
-@@ -1649,18 +1650,6 @@ void rocksdb_writebatch_wi_iterate(
-     void* state,
-     void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
-     void (*deleted)(void*, const char* k, size_t klen)) {
--  class H : public WriteBatch::Handler {
--   public:
--    void* state_;
--    void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
--    void (*deleted_)(void*, const char* k, size_t klen);
--    virtual void Put(const Slice& key, const Slice& value) override {
--      (*put_)(state_, key.data(), key.size(), value.data(), value.size());
--    }
--    virtual void Delete(const Slice& key) override {
--      (*deleted_)(state_, key.data(), key.size());
--    }
--  };
-   H handler;
-   handler.state_ = state;
-   handler.put_ = put;
-@@ -3109,20 +3098,21 @@ void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t* st) {
-   delete st;
- }
- 
-+struct Wrapper : public rocksdb_slicetransform_t {
-+  const SliceTransform* rep_;
-+  ~Wrapper() { delete rep_; }
-+  const char* Name() const override { return rep_->Name(); }
-+  Slice Transform(const Slice& src) const override {
-+    return rep_->Transform(src);
-+  }
-+  bool InDomain(const Slice& src) const override {
-+    return rep_->InDomain(src);
-+  }
-+  bool InRange(const Slice& src) const override { return rep_->InRange(src); }
-+  static void DoNothing(void*) { }
-+};
-+
- rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
--  struct Wrapper : public rocksdb_slicetransform_t {
--    const SliceTransform* rep_;
--    ~Wrapper() { delete rep_; }
--    const char* Name() const override { return rep_->Name(); }
--    Slice Transform(const Slice& src) const override {
--      return rep_->Transform(src);
--    }
--    bool InDomain(const Slice& src) const override {
--      return rep_->InDomain(src);
--    }
--    bool InRange(const Slice& src) const override { return rep_->InRange(src); }
--    static void DoNothing(void*) { }
--  };
-   Wrapper* wrapper = new Wrapper;
-   wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen);
-   wrapper->state_ = nullptr;
-@@ -3131,19 +3121,6 @@ rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t pref
- }
- 
- rocksdb_slicetransform_t* rocksdb_slicetransform_create_noop() {
--  struct Wrapper : public rocksdb_slicetransform_t {
--    const SliceTransform* rep_;
--    ~Wrapper() { delete rep_; }
--    const char* Name() const override { return rep_->Name(); }
--    Slice Transform(const Slice& src) const override {
--      return rep_->Transform(src);
--    }
--    bool InDomain(const Slice& src) const override {
--      return rep_->InDomain(src);
--    }
--    bool InRange(const Slice& src) const override { return rep_->InRange(src); }
--    static void DoNothing(void*) { }
--  };
-   Wrapper* wrapper = new Wrapper;
-   wrapper->rep_ = rocksdb::NewNoopTransform();
-   wrapper->state_ = nullptr;
-diff --git a/memtable/inlineskiplist.h b/memtable/inlineskiplist.h
-index 702a7336d..eadda1dc1 100644
---- a/memtable/inlineskiplist.h
-+++ b/memtable/inlineskiplist.h
-@@ -280,7 +280,7 @@ struct InlineSkipList<Comparator>::Node {
-   // next_[0].  This is used for passing data from AllocateKey to Insert.
-   void StashHeight(const int height) {
-     assert(sizeof(int) <= sizeof(next_[0]));
--    memcpy(&next_[0], &height, sizeof(int));
-+    memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
-   }
- 
-   // Retrieves the value passed to StashHeight.  Undefined after a call
-@@ -300,30 +300,30 @@ struct InlineSkipList<Comparator>::Node {
-     assert(n >= 0);
-     // Use an 'acquire load' so that we observe a fully initialized
-     // version of the returned Node.
--    return (next_[-n].load(std::memory_order_acquire));
-+    return ((&next_[0] - n)->load(std::memory_order_acquire));
-   }
- 
-   void SetNext(int n, Node* x) {
-     assert(n >= 0);
-     // Use a 'release store' so that anybody who reads through this
-     // pointer observes a fully initialized version of the inserted node.
--    next_[-n].store(x, std::memory_order_release);
-+    (&next_[0] - n)->store(x, std::memory_order_release);
-   }
- 
-   bool CASNext(int n, Node* expected, Node* x) {
-     assert(n >= 0);
--    return next_[-n].compare_exchange_strong(expected, x);
-+    return (&next_[0] - n)->compare_exchange_strong(expected, x);
-   }
- 
-   // No-barrier variants that can be safely used in a few locations.
-   Node* NoBarrier_Next(int n) {
-     assert(n >= 0);
--    return next_[-n].load(std::memory_order_relaxed);
-+    return (&next_[0] - n)->load(std::memory_order_relaxed);
-   }
- 
-   void NoBarrier_SetNext(int n, Node* x) {
-     assert(n >= 0);
--    next_[-n].store(x, std::memory_order_relaxed);
-+    (&next_[0] - n)->store(x, std::memory_order_relaxed);
-   }
- 
-   // Insert node after prev on specific level.
--- 
-2.17.0
-
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3 -4
index 594d1a9c77..67822477ee 100644
@@ -6,12 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
                     file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
 
-SRCREV = "c60df9d9e7629fe208a9b848293a5599f83d5e77"
-SRCBRANCH = "5.13.fb"
-PV = "5.13.1"
+SRCREV = "f438b98e552010613cff8684a7d84191ed785148"
+SRCBRANCH = "5.17.fb"
+PV = "5.17.2"
 
 SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
-           file://0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch \
           "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.20.1