* [hardknott][PATCH 00/10] Review request
@ 2021-09-29 14:58 Anuj Mittal
2021-09-29 14:58 ` [hardknott][PATCH 01/10] vim: fix CVEs Anuj Mittal
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:58 UTC (permalink / raw)
To: openembedded-core
Please review these changes for hardknott. One intermittent failure seen
when running SDK tests on Centos-8 but that doesn't look related to
these changes.
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2660
Thanks,
Anuj
The following changes since commit 437f5e04c92158d3c9e27fe6252260a02a108391:
ffmpeg: fix CVE-2021-38114 (2021-09-24 10:17:24 +0100)
are available in the Git repository at:
git://push.openembedded.org/openembedded-core-contrib anujm/hardknott
Konrad Weihmann (1):
expat: pull from github releases
Mingli Yu (1):
vim: fix CVEs
Richard Purdie (5):
pybootchart: Avoid divide by zero
oeqa/qemurunner: Use oe._exit(), not sys.exit()
oeqa/selftest/gotoolchain: Fix temp file cleanup
oeqa/buildproject: Ensure temp directories are cleaned up
bash: Ensure deterministic build
Steve Sakoman (1):
connman: add CVE_PRODUCT
Tom Pollard (2):
bzip2: Update soname for libbz2 1.0.8
libsamplerate0: Set correct soname for 0.1.9
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 +-
meta/recipes-connectivity/connman/connman.inc | 2 +
meta/recipes-core/expat/expat_2.2.10.bb | 6 ++-
meta/recipes-extended/bash/bash.inc | 5 ++
meta/recipes-extended/bzip2/bzip2/Makefile.am | 2 +-
.../libsamplerate0/shared_version_info.patch | 13 +++++
.../libsamplerate/libsamplerate0_0.1.9.bb | 1 +
.../vim/files/CVE-2021-3778.patch | 34 +++++++++++++
.../vim/files/CVE-2021-3796.patch | 50 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 2 +
scripts/pybootchartgui/pybootchartgui/draw.py | 5 +-
14 files changed, 130 insertions(+), 5 deletions(-)
create mode 100644 meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch
create mode 100644 meta/recipes-support/vim/files/CVE-2021-3796.patch
--
2.31.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [hardknott][PATCH 01/10] vim: fix CVEs
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
@ 2021-09-29 14:58 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 02/10] connman: add CVE_PRODUCT Anuj Mittal
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:58 UTC (permalink / raw)
To: openembedded-core
From: Mingli Yu <mingli.yu@windriver.com>
Backport patches to fix CVE-2021-3778 and CVE-2021-3796.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../vim/files/CVE-2021-3778.patch | 34 +++++++++++++
.../vim/files/CVE-2021-3796.patch | 50 +++++++++++++++++++
meta/recipes-support/vim/vim.inc | 2 +
3 files changed, 86 insertions(+)
create mode 100644 meta/recipes-support/vim/files/CVE-2021-3778.patch
create mode 100644 meta/recipes-support/vim/files/CVE-2021-3796.patch
diff --git a/meta/recipes-support/vim/files/CVE-2021-3778.patch b/meta/recipes-support/vim/files/CVE-2021-3778.patch
new file mode 100644
index 0000000000..04ac413e56
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2021-3778.patch
@@ -0,0 +1,34 @@
+From 9ba62f1042513fcadcc4e8fdcee171db66ef1d69 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <Bram@vim.org>
+Date: Fri, 24 Sep 2021 15:15:24 +0800
+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: Backport [https://github.com/vim/vim/commit/65b605665997fad54ef39a93199e305af2fe4d7f]
+CVE: CVE-2021-3778
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/regexp_nfa.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
+index fb512f961..2806408de 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
+--
+2.17.1
+
diff --git a/meta/recipes-support/vim/files/CVE-2021-3796.patch b/meta/recipes-support/vim/files/CVE-2021-3796.patch
new file mode 100644
index 0000000000..31475af04c
--- /dev/null
+++ b/meta/recipes-support/vim/files/CVE-2021-3796.patch
@@ -0,0 +1,50 @@
+From 6d02e1429771c00046b48f26e53ca4123c3ce4e1 Mon Sep 17 00:00:00 2001
+From: Bram Moolenaar <Bram@vim.org>
+Date: Fri, 24 Sep 2021 16:01:09 +0800
+Subject: [PATCH] patch 8.2.3428: using freed memory when replacing
+
+Problem: Using freed memory when replacing. (Dhiraj Mishra)
+Solution: Get the line pointer after calling ins_copychar().
+
+Upstream-Status: Backport [https://github.com/vim/vim/commit/35a9a00afcb20897d462a766793ff45534810dc3]
+CVE: CVE-2021-3796
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/normal.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/normal.c b/src/normal.c
+index c4963e621..305b514bc 100644
+--- a/src/normal.c
++++ b/src/normal.c
+@@ -5009,19 +5009,23 @@ nv_replace(cmdarg_T *cap)
+ {
+ /*
+ * Get ptr again, because u_save and/or showmatch() will have
+- * released the line. At the same time we let know that the
+- * line will be changed.
++ * released the line. This may also happen in ins_copychar().
++ * At the same time we let know that the line will be changed.
+ */
+- ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+ if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
+ {
+ int c = ins_copychar(curwin->w_cursor.lnum
+ + (cap->nchar == Ctrl_Y ? -1 : 1));
++
++ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+ if (c != NUL)
+ ptr[curwin->w_cursor.col] = c;
+ }
+ else
++ {
++ ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
+ ptr[curwin->w_cursor.col] = cap->nchar;
++ }
+ if (p_sm && msg_silent == 0)
+ showmatch(cap->nchar);
+ ++curwin->w_cursor.col;
+--
+2.17.1
+
diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc
index 6fe8fb90db..e45f9b828d 100644
--- a/meta/recipes-support/vim/vim.inc
+++ b/meta/recipes-support/vim/vim.inc
@@ -17,6 +17,8 @@ SRC_URI = "git://github.com/vim/vim.git \
file://0001-src-Makefile-improve-reproducibility.patch \
file://no-path-adjust.patch \
file://racefix.patch \
+ file://CVE-2021-3778.patch \
+ file://CVE-2021-3796.patch \
"
SRCREV = "98056533b96b6b5d8849641de93185dd7bcadc44"
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 02/10] connman: add CVE_PRODUCT
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
2021-09-29 14:58 ` [hardknott][PATCH 01/10] vim: fix CVEs Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 03/10] expat: pull from github releases Anuj Mittal
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Steve Sakoman <steve@sakoman.com>
Upstream database uses both "connman" and "connection_manager" to report CVEs
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit eadf7bb17289731be9747822e3d4084ab69cf109)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/recipes-connectivity/connman/connman.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 776bbfbff2..bd1dfd5b01 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -15,6 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
inherit autotools pkgconfig systemd update-rc.d update-alternatives
+CVE_PRODUCT = "connman connection_manager"
+
DEPENDS = "dbus glib-2.0 ppp"
EXTRA_OECONF += "\
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 03/10] expat: pull from github releases
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
2021-09-29 14:58 ` [hardknott][PATCH 01/10] vim: fix CVEs Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 02/10] connman: add CVE_PRODUCT Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 04/10] pybootchart: Avoid divide by zero Anuj Mittal
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Konrad Weihmann <kweihmann@outlook.com>
sometimes we can find release tarballs from sourceforge are not fully
distributed along all download mirrors leading to fetching failures,
depending on what download mirror will be chosen by sourceforge
servers.
As the project moved to github anyway, it's better to pull the tarballs
directly from github releases - serving the very same static artifacts.
Add an override UPSTREAM_CHECK_URI to enable devtool upgrade checks
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
(backported from commit 2a1743ace5aa41b188f77853d0f00c9e5a359c6d)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/recipes-core/expat/expat_2.2.10.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/expat/expat_2.2.10.bb b/meta/recipes-core/expat/expat_2.2.10.bb
index a54d832e52..08e8ff1cea 100644
--- a/meta/recipes-core/expat/expat_2.2.10.bb
+++ b/meta/recipes-core/expat/expat_2.2.10.bb
@@ -6,12 +6,16 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9"
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
+VERSION_TAG = "${@d.getVar('PV').replace('.', '_')}"
+
+SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \
file://libtool-tag.patch \
file://run-ptest \
file://0001-Add-output-of-tests-result.patch \
"
+UPSTREAM_CHECK_URI = "https://github.com/libexpat/libexpat/releases/"
+
SRC_URI[sha256sum] = "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5"
EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF"
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 04/10] pybootchart: Avoid divide by zero
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (2 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 03/10] expat: pull from github releases Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 05/10] bzip2: Update soname for libbz2 1.0.8 Anuj Mittal
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Avoid a rare divide by zero error if there isn't data point spread.
[YOCTO #14547]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d7e36d01e87ddf89f76f164a0b7d98f597a53fa5)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
scripts/pybootchartgui/pybootchartgui/draw.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 29eb7505bc..fc708b55c3 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -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.
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 05/10] bzip2: Update soname for libbz2 1.0.8
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (3 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 04/10] pybootchart: Avoid divide by zero Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 06/10] libsamplerate0: Set correct soname for 0.1.9 Anuj Mittal
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Tom Pollard <tom.pollard@codethink.co.uk>
Set shared library name as libbz2.so.1.0.8, version in configure.ac
already synced via do_configure PV substitution.
Signed-off-by: Tom Pollard <tom.pollard@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 07e3abc9d282a54add69a6905ec4248f3104219f)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/recipes-extended/bzip2/bzip2/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/bzip2/bzip2/Makefile.am b/meta/recipes-extended/bzip2/bzip2/Makefile.am
index 7338df03eb..d12d3a45e4 100644
--- a/meta/recipes-extended/bzip2/bzip2/Makefile.am
+++ b/meta/recipes-extended/bzip2/bzip2/Makefile.am
@@ -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 \
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 06/10] libsamplerate0: Set correct soname for 0.1.9
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (4 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 05/10] bzip2: Update soname for libbz2 1.0.8 Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 07/10] oeqa/qemurunner: Use oe._exit(), not sys.exit() Anuj Mittal
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Tom Pollard <tom.pollard@codethink.co.uk>
Manually patch SHARED_VERSION_INFO, which was missed in
the 0.1.9 release and later incorrectly fixed until 0.2.1
Signed-off-by: Tom Pollard <tom.pollard@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cb2e8efd316d44b9b1453882114856e0eb7b3500)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../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
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch b/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
new file mode 100644
index 0000000000..b42d564b4b
--- /dev/null
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0/shared_version_info.patch
@@ -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"
+
+
+
diff --git a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb
index 6dfc42b436..8345d6880f 100644
--- a/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb
+++ b/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.9.bb
@@ -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"
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 07/10] oeqa/qemurunner: Use oe._exit(), not sys.exit()
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (5 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 06/10] libsamplerate0: Set correct soname for 0.1.9 Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 08/10] oeqa/selftest/gotoolchain: Fix temp file cleanup Anuj Mittal
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Richard Purdie <richard.purdie@linuxfoundation.org>
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ec08498ff29de9ccd23be88b9d7af3dab6bbb81e)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/lib/oeqa/utils/qemurunner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index a0f17d557b..d6d47cfabb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -235,7 +235,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)" %
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 08/10] oeqa/selftest/gotoolchain: Fix temp file cleanup
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (6 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 07/10] oeqa/qemurunner: Use oe._exit(), not sys.exit() Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 09/10] oeqa/buildproject: Ensure temp directories are cleaned up Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 10/10] bash: Ensure deterministic build Anuj Mittal
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Richard Purdie <richard.purdie@linuxfoundation.org>
The go tests leave readonly files and directories behind.
Fix this to allow cleanup.
[YOCTO #14575]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5680e95d7bd9fe00a797b2d0deb8cb4790027508)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py
index 4fc3605f42..c809d7c9b1 100644
--- a/meta/lib/oeqa/selftest/cases/gotoolchain.py
+++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -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()
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 09/10] oeqa/buildproject: Ensure temp directories are cleaned up
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (7 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 08/10] oeqa/selftest/gotoolchain: Fix temp file cleanup Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 10/10] bash: Ensure deterministic build Anuj Mittal
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d10aff865120a5feecc42c24726bd119364e0188)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/lib/oeqa/utils/buildproject.py | 3 +++
meta/lib/oeqa/utils/targetbuild.py | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index e6d80cc8dc..dfb9661868 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -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)
diff --git a/meta/lib/oeqa/utils/targetbuild.py b/meta/lib/oeqa/utils/targetbuild.py
index 1055810ca3..09738add1d 100644
--- a/meta/lib/oeqa/utils/targetbuild.py
+++ b/meta/lib/oeqa/utils/targetbuild.py
@@ -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):
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [hardknott][PATCH 10/10] bash: Ensure deterministic build
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
` (8 preceding siblings ...)
2021-09-29 14:59 ` [hardknott][PATCH 09/10] oeqa/buildproject: Ensure temp directories are cleaned up Anuj Mittal
@ 2021-09-29 14:59 ` Anuj Mittal
9 siblings, 0 replies; 11+ messages in thread
From: Anuj Mittal @ 2021-09-29 14:59 UTC (permalink / raw)
To: openembedded-core
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Bash keeps a count of the number of times make was invoked on a directory
and changes the output versioning accordingly. We want deterministic output
so disable this behaviour.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 13a039e03195a47c750d5901e96fe81cf523481f)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/recipes-extended/bash/bash.inc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index d3e1dfdb30..37871bcdca 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -62,6 +62,11 @@ do_compile_ptest () {
oe_runmake buildtest
}
+do_install_prepend () {
+ # Ensure determinism as this counter increases for each make call
+ rm -f ${B}/.build
+}
+
do_install_append () {
# Move /usr/bin/bash to /bin/bash, if need
if [ "${base_bindir}" != "${bindir}" ]; then
--
2.31.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-09-29 14:59 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 14:58 [hardknott][PATCH 00/10] Review request Anuj Mittal
2021-09-29 14:58 ` [hardknott][PATCH 01/10] vim: fix CVEs Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 02/10] connman: add CVE_PRODUCT Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 03/10] expat: pull from github releases Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 04/10] pybootchart: Avoid divide by zero Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 05/10] bzip2: Update soname for libbz2 1.0.8 Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 06/10] libsamplerate0: Set correct soname for 0.1.9 Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 07/10] oeqa/qemurunner: Use oe._exit(), not sys.exit() Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 08/10] oeqa/selftest/gotoolchain: Fix temp file cleanup Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 09/10] oeqa/buildproject: Ensure temp directories are cleaned up Anuj Mittal
2021-09-29 14:59 ` [hardknott][PATCH 10/10] bash: Ensure deterministic build Anuj Mittal
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.