Skip to contentSkip to conversation

Patch review

PATCH New Steve Sakoman 1 participant 16 messages Oct 4, 2021

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this next set of patches for dunfell and have comments back by end of day Wednesday.

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2677

The following changes since commit 8e7c8e43260682efafabc50c757b9c2daff98f13:

connman: add CVE_PRODUCT (2021-09-24 04:27:46 -1000)

are available in the Git repository at:

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

Minjae Kim (1):
vim: fix CVE-2021-3778

Ranjitsinh Rathod (1):
systemd: Add fix for systemd-networkd crash during free

Richard Purdie (7):
mtd-utils: upgrade 2.1.1 -> 2.1.2
pybootchart: Avoid divide by zero oeqa/qemurunner: Use oe._exit(), not sys.exit() libc_package/buildstats: Fix python regex quoting warnings oeqa/selftest/gotoolchain: Fix temp file cleanup oeqa/buildproject: Ensure temp directories are cleaned up
glew: Stop polluting /tmp during builds

Robert P. J. Day (1):
common-licenses: add "Unlicense" license file

Stefano Babic (1):
mtd-utils: upgrade 2.1.2 -> 2.1.3

Tom Pollard (2):
bzip2: Update soname for libbz2 1.0.8
libsamplerate0: Set correct soname for 0.1.9

William A. Kennington III (1):
rm_work.bbclass: Fix for files starting with -

sana kazi (1):
openssh: Fix CVE-2021-28041

 meta/classes/libc-package.bbclass             |   2 +-
 meta/classes/rm_work.bbclass                  |   8 +-
 meta/files/common-licenses/Unlicense          |  24 ++
 meta/lib/buildstats.py                        |   4 +-
 meta/lib/oeqa/selftest/cases/gotoolchain.py   |   6 +
 meta/lib/oeqa/utils/buildproject.py           |   3 +
 meta/lib/oeqa/utils/qemurunner.py             |   2 +-
 meta/lib/oeqa/utils/targetbuild.py            |   4 +-
 .../openssh/openssh/CVE-2021-28041.patch      |  20 ++
 .../openssh/openssh_8.2p1.bb                  |   1 +
 ...-info-for-ordered-set-new-and-introd.patch |  78 +++++
 ...dered_set_clear-free-with-destructor.patch |  35 +++
 ...etwork-add-skeleton-of-request-queue.patch | 285 ++++++++++++++++++
 ...quests-when-link-enters-linger-state.patch |  50 +++
 ...ork-fix-Link-reference-counter-issue.patch | 278 +++++++++++++++++
 ...nk_drop-and-link_detach_from_manager.patch |  67 ++++
 meta/recipes-core/systemd/systemd_244.5.bb    |   6 +
 ...-utils-Fix-return-value-of-ubiformat.patch |  62 ----
 meta/recipes-devtools/mtd/mtd-utils_git.bb    |   9 +-
 meta/recipes-extended/bzip2/bzip2/Makefile.am |   2 +-
 .../glew/glew/notempdir.patch                 |  19 ++
 meta/recipes-graphics/glew/glew_2.2.0.bb      |   1 +
 .../libsamplerate0/shared_version_info.patch  |  13 +
 .../libsamplerate/libsamplerate0_0.1.9.bb     |   1 +
 .../vim/files/CVE-2021-3778.patch             |  49 +++
 meta/recipes-support/vim/vim.inc              |   1 +
 scripts/pybootchartgui/pybootchartgui/draw.py |   5 +-
 27 files changed, 956 insertions(+), 79 deletions(-)
 create mode 100644 meta/files/common-licenses/Unlicense
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2021-28041.patch
 create mode 100644 meta/recipes-core/systemd/systemd/basic-pass-allocation-info-for-ordered-set-new-and-introd.patch
 create mode 100644 meta/recipes-core/systemd/systemd/introduce-ordered_set_clear-free-with-destructor.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-add-skeleton-of-request-queue.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-also-drop-requests-when-link-enters-linger-state.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-fix-Link-reference-counter-issue.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-merge-link_drop-and-link_detach_from_manager.patch
 delete mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-mtd-utils-Fix-return-value-of-ubiformat.patch
 create mode 100644 meta/recipes-graphics/glew/glew/notempdir.patch
 create mode 100644 meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/15 vim: fix CVE-2021-3778

From: Minjae Kim <[email protected]>

vim is vulnerable to Heap-based Buffer Overflow

reference:
https://github.com/vim/vim/commit/65b605665997fad54ef39a93199e305af2fe4d7f

---
 .../vim/files/CVE-2021-3778.patch             | 49 +++++++++++++++++++
 meta/recipes-support/vim/vim.inc              |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch
