All of lore.kernel.org
 help / color / mirror / Atom feed
* [hardknott 00/15] Patch review July 29th
@ 2021-07-29 23:36 Armin Kuster
  2021-07-29 23:36 ` [hardknott 01/15] python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042) Armin Kuster
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

Please provide feedback by Saturday.

The following changes since commit 6a7ba8f7f210e04183fb64ab181520d817a34a11:

  sysbench: fix memory test (2021-07-14 21:27:01 -0700)

are available in the Git repository at:

  git://git.openembedded.org/meta-openembedded-contrib stable/hardknott-nut
  http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/hardknott-nut

Andreas Müller (1):
  mariadb: Fix configure

Armin Kuster (1):
  hiawatha: fix url.

Gianfranco (3):
  vboxguestdrivers: upgrade 6.1.18 -> 6.1.20
  vboxguestdrivers: upgrade 6.1.20 -> 6.1.22
  vboxguestdrivers: add a fix for build failure with kernel 5.13

Joe Slater (1):
  python3-pillow: fix CVE-2021-34552

Kai Kang (1):
  mariadb: fix failures to start install_db.service

Khem Raj (3):
  mariadb: Upgrade to 10.5.10
  mariadb: Include missing sys/type.h for ssize_t
  mariadb: Fix build with clang/musl

Tony Tascioglu (2):
  redis: fix CVE-2021-29477
  redis: fix CVE-2021-29478

Trevor Gamblin (1):
  python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042)

Zoltán Böszörményi (2):
  mariadb: Use qemu to run cross-compiled binaries
  mariadb: Upgrade to 10.5.11

 ...ve_10.5.9.bb => mariadb-native_10.5.11.bb} |   0
 meta-oe/recipes-dbs/mysql/mariadb.inc         |  56 ++--
 .../mariadb/fix-a-building-failure.patch      |  35 ---
 .../recipes-dbs/mysql/mariadb/mm_malloc.patch |  11 +
 .../mysql/mariadb/ppc-remove-glibc-dep.patch  |   2 +-
 ...Lists.txt-fix-gen_lex_hash-not-found.patch |  67 -----
 .../recipes-dbs/mysql/mariadb/ssize_t.patch   |  15 +
 .../{mariadb_10.5.9.bb => mariadb_10.5.11.bb} |   4 +-
 .../redis/redis/fix-CVE-2021-29477.patch      |  35 +++
 .../redis/redis/fix-CVE-2021-29478.patch      |  42 +++
 meta-oe/recipes-extended/redis/redis_6.2.2.bb |   2 +
 .../40-linux-5.13-support.patch               | 276 ++++++++++++++++++
 .../vboxguestdrivers/kernel-5.10.patch        |  23 --
 ...s_6.1.18.bb => vboxguestdrivers_6.1.22.bb} |   6 +-
 ...jango_3.2.4.bb => python3-django_3.2.5.bb} |   2 +-
 ...Limit-sprintf-modes-to-10-characters.patch |  49 ++++
 ...0001-Use-snprintf-instead-of-sprintf.patch |  43 +++
 .../python/python3-pillow_8.2.0.bb            |   2 +
 .../recipes-httpd/hiawatha/hiawatha_10.11.bb  |   2 +-
 19 files changed, 513 insertions(+), 159 deletions(-)
 rename meta-oe/recipes-dbs/mysql/{mariadb-native_10.5.9.bb => mariadb-native_10.5.11.bb} (100%)
 delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch
 delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch
 rename meta-oe/recipes-dbs/mysql/{mariadb_10.5.9.bb => mariadb_10.5.11.bb} (81%)
 create mode 100644 meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29477.patch
 create mode 100644 meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch
 create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/40-linux-5.13-support.patch
 delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/kernel-5.10.patch
 rename meta-oe/recipes-support/vboxguestdrivers/{vboxguestdrivers_6.1.18.bb => vboxguestdrivers_6.1.22.bb} (94%)
 rename meta-python/recipes-devtools/python/{python3-django_3.2.4.bb => python3-django_3.2.5.bb} (77%)
 create mode 100644 meta-python/recipes-devtools/python/python3-pillow/0001-Limit-sprintf-modes-to-10-characters.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-pillow/0001-Use-snprintf-instead-of-sprintf.patch

-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [hardknott 01/15] python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042)
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 02/15] redis: fix CVE-2021-29477 Armin Kuster
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Trevor Gamblin <trevor.gamblin@windriver.com>

3.2.5 fixes CVE-2021-35042: Potential SQL injection via unsanitized
QuerySet.order_by() input.

Additional release notes:

- Fixed a regression in Django 3.2 that caused a crash of
  QuerySet.values_list(…, named=True) after prefetch_related() (#32812).
- Fixed a bug in Django 3.2 that caused a migration crash on MySQL 8.0.13+
  when altering BinaryField, JSONField, or TextField to non-nullable
  (#32503).
- Fixed a regression in Django 3.2 that caused a migration crash on MySQL
  8.0.13+ when adding nullable BinaryField, JSONField, or TextField with a
  default value (#32832).
- Fixed a bug in Django 3.2 where a system check would crash on a model
  with an invalid app_label (#32863).

There is no corresponding uprev for the 2.x LTS branch since it is
already at the latest version (2.2.24).

Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>

(cherry picked from commit fe50bd100548500842667210df9757d84ec11b16)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../python/{python3-django_3.2.4.bb => python3-django_3.2.5.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-django_3.2.4.bb => python3-django_3.2.5.bb} (77%)

diff --git a/meta-python/recipes-devtools/python/python3-django_3.2.4.bb b/meta-python/recipes-devtools/python/python3-django_3.2.5.bb
similarity index 77%
rename from meta-python/recipes-devtools/python/python3-django_3.2.4.bb
rename to meta-python/recipes-devtools/python/python3-django_3.2.5.bb
index 52504885e5..5890c85419 100644
--- a/meta-python/recipes-devtools/python/python3-django_3.2.4.bb
+++ b/meta-python/recipes-devtools/python/python3-django_3.2.5.bb
@@ -1,7 +1,7 @@
 require python-django.inc
 inherit setuptools3
 
-SRC_URI[sha256sum] = "66c9d8db8cc6fe938a28b7887c1596e42d522e27618562517cc8929eb7e7f296"
+SRC_URI[sha256sum] = "3da05fea54fdec2315b54a563d5b59f3b4e2b1e69c3a5841dda35019c01855cd"
 
 RDEPENDS_${PN} += "\
     ${PYTHON_PN}-sqlparse \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 02/15] redis: fix CVE-2021-29477
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
  2021-07-29 23:36 ` [hardknott 01/15] python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042) Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 03/15] redis: fix CVE-2021-29478 Armin Kuster
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Tony Tascioglu <tony.tascioglu@windriver.com>

This patch backports the fix for CVE-2021-29477.

