Skip to contentSkip to conversation

Patch review

PATCH In review Steve Sakoman 2 participants 19 messages Dec 1, 2020

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 Thursday.

Passed a-full on autobuilder:

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

The following changes since commit b885888df67eb5cdb3b82f4f0a07369a449e223b:

build-appliance-image: Update to dunfell head revision (2020-11-25 23:25:31 +0000)

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

Anuj Mittal (1):
distutils-common-base: fix LINKSHARED expansion

Bruce Ashfield (2):
kernel: provide module.lds for out of tree builds in v5.10+
kernel: relocate copy of module.lds to module compilation task

Fedor Ross (2):
sysvinit: remove bashism to be compatible with dash
eudev: remove bashism to be compatible with dash

Loic Domaigne (1):
roofs_*.bbclass: fix missing vardeps for do_rootfs

Max Krummenacher (1):
linux-firmware: rdepend on license for all nvidia packages

Richard Purdie (2):
fs-perms: Ensure /usr/src/debug/ file modes are correct
e2fsprogs: Fix a ptest permissions determinism issue

Ross Burton (4):
cve-check: show real PN/PV
python3: add CVE-2007-4559 to whitelist
gstreamer1.0-rtsp-server: set CVE_PRODUCT
gstreamer1.0-plugins-base: set CVE_PRODUCT

Steve Sakoman (1):
sqlite3: add CVE-2015-3717 to whitelist

Vyacheslav Yurkov (1):
license_image.bbclass: use canonical name for license files

Wonmin Jung (1):
kernel: Set proper LD in KERNEL_KCONFIG_COMMAND

 meta/classes/cve-check.bbclass                           | 9 ++++++---
 meta/classes/distutils-common-base.bbclass               | 2 +-
 meta/classes/kernel.bbclass                              | 6 +++++-
 meta/classes/license_image.bbclass                       | 3 ++-
 meta/classes/package.bbclass                             | 2 +-
 meta/classes/rootfs_deb.bbclass                          | 2 +-
 meta/classes/rootfs_ipk.bbclass                          | 2 +-
 meta/classes/rootfs_rpm.bbclass                          | 2 +-
 meta/conf/abi_version.conf                               | 2 +-
 meta/files/fs-perms-persistent-log.txt                   | 2 +-
 meta/files/fs-perms.txt                                  | 2 +-
 meta/recipes-core/sysvinit/sysvinit/rc                   | 2 +-
 meta/recipes-core/udev/eudev/init                        | 2 +-
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb      | 2 ++
 meta/recipes-devtools/python/python3_3.8.2.bb            | 2 ++
 .../linux-firmware/linux-firmware_20201022.bb            | 1 +
 meta/recipes-kernel/linux/kernel-devsrc.bb               | 6 ++++++
 .../gstreamer/gstreamer1.0-plugins-base_1.16.3.bb        | 2 ++
 .../gstreamer/gstreamer1.0-rtsp-server_1.16.3.bb         | 2 ++
 meta/recipes-support/sqlite/sqlite3_3.31.1.bb            | 2 ++
 20 files changed, 40 insertions(+), 15 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/16 kernel: provide module.lds for out of tree builds in v5.10+

From: Bruce Ashfield <[email protected]>

The upstream commit 596b0474d3d [kbuild: preprocess module linker script], adds a dependency on module.lds for external module building.

Since module.lds is generated as part of 'modules_prepare', we must make it available with the other kernel artifacts in the kernel shared workdir, otherwise out of tree builds fail.

This fixes errors like:

    | make[4]: *** No rule to make target 'scripts/module.lds', needed by
        'build/tmp/work/qemuarm64-poky-linux/cryptodev-module/1.11-r0/git/cryptodev.ko'.
        Stop.
    | make[4]: *** Waiting for unfinished jobs....

We also ensure that kernel-devsrc has a copy to support on target module builds that are often prepared with 'make scripts prepare'. Those targets won't regenerate it, so the build fails. If 'make modules_prepare' is used, the file will be regenerated and overwrite our copy (as expected).

(cherry picked from commit 0fc66a0b64953aae38d0124b57615fffaec8de52)
---
 meta/classes/kernel.bbclass                | 1 +
 meta/recipes-kernel/linux/kernel-devsrc.bb | 6 ++++++
 2 files changed, 7 insertions(+)