meta/recipes-support/vim/files/CVE-2021-3778.patch new file +49 -0
new file mode 100644
index 0000000000..9e1c4d29be
@@ -0,0 +1,49 @@
+From eb41373c8c88b0789e5cf04669d6116f9a199264 Mon Sep 17 00:00:00 2001
+From: Minjae Kim <[email protected]>
+Date: Sun, 26 Sep 2021 23:48:00 +0000
+Subject: [PATCH] patch 8.2.3409: reading beyond end of line with invalid utf-8
+ character
+
+Problem: Reading beyond end of line with invalid utf-8 character.
+Solution: Check for NUL when advancing.
+
+Upstream-Status: Accepted [https://github.com/vim/vim/commit/65b605665997fad54ef39a93199e305af2fe4d7f]
+CVE: CVE-2021-3778
+Signed-off-by: Minjae Kim <[email protected]>
+---
+ src/regexp_nfa.c                 | 3 ++-
+ src/testdir/test_regexp_utf8.vim | 7 +++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
+index fb512f961..4d337f1f1 100644
+--- a/src/regexp_nfa.c
++++ b/src/regexp_nfa.c
+@@ -5455,7 +5455,8 @@ find_match_text(colnr_T startcol, int regstart, char_u *match_text)
+ 		match = FALSE;
+ 		break;
+ 	    }
+-	    len2 += MB_CHAR2LEN(c2);
++	    len2 += enc_utf8 ? utf_ptr2len(rex.line + col + len2)
++		                                             : MB_CHAR2LEN(c2);
+ 	}
+ 	if (match
+ 		// check that no composing char follows
+diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim
+index 19ff882be..e0665818b 100644
+--- a/src/testdir/test_regexp_utf8.vim
++++ b/src/testdir/test_regexp_utf8.vim
+@@ -215,3 +215,10 @@ func Test_optmatch_toolong()
+   set re=0
+ endfunc
+ 
++func Test_match_invalid_byte()
++  call writefile(0z630a.765d30aa0a.2e0a.790a.4030, 'Xinvalid')
++  new
++  source Xinvalid
++  bwipe!
++  call delete('Xinvalid')
++endfunc
+-- 
+2.17.1
+
meta/recipes-support/vim/vim.inc +1 -0
index ecaba7107e..fc4e205b74 100644
@@ -18,6 +18,7 @@ SRC_URI = "git://github.com/vim/vim.git \
            file://no-path-adjust.patch \
            file://racefix.patch \
            file://b7081e135a16091c93f6f5f7525a5c58fb7ca9f9.patch \
+	   file://CVE-2021-3778.patch \
 "
 
 SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/15 openssh: Fix CVE-2021-28041

In reply to Steve Sakoman

From: sana kazi <[email protected]>

Added patch to fix CVE-2021-28041.

Link:
http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_8.2p1-4ubuntu0.3.debian.tar.xz

---
 .../openssh/openssh/CVE-2021-28041.patch      | 20 +++++++++++++++++++
 .../openssh/openssh_8.2p1.bb                  |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2021-28041.patch
meta/recipes-connectivity/openssh/openssh/CVE-2021-28041.patch new file +20 -0
new file mode 100644
index 0000000000..9fd7e932d1
@@ -0,0 +1,20 @@
+Description: fix double-free memory corruption in ssh-agent
+Author: Marc Deslauriers <[email protected]>
+Origin: minimal fix for https://github.com/openssh/openssh-portable/commit/e04fd6dde16de1cdc5a4d9946397ff60d96568db
+
+Signed-off-by: Sana Kazi <[email protected]>
+
+CVE: CVE-2021-28041
+Upstream-Status: Backport [http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_8.2p1-4ubuntu0.3.debian.tar.xz]
+Comment: No change in any hunk
+
+--- a/ssh-agent.c
++++ b/ssh-agent.c
+@@ -496,6 +496,7 @@ process_add_identity(SocketEntry *e)
+				goto err;
+			}
+			free(ext_name);
++			ext_name = NULL;
+			break;
+		default:
+			error("%s: Unknown constraint %d", __func__, ctype);
meta/recipes-connectivity/openssh/openssh_8.2p1.bb +1 -0
index 64a0a72a8f..5f03bdc877 100644
@@ -25,6 +25,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
            file://sshd_check_keys \
            file://add-test-support-for-busybox.patch \
            file://CVE-2020-14145.patch \
+           file://CVE-2021-28041.patch \
            "
 SRC_URI[md5sum] = "3076e6413e8dbe56d33848c1054ac091"
 SRC_URI[sha256sum] = "43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671"
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/15 mtd-utils: upgrade 2.1.1 -> 2.1.2

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

