Patch review
cover Patch review
Please review this next set of patches for dunfell and have comments back by end of day Wednesday.
The following changes since commit ea886d57db917a41a0d106a15e1e96c72d6407b0:
kernel-yocto: account for extracted defconfig in elements check (2020-07-23 04:07: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
Ahmad Fatoum (1):
core: glib-2.0: fix requested libmount/mkostemp/selinux not being
linked in
Armin Kuster (1):
glibc: Secruity fix for CVE-2020-6096
Bruce Ashfield (2):
linux-yocto/5.4: update to v5.4.51 linux-yocto-rt/5.4: fix mmdrop stress test issues
Changqing Li (1):
gtk-immodules-cache.bbclass: fix post install scriptlet error
Chen Qi (1):
rpm: fix nativesdk's default var location
Daniel Ammann (1):
image.bbclass: improve wording when image size exceeds the specified
limit
Joshua Watt (2):
classes/cmake: Fix host detection classes/package: Use HOST_OS for runtime dependencies
Kevin Hao (3):
wic/filemap: Drop the unused block_is_unmapped() wic/filemap: Drop the unused get_unmapped_ranges() wic/filemap: Fall back to standard copy when no way to get the block
map
Kurt Kiefer (1):
linux-firmware: add ibt-20 package
Lee Chee Yang (1):
buildhistory: use pid for temporary txt file name
Richard Purdie (1):
oeqa/qemurunner: Add priority/nice information for running processes
Robert Yang (1):
openssl: openssl-bin requires openssl-conf to run
Ross Burton (1):
startup-notification: add time_t type mismatch patch from upstream
Sakib Sajal (1):
busybox: make hwclock compatible with glibc 2.31
meta/classes/buildhistory.bbclass | 11 +- meta/classes/cmake.bbclass | 19 +- meta/classes/gtk-immodules-cache.bbclass | 1 + meta/classes/image.bbclass | 4 +- meta/classes/package.bbclass | 10 +- meta/lib/oeqa/utils/qemurunner.py | 2 +- meta/lib/oeqa/utils/qemutinyrunner.py | 2 +- .../openssl/openssl_1.1.1g.bb | 2 + ...1-hwclock-make-glibc-2.31-compatible.patch | 83 ++++++++ meta/recipes-core/busybox/busybox_1.31.1.bb | 1 + ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++ meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 1 + .../glibc/glibc/CVE-2020-6096.patch | 112 ++++++++++ .../glibc/glibc/CVE-2020-6096_2.patch | 194 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.31.bb | 2 + meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 2 +- .../startup-notification-0.12/time_t.patch | 108 ++++++++++ .../startup-notification_0.12.bb | 1 + .../linux-firmware/linux-firmware_20200619.bb | 4 + .../linux/linux-yocto-rt_5.4.bb | 6 +- .../linux/linux-yocto-tiny_5.4.bb | 8 +- meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 +- scripts/lib/wic/filemap.py | 75 +++---- 23 files changed, 630 insertions(+), 89 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox/0001-hwclock-make-glibc-2.31-compatible.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch create mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-6096.patch create mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-6096_2.patch create mode 100644 meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch
Signature · 1 line
2.17.1
PATCH 1/18 wic/filemap: Drop the unused block_is_unmapped()
From: Kevin Hao <[email protected]>
This method is not used by any code, so drop it.
--- scripts/lib/wic/filemap.py | 17 ----------------- 1 file changed, 17 deletions(-)
scripts/lib/wic/filemap.py +0 -17
@@ -142,15 +142,6 @@ class _FilemapBase(object): raise Error("the method is not implemented") - def block_is_unmapped(self, block): # pylint: disable=W0613,R0201 - """ - This method has has to be implemented by child classes. It returns - 'True' if block number 'block' of the image file is not mapped (hole) - and 'False' otherwise. - """ - - raise Error("the method is not implemented") - def get_mapped_ranges(self, start, count): # pylint: disable=W0613,R0201 """ This method has has to be implemented by child classes. This is a
@@ -265,10 +256,6 @@ class FilemapSeek(_FilemapBase): % (block, result)) return result - def block_is_unmapped(self, block): - """Refer the '_FilemapBase' class for the documentation.""" - return not self.block_is_mapped(block) - def _get_ranges(self, start, count, whence1, whence2): """ This function implements 'get_mapped_ranges()' and
@@ -422,10 +409,6 @@ class FilemapFiemap(_FilemapBase): % (block, result)) return result - def block_is_unmapped(self, block): - """Refer the '_FilemapBase' class for the documentation.""" - return not self.block_is_mapped(block) - def _unpack_fiemap_extent(self, index): """ Unpack a 'struct fiemap_extent' structure object number 'index' from
Signature · 1 line
2.17.1
PATCH 2/18 wic/filemap: Drop the unused get_unmapped_ranges()
In reply to Steve SakomanFrom: Kevin Hao <[email protected]>
This method is not used by any code, so drop it.
--- scripts/lib/wic/filemap.py | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-)
scripts/lib/wic/filemap.py +2 -36
@@ -155,15 +155,6 @@ class _FilemapBase(object): raise Error("the method is not implemented") - def get_unmapped_ranges(self, start, count): # pylint: disable=W0613,R0201 - """ - This method has has to be implemented by child classes. Just like - 'get_mapped_ranges()', but yields unmapped block ranges instead - (holes). - """ - - raise Error("the method is not implemented") - # The 'SEEK_HOLE' and 'SEEK_DATA' options of the file seek system call _SEEK_DATA = 3
@@ -258,9 +249,8 @@ class FilemapSeek(_FilemapBase): def _get_ranges(self, start, count, whence1, whence2): """ - This function implements 'get_mapped_ranges()' and - 'get_unmapped_ranges()' depending on what is passed in the 'whence1' - and 'whence2' arguments. + This function implements 'get_mapped_ranges()' depending + on what is passed in the 'whence1' and 'whence2' arguments. """ assert whence1 != whence2
@@ -290,12 +280,6 @@ class FilemapSeek(_FilemapBase): % (start, count, start + count - 1)) return self._get_ranges(start, count, _SEEK_DATA, _SEEK_HOLE) - def get_unmapped_ranges(self, start, count): - """Refer the '_FilemapBase' class for the documentation.""" - self._log.debug("FilemapSeek: get_unmapped_ranges(%d, %d(%d))" - % (start, count, start + count - 1)) - return self._get_ranges(start, count, _SEEK_HOLE, _SEEK_DATA) - # Below goes the FIEMAP ioctl implementation, which is not very readable # because it deals with the rather complex FIEMAP ioctl. To understand the
@@ -485,24 +469,6 @@ class FilemapFiemap(_FilemapBase): % (first_prev, last_prev)) yield (first_prev, last_prev) - def get_unmapped_ranges(self, start, count): - """Refer the '_FilemapBase' class for the documentation.""" - self._log.debug("FilemapFiemap: get_unmapped_ranges(%d, %d(%d))" - % (start, count, start + count - 1)) - hole_first = start - for first, last in self._do_get_mapped_ranges(start, count): - if first > hole_first: - self._log.debug("FilemapFiemap: yielding range (%d, %d)" - % (hole_first, first - 1)) - yield (hole_first, first - 1) - - hole_first = last + 1 - - if hole_first < start + count: - self._log.debug("FilemapFiemap: yielding range (%d, %d)" - % (hole_first, start + count - 1)) - yield (hole_first, start + count - 1) - def filemap(image, log=None): """ Create and return an instance of a Filemap class - 'FilemapFiemap' or
Signature · 1 line
2.17.1
PATCH 3/18 wic/filemap: Fall back to standard copy when no way to get the block map
In reply to Steve SakomanFrom: Kevin Hao <[email protected]>
For some filesystems, such as aufs which may be used by docker container, don't support either the SEEK_DATA/HOLE or FIEMAP to get the block map. So add a FileNobmap class to fall back to standard copy when there is no way to get the block map.
[Yocto #12988]
--- scripts/lib/wic/filemap.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
scripts/lib/wic/filemap.py +27 -1
@@ -469,6 +469,29 @@ class FilemapFiemap(_FilemapBase): % (first_prev, last_prev)) yield (first_prev, last_prev) +class FilemapNobmap(_FilemapBase): + """ + This class is used when both the 'SEEK_DATA/HOLE' and FIEMAP are not + supported by the filesystem or kernel. + """ + + def __init__(self, image, log=None): + """Refer the '_FilemapBase' class for the documentation.""" + + # Call the base class constructor first + _FilemapBase.__init__(self, image, log) + self._log.debug("FilemapNobmap: initializing") + + def block_is_mapped(self, block): + """Refer the '_FilemapBase' class for the documentation.""" + return True + + def get_mapped_ranges(self, start, count): + """Refer the '_FilemapBase' class for the documentation.""" + self._log.debug("FilemapNobmap: get_mapped_ranges(%d, %d(%d))" + % (start, count, start + count - 1)) + yield (start, start + count -1) + def filemap(image, log=None): """ Create and return an instance of a Filemap class - 'FilemapFiemap' or
@@ -482,7 +505,10 @@ def filemap(image, log=None): try: return FilemapFiemap(image, log) except ErrorNotSupp: - return FilemapSeek(image, log) + try: + return FilemapSeek(image, log) + except ErrorNotSupp: + return FilemapNobmap(image, log) def sparse_copy(src_fname, dst_fname, skip=0, seek=0, length=0, api=None):
Signature · 1 line
2.17.1
PATCH 4/18 rpm: fix nativesdk's default var location
In reply to Steve SakomanFrom: Chen Qi <[email protected]>
For now, the nativesdk-rpm's %_var in /usr/lib/rpm/macros is '/var'. This is causing error when running `rpm -qplv A.rpm'.
error: cannot open Packages index using db5 - Permission denied (13)
error: cannot open Packages database in /var/lib/rpm
The rpm in SDK should be using its own database. So we should remove this configure option, letting the SDK's native sysroot prefix to be there in %_var. In fact, '%_usr' in macros has already got the prefix. After this change, we have in the macros file lines like below.
"""
%_usr /opt/windriver/wrlinux/20.29/sysroots/x86_64-wrlinuxsdk-linux/usr
%_usrsrc %{_usr}/src
%_var /opt/windriver/wrlinux/20.29/sysroots/x86_64-wrlinuxsdk-linux/var"""
--- meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1 -1
@@ -70,7 +70,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls" # Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled. # Also disable plugins by default for native. EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" -EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins" +EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.17.1
PATCH 5/18 linux-firmware: add ibt-20 package
In reply to Steve SakomanFrom: Kurt Kiefer <[email protected]>
Add the firmware packaging for Intel Bluetooth AX200, also known as Intel CyclonePeak (CcP).
--- meta/recipes-kernel/linux-firmware/linux-firmware_20200619.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-kernel/linux-firmware/linux-firmware_20200619.bb +4 -0
@@ -281,6 +281,7 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \ ${PN}-ibt-license ${PN}-ibt \ ${PN}-ibt-11-5 ${PN}-ibt-12-16 ${PN}-ibt-hw-37-7 ${PN}-ibt-hw-37-8 \ ${PN}-ibt-17 \ + ${PN}-ibt-20 \ ${PN}-ibt-misc \ ${PN}-i915-license ${PN}-i915 \ ${PN}-ice-license ${PN}-ice \
@@ -806,6 +807,7 @@ LICENSE_${PN}-ibt-hw-37-8 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-11-5 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-12-16 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-17 = "Firmware-ibt_firmware" +LICENSE_${PN}-ibt-20 = "Firmware-ibt_firmware" LICENSE_${PN}-ibt-misc = "Firmware-ibt_firmware" FILES_${PN}-ibt-license = "${nonarch_base_libdir}/firmware/LICENCE.ibt_firmware"
@@ -814,6 +816,7 @@ FILES_${PN}-ibt-hw-37-8 = "${nonarch_base_libdir}/firmware/intel/ibt-hw-37.8*.bs FILES_${PN}-ibt-11-5 = "${nonarch_base_libdir}/firmware/intel/ibt-11-5.sfi ${nonarch_base_libdir}/firmware/intel/ibt-11-5.ddc" FILES_${PN}-ibt-12-16 = "${nonarch_base_libdir}/firmware/intel/ibt-12-16.sfi ${nonarch_base_libdir}/firmware/intel/ibt-12-16.ddc" FILES_${PN}-ibt-17 = "${nonarch_base_libdir}/firmware/intel/ibt-17-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-17-*.ddc" +FILES_${PN}-ibt-20 = "${nonarch_base_libdir}/firmware/intel/ibt-20-*.sfi ${nonarch_base_libdir}/firmware/intel/ibt-20-*.ddc" FILES_${PN}-ibt-misc = "${nonarch_base_libdir}/firmware/intel/ibt-*" RDEPENDS_${PN}-ibt-hw-37-7 = "${PN}-ibt-license"
@@ -821,6 +824,7 @@ RDEPENDS_${PN}-ibt-hw-37.8 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-11-5 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-12-16 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-17 = "${PN}-ibt-license" +RDEPENDS_${PN}-ibt-20 = "${PN}-ibt-license" RDEPENDS_${PN}-ibt-misc = "${PN}-ibt-license" ALLOW_EMPTY_${PN}-ibt= "1"
Signature · 1 line
2.17.1
PATCH 6/18 openssl: openssl-bin requires openssl-conf to run
In reply to Steve SakomanFrom: Robert Yang <[email protected]>
Fixed:
$ dnf install openssl-bin $ openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes -batch Can't open /usr/lib/ssl-1.1/openssl.cnf for reading, No such file or directory
--- meta/recipes-connectivity/openssl/openssl_1.1.1g.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-connectivity/openssl/openssl_1.1.1g.bb +2 -0
@@ -204,6 +204,8 @@ CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" RRECOMMENDS_libcrypto += "openssl-conf" RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash" +RDEPENDS_${PN}-bin += "openssl-conf" + BBCLASSEXTEND = "native nativesdk" CVE_PRODUCT = "openssl:openssl"
Signature · 1 line
2.17.1
PATCH 7/18 linux-yocto/5.4: update to v5.4.51
In reply to Steve SakomanFrom: Bruce Ashfield <[email protected]>
Updating linux-yocto/5.4 to the latest korg -stable release that comprises the following commits:
1c54d3c15afa Linux 5.4.51
8ba1913cd6ba efi: Make it possible to disable efivar_ssdt entirely 43986c32ee00 dm zoned: assign max_io_len correctly
215e562251bb x86/resctrl: Fix memory bandwidth counter width for AMD d827fe702e07 mm, compaction: make capture control handling safe wrt interrupts 64a94c550c44 mm, compaction: fully assume capture is not NULL in compact_zone_order() 2a9278ac9c55 irqchip/gic: Atomically update affinity
7ba23593cbc5 dma-buf: Move dma_buf_release() from fops to dentry_ops 4ae695a05516 drm/amdgpu/atomfirmware: fix vram_info fetching for renoir 2b8c0876bf71 drm/amdgpu: use %u rather than %d for sclk/mclk
94de85d16b0c drm/amd/display: Only revalidate bandwidth on medium and fast updates 032343ed6927 MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen 2e859b14da39 MIPS: lantiq: xway: sysctrl: fix the GPHY clock alias names 71a20b798da3 cifs: Fix the target file was deleted when rename failed. 49dae9bed7dd SMB3: Honor 'handletimeout' flag for multiuser mounts 7ab27439fec7 SMB3: Honor lease disabling for multiuser mounts
0d5824aea7a0 SMB3: Honor persistent/resilient handle flags for multiuser mounts d56787683c61 SMB3: Honor 'seal' flag for multiuser mounts
e0ed5a36fb3a Revert "ALSA: usb-audio: Improve frames size computation" fe05e114d0fd nfsd: apply umask on fs without ACL support
4ee7f1d2f1c9 spi: spi-fsl-dspi: Fix external abort on interrupt in resume or exit paths 9d60af5c3bb3 i2c: mlxcpld: check correct size of maximum RECV_LEN packet b460fc9d0525 i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665 a632f91f7a9c samples/vfs: avoid warning in statx override
cd62eeb31512 nvme: fix a crash in nvme_mpath_add_disk
c64141c68f72 nvme: fix identify error status silent ignore
7d3f489e61b6 SMB3: Honor 'posix' flag for multiuser mounts
8964c93436ad virtio-blk: free vblk-vqs in error path of virtblk_probe() f795a88eade5 drm: sun4i: hdmi: Remove extra HPD polling
c84138b3c162 nfsd: fix nfsdfs inode reference count leak
2571e1735602 nfsd4: fix nfsdfs reference count loop
31ec38ec9cd5 thermal/drivers/rcar_gen3: Fix undefined temperature if negative a65bde001008 thermal/drivers/mediatek: Fix bank number settings on mt8183 c9426817eac7 hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add() 3e7bd7e10639 hwmon: (max6697) Make sure the OVERT mask is set correctly 0465f54c5cc4 cxgb4: fix SGE queue dump destination buffer context 6bcb00d08361 cxgb4: use correct type for all-mask IP address comparison f68bda772639 cxgb4: fix endian conversions for L4 ports in filters 180fbf10a26d cxgb4: parse TC-U32 key values and masks natively
0dc4dd433b94 cxgb4: use unaligned conversion for fetching timestamp 8a1b8e64204e RDMA/counter: Query a counter before release
53e9b62672f7 rxrpc: Fix afs large storage transmission performance drop 60d7de28e0ca drm/msm/dpu: fix error return code in dpu_encoder_init cc0f67835302 crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() 5d6b46a94dbb tpm: Fix TIS locality timeout problems
563e9491f0a3 selftests: tpm: Use /bin/sh instead of /bin/bash
1f98a9ed5799 kgdb: Avoid suspicious RCU usage warning
e6b2e3b5e16e nvme-multipath: fix bogus request queue reference put 5e9523d7e8cd nvme-multipath: fix deadlock due to head->lock
ad69fbe1d262 nvme-multipath: fix deadlock between ana_work and scan_work c4f007d3dbdd nvme-multipath: set bdi capabilities once
8f4aa3a6de24 s390/debug: avoid kernel warning on too large number of pages 517326aaf41e tools lib traceevent: Handle __attribute__((user)) in field names 6f3b8c269d88 tools lib traceevent: Add append() function helper for appending strings 3dca0a299ff4 usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect 0ff5b1b50d5c rxrpc: Fix race between incoming ACK parser and retransmitter fe688b144c14 mm/slub: fix stack overruns with SLUB_STATS
f459e8fc7c69 mm/slub.c: fix corrupted freechain in deactivate_slab() 542d541c1edd sched/debug: Make sd->flags sysctl read-only
ab9ee18f4646 usbnet: smsc95xx: Fix use-after-free after removal 58ab86e58b55 EDAC/amd64: Read back the scrub rate PCI register on F15h d0e533584a05 mm: fix swap cache node allocation mask
1c4404efcf2c io_uring: make sure async workqueue is canceled on exit
--- .../linux/linux-yocto-rt_5.4.bb | 6 ++--- .../linux/linux-yocto-tiny_5.4.bb | 8 +++---- meta/recipes-kernel/linux/linux-yocto_5.4.bb | 22 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-)
meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb +3 -3
@@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "6415a4e7c405526f97049ede833f52127a5ce7a1" -SRCREV_meta ?= "416566e1f01c3c02ca5b3a03d0943df387d521f0" +SRCREV_machine ?= "a1e1e3cbe42d8a08de5a3e3daaa2b389e352fe77" +SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.4.50" +LINUX_VERSION ?= "5.4.51" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
meta/recipes-kernel/linux/linux-yocto-tiny_5.4.bb +4 -4
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.4.50" +LINUX_VERSION ?= "5.4.51" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine_qemuarm ?= "1a8a14e45f01cfee926c5b35d2d67e6f1a7eebfc" -SRCREV_machine ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_meta ?= "416566e1f01c3c02ca5b3a03d0943df387d521f0" +SRCREV_machine_qemuarm ?= "d4c9ad88abadd22f7b2785e8a101523fe9a74dc0" +SRCREV_machine ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a" PV = "${LINUX_VERSION}+git${SRCPV}"
meta/recipes-kernel/linux/linux-yocto_5.4.bb +11 -11
@@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base" KBRANCH_qemux86-64 ?= "v5.4/standard/base" KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64" -SRCREV_machine_qemuarm ?= "99743105f331e90852ccb9e72ce26134dbcafec6" -SRCREV_machine_qemuarm64 ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_machine_qemumips ?= "886870e5abaeaaf753fb50a1e5be56336c44c642" -SRCREV_machine_qemuppc ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_machine_qemuriscv64 ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_machine_qemux86 ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_machine_qemux86-64 ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_machine_qemumips64 ?= "7548abbb409eeef6f0575eed25231090f902559e" -SRCREV_machine ?= "94667198aabf869571bdff5291a24956796faddf" -SRCREV_meta ?= "416566e1f01c3c02ca5b3a03d0943df387d521f0" +SRCREV_machine_qemuarm ?= "601e67d37274e4a0890bcdbe6660c2dbd08d3b97" +SRCREV_machine_qemuarm64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_machine_qemumips ?= "c8543a84037b88da45d0d825216187b42d0c509a" +SRCREV_machine_qemuppc ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_machine_qemuriscv64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_machine_qemux86 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_machine_qemux86-64 ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_machine_qemumips64 ?= "c741fec6daabb449d08c9f96052be1477fe3c968" +SRCREV_machine ?= "fed60f1c8e56095647fa8497270ecacea4c45dbc" +SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a" # remap qemuarm to qemuarma15 for the 5.4 kernel # KMACHINE_qemuarm ?= "qemuarma15"
@@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "5.4.50" +LINUX_VERSION ?= "5.4.51" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native"
Signature · 1 line
2.17.1
PATCH 8/18 linux-yocto-rt/5.4: fix mmdrop stress test issues
In reply to Steve SakomanFrom: Bruce Ashfield <[email protected]>
Integrating the following commit(s) to linux-yocto/5.4:
508b4e6ada7f sched: Remove unexpected mmdrop on RT
--- meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux/linux-yocto-rt_5.4.bb +1 -1
@@ -11,7 +11,7 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "a1e1e3cbe42d8a08de5a3e3daaa2b389e352fe77" +SRCREV_machine ?= "508b4e6ada7f78b3ef5a9dbdd182d13dffe00123" SRCREV_meta ?= "caafbdfe382bf22a4786d871af097acd49d0867a" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
Signature · 1 line
2.17.1
PATCH 9/18 oeqa/qemurunner: Add priority/nice information for running processes
In reply to Steve SakomanFrom: Richard Purdie <[email protected]>
We're seeing failures due to system load. In theory we've set process nice levels which should compensate for this. Add debugging so we can find out if they're being correctly applied.
--- meta/lib/oeqa/utils/qemurunner.py | 2 +- meta/lib/oeqa/utils/qemutinyrunner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/utils/qemurunner.py +1 -1
@@ -264,7 +264,7 @@ class QemuRunner: % (self.runqemu.poll(), os.path.isfile(self.qemu_pidfile), str(qemu_pid), os.path.exists("/proc/" + str(qemu_pid)))) # Dump all processes to help us to figure out what is going on... - ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0] + ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,pri,ni,command '], stdout=subprocess.PIPE).communicate()[0] processes = ps.decode("utf-8") self.logger.debug("Running processes:\n%s" % processes) self._dump_host()
meta/lib/oeqa/utils/qemutinyrunner.py +1 -1
@@ -138,7 +138,7 @@ class QemuTinyRunner(QemuRunner): # # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd] # - ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0] + ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,pri,ni,command'], stdout=subprocess.PIPE).communicate()[0] processes = ps.decode("utf-8").split('\n') nfields = len(processes[0].split()) - 1 pids = {}
Signature · 1 line
2.17.1
PATCH 10/18 classes/cmake: Fix host detection
In reply to Steve SakomanFrom: Joshua Watt <[email protected]>
Fixes the class to use HOST_OS and HOST_ARCH to set the cmake SYSTEM variables. The HOST variables should be used instead of TARGET_OS/TARGET_ARCH because we want to control how cmake compiles for where the package is going to run (the host), not what it will be generating output for (the target). The distinction is only really relevant when building canadian cross recipes.
Also fix up the host OS detection to account for MinGW by setting CMAKE_SYSTEM_NAME to "Windows". This eliminates the need for meta-mingw to patch this in all the cmake recipes it builds.
--- meta/classes/cmake.bbclass | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
meta/classes/cmake.bbclass +13 -6
@@ -70,15 +70,22 @@ CMAKE_BUILD_PARALLEL_LEVEL_task-install = "${@oe.utils.parallel_make(d, True)}" OECMAKE_TARGET_COMPILE ?= "all" OECMAKE_TARGET_INSTALL ?= "install" +def map_host_os_to_system_name(host_os): + if host_os.startswith('mingw'): + return 'Windows' + if host_os.startswith('linux'): + return 'Linux' + return host_os + # CMake expects target architectures in the format of uname(2), # which do not always match TARGET_ARCH, so all the necessary # conversions should happen here. -def map_target_arch_to_uname_arch(target_arch): - if target_arch == "powerpc": +def map_host_arch_to_uname_arch(host_arch): + if host_arch == "powerpc": return "ppc" - if target_arch == "powerpc64": + if host_arch == "powerpc64": return "ppc64" - return target_arch + return host_arch cmake_do_generate_toolchain_file() { if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
@@ -88,8 +95,8 @@ cmake_do_generate_toolchain_file() { # CMake system name must be something like "Linux". # This is important for cross-compiling. $cmake_crosscompiling -set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) -set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} ) +set( CMAKE_SYSTEM_NAME ${@map_host_os_to_system_name(d.getVar('HOST_OS'))} ) +set( CMAKE_SYSTEM_PROCESSOR ${@map_host_arch_to_uname_arch(d.getVar('HOST_ARCH'))} ) set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} ) set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} )
Signature · 1 line
2.17.1
PATCH 11/18 classes/package: Use HOST_OS for runtime dependencies
In reply to Steve SakomanFrom: Joshua Watt <[email protected]>
The code was using TARGET_OS to try and detect what type of OS the packages would be running on, but this is incorrect. TARGET_OS is the OS for which the package will generate output (e.g. GCC output target or GDB debugging target). The OS where the package will run is the HOST_OS. Note that HOST_OS only differs from TARGET_OS when doing a canadian cross compile, and even then in our case only when doing so for a non-Linux host (e.g. MinGW).
Fix the code to use HOST_OS instead.
--- meta/classes/package.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/classes/package.bbclass +5 -5
@@ -950,7 +950,7 @@ python split_and_strip_files () { dvar = d.getVar('PKGD') pn = d.getVar('PN') - targetos = d.getVar('TARGET_OS') + hostos = d.getVar('HOST_OS') oldcwd = os.getcwd() os.chdir(dvar)
@@ -1105,7 +1105,7 @@ python split_and_strip_files () { if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d)) - if debugsrcdir and not targetos.startswith("mingw"): + if debugsrcdir and not hostos.startswith("mingw"): if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d)) else:
@@ -1667,7 +1667,7 @@ python package_do_shlibs() { else: shlib_pkgs = packages.split() - targetos = d.getVar('TARGET_OS') + hostos = d.getVar('HOST_OS') workdir = d.getVar('WORKDIR')
@@ -1818,9 +1818,9 @@ python package_do_shlibs() { soname = None if cpath.islink(file): continue - if targetos == "darwin" or targetos == "darwin8": + if hostos == "darwin" or hostos == "darwin8": darwin_so(file, needed, sonames, renames, pkgver) - elif targetos.startswith("mingw"): + elif hostos.startswith("mingw"): mingw_dll(file, needed, sonames, renames, pkgver) elif os.access(file, os.X_OK) or lib_re.match(file): linuxlist.append(file)
Signature · 1 line
2.17.1
PATCH 12/18 image.bbclass: improve wording when image size exceeds the specified limit
In reply to Steve SakomanFrom: Daniel Ammann <[email protected]>
--- meta/classes/image.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/image.bbclass +2 -2
@@ -551,14 +551,14 @@ def get_rootfs_size(d): if rootfs_maxsize: rootfs_maxsize_int = int(rootfs_maxsize) if base_size > rootfs_maxsize_int: - bb.fatal("The rootfs size %d(K) overrides IMAGE_ROOTFS_MAXSIZE: %d(K)" % \ + bb.fatal("The rootfs size %d(K) exceeds IMAGE_ROOTFS_MAXSIZE: %d(K)" % \ (base_size, rootfs_maxsize_int)) # Check the initramfs size against INITRAMFS_MAXSIZE (if set) if image_fstypes == initramfs_fstypes != '' and initramfs_maxsize: initramfs_maxsize_int = int(initramfs_maxsize) if base_size > initramfs_maxsize_int: - bb.error("The initramfs size %d(K) overrides INITRAMFS_MAXSIZE: %d(K)" % \ + bb.error("The initramfs size %d(K) exceeds INITRAMFS_MAXSIZE: %d(K)" % \ (base_size, initramfs_maxsize_int)) bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should") bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
Signature · 1 line
2.17.1
PATCH 13/18 startup-notification: add time_t type mismatch patch from upstream
In reply to Steve SakomanFrom: Ross Burton <[email protected]>
Backport a patch to fix issues where sizeof(time_t) != sizeof(long).
--- .../startup-notification-0.12/time_t.patch | 108 ++++++++++++++++++ .../startup-notification_0.12.bb | 1 + 2 files changed, 109 insertions(+) create mode 100644 meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch
meta/recipes-graphics/startup-notification/startup-notification-0.12/time_t.patch new file +108 -0
@@ -0,0 +1,108 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +From a7e49fefde18ea8d5bada8096d32f23bcfb5a6dc Mon Sep 17 00:00:00 2001 +From: "Federico G. Schwindt" <[email protected]> +Date: Mon, 17 Feb 2014 15:48:12 +0100 +Subject: [PATCH 1/3] Fix crash on 32bit architectures where time_t is 64 bit + +This is an ABI change on platforms where sizeof(time_t) doesn't equal +sizeof(long). For most platforms this change shouldn't make a difference +at present. OpenBSD recently switched to 64bit time_t on all architectures +to avoid time_t overflow in 2038 on 32bit machines. + +This fix extends to consumers of startup-notification, for instance +the window manager of XFCE, which is how I got involved in this. +See http://mail.xfce.org/pipermail/xfce4-dev/2014-February/030611.html +and follow-ups. The XFCE devs pointed out that my patch to fix a +crash in XFCE's window manager depends on this startup-notification patch. + +Signed-off-by: Julien Danjou <[email protected]> +--- + libsn/sn-monitor.c | 8 ++++---- + libsn/sn-monitor.h | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/libsn/sn-monitor.c b/libsn/sn-monitor.c +index 2a9ad16..f419bc1 100644 +--- a/libsn/sn-monitor.c ++++ b/libsn/sn-monitor.c +@@ -364,8 +364,8 @@ sn_startup_sequence_get_screen (SnStartupSequence *sequence) + **/ + void + sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec) ++ time_t *tv_sec, ++ suseconds_t *tv_usec) + { + if (tv_sec) + *tv_sec = sequence->initiation_time.tv_sec; +@@ -386,8 +386,8 @@ sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, + **/ + void + sn_startup_sequence_get_last_active_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec) ++ time_t *tv_sec, ++ suseconds_t *tv_usec) + { + /* for now the same as get_initiated_time */ + if (tv_sec) +diff --git a/libsn/sn-monitor.h b/libsn/sn-monitor.h +index b58581f..2f639df 100644 +--- a/libsn/sn-monitor.h ++++ b/libsn/sn-monitor.h +@@ -77,11 +77,11 @@ const char* sn_startup_sequence_get_application_id (SnStartupSequence *se + int sn_startup_sequence_get_screen (SnStartupSequence *sequence); + + void sn_startup_sequence_get_initiated_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec); ++ time_t *tv_sec, ++ suseconds_t *tv_usec); + void sn_startup_sequence_get_last_active_time (SnStartupSequence *sequence, +- long *tv_sec, +- long *tv_usec); ++ time_t *tv_sec, ++ suseconds_t *tv_usec); + + void sn_startup_sequence_complete (SnStartupSequence *sequence); + +-- +2.26.2 + +From ea9f7e4cc6fd8c08d175ed7774ed2c5bd11c8ef0 Mon Sep 17 00:00:00 2001 +From: Colin Walters <[email protected]> +Date: Mon, 17 Feb 2014 14:37:09 -0500 +Subject: [PATCH 2/3] Add include of <sys/select.h> for previous patch + +Unfortunately while the standard says that <sys/types.h> is the +correct header to get suseconds_t, at least with glibc, that requires +-DXOPEN_SOURCE. Which is problematic for a public header, because +then all *users* of startup-notification will be required to define +that. + +Poking around a bit, it looks like at least with glibc, <sys/select.h> +will give us an unconditional define. + +Signed-off-by: Julien Danjou <[email protected]> +--- + libsn/sn-monitor.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsn/sn-monitor.h b/libsn/sn-monitor.h +index 2f639df..cea4e12 100644 +--- a/libsn/sn-monitor.h ++++ b/libsn/sn-monitor.h +@@ -28,6 +28,7 @@ + #define __SN_MONITOR_H__ + + #include <libsn/sn-common.h> ++#include <sys/select.h> + + SN_BEGIN_DECLS + +-- +2.26.2 +
meta/recipes-graphics/startup-notification/startup-notification_0.12.bb +1 -0
@@ -23,6 +23,7 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "http://www.freedesktop.org/software/startup-notification/releases/${BPN}-${PV}.tar.gz \ file://obsolete_automake_macros.patch \ + file://time_t.patch \ " SRC_URI[md5sum] = "2cd77326d4dcaed9a5a23a1232fb38e9"
Signature · 1 line
2.17.1
PATCH 14/18 core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
In reply to Steve SakomanFrom: Ahmad Fatoum <[email protected]>
Since 010202076760 ("meson.bbclass: avoid unexpected operating-system names"), meson is no longer used with a cross file that appends the used libc to the operating system name, e.g. linux-gnueabi.
Prior to that commit, the host_system == 'linux' checks in glib's meson failed, which led to glib being compiled without libmount, mkostemp and selinux even if explicitly requested.
As the aforementioned commit affects all recipes built by glib, it might not be a candidate for backporting to current stable branches. To fix just the glib issue, instances of host_system == 'linux' are patched locally.
The patch is marked as Upstream-Status: Inappropriate as it is rendered unnecessary for OE releases newer than Dunfell.
--- ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch
meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch new file +49 -0
@@ -0,0 +1,49 @@ +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001 +From: Ahmad Fatoum <[email protected]> +Date: Thu, 9 Jul 2020 13:00:16 +0200 +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system + +OE build system can set this to other values that include 'linux', +e.g. 'linux-gnueabi'. This led to glib always being built without +libmount, mkostemp and selinux support. + +Upstream-Status: Inappropriate [other] +Signed-off-by: Ahmad Fatoum <[email protected]> +--- + meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 3a47a7cc4b98..af09dfc853e5 100644 +--- a/meson.build ++++ b/meson.build +@@ -632,7 +632,7 @@ else + endif + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use) + +-if host_system == 'linux' ++if host_system.contains('linux') + if cc.has_function('mkostemp', + prefix: '''#define _GNU_SOURCE + #include <stdlib.h>''') +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale')) + # libmount is only used by gio, but we need to fetch the libs to generate the + # pkg-config file below + libmount_dep = [] +-if host_system == 'linux' and get_option('libmount') ++if host_system.contains('linux') and get_option('libmount') + libmount_dep = [dependency('mount', version : '>=2.23', required : true)] + glib_conf.set('HAVE_LIBMOUNT', 1) + endif +@@ -1867,7 +1867,7 @@ if host_system == 'windows' + endif + + selinux_dep = [] +-if host_system == 'linux' ++if host_system.contains('linux') + selinux_dep = dependency('libselinux', required: get_option('selinux')) + + glib_conf.set('HAVE_SELINUX', selinux_dep.found()) +-- +2.27.0 +
meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \ file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \ file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \ + file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \ " SRC_URI_append_class-native = " file://relocate-modules.patch"
Signature · 1 line
2.17.1
PATCH 15/18 busybox: make hwclock compatible with glibc 2.31
In reply to Steve SakomanFrom: Sakib Sajal <[email protected]>
settimeofday(2) has been deprecated as of glibc 2.31 which hwclock makes use of. This patch makes hwclock compatible with glibc v2.31
See patch for more details:
busybox/0001-hwclock-make-glibc-2.31-compatible.patch
Fixes [YOCTO #13981]
--- ...1-hwclock-make-glibc-2.31-compatible.patch | 83 +++++++++++++++++++ meta/recipes-core/busybox/busybox_1.31.1.bb | 1 + 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/0001-hwclock-make-glibc-2.31-compatible.patch
meta/recipes-core/busybox/busybox/0001-hwclock-make-glibc-2.31-compatible.patch new file +83 -0
@@ -0,0 +1,83 @@ +From 19a6baf0b79346deb383bbd2b5b825d59add7d5d Mon Sep 17 00:00:00 2001 +From: Sakib Sajal <[email protected]> +Date: Fri, 17 Jul 2020 17:27:21 +0000 +Subject: [PATCH] hwclock: make glibc 2.31 compatible + +NEWS for glibc version 2.31 +=========================== + +Deprecated and removed features, and other changes affecting compatibility: + +* The settimeofday function can still be used to set a system-wide + time zone when the operating system supports it. This is because + the Linux kernel reused the API, on some architectures, to describe + a system-wide time-zone-like offset between the software clock + maintained by the kernel, and the "RTC" clock that keeps time when + the system is shut down. + + However, to reduce the odds of this offset being set by accident, + settimeofday can no longer be used to set the time and the offset + simultaneously. If both of its two arguments are non-null, the call + will fail (setting errno to EINVAL). + + Callers attempting to set this offset should also be prepared for + the call to fail and set errno to ENOSYS; this already happens on + the Hurd and on some Linux architectures. The Linux kernel + maintainers are discussing a more principled replacement for the + reused API. After a replacement becomes available, we will change + settimeofday to fail with ENOSYS on all platforms when its 'tzp' + argument is not a null pointer. + + settimeofday itself is obsolescent according to POSIX. Programs + that set the system time should use clock_settime and/or the adjtime + family of functions instead. We may cease to make settimeofday + available to newly linked binaries after there is a replacement for + Linux's time-zone-like offset API. + +hwclock had two calls to settimeofday, in functions to_sys_clock and +set_system_clock_timezone, where both the arguments to settimeofday +were valid (non-null). +Therefore, split the call, once for timezone and once for timeval. + +Fixes #12756 + +Upstream-Status: Pending + +Signed-off-by: Sakib Sajal <[email protected]> +--- + util-linux/hwclock.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c +index 29f5102..088ab3b 100644 +--- a/util-linux/hwclock.c ++++ b/util-linux/hwclock.c +@@ -131,8 +131,10 @@ static void to_sys_clock(const char **pp_rtcname, int utc) + + tv.tv_sec = read_rtc(pp_rtcname, NULL, utc); + tv.tv_usec = 0; +- if (settimeofday(&tv, &tz)) +- bb_perror_msg_and_die("settimeofday"); ++ if (settimeofday(NULL, &tz)) ++ bb_perror_msg_and_die("settimeofday: timezone"); ++ if (settimeofday(&tv, NULL)) ++ bb_perror_msg_and_die("settimeofday: timeval"); + } + + static void from_sys_clock(const char **pp_rtcname, int utc) +@@ -283,8 +285,10 @@ static void set_system_clock_timezone(int utc) + gettimeofday(&tv, NULL); + if (!utc) + tv.tv_sec += tz.tz_minuteswest * 60; +- if (settimeofday(&tv, &tz)) +- bb_perror_msg_and_die("settimeofday"); ++ if (settimeofday(NULL, &tz)) ++ bb_perror_msg_and_die("settimeofday: timezone"); ++ if (settimeofday(&tv, NULL)) ++ bb_perror_msg_and_die("settimeofday: timeval"); + } + + //usage:#define hwclock_trivial_usage +-- +2.27.0 +
meta/recipes-core/busybox/busybox_1.31.1.bb +1 -0
@@ -49,6 +49,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-Remove-stime-function-calls.patch \ file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ file://busybox-CVE-2018-1000500.patch \ + file://0001-hwclock-make-glibc-2.31-compatible.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg "
Signature · 1 line
2.17.1
PATCH 16/18 gtk-immodules-cache.bbclass: fix post install scriptlet error
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
package libgtk-3.0 don't install dir /usr/lib/gtk-3.0/3.0.0/ by default. when install package gtk-immodule-xim, it is possible met below error:
/var/tmp/rpm-tmp.tlfoeo: line 17: /usr/lib/gtk-3.0/3.0.0/immodules.cache: No such file or directory
warning: %post(gtk-immodule-xim-2.24.32-r0.0.cortexa72) scriptlet failed, exit status 1
fix by create the dir when try to write to /usr/lib/gtk-3.0/3.0.0/immodules.cache
--- meta/classes/gtk-immodules-cache.bbclass | 1 + 1 file changed, 1 insertion(+)
meta/classes/gtk-immodules-cache.bbclass +1 -0
@@ -22,6 +22,7 @@ else gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache fi if [ ! -z `which gtk-query-immodules-3.0` ]; then + mkdir -p ${libdir}/gtk-3.0/3.0.0 gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache fi fi
Signature · 1 line
2.17.1
PATCH 17/18 buildhistory: use pid for temporary txt file name
In reply to Steve SakomanFrom: Lee Chee Yang <[email protected]>
buildhistory create .txt file bh_installed_pkgs.txt and bh_installed_pkgs_deps.txt while listing down installed package. These file is later removed in buildhistory_get_installed().
when multiple process runs in parellal there are chances to race for the file where one process created the file while another task remove the file right after it.
using different file name for each process should avoid the race. So add PID to the file name to make it unique.
[yocto #13709]
--- meta/classes/buildhistory.bbclass | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
meta/classes/buildhistory.bbclass +6 -5
@@ -426,8 +426,8 @@ def buildhistory_list_installed(d, rootfs_type="image"): from oe.sdk import sdk_list_installed_packages from oe.utils import format_pkg_list - process_list = [('file', 'bh_installed_pkgs.txt'),\ - ('deps', 'bh_installed_pkgs_deps.txt')] + process_list = [('file', 'bh_installed_pkgs_%s.txt' % os.getpid()),\ + ('deps', 'bh_installed_pkgs_deps_%s.txt' % os.getpid())] if rootfs_type == "image": pkgs = image_list_installed_packages(d)
@@ -457,9 +457,10 @@ buildhistory_get_installed() { # Get list of installed packages pkgcache="$1/installed-packages.tmp" - cat ${WORKDIR}/bh_installed_pkgs.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs.txt + cat ${WORKDIR}/bh_installed_pkgs_${PID}.txt | sort > $pkgcache && rm ${WORKDIR}/bh_installed_pkgs_${PID}.txt cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt + if [ -s $pkgcache ] ; then cat $pkgcache | awk '{ print $2 }' | xargs -n1 basename > $1/installed-packages.txt else
@@ -468,8 +469,8 @@ buildhistory_get_installed() { # Produce dependency graph # First, quote each name to handle characters that cause issues for dot - sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps.txt > $1/depends.tmp && - rm ${WORKDIR}/bh_installed_pkgs_deps.txt + sed 's:\([^| ]*\):"\1":g' ${WORKDIR}/bh_installed_pkgs_deps_${PID}.txt > $1/depends.tmp && + rm ${WORKDIR}/bh_installed_pkgs_deps_${PID}.txt # Remove lines with rpmlib(...) and config(...) dependencies, change the # delimiter from pipe to "->", set the style for recommend lines and # turn versioned dependencies into edge labels.
Signature · 1 line
2.17.1
PATCH 18/18 glibc: Secruity fix for CVE-2020-6096
In reply to Steve SakomanFrom: Armin Kuster <[email protected]>
Source: glibc.org
MR: 104799
Type: Security Fix
Disposition: Backport from beea361050728138b82c57dda0c4810402d342b9
ChangeID: 29df826fb697fdd2742c3bace33388bda962c5f1 Description:
--- .../glibc/glibc/CVE-2020-6096.patch | 112 ++++++++++ .../glibc/glibc/CVE-2020-6096_2.patch | 194 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.31.bb | 2 + 3 files changed, 308 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-6096.patch create mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-6096_2.patch
meta/recipes-core/glibc/glibc/CVE-2020-6096.patch new file +112 -0
@@ -0,0 +1,112 @@ +From beea361050728138b82c57dda0c4810402d342b9 Mon Sep 17 00:00:00 2001 +From: Alexander Anisimov <[email protected]> +Date: Wed, 8 Jul 2020 14:18:31 +0200 +Subject: [PATCH] arm: CVE-2020-6096: Fix multiarch memcpy for negative length + [BZ #25620] + +Unsigned branch instructions could be used for r2 to fix the wrong +behavior when a negative length is passed to memcpy. +This commit fixes the armv7 version. + +Upstream-Status: Backport +CVE: CVE-2020-6096 patch #1 +Signed-off-by: Armin Kuster <[email protected]> + +--- + sysdeps/arm/armv7/multiarch/memcpy_impl.S | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/sysdeps/arm/armv7/multiarch/memcpy_impl.S b/sysdeps/arm/armv7/multiarch/memcpy_impl.S +index bf4ac7077f..379bb56fc9 100644 +--- a/sysdeps/arm/armv7/multiarch/memcpy_impl.S ++++ b/sysdeps/arm/armv7/multiarch/memcpy_impl.S +@@ -268,7 +268,7 @@ ENTRY(memcpy) + + mov dst, dstin /* Preserve dstin, we need to return it. */ + cmp count, #64 +- bge .Lcpy_not_short ++ bhs .Lcpy_not_short + /* Deal with small copies quickly by dropping straight into the + exit block. */ + +@@ -351,10 +351,10 @@ ENTRY(memcpy) + + 1: + subs tmp2, count, #64 /* Use tmp2 for count. */ +- blt .Ltail63aligned ++ blo .Ltail63aligned + + cmp tmp2, #512 +- bge .Lcpy_body_long ++ bhs .Lcpy_body_long + + .Lcpy_body_medium: /* Count in tmp2. */ + #ifdef USE_VFP +@@ -378,7 +378,7 @@ ENTRY(memcpy) + add src, src, #64 + vstr d1, [dst, #56] + add dst, dst, #64 +- bge 1b ++ bhs 1b + tst tmp2, #0x3f + beq .Ldone + +@@ -412,7 +412,7 @@ ENTRY(memcpy) + ldrd A_l, A_h, [src, #64]! + strd A_l, A_h, [dst, #64]! + subs tmp2, tmp2, #64 +- bge 1b ++ bhs 1b + tst tmp2, #0x3f + bne 1f + ldr tmp2,[sp], #FRAME_SIZE +@@ -482,7 +482,7 @@ ENTRY(memcpy) + add src, src, #32 + + subs tmp2, tmp2, #prefetch_lines * 64 * 2 +- blt 2f ++ blo 2f + 1: + cpy_line_vfp d3, 0 + cpy_line_vfp d4, 64 +@@ -494,7 +494,7 @@ ENTRY(memcpy) + add dst, dst, #2 * 64 + add src, src, #2 * 64 + subs tmp2, tmp2, #prefetch_lines * 64 +- bge 1b ++ bhs 1b + + 2: + cpy_tail_vfp d3, 0 +@@ -615,8 +615,8 @@ ENTRY(memcpy) + 1: + pld [src, #(3 * 64)] + subs count, count, #64 +- ldrmi tmp2, [sp], #FRAME_SIZE +- bmi .Ltail63unaligned ++ ldrlo tmp2, [sp], #FRAME_SIZE ++ blo .Ltail63unaligned + pld [src, #(4 * 64)] + + #ifdef USE_NEON +@@ -633,7 +633,7 @@ ENTRY(memcpy) + neon_load_multi d0-d3, src + neon_load_multi d4-d7, src + subs count, count, #64 +- bmi 2f ++ blo 2f + 1: + pld [src, #(4 * 64)] + neon_store_multi d0-d3, dst +@@ -641,7 +641,7 @@ ENTRY(memcpy) + neon_store_multi d4-d7, dst + neon_load_multi d4-d7, src + subs count, count, #64 +- bpl 1b ++ bhs 1b + 2: + neon_store_multi d0-d3, dst + neon_store_multi d4-d7, dst +-- +2.17.1 +
meta/recipes-core/glibc/glibc/CVE-2020-6096_2.patch new file +194 -0
194 lines not on this page · raw message
meta/recipes-core/glibc/glibc_2.31.bb +2 -0
@@ -42,6 +42,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \ file://0028-inject-file-assembly-directives.patch \ file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ + file://CVE-2020-6096.patch \ + file://CVE-2020-6096_2.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.17.1
Re: [OE-core][dunfell 14/18] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
In reply to Steve SakomanQuoted 7 lines · Steve Sakoman
From: Ahmad Fatoum <[email protected]>
Since 010202076760 ("meson.bbclass: avoid unexpected operating-system names"), meson is no longer used with a cross file that appends the used libc to the operating system name, e.g. linux-gnueabi.
Quoted 6 lines
Prior to that commit, the
host_system== 'linux' checks in glib's meson failed, which led to glib being compiled without libmount, mkostemp and selinux even if explicitly requested.As the aforementioned commit affects all recipes built by glib, it might not be a candidate for backporting to current stable branches.
If I am not mistaken, the patch
"meson.bbclass: avoid unexpected operating-system names" made it into dunfell so this patch does not change anything (it should do no harm either)
Andreas
Quoted 85 lines
To fix just the glib issue, instances of
host_system== 'linux' are patched locally.The patch is marked as Upstream-Status: Inappropriate as it is rendered unnecessary for OE releases newer than Dunfell.
Signed-off-by Ahmad Fatoum <[email protected]>Signed-off-by Steve Sakoman <[email protected]>--- ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patchmeta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch new file +49
-0@@ -0,0 +1,49 @@ +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001 +From: Ahmad Fatoum <[email protected]> +Date: Thu, 9 Jul 2020 13:00:16 +0200 +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system + +OE build system can set this to other values that include 'linux', +e.g. 'linux-gnueabi'. This led to glib always being built without +libmount, mkostemp and selinux support. + +Upstream-Status: Inappropriate [other] +Signed-off-by: Ahmad Fatoum <[email protected]> +--- + meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 3a47a7cc4b98..af09dfc853e5 100644 +--- a/meson.build ++++ b/meson.build +@@ -632,7 +632,7 @@ else + endif + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use) + +-if host_system == 'linux' ++if host_system.contains('linux') + if cc.has_function('mkostemp', + prefix: '''#define _GNU_SOURCE + #include <stdlib.h>''') +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale')) + # libmount is only used by gio, but we need to fetch the libs to generate the + # pkg-config file below + libmount_dep = [] +-if host_system == 'linux' and get_option('libmount') ++if host_system.contains('linux') and get_option('libmount') + libmount_dep = [dependency('mount', version : '>=2.23', required : true)] + glib_conf.set('HAVE_LIBMOUNT', 1) + endif +@@ -1867,7 +1867,7 @@ if host_system == 'windows' + endif + + selinux_dep = [] +-if host_system == 'linux' ++if host_system.contains('linux') + selinux_dep = dependency('libselinux', required: get_option('selinux')) + + glib_conf.set('HAVE_SELINUX', selinux_dep.found()) +-- +2.27.0 +meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb +1
-1@@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \ file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \ file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \ + file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \ " SRC_URI_append_class-native = " file://relocate-modules.patch" --2.17.1
Re: [OE-core][dunfell 14/18] core: glib-2.0: fix requested libmount/mkostemp/selinux not being linked in
Quoted 4 lines · Andreas Müller
If I am not mistaken, the patch
"meson.bbclass: avoid unexpected operating-system names" made it into dunfell so this patch does not change anything (it should do no harm either)
You are correct! I didn't parse the commit message properly when I took this patch.
I'll drop this patch from the final pull request.
Thanks for reviewing it, I really appreciate your help!
Steve
Quoted 86 lines
Andreas
Quoted 85 lines
To fix just the glib issue, instances of
host_system== 'linux' are patched locally.The patch is marked as Upstream-Status: Inappropriate as it is rendered unnecessary for OE releases newer than Dunfell.
Signed-off-by Ahmad Fatoum <[email protected]>Signed-off-by Steve Sakoman <[email protected]>--- ...ot-hardcode-linux-as-the-host-system.patch | 49 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patchmeta/recipes-core/glib-2.0/glib-2.0/0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch new file +49
-0@@ -0,0 +1,49 @@ +From a300a09661124451d4783d4be66e3993262dc9be Mon Sep 17 00:00:00 2001 +From: Ahmad Fatoum <[email protected]> +Date: Thu, 9 Jul 2020 13:00:16 +0200 +Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system + +OE build system can set this to other values that include 'linux', +e.g. 'linux-gnueabi'. This led to glib always being built without +libmount, mkostemp and selinux support. + +Upstream-Status: Inappropriate [other] +Signed-off-by: Ahmad Fatoum <[email protected]> +--- + meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 3a47a7cc4b98..af09dfc853e5 100644 +--- a/meson.build ++++ b/meson.build +@@ -632,7 +632,7 @@ else + endif + message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use) + +-if host_system == 'linux' ++if host_system.contains('linux') + if cc.has_function('mkostemp', + prefix: '''#define _GNU_SOURCE + #include <stdlib.h>''') +@@ -1857,7 +1857,7 @@ glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale')) + # libmount is only used by gio, but we need to fetch the libs to generate the + # pkg-config file below + libmount_dep = [] +-if host_system == 'linux' and get_option('libmount') ++if host_system.contains('linux') and get_option('libmount') + libmount_dep = [dependency('mount', version : '>=2.23', required : true)] + glib_conf.set('HAVE_LIBMOUNT', 1) + endif +@@ -1867,7 +1867,7 @@ if host_system == 'windows' + endif + + selinux_dep = [] +-if host_system == 'linux' ++if host_system.contains('linux') + selinux_dep = dependency('libselinux', required: get_option('selinux')) + + glib_conf.set('HAVE_SELINUX', selinux_dep.found()) +-- +2.27.0 +meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb +1
-1@@ -19,6 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0011-GMainContext-Fix-GSource-iterator-if-iteration-can-m.patch \ file://0012-GMainContext-Fix-memory-leaks-and-memory-corruption-.patch \ file://0013-GMainContext-Move-mutex-unlocking-in-destructor-righ.patch \ + file://0020-meson.build-do-not-hardcode-linux-as-the-host-system.patch \ " SRC_URI_append_class-native = " file://relocate-modules.patch" --2.17.1