meta/classes/kernel.bbclass +1 -0
index 9e3c34ad48..58c9f171dc 100644
@@ -465,6 +465,7 @@ do_shared_workdir () {
 	# Copy files required for module builds
 	cp System.map $kerneldir/System.map-${KERNEL_VERSION}
 	[ -e Module.symvers ] && cp Module.symvers $kerneldir/
+	[ -e scripts/module.lds ] && install -Dm 0644 scripts/module.lds $kerneldir/scripts/module.lds
 	cp .config $kerneldir/
 	mkdir -p $kerneldir/include/config
 	cp include/config/kernel.release $kerneldir/include/config/kernel.release
meta/recipes-kernel/linux/kernel-devsrc.bb +6 -0
index 5940cc90ea..951e7635cc 100644
@@ -86,6 +86,12 @@ do_install() {
 	# be dealt with.
 	# cp -a scripts $kerneldir/build
 
+	# although module.lds can be regenerated on target via 'make modules_prepare'
+	# there are several places where 'makes scripts prepare' is done, and that won't
+	# regenerate the file. So we copy it onto the target as a migration to using
+	# modules_prepare
+	cp -a --parents scripts/module.lds $kerneldir/build/ 2>/dev/null || :
+
         if [ -d arch/${ARCH}/scripts ]; then
 	    cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH}
 	fi
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/16 kernel: relocate copy of module.lds to module compilation task

In reply to Steve Sakoman

From: Bruce Ashfield <[email protected]>

There were two copies of this patch floating around, and the merged variant has the copy in the wrong place.

module.lds is only created during modules_prepare, and that target is not invoked during our main build of the kernel. We aren't about to change the kernel build (there's no need), so we move the copy into the compile_kernelmodules task. After that runs, we have module.lds availble to copy.

This has been tested against clean kernel + out of tree module builds, and the dependencies are correct that the file is copied before the out of tree module build starts.

(cherry picked from commit 7d94f9209ebaaf59ea001239a889dd7f928a0e7c)
---
 meta/classes/kernel.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +4 -1
