Skip to contentSkip to conversation

Patch review

PATCH New Steve Sakoman 1 participant 8 messages Aug 4, 2022

lore
Share & tools
lore
#0 lore raw

cover Patch review

Please review this set of patches for kirkstone and have comments back by end of day Sunday.

This should be the almost final set of patches for the 4.0.3 release - there remains an intermittent linux-yocto reproducibility issue that needs to get fixed.

Passed a-full on autobuilder:

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

The following changes since commit 3564ce3d9b2030dd420362c66147bd327090915c:

initscripts: run umountnfs as a KILL script (2022-07-28 05:32:25 -1000)

are available in the Git repository at:

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

Alex Kiernan (1):
openssh: Add openssh-sftp-server to openssh RDEPENDS

Dmitry Baryshkov (1):
linux-firwmare: restore WHENCE_CHKSUM variable

Khem Raj (1):
libgcc: Fix standalone target builds with usrmerge distro feature

Martin Jansa (1):
kernel.bbclass: pass LD also in savedefconfig

Mingli Yu (1):
strace: set COMPATIBLE_HOST for riscv32

Shruthi Ravichandran (1):
package_manager/ipk: do not pipe stderr to stdout

Sundeep KOKKONDA (1):
binutils: stable 2.38 branch updates

 meta/classes/kernel.bbclass                   |  2 +-
 meta/lib/oe/package_manager/ipk/__init__.py   | 23 +++++++++++--------
 .../openssh/openssh_8.9p1.bb                  |  2 +-
 .../binutils/binutils-2.38.inc                |  2 +-
 meta/recipes-devtools/gcc/libgcc-common.inc   |  8 +++++--
 meta/recipes-devtools/strace/strace_5.16.bb   |  3 +++
 .../linux-firmware/linux-firmware_20220708.bb |  5 +++-
 7 files changed, 29 insertions(+), 16 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/7 binutils: stable 2.38 branch updates

From: Sundeep KOKKONDA <[email protected]>

Below commits on Binutils-2.38 development branch are updated. 5c0b4ee4060 i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC 19892fedb7b x86: Properly check invalid relocation against protected symbol b8a2baa80b1 libctf: tests: prune warnings from compiler output 7f9a495a167 libctf: fix linking together multiple objects derived from the same source 97dd8079feb PowerPC64: fix assertion in ppc_build_one_stub with -Os code

---
 meta/recipes-devtools/binutils/binutils-2.38.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils-2.38.inc +1 -1
index 742ca86379..eed252976a 100644
@@ -18,7 +18,7 @@ SRCBRANCH ?= "binutils-2_38-branch"
 
 UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
 
-SRCREV ?= "eed56ee299b9ef8754bb4e53f2e9cf2a7c28c04d"
+SRCREV ?= "5c0b4ee406035917d0e50aa138194fab57ae6bf8"
 BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
 SRC_URI = "\
      ${BINUTILS_GIT_URI} \
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/7 package_manager/ipk: do not pipe stderr to stdout

In reply to Steve Sakoman

From: Shruthi Ravichandran <[email protected]>

Some opkg commands print an error during cleanup when the tmp_dir does not exist and an attempt is made to delete it. The error messages are harmless and the opkg commands eventually succeed.
When these commands are run and stderr is piped to stdout, the error messages may clobber the stdout and cause unexpected results while parsing the output of the command. Therefore, when parsing the output of a command, do not pipe stderr to stdout. Instead, capture stderr and stdout separately, and upon success, send stderr to bb.note().

(cherry picked from commit f2167ae80258253eb47a5b148546b265320284cc)
---
 meta/lib/oe/package_manager/ipk/__init__.py | 23 ++++++++++++---------
 1 file changed, 13 insertions(+), 10 deletions(-)
meta/lib/oe/package_manager/ipk/__init__.py +13 -10
index 4cd3963111..9f60f3abcc 100644
@@ -102,12 +102,14 @@ class OpkgDpkgPM(PackageManager):
         This method extracts the common parts for Opkg and Dpkg
         """
 
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
-        except subprocess.CalledProcessError as e:
+        proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True)
+        if proc.returncode:
             bb.fatal("Unable to list available packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
-        return opkg_query(output)
+                     "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr))
+        elif proc.stderr:
+            bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr))
+
+        return opkg_query(proc.stdout)
 
     def extract(self, pkg, pkg_info):
         """
@@ -443,15 +445,16 @@ class OpkgPM(OpkgDpkgPM):
         cmd = "%s %s --noaction install %s " % (self.opkg_cmd,
                                                 opkg_args,
                                                 ' '.join(pkgs))
-        try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
-        except subprocess.CalledProcessError as e:
+        proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True)
+        if proc.returncode:
             bb.fatal("Unable to dummy install packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr))
+        elif proc.stderr:
+            bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr))
 
         bb.utils.remove(temp_rootfs, True)
 
-        return output
+        return proc.stdout
 
     def backup_packaging_data(self):
         # Save the opkglib for increment ipk image generation
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/7 libgcc: Fix standalone target builds with usrmerge distro feature

In reply to Steve Sakoman

From: Khem Raj <[email protected]>

Ignore the rmdir cmd if using usrmerge distro feature since the intention is to delete /lib or /lib64 but not libdir under /usr and base_libdir = libdir when usrmerge is enabled in distro

