Skip to contentSkip to conversation

patch review request

PATCH New Anuj Mittal 1 participant 20 messages Dec 14, 2020

lore
Share & tools
lore
#0 lore raw

cover patch review request

Please review these next set of changes for gatesgarth. Builds cleanly on autobuilder:

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

Thanks,

Anuj

The following changes since commit d11ab9cb77bf91f939035417b757773a5d80242c:

build-appliance-image: Update to gatesgarth head revision (2020-12-07 16:25:27 +0000)

are available in the Git repository at:

git://push.openembedded.org/openembedded-core-contrib anujm/gatesgarth

Alexander Kanavin (3):
meta/lib/oe/reproducible.py: gitsm:// works just as fine as git:// for
timestamps
llvm: fix reproducibility
webkitgtk: fix reproducibility

Chandana kalluri (1):
populate_sdk_ext: use SDK_CUSTOM_TEPLATECONF variable to enable custom
templateconf.cfg

Changqing Li (1):
buildtools-tarball: add wic dependency into extended buildtools

Gratian Crisan (1):
kernel-module-split.bbclass: fix kernel modules getting marked as
CONFFILES

Kai Kang (1):
sudo: fix multilib conflict

Li Wang (2):
qemu: CVE-2020-29129 CVE-2020-29130
qemu: CVE-2020-25624

Mark Jonas (1):
libsdl2: Add directfb to PACKAGECONFIG rdepends

Richard Purdie (2):
lz4: Use the new branch naming from upstream
uninative: Don't use single sstate for pseudo-native

Ross Burton (5):
cve-update-db-native: handle all-wildcard versions oeqa/devtool: use Yocto mirror for pv-1.5.3 tarball
image_types: sort tarball file listings
image_types: remove obsolete tar comment
coreutils: add SUSE-specific issues to CVE whitelist

sangeeta jain (1):
meta/lib/oeqa/manual/oe-core.json: Update test_bitbake_devshell