CVE: CVE-2021-29477
Upstream-Status: Backport
[https://github.com/redis/redis/commit/f0c5f920d0f88bd8aa376a2c05af4902789d1ef9]

An integer overflow bug in Redis version 6.0 or newer could be exploited using
the STRALGO LCS command to corrupt the heap and potentially result with remote
code execution.

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../redis/redis/fix-CVE-2021-29477.patch      | 35 +++++++++++++++++++
 meta-oe/recipes-extended/redis/redis_6.2.2.bb |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29477.patch

diff --git a/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29477.patch b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29477.patch
new file mode 100644
index 0000000000..a5e5a1ba55
--- /dev/null
+++ b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29477.patch
@@ -0,0 +1,35 @@
+From f0c5f920d0f88bd8aa376a2c05af4902789d1ef9 Mon Sep 17 00:00:00 2001
+From: Oran Agra <oran@redislabs.com>
+Date: Mon, 3 May 2021 08:32:31 +0300
+Subject: [PATCH] Fix integer overflow in STRALGO LCS (CVE-2021-29477)
+
+An integer overflow bug in Redis version 6.0 or newer could be exploited using
+the STRALGO LCS command to corrupt the heap and potentially result with remote
+code execution.
+
+CVE: CVE-2021-29477
+Upstream-Status: Backport
+[https://github.com/redis/redis/commit/f0c5f920d0f88bd8aa376a2c05af4902789d1ef9]
+
+Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
+
+---
+ src/t_string.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/t_string.c b/src/t_string.c
+index 9228c5ed0..db6f7042e 100644
+--- a/src/t_string.c
++++ b/src/t_string.c
+@@ -805,7 +805,7 @@ void stralgoLCS(client *c) {
+     /* Setup an uint32_t array to store at LCS[i,j] the length of the
+      * LCS A0..i-1, B0..j-1. Note that we have a linear array here, so
+      * we index it as LCS[j+(blen+1)*j] */
+-    uint32_t *lcs = zmalloc((alen+1)*(blen+1)*sizeof(uint32_t));
++    uint32_t *lcs = zmalloc((size_t)(alen+1)*(blen+1)*sizeof(uint32_t));
+     #define LCS(A,B) lcs[(B)+((A)*(blen+1))]
+ 
+     /* Start building the LCS table. */
+-- 
+2.32.0
+
diff --git a/meta-oe/recipes-extended/redis/redis_6.2.2.bb b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
index 65b525709e..e89bb50f15 100644
--- a/meta-oe/recipes-extended/redis/redis_6.2.2.bb
+++ b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
            file://0001-src-Do-not-reset-FINAL_LIBS.patch \
            file://GNU_SOURCE.patch \
            file://0006-Define-correct-gregs-for-RISCV32.patch \
+           file://fix-CVE-2021-29477.patch \
            "
 SRC_URI[sha256sum] = "7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 03/15] redis: fix CVE-2021-29478
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
  2021-07-29 23:36 ` [hardknott 01/15] python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042) Armin Kuster
  2021-07-29 23:36 ` [hardknott 02/15] redis: fix CVE-2021-29477 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 04/15] mariadb: Fix configure Armin Kuster
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Tony Tascioglu <tony.tascioglu@windriver.com>

This patch backports the fix for CVE-2021-29478

CVE: CVE-2021-29478
Upstream-Status: Backport
[https://github.com/redis/redis/commit/29900d4e6bccdf3691bedf0ea9a5d84863fa3592]

An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and
potentially result with remote code execution.

The vulnerability involves changing the default set-max-intset-entries
configuration value, creating a large set key that consists of integer values
and using the COPY command to duplicate it.

The integer overflow bug exists in all versions of Redis starting with 2.6,
where it could result with a corrupted RDB or DUMP payload, but not exploited
through COPY (which did not exist before 6.2).

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../redis/redis/fix-CVE-2021-29478.patch      | 42 +++++++++++++++++++
 meta-oe/recipes-extended/redis/redis_6.2.2.bb |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch

diff --git a/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch
new file mode 100644
index 0000000000..ebbf6e1b94
--- /dev/null
+++ b/meta-oe/recipes-extended/redis/redis/fix-CVE-2021-29478.patch
@@ -0,0 +1,42 @@
+From 29900d4e6bccdf3691bedf0ea9a5d84863fa3592 Mon Sep 17 00:00:00 2001
+From: Oran Agra <oran@redislabs.com>
+Date: Mon, 3 May 2021 08:27:22 +0300
+Subject: [PATCH] Fix integer overflow in intset (CVE-2021-29478)
+
+An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and
+potentially result with remote code execution.
+
+The vulnerability involves changing the default set-max-intset-entries
+configuration value, creating a large set key that consists of integer values
+and using the COPY command to duplicate it.
+
+The integer overflow bug exists in all versions of Redis starting with 2.6,
+where it could result with a corrupted RDB or DUMP payload, but not exploited
+through COPY (which did not exist before 6.2).
+
+CVE: CVE-2021-29478
+Upstream-Status: Backport
+[https://github.com/redis/redis/commit/29900d4e6bccdf3691bedf0ea9a5d84863fa3592]
+
+Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
+
+---
+ src/intset.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/intset.c b/src/intset.c
+index 1a64ecae8..9ba13898d 100644
+--- a/src/intset.c
++++ b/src/intset.c
+@@ -281,7 +281,7 @@ uint32_t intsetLen(const intset *is) {
+ 
+ /* Return intset blob size in bytes. */
+ size_t intsetBlobLen(intset *is) {
+-    return sizeof(intset)+intrev32ifbe(is->length)*intrev32ifbe(is->encoding);
++    return sizeof(intset)+(size_t)intrev32ifbe(is->length)*intrev32ifbe(is->encoding);
+ }
+ 
+ /* Validate the integrity of the data structure.
+-- 
+2.32.0
+
diff --git a/meta-oe/recipes-extended/redis/redis_6.2.2.bb b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
index e89bb50f15..a36c190af3 100644
--- a/meta-oe/recipes-extended/redis/redis_6.2.2.bb
+++ b/meta-oe/recipes-extended/redis/redis_6.2.2.bb
@@ -17,6 +17,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
            file://GNU_SOURCE.patch \
            file://0006-Define-correct-gregs-for-RISCV32.patch \
            file://fix-CVE-2021-29477.patch \
+           file://fix-CVE-2021-29478.patch \
            "
 SRC_URI[sha256sum] = "7a260bb74860f1b88c3d5942bf8ba60ca59f121c6dce42d3017bed6add0b9535"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 04/15] mariadb: Fix configure
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (2 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 03/15] redis: fix CVE-2021-29478 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 05/15] mariadb: Upgrade to 10.5.10 Armin Kuster
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Andreas Müller <schnitzeltony@gmail.com>

Assume recent CMake upgrade made this pop up.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit ca18e276d63e9fc6fece6a32e88959cbcf84c91b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc         |  1 +
 ...onfigure-by-closing-IF-ELSE-properly.patch | 35 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 9833b28857..92e54d7592 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -22,6 +22,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \
            file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \
            file://sys_futex.patch \
+           file://0002-Fix-configure-by-closing-IF-ELSE-properly.patch \
           "
 SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch"
 
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch b/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch
new file mode 100644
index 0000000000..36c74d8f94
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch
@@ -0,0 +1,35 @@
+From fdd08a8774265618668c7f24697e138587c47a16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Mon, 10 May 2021 13:35:54 +0200
+Subject: [PATCH] Fix configure by closing IF ELSE properly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+| CMake Error at libmariadb/cmake/ConnectorName.cmake:30 (ENDMACRO):
+|   Flow control statements are not properly nested.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ libmariadb/cmake/ConnectorName.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake
+index b7bbbad..357b8ac 100644
+--- a/libmariadb/cmake/ConnectorName.cmake
++++ b/libmariadb/cmake/ConnectorName.cmake
+@@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+     SET(MACHINE_NAME "x64")
+   ELSE()
+     SET(MACHINE_NAME "32")
+-  END()
++  ENDIF()
+ ENDIF()
+ 
+ SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")
+-- 
+2.30.2
+
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 05/15] mariadb: Upgrade to 10.5.10
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (3 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 04/15] mariadb: Fix configure Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 06/15] mariadb: Include missing sys/type.h for ssize_t Armin Kuster
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Khem Raj <raj.khem@gmail.com>

Drop fix-a-building-failure.patch because upstream has made is narrower
to apply to emulator builds and not just any cross compiling builds

Add missing dependency on boost

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 2183f0894110a6913c44bee9a1f4b1cea7639bdc)
[Bug fix only update:
CVE-2021-2166
CVE-2021-2154 ]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...ve_10.5.9.bb => mariadb-native_10.5.10.bb} |  0
 meta-oe/recipes-dbs/mysql/mariadb.inc         |  5 ++-
 ...onfigure-by-closing-IF-ELSE-properly.patch | 35 -------------------
 ...ng-failure.patch => cross-compiling.patch} | 22 ++++--------
 .../mysql/mariadb/ppc-remove-glibc-dep.patch  |  2 +-
 .../{mariadb_10.5.9.bb => mariadb_10.5.10.bb} |  2 +-
 6 files changed, 10 insertions(+), 56 deletions(-)
 rename meta-oe/recipes-dbs/mysql/{mariadb-native_10.5.9.bb => mariadb-native_10.5.10.bb} (100%)
 delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch
 rename meta-oe/recipes-dbs/mysql/mariadb/{fix-a-building-failure.patch => cross-compiling.patch} (61%)
 rename meta-oe/recipes-dbs/mysql/{mariadb_10.5.9.bb => mariadb_10.5.10.bb} (85%)

diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.9.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb
similarity index 100%
rename from meta-oe/recipes-dbs/mysql/mariadb-native_10.5.9.bb
rename to meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 92e54d7592..2974341bfe 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -11,7 +11,6 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://install_db \
            file://mysql-systemd-start \
            file://configure.cmake-fix-valgrind.patch \
-           file://fix-a-building-failure.patch \
            file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \
            file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
            file://0001-disable-ucontext-on-musl.patch \
@@ -22,11 +21,11 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \
            file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \
            file://sys_futex.patch \
-           file://0002-Fix-configure-by-closing-IF-ELSE-properly.patch \
+           file://cross-compiling.patch \
           "
 SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch"
 
-SRC_URI[sha256sum] = "40ab19aeb8de141fdc188cf2251213c9e7351bee4d0cd29db704fae68d1068cf"
+SRC_URI[sha256sum] = "a5ff32f9fcaaf26bf5cba94accc7b246d2d5eb75710d027e40122df6bac0babb"
 
 UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
 
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch b/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch
deleted file mode 100644
index 36c74d8f94..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb/0002-Fix-configure-by-closing-IF-ELSE-properly.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fdd08a8774265618668c7f24697e138587c47a16 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Mon, 10 May 2021 13:35:54 +0200
-Subject: [PATCH] Fix configure by closing IF ELSE properly
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes:
-| CMake Error at libmariadb/cmake/ConnectorName.cmake:30 (ENDMACRO):
-|   Flow control statements are not properly nested.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- libmariadb/cmake/ConnectorName.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake
-index b7bbbad..357b8ac 100644
---- a/libmariadb/cmake/ConnectorName.cmake
-+++ b/libmariadb/cmake/ConnectorName.cmake
-@@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
-     SET(MACHINE_NAME "x64")
-   ELSE()
-     SET(MACHINE_NAME "32")
--  END()
-+  ENDIF()
- ENDIF()
- 
- SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")
--- 
-2.30.2
-
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
similarity index 61%
rename from meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
rename to meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
index 9149ee21f2..0f4815b185 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
+++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
@@ -1,28 +1,21 @@
-From 1b2b6a61c9f82157cd2e0c3744f6c07e07aeb0bd Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Mon, 4 Mar 2019 01:11:30 -0800
-Subject: [PATCH] fix a building failure
-
-Upstream-Status: Inappropriate [configuration]
+This is not needed for OE builds
 
 building failed since native does not generate import_executables.cmake
 In fact, our building system will export the needed commands
 
+Upstream-Status: Inappropriate [configuration]
+
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- CMakeLists.txt | 5 -----
- 1 file changed, 5 deletions(-)
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fc30750..4f9110e 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -347,11 +347,6 @@ CHECK_PCRE()
+@@ -392,11 +392,6 @@ CHECK_PCRE()
  
  CHECK_SYSTEMD()
  
--IF(CMAKE_CROSSCOMPILING)
+-IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
 -  SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
 -  INCLUDE(${IMPORT_EXECUTABLES})
 -ENDIF()
@@ -30,6 +23,3 @@ index fc30750..4f9110e 100644
  #
  # Setup maintainer mode options. Platform checks are
  # not run with the warning options as to not perturb fragile checks
--- 
-2.17.1
-
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
index 1ca86bcca2..d082d424b0 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
+++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
@@ -36,7 +36,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 +  __builtin_ppc_get_timebase();
  #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
    /* Mainly, prevent the compiler from optimizing away delay loops */
-   __asm__ __volatile__ ("":::"memory");
+   __asm__ __volatile__ ("isb":::"memory");
 --- a/storage/tokudb/PerconaFT/portability/toku_time.h
 +++ b/storage/tokudb/PerconaFT/portability/toku_time.h
 @@ -124,7 +124,7 @@ static inline tokutime_t toku_time_now(v
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.5.9.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
similarity index 85%
rename from meta-oe/recipes-dbs/mysql/mariadb_10.5.9.bb
rename to meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
index e6743fe97a..8ae8241b05 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb_10.5.9.bb
+++ b/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
@@ -2,7 +2,7 @@ require mariadb.inc
 
 EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
 
-DEPENDS += "mariadb-native bison-native libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2"
+DEPENDS += "mariadb-native bison-native boost libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2"
 
 PROVIDES += "mysql5 libmysqlclient"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 06/15] mariadb: Include missing sys/type.h for ssize_t
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (4 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 05/15] mariadb: Upgrade to 10.5.10 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 07/15] mariadb: Fix build with clang/musl Armin Kuster
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Khem Raj <raj.khem@gmail.com>

musl finds this problem in sources where its missing to include
needed system header for ssize_t

Fixes
wsrep-lib/include/wsrep/gtid.hpp:80:5: error: unknown type name 'ssize_t'; did you mean 'size_t'?
    ssize_t scan_from_c_str(const char* buf, size_t buf_len,
    ^~~~~~~
    size_t

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 0298521fcd9eefdd9cd415b58740b972d65cf93c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc           |  1 +
 meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 2974341bfe..25e630a16a 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -22,6 +22,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \
            file://sys_futex.patch \
            file://cross-compiling.patch \
+           file://ssize_t.patch \
           "
 SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch"
 
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch
new file mode 100644
index 0000000000..4e499d4137
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch
@@ -0,0 +1,15 @@
+ssize_t comes from sys/types.h therefore include it
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/wsrep-lib/include/wsrep/gtid.hpp
++++ b/wsrep-lib/include/wsrep/gtid.hpp
+@@ -25,7 +25,7 @@
+ #include "compiler.hpp"
+ 
+ #include <iosfwd>
+-
++#include <sys/types.h>
+ /**
+  * Minimum number of bytes guaratneed to store GTID string representation,
+  * terminating '\0' not included (36 + 1 + 20).
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 07/15] mariadb: Fix build with clang/musl
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (5 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 06/15] mariadb: Include missing sys/type.h for ssize_t Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 08/15] mariadb: Use qemu to run cross-compiled binaries Armin Kuster
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Khem Raj <raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit abbca30bd61c0ff856785900aac899ab33ead08b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc             |  1 +
 meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch | 11 +++++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 25e630a16a..18b025070b 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -23,6 +23,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://sys_futex.patch \
            file://cross-compiling.patch \
            file://ssize_t.patch \
+           file://mm_malloc.patch \
           "
 SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch"
 
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch
new file mode 100644
index 0000000000..347fcd8516
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch
@@ -0,0 +1,11 @@
+--- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h
++++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h
+@@ -5,7 +5,7 @@
+ 
+ #pragma once
+ 
+-#if defined(__clang__)
++#if defined(__clang__) && defined(__GLIBC__)
+ // glibc's `posix_memalign()` declaration specifies `throw()` while clang's
+ // declaration does not. There is a hack in clang to make its re-declaration
+ // compatible with glibc's if they are declared consecutively. That hack breaks
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 08/15] mariadb: Use qemu to run cross-compiled binaries
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (6 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 07/15] mariadb: Fix build with clang/musl Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 09/15] mariadb: Upgrade to 10.5.11 Armin Kuster
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Zoltán Böszörményi <zboszor@gmail.com>

This way, mariadb does not depend on mariadb-native anymore.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 6f05b2463a20f99d43c5a7db190dfe3490929247)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc         | 27 ++++----
 .../mysql/mariadb/cross-compiling.patch       | 25 -------
 ...Lists.txt-fix-gen_lex_hash-not-found.patch | 67 -------------------
 meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb  |  4 +-
 4 files changed, 15 insertions(+), 108 deletions(-)
 delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
 delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 18b025070b..7b1f537fb4 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -12,7 +12,6 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://mysql-systemd-start \
            file://configure.cmake-fix-valgrind.patch \
            file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \
-           file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
            file://0001-disable-ucontext-on-musl.patch \
            file://c11_atomics.patch \
            file://clang_version_header_conflict.patch \
@@ -21,7 +20,6 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
            file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \
            file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \
            file://sys_futex.patch \
-           file://cross-compiling.patch \
            file://ssize_t.patch \
            file://mm_malloc.patch \
           "
@@ -60,8 +58,6 @@ SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable"
 ALLOW_EMPTY_${PN}-setupdb ?= "1"
 FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db"
 
-EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
-
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
@@ -95,6 +91,8 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
                  -DCAT_EXECUTABLE=`which cat` \
                  -DCMAKE_AR:FILEPATH=${AR}"
 
+EXTRA_OECMAKE_prepend_class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper "
+
 # With Ninja it fails with:
 # make: *** No rule to make target `install'.  Stop.
 OECMAKE_GENERATOR = "Unix Makefiles"
@@ -117,12 +115,18 @@ do_generate_toolchain_file_append_class-native () {
     sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake
 }
 
-do_compile_prepend_class-target () {
-    # These need to be in-tree or make will think they need to be built,
-    # and since we're cross-compiling that is disabled
-    cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra
-    cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts
+do_configure_prepend_class-target () {
+	# Write out a qemu wrapper that will be used by cmake
+	# so that it can run target helper binaries through that.
+	qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
+	cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"
+EOF
+	chmod +x ${WORKDIR}/qemuwrapper
+}
 
+do_compile_prepend_class-target () {
     if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then
         if ! [ -e ${B}/include/openssl/kssl.h ] ; then
             mkdir -p ${B}/include/openssl
@@ -132,11 +136,6 @@ do_compile_prepend_class-target () {
             echo "#endif" >>${B}/include/openssl/kssl.h
         fi
     fi
-    # workaround to handle out-of-source build from source package
-    yacc_files="sql_yacc.hh sql_yacc.cc sql_yacc_ora.hh sql_yacc_ora.cc"
-    for yacc_file in ${yacc_files}; do
-        cp ${S}/sql/${yacc_file} ${B}/sql/${yacc_file}
-    done
 }
 
 SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
deleted file mode 100644
index 0f4815b185..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-This is not needed for OE builds
-
-building failed since native does not generate import_executables.cmake
-In fact, our building system will export the needed commands
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -392,11 +392,6 @@ CHECK_PCRE()
- 
- CHECK_SYSTEMD()
- 
--IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
--  SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
--  INCLUDE(${IMPORT_EXECUTABLES})
--ENDIF()
--
- #
- # Setup maintainer mode options. Platform checks are
- # not run with the warning options as to not perturb fragile checks
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
deleted file mode 100644
index 4cb0443392..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From cfce1491827e5a581878b5e166bf4d30e6d90e07 Mon Sep 17 00:00:00 2001
-From: Mingli Yu <mingli.yu@windriver.com>
-Date: Thu, 23 Jul 2020 00:08:16 -0700
-Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found
-
-Fix the below do_compile issue in cross-compiling env.
-| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_hash', needed by 'sql/lex_hash.h'.  Stop.
-| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_token', needed by 'sql/lex_token.h'.  Stop.
-
-Upstream-Status: Inappropriate [oe build specific]
-
-Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
----
- sql/CMakeLists.txt | 30 ++++++++++++++++++++----------
- 1 file changed, 20 insertions(+), 10 deletions(-)
-
-diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
-index 0dc3caa..616017b 100644
---- a/sql/CMakeLists.txt
-+++ b/sql/CMakeLists.txt
-@@ -52,11 +52,16 @@ ${CMAKE_BINARY_DIR}/sql
- ${CMAKE_SOURCE_DIR}/tpool
- )
- 
--ADD_CUSTOM_COMMAND(
--  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
--  COMMAND gen_lex_token > lex_token.h
--  DEPENDS gen_lex_token
--)
-+IF(NOT CMAKE_CROSSCOMPILING)
-+  ADD_CUSTOM_COMMAND(
-+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
-+   COMMAND gen_lex_token > lex_token.h
-+   DEPENDS gen_lex_token)
-+ELSE()
-+  ADD_CUSTOM_COMMAND(
-+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
-+   COMMAND gen_lex_token > lex_token.h)
-+ENDIF()
- 
- ADD_CUSTOM_COMMAND(
-   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy
-@@ -345,11 +350,16 @@ IF(NOT CMAKE_CROSSCOMPILING)
-   ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
- ENDIF()
- 
--ADD_CUSTOM_COMMAND(
--  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
--  COMMAND gen_lex_hash > lex_hash.h
--  DEPENDS gen_lex_hash
--)
-+IF(NOT CMAKE_CROSSCOMPILING)
-+  ADD_CUSTOM_COMMAND(
-+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
-+   COMMAND gen_lex_hash > lex_hash.h
-+   DEPENDS gen_lex_hash)
-+ELSE()
-+  ADD_CUSTOM_COMMAND(
-+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
-+   COMMAND gen_lex_hash > lex_hash.h)
-+ENDIF()
- 
- MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc COMPONENT Server)
- SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")
--- 
-2.17.1
-
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
index 8ae8241b05..57d7736ea3 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
+++ b/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
@@ -1,8 +1,8 @@
 require mariadb.inc
 
-EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
+inherit qemu
 
-DEPENDS += "mariadb-native bison-native boost libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2"
+DEPENDS += "qemu-native bison-native boost libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2"
 
 PROVIDES += "mysql5 libmysqlclient"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 09/15] mariadb: Upgrade to 10.5.11
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (7 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 08/15] mariadb: Use qemu to run cross-compiled binaries Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 10/15] mariadb: fix failures to start install_db.service Armin Kuster
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Zoltán Böszörményi <zboszor@gmail.com>

Forward port musl patches

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 287ffdf1d03731fadd6a90b224d08cf9a3b50de5)
[Stable branch]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../{mariadb-native_10.5.10.bb => mariadb-native_10.5.11.bb}    | 0
 meta-oe/recipes-dbs/mysql/mariadb.inc                           | 2 +-
 meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch    | 2 +-
 .../mysql/{mariadb_10.5.10.bb => mariadb_10.5.11.bb}            | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-dbs/mysql/{mariadb-native_10.5.10.bb => mariadb-native_10.5.11.bb} (100%)
 rename meta-oe/recipes-dbs/mysql/{mariadb_10.5.10.bb => mariadb_10.5.11.bb} (100%)

diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.11.bb
similarity index 100%
rename from meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb
rename to meta-oe/recipes-dbs/mysql/mariadb-native_10.5.11.bb
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 7b1f537fb4..71978740ba 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -25,7 +25,7 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz
           "
 SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch"
 
-SRC_URI[sha256sum] = "a5ff32f9fcaaf26bf5cba94accc7b246d2d5eb75710d027e40122df6bac0babb"
+SRC_URI[sha256sum] = "761053605fe30ce393f324852117990350840a93b3e6305ef4d2f8c8305cc47a"
 
 UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
 
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
index d082d424b0..d6e53c29e1 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
+++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
@@ -36,7 +36,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 +  __builtin_ppc_get_timebase();
  #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
    /* Mainly, prevent the compiler from optimizing away delay loops */
-   __asm__ __volatile__ ("isb":::"memory");
+ #ifdef _aarch64_
 --- a/storage/tokudb/PerconaFT/portability/toku_time.h
 +++ b/storage/tokudb/PerconaFT/portability/toku_time.h
 @@ -124,7 +124,7 @@ static inline tokutime_t toku_time_now(v
diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.11.bb
similarity index 100%
rename from meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb
rename to meta-oe/recipes-dbs/mysql/mariadb_10.5.11.bb
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 10/15] mariadb: fix failures to start install_db.service
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (8 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 09/15] mariadb: Upgrade to 10.5.11 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 11/15] vboxguestdrivers: upgrade 6.1.18 -> 6.1.20 Armin Kuster
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Kai Kang <kai.kang@windriver.com>

It fails to start install_db.service when install mariadb-setupdb from a
package repo via dnf:

root@qemux86-64:~# systemctl status install_db
x install_db.service - Install MySQL Community Server Database
     Loaded: loaded (/lib/systemd/system/install_db.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-07-09 02:55:12 UTC; 5s ago
    Process: 504 ExecStart=/usr/bin/mysql-systemd-start pre (code=exited, status=203/EXEC)
   Main PID: 504 (code=exited, status=203/EXEC)

Jul 09 02:55:12 qemux86-64 systemd[1]: Starting Install MySQL Community Server Database...
Jul 09 02:55:12 qemux86-64 systemd[504]: install_db.service: Failed to locate executable /usr/bin/mysql-systemd-start: No such file or directo>
Jul 09 02:55:12 qemux86-64 systemd[504]: install_db.service: Failed at step EXEC spawning /usr/bin/mysql-systemd-start: No such file or direct>
Jul 09 02:55:12 qemux86-64 systemd[1]: install_db.service: Main process exited, code=exited, status=203/EXEC
Jul 09 02:55:12 qemux86-64 systemd[1]: install_db.service: Failed with result 'exit-code'.
Jul 09 02:55:12 qemux86-64 systemd[1]: Failed to start Install MySQL Community Server Database.

The scripts required by install_db.service are packaged in
mariadb-server which depends on mariadb-setupdb already. So move the
scripts to mariadb-setupdb to make sure start install_db.service
successfully. And move creating user 'mysql' in mariadb-setupdb as well.
Packageconfig 'setupdb' has been useless from last upgrade, so remove it
at same time.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit b7554ae2855483edc0a7d4c533d7d818bbc9e4f8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 71978740ba..5787ae4bd7 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -36,15 +36,15 @@ BINCONFIG_GLOB = "mysql_config"
 inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script
 
 MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \
-                    ${PN}-server:${bindir}/mariadb-install-db"
+                    ${PN}-setupdb:${bindir}/mariadb-install-db"
 
 INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
 INITSCRIPT_NAME_${PN}-server = "mysqld"
 INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ."
 
-USERADD_PACKAGES = "${PN}-server"
-USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
-GROUPADD_PARAM_${PN}-server = "--system mysql"
+USERADD_PACKAGES = "${PN}-setupdb"
+USERADD_PARAM_${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql"
+GROUPADD_PARAM_${PN}-setupdb = "--system mysql"
 
 INITSCRIPT_NAME_${PN}-setupdb = "install_db"
 INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44"
@@ -56,14 +56,18 @@ SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable"
 SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service"
 SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable"
 ALLOW_EMPTY_${PN}-setupdb ?= "1"
-FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db"
-
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
+FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db \
+                       ${bindir}/mariadb-install-db \
+                       ${bindir}/my_print_defaults \
+                       ${bindir}/mysql_install_db \
+                       ${bindir}/mysql-systemd-start \
+                       "
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
 PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
 PACKAGECONFIG[krb5] = ", ,krb5"
-PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb"
 PACKAGECONFIG[zstd] = "-DWITH_ROCKSDB_ZSTD=ON,-DWITH_ROCKSDB_ZSTD=OFF,zstd"
 
 # MariaDB doesn't link properly with gold
@@ -185,10 +189,10 @@ do_install() {
     fi
 }
 
-PACKAGES = "${PN}-dbg ${PN} \
+PACKAGES = "${PN}-dbg ${PN}-setupdb ${PN} \
     libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev \
     libmysqlclient libmysqlclient-dev libmysqlclient-staticdev \
-    libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers"
+    libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-leftovers"
 CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf"
 CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf"
 CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf"
@@ -291,7 +295,6 @@ FILES_${PN}-server = "\
     ${bindir}/mysql_convert_table_format \
     ${bindir}/mariadb-convert-table-format \
     ${bindir}/mysql_install_db \
-    ${bindir}/mariadb-install-db \
     ${bindir}/mysql_secure_installation \
     ${bindir}/mariadb-secure-installation \
     ${bindir}/mysql_setpermission \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 11/15] vboxguestdrivers: upgrade 6.1.18 -> 6.1.20
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (9 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 10/15] mariadb: fix failures to start install_db.service Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 12/15] vboxguestdrivers: upgrade 6.1.20 -> 6.1.22 Armin Kuster
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Gianfranco <costamagna.gianfranco@gmail.com>

Drop all patches, now part of upstream codebase

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 37537bda8c4775ce1c390d1a9a5b2f5fab89bfc7)
[Stable branch]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../vboxguestdrivers/kernel-5.10.patch        | 23 -------------------
 ...s_6.1.18.bb => vboxguestdrivers_6.1.20.bb} |  5 ++--
 2 files changed, 2 insertions(+), 26 deletions(-)
 delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/kernel-5.10.patch
 rename meta-oe/recipes-support/vboxguestdrivers/{vboxguestdrivers_6.1.18.bb => vboxguestdrivers_6.1.20.bb} (94%)

diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/kernel-5.10.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/kernel-5.10.patch
deleted file mode 100644
index a6b0a04545..0000000000
--- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/kernel-5.10.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Origin: https://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg461494.html
-From 80bfab5ec8575703ef26b442a3af2d030793ebde Mon Sep 17 00:00:00 2001
-From: =?utf8?q?Jan=20R=C4=99korajski?= <baggins@pld-linux.org>
-Date: Thu, 24 Dec 2020 23:03:55 +0100
-Subject: [PATCH] - DECLCALLBACK generates incorrect code on ix86, remove it
-
----
- kernel-5.10.patch | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/kernel-5.10.patch b/kernel-5.10.patch
-index b28d6e0..729235d 100644
---- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
-+++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
-@@ -536,7 +536,7 @@ typedef const LNXAPPLYPGRANGE *PCLNXAPPLYPGRANGE;
-  * @param   uAddr               The address to apply the new protection to.
-  * @param   pvUser              The opaque user data.
-  */
--static DECLCALLBACK(int) rtR0MemObjLinuxApplyPageRange(pte_t *pPte, unsigned long uAddr, void *pvUser)
-+static int rtR0MemObjLinuxApplyPageRange(pte_t *pPte, unsigned long uAddr, void *pvUser)
- {
-     PCLNXAPPLYPGRANGE pArgs = (PCLNXAPPLYPGRANGE)pvUser;
-     PRTR0MEMOBJLNX pMemLnx = pArgs->pMemLnx;
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb
similarity index 94%
rename from meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
rename to meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb
index 1def1a3115..9df2e3960e 100644
--- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb
@@ -13,11 +13,10 @@ VBOX_NAME = "VirtualBox-${PV}"
 
 SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
     file://Makefile.utils \
-    file://kernel-5.10.patch \
     file://add__divmoddi4.patch \
 "
-SRC_URI[md5sum] = "c61001386eb3822ab8f06d688a82e84b"
-SRC_URI[sha256sum] = "108d42b9b391b7a332a33df1662cf7b0e9d9a80f3079d16288d8b9487f427d40"
+SRC_URI[md5sum] = "f2fe05e72c37d40afb36b9fb3aa38b78"
+SRC_URI[sha256sum] = "e690c91974a2e7a5aca2c0939ad514382f9a2136797a5e0b96aab778e42bc8a7"
 
 S ?= "${WORKDIR}/vbox_module"
 S_task-patch = "${WORKDIR}/${VBOX_NAME}"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 12/15] vboxguestdrivers: upgrade 6.1.20 -> 6.1.22
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (10 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 11/15] vboxguestdrivers: upgrade 6.1.18 -> 6.1.20 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 13/15] vboxguestdrivers: add a fix for build failure with kernel 5.13 Armin Kuster
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Gianfranco <costamagna.gianfranco@gmail.com>

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 319490178b999a74a82d092320de5d9d2e5c67bd)
[Stable branch]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...{vboxguestdrivers_6.1.20.bb => vboxguestdrivers_6.1.22.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-support/vboxguestdrivers/{vboxguestdrivers_6.1.20.bb => vboxguestdrivers_6.1.22.bb} (95%)

diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
similarity index 95%
rename from meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb
rename to meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
index 9df2e3960e..a074d0a558 100644
--- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.20.bb
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
@@ -15,8 +15,8 @@ SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2
     file://Makefile.utils \
     file://add__divmoddi4.patch \
 "
-SRC_URI[md5sum] = "f2fe05e72c37d40afb36b9fb3aa38b78"
-SRC_URI[sha256sum] = "e690c91974a2e7a5aca2c0939ad514382f9a2136797a5e0b96aab778e42bc8a7"
+SRC_URI[md5sum] = "abb1a20021e5915fe38c666e8c11cf80"
+SRC_URI[sha256sum] = "99816d2a15205d49362a31e8ffeb8262d2fa0678c751dfd0a7c43b2faca8be49"
 
 S ?= "${WORKDIR}/vbox_module"
 S_task-patch = "${WORKDIR}/${VBOX_NAME}"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 13/15] vboxguestdrivers: add a fix for build failure with kernel 5.13
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (11 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 12/15] vboxguestdrivers: upgrade 6.1.20 -> 6.1.22 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 14/15] hiawatha: fix url Armin Kuster
  2021-07-29 23:36 ` [hardknott 15/15] python3-pillow: fix CVE-2021-34552 Armin Kuster
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Gianfranco <costamagna.gianfranco@gmail.com>

Its already upstream and also used in Debian and Ubuntu

Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit d0f2d7c954b9f3befd9470d97de581fe5b1fb2a8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../40-linux-5.13-support.patch               | 276 ++++++++++++++++++
 .../vboxguestdrivers_6.1.22.bb                |   1 +
 2 files changed, 277 insertions(+)
 create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/40-linux-5.13-support.patch

diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/40-linux-5.13-support.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/40-linux-5.13-support.patch
new file mode 100644
index 0000000000..e95e240492
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/40-linux-5.13-support.patch
@@ -0,0 +1,276 @@
+Subject: Fix build errors with linux 5.13
+Origin: upstream, https://www.virtualbox.org/browser/vbox/trunk
+Bug: https://bugs.launchpad.net/bugs/1929193
+
+diff -urpN virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.h virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_drv.h
+--- virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_drv.h	2021-04-28 16:24:47.000000000 +0000
++++ virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_drv.h	2021-06-23 10:08:44.431714404 +0000
+@@ -46,20 +41,20 @@
+  * Evaluates to true if the linux kernel version is equal or higher to the
+  * one specfied. */
+ #define RTLNX_VER_MIN(a_Major, a_Minor, a_Patch) \
+-    (LINUX_VERSION_CODE >= KERNEL_VERSION(a_Major, a_Minor, a_Patch))
++	(LINUX_VERSION_CODE >= KERNEL_VERSION(a_Major, a_Minor, a_Patch))
+ 
+ /** @def RTLNX_VER_MAX
+  * Evaluates to true if the linux kernel version is less to the one specfied
+  * (exclusive). */
+ #define RTLNX_VER_MAX(a_Major, a_Minor, a_Patch) \
+-    (LINUX_VERSION_CODE < KERNEL_VERSION(a_Major, a_Minor, a_Patch))
++	(LINUX_VERSION_CODE < KERNEL_VERSION(a_Major, a_Minor, a_Patch))
+ 
+ /** @def RTLNX_VER_RANGE
+  * Evaluates to true if the linux kernel version is equal or higher to the given
+  * minimum version and less (but not equal) to the maximum version (exclusive). */
+ #define RTLNX_VER_RANGE(a_MajorMin, a_MinorMin, a_PatchMin,  a_MajorMax, a_MinorMax, a_PatchMax) \
+-    (   LINUX_VERSION_CODE >= KERNEL_VERSION(a_MajorMin, a_MinorMin, a_PatchMin) \
+-     && LINUX_VERSION_CODE <  KERNEL_VERSION(a_MajorMax, a_MinorMax, a_PatchMax) )
++	(   LINUX_VERSION_CODE >= KERNEL_VERSION(a_MajorMin, a_MinorMin, a_PatchMin) \
++	 && LINUX_VERSION_CODE <  KERNEL_VERSION(a_MajorMax, a_MinorMax, a_PatchMax) )
+ 
+ 
+ /** @def RTLNX_RHEL_MIN
+@@ -70,7 +65,7 @@
+  */
+ #if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
+ # define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) \
+-     ((RHEL_MAJOR) > (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor)))
++	 ((RHEL_MAJOR) > (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) >= (a_iMinor)))
+ #else
+ # define RTLNX_RHEL_MIN(a_iMajor, a_iMinor) (0)
+ #endif
+@@ -83,7 +78,7 @@
+  */
+ #if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
+ # define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) \
+-     ((RHEL_MAJOR) < (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) < (a_iMinor)))
++	 ((RHEL_MAJOR) < (a_iMajor) || ((RHEL_MAJOR) == (a_iMajor) && (RHEL_MINOR) < (a_iMinor)))
+ #else
+ # define RTLNX_RHEL_MAX(a_iMajor, a_iMinor) (0)
+ #endif
+@@ -95,7 +90,7 @@
+  */
+ #if defined(RHEL_MAJOR) && defined(RHEL_MINOR)
+ # define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin,  a_iMajorMax, a_iMinorMax) \
+-     (RTLNX_RHEL_MIN(a_iMajorMin, a_iMinorMin) && RTLNX_RHEL_MAX(a_iMajorMax, a_iMinorMax))
++	 (RTLNX_RHEL_MIN(a_iMajorMin, a_iMinorMin) && RTLNX_RHEL_MAX(a_iMajorMax, a_iMinorMax))
+ #else
+ # define RTLNX_RHEL_RANGE(a_iMajorMin, a_iMinorMin,  a_iMajorMax, a_iMinorMax)  (0)
+ #endif
+@@ -173,7 +168,9 @@
+ #include <drm/ttm/ttm_bo_api.h>
+ #include <drm/ttm/ttm_bo_driver.h>
+ #include <drm/ttm/ttm_placement.h>
++#if RTLNX_VER_MAX(5,13,0)
+ #include <drm/ttm/ttm_memory.h>
++#endif
+ #if RTLNX_VER_MAX(5,12,0)
+ # include <drm/ttm/ttm_module.h>
+ #endif
+@@ -222,7 +219,7 @@ static inline void drm_gem_object_put(st
+ 				 VBVA_ADAPTER_INFORMATION_SIZE)
+ #define GUEST_HEAP_SIZE   VBVA_ADAPTER_INFORMATION_SIZE
+ #define GUEST_HEAP_USABLE_SIZE (VBVA_ADAPTER_INFORMATION_SIZE - \
+-				sizeof(HGSMIHOSTFLAGS))
++				sizeof(struct hgsmi_host_flags))
+ #define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE
+ 
+ /** How frequently we refresh if the guest is not providing dirty rectangles. */
+@@ -232,7 +229,7 @@ static inline void drm_gem_object_put(st
+ static inline void *devm_kcalloc(struct device *dev, size_t n, size_t size,
+ 				 gfp_t flags)
+ {
+-    return devm_kzalloc(dev, n * size, flags);
++	return devm_kzalloc(dev, n * size, flags);
+ }
+ #endif
+ 
+@@ -244,7 +241,7 @@ struct vbox_private {
+ 	u8 __iomem *guest_heap;
+ 	u8 __iomem *vbva_buffers;
+ 	struct gen_pool *guest_pool;
+-	struct VBVABUFFERCONTEXT *vbva_info;
++	struct vbva_buf_context *vbva_info;
+ 	bool any_pitch;
+ 	u32 num_crtcs;
+ 	/** Amount of available VRAM, including space used for buffers. */
+@@ -252,7 +249,7 @@ struct vbox_private {
+ 	/** Amount of available VRAM, not including space used for buffers. */
+ 	u32 available_vram_size;
+ 	/** Array of structures for receiving mode hints. */
+-	VBVAMODEHINT *last_mode_hints;
++	struct vbva_modehint *last_mode_hints;
+ 
+ 	struct vbox_fbdev *fbdev;
+ 
+@@ -263,7 +260,11 @@ struct vbox_private {
+ 		struct drm_global_reference mem_global_ref;
+ 		struct ttm_bo_global_ref bo_global_ref;
+ #endif
++#if RTLNX_VER_MIN(5,13,0) 
++		struct ttm_device bdev; 
++#else
+ 		struct ttm_bo_device bdev;
++#endif
+ 		bool mm_initialised;
+ 	} ttm;
+ 
+diff -urpN virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c
+--- virtualbox-6.1.22-dfsg.orig/src/VBox/Additions/linux/drm/vbox_ttm.c	2021-04-28 16:24:47.000000000 +0000
++++ virtualbox-6.1.22-dfsg/src/VBox/Additions/linux/drm/vbox_ttm.c	2021-06-23 10:08:07.164057918 +0000
+@@ -48,7 +43,11 @@
+ #endif
+ 
+ 
++#if RTLNX_VER_MIN(5,13,0)
++static inline struct vbox_private *vbox_bdev(struct ttm_device *bd)
++#else
+ static inline struct vbox_private *vbox_bdev(struct ttm_bo_device *bd)
++#endif
+ {
+ 	return container_of(bd, struct vbox_private, ttm.bdev);
+ }
+@@ -188,7 +187,7 @@ static int vbox_ttm_io_mem_reserve(struc
+ 	mem->bus.size = mem->num_pages << PAGE_SHIFT;
+ 	mem->bus.base = 0;
+ 	mem->bus.is_iomem = false;
+-	if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
++	 if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
+ 		return -EINVAL;
+ 	switch (mem->mem_type) {
+ 	case TTM_PL_SYSTEM:
+@@ -205,8 +204,13 @@ static int vbox_ttm_io_mem_reserve(struc
+ 	return 0;
+ }
+ #else
++# if RTLNX_VER_MAX(5,13,0)
+ static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
+ 				   struct ttm_resource *mem)
++# else /* > 5.13.0 */
++static int vbox_ttm_io_mem_reserve(struct ttm_device *bdev,
++				   struct ttm_resource *mem)
++# endif /* > 5.13.0 */
+ {
+ 	struct vbox_private *vbox = vbox_bdev(bdev);
+ 	mem->bus.addr = NULL;
+@@ -241,7 +245,12 @@ static int vbox_ttm_io_mem_reserve(struc
+ 
+ 
+ 
+-#if RTLNX_VER_MIN(5,10,0)
++#if RTLNX_VER_MIN(5,13,0)
++static void vbox_ttm_io_mem_free(struct ttm_device *bdev,
++				 struct ttm_resource *mem)
++{
++}
++#elif RTLNX_VER_MIN(5,10,0)
+ static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
+ 				 struct ttm_resource *mem)
+ {
+@@ -253,7 +262,13 @@ static void vbox_ttm_io_mem_free(struct
+ }
+ #endif
+ 
+-#if RTLNX_VER_MIN(5,10,0)
++#if RTLNX_VER_MIN(5,13,0)
++static void vbox_ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *tt)
++{
++	ttm_tt_fini(tt);
++	kfree(tt);
++}
++#elif RTLNX_VER_MIN(5,10,0)
+ static void vbox_ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *tt)
+ {
+ 	ttm_tt_fini(tt);
+@@ -333,7 +348,11 @@ static int vbox_bo_move(struct ttm_buffe
+ }
+ #endif
+ 
++#if RTLNX_VER_MIN(5,13,0)
++static struct ttm_device_funcs vbox_bo_driver = {
++#else /* < 5.13.0 */
+ static struct ttm_bo_driver vbox_bo_driver = {
++#endif /* < 5.13.0 */
+ 	.ttm_tt_create = vbox_ttm_tt_create,
+ #if RTLNX_VER_MIN(5,10,0)
+ 	.ttm_tt_destroy = vbox_ttm_tt_destroy,
+@@ -370,14 +389,22 @@ int vbox_mm_init(struct vbox_private *vb
+ {
+ 	int ret;
+ 	struct drm_device *dev = vbox->dev;
++#if RTLNX_VER_MIN(5,13,0)
++	struct ttm_device *bdev = &vbox->ttm.bdev;
++#else
+ 	struct ttm_bo_device *bdev = &vbox->ttm.bdev;
++#endif
+ 
+ #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
+ 	ret = vbox_ttm_global_init(vbox);
+ 	if (ret)
+ 		return ret;
+ #endif
++#if RTLNX_VER_MIN(5,13,0)
++	ret = ttm_device_init(&vbox->ttm.bdev,
++#else
+ 	ret = ttm_bo_device_init(&vbox->ttm.bdev,
++#endif
+ #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
+ 				 vbox->ttm.bo_global_ref.ref.object,
+ #endif
+@@ -429,7 +456,11 @@ int vbox_mm_init(struct vbox_private *vb
+ 	return 0;
+ 
+ err_device_release:
++#if RTLNX_VER_MIN(5,13,0)
++	ttm_device_fini(&vbox->ttm.bdev);
++#else
+ 	ttm_bo_device_release(&vbox->ttm.bdev);
++#endif
+ #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
+ err_ttm_global_release:
+ 	vbox_ttm_global_release(vbox);
+@@ -446,7 +477,11 @@ void vbox_mm_fini(struct vbox_private *v
+ #else
+ 	arch_phys_wc_del(vbox->fb_mtrr);
+ #endif
++#if RTLNX_VER_MIN(5,13,0)
++        ttm_device_fini(&vbox->ttm.bdev);
++#else
+ 	ttm_bo_device_release(&vbox->ttm.bdev);
++#endif
+ #if RTLNX_VER_MAX(5,0,0) && !RTLNX_RHEL_MAJ_PREREQ(7,7) && !RTLNX_RHEL_MAJ_PREREQ(8,1)
+ 	vbox_ttm_global_release(vbox);
+ #endif
+@@ -528,7 +563,9 @@ int vbox_bo_create(struct drm_device *de
+ {
+ 	struct vbox_private *vbox = dev->dev_private;
+ 	struct vbox_bo *vboxbo;
++#if RTLNX_VER_MAX(5,13,0)
+ 	size_t acc_size;
++#endif
+ 	int ret;
+ 
+ 	vboxbo = kzalloc(sizeof(*vboxbo), GFP_KERNEL);
+@@ -551,16 +588,20 @@ int vbox_bo_create(struct drm_device *de
+ 
+ 	vbox_ttm_placement(vboxbo, VBOX_MEM_TYPE_VRAM | VBOX_MEM_TYPE_SYSTEM);
+ 
++#if RTLNX_VER_MAX(5,13,0)
+ 	acc_size = ttm_bo_dma_acc_size(&vbox->ttm.bdev, size,
+ 				       sizeof(struct vbox_bo));
++#endif
+ 
+ 	ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
+ 			  ttm_bo_type_device, &vboxbo->placement,
+ #if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) && !RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
+ 			  align >> PAGE_SHIFT, false, NULL, acc_size,
+-#else
++#elif RTLNX_VER_MAX(5,13,0) /* < 5.13.0 */
+ 			  align >> PAGE_SHIFT, false, acc_size,
+-#endif
++#else /* > 5.13.0 */
++			  align >> PAGE_SHIFT, false,
++#endif /* > 5.13.0 */
+ #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2)
+ 			  NULL, NULL, vbox_bo_ttm_destroy);
+ #else
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
index a074d0a558..19b8f8f46e 100644
--- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.22.bb
@@ -13,6 +13,7 @@ VBOX_NAME = "VirtualBox-${PV}"
 
 SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
     file://Makefile.utils \
+    file://40-linux-5.13-support.patch \
     file://add__divmoddi4.patch \
 "
 SRC_URI[md5sum] = "abb1a20021e5915fe38c666e8c11cf80"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 14/15] hiawatha: fix url.
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (12 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 13/15] vboxguestdrivers: add a fix for build failure with kernel 5.13 Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  2021-07-29 23:36 ` [hardknott 15/15] python3-pillow: fix CVE-2021-34552 Armin Kuster
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