(cherry picked from commit 3b7f6b0e0f1f16f89cd924aac001b4f661c145ca)
---
 meta/recipes-devtools/gcc/libgcc-common.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/libgcc-common.inc +6 -2
index d48dc8b823..31f629acaa 100644
@@ -45,10 +45,14 @@ do_install () {
 }
 
 do_install:append:libc-baremetal () {
-	rmdir ${D}${base_libdir}
+	if [ "${base_libdir}" != "${libdir}" ]; then
+		rmdir ${D}${base_libdir}
+	fi
 }
 do_install:append:libc-newlib () {
-	rmdir ${D}${base_libdir}
+	if [ "${base_libdir}" != "${libdir}" ]; then
+		rmdir ${D}${base_libdir}
+	fi
 }
 
 # No rpm package is actually created but -dev depends on it, avoid dnf error
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/7 linux-firwmare: restore WHENCE_CHKSUM variable

In reply to Steve Sakoman

From: Dmitry Baryshkov <[email protected]>

Restore WHENCE_CHKSUM variable which is used to hold the WHENCE file checksum. It is necessary to allow easily overriding it from local.conf if the devupstream version is selected:

PREFERRED_VERSION_linux-firmware = "1:20220708+git%" SRCREV:class-devupstream = "${AUTOREV}" WHENCE_CHKSUM:class-devupstream:pn-linux-firmware = "abf1077491eeb261ecdcb680a34fc059"

Without the WHENCE_CHECKSUM one would need to manually patch the LIC_FILES_CHKSUM variable to change the checksum of WHENC (e.g. using the anonymous python function or remove expression).

(cherry picked from commit 554be2af1e0a03a2d23032d48afbbe0913a45409)
---
 .../recipes-kernel/linux-firmware/linux-firmware_20220708.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-kernel/linux-firmware/linux-firmware_20220708.bb +4 -1
index bde7178164..91c32e49d6 100644
@@ -128,8 +128,11 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
                     file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
                     file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
-                    file://WHENCE;md5=def08711eb23ba967fb7e1f8cff66178 \
+                    file://WHENCE;md5=${WHENCE_CHKSUM} \
                     "
+# WHENCE checksum is defined separately to ease overriding it if
+# class-devupstream is selected.
+WHENCE_CHKSUM  = "def08711eb23ba967fb7e1f8cff66178"
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
 # so that the license files will be copied from fetched source
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/7 kernel.bbclass: pass LD also in savedefconfig

In reply to Steve Sakoman

From: Martin Jansa <[email protected]>

* similar to:
https://git.openembedded.org/openembedded-core/commit/?id=66c1f4b0abd3483759f9e4141a80f982eaf8ccfd
https://git.openembedded.org/openembedded-core/commit/?id=36fe2efc91fec5a52374a2dc4814a69076a2d28e
but for savedefconfig task
* otherwise with ld-is-gold it will fail with:
gold linker is not supported as it is not capable of linking the kernel proper.

(cherry picked from commit f0c9e1bf35289afa63f040bbc13ca1755e4db0f9)
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index 8299b394a7..c29bd3d5f3 100644
@@ -629,7 +629,7 @@ kernel_do_configure() {
 
 do_savedefconfig() {
 	bbplain "Saving defconfig to:\n${B}/defconfig"
-	oe_runmake -C ${B} savedefconfig
+	oe_runmake -C ${B} LD='${KERNEL_LD}' savedefconfig
 }
 do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/7 strace: set COMPATIBLE_HOST for riscv32

In reply to Steve Sakoman

From: Mingli Yu <[email protected]>

Disable the build on riscv32 as it's not supported on riscv32 [1].

[1] https://github.com/strace/strace/commit/69ff62ea5087506ad36a27599db088096db215da

(cherry picked from commit 5276a9a845d0277936e9321ada296818f7bfd84b)
---
 meta/recipes-devtools/strace/strace_5.16.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/strace/strace_5.16.bb +3 -0
index ae19318c20..23ffa25d29 100644
@@ -19,6 +19,9 @@ SRC_URI[sha256sum] = "dc7db230ff3e57c249830ba94acab2b862da1fcaac55417e9b85041a83
 
 inherit autotools ptest
 
+# Not yet ported to rv32
+COMPATIBLE_HOST:riscv32 = "null"
+
 PACKAGECONFIG:class-target ??= "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
 "
Signature · 1 line
2.25.1
#7 lore raw

PATCH 7/7 openssh: Add openssh-sftp-server to openssh RDEPENDS

In reply to Steve Sakoman

From: Alex Kiernan <[email protected]>

OpenSSH 9.0 uses sftp by default as the transport for scp, add in sftp-server so that this works as expected for users, rather than being left with a confusing "scp: Connection closed" message.

(cherry picked from commit be61b9dac78f0d85c870a0d8304fb4b536ec4bc8)
---
 meta/recipes-connectivity/openssh/openssh_8.9p1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssh/openssh_8.9p1.bb +1 -1
index a3a0016ce5..e4446280d9 100644
@@ -160,7 +160,7 @@ FILES:${PN}-sftp-server = "${libexecdir}/sftp-server"
 FILES:${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
 FILES:${PN}-keygen = "${bindir}/ssh-keygen"
 
-RDEPENDS:${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS:${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen ${PN}-sftp-server"
 RDEPENDS:${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
 RRECOMMENDS:${PN}-sshd:append:class-target = "\
     ${@bb.utils.filter('PACKAGECONFIG', 'rng-tools', d)} \
Signature · 1 line
2.25.1