index 58c9f171dc..700ba0ad8d 100644
@@ -358,6 +358,10 @@ do_compile_kernelmodules() {
 		# other kernel modules and will look at this
 		# file to do symbol lookups
 		cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/
+		# 5.10+ kernels have module.lds that we need to copy for external module builds
+		if [ -e "${B}/scripts/module.lds" ]; then
+			install -Dm 0644 ${B}/scripts/module.lds ${STAGING_KERNEL_BUILDDIR}/scripts/module.lds
+		fi
 	else
 		bbnote "no modules to compile"
 	fi
@@ -465,7 +469,6 @@ do_shared_workdir () {
 	# Copy files required for module builds
 	cp System.map $kerneldir/System.map-${KERNEL_VERSION}
 	[ -e Module.symvers ] && cp Module.symvers $kerneldir/
-	[ -e scripts/module.lds ] && install -Dm 0644 scripts/module.lds $kerneldir/scripts/module.lds
 	cp .config $kerneldir/
 	mkdir -p $kerneldir/include/config
 	cp include/config/kernel.release $kerneldir/include/config/kernel.release
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/16 kernel: Set proper LD in KERNEL_KCONFIG_COMMAND

In reply to Steve Sakoman

From: Wonmin Jung <[email protected]>

With 'ld-is-gold' and linux kernel 5.4 or later, menuconfig task for kernel recipes will fail with:

$ bitbake -c menuconfig virtual/kernel
...
scripts/kconfig/mconf  Kconfig
scripts/Kconfig.include:43:  gold linker 'x86_64-poky-linux-ld' not supported
/OE/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:29:
 recipe for target 'menuconfig' failed
make[2]: *** [menuconfig] Error 1
/OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:606:
 recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
/OE/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:185:
 recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
Command failed.

This is because that the KERNEL_LD variable already set in kernel-arch.bbclass isn't used by do_menuconfig function of cml1.bbclass.

To fix this issue specify LD variable while calling the kernel menuconfig command through KERNEL_KCONFIG_COMMAND.

(cherry picked from commit 1faf66ce0b1f8f5165277161e07e25e672370c3f)
---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index 700ba0ad8d..29afd791e9 100644
@@ -569,7 +569,7 @@ addtask savedefconfig after do_configure
 
 inherit cml1
 
-KCONFIG_CONFIG_COMMAND_append = " HOSTLDFLAGS='${BUILD_LDFLAGS}'"
+KCONFIG_CONFIG_COMMAND_append = " LD='${KERNEL_LD}' HOSTLDFLAGS='${BUILD_LDFLAGS}'"
 
 EXPORT_FUNCTIONS do_compile do_install do_configure
 
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/16 roofs_*.bbclass: fix missing vardeps for do_rootfs

In reply to Steve Sakoman

From: Loic Domaigne <[email protected]>

As per lib/oe/rootfs.py and lib/oe/package_manager/???/__init__.py the PACKAGE_FEED baseurl is defined as the joined paths of:
URIS/BASE_PATHS/ARCHS

Therefore, the do_rootfs task should depend furthermore on PACKAGE_FEED_{BASE_PATHS,ARCHS} to properly retrigger a build if the value changes.

(cherry picked from commit e5329464f5ebad909c4c9bd27a718bbd8f4cc221)
---
 meta/classes/rootfs_deb.bbclass | 2 +-
 meta/classes/rootfs_ipk.bbclass | 2 +-
 meta/classes/rootfs_rpm.bbclass | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/rootfs_deb.bbclass +1 -1
index 2b93796a76..ef616da229 100644
@@ -7,7 +7,7 @@ ROOTFS_PKGMANAGE = "dpkg apt"
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa"
-do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
+do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
 
 do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
meta/classes/rootfs_ipk.bbclass +1 -1
index e73d2bfdae..f1e0219732 100644
@@ -11,7 +11,7 @@ ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
 do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa"
-do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
+do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
 
 do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
 do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
meta/classes/rootfs_rpm.bbclass +1 -1
index 51f89ea990..ae0f541c49 100644
@@ -24,7 +24,7 @@ do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
 do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
 
 do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa"
-do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
+do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
 
 python () {
     if d.getVar('BUILD_IMAGES_FROM_FEEDS'):
Signature · 1 line
2.17.1
#5 lore raw

Re: [OE-core][dunfell 04/16] roofs_*.bbclass: fix missing vardeps for do_rootfs

"roofs_*.bbclass"

rday

#6 lore raw

Re: [OE-core][dunfell 04/16] roofs_*.bbclass: fix missing vardeps for do_rootfs

Quoted 3 lines · Robert P. J. Day

"roofs_*.bbclass"

Typos come along for free with a cherry-pick ;-)

Steve

#7 lore raw

PATCH 5/16 linux-firmware: rdepend on license for all nvidia packages

In reply to Steve Sakoman

From: Max Krummenacher <[email protected]>

Fixes commit 0671d04978 ("linux-firmware: package nvidia firmware")

(cherry picked from commit 59789dea33629a96f0fe5646eb684aa131e167bf)
---
 meta/recipes-kernel/linux-firmware/linux-firmware_20201022.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-kernel/linux-firmware/linux-firmware_20201022.bb +1 -0
index 045f2647e0..93b9d5308a 100644
@@ -501,6 +501,7 @@ FILES_${PN}-nvidia-license = "${nonarch_base_libdir}/firmware/LICENCE.nvidia"
 
 RDEPENDS_${PN}-nvidia-gpu += "${PN}-nvidia-license"
 RDEPENDS_${PN}-nvidia-tegra += "${PN}-nvidia-license"
+RDEPENDS_${PN}-nvidia-tegra-k1 += "${PN}-nvidia-license"
 
 # For rtl
 LICENSE_${PN}-rtl8188 = "Firmware-rtlwifi_firmware"
Signature · 1 line
2.17.1
#8 lore raw

PATCH 6/16 license_image.bbclass: use canonical name for license files

In reply to Steve Sakoman

From: Vyacheslav Yurkov <[email protected]>

When copying license files to the image rootfs, i.e to /usr/share/common-licenses, a canonical name of a license should be used, otherwise duplicated files end up in common-licenses directory.

For example, GPL-2.0 license according to conf/license.conf can be referenced in recipes as GPL-2, GPLv2, and GPLv2.0. If a license name is used directly, we end up with three files in the rootfs with the same content. If a canonical name used instead, then each license gets copied only once.

(cherry picked from commit 670fe71dd18ea675f35581db4a61fda137f8bf00)
---
 meta/classes/license_image.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/license_image.bbclass +2 -1
index a8c72da3cb..acd8126f68 100644
@@ -125,7 +125,6 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
 
                 licenses = os.listdir(pkg_license_dir)
                 for lic in licenses:
-                    rootfs_license = os.path.join(rootfs_license_dir, lic)
                     pkg_license = os.path.join(pkg_license_dir, lic)
                     pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic)
 
@@ -144,6 +143,8 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
                                 bad_licenses) == False:
                             continue
 
