Patch review
cover Patch review
Please review this next set of patches for dunfell and have comments back by end of day Monday.
The following changes since commit b98e50f08b2bcf61fbc75ea1b0ad83a17c0a736a:
cve-check: avoid FileNotFoundError if no do_cve_check task has run (2020-09-14 04:26:37 -1000)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
Christophe GUIBOUT (1):
initramfs-framework: support kernel cmdline with double quotes
Geoff Parker (1):
systemd-serialgetty: Replace sed quoting using ' with " to allow var
expansion
Khem Raj (1):
populate_sdk_ext: Do not assume local.conf will always exist
Michael Gloff (1):
sysvinit: Remove ${B} assignment
Pierre-Jean Texier (1):
libubootenv: upgrade 0.3 -> 0.3.1
Rahul Kumar (1):
systemd-serialgetty: Fix sed expression quoting
Steve Sakoman (1):
Revert "kernel.bbclass: run do_symlink_kernsrc before do_patch"
meta/classes/kernel.bbclass | 2 +-
meta/classes/populate_sdk_ext.bbclass | 5 +++--
.../{libubootenv_0.3.bb => libubootenv_0.3.1.bb} | 2 +-
.../initrdscripts/initramfs-framework/init | 13 +++++++++++++
meta/recipes-core/systemd/systemd-serialgetty.bb | 4 ++--
meta/recipes-core/sysvinit/sysvinit_2.96.bb | 1 -
6 files changed, 20 insertions(+), 7 deletions(-)
rename meta/recipes-bsp/u-boot/{libubootenv_0.3.bb => libubootenv_0.3.1.bb} (94%)Signature · 1 line
2.17.1
PATCH 1/7 systemd-serialgetty: Fix sed expression quoting
From: Rahul Kumar <[email protected]>
Fix sed: -e expression #1, char 13: unterminated `s' command
Error Message:
| NOTE: Installed into sysroot: [] | NOTE: Skipping as already exists in sysroot: ['pseudo-native', 'glibc', 'patch-native', 'quilt-native', 'gcc-cross-arm', 'gcc-runtime', 'linux-libc-headers', 'libgcc', 'flex-native', 'xz-native', 'libtool-native', 'automake-native', 'binutils-cross-arm', 'zlib-native', 'mpfr-native', 'texinfo-dummy-native', 'autoconf-native', 'libmpc-native', 'gnu-config-native', 'gmp-native', 'attr-native', 'm4-native', 'gettext-minimal-native'] | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | sed: -e expression #1, char 13: unterminated `s' command | WARNING: exit code 1 from a shell command. | ERROR: Execution of '/opt/Projects/poky/build/tmp/work/qemux86_64-poky-linux/systemd-serialgetty/1.0-r5/temp/run.do_install.11228' failed with exit code 1: | sed: -e expression #1, char 13: unterminated `s' command | WARNING: exit code 1 from a shell command. |
To Fix this Issue using the strong (single quote) character in sed command.
It is recommend to use quotes. If we have meta-characters in the command, quotes are necessary.
--- meta/recipes-core/systemd/systemd-serialgetty.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd-serialgetty.bb +1 -1
@@ -21,7 +21,7 @@ do_install() { install -d ${D}${systemd_unitdir}/system/ install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system/ - sed -i -e s/\@BAUDRATE\@/$default_baudrate/g ${D}${systemd_unitdir}/system/[email protected] + sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected] tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do
Signature · 1 line
2.17.1
PATCH 2/7 systemd-serialgetty: Replace sed quoting using ' with " to allow var expansion
In reply to Steve SakomanFrom: Geoff Parker <[email protected]>
A recent commit added single quotes around the sed regex's. This prevented the expansion of $default_baudrate in do_install(), and ended up with systemd's' [email protected] file having a literal $default_baudrate.
This broke the serial console getty service.
[email protected] was getting a line which looked like this:
ExecStart=-/sbin/agetty -8 -L %I $default_baudrate $TERM
Rather than:
ExecStart=-/sbin/agetty -8 -L %I 115200 $TERM
Fixed by repacing the single quotes with double quotes in the sed expressions.
--- meta/recipes-core/systemd/systemd-serialgetty.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd-serialgetty.bb +2 -2
@@ -21,7 +21,7 @@ do_install() { install -d ${D}${systemd_unitdir}/system/ install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system/ - sed -i -e 's/\@BAUDRATE\@/$default_baudrate/g' ${D}${systemd_unitdir}/system/[email protected] + sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_unitdir}/system/[email protected] tmp="${SERIAL_CONSOLES}" for entry in $tmp ; do
@@ -34,7 +34,7 @@ do_install() { else # install custom service file for the non-default baudrate install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system/[email protected] - sed -i -e s/\@BAUDRATE\@/$baudrate/g ${D}${systemd_unitdir}/system/[email protected] + sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_unitdir}/system/[email protected] # enable the service ln -sf ${systemd_unitdir}/system/[email protected] \ ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty$baudrate@$ttydev.service
Signature · 1 line
2.17.1
PATCH 3/7 initramfs-framework: support kernel cmdline with double quotes
In reply to Steve SakomanFrom: Christophe GUIBOUT <[email protected]>
It avoids init to crash when kernel cmdline contains a string with spaces inside, like that:
dyndbg="file drivers/usb/core/hub.c +pltf"
--- .../initrdscripts/initramfs-framework/init | 13 +++++++++++++ 1 file changed, 13 insertions(+)
meta/recipes-core/initrdscripts/initramfs-framework/init +13 -0
@@ -88,12 +88,25 @@ fi # populate bootparam environment for p in `cat /proc/cmdline`; do + if [ -n "$quoted" ]; then + value="$value $p" + if [ "`echo $p | sed -e 's/\"$//'`" != "$p" ]; then + eval "bootparam_${quoted}=${value}" + unset quoted + fi + continue + fi + opt=`echo $p | cut -d'=' -f1` opt=`echo $opt | sed -e 'y/.-/__/'` if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then eval "bootparam_${opt}=true" else value="`echo $p | cut -d'=' -f2-`" + if [ "`echo $value | sed -e 's/^\"//'`" != "$value" ]; then + quoted=${opt} + continue + fi eval "bootparam_${opt}=\"${value}\"" fi done
Signature · 1 line
2.17.1
PATCH 4/7 libubootenv: upgrade 0.3 -> 0.3.1
In reply to Steve SakomanFrom: Pierre-Jean Texier <[email protected]>
This is a bugfix release which includes the following changes:
824551a Prepare 0.3.1
ca6aaa1 Fix file reading/writing when the environment is in EEPROM a031dea Fix regression in UBI volume support
c91c150 Define SOVERSION to indicate API version
---
.../u-boot/{libubootenv_0.3.bb => libubootenv_0.3.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-bsp/u-boot/{libubootenv_0.3.bb => libubootenv_0.3.1.bb} (94%)meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb renamed from meta/recipes-bsp/u-boot/libubootenv_0.3.bb +1 -1
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b36 SECTION = "libs" SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https" -SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414" +SRCREV = "824551ac77bab1d0f7ae34d7a7c77b155240e754" S = "${WORKDIR}/git"
Signature · 1 line
2.17.1
PATCH 5/7 sysvinit: Remove ${B} assignment
In reply to Steve SakomanFrom: Michael Gloff <[email protected]>
The VERSION variable is not set unless the
top level Makefile is used as the version is
derived from the Changelog.
If VERSION is not set, none of the binaries built
in the sysvinit recipe will have a valid version
output.
Before:
INIT: version booting
After:
INIT: version 2.96 booting
Using the top level Makefile does not cause any
additional builds to occur.
--- meta/recipes-core/sysvinit/sysvinit_2.96.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-core/sysvinit/sysvinit_2.96.bb +0 -1
@@ -25,7 +25,6 @@ SRC_URI[md5sum] = "48cebffebf2a96ab09bec14bf9976016" SRC_URI[sha256sum] = "2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587" S = "${WORKDIR}/sysvinit-${PV}" -B = "${S}/src" inherit update-alternatives features_check DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt"
Signature · 1 line
2.17.1
PATCH 6/7 populate_sdk_ext: Do not assume local.conf will always exist
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Some distros may not have local.conf, and use auto.conf or site.conf alone to describe distro config metadata, therefore make code robust to not fail eSDK builds for such setups
--- meta/classes/populate_sdk_ext.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/classes/populate_sdk_ext.bbclass +3 -2
@@ -310,8 +310,9 @@ python copy_buildsystem () { if os.path.exists(builddir + '/conf/auto.conf'): with open(builddir + '/conf/auto.conf', 'r') as f: oldlines += f.readlines() - with open(builddir + '/conf/local.conf', 'r') as f: - oldlines += f.readlines() + if os.path.exists(builddir + '/conf/local.conf'): + with open(builddir + '/conf/local.conf', 'r') as f: + oldlines += f.readlines() (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var) with open(baseoutpath + '/conf/local.conf', 'w') as f:
Signature · 1 line
2.17.1
PATCH 7/7 Revert "kernel.bbclass: run do_symlink_kernsrc before do_patch"
In reply to Steve SakomanThis reverts commit 914d8a00e34a8edf75a349da6f5978e4ed60e6d5.
Due to bug introduced for externalsrc
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14044
--- meta/classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
@@ -152,7 +152,7 @@ python do_symlink_kernsrc () { shutil.move(s, kernsrc) os.symlink(kernsrc, s) } -addtask symlink_kernsrc before do_patch after do_unpack +addtask symlink_kernsrc before do_configure after do_unpack inherit kernel-arch deploy
Signature · 1 line
2.17.1