zangrc (1):
wireless-regdb: upgrade 2020.04.29 -> 2020.11.20

 meta/classes/base.bbclass                     |   1 +
 meta/classes/image_types.bbclass              |  12 +--
 meta/classes/kernel-module-split.bbclass      |   5 +-
 meta/classes/populate_sdk_ext.bbclass         |   6 +-
 meta/classes/sstate.bbclass                   |   4 +
 meta/lib/oe/reproducible.py                   |   2 +-
 meta/lib/oe/sstatesig.py                      |   2 +-
 meta/lib/oeqa/manual/oe-core.json             |   2 +-
 meta/lib/oeqa/selftest/cases/devtool.py       |   2 +-
 meta/recipes-core/coreutils/coreutils_8.32.bb |   3 +
 .../meta/buildtools-extended-tarball.bb       |   3 +
 .../recipes-core/meta/cve-update-db-native.bb |   7 +-
 meta/recipes-devtools/llvm/llvm_git.bb        |   5 +
 meta/recipes-devtools/qemu/qemu.inc           |   2 +
 .../qemu/qemu/CVE-2020-25624.patch            | 101 ++++++++++++++++++
 .../qemu/CVE-2020-29129-CVE-2020-29130.patch  |  64 +++++++++++
 ...o.conf.in-fix-conflict-with-multilib.patch |  52 +++++++++
 meta/recipes-extended/sudo/sudo_1.9.3.bb      |   6 +-
 .../libsdl2/libsdl2_2.0.12.bb                 |   2 +-
 ....04.29.bb => wireless-regdb_2020.11.20.bb} |   2 +-
 meta/recipes-sato/webkit/webkitgtk_2.28.4.bb  |  12 +++
 meta/recipes-support/lz4/lz4_1.9.2.bb         |   2 +-
 22 files changed, 274 insertions(+), 23 deletions(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25624.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-29129-CVE-2020-29130.patch
 create mode 100644 meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
 rename meta/recipes-kernel/wireless-regdb/{wireless-regdb_2020.04.29.bb => wireless-regdb_2020.11.20.bb} (94%)
Signature · 1 line
2.29.2
#1 lore raw

PATCH 1/19 libsdl2: Add directfb to PACKAGECONFIG rdepends

From: Mark Jonas <[email protected]>

PACKAGECONFIG[directfb] already adds directfb to the build dependencies. But the automatically generated runtime dependencies do not add the directfb package to the runtime dependencies. Most likely this happens because libsdl2 does not link against directfb but uses dlopen() or similar. Thus, the runtime dependency to directfb needs to be declared explicitly.

(cherry picked from commit 62d3cbe7c8261c1c875ff6da11572409262aaf02)
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb +1 -1
index 0b75eb0c1d..1513746492 100644
@@ -57,7 +57,7 @@ PACKAGECONFIG ??= " \
 "
 PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
 PACKAGECONFIG[arm-neon]   = "--enable-arm-neon,--disable-arm-neon"
-PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb"
+PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb,directfb"
 PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
 PACKAGECONFIG[jack]       = "--enable-jack,--disable-jack,jack"
 PACKAGECONFIG[kmsdrm]     = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
Signature · 1 line
2.29.2
#2 lore raw

PATCH 2/19 cve-update-db-native: handle all-wildcard versions

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

If a CPE version field is just *:*:*:* it should be handled the same as -:*:*:*, that is 'all versions'. To ease handling, transform this case to use -.

(cherry picked from commit 04a9bc4ca5294fe6834513669c7746a824d12b04)
---
 meta/recipes-core/meta/cve-update-db-native.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-core/meta/cve-update-db-native.bb +6 -1
index cf2b251e21..cf62e1e32c 100644
@@ -172,7 +172,12 @@ def parse_node_and_insert(c, node, cveId):
                     op_end = '<'
                     v_end = cpe['versionEndExcluding']
 
-                yield [cveId, vendor, product, v_start, op_start, v_end, op_end]
+                if op_start or op_end or v_start or v_end:
+                    yield [cveId, vendor, product, v_start, op_start, v_end, op_end]
+                else:
+                    # This is no version information, expressed differently.
+                    # Save processing by representing as -.
+                    yield [cveId, vendor, product, '-', '', '', '']
 
     c.executemany("insert into PRODUCTS values (?, ?, ?, ?, ?, ?, ?)", cpe_generator())
 
Signature · 1 line
2.29.2
#3 lore raw

PATCH 3/19 sudo: fix multilib conflict

In reply to Anuj Mittal

From: Kai Kang <[email protected]>

It fails to install sudo and lib32-sudo at same time:

| Error: Transaction test error:
| file /usr/libexec/sudo/audit_json.so conflicts between attempted

     installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64
|  file /usr/libexec/sudo/group_file.so conflicts between attempted
     installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64

Pass ${libdir} to configure option --libexecdir of sudo that it installs plugin libraries to /usr/lib{,64} rather than /usr/libexec/. Then add a patch to fix multilib conflict of sudo.conf.

[RP: Add missing Upstream-Status]
(cherry picked from commit c9b6974cfcac370c6848d28400e0546ac85512e9)
---
 ...o.conf.in-fix-conflict-with-multilib.patch | 52 +++++++++++++++++++
 meta/recipes-extended/sudo/sudo_1.9.3.bb      |  6 ++-
 2 files changed, 56 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch new file +52 -0
new file mode 100644
index 0000000000..f7ccfdd623
@@ -0,0 +1,52 @@
+sudo.conf.in: fix conflict with multilib
+
+When pass ${libdir} to --libexecdir of sudo, it fails to install sudo
+and lib32-sudo at same time:
+
+| Error: Transaction test error:
+|  file /etc/sudo.conf conflicts between attempted installs of
+     sudo-1.9.3p1-r0.core2_64 and lib32-sudo-1.9.3p1-r0.core2_32
+
+Update the comments in sudo.conf.in to avoid the conflict.
+
+Signed-off-by: Kai Kang <[email protected]>
+
+Upstream-Status: Inappropriate [OE configuration specific]
+---
+ examples/sudo.conf.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in
+index 19e33ff..af78235 100644
+--- a/examples/sudo.conf.in
++++ b/examples/sudo.conf.in
+@@ -4,7 +4,7 @@
+ # Sudo plugins:
+ #   Plugin plugin_name plugin_path plugin_options ...
+ #
+-# The plugin_path is relative to @plugindir@ unless
++# The plugin_path is relative to $plugindir such as /usr/lib/sudo unless
+ #   fully qualified.
+ # The plugin_name corresponds to a global symbol in the plugin
+ #   that contains the plugin interface structure.
+@@ -50,7 +50,7 @@ Plugin sudoers_audit sudoers.so
+ # The compiled-in value is usually sufficient and should only be changed
+ # if you rename or move the sudo_noexec.so file.
+ #
+-#Path noexec @plugindir@/sudo_noexec.so
++#Path noexec $plugindir/sudo_noexec.so
+ 
+ #
+ # Sudo plugin directory:
+@@ -59,7 +59,7 @@ Plugin sudoers_audit sudoers.so
+ # The default directory to use when searching for plugins that are
+ # specified without a fully qualified path name.
+ #
+-#Path plugin_dir @plugindir@
++#Path plugin_dir $plugindir
+ 
+ #
+ # Sudo developer mode:
+--
+2.17.1
+
meta/recipes-extended/sudo/sudo_1.9.3.bb +4 -2
index 270625ebe8..0d0be9ab8b 100644
@@ -2,6 +2,7 @@ require sudo.inc
 
 SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
            ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+           file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \
            "
 
 PAM_SRC_URI = "file://sudo.pam"
@@ -24,6 +25,7 @@ EXTRA_OECONF += " \
              ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
              --with-rundir=/run/sudo \
              --with-vardir=/var/lib/sudo \
+             --libexecdir=${libdir} \
              "
 
 do_install_append () {
@@ -43,5 +45,5 @@ do_install_append () {
 }
 
 FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
-                    ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
+                    ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
Signature · 1 line
2.29.2
#4 lore raw

PATCH 4/19 buildtools-tarball: add wic dependency into extended buildtools

In reply to Anuj Mittal

From: Changqing Li <[email protected]>

fix below error:
wic ls ./core-image-minimal-intel-x86-64.wic

ERROR: Can't find executable parted

wic depend on some tools like parted/mtools/..., and we have those tools in native_sysroot. so above problem can be avoided by run command like wic ls imagename.wic --native-sysroot <path>

but this cannot cover condition that usr don't have build the image, the image just copy from somewhere.

(cherry picked from commit c0eda6ec09395f3a04cb80107a3ca33a063b21f8)
---
 meta/recipes-core/meta/buildtools-extended-tarball.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/meta/buildtools-extended-tarball.bb +3 -0
index c32d0107c3..0816486754 100644
@@ -29,6 +29,9 @@ TOOLCHAIN_HOST_TASK += "\
     nativesdk-pkgconfig \
     nativesdk-glibc-utils \
     nativesdk-libxcrypt-dev \
+    nativesdk-parted \
+    nativesdk-dosfstools \
+    nativesdk-gptfdisk \
     "
 
 TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-extended-nativesdk-standalone-${DISTRO_VERSION}"
Signature · 1 line
2.29.2
#5 lore raw

PATCH 5/19 lz4: Use the new branch naming from upstream

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

Upstream renamed master -> dev, update SRC_URI to match.

[YOCTO #14135]

(cherry picked from commit 3369aa0322693604533ef7d30dca234e52605fe2)
---
 meta/recipes-support/lz4/lz4_1.9.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/lz4/lz4_1.9.2.bb +1 -1
index 6510156ed0..455d2a5141 100644
@@ -11,7 +11,7 @@ PE = "1"
 
 SRCREV = "fdf2ef5809ca875c454510610764d9125ef2ebbd"
 
-SRC_URI = "git://github.com/lz4/lz4.git \
+SRC_URI = "git://github.com/lz4/lz4.git;branch=dev \
            file://run-ptest \
            "
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
Signature · 1 line
2.29.2
#6 lore raw

PATCH 6/19 oeqa/devtool: use Yocto mirror for pv-1.5.3 tarball

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

Some of the selftests failed over the weekend with "access denied" errors fetching this tarball. Instead of relying on upstream when fetching the tarball, use the Yocto source mirrors instead.

(cherry picked from commit 988e0ff4131f46dfed14516ff5f61d72b9fb6941)
---
 meta/lib/oeqa/selftest/cases/devtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/devtool.py +1 -1
index d3d2e04c20..b8edc89768 100644
@@ -269,7 +269,7 @@ class DevtoolAddTests(DevtoolBase):
         self.track_for_cleanup(tempdir)
         pn = 'pv'
         pv = '1.5.3'
-        url = 'http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2'
+        url = 'http://downloads.yoctoproject.org/mirror/sources/pv-1.5.3.tar.bz2'
         result = runCmd('wget %s' % url, cwd=tempdir)
         result = runCmd('tar xfv %s' % os.path.basename(url), cwd=tempdir)
         srcdir = os.path.join(tempdir, '%s-%s' % (pn, pv))
Signature · 1 line
2.29.2
#7 lore raw

PATCH 7/19 qemu: CVE-2020-29129 CVE-2020-29130

In reply to Anuj Mittal

From: Li Wang <[email protected]>

References:
https://nvd.nist.gov/vuln/detail/CVE-2020-29129
https://nvd.nist.gov/vuln/detail/CVE-2020-29130

backport patch from:
https://git.qemu.org/?p=libslirp.git;a=commit;h=2e1dcbc0c2af64fcb17009eaf2ceedd81be2b27f

(cherry picked from commit e5eda809a41732dfa4988799360be3d1280c1209)
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 .../qemu/CVE-2020-29129-CVE-2020-29130.patch  | 64 +++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-29129-CVE-2020-29130.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index 11be545cb5..bbe2a39755 100644
@@ -33,6 +33,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://usb-fix-setup_len-init.patch \
            file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \
            file://CVE-2020-24352.patch \
+           file://CVE-2020-29129-CVE-2020-29130.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2020-29129-CVE-2020-29130.patch new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.29.2
#8 lore raw

PATCH 8/19 image_types: sort tarball file listings

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

Help rootfs tarballs be reproducible by sorting the file listing.

(cherry picked from commit 4fa68626bbcfd9795577e1426c27d00f4d9d1c17)
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image_types.bbclass +1 -1
index 66884af8e0..9a508a911f 100644
@@ -120,7 +120,7 @@ IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAM
 # required when extracting, but it seems prudent to use it in both cases.
 IMAGE_CMD_TAR ?= "tar"
 # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
 
 do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
 IMAGE_CMD_cpio () {
Signature · 1 line
2.29.2
#9 lore raw

PATCH 9/19 image_types: remove obsolete tar comment

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

We now depend on tar 1.28, so talking about older tar versions is just confusing.

(cherry picked from commit f19e43dec63a86c200e04ba14393583588550380)
---
 meta/classes/image_types.bbclass | 10 ----------
 1 file changed, 10 deletions(-)
meta/classes/image_types.bbclass +0 -10
index 9a508a911f..286009057e 100644
@@ -108,16 +108,6 @@ IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME
 IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
 IMAGE_CMD_squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4"
 
-# By default, tar from the host is used, which can be quite old. If
-# you need special parameters (like --xattrs) which are only supported
-# by GNU tar upstream >= 1.27, then override that default:
-# IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*"
-# do_image_tar[depends] += "tar-replacement-native:do_populate_sysroot"
-# EXTRANATIVEPATH += "tar-native"
-#
-# The GNU documentation does not specify whether --xattrs-include is necessary.
-# In practice, it turned out to be not needed when creating archives and
-# required when extracting, but it seems prudent to use it in both cases.
 IMAGE_CMD_TAR ?= "tar"
 # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs
 IMAGE_CMD_tar = "${IMAGE_CMD_TAR} --sort=name --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ $? -eq 1 ]"
Signature · 1 line
2.29.2
#10 lore raw

PATCH 10/19 qemu: CVE-2020-25624

In reply to Anuj Mittal

From: Li Wang <[email protected]>

References:
https://nvd.nist.gov/vuln/detail/CVE-2020-25624

backport patch from:
https://git.qemu.org/?p=qemu.git;a=commit;h=1328fe0c32d5474604105b8105310e944976b058

(cherry picked from commit 88d05be28da522fb390ee24f2871a113adf4366e)
---
 meta/recipes-devtools/qemu/qemu.inc           |   1 +
 .../qemu/qemu/CVE-2020-25624.patch            | 101 ++++++++++++++++++
 2 files changed, 102 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-25624.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
index bbe2a39755..274c855d35 100644
@@ -34,6 +34,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://0001-target-mips-Increase-number-of-TLB-entries-on-the-34.patch \
            file://CVE-2020-24352.patch \
            file://CVE-2020-29129-CVE-2020-29130.patch \
+           file://CVE-2020-25624.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
meta/recipes-devtools/qemu/qemu/CVE-2020-25624.patch new file +101 -0

101 lines not on this page · raw message

Signature · 1 line
2.29.2
#11 lore raw

PATCH 11/19 meta/lib/oeqa/manual/oe-core.json: Update test_bitbake_devshell

In reply to Anuj Mittal

From: sangeeta jain <[email protected]>

Update command used for cross compilation to include ${CONFIGUREOPTS} to ensure right arguments are passed for cross compiling on any host.

(cherry picked from commit e995e67bc7a3d30adf9f8d0d2f4df92a941baeae)
---
 meta/lib/oeqa/manual/oe-core.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/manual/oe-core.json +1 -1
index fb47c5ec36..4ad524d89b 100644
@@ -80,7 +80,7 @@
           "expected_results": ""
         },
         "7": {
-          "action": "Run command:./configure && make ",
+          "action": "Run command:./configure ${CONFIGUREOPTS} && make ",
           "expected_results": "Verify that \"matchbox-desktop\" binary file was created successfully under \"src/\" directory "
         },
         "8": {
Signature · 1 line
2.29.2
#12 lore raw

PATCH 12/19 populate_sdk_ext: use SDK_CUSTOM_TEPLATECONF variable to enable custom templateconf.cfg

In reply to Anuj Mittal

From: Chandana kalluri <[email protected]>

The current implementation will always pick an existing templateconf.cfg if present else it will use the one from OE. A user might not always want to pick an existing tempalteconf.cfg even if its present. Introduce SDK_CUSTOM_TEMPLATECONF variable to provide an option for the user to specify if he wants to use an existing custom templateconf.cfg or not

If SDK_CUSTOM_TEMPLATECONF=='1' then enable custom templateconf.cfg. By default SDK_CUSTOM_TEMPLATECONF is set to '0'

(cherry picked from commit d0f863a24d05bddeb21e181fb01fa0051c79d7d8)
---
 meta/classes/populate_sdk_ext.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +5 -1
index 6f35b612c2..e6bf27cf38 100644
@@ -24,6 +24,7 @@ SDK_INCLUDE_NATIVESDK ?= "0"
 SDK_INCLUDE_BUILDTOOLS ?= '1'
 
 SDK_RECRDEP_TASKS ?= ""
+SDK_CUSTOM_TEMPLATECONF ?= "0"
 
 SDK_LOCAL_CONF_WHITELIST ?= ""
 SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
@@ -199,6 +200,9 @@ python copy_buildsystem () {
     buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d)
     baseoutpath = d.getVar('SDK_OUTPUT') + '/' + d.getVar('SDKPATH')
 
+    #check if custome templateconf path is set
+    use_custom_templateconf = d.getVar('SDK_CUSTOM_TEMPLATECONF')
+
     # Determine if we're building a derivative extensible SDK (from devtool build-sdk)
     derivative = (d.getVar('SDK_DERIVATIVE') or '') == '1'
     if derivative:
@@ -390,7 +394,7 @@ python copy_buildsystem () {
         shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat')
 
     # Use templateconf.cfg file from builddir if exists
-    if os.path.exists(builddir + '/conf/templateconf.cfg'):
+    if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1':
         shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg')
     else:
         # Write a templateconf.cfg
Signature · 1 line
2.29.2
#13 lore raw

PATCH 13/19 meta/lib/oe/reproducible.py: gitsm:// works just as fine as git:// for timestamps

In reply to Anuj Mittal

From: Alexander Kanavin <[email protected]>

This in particular addresses vulkan-samples reproducibility which made me scratch my head for a while.

(cherry picked from commit 4a2936126f12eeacecced051fa339c32c1f16576)
---
 meta/lib/oe/reproducible.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/reproducible.py +1 -1
index 421bb12f54..0fb02ccdb0 100644
@@ -47,7 +47,7 @@ def find_git_folder(d, sourcedir):
     return None
 
 def get_source_date_epoch_from_git(d, sourcedir):
-    if not "git://" in d.getVar('SRC_URI'):
+    if not "git://" in d.getVar('SRC_URI') and not "gitsm://" in d.getVar('SRC_URI'):
         return None
 
     gitpath = find_git_folder(d, sourcedir)
Signature · 1 line
2.29.2
#14 lore raw

PATCH 14/19 llvm: fix reproducibility

In reply to Anuj Mittal

From: Alexander Kanavin <[email protected]>

(cherry picked from commit a467c0a03d077861c37e317dcb2905b6388cb64c)
---
 meta/recipes-devtools/llvm/llvm_git.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-devtools/llvm/llvm_git.bb +5 -0
index 4c2d490315..b146d0e6e3 100644
@@ -99,6 +99,11 @@ do_configure_prepend() {
 	sed -ri "s#lib/${LLVM_DIR}#${baselib}/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp
 }
 
+# patch out build host paths for reproducibility
+do_compile_prepend_class-target() {
+        sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc
+}
+
 do_compile() {
 	ninja -v ${PARALLEL_MAKE}
 }
Signature · 1 line
2.29.2
#15 lore raw

PATCH 15/19 webkitgtk: fix reproducibility

In reply to Anuj Mittal

From: Alexander Kanavin <[email protected]>

(cherry picked from commit 1e7c673ab8d14766190843c6d8747510b37c71bf)
---
 meta/recipes-sato/webkit/webkitgtk_2.28.4.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)
meta/recipes-sato/webkit/webkitgtk_2.28.4.bb +12 -0
index 34b14f86ea..45b3ee2bce 100644
@@ -134,3 +134,15 @@ GI_DATA_ENABLED_libc-musl_armv7ve = "False"
 
 # Can't be built with ccache
 CCACHE_DISABLE = "1"
+
+PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess"
+src_package_preprocess () {
+        # Trim build paths from comments in generated sources to ensure reproducibility
+        sed -i -e "s,${WORKDIR},,g" \
+            ${B}/DerivedSources/webkit2gtk/webkit2/*.cpp \
+            ${B}/DerivedSources/ForwardingHeaders/JavaScriptCore/*.h \
+            ${B}/DerivedSources/JavaScriptCore/*.h \
+            ${B}/DerivedSources/JavaScriptCore/yarr/*.h \
+            ${B}/DerivedSources/MiniBrowser/*.c
+}
+
Signature · 1 line
2.29.2
#16 lore raw

PATCH 16/19 coreutils: add SUSE-specific issues to CVE whitelist

In reply to Anuj Mittal

From: Ross Burton <[email protected]>

CVE-2013-0221 through -223 are all SUSE-specific, so add them to the whitelist.

(cherry picked from commit 59f2120de3b6d53bbfb9db858ffb8b7b20c8d1ce)
---
 meta/recipes-core/coreutils/coreutils_8.32.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/coreutils/coreutils_8.32.bb +3 -0
index 9d1eceef54..4eb357e310 100644
@@ -199,3 +199,6 @@ do_install_ptest () {
 }
 
 FILES_${PN}-ptest += "${bindir}/getlimits"
+
+# These are specific to Opensuse
+CVE_WHITELIST += "CVE-2013-0221 CVE-2013-0222 CVE-2013-0223"
Signature · 1 line
2.29.2
#17 lore raw

PATCH 17/19 kernel-module-split.bbclass: fix kernel modules getting marked as CONFFILES

In reply to Anuj Mittal

From: Gratian Crisan <[email protected]>

Yi pointed out that commit 1a70a92d1f10 ("kernel-module-split.bbclass:
identify kernel modconf files as configuration files") is unintentionally adding the actual kernel /lib/modules .ko files to the CONFFILES variable.

The root cause is the re-use of the 'files' variable in that commit. Fix it by using a separate variable to keep track of the generated module .conf files that need to be marked as configuration files.

Fixes 1a70a92d1f10 ("kernel-module-split.bbclass: identify kernel modconf files as configuration files")
(cherry picked from commit db5f2ca532db4f0d2e05b7cb5f9d146e1dd76ab3)
---
 meta/classes/kernel-module-split.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/kernel-module-split.bbclass +4 -1
index c8ede26996..baa32e0a90 100644
@@ -120,7 +120,10 @@ python split_kernel_module_packages () {
         files = d.getVar('FILES_%s' % pkg)
         files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
         d.setVar('FILES_%s' % pkg, files)
-        d.setVar('CONFFILES_%s' % pkg, files)
+
+        conffiles = d.getVar('CONFFILES_%s' % pkg)
+        conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (conffiles, basename, basename)
+        d.setVar('CONFFILES_%s' % pkg, conffiles)
 
         if "description" in vals:
             old_desc = d.getVar('DESCRIPTION_' + pkg) or ""
Signature · 1 line
2.29.2
#18 lore raw

PATCH 18/19 uninative: Don't use single sstate for pseudo-native

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems.

An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error:

File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target
self.assertEqual(filelist1, filelist2)
File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual
self.assertSequenceEqual(list1, list2, msg, seq_type=list)
File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual
self.fail(msg)
File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail
raise self.failureException(msg)

AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8']

First differing element 0:
'-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor'
'-rwxr-xr-x root root /etc/init.d/mdmonitor'

This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root.

Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed.

This hopefully fixes one of the mysterious AB-INT issues.

(cherry picked from commit 6e3785a3f1f3cf68f5fe101cd6bebe91db165973)
---
 meta/classes/base.bbclass   | 1 +
 meta/classes/sstate.bbclass | 4 ++++
 meta/lib/oe/sstatesig.py    | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
meta/classes/base.bbclass +1 -0
index 5a0b0c6b3e..78ae28bb0f 100644
@@ -231,6 +231,7 @@ python base_eventhandler() {
     if isinstance(e, bb.event.ConfigParsed):
         if not d.getVar("NATIVELSBSTRING", False):
             d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
+        d.setVar("ORIGNATIVELSBSTRING", d.getVar("NATIVELSBSTRING", False))
         d.setVar('BB_VERSION', bb.__version__)
 
     # There might be no bb.event.ConfigParsed event if bitbake server is
meta/classes/sstate.bbclass +4 -0
index a8ae75101d..d08d950e76 100644
@@ -72,6 +72,7 @@ BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
 
 SSTATE_ARCHS = " \
     ${BUILD_ARCH} \
+    ${BUILD_ARCH}_${ORIGNATIVELSBSTRING} \
     ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \
     ${BUILD_ARCH}_${TARGET_ARCH} \
     ${SDK_ARCH}_${SDK_OS} \
@@ -80,6 +81,7 @@ SSTATE_ARCHS = " \
     ${PACKAGE_ARCH} \
     ${PACKAGE_EXTRA_ARCHS} \
     ${MACHINE_ARCH}"
+SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING"
 
 SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
 
@@ -121,6 +123,8 @@ SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \
 python () {
     if bb.data.inherits_class('native', d):
         d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
+        if d.getVar("PN") == "pseudo-native":
+            d.appendVar('SSTATE_PKGARCH', '_${ORIGNATIVELSBSTRING}')
     elif bb.data.inherits_class('crosssdk', d):
         d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
     elif bb.data.inherits_class('cross', d):
meta/lib/oe/sstatesig.py +1 -1
index 64fb84ec92..34558a6672 100644
@@ -439,7 +439,7 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
         d2 = multilibcache[variant]
 
     if taskdata.endswith("-native"):
-        pkgarchs = ["${BUILD_ARCH}"]
+        pkgarchs = ["${BUILD_ARCH}", "${BUILD_ARCH}_${ORIGNATIVELSBSTRING}"]
     elif taskdata.startswith("nativesdk-"):
         pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
     elif "-cross-canadian" in taskdata:
Signature · 1 line
2.29.2
#19 lore raw

PATCH 19/19 wireless-regdb: upgrade 2020.04.29 -> 2020.11.20

In reply to Anuj Mittal

From: zangrc <[email protected]>

(cherry picked from commit c5461c6b0e21877c58a75834f62324a4798c2000)
---
 ...ireless-regdb_2020.04.29.bb => wireless-regdb_2020.11.20.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-kernel/wireless-regdb/{wireless-regdb_2020.04.29.bb => wireless-regdb_2020.11.20.bb} (94%)
meta/recipes-kernel/wireless-regdb/wireless-regdb_2020.11.20.bb renamed from meta/recipes-kernel/wireless-regdb/wireless-regdb_2020.04.29.bb +1 -1
similarity index 94%
rename from meta/recipes-kernel/wireless-regdb/wireless-regdb_2020.04.29.bb
rename to meta/recipes-kernel/wireless-regdb/wireless-regdb_2020.11.20.bb
index a5827b9ef0..05ab95ed7f 100644
@@ -5,7 +5,7 @@ LICENSE = "ISC"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
 
 SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
-SRC_URI[sha256sum] = "89fd031aed5977c219a71501e144375a10e7c90d1005d5d086ea7972886a2c7a"
+SRC_URI[sha256sum] = "b4164490d82ff7b0086e812ac42ab27baf57be24324d4c0ee1c5dd6ba27f2a52"
 
 inherit bin_package allarch
 
Signature · 1 line
2.29.2