Drop backported patch.

(cherry picked from commit e38fd1ac331d824b2db94a7ae46026b111257e83)
---
 ...-utils-Fix-return-value-of-ubiformat.patch | 62 -------------------
 meta/recipes-devtools/mtd/mtd-utils_git.bb    |  7 +--
 2 files changed, 3 insertions(+), 66 deletions(-)
 delete mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-mtd-utils-Fix-return-value-of-ubiformat.patch
meta/recipes-devtools/mtd/mtd-utils/0001-mtd-utils-Fix-return-value-of-ubiformat.patch deleted +0 -62
deleted file mode 100644
index d43f7e1a7a..0000000000
@@ -1,62 +0,0 @@
-From 4d19bffcfd66e25d3ee74536ae2d2da7ad52e8e2 Mon Sep 17 00:00:00 2001
-From: Barry Grussling <[email protected]>
-Date: Sun, 12 Jan 2020 12:33:32 -0800
-Subject: [PATCH] mtd-utils: Fix return value of ubiformat
-Organization: O.S. Systems Software LTDA.
-
-This changeset fixes a feature regression in ubiformat.  Older versions of
-ubiformat, when invoked with a flash-image, would return 0 in the case no error
-was encountered.  Upon upgrading to latest, it was discovered that ubiformat
-returned 255 even without encountering an error condition.
-
-This changeset corrects the above issue and causes ubiformat, when given an
-image file, to return 0 when no errors are detected.
-
-Tested by running through my loading scripts and verifying ubiformat returned
-0.
-
-Upstream-Status: Backport [2.1.2]
-
-Signed-off-by: Barry Grussling <[email protected]>
-Signed-off-by: David Oberhollenzer <[email protected]>
-Signed-off-by: Otavio Salvador <[email protected]>
----
- ubi-utils/ubiformat.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c
-index a90627c..5377b12 100644
---- a/ubi-utils/ubiformat.c
-+++ b/ubi-utils/ubiformat.c
-@@ -550,6 +550,7 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd,
- 	struct ubi_vtbl_record *vtbl;
- 	int eb1 = -1, eb2 = -1;
- 	long long ec1 = -1, ec2 = -1;
-+	int ret = -1;
- 
- 	write_size = UBI_EC_HDR_SIZE + mtd->subpage_size - 1;
- 	write_size /= mtd->subpage_size;
-@@ -643,8 +644,10 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd,
- 	if (!args.quiet && !args.verbose)
- 		printf("\n");
- 
--	if (novtbl)
-+	if (novtbl) {
-+		ret = 0;
- 		goto out_free;
-+	}
- 
- 	if (eb1 == -1 || eb2 == -1) {
- 		errmsg("no eraseblocks for volume table");
-@@ -669,7 +672,7 @@ static int format(libmtd_t libmtd, const struct mtd_dev_info *mtd,
- 
- out_free:
- 	free(hdr);
--	return -1;
-+	return ret;
- }
- 
- int main(int argc, char * const argv[])
--- 
-2.27.0
-
meta/recipes-devtools/mtd/mtd-utils_git.bb +3 -4
index 9c05dc03dc..55f05dc8f9 100644
@@ -11,13 +11,12 @@ inherit autotools pkgconfig update-alternatives
 DEPENDS = "zlib e2fsprogs util-linux"
 RDEPENDS_mtd-utils-tests += "bash"
 
-PV = "2.1.1"
+PV = "2.1.2"
 
-SRCREV = "4443221ce9b88440cd9f5bb78e6fe95621d36c8a"
+SRCREV = "7b986779342021bda87c04da3bf729718736d8ab"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
-           file://0001-mtd-utils-Fix-return-value-of-ubiformat.patch \
-"
+           "
 
 S = "${WORKDIR}/git/"
 
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/15 mtd-utils: upgrade 2.1.2 -> 2.1.3

In reply to Steve Sakoman

From: Stefano Babic <[email protected]>

Drop also --enable-install-tests from configuration options because this was removed in 2.1.3.

(cherry picked from commit c95c852b84f02f5e2ad5c575ab683bba0471f221)
CC David Oberhollenzer <[email protected]>
CC Alexandre Belloni <[email protected]>
---
 meta/recipes-devtools/mtd/mtd-utils_git.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-devtools/mtd/mtd-utils_git.bb +2 -4
index 55f05dc8f9..d8355bbad3 100644
@@ -11,17 +11,15 @@ inherit autotools pkgconfig update-alternatives
 DEPENDS = "zlib e2fsprogs util-linux"
 RDEPENDS_mtd-utils-tests += "bash"
 
-PV = "2.1.2"
+PV = "2.1.3"
 
-SRCREV = "7b986779342021bda87c04da3bf729718736d8ab"
+SRCREV = "42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
            "
 
 S = "${WORKDIR}/git/"
 
-EXTRA_OECONF += "--enable-install-tests"
-
 # xattr support creates an additional compile-time dependency on acl because
 # the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
 # regardless whether acl is enabled or disabled in the distro should be okay.
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/15 systemd: Add fix for systemd-networkd crash during free

In reply to Steve Sakoman

From: Ranjitsinh Rathod <[email protected]>

We are observing systemd-network service crash during link down while freeing link->ifname pointer

Backtrace:
(gdb) bt
0  __GI_abort () at abort.c:107
1  0x0000007f861d32b4 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f8628d500 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
2  0x0000007f861da51c in malloc_printerr (str=str@entry=0x7f86289070 "free(): invalid next size (fast)") at malloc.c:5347
3  0x0000007f861dbd58 in _int_free (av=0x7f862c9a28 <main_arena>, p=0x558aa28eb0, have_lock=0) at malloc.c:4249
4  0x0000005569249cf0 in link_free (link=0x558aa1c0d0) at ../git/src/network/networkd-link.c:715
5  link_unref (p=0x558aa1c0d0) at ../git/src/network/networkd-link.c:734
6  0x000000556920f34c in manager_rtnl_process_link (rtnl=<optimized out>, message=0x558aa2a430, userdata=0x558a9fc630)

While checking upstream code change with regards to link->ifname memory allocation and free, we found below PR which also fixes random systemd-networkd crash:

https://github.com/systemd/systemd/pull/19631
https://github.com/systemd/systemd/issues/19629

---
 ...-info-for-ordered-set-new-and-introd.patch |  78 +++++
 ...dered_set_clear-free-with-destructor.patch |  35 +++
 ...etwork-add-skeleton-of-request-queue.patch | 285 ++++++++++++++++++
 ...quests-when-link-enters-linger-state.patch |  50 +++
 ...ork-fix-Link-reference-counter-issue.patch | 278 +++++++++++++++++
 ...nk_drop-and-link_detach_from_manager.patch |  67 ++++
 meta/recipes-core/systemd/systemd_244.5.bb    |   6 +
 7 files changed, 799 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/basic-pass-allocation-info-for-ordered-set-new-and-introd.patch
 create mode 100644 meta/recipes-core/systemd/systemd/introduce-ordered_set_clear-free-with-destructor.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-add-skeleton-of-request-queue.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-also-drop-requests-when-link-enters-linger-state.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-fix-Link-reference-counter-issue.patch
 create mode 100644 meta/recipes-core/systemd/systemd/network-merge-link_drop-and-link_detach_from_manager.patch
meta/recipes-core/systemd/systemd/basic-pass-allocation-info-for-ordered-set-new-and-introd.patch new file +78 -0
new file mode 100644
index 0000000000..86d9b0499a
@@ -0,0 +1,78 @@
+From 1f25c71d9d0b5fe6cf383c347dcebc2443a99fe1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
+Date: Tue, 1 Sep 2020 12:42:35 +0200
+Subject: [PATCH] basic: pass allocation info for ordered_set_new() and
+ introduce ordered_set_ensure_put()
+
+Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/1f25c71d9d0b5fe6cf383c347dcebc2443a99fe1]
+Signed-off-by: Ranjitsinh Rathod <[email protected]>
+
+---
+ src/basic/ordered-set.c | 21 +++++++++++++++++++++
+ src/basic/ordered-set.h | 18 +++++++-----------
+ 2 files changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/src/basic/ordered-set.c b/src/basic/ordered-set.c
+index 7fdb47e064..fb82c17b5a 100644
+--- a/src/basic/ordered-set.c
++++ b/src/basic/ordered-set.c
+@@ -4,6 +4,27 @@
+ #include "ordered-set.h"
+ #include "strv.h"
+ 
++int _ordered_set_ensure_allocated(OrderedSet **s, const struct hash_ops *ops  HASHMAP_DEBUG_PARAMS) {
++        if (*s)
++                return 0;
++
++        *s = _ordered_set_new(ops  HASHMAP_DEBUG_PASS_ARGS);
++        if (!*s)
++                return -ENOMEM;
++
++        return 0;
++}
++
++int _ordered_set_ensure_put(OrderedSet **s, const struct hash_ops *ops, void *p  HASHMAP_DEBUG_PARAMS) {
++        int r;
++
++        r = _ordered_set_ensure_allocated(s, ops  HASHMAP_DEBUG_PASS_ARGS);
++        if (r < 0)
++                return r;
++
++        return ordered_set_put(*s, p);
++}
++
+ int ordered_set_consume(OrderedSet *s, void *p) {
+         int r;
+ 
+diff --git a/src/basic/ordered-set.h b/src/basic/ordered-set.h
+index a42a57eb49..2c241a808b 100644
+--- a/src/basic/ordered-set.h
++++ b/src/basic/ordered-set.h
+@@ -7,20 +7,16 @@
+ 
+ typedef struct OrderedSet OrderedSet;
+ 
+-static inline OrderedSet* ordered_set_new(const struct hash_ops *ops) {
+-        return (OrderedSet*) ordered_hashmap_new(ops);
++static inline OrderedSet* _ordered_set_new(const struct hash_ops *ops  HASHMAP_DEBUG_PARAMS) {
++        return (OrderedSet*) internal_ordered_hashmap_new(ops  HASHMAP_DEBUG_PASS_ARGS);
+ }
++#define ordered_set_new(ops) _ordered_set_new(ops  HASHMAP_DEBUG_SRC_ARGS)
+ 
+-static inline int ordered_set_ensure_allocated(OrderedSet **s, const struct hash_ops *ops) {
+-        if (*s)
+-                return 0;
++int _ordered_set_ensure_allocated(OrderedSet **s, const struct hash_ops *ops  HASHMAP_DEBUG_PARAMS);
++#define ordered_set_ensure_allocated(s, ops) _ordered_set_ensure_allocated(s, ops  HASHMAP_DEBUG_SRC_ARGS)
+ 
+-        *s = ordered_set_new(ops);
+-        if (!*s)
+-                return -ENOMEM;
+-
+-        return 0;
+-}
++int _ordered_set_ensure_put(OrderedSet **s, const struct hash_ops *ops, void *p  HASHMAP_DEBUG_PARAMS);
++#define ordered_set_ensure_put(s, hash_ops, key) _ordered_set_ensure_put(s, hash_ops, key  HASHMAP_DEBUG_SRC_ARGS)
+ 
+ static inline OrderedSet* ordered_set_free(OrderedSet *s) {
+         return (OrderedSet*) ordered_hashmap_free((OrderedHashmap*) s);
meta/recipes-core/systemd/systemd/introduce-ordered_set_clear-free-with-destructor.patch new file +35 -0
new file mode 100644
index 0000000000..42b6e05b55
@@ -0,0 +1,35 @@
+From d38a6476aad3f2cc80a2a4bc11f3898cc06a70f5 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <[email protected]>
+Date: Mon, 26 Apr 2021 23:52:40 +0900
+Subject: [PATCH] ordered-set: introduce
+ ordered_set_clear/free_with_destructor()
+
+Upstream-Status: Backport [https://github.com/systemd/systemd-stable/commit/d38a6476aad3f2cc80a2a4bc11f3898cc06a70f5]
+Signed-off-by: Ranjitsinh Rathod <[email protected]>
+
+---
+ src/basic/ordered-set.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/basic/ordered-set.h b/src/basic/ordered-set.h
+index a377f20b1f..64df41766f 100644
+--- a/src/basic/ordered-set.h
++++ b/src/basic/ordered-set.h
+@@ -63,6 +63,17 @@ void ordered_set_print(FILE *f, const char *field, OrderedSet *s);
+ #define ORDERED_SET_FOREACH(e, s, i)                                    \
+         for ((i) = ITERATOR_FIRST; ordered_set_iterate((s), &(i), (void**)&(e)); )
+ 
++#define ordered_set_clear_with_destructor(s, f)                 \
++        ({                                                      \
++                OrderedSet *_s = (s);                           \
++                void *_item;                                    \
++                while ((_item = ordered_set_steal_first(_s)))   \
++                        f(_item);                               \
++                _s;                                             \
++        })
++#define ordered_set_free_with_destructor(s, f)                  \
++        ordered_set_free(ordered_set_clear_with_destructor(s, f))
++
+ DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedSet*, ordered_set_free);
+ DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedSet*, ordered_set_free_free);
+ 
meta/recipes-core/systemd/systemd/network-add-skeleton-of-request-queue.patch new file +285 -0

285 lines not on this page · raw message

meta/recipes-core/systemd/systemd/network-also-drop-requests-when-link-enters-linger-state.patch new file +50 -0

50 lines not on this page · raw message

meta/recipes-core/systemd/systemd/network-fix-Link-reference-counter-issue.patch new file +278 -0

278 lines not on this page · raw message

meta/recipes-core/systemd/systemd/network-merge-link_drop-and-link_detach_from_manager.patch new file +67 -0

67 lines not on this page · raw message

meta/recipes-core/systemd/systemd_244.5.bb +6 -0
index 7a7eddcd45..bf33b8d6a1 100644
@@ -22,6 +22,12 @@ SRC_URI += "file://touchscreen.rules \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://CVE-2021-33910.patch \
            file://CVE-2020-13529.patch \
+           file://basic-pass-allocation-info-for-ordered-set-new-and-introd.patch \
+           file://introduce-ordered_set_clear-free-with-destructor.patch \
+           file://network-add-skeleton-of-request-queue.patch \
+           file://network-merge-link_drop-and-link_detach_from_manager.patch \
+           file://network-also-drop-requests-when-link-enters-linger-state.patch \
+           file://network-fix-Link-reference-counter-issue.patch \
            "
 
 # patches needed by musl
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/15 common-licenses: add "Unlicense" license file

In reply to Steve Sakoman

From: "Robert P. J. Day" <[email protected]>

(cherry picked from commit 7698f3145a9c48778d7bb79f54df169cf375349c)
---
 meta/files/common-licenses/Unlicense | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 meta/files/common-licenses/Unlicense
meta/files/common-licenses/Unlicense new file +24 -0
new file mode 100644
index 0000000000..68a49daad8
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
Signature · 1 line
2.25.1
#7 lore raw

PATCH 7/15 bzip2: Update soname for libbz2 1.0.8

In reply to Steve Sakoman

From: Tom Pollard <[email protected]>

Set shared library name as libbz2.so.1.0.8, version in configure.ac already synced via do_configure PV substitution.

(cherry picked from commit 07e3abc9d282a54add69a6905ec4248f3104219f)
---
 meta/recipes-extended/bzip2/bzip2/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/bzip2/bzip2/Makefile.am +1 -1
index dcf64584d9..adc85a62b2 100644
@@ -1,6 +1,6 @@
 
 lib_LTLIBRARIES = libbz2.la
-libbz2_la_LDFLAGS = -version-info 1:6:0
+libbz2_la_LDFLAGS = -version-info 1:8:0
 
 libbz2_la_SOURCES = blocksort.c  \
                     huffman.c    \
Signature · 1 line
2.25.1
#8 lore raw

PATCH 8/15 libsamplerate0: Set correct soname for 0.1.9

In reply to Steve Sakoman

From: Tom Pollard <[email protected]>

Manually patch SHARED_VERSION_INFO, which was missed in the 0.1.9 release and later incorrectly fixed until 0.2.1

(cherry picked from commit cb2e8efd316d44b9b1453882114856e0eb7b3500)
---
 .../libsamplerate0/shared_version_info.patch        | 13 +++++++++++++
 .../libsamplerate/libsamplerate0_0.1.9.bb           |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch new file +13 -0
new file mode 100644
index 0000000000..b42d564b4b
@@ -0,0 +1,13 @@
+Index: libsamplerate-0.1.8/configure.ac
+===================================================================
+--- libsamplerate-0.1.8.orig/configure.ac
++++ libsamplerate-0.1.8/configure.ac
+@@ -53,7 +53,7 @@ AC_PROG_LN_S
+ #  6. If any interfaces have been removed since the last public release, then set age
+ #     to 0.
+ 
+-SHARED_VERSION_INFO="1:8:1"
++SHARED_VERSION_INFO="1:9:1"
+ 
+ 
+ 
meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb +1 -0
index 6dfc42b436..8345d6880f 100644
@@ -10,6 +10,7 @@ PR = "r1"
 
 SRC_URI = "http://www.mega-nerd.com/SRC/libsamplerate-${PV}.tar.gz \
            file://0001-configure.ac-improve-alsa-handling.patch \
+           file://shared_version_info.patch \
 "
 
 SRC_URI[md5sum] = "2b78ae9fe63b36b9fbb6267fad93f259"
Signature · 1 line
2.25.1
#9 lore raw

PATCH 9/15 pybootchart: Avoid divide by zero

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

Avoid a rare divide by zero error if there isn't data point spread.

[YOCTO #14547]

(cherry picked from commit d7e36d01e87ddf89f76f164a0b7d98f597a53fa5)
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/pybootchartgui/pybootchartgui/draw.py +4 -1
index 29eb7505bc..fc708b55c3 100644
@@ -267,7 +267,10 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
     # avoid divide by zero
     if max_y == 0:
         max_y = 1.0
-    xscale = float (chart_bounds[2]) / (max_x - x_shift)
+    if (max_x - x_shift):
+        xscale = float (chart_bounds[2]) / (max_x - x_shift)
+    else:
+        xscale = float (chart_bounds[2])
     # If data_range is given, scale the chart so that the value range in
     # data_range matches the chart bounds exactly.
     # Otherwise, scale so that the actual data matches the chart bounds.
Signature · 1 line
2.25.1
#10 lore raw

PATCH 10/15 oeqa/qemurunner: Use oe._exit(), not sys.exit()

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

sys.exit will cause finally statements and other code to run at exit. Since we're using os.fork() here, os._exit() is apprioriate in this codepath.

(cherry picked from commit ec08498ff29de9ccd23be88b9d7af3dab6bbb81e)
---
 meta/lib/oeqa/utils/qemurunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/utils/qemurunner.py +1 -1
index f7e5a3b3a6..de0dff3ff0 100644
@@ -234,7 +234,7 @@ class QemuRunner:
             r = os.fdopen(r)
             x = r.read()
             os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
-            sys.exit(0)
+            os._exit(0)
 
         self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid)
         self.logger.debug("waiting at most %s seconds for qemu pid (%s)" %
Signature · 1 line
2.25.1
#11 lore raw

PATCH 11/15 libc_package/buildstats: Fix python regex quoting warnings

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

(cherry picked from commit 6a8077317ce12e13018ec4472f728dd24880bda9)
---
 meta/classes/libc-package.bbclass | 2 +-
 meta/lib/buildstats.py            | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/libc-package.bbclass +1 -1
index de3b4250c7..1143f538d6 100644
@@ -355,7 +355,7 @@ python package_do_split_gconvs () {
                 m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
                 m.write("\t" + makerecipe + "\n\n")
         d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile)))
-        d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)")
+        d.setVarFlag("oe_runmake", "progress", r"outof:Progress\s(\d+)/(\d+)")
         bb.note("Executing binary locale generation makefile")
         bb.build.exec_func("oe_runmake", d)
         bb.note("collecting binary locales from locale tree")