files moved under a new dir structure.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-webserver/recipes-httpd/hiawatha/hiawatha_10.11.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.11.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.11.bb
index 89910841f6..f0be75f5d3 100644
--- a/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.11.bb
+++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_10.11.bb
@@ -6,7 +6,7 @@ DEPENDS = "libxml2 libxslt virtual/crypt"
 
 SECTION = "net"
 
-SRC_URI = "http://hiawatha-webserver.org/files/${BP}.tar.gz \
+SRC_URI = "http://hiawatha-webserver.org/files/hiawatha-10/${BP}.tar.gz \
            file://hiawatha-init \
            file://hiawatha.service "
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [hardknott 15/15] python3-pillow: fix CVE-2021-34552
  2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
                   ` (13 preceding siblings ...)
  2021-07-29 23:36 ` [hardknott 14/15] hiawatha: fix url Armin Kuster
@ 2021-07-29 23:36 ` Armin Kuster
  14 siblings, 0 replies; 16+ messages in thread
From: Armin Kuster @ 2021-07-29 23:36 UTC (permalink / raw)
  To: openembedded-devel

From: Joe Slater <joe.slater@windriver.com>

Pull fix from version 8.3.1 back to 8.2.0.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
 ...Limit-sprintf-modes-to-10-characters.patch | 49 +++++++++++++++++++
 ...0001-Use-snprintf-instead-of-sprintf.patch | 43 ++++++++++++++++
 .../python/python3-pillow_8.2.0.bb            |  2 +
 3 files changed, 94 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-pillow/0001-Limit-sprintf-modes-to-10-characters.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-pillow/0001-Use-snprintf-instead-of-sprintf.patch

diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-Limit-sprintf-modes-to-10-characters.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-Limit-sprintf-modes-to-10-characters.patch
new file mode 100644
index 0000000000..a1dd0d29ff
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/0001-Limit-sprintf-modes-to-10-characters.patch
@@ -0,0 +1,49 @@
+From 5f4504bb03f4edeeef8c2633dc5ba03a4c2a8a97 Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Tue, 15 Jun 2021 15:14:26 +1000
+Subject: [PATCH 1/1] Limit sprintf modes to 10 characters
+
+Needed to make CVE-2021-34552 fix apply cleanly.
+
+commit 5f4504bb03f4edeeef8c2633dc5ba03a4c2a8a97 (unmodified)
+
+Upstream-Status: Backport
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ src/libImaging/Convert.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/src/libImaging/Convert.c b/src/libImaging/Convert.c
+index 8c7be36a2..1fa74a13b 100644
+--- a/src/libImaging/Convert.c
++++ b/src/libImaging/Convert.c
+@@ -1594,9 +1594,8 @@ convert(
+ #ifdef notdef
+         return (Imaging)ImagingError_ValueError("conversion not supported");
+ #else
+-        static char buf[256];
+-        /* FIXME: may overflow if mode is too large */
+-        sprintf(buf, "conversion from %s to %s not supported", imIn->mode, mode);
++        static char buf[100];
++        sprintf(buf, "conversion from %.10s to %.10s not supported", imIn->mode, mode);
+         return (Imaging)ImagingError_ValueError(buf);
+ #endif
+     }
+@@ -1645,11 +1644,10 @@ ImagingConvertTransparent(Imaging imIn, const char *mode, int r, int g, int b) {
+     }
+ #else
+     {
+-        static char buf[256];
+-        /* FIXME: may overflow if mode is too large */
++        static char buf[100];
+         sprintf(
+             buf,
+-            "conversion from %s to %s not supported in convert_transparent",
++            "conversion from %.10s to %.10s not supported in convert_transparent",
+             imIn->mode,
+             mode);
+         return (Imaging)ImagingError_ValueError(buf);
+-- 
+2.29.2
+
diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-Use-snprintf-instead-of-sprintf.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-Use-snprintf-instead-of-sprintf.patch
new file mode 100644
index 0000000000..fc0337f137
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/0001-Use-snprintf-instead-of-sprintf.patch
@@ -0,0 +1,43 @@
+From 518ee3722a99d7f7d890db82a20bd81c1c0327fb Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Wed, 30 Jun 2021 23:47:10 +1000
+Subject: [PATCH 1/1] Use snprintf instead of sprintf
+
+Fix CVE-2021-34552.
+
+commit 518ee3722a99d7f7d890db82a20bd81c1c0327fb (unmodified)
+
+Upstream-Status: Backport
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+---
+ src/libImaging/Convert.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/libImaging/Convert.c b/src/libImaging/Convert.c
+index 1fa74a13b..9012cfcd7 100644
+--- a/src/libImaging/Convert.c
++++ b/src/libImaging/Convert.c
+@@ -1595,7 +1595,7 @@ convert(
+         return (Imaging)ImagingError_ValueError("conversion not supported");
+ #else
+         static char buf[100];
+-        sprintf(buf, "conversion from %.10s to %.10s not supported", imIn->mode, mode);
++        snprintf(buf, 100, "conversion from %.10s to %.10s not supported", imIn->mode, mode);
+         return (Imaging)ImagingError_ValueError(buf);
+ #endif
+     }
+@@ -1645,8 +1645,9 @@ ImagingConvertTransparent(Imaging imIn, const char *mode, int r, int g, int b) {
+ #else
+     {
+         static char buf[100];
+-        sprintf(
++        snprintf(
+             buf,
++            100,
+             "conversion from %.10s to %.10s not supported in convert_transparent",
+             imIn->mode,
+             mode);
+-- 
+2.29.2
+
diff --git a/meta-python/recipes-devtools/python/python3-pillow_8.2.0.bb b/meta-python/recipes-devtools/python/python3-pillow_8.2.0.bb
index 3241230d13..40745bb763 100644
--- a/meta-python/recipes-devtools/python/python3-pillow_8.2.0.bb
+++ b/meta-python/recipes-devtools/python/python3-pillow_8.2.0.bb
@@ -8,6 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0337b116233da4616ae9fdb130bf6f1a"
 SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=8.2.x \
            file://0001-support-cross-compiling.patch \
            file://0001-explicitly-set-compile-options.patch \
+           file://0001-Limit-sprintf-modes-to-10-characters.patch \
+           file://0001-Use-snprintf-instead-of-sprintf.patch \
 "
 SRCREV ?= "e0e353c0ef7516979a9aedce3792596649ce4433"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-07-29 23:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 23:36 [hardknott 00/15] Patch review July 29th Armin Kuster
2021-07-29 23:36 ` [hardknott 01/15] python3-django: upgrade 3.2.4 -> 3.2.5 (fix CVE-2021-35042) Armin Kuster
2021-07-29 23:36 ` [hardknott 02/15] redis: fix CVE-2021-29477 Armin Kuster
2021-07-29 23:36 ` [hardknott 03/15] redis: fix CVE-2021-29478 Armin Kuster
2021-07-29 23:36 ` [hardknott 04/15] mariadb: Fix configure Armin Kuster
2021-07-29 23:36 ` [hardknott 05/15] mariadb: Upgrade to 10.5.10 Armin Kuster
2021-07-29 23:36 ` [hardknott 06/15] mariadb: Include missing sys/type.h for ssize_t Armin Kuster
2021-07-29 23:36 ` [hardknott 07/15] mariadb: Fix build with clang/musl Armin Kuster
2021-07-29 23:36 ` [hardknott 08/15] mariadb: Use qemu to run cross-compiled binaries Armin Kuster
2021-07-29 23:36 ` [hardknott 09/15] mariadb: Upgrade to 10.5.11 Armin Kuster
2021-07-29 23:36 ` [hardknott 10/15] mariadb: fix failures to start install_db.service Armin Kuster
2021-07-29 23:36 ` [hardknott 11/15] vboxguestdrivers: upgrade 6.1.18 -> 6.1.20 Armin Kuster
2021-07-29 23:36 ` [hardknott 12/15] vboxguestdrivers: upgrade 6.1.20 -> 6.1.22 Armin Kuster
2021-07-29 23:36 ` [hardknott 13/15] vboxguestdrivers: add a fix for build failure with kernel 5.13 Armin Kuster
2021-07-29 23:36 ` [hardknott 14/15] hiawatha: fix url Armin Kuster
2021-07-29 23:36 ` [hardknott 15/15] python3-pillow: fix CVE-2021-34552 Armin Kuster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.