+                        # Make sure we use only canonical name for the license file
+                        rootfs_license = os.path.join(rootfs_license_dir, "generic_%s" % generic_lic)
                         if not os.path.exists(rootfs_license):
                             oe.path.copyhardlink(pkg_license, rootfs_license)
 
Signature · 1 line
2.17.1
#9 lore raw

PATCH 7/16 cve-check: show real PN/PV

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

The output currently shows the remapped product and version fields, which may not be the actual recipe name/version. As this report is about recipes, use the real values.

(cherry picked from commit 18827d7f40db4a4f92680bd59ca655cca373ad65)
---
 meta/classes/cve-check.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/classes/cve-check.bbclass +6 -3
index 17f64a8a9c..669da6c8e9 100644
@@ -205,6 +205,9 @@ def check_cves(d, patched_cves):
     """
     from distutils.version import LooseVersion
 
+    pn = d.getVar("PN")
+    real_pv = d.getVar("PV")
+
     cves_unpatched = []
     # CVE_PRODUCT can contain more than one product (eg. curl/libcurl)
     products = d.getVar("CVE_PRODUCT").split()
@@ -214,7 +217,7 @@ def check_cves(d, patched_cves):
     pv = d.getVar("CVE_VERSION").split("+git")[0]
 
     # If the recipe has been whitlisted we return empty lists
-    if d.getVar("PN") in d.getVar("CVE_CHECK_PN_WHITELIST").split():
+    if pn in d.getVar("CVE_CHECK_PN_WHITELIST").split():
         bb.note("Recipe has been whitelisted, skipping check")
         return ([], [], [])
 
@@ -283,12 +286,12 @@ def check_cves(d, patched_cves):
                         vulnerable = vulnerable_start or vulnerable_end
 
                 if vulnerable:
-                    bb.note("%s-%s is vulnerable to %s" % (product, pv, cve))
+                    bb.note("%s-%s is vulnerable to %s" % (pn, real_pv, cve))
                     cves_unpatched.append(cve)
                     break
 
             if not vulnerable:
-                bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve))
+                bb.note("%s-%s is not vulnerable to %s" % (pn, real_pv, cve))
                 # TODO: not patched but not vulnerable
                 patched_cves.add(cve)
 
Signature · 1 line
2.17.1
#10 lore raw

PATCH 8/16 python3: add CVE-2007-4559 to whitelist

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

This issue describes expected behaviour, do not use tarfile with untrusted data.

(cherry picked from commit f4c22e83f2e68ff157da5ea1303acc2931d63f5f)
---
 meta/recipes-devtools/python/python3_3.8.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/python/python3_3.8.2.bb +2 -0
index 1d0b4cdb77..b4cce88e87 100644
@@ -52,6 +52,8 @@ UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
 
 CVE_PRODUCT = "python"
 
+# Upstream consider this expected behaviour
+CVE_CHECK_WHITELIST += "CVE-2007-4559"
 # This is not exploitable when glibc has CVE-2016-10739 fixed.
 CVE_CHECK_WHITELIST += "CVE-2019-18348"
 
Signature · 1 line
2.17.1
#11 lore raw

PATCH 9/16 sqlite3: add CVE-2015-3717 to whitelist

In reply to Steve Sakoman

As per https://groups.google.com/g/sqlite-dev/c/U7OjAbZO6LA this issue is believed to be either iOS specific, or fixed in 3.8.9.

(cherry-picked from d11a2157befcfe40517140988dd26bf0ed7240b6)

---
 meta/recipes-support/sqlite/sqlite3_3.31.1.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/sqlite/sqlite3_3.31.1.bb +2 -0
index c289affd60..877e80f5a3 100644
@@ -19,3 +19,5 @@ SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b5
 
 # -19242 is only an issue in specific development branch commits
 CVE_CHECK_WHITELIST += "CVE-2019-19242"
+# This is believed to be iOS specific (https://groups.google.com/g/sqlite-dev/c/U7OjAbZO6LA)
+CVE_CHECK_WHITELIST += "CVE-2015-3717"
Signature · 1 line
2.17.1
#12 lore raw

PATCH 10/16 gstreamer1.0-rtsp-server: set CVE_PRODUCT

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

There are CVEs with the 'gst-rtsp-server' product, so set that.

(cherry picked from commit eb5cbdead78d092733e783b09528b208efccac3d)
---
 .../gstreamer/gstreamer1.0-rtsp-server_1.16.3.bb                | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.3.bb +2 -0
index 5f1b1d44fa..ed51a5693e 100644
@@ -29,3 +29,5 @@ GIR_MESON_DISABLE_FLAG = "disabled"
 
 # Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
 require gstreamer1.0-plugins-packaging.inc
+
+CVE_PRODUCT += "gst-rtsp-server"
Signature · 1 line
2.17.1
#13 lore raw

PATCH 11/16 gstreamer1.0-plugins-base: set CVE_PRODUCT

In reply to Steve Sakoman

From: Ross Burton <[email protected]>

There are CVEs with the 'gst-plugins-base' product, so set that.

(cherry picked from commit ec0f0e5995ab498f50ad51ceb361784247614982)
---
 .../gstreamer/gstreamer1.0-plugins-base_1.16.3.bb               | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.3.bb +2 -0
index a4f4772c1c..9daaf7587e 100644
@@ -97,3 +97,5 @@ def get_opengl_cmdline_list(switch_name, options, d):
         return '-D' + switch_name + '=' + ','.join(selected_options)
     else:
         return ''
+
+CVE_PRODUCT += "gst-plugins-base"
Signature · 1 line
2.17.1
#14 lore raw

PATCH 12/16 distutils-common-base: fix LINKSHARED expansion

In reply to Steve Sakoman

From: Anuj Mittal <[email protected]>

Add the missing $ so SECURITY_CFLAGS actually gets expanded.

(cherry picked from commit 6ed2f892ebb0b4e30a3bf167eac68027ea378a2d)
---
 meta/classes/distutils-common-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/distutils-common-base.bbclass +1 -1
index 94b5fd426d..43a38e5a3a 100644
@@ -11,7 +11,7 @@ export LDCXXSHARED  = "${CXX} -shared"
 export CCSHARED  = "-fPIC -DPIC"
 # LINKFORSHARED are the flags passed to the $(CC) command that links
 # the python executable
-export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic"
+export LINKFORSHARED = "${SECURITY_CFLAGS} -Xlinker -export-dynamic"
 
 FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*"
 
Signature · 1 line
2.17.1
#15 lore raw

PATCH 13/16 sysvinit: remove bashism to be compatible with dash

In reply to Steve Sakoman

From: Fedor Ross <[email protected]>

Replace the equality operator '==' with '=' inside of '[]' to be compatible with bash and dash.

(cherry picked from commit b7f0ec6eafb35117eaf4eeef281162080f0ca79a)
---
 meta/recipes-core/sysvinit/sysvinit/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/sysvinit/sysvinit/rc +1 -1
index fd1fdd26ba..d0d3149821 100755
@@ -63,7 +63,7 @@ startup() {
   stty onlcr 0>&1
 
   # Limit stack size for startup scripts
-  [ "$STACK_SIZE" == "" ] || ulimit -S -s $STACK_SIZE
+  [ "$STACK_SIZE" = "" ] || ulimit -S -s $STACK_SIZE
 
   # Now find out what the current and what the previous runlevel are.
 
Signature · 1 line
2.17.1
#16 lore raw

PATCH 14/16 eudev: remove bashism to be compatible with dash

In reply to Steve Sakoman

From: Fedor Ross <[email protected]>

Remove 'echo -e' and replace it with 'printf'. In bash the builtin 'echo' has an option for interpreting backslash escapes. In a shell like dash the builtin 'echo' interprets backslash escapes by default. Therefor the 'echo' in dash doesn't have the '-e' option. When using 'printf' instead it is safe to use it either with bash or dash.

(cherry picked from commit c747acca33f84879a1ebd0ef972c07f4d5dff8b7)
---
 meta/recipes-core/udev/eudev/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/udev/eudev/init +1 -1
index 0455ade258..c60dbbf6d5 100644
@@ -52,7 +52,7 @@ case "$1" in
     kill_udevd > "/dev/null" 2>&1
 
     # trigger the sorted events
-    [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
+    [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug
     @UDEVD@ -d
 
     udevadm control --env=STARTUP=1
Signature · 1 line
2.17.1
#17 lore raw

PATCH 15/16 fs-perms: Ensure /usr/src/debug/ file modes are correct

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

If files are copied into /usr/src/debug directly from WORKDIR (e.g. makedevs) we'd get the permissions from the checkout which would depend on the host umask.

Avoid this and be deterministic by setting the file modes consistently. Core code copies the files in so we're responsible for the permissions.

Unfortunately to force this change to apply we need to invalidate both the package tasks and the hash equivalance mappings since file mode 'corruption' already made it into the output hashes (both input options were mapped to the output hashes).

(cherry picked from commit 1f958bcd6c9cd12ec76d80586cba15f4d6ed17a7)
---
 meta/classes/package.bbclass           | 2 +-
 meta/conf/abi_version.conf             | 2 +-
 meta/files/fs-perms-persistent-log.txt | 2 +-
 meta/files/fs-perms.txt                | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/package.bbclass +1 -1
index cc64ddffc3..7c252dd46b 100644
@@ -2225,7 +2225,7 @@ python do_package () {
     # cache.  This is useful if an item this class depends on changes in a
     # way that the output of this class changes.  rpmdeps is a good example
     # as any change to rpmdeps requires this to be rerun.
-    # PACKAGE_BBCLASS_VERSION = "2"
+    # PACKAGE_BBCLASS_VERSION = "4"
 
     # Init cachedpath
     global cpath
meta/conf/abi_version.conf +1 -1
index 2bdc55695b..0a3fb307c8 100644
@@ -12,4 +12,4 @@ OELAYOUT_ABI = "12"
 # a reset of the equivalence, for example when reproducibility issues break the
 # existing match data. Distros can also append to this value for the same effect.
 #
-HASHEQUIV_HASH_VERSION  = "1"
+HASHEQUIV_HASH_VERSION  = "4"
meta/files/fs-perms-persistent-log.txt +1 -1
index 3a7cf3ab94..518c1be3c9 100644
@@ -41,7 +41,7 @@ ${includedir}		0755	root	root	true	0644	root	root
 ${oldincludedir}	0755	root	root	true	0644	root	root
 
 # Cleanup debug src
-/usr/src/debug		0755	root	root	true	-	root	root
+/usr/src/debug		0755	root	root	true	0644	root	root
 
 # Items from base-files
 # Links
meta/files/fs-perms.txt +1 -1
index c8c3ac5dbe..daa4aed840 100644
@@ -41,7 +41,7 @@ ${includedir}		0755	root	root	true	0644	root	root
 ${oldincludedir}	0755	root	root	true	0644	root	root
 
 # Cleanup debug src
-/usr/src/debug		0755	root	root	true	-	root	root
+/usr/src/debug		0755	root	root	true	0644	root	root
 
 # Items from base-files
 # Links
Signature · 1 line
2.17.1
#18 lore raw

PATCH 16/16 e2fsprogs: Fix a ptest permissions determinism issue

In reply to Steve Sakoman

From: Richard Purdie <[email protected]>

When comparing builds built with different host umasks, this file jumped out. The umask from do_compile was influencing ${D} and as cp was used to add the file it wasn't deterministic. Fix the file mode to ensure determinism.

(cherry picked from commit 37f37f4a52de3711973b372160f23672b61ff6ad)
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb +2 -0
index 4f7cafeac9..439928e433 100644
@@ -128,6 +128,8 @@ do_compile_ptest() {
 }
 
 do_install_ptest() {
+	# This file's permissions depends on the host umask so be deterministic
+	chmod 0644 ${B}/tests/test_data.tmp
 	cp -R --no-dereference --preserve=mode,links -v ${B}/tests ${D}${PTEST_PATH}/test
 	cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* ${D}${PTEST_PATH}/test
 	sed -e 's!../e2fsck/e2fsck!e2fsck!g' \
Signature · 1 line
2.17.1