meta/lib/buildstats.py +2 -2
index 8627ed3c31..c52b6c3b72 100644
@@ -43,8 +43,8 @@ class SystemStats:
         # depends on the heartbeat event, which fires less often.
         self.min_seconds = 1
 
-        self.meminfo_regex = re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)')
-        self.diskstats_regex = re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
+        self.meminfo_regex = re.compile(rb'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)')
+        self.diskstats_regex = re.compile(rb'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
         self.diskstats_ltime = None
         self.diskstats_data = None
         self.stat_ltimes = None
Signature · 1 line
2.25.1
#12 lore raw

PATCH 12/15 rm_work.bbclass: Fix for files starting with -

In reply to Steve Sakoman

From: "William A. Kennington III" <[email protected]>

This makes it possible to name files starting with a hyphen in the work directory. Without this change rm will fail due to an unexpected option being passed.

(cherry picked from commit 5f1a63e0de4921ef970114a16d0827fcddcdaa0e)
---
 meta/classes/rm_work.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/rm_work.bbclass +4 -4
index 01c2ab1c78..2d5a56c238 100644
@@ -73,7 +73,7 @@ do_rm_work () {
             # sstate version since otherwise we'd need to leave 'plaindirs' around
             # such as 'packages' and 'packages-split' and these can be large. No end
             # of chain tasks depend directly on do_package anymore.
-            rm -f $i;
+            rm -f -- $i;
             ;;
         *_setscene*)
             # Skip stamps which are already setscene versions
@@ -90,7 +90,7 @@ do_rm_work () {
                     ;;
                 esac
             done
-            rm -f $i
+            rm -f -- $i
         esac
     done
 
@@ -100,9 +100,9 @@ do_rm_work () {
         # Retain only logs and other files in temp, safely ignore
         # failures of removing pseudo folers on NFS2/3 server.
         if [ $dir = 'pseudo' ]; then
-            rm -rf $dir 2> /dev/null || true
+            rm -rf -- $dir 2> /dev/null || true
         elif ! echo "$excludes" | grep -q -w "$dir"; then
-            rm -rf $dir
+            rm -rf -- $dir
         fi
     done
 }
Signature · 1 line
2.25.1
#13 lore raw

PATCH 13/15 oeqa/selftest/gotoolchain: Fix temp file cleanup

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

The go tests leave readonly files and directories behind. Fix this to allow cleanup.

[YOCTO #14575]

(cherry picked from commit 5680e95d7bd9fe00a797b2d0deb8cb4790027508)
---
 meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 ++++++
 1 file changed, 6 insertions(+)
meta/lib/oeqa/selftest/cases/gotoolchain.py +6 -0
index 3119520f0d..59f80aad28 100644
@@ -43,6 +43,12 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
 
     @classmethod
     def tearDownClass(cls):
+        # Go creates file which are readonly
+        for dirpath, dirnames, filenames in os.walk(cls.tmpdir_SDKQA):
+            for filename in filenames + dirnames:
+                f = os.path.join(dirpath, filename)
+                if not os.path.islink(f):
+                    os.chmod(f, 0o775)
         shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
         super(oeGoToolchainSelfTest, cls).tearDownClass()
 
Signature · 1 line
2.25.1
#14 lore raw

PATCH 14/15 oeqa/buildproject: Ensure temp directories are cleaned up

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

(cherry picked from commit d10aff865120a5feecc42c24726bd119364e0188)
---
 meta/lib/oeqa/utils/buildproject.py | 3 +++
 meta/lib/oeqa/utils/targetbuild.py  | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
meta/lib/oeqa/utils/buildproject.py +3 -0
index e6d80cc8dc..dfb9661868 100644
@@ -18,6 +18,7 @@ class BuildProject(metaclass=ABCMeta):
     def __init__(self, uri, foldername=None, tmpdir=None, dl_dir=None):
         self.uri = uri
         self.archive = os.path.basename(uri)
+        self.tempdirobj = None
         if not tmpdir:
             self.tempdirobj = tempfile.TemporaryDirectory(prefix='buildproject-')
             tmpdir = self.tempdirobj.name
@@ -57,6 +58,8 @@ class BuildProject(metaclass=ABCMeta):
         return self._run('cd %s; make install %s' % (self.targetdir, install_args))
 
     def clean(self):
+        if self.tempdirobj:
+            self.tempdirobj.cleanup()
         if not self.needclean:
              return
         self._run('rm -rf %s' % self.targetdir)
meta/lib/oeqa/utils/targetbuild.py +3 -1
index 1055810ca3..09738add1d 100644
@@ -19,6 +19,7 @@ class BuildProject(metaclass=ABCMeta):
         self.d = d
         self.uri = uri
         self.archive = os.path.basename(uri)
+        self.tempdirobj = None
         if not tmpdir:
             tmpdir = self.d.getVar('WORKDIR')
             if not tmpdir:
@@ -71,9 +72,10 @@ class BuildProject(metaclass=ABCMeta):
         return self._run('cd %s; make install %s' % (self.targetdir, install_args))
 
     def clean(self):
+        if self.tempdirobj:
+            self.tempdirobj.cleanup()
         self._run('rm -rf %s' % self.targetdir)
         subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
-        pass
 
 class TargetBuildProject(BuildProject):
 
Signature · 1 line
2.25.1
#15 lore raw

PATCH 15/15 glew: Stop polluting /tmp during builds

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

Currently the glew code creates a new directory in /tmp for each make invocation. This is a bit ugly, don't do that. The patch does break the dist targets but we don't use them.

(cherry picked from commit 3a55194f90e11da5671b24391a4aaf2b86a8e1e6)
---
 .../glew/glew/notempdir.patch                 | 19 +++++++++++++++++++
 meta/recipes-graphics/glew/glew_2.2.0.bb      |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-graphics/glew/glew/notempdir.patch
meta/recipes-graphics/glew/glew/notempdir.patch new file +19 -0
new file mode 100644
index 0000000000..8d79ce0cdf
@@ -0,0 +1,19 @@
+We don't use the dist-* targets and hence DIST_DIR isn't used. The current code
+creates a new temp directory in /tmp/ for every invocation of make. Lets
+not do that.
+
+Upstream-Status: Pending [a revised version would be needed for upstream]
+Signed-off-by: Richard Purdie <[email protected]>
+
+Index: glew-2.2.0/Makefile
+===================================================================
+--- glew-2.2.0.orig/Makefile
++++ glew-2.2.0/Makefile
+@@ -56,7 +56,6 @@ DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME
+ DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz
+ DIST_WIN32   ?= $(shell pwd)/$(DIST_NAME)-win32.zip
+ 
+-DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
+ 
+ # To disable stripping of linked binaries either:
+ #   - use STRIP= on gmake command-line
meta/recipes-graphics/glew/glew_2.2.0.bb +1 -0
index 92b6083648..d7a26a3438 100644
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
            file://0001-Fix-build-race-in-Makefile.patch \
+           file://notempdir.patch \
            file://no-strip.patch"
 
 SRC_URI[md5sum] = "3579164bccaef09e36c0af7f4fd5c7c7"
Signature · 1 line
2.25.1