diff options
author | William A. Kennington III <wak@google.com> | 2021-06-02 22:28:27 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2021-06-07 18:15:22 +0300 |
commit | ac69b488c6ecf0e6df8321218006f23211c45e46 (patch) | |
tree | 899942e99c3be5138dd4784f939f0e8b717f90b9 /poky/meta/recipes-core | |
parent | ee32beb0333105ea120420a3556a752079ef5437 (diff) | |
download | openbmc-ac69b488c6ecf0e6df8321218006f23211c45e46.tar.xz |
poky: subtree update:2dcd1f2a21..9d1b332292
Alejandro Hernandez Samaniego (2):
baremetal-helloworld: Enable RISC-V 64 port
baremetal-image: Fix post process command rootfs_update_timestamp
Alexander Kanavin (94):
python3: add markdown/smartypants/typogrify modules
gi-docgen: add a recipe and class
gdk-pixbuf/pango: replace gtk-doc with gi-docgen
vala: upgrade 0.50.4 -> 0.52.2
xkbcomp: upgrade 1.4.4 -> 1.4.5
stress-ng: upgrade 0.12.05 -> 0.12.06
xserver-xorg: upgrade 1.20.10 -> 1.20.11
xorgproto: upgrade 2020.1 -> 2021.3
dpkg: update 1.20.7.1 -> 1.20.9
puzzles: update to latest revision
cmake: update 3.19.5 -> 3.20.1
meson: update 0.57.1 -> 0.57.2
systemd: backport a patch to avoid unnecessary rsync dependency with latest meson
pulseaudio: unbreak build with latest meson
libdnf: upgrade 0.58.0 -> 0.62.0
bluez5: upgrade 5.56 -> 5.58
libxkbcommon: update 1.0.3 -> 1.2.1
libgudev: update 234 -> 236
vulkan-samples: update to latest revision
gnupg: upgrade 2.2.27 -> 2.3.1
virglrenderer: update 0.8.2 -> 0.9.1
webkitgtk: update 2.30.6 -> 2.32.0
acl: upgrade 2.2.53 -> 2.3.1
bind: upgrade 9.16.12 -> 9.16.13
bison: upgrade 3.7.5 -> 3.7.6
createrepo-c: upgrade 0.17.0 -> 0.17.2
cronie: upgrade 1.5.5 -> 1.5.7
dnf: upgrade 4.6.0 -> 4.7.0
e2fsprogs: upgrade 1.46.1 -> 1.46.2
gnu-efi: upgrade 3.0.12 -> 3.0.13
systemd-boot: backport a fix to address failures with new gnu-efi
gobject-introspection: upgrade 1.66.1 -> 1.68.0
gtk+3: upgrade 3.24.25 -> 3.24.28
harfbuzz: upgrade 2.7.4 -> 2.8.0
less: upgrade 563 -> 581
libfm: upgrade 1.3.1 -> 1.3.2
libinput: upgrade 1.16.4 -> 1.17.1
libwpe: upgrade 1.8.0 -> 1.10.0
libxres: upgrade 1.2.0 -> 1.2.1
linux-firmware: upgrade 20210208 -> 20210315
pango: upgrade 1.48.2 -> 1.48.4
piglit: upgrade to latest revision
pkgconf: upgrade 1.7.3 -> 1.7.4
python3-hypothesis: upgrade 6.2.0 -> 6.9.1
python3-importlib-metadata: upgrade 3.4.0 -> 3.10.1
python3-pytest: upgrade 6.2.2 -> 6.2.3
python3-setuptools-scm: upgrade 5.0.1 -> 6.0.1
x264: upgrade to latest revision
ptest: add a test for orphaned ptests, and restore ones found by it
swig: fix upstream version check
liberation-fonts: fix upstream version check
Revert "go: Use dl.google.com for SRC_URI"
powertop: update 2.13 -> 2.14
mesa: add lmsensors PACKAGECONFIG
ffmpeg: update 4.3.2 -> 4.4
qemu: use 4 cores in qemu guests
avahi: disable gtk bits
gdk-pixbuf: rewrite the cross-build support for tests
gnome: drop upstream even condition from a few recipes
expat: upgrade 2.2.10 -> 2.3.0
meson.bbclass: split python routines into a separate class
gstreamer1.0-plugins-base: backport a patch to fix meson 0.58 builds
meson: update 0.57.2 -> 0.58.0
qemu: backport a patch to fix meson 0.58 builds
nativesdk-meson: correctly set cpu_family
bitbake: fetch2/wget: when checking latest versions, consider all numerical directories
mklibs: remove recipes and class
local.conf: Drop support for mklibs
u-boot: upgrade 2021.01 -> 2021.04
gdk-pixbuf: update a patch status
systemd: update 247.6 -> 248.3
systemd-conf: do not version in lockstep with systemd
gnu-config: update to latest revision
mmc-utils: update to latest revision
python3-smartypants: fix upstream version check
at: upgrade 3.2.1 -> 3.2.2
gnomebase: trim the SRC_URI directory from the back
gsettings-desktop-schemas: upgrade 3.38.0 -> 40.0
igt-gpu-tools: upgrade 1.25 -> 1.26
mesa: update 21.0.3 -> 21.1.1
vulkan-samples: update to latest revision
libgpg-error: update 1.41 -> 1.42
webkitgtk: update 2.32.0 -> 2.32.1
glib-2.0: update 2.68.1 -> 2.68.2
apt: upgrade 2.2.2 -> 2.2.3
cmake: update 3.20.1 -> 3.20.2
libdnf: update 0.62.0 -> 0.63.0
harfbuzz: update 2.8.0 -> 2.8.1
curl: update 7.76.0 -> 7.76.1
systemtap: update 4.4 -> 4.5
wayland: package target binaries into -tools, not into -dev
ptest: add newly discovered missing runtime dependencies across recipes
images: remove sato/weston ptest images
images: add ptest images based on core-image-minimal
Andreas Müller (1):
gstreamer1.0-plugins-good: fix build with gcc11
Andrej Valek (1):
expat: upgrade 2.3.0 -> 2.4.1
Anuj Mittal (1):
lsb-release: fix reproducibility failure
Armin Kuster (5):
bitbake: hashserv/server.py: drop unused imports
bitbake: hashserver/client.py: drop unused imports
poky.yaml: fedora33: add missing pkgs
systemctl: Stop tracebacks use formated error messages
package_manager/rpm: decode systemctl failures
Bastian Krause (1):
ccache: version bump 4.2.1 -> 4.3
Bruce Ashfield (18):
linux-yocto/5.4: qemuppc32: reduce serial shutdown issues
kern-tools: Kconfiglib: add support for bare 'modules' keyword
lttng-modules: update devupstream to v2.13-rc
lttng-modules: update to v2.12.6
kernel-yocto: provide debug / summary information for metadata
linux-yocto/5.10: update to v5.10.35
linux-yocto/5.4: update to v5.4.117
linux-yocto/5.10: ktypes/standard: disable obsolete crypto options by default
linux-yocto/5.10: update to v5.10.36
linux-yocto/5.4: update to v5.4.118
linux-yocto/5.10: update to v5.10.37
linux-yocto/5.4: update to v5.4.119
kernel-devsrc: adjust NM and OBJTOOL variables for target
linux-yocto/5.10: update to v5.10.38
linux-yocto-dev: bump to v5.13+
linux-yocto/5.4: update to v5.4.120
linux-yocto/5.10: update to v5.10.41
linux-yocto/5.4: update to v5.4.123
Carlos Rafael Giani (1):
ffmpeg: Add libopus packageconfig
Changqing Li (2):
unfs3: correct configure option
pkgconfig: update SRC_URI
Chen Qi (3):
db: update CVE_PRODUCT
rt-tests: update SRCREV
xxhash: backport patch to fix special char problem
Daniel McGregor (3):
lib/oe/gpg_sign.py: Fix gpg verification
sstate: Ignore sstate signing key
bison: Make libtextstyle and libreadline optional
Daniel Wagenknecht (1):
kernel-dev: document KCONFIG_MODE
Douglas Royds (3):
Revert "icecc: Don't use icecc when INHIBIT_DEFAULT_DEPS is set"
icecc: Demote "could not get ICECC_CC" warning to note
icecc-create-env: Silence warning: invalid ICECC_ENV_EXEC
Drew Moseley (1):
manuals: fix a few incorrect option specifications.
Guillaume Champagne (1):
image-live.bbclass: order do_bootimg after do_rootfs
Joshua Watt (1):
zstd: Add patch to fix MinGW builds
Kai Kang (1):
grub2.inc: remove '-O2' from CFLAGS
Khem Raj (17):
swig: Upgrade to 4.0.2
python3-markdown: Upgrade to 3.3.4
ffmpeg: Fix build on mips
npth: Check for pthread_create for including lpthread
gcc: Add target gcc include search for musl config too
gcc: Extend .gccrelocprefix section support to musl configs
gcc: Refresh patch to fix patch fuzz
musl: Fix __NR_fstatat syscall name for riscv
libxfixes: Update to 6.0.0 release
xorgproto: Upgrade to 2021.4 release
glibc: Update to latest 2.33 branch
systemd: Fix 248.3 on musl
glibc: Enable memory tagging for aarch64
gcc: Update to latest on release/gcc-11 branch
apt: Add missing <array> header
ovmf: Fix VLA warnings with GCC 11
libucontext: Switch to meson build system
Martin Jansa (4):
gcc-sanitizers: Package up static hwasan files as well
webkitgtk: fix build without opengl in DISTRO_FEATURES
binutils: backport DWARF-5 support for gold
sstatesig.py: make it fatal error when sstate manifest isn't found
Michael Halstead (3):
releases: update to include 3.2.4
uninative: Upgrade to 3.2 (gcc11 support)
releases: update to include 3.3.1
Michael Opdenacker (8):
manuals: reduce verbosity with "worry about" expression
manuals: reduce verbosity related to "the following" expression
ref-manual: simplify style
kernel-dev manual: simplify style
dev-manual: simplify style
sdk-manual: simplify style and fix formating
overview-manual: simplify style and add missings references
manuals: simplify style
Mike Crowe (2):
npm.bbclass: Allow nodedir to be overridden by NPM_NODEDIR
libnotify: Make gtk+3 dependency optional
Ming Liu (4):
kernel-fitimage.bbclass: fix a wrong conditional check
initramfs-framework:rootfs: fix wrong indentions
kernel-fitimage.bbclass: drop unit addresses from bootscr sections
uboot-sign/kernel-fitimage: split generate_rsa_keys task
Nikolay Papenkov (1):
flex: correct license information
Nisha Parrakat (1):
squashfs-tools: package squashfs-fs.h
Peter Kjellerstedt (3):
libcap: Configure Make variables correctly without a horrible hack
util-linux.inc: Do not modify BPN
native.bbclass: Do not remove "-native" in the middle of recipe names
Petr Vorel (1):
ltp: Update to 20210524
Richard Purdie (92):
oeqa/qemurunner: Fix binary vs str issue
oeqa/qemurunner: Improve handling of run_serial for shutdown commands
ptest-packagelists: Add expat-ptest to fast ptests
puzzles: Upstream changed to main branch for development
grub2: Add CVE whitelist entries for issues fixed in 2.06
glibc: Document and whitelist CVE-2019-1010022-25
qemu: Exclude CVE-2017-5957 from cve-check
qemu: Exclude CVE-2007-0998 from cve-check
qemu: Exclude CVE-2018-18438 from cve-check
jquery: Exclude CVE-2007-2379 from cve-check
logrotate: Exclude CVE-2011-1548,1549,1550 from cve-check
openssh: Exclude CVE-2007-2768 from cve-check
ovmf: Improve reproducibility by enabling prefix mapping
bind: Exclude CVE-2019-6470 from cve-check
openssh: Exclude CVE-2008-3844 from cve-check
unzip: Exclude CVE-2008-0888 from cve-check
cpio: Exclude CVE-2010-4226 from cve-check
xinetd: Exclude CVE-2013-4342 from cve-check
ghostscript: Exclude CVE-2013-6629 from cve-check
bluez: Exclude CVE-2020-12352 CVE-2020-24490 from cve-check
tiff: Exclude CVE-2015-7313 from cve-check
ovmf: Disable lto to aid reproducibility
ovmf: Fix other reproducibility issues
rpm: Exclude CVE-2021-20271 from cve-check
coreutils: Exclude CVE-2016-2781 from cve-check
librsvg: Exclude CVE-2018-1000041 from cve-check
avahi: Exclude CVE-2021-26720 from cve-check
qemu: Set SMP to 4 cpus for arm/x86 only
qemuboot-x86: Switch to IvyBridge and q35 instead of pc
qemu-x86: Add commandline options to improve boot
sstate: Handle manifest 'corruption' issue
lttng-ust: Upgrade 2.12.1 -> 2.12.2
qemu: Upgrade 5.2.0 -> 6.0.0
python3-markupsafe: Upgrade 1.1.1 -> 2.0.0
python3-jinja2: Upgrade 2.11.3 -> 3.0.0
ofono: upgrade 1.31 -> 1.32
libnss-mdns: upgrade 0.14.1 -> 0.15
python3-git: upgrade 3.1.14 -> 3.1.17
bind: upgrade 9.16.13 -> 9.16.15
vala: upgrade 0.52.2 -> 0.52.3
libjpeg-turbo: upgrade 2.0.6 -> 2.1.0
btrfs-tools: upgrade 5.12 -> 5.12.1
python3-hypothesis: upgrade 6.9.1 -> 6.12.0
python3-numpy: upgrade 1.20.2 -> 1.20.3
gtk+3: upgrade 3.24.28 -> 3.24.29
sudo: upgrade 1.9.6p1 -> 1.9.7
stress-ng: upgrade 0.12.06 -> 0.12.08
less: upgrade 581 -> 586
libtirpc: upgrade 1.3.1 -> 1.3.2
libinput: upgrade 1.17.1 -> 1.17.2
zstd: upgrade 1.4.9 -> 1.5.0
hdparm: upgrade 9.61 -> 9.62
libxkbcommon: upgrade 1.2.1 -> 1.3.0
spirv-tools: upgrade 2020.7 -> 2021.1
diffoscope: upgrade 172 -> 175
mpg123: upgrade 1.26.5 -> 1.27.2
sqlite3: upgrade 3.35.3 -> 3.35.5
wayland-protocols: upgrade 1.20 -> 1.21
shaderc: upgrade 2020.5 -> 2021.0
wpebackend-fdo: upgrade 1.8.3 -> 1.8.4
libxcrypt-compat: upgrade 4.4.19 -> 4.4.20
Revert "cml1.bbclass: Return sorted list of cfg files"
bitbake: server/process: Handle error in heartbeat funciton in OOM case
glibc: Add 8GB VM usage cap for usermode test suite
cve-extra-exclusions.inc: add exclusion list for intractable CVE's
rpm: Drop CVE exclusion as database fixed to handle
cve-extra-exclusions: Fix typos
grub: Exclude CVE-2019-14865 from cve-check
cve-extra-exclusions.inc: Clean up merged CPE updates
ltp: Disable problematic tests causing autobuilder hangs
python3-setuptools: upgrade 56.0.0 -> 56.2.0
distro/maintainers: Fix up the ptest image entries
oeqa/runtime/rpm: Drop log message counting test component
linux-firmware: upgrade 20210315 -> 20210511
libxcrypt: Upgrade 4.4.20 -> 4.4.22
iproute2: upgrade 5.11.0 -> 5.12.0
libx11: upgrade 1.7.0 -> 1.7.1
python3-hypothesis: upgrade 6.12.0 -> 6.13.7
pango: upgrade 1.48.4 -> 1.48.5
python3-importlib-metadata: upgrade 4.0.1 -> 4.3.0
libmodulemd: upgrade 2.12.0 -> 2.12.1
vte: upgrade 0.64.0 -> 0.64.1
libinput: upgrade 1.17.2 -> 1.17.3
gi-docgen: upgrade 2021.5 -> 2021.6
kmod: upgrade 28 -> 29
xorgproto: upgrade 2021.4 -> 2021.4.99.1
libpcre2: upgrade 10.36 -> 10.37
libepoxy: upgrade 1.5.5 -> 1.5.8
python3-jinja2: upgrade 3.0.0 -> 3.0.1
curl: upgrade 7.76.1 -> 7.77.0
python3-setuptools: upgrade 56.2.0 -> 57.0.0
oeqa/qemurunner: Improve timeout handling
Richard Weinberger (1):
Add support for erofs filesystems
Robert Joslyn (3):
liberation-fonts: Update to 2.1.4
epiphany: Update to 40.1
btrfs-tools: Update to 5.12
Robert P. J. Day (8):
sdk-manual: couple minor fixes in using.rst
sdk-manual: various cleanups to intro.rst
ref-manual: delete references to dead LSB compliance
ref-manual: delete extraneous back quote
image.bbclass: fix comment "pacackages" -> "packages"
meta/lib/oe/rootfs.py: Fix typo "Restoreing" -> "Restoring"
bitbake.conf: alphabetize contents of ASSUME_PROVIDED
ref-manual: add links to some variables in glossary
Romain Naour (1):
dejagnu: needs expect at runtime
Ross Burton (12):
cairo: backport patch for CVE-2020-35492
libnotify: whitelist CVE-2013-7381 (specific to the NodeJS bindings)
builder: whitelist CVE-2008-4178 (a different builder)
libarchive: disable redundant libxml2 PACKAGECONFIG
meson: update patch status
cups: whitelist CVE-2021-25317
libsolv: add missing db dependency
rpm: turn Berkeley DB hard dependency into PACKAGECONFIG
python3: update status on upstreamed patch
ref-manual: Ubuntu 20.04 is also LTS
package_rpm: pass XZ_THREADS to rpm
gcc: revert libstc++-gdb.py installation changes
Samuli Piippo (3):
gcc-cross-canadian: add symlinks for ld.bfd and ld.gold
libarchive: enable zstd support
cmake-native: enabled zstd support
Stefan Ghinea (1):
boost: fix do_fetch failure
Steve Sakoman (1):
expat: set CVE_PRODUCT
Tony Tascioglu (3):
libxml2: Reformat runtest.patch
libxml2: Add bash dependency for ptests.
libxml2: Update to 2.9.12
Trevor Gamblin (2):
python3: upgrade 3.9.4 -> 3.9.5
bind: upgrade 9.16.15 -> 9.16.16
Ulrich Ölmann (1):
local.conf.sample: fix typo
Vinícius Ossanes Aquino (1):
lttng-modules: backport patches to fix build against 5.12+ kernel
Yann Dirson (1):
linux-firmware: include all relevant files in -bcm4356
hongxu (1):
gdk-pixbuf: fix nativesdk do_configure failed
wangmy (21):
python3-pygments: upgrade 2.8.1 -> 2.9.0
at-spi2-core: upgrade 2.40.0 -> 2.40.1
ell: upgrade 0.39 -> 0.40
kexec-tools: upgrade 2.0.21 -> 2.0.22
go: upgrade 1.16.3 -> 1.16.4
python3-attrs: upgrade 20.3.0 -> 21.2.0
python3-six: upgrade 1.15.0 -> 1.16.0
vulkan-samples: update to latest revision
vulkan-headers: upgrade 1.2.170.0 -> 1.2.176.0
vulkan-tools: upgrade 1.2.170.0 -> 1.2.176.0
vulkan-loader: upgrade 1.2.170.0 -> 1.2.176.0
distcc: upgrade 3.3.5 -> 3.4
libdrm: upgrade 2.4.105 -> 2.4.106
libidn2: upgrade 2.3.0 -> 2.3.1
libtasn1: upgrade 4.16.0 -> 4.17.0
python3-libarchive-c: upgrade 2.9 -> 3.0
python3-markupsafe: upgrade 2.0.0 -> 2.0.1
python3-more-itertools: upgrade 8.7.0 -> 8.8.0
python3-pytest: upgrade 6.2.3 -> 6.2.4
logrotate: upgrade 3.18.0 -> 3.18.1
stress-ng: upgrade 0.12.08 -> 0.12.09
zhengruoqin (10):
busybox: upgrade 1.33.0 -> 1.33.1
rng-tools: upgrade 6.11 -> 6.12
rpcbind: upgrade 1.2.5 -> 1.2.6
sysklogd: upgrade 2.2.2 -> 2.2.3
python3-importlib-metadata: upgrade 3.10.1 -> 4.0.1
python3-sortedcontainers: upgrade 2.3.0 -> 2.4.0
rxvt-unicode: upgrade 9.22 -> 9.26
libedit: upgrade 20210419-3.1 -> 20210522-3.1
libtest-needs-perl: upgrade 0.002006 -> 0.002009
libucontext: upgrade 0.10 -> 1.1
Change-Id: I5e5148036ac2a7918974733e5751c3392139b17e
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'poky/meta/recipes-core')
76 files changed, 976 insertions, 1641 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox/0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch b/poky/meta/recipes-core/busybox/busybox/0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch deleted file mode 100644 index 67c9f189cc..0000000000 --- a/poky/meta/recipes-core/busybox/busybox/0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch +++ /dev/null @@ -1,58 +0,0 @@ -From fe791386ebc270219ca00406c9fdadc5130b64ee Mon Sep 17 00:00:00 2001 -From: Samuel Sapalski <samuel.sapalski@nokia.com> -Date: Wed, 3 Mar 2021 16:31:22 +0100 -Subject: [PATCH] decompress_gunzip: Fix DoS if gzip is corrupt - -On certain corrupt gzip files, huft_build will set the error bit on -the result pointer. If afterwards abort_unzip is called huft_free -might run into a segmentation fault or an invalid pointer to -free(p). - -In order to mitigate this, we check in huft_free if the error bit -is set and clear it before the linked list is freed. - -Signed-off-by: Samuel Sapalski <samuel.sapalski@nokia.com> -Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com> -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> - -Upstream-Status: Backport -CVE: CVE-2021-28831 -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - archival/libarchive/decompress_gunzip.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c -index eb3b64930..e93cd5005 100644 ---- a/archival/libarchive/decompress_gunzip.c -+++ b/archival/libarchive/decompress_gunzip.c -@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = { - * each table. - * t: table to free - */ -+#define BAD_HUFT(p) ((uintptr_t)(p) & 1) -+#define ERR_RET ((huft_t*)(uintptr_t)1) - static void huft_free(huft_t *p) - { - huft_t *q; - -+ /* -+ * If 'p' has the error bit set we have to clear it, otherwise we might run -+ * into a segmentation fault or an invalid pointer to free(p) -+ */ -+ if (BAD_HUFT(p)) { -+ p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET)); -+ } -+ - /* Go through linked list, freeing from the malloced (t[-1]) address. */ - while (p) { - q = (--p)->v.t; -@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PARAM unsigned bitbuffer, unsigned *current - * or a valid pointer to a Huffman table, ORed with 0x1 if incompete table - * is given: "fixed inflate" decoder feeds us such data. - */ --#define BAD_HUFT(p) ((uintptr_t)(p) & 1) --#define ERR_RET ((huft_t*)(uintptr_t)1) - static huft_t* huft_build(const unsigned *b, const unsigned n, - const unsigned s, const struct cp_ext *cp_ext, - unsigned *m) diff --git a/poky/meta/recipes-core/busybox/busybox_1.33.0.bb b/poky/meta/recipes-core/busybox/busybox_1.33.1.bb index c334c42000..a71ff530cb 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.33.0.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.33.1.bb @@ -47,9 +47,8 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-sysctl-ignore-EIO-of-stable_secret-below-proc-sys-ne.patch \ file://rev.cfg \ file://pgrep.cfg \ - file://0001-decompress_gunzip-Fix-DoS-if-gzip-is-corrupt.patch \ file://0001-gen_build_files-Use-C-locale-when-calling-sed-on-glo.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg " -SRC_URI[tarball.sha256sum] = "d568681c91a85edc6710770cebc1e80e042ad74d305b5c2e6d57a5f3de3b8fbd" +SRC_URI[tarball.sha256sum] = "12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28" diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb index c1962ccb90..f3fe31fd3b 100644 --- a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb +++ b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb @@ -26,6 +26,10 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ SRC_URI[md5sum] = "022042695b7d5bcf1a93559a9735e668" SRC_URI[sha256sum] = "4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa" +# http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 +# runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue. +CVE_CHECK_WHITELIST += "CVE-2016-2781" + EXTRA_OECONF_class-native = "--without-gmp" EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch,hostname" diff --git a/poky/meta/recipes-core/ell/ell_0.39.bb b/poky/meta/recipes-core/ell/ell_0.40.bb index 68ec4cb4a4..d088676221 100644 --- a/poky/meta/recipes-core/ell/ell_0.39.bb +++ b/poky/meta/recipes-core/ell/ell_0.40.bb @@ -17,7 +17,7 @@ inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \ file://0001-pem.c-do-not-use-rawmemchr.patch \ " -SRC_URI[sha256sum] = "653e2e139e23ed31e03c56c05f15321a9e818e2dca00a315c18d2c7b72f15d08" +SRC_URI[sha256sum] = "b9bf5c14f2963591ea1372049c05646919a9ed46fcee5cd11ede1022c99ffbbd" do_configure_prepend () { mkdir -p ${S}/build-aux diff --git a/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch b/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch deleted file mode 100644 index c5c18ead74..0000000000 --- a/poky/meta/recipes-core/expat/expat/0001-Add-output-of-tests-result.patch +++ /dev/null @@ -1,83 +0,0 @@ -From aa84835a00bfd65e784d58411e76f60658e939dc Mon Sep 17 00:00:00 2001 -From: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com> -Date: Tue, 18 Feb 2020 19:04:55 +0200 -Subject: [PATCH] Add output of tests result - -Added console output of testing results in form 'RESULT: TEST_NAME'. - -Changed verbose mode of test application set by '-v' ('--verbose') -argument to CK_NORMAL. -Added new supported argument '-vv' ('--extra-verbose') that changes -verbose mode of test application to CK_VERBOSE. Results of each test -are shown in output only if this mode is set. - -Upstream-Status: Denied - -This patch changes potentially deprecated feature that shoud be changed -in upstream. [https://github.com/libexpat/libexpat/issues/382] - -Signed-off-by: Oleksandr Popovych <oleksandr.s.popovych@globallogic.com> ---- - tests/minicheck.c | 10 +++++++++- - tests/runtests.c | 4 +++- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/expat/tests/minicheck.c b/expat/tests/minicheck.c -index a5a1efb..94fa412 100644 ---- a/tests/minicheck.c -+++ b/tests/minicheck.c -@@ -164,6 +164,8 @@ srunner_run_all(SRunner *runner, int verbosity) { - if (tc->setup != NULL) { - /* setup */ - if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("SKIP: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } -@@ -171,6 +173,8 @@ srunner_run_all(SRunner *runner, int verbosity) { - } - /* test */ - if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("FAIL: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } -@@ -178,12 +182,16 @@ srunner_run_all(SRunner *runner, int verbosity) { - - /* teardown */ - if (tc->teardown != NULL) { -- if (setjmp(env)) { -+ if (setjmp(env)) { -+ if (verbosity >= CK_VERBOSE) -+ printf("PASS: %s\n", _check_current_function); - add_failure(runner, verbosity); - continue; - } - tc->teardown(); - } -+ if (verbosity >= CK_VERBOSE) -+ printf("PASS: %s\n", _check_current_function); - } - tc = tc->next_tcase; - } -diff --git a/tests/runtests.c b/expat/tests/runtests.c -index 7791fe0..75724e5 100644 ---- a/tests/runtests.c -+++ b/tests/runtests.c -@@ -11619,9 +11619,11 @@ main(int argc, char *argv[]) { - for (i = 1; i < argc; ++i) { - char *opt = argv[i]; - if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0) -- verbosity = CK_VERBOSE; -+ verbosity = CK_NORMAL; - else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0) - verbosity = CK_SILENT; -+ else if (strcmp(opt, "-vv") == 0 || strcmp(opt, "--extra-verbose") == 0) -+ verbosity = CK_VERBOSE; - else { - fprintf(stderr, "runtests: unknown option '%s'\n", opt); - return 2; --- -2.17.1 diff --git a/poky/meta/recipes-core/expat/expat/run-ptest b/poky/meta/recipes-core/expat/expat/run-ptest index 1b39cec8e5..59d8ab57e3 100644 --- a/poky/meta/recipes-core/expat/expat/run-ptest +++ b/poky/meta/recipes-core/expat/expat/run-ptest @@ -18,6 +18,6 @@ TIME=$(which time) echo "Architecture: $(uname -m)" > ${output} echo "Image: $(uname -sr)" >> ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -vv" |& tee -a ${output} -${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -vv" |& tee -a ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtests -v" |& tee -a ${output} +${TIME} -f 'Execution time: %e s' bash -c "testCheck runtestspp -v" |& tee -a ${output} echo diff --git a/poky/meta/recipes-core/expat/expat_2.2.10.bb b/poky/meta/recipes-core/expat/expat_2.4.1.bb index fa263775b3..451158a5d3 100644 --- a/poky/meta/recipes-core/expat/expat_2.2.10.bb +++ b/poky/meta/recipes-core/expat/expat_2.4.1.bb @@ -8,11 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9" SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \ file://libtool-tag.patch \ - file://run-ptest \ - file://0001-Add-output-of-tests-result.patch \ - " + file://run-ptest \ + " -SRC_URI[sha256sum] = "b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5" +SRC_URI[sha256sum] = "2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40" EXTRA_OECMAKE_class-native += "-DEXPAT_BUILD_DOCS=OFF" @@ -25,3 +24,5 @@ do_install_ptest_class-target() { } BBCLASSEXTEND += "native nativesdk" + +CVE_PRODUCT = "expat libexpat" diff --git a/poky/meta/recipes-core/gettext/gettext_0.21.bb b/poky/meta/recipes-core/gettext/gettext_0.21.bb index bc14867bbb..b86e8d8381 100644 --- a/poky/meta/recipes-core/gettext/gettext_0.21.bb +++ b/poky/meta/recipes-core/gettext/gettext_0.21.bb @@ -174,7 +174,7 @@ do_install_ptest() { fi } -RDEPENDS_${PN}-ptest += "make" +RDEPENDS_${PN}-ptest += "make xz" RDEPENDS_${PN}-ptest_append_libc-glibc = "\ glibc-gconv-big5 \ glibc-charmap-big5 \ diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch index 7cf89c8718..7fbc07af58 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch @@ -1,4 +1,4 @@ -From ff790dd7086e28896f8e7630135f756cc6f06c80 Mon Sep 17 00:00:00 2001 +From b7abbba886d3743616f8cc0e8b441c879128bbda Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Fri, 11 Mar 2016 15:35:55 +0000 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds @@ -19,7 +19,7 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index ca1daf2..954a250 100644 +index a2909a8..1f4ab82 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -51,6 +51,8 @@ @@ -31,7 +31,7 @@ index ca1daf2..954a250 100644 #endif #include <glib/gstdio.h> -@@ -1212,7 +1214,15 @@ get_gio_module_dir (void) +@@ -1213,7 +1215,15 @@ get_gio_module_dir (void) NULL); g_free (install_dir); #else diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.1.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.2.bb index accc2cada2..0cf16884ef 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.1.bb +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.68.2.bb @@ -20,7 +20,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ " SRC_URI_append_class-native = " file://relocate-modules.patch" -SRC_URI[sha256sum] = "241654b96bd36b88aaa12814efc4843b578e55d47440103727959ac346944333" +SRC_URI[sha256sum] = "ecc7798a9cc034eabdfd7f246e6dd461cdbf1175fcc2e9867cc7da7b7309e0fb" # Find any meson cross files in FILESPATH that are relevant for the current # build (using siteinfo) and add them to EXTRA_OEMESON. diff --git a/poky/meta/recipes-core/glibc/glibc-version.inc b/poky/meta/recipes-core/glibc/glibc-version.inc index 3a95173175..376ead66ac 100644 --- a/poky/meta/recipes-core/glibc/glibc-version.inc +++ b/poky/meta/recipes-core/glibc/glibc-version.inc @@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.33/master" PV = "2.33" -SRCREV_glibc ?= "9826b03b747b841f5fc6de2054bf1ef3f5c4bdf3" +SRCREV_glibc ?= "3f5080aedd164c1f92a53552dd3e0b82ac6d2bd3" SRCREV_localedef ?= "bd644c9e6f3e20c5504da1488448173c69c56c28" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git" diff --git a/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch b/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch deleted file mode 100644 index 39fde5b785..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c4ad832276f4dadfa40904109b26a521468f66bc Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Thu, 4 Feb 2021 15:00:20 +0100 -Subject: [PATCH] nptl: Remove private futex optimization [BZ #27304] - -It is effectively used, unexcept for pthread_cond_destroy, where we do -not want it; see bug 27304. The internal locks do not support a -process-shared mode. - -This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: -Move pthread_cond_destroy implementation into libc"). - -Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> - -Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27304] -Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> ---- - sysdeps/nptl/lowlevellock-futex.h | 14 +------------- - 1 file changed, 1 insertion(+), 13 deletions(-) - -diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h -index ecb729da6b..ca96397a4a 100644 ---- a/sysdeps/nptl/lowlevellock-futex.h -+++ b/sysdeps/nptl/lowlevellock-futex.h -@@ -50,20 +50,8 @@ - #define LLL_SHARED FUTEX_PRIVATE_FLAG - - #ifndef __ASSEMBLER__ -- --# if IS_IN (libc) || IS_IN (rtld) --/* In libc.so or ld.so all futexes are private. */ --# define __lll_private_flag(fl, private) \ -- ({ \ -- /* Prevent warnings in callers of this macro. */ \ -- int __lll_private_flag_priv __attribute__ ((unused)); \ -- __lll_private_flag_priv = (private); \ -- ((fl) | FUTEX_PRIVATE_FLAG); \ -- }) --# else --# define __lll_private_flag(fl, private) \ -+# define __lll_private_flag(fl, private) \ - (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) --# endif - - # define lll_futex_syscall(nargs, futexp, op, ...) \ - ({ \ --- -2.27.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch b/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch deleted file mode 100644 index 3cb60b2e55..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch +++ /dev/null @@ -1,116 +0,0 @@ -From b1971f6f1331d738d1d6b376b4741668a7546125 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Tue, 2 Feb 2021 13:45:58 -0800 -Subject: [PATCH] x86: Require full ISA support for x86-64 level marker [BZ #27318] - -Since -march=sandybridge enables ISAs in x86-64 ISA level v3, the v3 -marker is set on libc.so. We couldn't set the needed ISA marker to v2 -since this libc won't run on all v2 machines. Technically, the v3 marker -is correct. But the resulting libc.so won't run on Sandy Brigde, which -is a v2 machine, even when libc is compiled with -march=sandybridge: - -$ ./elf/ld.so ./libc.so -./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3 - -Instead, we require full ISA support for x86-64 level marker and disable -x86-64 level marker for -march=sandybridge which enables ISAs between v2 -and v3. - -Upstream-Status: Submitted [https://sourceware.org/pipermail/libc-alpha/2021-February/122297.html] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - - sysdeps/x86/configure | 7 ++++++- - sysdeps/x86/configure.ac | 2 +- - sysdeps/x86/isa-level.c | 21 ++++++++++++++++++++- - 3 files changed, 27 insertions(+), 3 deletions(-) - -diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure -index 5e32dc62b3..5b20646843 100644 ---- a/sysdeps/x86/configure -+++ b/sysdeps/x86/configure -@@ -133,7 +133,12 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest c - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` -- if test "$count" = 1; then -+ if test "$count" = 1 && { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then - libc_cv_include_x86_isa_level=yes - fi - fi -diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac -index f94088f377..54ecd33d2c 100644 ---- a/sysdeps/x86/configure.ac -+++ b/sysdeps/x86/configure.ac -@@ -100,7 +100,7 @@ EOF - libc_cv_include_x86_isa_level=no - if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S); then - count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` -- if test "$count" = 1; then -+ if test "$count" = 1 && AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -DINCLUDE_X86_ISA_LEVEL -S -o conftest.s $srcdir/sysdeps/x86/isa-level.c); then - libc_cv_include_x86_isa_level=yes - fi - fi -diff --git a/sysdeps/x86/isa-level.c b/sysdeps/x86/isa-level.c -index aaf524cb56..7f83449061 100644 ---- a/sysdeps/x86/isa-level.c -+++ b/sysdeps/x86/isa-level.c -@@ -25,12 +25,17 @@ - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - --#include <elf.h> -+#ifdef _LIBC -+# include <elf.h> -+#endif - - /* ELF program property for x86 ISA level. */ - #ifdef INCLUDE_X86_ISA_LEVEL - # if defined __x86_64__ || defined __FXSR__ || !defined _SOFT_FLOAT \ - || defined __MMX__ || defined __SSE__ || defined __SSE2__ -+# if !defined __SSE__ || !defined __SSE2__ -+# error "Missing ISAs for x86-64 ISA level baseline" -+# endif - # define ISA_BASELINE GNU_PROPERTY_X86_ISA_1_BASELINE - # else - # define ISA_BASELINE 0 -@@ -40,6 +45,11 @@ - || (defined __x86_64__ && defined __LAHF_SAHF__) \ - || defined __POPCNT__ || defined __SSE3__ \ - || defined __SSSE3__ || defined __SSE4_1__ || defined __SSE4_2__ -+# if !defined __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 \ -+ || !defined __POPCNT__ || !defined __SSE3__ \ -+ || !defined __SSSE3__ || !defined __SSE4_1__ || !defined __SSE4_2__ -+# error "Missing ISAs for x86-64 ISA level v2" -+# endif - # define ISA_V2 GNU_PROPERTY_X86_ISA_1_V2 - # else - # define ISA_V2 0 -@@ -48,6 +58,10 @@ - # if defined __AVX__ || defined __AVX2__ || defined __F16C__ \ - || defined __FMA__ || defined __LZCNT__ || defined __MOVBE__ \ - || defined __XSAVE__ -+# if !defined __AVX__ || !defined __AVX2__ || !defined __F16C__ \ -+ || !defined __FMA__ || !defined __LZCNT__ -+# error "Missing ISAs for x86-64 ISA level v3" -+# endif - # define ISA_V3 GNU_PROPERTY_X86_ISA_1_V3 - # else - # define ISA_V3 0 -@@ -55,6 +69,11 @@ - - # if defined __AVX512F__ || defined __AVX512BW__ || defined __AVX512CD__ \ - || defined __AVX512DQ__ || defined __AVX512VL__ -+# if !defined __AVX512F__ || !defined __AVX512BW__ \ -+ || !defined __AVX512CD__ || !defined __AVX512DQ__ \ -+ || !defined __AVX512VL__ -+# error "Missing ISAs for x86-64 ISA level v4" -+# endif - # define ISA_V4 GNU_PROPERTY_X86_ISA_1_V4 - # else - # define ISA_V4 0 diff --git a/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch b/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch deleted file mode 100644 index e904b28a05..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 044e603b698093cf48f6e6229e0b66acf05227e4 Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Fri, 19 Feb 2021 13:29:00 +0100 -Subject: [PATCH] string: Work around GCC PR 98512 in rawmemchr - -Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=044e603b698093cf48f6e6229e0b66acf05227e4] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - string/rawmemchr.c | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/string/rawmemchr.c b/string/rawmemchr.c -index 59bbeeaa42..b8523118e5 100644 ---- a/string/rawmemchr.c -+++ b/string/rawmemchr.c -@@ -22,24 +22,28 @@ - # define RAWMEMCHR __rawmemchr - #endif - --/* Find the first occurrence of C in S. */ --void * --RAWMEMCHR (const void *s, int c) --{ -- DIAG_PUSH_NEEDS_COMMENT; -+/* The pragmata should be nested inside RAWMEMCHR below, but that -+ triggers GCC PR 98512. */ -+DIAG_PUSH_NEEDS_COMMENT; - #if __GNUC_PREREQ (7, 0) -- /* GCC 8 warns about the size passed to memchr being larger than -- PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ -- DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); -+/* GCC 8 warns about the size passed to memchr being larger than -+ PTRDIFF_MAX; the use of SIZE_MAX is deliberate here. */ -+DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-overflow="); - #endif - #if __GNUC_PREREQ (11, 0) -- /* Likewise GCC 11, with a different warning option. */ -- DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); -+/* Likewise GCC 11, with a different warning option. */ -+DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread"); - #endif -+ -+/* Find the first occurrence of C in S. */ -+void * -+RAWMEMCHR (const void *s, int c) -+{ - if (c != '\0') - return memchr (s, c, (size_t)-1); -- DIAG_POP_NEEDS_COMMENT; - return (char *)s + strlen (s); - } - libc_hidden_def (__rawmemchr) - weak_alias (__rawmemchr, rawmemchr) -+ -+DIAG_POP_NEEDS_COMMENT; --- -2.30.1 - diff --git a/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch b/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch deleted file mode 100644 index 3a004e227f..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 750b00a1ddae220403fd892a6fd4e0791ffd154a Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Fri, 18 Sep 2020 07:55:14 -0700 -Subject: [PATCH] x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444] - - x86: Move x86 processor cache info to cpu_features - -missed _SC_LEVEL1_ICACHE_LINESIZE. - -1. Add level1_icache_linesize to struct cpu_features. -2. Initialize level1_icache_linesize by calling handle_intel, -handle_zhaoxin and handle_amd with _SC_LEVEL1_ICACHE_LINESIZE. -3. Return level1_icache_linesize for _SC_LEVEL1_ICACHE_LINESIZE. - -Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27444] -Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> ---- - sysdeps/x86/Makefile | 8 +++ - sysdeps/x86/cacheinfo.c | 3 + - sysdeps/x86/dl-cacheinfo.h | 6 ++ - sysdeps/x86/include/cpu-features.h | 2 + - .../x86/tst-sysconf-cache-linesize-static.c | 1 + - sysdeps/x86/tst-sysconf-cache-linesize.c | 57 +++++++++++++++++++ - 6 files changed, 77 insertions(+) - create mode 100644 sysdeps/x86/tst-sysconf-cache-linesize-static.c - create mode 100644 sysdeps/x86/tst-sysconf-cache-linesize.c - -diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile -index dd82674342..d231263051 100644 ---- a/sysdeps/x86/Makefile -+++ b/sysdeps/x86/Makefile -@@ -208,3 +208,11 @@ $(objpfx)check-cet.out: $(..)sysdeps/x86/check-cet.awk \ - generated += check-cet.out - endif - endif -+ -+ifeq ($(subdir),posix) -+tests += \ -+ tst-sysconf-cache-linesize \ -+ tst-sysconf-cache-linesize-static -+tests-static += \ -+ tst-sysconf-cache-linesize-static -+endif -diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c -index 7b8df45e3b..5ea4723ca6 100644 ---- a/sysdeps/x86/cacheinfo.c -+++ b/sysdeps/x86/cacheinfo.c -@@ -32,6 +32,9 @@ __cache_sysconf (int name) - case _SC_LEVEL1_ICACHE_SIZE: - return cpu_features->level1_icache_size; - -+ case _SC_LEVEL1_ICACHE_LINESIZE: -+ return cpu_features->level1_icache_linesize; -+ - case _SC_LEVEL1_DCACHE_SIZE: - return cpu_features->level1_dcache_size; - -diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h -index a31fa0783a..7cd00b92f1 100644 ---- a/sysdeps/x86/dl-cacheinfo.h -+++ b/sysdeps/x86/dl-cacheinfo.h -@@ -707,6 +707,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - long int core; - unsigned int threads = 0; - unsigned long int level1_icache_size = -1; -+ unsigned long int level1_icache_linesize = -1; - unsigned long int level1_dcache_size = -1; - unsigned long int level1_dcache_assoc = -1; - unsigned long int level1_dcache_linesize = -1; -@@ -726,6 +727,8 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - - level1_icache_size - = handle_intel (_SC_LEVEL1_ICACHE_SIZE, cpu_features); -+ level1_icache_linesize -+ = handle_intel (_SC_LEVEL1_ICACHE_LINESIZE, cpu_features); - level1_dcache_size = data; - level1_dcache_assoc - = handle_intel (_SC_LEVEL1_DCACHE_ASSOC, cpu_features); -@@ -753,6 +756,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - shared = handle_zhaoxin (_SC_LEVEL3_CACHE_SIZE); - - level1_icache_size = handle_zhaoxin (_SC_LEVEL1_ICACHE_SIZE); -+ level1_icache_linesize = handle_zhaoxin (_SC_LEVEL1_ICACHE_LINESIZE); - level1_dcache_size = data; - level1_dcache_assoc = handle_zhaoxin (_SC_LEVEL1_DCACHE_ASSOC); - level1_dcache_linesize = handle_zhaoxin (_SC_LEVEL1_DCACHE_LINESIZE); -@@ -772,6 +776,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - shared = handle_amd (_SC_LEVEL3_CACHE_SIZE); - - level1_icache_size = handle_amd (_SC_LEVEL1_ICACHE_SIZE); -+ level1_icache_linesize = handle_amd (_SC_LEVEL1_ICACHE_LINESIZE); - level1_dcache_size = data; - level1_dcache_assoc = handle_amd (_SC_LEVEL1_DCACHE_ASSOC); - level1_dcache_linesize = handle_amd (_SC_LEVEL1_DCACHE_LINESIZE); -@@ -833,6 +838,7 @@ dl_init_cacheinfo (struct cpu_features *cpu_features) - } - - cpu_features->level1_icache_size = level1_icache_size; -+ cpu_features->level1_icache_linesize = level1_icache_linesize; - cpu_features->level1_dcache_size = level1_dcache_size; - cpu_features->level1_dcache_assoc = level1_dcache_assoc; - cpu_features->level1_dcache_linesize = level1_dcache_linesize; -diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h -index 624736b40e..39a3f4f311 100644 ---- a/sysdeps/x86/include/cpu-features.h -+++ b/sysdeps/x86/include/cpu-features.h -@@ -874,6 +874,8 @@ struct cpu_features - unsigned long int rep_stosb_threshold; - /* _SC_LEVEL1_ICACHE_SIZE. */ - unsigned long int level1_icache_size; -+ /* _SC_LEVEL1_ICACHE_LINESIZE. */ -+ unsigned long int level1_icache_linesize; - /* _SC_LEVEL1_DCACHE_SIZE. */ - unsigned long int level1_dcache_size; - /* _SC_LEVEL1_DCACHE_ASSOC. */ -diff --git a/sysdeps/x86/tst-sysconf-cache-linesize-static.c b/sysdeps/x86/tst-sysconf-cache-linesize-static.c -new file mode 100644 -index 0000000000..152ae68821 ---- /dev/null -+++ b/sysdeps/x86/tst-sysconf-cache-linesize-static.c -@@ -0,0 +1 @@ -+#include "tst-sysconf-cache-linesize.c" -diff --git a/sysdeps/x86/tst-sysconf-cache-linesize.c b/sysdeps/x86/tst-sysconf-cache-linesize.c -new file mode 100644 -index 0000000000..642dbde5d2 ---- /dev/null -+++ b/sysdeps/x86/tst-sysconf-cache-linesize.c -@@ -0,0 +1,57 @@ -+/* Test system cache line sizes. -+ Copyright (C) 2021 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ <https://www.gnu.org/licenses/>. */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <array_length.h> -+ -+static struct -+{ -+ const char *name; -+ int _SC_val; -+} sc_options[] = -+ { -+#define N(name) { "_SC_"#name, _SC_##name } -+ N (LEVEL1_ICACHE_LINESIZE), -+ N (LEVEL1_DCACHE_LINESIZE), -+ N (LEVEL2_CACHE_LINESIZE) -+ }; -+ -+static int -+do_test (void) -+{ -+ int result = EXIT_SUCCESS; -+ -+ for (int i = 0; i < array_length (sc_options); ++i) -+ { -+ long int scret = sysconf (sc_options[i]._SC_val); -+ if (scret < 0) -+ { -+ printf ("sysconf (%s) returned < 0 (%ld)\n", -+ sc_options[i].name, scret); -+ result = EXIT_FAILURE; -+ } -+ else -+ printf ("sysconf (%s): %ld\n", sc_options[i].name, scret); -+ } -+ -+ return result; -+} -+ -+#include <support/test-driver.c> diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch deleted file mode 100644 index 26c5c0d2a9..0000000000 --- a/poky/meta/recipes-core/glibc/glibc/CVE-2021-27645.patch +++ /dev/null @@ -1,51 +0,0 @@ -From dca565886b5e8bd7966e15f0ca42ee5cff686673 Mon Sep 17 00:00:00 2001 -From: DJ Delorie <dj@redhat.com> -Date: Thu, 25 Feb 2021 16:08:21 -0500 -Subject: [PATCH] nscd: Fix double free in netgroupcache [BZ #27462] - -In commit 745664bd798ec8fd50438605948eea594179fba1 a use-after-free -was fixed, but this led to an occasional double-free. This patch -tracks the "live" allocation better. - -Tested manually by a third party. - -Related: RHBZ 1927877 - -Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> -Reviewed-by: Carlos O'Donell <carlos@redhat.com> - -Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=dca565886b5e8bd7966e15f0ca42ee5cff686673] - -CVE: CVE-2021-27645 - -Reviewed-by: Carlos O'Donell <carlos@redhat.com> -Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> ---- - nscd/netgroupcache.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c -index dba6ceec1b..ad2daddafd 100644 ---- a/nscd/netgroupcache.c -+++ b/nscd/netgroupcache.c -@@ -248,7 +248,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, - : NULL); - ndomain = (ndomain ? newbuf + ndomaindiff - : NULL); -- buffer = newbuf; -+ *tofreep = buffer = newbuf; - } - - nhost = memcpy (buffer + bufused, -@@ -319,7 +319,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, - else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) - { - buflen *= 2; -- buffer = xrealloc (buffer, buflen); -+ *tofreep = buffer = xrealloc (buffer, buflen); - } - else if (status == NSS_STATUS_RETURN - || status == NSS_STATUS_NOTFOUND --- -2.27.0 - diff --git a/poky/meta/recipes-core/glibc/glibc/check-test-wrapper b/poky/meta/recipes-core/glibc/glibc/check-test-wrapper index f8e04e02d2..6ec9b9b29e 100644 --- a/poky/meta/recipes-core/glibc/glibc/check-test-wrapper +++ b/poky/meta/recipes-core/glibc/glibc/check-test-wrapper @@ -2,6 +2,7 @@ import sys import os import subprocess +import resource env = os.environ.copy() args = sys.argv[1:] @@ -44,6 +45,14 @@ if targettype == "user": qemuargs += ["-L", sysroot] qemuargs += ["-E", "LD_LIBRARY_PATH={}".format(":".join(libpaths))] command = qemuargs + args + + # We've seen qemu-arm using up all system memory for some glibc + # tests e.g. nptl/tst-pthread-timedlock-lockloop + # Cap at 8GB since no test should need more than that + # (5GB adds 7 failures for qemuarm glibc test run) + limit = 8*1024*1024*1024 + resource.setrlimit(resource.RLIMIT_AS, (limit, limit)) + elif targettype == "ssh": host = os.environ.get("SSH_HOST", None) user = os.environ.get("SSH_HOST_USER", None) diff --git a/poky/meta/recipes-core/glibc/glibc_2.33.bb b/poky/meta/recipes-core/glibc/glibc_2.33.bb index 5e0baa53e8..b70cd0978a 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.33.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.33.bb @@ -1,7 +1,20 @@ require glibc.inc require glibc-version.inc -CVE_CHECK_WHITELIST += "CVE-2020-10029" +CVE_CHECK_WHITELIST += "CVE-2020-10029 CVE-2021-27645" + +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010022 +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010023 +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010024 +# Upstream glibc maintainers dispute there is any issue and have no plans to address it further. +# "this is being treated as a non-security bug and no real threat." +CVE_CHECK_WHITELIST += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024" + +# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010025 +# Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow +# easier access for another. "ASLR bypass itself is not a vulnerability." +# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853 +CVE_CHECK_WHITELIST += "CVE-2019-1010025" DEPENDS += "gperf-native bison-native make-native" @@ -43,11 +56,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ - file://0031-x86-Require-full-ISA-support-for-x86-64-level-marker.patch \ - file://0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch \ - file://0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch \ - file://CVE-2021-27645.patch \ - file://0001-nptl-Remove-private-futex-optimization-BZ-27304.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" @@ -82,6 +90,7 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" EXTRA_OECONF_append_x86 = " --enable-cet" EXTRA_OECONF_append_x86-64 = " --enable-cet" +EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging" PACKAGECONFIG ??= "nscd" PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" diff --git a/poky/meta/recipes-core/images/core-image-ptest-all.bb b/poky/meta/recipes-core/images/core-image-ptest-all.bb new file mode 100644 index 0000000000..c1d6aa28a9 --- /dev/null +++ b/poky/meta/recipes-core/images/core-image-ptest-all.bb @@ -0,0 +1,25 @@ +inherit features_check +REQUIRED_DISTRO_FEATURES = "ptest" + +require core-image-minimal.bb +require conf/distro/include/ptest-packagelists.inc + +DESCRIPTION += "Also includes ptest packages." +HOMEPAGE = "https://www.yoctoproject.org/" + +# Include the full set of ptests +IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}" + +# This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live +# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the +# box) and explicitly add just 1100MB. +# strace-ptest in particular needs more than 500MB +IMAGE_OVERHEAD_FACTOR = "1.0" +IMAGE_ROOTFS_EXTRA_SPACE = "1124288" + +# ptests need more memory than standard to avoid the OOM killer +# also lttng-tools needs /tmp that has at least 1G +QB_MEM = "-m 2048" + +# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places +PTEST_EXPECT_FAILURE = "1" diff --git a/poky/meta/recipes-core/images/core-image-ptest-fast.bb b/poky/meta/recipes-core/images/core-image-ptest-fast.bb new file mode 100644 index 0000000000..40df274c4c --- /dev/null +++ b/poky/meta/recipes-core/images/core-image-ptest-fast.bb @@ -0,0 +1,24 @@ +inherit features_check +REQUIRED_DISTRO_FEATURES = "ptest" + +require core-image-minimal.bb +require conf/distro/include/ptest-packagelists.inc + +# Include only fast (< 30 sec) ptests +IMAGE_INSTALL += "${PTESTS_FAST}" + +DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA." +HOMEPAGE = "https://www.yoctoproject.org/" + +# This image is sufficiently large (~1.8GB) that it can't actually fit in a live +# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the +# box) and explicitly add just 1500MB. +# strace-ptest in particular needs more than 500MB +IMAGE_OVERHEAD_FACTOR = "1.0" +IMAGE_ROOTFS_EXTRA_SPACE = "1524288" + +# ptests need more memory than standard to avoid the OOM killer +QB_MEM = "-m 1024" + +# Sadly at the moment the fast set of ptests is not robust enough and sporadically fails in a couple of places +PTEST_EXPECT_FAILURE = "1" diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs index 10b9583172..e0efbe6ebe 100644 --- a/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs +++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs @@ -56,8 +56,8 @@ rootfs_run() { # It is unlikely to change, but keep trying anyway. # Perhaps we pick a different device next time. umount $ROOTFS_DIR - fi fi + fi fi debug "Sleeping for $delay second(s) to wait root to settle..." sleep $delay diff --git a/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch b/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch index 5448fe0fa6..0772998c72 100644 --- a/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch +++ b/poky/meta/recipes-core/libxcrypt/files/fix_cflags_handling.patch @@ -1,3 +1,8 @@ +From fd9a46695594c3cd836ecb7d959f03f605e69a2f Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Fri, 30 Apr 2021 10:35:02 +0100 +Subject: [PATCH] libxcrypt: Update to 4.4.19 release and fix symbol version + If you pass CFLAGS with a leading space, " " gets passed to popen and convinces gcc to try and open a file called " ". This results in a confusing error message like: @@ -9,8 +14,12 @@ Avoid this by stripping empty elements out of CFLAGS. Upstream-Status: Submitted [https://github.com/besser82/libxcrypt/pull/126] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Index: a/build-aux/compute-symver-floor -=================================================================== +--- + build-aux/compute-symver-floor | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/build-aux/compute-symver-floor b/build-aux/compute-symver-floor +index 4ec82e1..8117342 100644 --- a/build-aux/compute-symver-floor +++ b/build-aux/compute-symver-floor @@ -36,6 +36,8 @@ sub preprocessor_check { @@ -20,5 +29,5 @@ Index: a/build-aux/compute-symver-floor + # Remove empty elements, particularly leading ones which cause issues with popen below + @CFLAGS = grep {$_} @CFLAGS; - # We call ensure_C_locale here, not from the main section, - # because this sub might not get called at all, in which + # Remove empty elements, particularly leading ones which + # cause issues with popen below. diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.19.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.22.bb index ba74eb1f94..ba74eb1f94 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.19.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.22.bb diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc index 694e55546f..e4505a666d 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=afed27a72ae2a8075978299eebaa1f5d \ inherit autotools pkgconfig SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}" -SRCREV = "c79119414d7e30017d7b49566e7e4ea35112bdc8" +SRCREV = "3df9620d08db207367c0c5152148665b5ce422e1" SRCBRANCH ?= "develop" SRC_URI += "file://fix_cflags_handling.patch" diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.19.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.22.bb index 79dba2f6dc..79dba2f6dc 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.19.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.22.bb diff --git a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch index 5e9a0a506b..6d9ede6194 100644 --- a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch +++ b/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch @@ -1,4 +1,4 @@ -From 2b5fb416aa275fd2a17a0139a2f783998bcb42cc Mon Sep 17 00:00:00 2001 +From ea1993d1d9a18c5e61b9cb271892b0a48f508d32 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt <pkj@axis.com> Date: Fri, 9 Jun 2017 17:50:46 +0200 Subject: [PATCH] Make ptest run the python tests if python is enabled @@ -8,16 +8,14 @@ be due to the fact that the tests are forced to run with Python 3. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> - --- - Makefile.am | 2 +- - python/Makefile.am | 9 +++++++++ - python/tests/Makefile.am | 10 ++++++++++ - python/tests/tstLastError.py | 2 +- - 4 files changed, 21 insertions(+), 2 deletions(-) + Makefile.am | 2 +- + python/Makefile.am | 9 +++++++++ + python/tests/Makefile.am | 10 ++++++++++ + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am -index ae62274..bd1e425 100644 +index b428452b..dc18d6dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -203,9 +203,9 @@ install-ptest: @@ -32,7 +30,7 @@ index ae62274..bd1e425 100644 runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) diff --git a/python/Makefile.am b/python/Makefile.am -index 34aed96..ba3ec6a 100644 +index 34aed96c..ba3ec6a4 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES) @@ -53,7 +51,7 @@ index 34aed96..ba3ec6a 100644 tests test: all cd tests && $(MAKE) tests diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am -index 227e24d..021bb29 100644 +index 227e24df..3568c2d2 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -59,6 +59,11 @@ XMLS= \ @@ -83,16 +81,6 @@ index 227e24d..021bb29 100644 + tests: endif -diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py -index 81d0acc..162c8db 100755 ---- a/python/tests/tstLastError.py -+++ b/python/tests/tstLastError.py -@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase): - when the exception is raised, check the libxml2.lastError for - expected values.""" - # disable the default error handler -- libxml2.registerErrorHandler(None,None) -+ libxml2.registerErrorHandler(lambda ctx,str: None,None) - try: - f(*args) - except exc: +-- +2.25.1 + diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch deleted file mode 100644 index 88eb65a6a5..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2019-20388.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7ffcd44d7e6c46704f8af0321d9314cd26e0e18a Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie <xiezhipeng1@huawei.com> -Date: Tue, 20 Aug 2019 16:33:06 +0800 -Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream - -When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun -alloc a new schema for ctxt->schema and set vctxt->xsiAssemble -to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize -vctxt->xsiAssemble to 0 again which cause the alloced schema -can not be freed anymore. - -Found with libFuzzer. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/7ffcd44d7e6c46704f8af0321d9314cd26e0e18a] -CVE: CVE-2019-20388 - -Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> -Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> ---- - xmlschemas.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xmlschemas.c b/xmlschemas.c -index 301c8449..39d92182 100644 ---- a/xmlschemas.c -+++ b/xmlschemas.c -@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) { - vctxt->nberrors = 0; - vctxt->depth = -1; - vctxt->skipDepth = -1; -- vctxt->xsiAssemble = 0; - vctxt->hasKeyrefs = 0; - #ifdef ENABLE_IDC_NODE_TABLES_TEST - vctxt->createIDCNodeTables = 1; --- -2.24.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch deleted file mode 100644 index 8224346660..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-24977.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 50f06b3efb638efb0abd95dc62dca05ae67882c2 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Fri, 7 Aug 2020 21:54:27 +0200 -Subject: [PATCH] Fix out-of-bounds read with 'xmllint --htmlout' - -Make sure that truncated UTF-8 sequences don't cause an out-of-bounds -array access. - -Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for -the report. - -Fixes #178. - -CVE: CVE-2020-24977 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/50f06b3efb638efb0abd95dc62dca05ae67882c2] - -Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> ---- - xmllint.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/xmllint.c b/xmllint.c -index f6a8e463..c647486f 100644 ---- a/xmllint.c -+++ b/xmllint.c -@@ -528,6 +528,12 @@ static void - xmlHTMLEncodeSend(void) { - char *result; - -+ /* -+ * xmlEncodeEntitiesReentrant assumes valid UTF-8, but the buffer might -+ * end with a truncated UTF-8 sequence. This is a hack to at least avoid -+ * an out-of-bounds read. -+ */ -+ memset(&buffer[sizeof(buffer)-4], 0, 4); - result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); - if (result) { - xmlGenericError(xmlGenericErrorContext, "%s", result); --- -2.17.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch deleted file mode 100644 index facfefd362..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/CVE-2020-7595.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie <xiezhipeng1@huawei.com> -Date: Thu, 12 Dec 2019 17:30:55 +0800 -Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities - -When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef -return NULL which cause a infinite loop in xmlStringLenDecodeEntities - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c89076] -CVE: CVE-2020-7595 -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - parser.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/parser.c b/parser.c -index d1c31963..a34bb6cd 100644 ---- a/parser.c -+++ b/parser.c -@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - else - c = 0; - while ((c != 0) && (c != end) && /* non input consuming loop */ -- (c != end2) && (c != end3)) { -+ (c != end2) && (c != end3) && -+ (ctxt->instate != XML_PARSER_EOF)) { - - if (c == 0) break; - if ((c == '&') && (str[1] == '#')) { --- -2.24.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch b/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch deleted file mode 100644 index 32590f9ddf..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/fix-python39.patch +++ /dev/null @@ -1,94 +0,0 @@ -From e4fb36841800038c289997432ca547c9bfef9db1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> -Date: Fri, 28 Feb 2020 12:48:14 +0100 -Subject: [PATCH] Parenthesize Py<type>_Check() in ifs - -In C, if expressions should be parenthesized. -PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized -expression before, but that's not API to rely on. - -Since Python 3.9.0a4 it needs to be parenthesized explicitly. - -Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149 -Upstream-Status: Backport -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - python/libxml.c | 4 ++-- - python/types.c | 12 ++++++------ - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/python/libxml.c b/python/libxml.c -index bc676c4e0..81e709f34 100644 ---- a/python/libxml.c -+++ b/python/libxml.c -@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) { - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -diff --git a/python/types.c b/python/types.c -index c2bafeb19..ed284ec74 100644 ---- a/python/types.c -+++ b/python/types.c -@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - if (obj == NULL) { - return (NULL); - } -- if PyFloat_Check (obj) { -+ if (PyFloat_Check (obj)) { - ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj)); -- } else if PyLong_Check(obj) { -+ } else if (PyLong_Check(obj)) { - #ifdef PyLong_AS_LONG - ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj)); - #else - ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); - #endif - #ifdef PyBool_Check -- } else if PyBool_Check (obj) { -+ } else if (PyBool_Check (obj)) { - - if (obj == Py_True) { - ret = xmlXPathNewBoolean(1); -@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathNewBoolean(0); - } - #endif -- } else if PyBytes_Check (obj) { -+ } else if (PyBytes_Check (obj)) { - xmlChar *str; - - str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj), - PyBytes_GET_SIZE(obj)); - ret = xmlXPathWrapString(str); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (obj) { -+ } else if (PyUnicode_Check (obj)) { - #if PY_VERSION_HEX >= 0x03030000 - xmlChar *str; - const char *tmp; -@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj) - ret = xmlXPathWrapString(str); - #endif - #endif -- } else if PyList_Check (obj) { -+ } else if (PyList_Check (obj)) { - int i; - PyObject *node; - xmlNodePtr cur; --- -GitLab - diff --git a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch index e6998f6e68..90fa193775 100644 --- a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch +++ b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch @@ -1,7 +1,8 @@ -From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Sat, 11 May 2019 20:37:12 +0800 +From f57da62218cf72c1342da82abafdac6b0a2e4997 Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Fri, 14 May 2021 11:50:35 -0400 Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through + binconfig-disabled.bbclass, so port it to use pkg-config instead. Upstream-Status: Pending @@ -9,16 +10,22 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> Rebase to 2.9.9 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Updated to apply cleanly to v2.9.12 + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> --- - libxml.m4 | 186 ++------------------------------------------------------------ - 1 file changed, 5 insertions(+), 181 deletions(-) + libxml.m4 | 190 ++---------------------------------------------------- + 1 file changed, 5 insertions(+), 185 deletions(-) diff --git a/libxml.m4 b/libxml.m4 -index 2d7a6f5..1c53585 100644 +index 09de9fe2..1c535853 100644 --- a/libxml.m4 +++ b/libxml.m4 -@@ -1,188 +1,12 @@ +@@ -1,192 +1,12 @@ -# Configure paths for LIBXML2 +-# Simon Josefsson 2020-02-12 +-# Fix autoconf 2.70+ warnings -# Mike Hommey 2004-06-19 -# use CPPFLAGS instead of CFLAGS -# Toshio Kuratomi 2001-04-21 @@ -78,7 +85,8 @@ index 2d7a6f5..1c53585 100644 -dnl (Also sanity checks the results of xml2-config to some extent) -dnl - rm -f conf.xmltest -- AC_TRY_RUN([ +- AC_RUN_IFELSE( +- [AC_LANG_SOURCE([[ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> @@ -148,12 +156,12 @@ index 2d7a6f5..1c53585 100644 - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); - printf("*** correct copy of xml2-config. (In this case, you will have to\n"); -- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); +- printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; -} --],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +-]])],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - fi @@ -178,10 +186,11 @@ index 2d7a6f5..1c53585 100644 - echo "*** Could not run libxml test program, checking why..." - CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" - LIBS="$LIBS $XML_LIBS" -- AC_TRY_LINK([ +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[ -#include <libxml/xmlversion.h> -#include <stdio.h> --], [ LIBXML_TEST_VERSION; return 0;], +-]], [[ LIBXML_TEST_VERSION; return 0;]])], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding LIBXML or finding the wrong" - echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" diff --git a/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch b/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch new file mode 100644 index 0000000000..e80c46054e --- /dev/null +++ b/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch @@ -0,0 +1,43 @@ +From e49a0d4a8f3f725d6f683854e1cad36a3cd02962 Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Wed, 19 May 2021 19:43:56 -0400 +Subject: [PATCH] Remove fuzz testing from executing with ptests. + +Upstream version 2.9.12 introduced new fuzz-testing and a corresponding +folder fuzz. These tests are not required for ptests of this package. + +This patch removes the fuzz testing targets from the Makefile. +Otherwise, running the ptests will fail due to the invalid directory. + +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> +--- + Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index a9284b95..3d7b344d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,9 +2,9 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = include . doc example fuzz xstc $(PYTHON_SUBDIR) ++SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) + +-DIST_SUBDIRS = include . doc example fuzz python xstc ++DIST_SUBDIRS = include . doc example python xstc + + AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include + +@@ -210,7 +210,6 @@ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ + $(CHECKER) ./runxmlconf$(EXEEXT) + @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ + $(MAKE) tests ; fi) +- @cd fuzz; $(MAKE) tests + + check: all runtests + +-- +2.25.1 + diff --git a/poky/meta/recipes-core/libxml/libxml2/runtest.patch b/poky/meta/recipes-core/libxml/libxml2/runtest.patch index 0dbb353c0f..c7a90cd3dc 100644 --- a/poky/meta/recipes-core/libxml/libxml2/runtest.patch +++ b/poky/meta/recipes-core/libxml/libxml2/runtest.patch @@ -1,28 +1,33 @@ -Add 'install-ptest' rule. Print a standard result line for -each test. +From 6172ccd1e74bc181f5298f19e240234e12876abe Mon Sep 17 00:00:00 2001 +From: Tony Tascioglu <tony.tascioglu@windriver.com> +Date: Tue, 11 May 2021 11:57:46 -0400 +Subject: [PATCH] Add 'install-ptest' rule. + +Print a standard result line for each test. Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Upstream-Status: Backport +Upstream-Status: Pending Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> --- - Makefile.am | 9 ++++ + Makefile.am | 9 +++ runsuite.c | 1 + runtest.c | 2 + runxmlconf.c | 1 + - testapi.c | 122 ++++++++++++++++++++++++++++++--------------- - testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++----------------- + testapi.c | 122 ++++++++++++++++++++++++++------------- + testchar.c | 156 +++++++++++++++++++++++++++++++++++--------------- testdict.c | 1 + testlimits.c | 1 + testrecurse.c | 2 + 9 files changed, 210 insertions(+), 85 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 9c630be..7cfd04b 100644 +index 05d1671f..ae622745 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS) +@@ -198,6 +198,15 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_DEPENDENCIES = $(DEPS) #testOOM_LDADD= $(LDADDS) @@ -39,10 +44,10 @@ index 9c630be..7cfd04b 100644 testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) [ -d test ] || $(LN_S) $(srcdir)/test . diff --git a/runsuite.c b/runsuite.c -index aaab13e..9ba2c5d 100644 +index d24b5ec3..f7ff2521 100644 --- a/runsuite.c +++ b/runsuite.c -@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { +@@ -1147,6 +1147,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { if (logfile != NULL) fclose(logfile); @@ -51,10 +56,10 @@ index aaab13e..9ba2c5d 100644 } #else /* !SCHEMAS */ diff --git a/runtest.c b/runtest.c -index addda5c..8ba5d59 100644 +index ffa98d04..470f95cb 100644 --- a/runtest.c +++ b/runtest.c -@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) { +@@ -4508,6 +4508,7 @@ launchTests(testDescPtr tst) { xmlCharEncCloseFunc(ebcdicHandler); xmlCharEncCloseFunc(eucJpHandler); @@ -62,7 +67,7 @@ index addda5c..8ba5d59 100644 return(err); } -@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { +@@ -4588,6 +4589,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { xmlCleanupParser(); xmlMemoryDump(); @@ -71,7 +76,7 @@ index addda5c..8ba5d59 100644 } diff --git a/runxmlconf.c b/runxmlconf.c -index cef20f4..4f291fb 100644 +index 70f61017..e882b3a1 100644 --- a/runxmlconf.c +++ b/runxmlconf.c @@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { @@ -83,7 +88,7 @@ index cef20f4..4f291fb 100644 } diff --git a/testapi.c b/testapi.c -index 4a751e2..7ccc066 100644 +index ff8b470d..52b51d78 100644 --- a/testapi.c +++ b/testapi.c @@ -1246,49 +1246,91 @@ static int @@ -219,7 +224,7 @@ index 4a751e2..7ccc066 100644 } diff --git a/testchar.c b/testchar.c -index 0d08792..f555d3b 100644 +index 6866a175..7bce0132 100644 --- a/testchar.c +++ b/testchar.c @@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) { @@ -797,7 +802,7 @@ index 0d08792..f555d3b 100644 /* * Cleanup function for the XML library. diff --git a/testdict.c b/testdict.c -index 40bebd0..114b934 100644 +index 40bebd05..114b9347 100644 --- a/testdict.c +++ b/testdict.c @@ -440,5 +440,6 @@ int main(void) @@ -808,7 +813,7 @@ index 40bebd0..114b934 100644 return(ret); } diff --git a/testlimits.c b/testlimits.c -index 68c94db..1584434 100644 +index 059116a6..f0bee68d 100644 --- a/testlimits.c +++ b/testlimits.c @@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { @@ -819,7 +824,7 @@ index 68c94db..1584434 100644 return(ret); } diff --git a/testrecurse.c b/testrecurse.c -index f95ae1c..74c8f8b 100644 +index 0cbe25a6..3ecadb40 100644 --- a/testrecurse.c +++ b/testrecurse.c @@ -892,6 +892,7 @@ launchTests(testDescPtr tst) { @@ -838,5 +843,5 @@ index f95ae1c..74c8f8b 100644 return(ret); } -- -2.7.4 +2.25.1 diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.10.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.12.bb index 07ae68610c..955d934d7d 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.10.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.9.12.bb @@ -5,9 +5,9 @@ BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ - file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \ - file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \ - file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e" + file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ + file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ + file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f" DEPENDS = "zlib virtual/libiconv" @@ -20,15 +20,10 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ file://libxml-m4-use-pkgconfig.patch \ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ file://fix-execution-of-ptests.patch \ - file://CVE-2020-7595.patch \ - file://CVE-2019-20388.patch \ - file://CVE-2020-24977.patch \ - file://fix-python39.patch \ + file://remove-fuzz-from-ptests.patch \ " -SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5" -SRC_URI[libtar.sha256sum] = "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f" -SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" +SRC_URI[libtar.sha256sum] = "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" BINCONFIG = "${bindir}/xml2-config" @@ -43,7 +38,7 @@ inherit autotools pkgconfig binconfig-disabled ptest inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} -RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" +RDEPENDS_${PN}-ptest += "bash make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" diff --git a/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch new file mode 100644 index 0000000000..1fdc9f739d --- /dev/null +++ b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch @@ -0,0 +1,49 @@ +From a530eed9e7e6872e10fe92efaf1e9739471c30ca Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 30 May 2021 08:30:28 -0700 +Subject: [PATCH] meson: Add option to pass cpu + +This helps with cross compile setups, where host_cpu != target_cpu +therefore detecting it on the fly will end up with wrong cpu to build +for + +Upstream-Status: Submitted [https://github.com/kaniini/libucontext/pull/28] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + meson.build | 6 +++++- + meson_options.txt | 4 +++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index e863780..2b4bdbd 100644 +--- a/meson.build ++++ b/meson.build +@@ -6,7 +6,11 @@ project( + version : run_command('head', files('VERSION')).stdout() + ) + +-cpu = host_machine.cpu_family() ++cpu = get_option('cpu') ++if cpu == '' ++ cpu = host_machine.cpu_family() ++endif ++ + if cpu == 'sh4' + cpu = 'sh' + endif +diff --git a/meson_options.txt b/meson_options.txt +index d4201d1..864d83c 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,4 +1,6 @@ + option('freestanding', type : 'boolean', value : false, + description: 'Do not use system headers') + option('export_unprefixed', type : 'boolean', value : true, +- description: 'Export POSIX 2004 ucontext names as alises') +\ No newline at end of file ++ description: 'Export POSIX 2004 ucontext names as alises') ++option('cpu', type : 'string', value : '', ++ description: 'Target CPU architecture for cross compile') +-- +2.31.1 + diff --git a/poky/meta/recipes-core/musl/libucontext_git.bb b/poky/meta/recipes-core/musl/libucontext_git.bb index 11affebb49..d8ae8242c5 100644 --- a/poky/meta/recipes-core/musl/libucontext_git.bb +++ b/poky/meta/recipes-core/musl/libucontext_git.bb @@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d" SECTION = "libs" DEPENDS = "" -PV = "0.10+${SRCPV}" -SRCREV = "19fa1bbfc26efb92147b5e85cc0ca02a0e837561" +PV = "1.1+${SRCPV}" +SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc" SRC_URI = "git://github.com/kaniini/libucontext \ -" + file://0001-meson-Add-option-to-pass-cpu.patch \ + " S = "${WORKDIR}/git" @@ -49,16 +50,5 @@ def map_kernel_arch(a, d): return a bb.error("cannot map '%s' to a linux kernel architecture" % a) -export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" - -CFLAGS += "-Iarch/${ARCH} -Iarch/common" - -EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'" - -do_compile() { - oe_runmake ARCH=${ARCH} -} - -do_install() { - oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install -} +EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" +inherit meson diff --git a/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch new file mode 100644 index 0000000000..9d9f16cee6 --- /dev/null +++ b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch @@ -0,0 +1,32 @@ +From 40732d03990632049d5ba63dd736269a81756b16 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 19 May 2021 00:30:05 -0700 +Subject: [PATCH] riscv: Rename __NR_fstatat __NR_newfstatat + +on riscv64 this syscall is called __NR_newfstatat +this helps the name match kernel UAPI for external +programs + +Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2021/05/19/3] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Cc: zabolcs Nagy <nsz@port70.net> +--- + arch/riscv64/bits/syscall.h.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in +index f9c421d0..39c0d650 100644 +--- a/arch/riscv64/bits/syscall.h.in ++++ b/arch/riscv64/bits/syscall.h.in +@@ -76,7 +76,7 @@ + #define __NR_splice 76 + #define __NR_tee 77 + #define __NR_readlinkat 78 +-#define __NR_fstatat 79 ++#define __NR_newfstatat 79 + #define __NR_fstat 80 + #define __NR_sync 81 + #define __NR_fsync 82 +-- +2.31.1 + diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index ef8bc2eec3..795b888bb3 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}" SRC_URI = "git://git.musl-libc.org/musl \ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ + file://0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch b/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch new file mode 100644 index 0000000000..d658123b81 --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/0001-Fix-VLA-parameter-warning.patch @@ -0,0 +1,51 @@ +From 498627ebda6271b59920f43a0b9b6187edeb7b09 Mon Sep 17 00:00:00 2001 +From: Adrian Herrera <adr.her.arc.95@gmail.com> +Date: Mon, 22 Mar 2021 21:06:47 +0000 +Subject: [PATCH] Fix VLA parameter warning + +Make VLA buffer types consistent in declarations and definitions. +Resolves build crash when using -Werror due to "vla-parameter" warning. + +Upstream-Status: Submitted [https://github.com/google/brotli/pull/893] +Signed-off-by: Adrian Herrera <adr.her.arc.95@gmail.com> +--- + c/dec/decode.c | 6 ++++-- + c/enc/encode.c | 5 +++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c +index 114c505..bb6f1ab 100644 +--- a/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c ++++ b/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c +@@ -2030,8 +2030,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands( + } + + BrotliDecoderResult BrotliDecoderDecompress( +- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size, +- uint8_t* decoded_buffer) { ++ size_t encoded_size, ++ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)], ++ size_t* decoded_size, ++ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) { + BrotliDecoderState s; + BrotliDecoderResult result; + size_t total_out = 0; +diff --git a/c/enc/encode.c b/c/enc/encode.c +index 68548ef..ab0a490 100644 +--- a/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c ++++ c/BaseTools/Source/C/BrotliCompress/brotli/c/enc/encode.c +@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream( + + BROTLI_BOOL BrotliEncoderCompress( + int quality, int lgwin, BrotliEncoderMode mode, size_t input_size, +- const uint8_t* input_buffer, size_t* encoded_size, +- uint8_t* encoded_buffer) { ++ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)], ++ size_t* encoded_size, ++ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) { + BrotliEncoderState* s; + size_t out_size = *encoded_size; + const uint8_t* input_start = input_buffer; +-- +2.31.1 + diff --git a/poky/meta/recipes-core/ovmf/ovmf/debug_prefix_map.patch b/poky/meta/recipes-core/ovmf/ovmf/debug_prefix_map.patch new file mode 100644 index 0000000000..0165fae7ce --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/debug_prefix_map.patch @@ -0,0 +1,93 @@ +We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in + --debug-prefix-map to nasm (we carry a patch to nasm for this). The +tools definitions file is built by ovmf-native so we need to pass this in +at target build time when we know the right values so we use the environment. + +By using determininistc file paths during the ovmf build, it removes the +opportunitity for gcc/ld to change the output binaries due to path lengths +overflowing section sizes and causing small changes in the binary output. +Previously we relied on the stripped output being the same which isn't always +the case if the size of the debug symbols varies. + +Upstream-Status: Pending [gcc parts may be upstreamable, nasm patch isn't upstream yet] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + + +Index: git/BaseTools/Conf/tools_def.template +=================================================================== +--- git.orig/BaseTools/Conf/tools_def.template ++++ git/BaseTools/Conf/tools_def.template +@@ -1918,7 +1918,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --a + *_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
+ *_*_*_DTC_PATH = DEF(DTC_BIN)
+
+-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
++DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common ENV(GCC_PREFIX_MAP)
+ DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
+ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
+@@ -1936,8 +1936,8 @@ DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = -fu + DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+-DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h
+-DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
++DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h ENV(GCC_PREFIX_MAP)
++DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h ENV(GCC_PREFIX_MAP)
+ DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
+ DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
+ DEFINE GCC_ASLCC_FLAGS = -x c
+@@ -2082,7 +2082,7 @@ DEFINE GCC_PP_FLAGS + *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
+ *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC48_IA32_OBJCOPY_FLAGS =
+-*_GCC48_IA32_NASM_FLAGS = -f elf32
++*_GCC48_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
+ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
+@@ -2110,7 +2110,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF( + *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
+ *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC48_X64_OBJCOPY_FLAGS =
+-*_GCC48_X64_NASM_FLAGS = -f elf64
++*_GCC48_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
+ RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
+@@ -2222,7 +2222,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(G + *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
+ *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC49_IA32_OBJCOPY_FLAGS =
+-*_GCC49_IA32_NASM_FLAGS = -f elf32
++*_GCC49_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
+ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
+@@ -2250,7 +2250,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF( + *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
+ *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC49_X64_OBJCOPY_FLAGS =
+-*_GCC49_X64_NASM_FLAGS = -f elf64
++*_GCC49_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
+ RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
+@@ -2368,7 +2368,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = - + *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
+ *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+ *_GCC5_IA32_OBJCOPY_FLAGS =
+-*_GCC5_IA32_NASM_FLAGS = -f elf32
++*_GCC5_IA32_NASM_FLAGS = -f elf32 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
+ DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+@@ -2400,7 +2400,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(G + *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
+ *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+ *_GCC5_X64_OBJCOPY_FLAGS =
+-*_GCC5_X64_NASM_FLAGS = -f elf64
++*_GCC5_X64_NASM_FLAGS = -f elf64 ENV(NASM_PREFIX_MAP)
+
+ DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
+ DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
diff --git a/poky/meta/recipes-core/ovmf/ovmf/reproducible.patch b/poky/meta/recipes-core/ovmf/ovmf/reproducible.patch new file mode 100644 index 0000000000..5d2aeaacfe --- /dev/null +++ b/poky/meta/recipes-core/ovmf/ovmf/reproducible.patch @@ -0,0 +1,165 @@ +This patch fixes various things which make the build more reproducible. Some changes +here only change intermediate artefacts but that means when you have two build trees +giving differing results, the differences can be isolated more easily. The issues here +usually become apparent with longer paths. + +This was all debugged with: +TMPDIR = "${TOPDIR}/tmp" +vs. +TMPDIR = "${TOPDIR}/tmp-inital-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath-mylongpath" + +The patch specifically: + + * Sorts output in GNUmakefile + * Always generates indirect flags files used to avoid pathlength issues else the + compile commands suddenly change when using longer paths + * Sorts the AutoGenTimeStamp file contents + * Makes the TargetDescBlock objects from BuildEngine sortable to allow the makefile fix + * Fix ElfConvert within GenFw so that only the basename of the binary being converted + is used, else the output from "GenFw XXX.bin" differs from "GenFw /long/path/XXX.bin" + with sufficiently long paths + +Upstream-Status: Pending [At least some of this might be interesting to upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: git/BaseTools/Source/Python/AutoGen/GenMake.py +=================================================================== +--- git.orig/BaseTools/Source/Python/AutoGen/GenMake.py ++++ git/BaseTools/Source/Python/AutoGen/GenMake.py +@@ -571,7 +571,7 @@ cleanlib: + os.remove(RespFileList)
+
+ # convert source files and binary files to build targets
+- self.ResultFileList = [str(T.Target) for T in MyAgo.CodaTargetList]
++ self.ResultFileList = sorted([str(T.Target) for T in MyAgo.CodaTargetList])
+ if len(self.ResultFileList) == 0 and len(MyAgo.SourceFileList) != 0:
+ EdkLogger.error("build", AUTOGEN_ERROR, "Nothing to build",
+ ExtraData="[%s]" % str(MyAgo))
+@@ -722,7 +722,7 @@ cleanlib: + OutputFile = ''
+ DepsFileList = []
+
+- for Cmd in self.GenFfsList:
++ for Cmd in sorted(self.GenFfsList):
+ if Cmd[2]:
+ for CopyCmd in Cmd[2]:
+ Src, Dst = CopyCmd
+@@ -755,7 +755,7 @@ cleanlib: + self.BuildTargetList.append('\t%s' % CmdString)
+
+ self.ParseSecCmd(DepsFileList, Cmd[1])
+- for SecOutputFile, SecDepsFile, SecCmd in self.FfsOutputFileList :
++ for SecOutputFile, SecDepsFile, SecCmd in sorted(self.FfsOutputFileList):
+ self.BuildTargetList.append('%s : %s' % (self.ReplaceMacro(SecOutputFile), self.ReplaceMacro(SecDepsFile)))
+ self.BuildTargetList.append('\t%s' % self.ReplaceMacro(SecCmd))
+ self.FfsOutputFileList = []
+@@ -794,13 +794,13 @@ cleanlib: +
+ def CommandExceedLimit(self):
+ FlagDict = {
+- 'CC' : { 'Macro' : '$(CC_FLAGS)', 'Value' : False},
+- 'PP' : { 'Macro' : '$(PP_FLAGS)', 'Value' : False},
+- 'APP' : { 'Macro' : '$(APP_FLAGS)', 'Value' : False},
+- 'ASLPP' : { 'Macro' : '$(ASLPP_FLAGS)', 'Value' : False},
+- 'VFRPP' : { 'Macro' : '$(VFRPP_FLAGS)', 'Value' : False},
+- 'ASM' : { 'Macro' : '$(ASM_FLAGS)', 'Value' : False},
+- 'ASLCC' : { 'Macro' : '$(ASLCC_FLAGS)', 'Value' : False},
++ 'CC' : { 'Macro' : '$(CC_FLAGS)', 'Value' : True},
++ 'PP' : { 'Macro' : '$(PP_FLAGS)', 'Value' : True},
++ 'APP' : { 'Macro' : '$(APP_FLAGS)', 'Value' : True},
++ 'ASLPP' : { 'Macro' : '$(ASLPP_FLAGS)', 'Value' : True},
++ 'VFRPP' : { 'Macro' : '$(VFRPP_FLAGS)', 'Value' : True},
++ 'ASM' : { 'Macro' : '$(ASM_FLAGS)', 'Value' : True},
++ 'ASLCC' : { 'Macro' : '$(ASLCC_FLAGS)', 'Value' : True},
+ }
+
+ RespDict = {}
+@@ -1003,9 +1003,9 @@ cleanlib: + if not self.ObjTargetDict.get(T.Target.SubDir):
+ self.ObjTargetDict[T.Target.SubDir] = set()
+ self.ObjTargetDict[T.Target.SubDir].add(NewFile)
+- for Type in self._AutoGenObject.Targets:
++ for Type in sorted(self._AutoGenObject.Targets):
+ resp_file_number = 0
+- for T in self._AutoGenObject.Targets[Type]:
++ for T in sorted(self._AutoGenObject.Targets[Type]):
+ # Generate related macros if needed
+ if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros:
+ self.FileListMacros[T.FileListMacro] = []
+Index: git/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +=================================================================== +--- git.orig/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py ++++ git/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +@@ -1484,6 +1484,9 @@ class ModuleAutoGen(AutoGen): + for File in Files:
+ if File.lower().endswith('.pdb'):
+ AsBuiltInfDict['binary_item'].append('DISPOSABLE|' + File)
++
++ AsBuiltInfDict['binary_item'] = sorted(AsBuiltInfDict['binary_item'])
++
+ HeaderComments = self.Module.HeaderComments
+ StartPos = 0
+ for Index in range(len(HeaderComments)):
+@@ -1759,7 +1762,7 @@ class ModuleAutoGen(AutoGen): + if os.path.exists (self.TimeStampPath):
+ os.remove (self.TimeStampPath)
+
+- SaveFileOnChange(self.TimeStampPath, "\n".join(FileSet), False)
++ SaveFileOnChange(self.TimeStampPath, "\n".join(sorted(FileSet)), False)
+
+ # Ignore generating makefile when it is a binary module
+ if self.IsBinaryModule:
+Index: git/BaseTools/Source/Python/AutoGen/BuildEngine.py +=================================================================== +--- git.orig/BaseTools/Source/Python/AutoGen/BuildEngine.py ++++ git/BaseTools/Source/Python/AutoGen/BuildEngine.py +@@ -70,6 +70,9 @@ class TargetDescBlock(object): + else:
+ return str(Other) == self.Target.Path
+
++ def __lt__(self, other):
++ return str(self) < str(other)
++
+ def AddInput(self, Input):
+ if Input not in self.Inputs:
+ self.Inputs.append(Input)
+Index: git/BaseTools/Source/C/GenFw/Elf64Convert.c +=================================================================== +--- git.orig/BaseTools/Source/C/GenFw/Elf64Convert.c ++++ git/BaseTools/Source/C/GenFw/Elf64Convert.c +@@ -14,6 +14,8 @@ SPDX-License-Identifier: BSD-2-Clause-Pa + #ifndef __GNUC__
+ #include <windows.h>
+ #include <io.h>
++#else
++#define _GNU_SOURCE
+ #endif
+ #include <assert.h>
+ #include <stdio.h>
+@@ -770,7 +772,7 @@ ScanSections64 ( + }
+ mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) +
+ sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) +
+- strlen(mInImageName) + 1;
++ strlen(basename(mInImageName)) + 1;
+
+ mCoffOffset = CoffAlign(mCoffOffset);
+ if (SectionCount == 0) {
+@@ -1609,7 +1611,7 @@ WriteDebug64 ( + EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *Dir;
+ EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
+
+- Len = strlen(mInImageName) + 1;
++ Len = strlen(basename(mInImageName)) + 1;
+
+ Dir = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY*)(mCoffFile + mDebugOffset);
+ Dir->Type = EFI_IMAGE_DEBUG_TYPE_CODEVIEW;
+@@ -1619,7 +1621,7 @@ WriteDebug64 ( +
+ Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
+ Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
+- strcpy ((char *)(Nb10 + 1), mInImageName);
++ strcpy ((char *)(Nb10 + 1), basename(mInImageName));
+
+
+ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb index 896b3b6320..888ea082ec 100644 --- a/poky/meta/recipes-core/ovmf/ovmf_git.bb +++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb @@ -17,6 +17,9 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ file://0004-ovmf-Update-to-latest.patch \ file://zero.patch \ + file://debug_prefix_map.patch \ + file://reproducible.patch \ + file://0001-Fix-VLA-parameter-warning.patch \ " PV = "edk2-stable202102" @@ -101,9 +104,23 @@ fix_toolchain_append_class-native() { # to make ovmf-native reusable across distros. sed -i \ -e 's#^\(DEFINE GCC.*DLINK.*FLAGS *=\)#\1 -fuse-ld=bfd#' \ + -e 's#-flto#-fno-lto#g' \ + -e 's#-DUSING_LTO##g' \ ${S}/BaseTools/Conf/tools_def.template } +# We disable lto above since the results are not reproducible and make it hard to compare +# binary build aretfacts to debug reproducibility problems. +# Surprisingly, if you disable lto, you see compiler warnings which are fatal. We therefore +# have to hack warnings overrides into GCC_PREFIX_MAP to allow it to build. + +# We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in +# --debug-prefix-map to nasm (we carry a patch to nasm for this). The +# tools definitions are built by ovmf-native so we need to pass this in +# at target build time when we know the right values. +export NASM_PREFIX_MAP = "--debug-prefix-map=${WORKDIR}=/usr/src/debug/ovmf/${EXTENDPE}${PV}-${PR}" +export GCC_PREFIX_MAP = "${DEBUG_PREFIX_MAP} -Wno-stringop-overflow -Wno-maybe-uninitialized" + GCC_VER="$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}')" fixup_target_tools() { diff --git a/poky/meta/recipes-core/systemd/systemd-boot_247.6.bb b/poky/meta/recipes-core/systemd/systemd-boot_248.3.bb index 249e620f4e..249e620f4e 100644 --- a/poky/meta/recipes-core/systemd/systemd-boot_247.6.bb +++ b/poky/meta/recipes-core/systemd/systemd-boot_248.3.bb diff --git a/poky/meta/recipes-core/systemd/systemd-conf_247.6.bb b/poky/meta/recipes-core/systemd/systemd-conf_1.0.bb index ea35e83f4f..235923be85 100644 --- a/poky/meta/recipes-core/systemd/systemd-conf_247.6.bb +++ b/poky/meta/recipes-core/systemd/systemd-conf_1.0.bb @@ -5,6 +5,8 @@ DefaultTimeoutStartSec setting." LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PE = "1" + PACKAGECONFIG ??= "dhcp-ethernet" PACKAGECONFIG[dhcp-ethernet] = "" diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl index de733e255b..e8c3d2d1ee 100755 --- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -160,7 +160,9 @@ def add_link(path, target): class SystemdUnitNotFoundError(Exception): - pass + def __init__(self, path, unit): + self.path = path + self.unit = unit class SystemdUnit(): @@ -224,7 +226,10 @@ class SystemdUnit(): try: for also in config.get('Install', 'Also'): - SystemdUnit(self.root, also).enable() + try: + SystemdUnit(self.root, also).enable() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) except KeyError: pass @@ -265,7 +270,10 @@ def preset_all(root): state = presets.state(service) if state == "enable" or state is None: - SystemdUnit(root, service).enable() + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError: + sys.exit("Error: Systemctl preset_all issue in %s" % service) # If we populate the systemd links we also create /etc/machine-id, which # allows systemd to boot with the filesystem read-only before generating @@ -307,10 +315,16 @@ def main(): if command == "mask": for service in args.service: - SystemdUnit(root, service).mask() + try: + SystemdUnit(root, service).mask() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main mask issue in %s (%s)" % (service, e.unit)) elif command == "enable": for service in args.service: - SystemdUnit(root, service).enable() + try: + SystemdUnit(root, service).enable() + except SystemdUnitNotFoundError as e: + sys.exit("Error: Systemctl main enable issue in %s (%s)" % (service, e.unit)) elif command == "preset-all": if len(args.service) != 0: sys.exit("Too many arguments.") diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 7d3b3064ba..0524a25008 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,8 +14,9 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "17472dca0160cbe7b807ca648475fd70d0d62fe5" -SRCBRANCH = "v247-stable" -SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" +SRCREV = "37c4cfde0ce613f0f00544d3f4e2e72bf93d9c76" +SRCBRANCH = "v248-stable" +SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \ +" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch b/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch deleted file mode 100644 index fd7f94a61d..0000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-analyze-resolve-executable-path-if-it-is-relative.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b9b7a8e3825f0433e120f7a6d7d5d635a839cab9 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 21 Jan 2021 06:19:44 +0000 -Subject: [PATCH] analyze: resolve executable path if it is relative - -Upstream-Status: Backport [https://github.com/systemd/systemd/commit/f1fb046a985521f7d4a662f02546686ff20b7e5d] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - src/analyze/analyze-verify.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c -index a9c89173bf..969523df18 100644 ---- a/src/analyze/analyze-verify.c -+++ b/src/analyze/analyze-verify.c -@@ -115,14 +115,17 @@ static int verify_socket(Unit *u) { - } - - int verify_executable(Unit *u, const ExecCommand *exec) { -+ int r; -+ - if (!exec) - return 0; - - if (exec->flags & EXEC_COMMAND_IGNORE_FAILURE) - return 0; - -- if (access(exec->path, X_OK) < 0) -- return log_unit_error_errno(u, errno, "Command %s is not executable: %m", exec->path); -+ r = find_executable_full(exec->path, false, NULL); -+ if (r < 0) -+ return log_unit_error_errno(u, r, "Command %s is not executable: %m", exec->path); - - return 0; - } --- -2.26.2 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch b/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch deleted file mode 100644 index 89ef39bc3e..0000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 150d9cade6d475570395cb418b824524dead9577 Mon Sep 17 00:00:00 2001 -From: Joshua Watt <JPEWhacker@gmail.com> -Date: Fri, 30 Oct 2020 08:15:43 -0500 -Subject: [PATCH] logind: Restore chvt as non-root user without polkit - -4acf0cfd2f ("logind: check PolicyKit before allowing VT switch") broke -the ability to write user sessions that run graphical sessions (e.g. -weston/X11). This was partially amended in 19bb87fbfa ("login: allow -non-console sessions to change vt") by changing the default PolicyKit -policy so that non-root users are again allowed to switch the VT. This -makes the policy when PolKit is not enabled (as on many embedded -systems) match the default PolKit policy and allows launching graphical -sessions as a non-root user. - -Closes #17473 ---- - src/login/logind-dbus.c | 11 ++------- - src/login/logind-polkit.c | 26 +++++++++++++++++++++ - src/login/logind-polkit.h | 10 ++++++++ - src/login/logind-seat-dbus.c | 41 ++++----------------------------- - src/login/logind-session-dbus.c | 11 ++------- - src/login/meson.build | 1 + - 6 files changed, 46 insertions(+), 54 deletions(-) - create mode 100644 src/login/logind-polkit.c - create mode 100644 src/login/logind-polkit.h - -diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 0f83ed99bc..a3765d88ba 100644 ---- a/src/login/logind-dbus.c -+++ b/src/login/logind-dbus.c -@@ -30,6 +30,7 @@ - #include "format-util.h" - #include "fs-util.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-session-dbus.h" - #include "logind-user-dbus.h" -@@ -1047,15 +1048,7 @@ static int method_activate_session_on_seat(sd_bus_message *message, void *userda - return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, - "Session %s not on seat %s", session_name, seat_name); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &m->polkit_registry, -- error); -+ r = check_polkit_chvt(message, m, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/logind-polkit.c b/src/login/logind-polkit.c -new file mode 100644 -index 0000000000..9072570cc6 ---- /dev/null -+++ b/src/login/logind-polkit.c -@@ -0,0 +1,26 @@ -+/* SPDX-License-Identifier: LGPL-2.1+ */ -+ -+#include "bus-polkit.h" -+#include "logind-polkit.h" -+#include "missing_capability.h" -+#include "user-util.h" -+ -+int check_polkit_chvt(sd_bus_message *message, Manager *manager, sd_bus_error *error) { -+#if ENABLE_POLKIT -+ return bus_verify_polkit_async( -+ message, -+ CAP_SYS_ADMIN, -+ "org.freedesktop.login1.chvt", -+ NULL, -+ false, -+ UID_INVALID, -+ &manager->polkit_registry, -+ error); -+#else -+ /* Allow chvt when polkit is not present. This allows a service to start a graphical session as a -+ * non-root user when polkit is not compiled in, matching the default polkit policy */ -+ return 1; -+#endif -+} -+ -+ -diff --git a/src/login/logind-polkit.h b/src/login/logind-polkit.h -new file mode 100644 -index 0000000000..476c077a8a ---- /dev/null -+++ b/src/login/logind-polkit.h -@@ -0,0 +1,10 @@ -+/* SPDX-License-Identifier: LGPL-2.1+ */ -+#pragma once -+ -+#include "sd-bus.h" -+ -+#include "bus-object.h" -+#include "logind.h" -+ -+int check_polkit_chvt(sd_bus_message *message, Manager *manager, sd_bus_error *error); -+ -diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c -index a945132284..f22e9e2734 100644 ---- a/src/login/logind-seat-dbus.c -+++ b/src/login/logind-seat-dbus.c -@@ -9,6 +9,7 @@ - #include "bus-polkit.h" - #include "bus-util.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-seat.h" - #include "logind-session-dbus.h" -@@ -179,15 +180,7 @@ static int method_activate_session(sd_bus_message *message, void *userdata, sd_b - if (session->seat != s) - return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, "Session %s not on seat %s", name, s->id); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -215,15 +208,7 @@ static int method_switch_to(sd_bus_message *message, void *userdata, sd_bus_erro - if (to <= 0) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid virtual terminal"); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -243,15 +228,7 @@ static int method_switch_to_next(sd_bus_message *message, void *userdata, sd_bus - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -@@ -271,15 +248,7 @@ static int method_switch_to_previous(sd_bus_message *message, void *userdata, sd - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c -index ccc5ac8df2..57c8a4e900 100644 ---- a/src/login/logind-session-dbus.c -+++ b/src/login/logind-session-dbus.c -@@ -11,6 +11,7 @@ - #include "fd-util.h" - #include "logind-brightness.h" - #include "logind-dbus.h" -+#include "logind-polkit.h" - #include "logind-seat-dbus.h" - #include "logind-session-dbus.h" - #include "logind-session-device.h" -@@ -192,15 +193,7 @@ int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_ - assert(message); - assert(s); - -- r = bus_verify_polkit_async( -- message, -- CAP_SYS_ADMIN, -- "org.freedesktop.login1.chvt", -- NULL, -- false, -- UID_INVALID, -- &s->manager->polkit_registry, -- error); -+ r = check_polkit_chvt(message, s->manager, error); - if (r < 0) - return r; - if (r == 0) -diff --git a/src/login/meson.build b/src/login/meson.build -index 0a7d3d5440..7e46be2add 100644 ---- a/src/login/meson.build -+++ b/src/login/meson.build -@@ -26,6 +26,7 @@ liblogind_core_sources = files(''' - logind-device.h - logind-inhibit.c - logind-inhibit.h -+ logind-polkit.c - logind-seat-dbus.c - logind-seat-dbus.h - logind-seat.c --- -2.28.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch b/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch new file mode 100644 index 0000000000..3af1daac9c --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch @@ -0,0 +1,29 @@ +From 1adde6721ead386ccee6efe48038d6944b96319a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 24 May 2021 18:26:27 -0700 +Subject: [PATCH] test-parse-argument: Include signal.h + +Fixes +src/test/test-parse-argument.c:49:29: error: use of undeclared identifier 'SIGABRT' + +Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19718] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/test/test-parse-argument.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test/test-parse-argument.c b/src/test/test-parse-argument.c +index 4081a9f25a..820d69f092 100644 +--- a/src/test/test-parse-argument.c ++++ b/src/test/test-parse-argument.c +@@ -3,6 +3,7 @@ + #include "parse-argument.h" + #include "stdio-util.h" + #include "tests.h" ++#include <signal.h> + + static void test_parse_json_argument(void) { + log_info("/* %s */", __func__); +-- +2.31.1 + diff --git a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index d856bcb583..4cdf66e767 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -1,7 +1,7 @@ -From 66ece0b870b3a34fdabc48b88437e6cc354e9fce Mon Sep 17 00:00:00 2001 +From 159c53612444ec1df492bae528a5a88a275b93bf Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 13:41:41 +0800 -Subject: [PATCH 02/26] don't use glibc-specific qsort_r +Subject: [PATCH] don't use glibc-specific qsort_r Upstream-Status: Inappropriate [musl specific] @@ -12,6 +12,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/basic/sort-util.h | 14 ------------ src/libsystemd/sd-hwdb/hwdb-util.c | 19 +++++++++++----- @@ -19,14 +20,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index 1d194a1f04..3394c9eb72 100644 +index 49586a4a24..d92a5ab0ed 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h -@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ +@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ }) -- + -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { - if (nmemb <= 1) - return; @@ -40,11 +40,13 @@ index 1d194a1f04..3394c9eb72 100644 - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ - }) +- + int cmp_int(const int *a, const int *b); diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c -index 4c94ba9c88..95495dba6d 100644 +index fd45ff0f54..ac4b63c49b 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c -@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) { +@@ -126,9 +126,13 @@ static struct trie* trie_free(struct trie *trie) { DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); @@ -85,10 +87,10 @@ index 4c94ba9c88..95495dba6d 100644 } diff --git a/src/shared/format-table.c b/src/shared/format-table.c -index a13a198b7a..bce10bc607 100644 +index dccb796b26..c3ab8ac296 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c -@@ -1243,30 +1243,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t +@@ -1290,30 +1290,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t return CMP(index_a, index_b); } @@ -131,7 +133,7 @@ index a13a198b7a..bce10bc607 100644 } /* Order identical lines by the order there were originally added in */ -@@ -1844,7 +1846,12 @@ int table_print(Table *t, FILE *f) { +@@ -1952,7 +1954,12 @@ int table_print(Table *t, FILE *f) { for (size_t i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -145,7 +147,7 @@ index a13a198b7a..bce10bc607 100644 } if (t->display_map) -@@ -2440,7 +2447,12 @@ int table_to_json(Table *t, JsonVariant **ret) { +@@ -2580,7 +2587,12 @@ int table_to_json(Table *t, JsonVariant **ret) { for (size_t i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -159,6 +161,3 @@ index a13a198b7a..bce10bc607 100644 } if (t->display_map) --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch index f43a22aa8b..9b1768d9ca 100644 --- a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch @@ -1,7 +1,7 @@ -From 9f0d5996bbb2db3679a4075fa8301750b786c03b Mon Sep 17 00:00:00 2001 +From 4afb8adc83348bf75964fc10af7902e04dd62637 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH 03/26] missing_type.h: add __compare_fn_t and comparison_fn_t +Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t Make it work with musl where comparison_fn_t and __compare_fn_t is not provided. @@ -13,11 +13,12 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [Rebased for v242] Signed-off-by: Andrej Valek <andrej.valek@siemens.com> + --- - src/basic/missing_type.h | 9 +++++++++ - src/basic/sort-util.h | 1 + - src/core/kmod-setup.c | 1 + - src/journal/catalog.c | 1 + + src/basic/missing_type.h | 9 +++++++++ + src/basic/sort-util.h | 1 + + src/core/kmod-setup.c | 1 + + src/libsystemd/sd-journal/catalog.c | 1 + 4 files changed, 12 insertions(+) diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h @@ -38,7 +39,7 @@ index f6233090a9..aeaf6ad5ec 100644 +typedef int (*__compar_fn_t)(const void *, const void *); +#endif diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index 3394c9eb72..d9cb2aecb6 100644 +index d92a5ab0ed..a63867c716 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h @@ -4,6 +4,7 @@ @@ -61,10 +62,10 @@ index 8a7f82812a..a56f12f47f 100644 #if HAVE_KMOD #include "module-util.h" -diff --git a/src/journal/catalog.c b/src/journal/catalog.c -index 0f6ad8a29e..4e1077ade4 100644 ---- a/src/journal/catalog.c -+++ b/src/journal/catalog.c +diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c +index aea3241d18..75e6c56a28 100644 +--- a/src/libsystemd/sd-journal/catalog.c ++++ b/src/libsystemd/sd-journal/catalog.c @@ -28,6 +28,7 @@ #include "string-util.h" #include "strv.h" @@ -73,6 +74,3 @@ index 0f6ad8a29e..4e1077ade4 100644 const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index bdd64a0252..dc40a2fe8d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -1,7 +1,7 @@ -From f3dbe29f7620a063af4d8eb3ea7c48ecd410200d Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Mon, 25 Feb 2019 14:04:21 +0800 -Subject: [PATCH 04/26] add fallback parse_printf_format implementation +From 6c18e5f9373da3e3b38f2c5727e2aefe07fcbbd9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Sat, 22 May 2021 20:26:24 +0200 +Subject: [PATCH] [PATCH] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific] @@ -11,21 +11,21 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- - meson.build | 1 + - src/basic/meson.build | 5 + - src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++ - src/basic/parse-printf-format.h | 57 +++++++ - src/basic/stdio-util.h | 2 +- - src/journal/journal-send.c | 2 +- + meson.build | 1 + + src/basic/meson.build | 5 + + src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++ + src/basic/parse-printf-format.h | 57 +++++ + src/basic/stdio-util.h | 2 +- + src/libsystemd/sd-journal/journal-send.c | 2 +- 6 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h diff --git a/meson.build b/meson.build -index f406d595e6..6aa47fc755 100644 +index 27186d63a3..2abb7b3188 100644 --- a/meson.build +++ b/meson.build -@@ -646,6 +646,7 @@ endif +@@ -675,6 +675,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -34,21 +34,21 @@ index f406d595e6..6aa47fc755 100644 'valgrind/memcheck.h', 'valgrind/valgrind.h', diff --git a/src/basic/meson.build b/src/basic/meson.build -index 1183ea83ad..aa5c958850 100644 +index 60ef801a25..aba2172edd 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -322,6 +322,11 @@ foreach item : [['af', af_list_txt, 'af', ''], - endforeach +@@ -341,6 +341,11 @@ endforeach basic_sources += generated_gperf_headers -+ + +if conf.get('HAVE_PRINTF_H') != 1 + basic_sources += [files('parse-printf-format.c')] +endif + - basic_gcrypt_sources = files( - 'gcrypt-util.c', - 'gcrypt-util.h') ++ + ############################################################ + + arch_list = [ diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c new file mode 100644 index 0000000000..49437e5445 @@ -410,10 +410,10 @@ index 6dc1e72312..cea76b36cf 100644 #define snprintf_ok(buf, len, fmt, ...) \ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) -diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c index fd3fd7ef9c..e8e6ad555b 100644 ---- a/src/journal/journal-send.c -+++ b/src/journal/journal-send.c +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@ #include <errno.h> @@ -431,5 +431,5 @@ index fd3fd7ef9c..e8e6ad555b 100644 #define SNDBUF_SIZE (8*1024*1024) -- -2.27.0 +2.24.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index d63e3c0d09..814c28f5b9 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch @@ -1,7 +1,7 @@ -From 5aeae0ea89f5af74ed5d95bed1d87a03b3801ff0 Mon Sep 17 00:00:00 2001 +From 6b0732ac7164914ce16e231e35980b849bdfc4c8 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:18:21 +0800 -Subject: [PATCH 05/26] src/basic/missing.h: check for missing strndupa +Subject: [PATCH] src/basic/missing.h: check for missing strndupa include missing.h for definition of strndupa @@ -17,6 +17,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> [rebased for systemd 244] [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- meson.build | 1 + src/backlight/backlight.c | 1 + @@ -25,6 +26,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/basic/log.c | 1 + src/basic/missing_stdlib.h | 12 ++++++++++++ src/basic/mkdir.c | 1 + + src/basic/mountpoint-util.c | 1 + src/basic/parse-util.c | 1 + src/basic/path-lookup.c | 1 + src/basic/proc-cmdline.c | 1 + @@ -41,12 +43,12 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/coredump/coredump-vacuum.c | 1 + src/journal-remote/journal-remote-main.c | 1 + src/journal/journalctl.c | 1 + - src/journal/sd-journal.c | 1 + src/libsystemd/sd-bus/bus-message.c | 1 + src/libsystemd/sd-bus/bus-objects.c | 1 + src/libsystemd/sd-bus/bus-socket.c | 1 + src/libsystemd/sd-bus/sd-bus.c | 1 + src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + + src/libsystemd/sd-journal/sd-journal.c | 1 + src/locale/keymap-util.c | 1 + src/login/pam_systemd.c | 1 + src/network/generator/network-generator.c | 1 + @@ -68,14 +70,14 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/udev/udev-builtin-path_id.c | 1 + src/udev/udev-event.c | 1 + src/udev/udev-rules.c | 1 + - 50 files changed, 61 insertions(+) + 51 files changed, 62 insertions(+) --- a/meson.build +++ b/meson.build -@@ -535,6 +535,7 @@ foreach ident : [ - #include <sys/wait.h>'''], - ['mallinfo', '''#include <malloc.h>'''], +@@ -550,6 +550,7 @@ foreach ident : [ + ['execveat', '''#include <unistd.h>'''], ['close_range', '''#include <unistd.h>'''], + ['epoll_pwait2', '''#include <sys/epoll.h>'''], + ['strndupa' , '''#include <string.h>'''], ] @@ -102,7 +104,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> _cleanup_free_ char *fs = NULL; --- a/src/basic/env-util.c +++ b/src/basic/env-util.c -@@ -15,6 +15,7 @@ +@@ -18,6 +18,7 @@ #include "string-util.h" #include "strv.h" #include "utf8.h" @@ -148,9 +150,19 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> int mkdir_safe_internal( const char *path, +--- a/src/basic/mountpoint-util.c ++++ b/src/basic/mountpoint-util.c +@@ -12,6 +12,7 @@ + #include "missing_stat.h" + #include "missing_syscall.h" + #include "mkdir.h" ++#include "missing_stdlib.h" + #include "mountpoint-util.h" + #include "parse-util.h" + #include "path-util.h" --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c -@@ -22,6 +22,7 @@ +@@ -19,6 +19,7 @@ #include "stat-util.h" #include "string-util.h" #include "strv.h" @@ -197,7 +209,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> +#include "missing_stdlib.h" #if HAVE_SELINUX - DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); + DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(context_t, context_free, NULL); --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -27,6 +27,7 @@ @@ -220,10 +232,10 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c -@@ -16,6 +16,7 @@ - #include "fileio.h" +@@ -17,6 +17,7 @@ #include "limits-util.h" #include "path-util.h" + #include "percent-util.h" +#include "missing_stdlib.h" BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); @@ -240,7 +252,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c -@@ -7,6 +7,7 @@ +@@ -9,6 +9,7 @@ #include "unit-printf.h" #include "user-util.h" #include "unit.h" @@ -251,7 +263,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/core/execute.c +++ b/src/core/execute.c @@ -96,6 +96,7 @@ - #include "unit.h" + #include "unit-serialize.h" #include "user-util.h" #include "utmp-wtmp.h" +#include "missing_stdlib.h" @@ -290,7 +302,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c -@@ -22,6 +22,7 @@ +@@ -24,6 +24,7 @@ #include "stat-util.h" #include "string-table.h" #include "strv.h" @@ -300,7 +312,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c -@@ -73,6 +73,7 @@ +@@ -72,6 +72,7 @@ #include "unit-name.h" #include "user-util.h" #include "varlink.h" @@ -308,19 +320,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ ---- a/src/journal/sd-journal.c -+++ b/src/journal/sd-journal.c -@@ -40,6 +40,7 @@ - #include "string-util.h" - #include "strv.h" - #include "syslog-util.h" -+#include "missing_stdlib.h" - - #define JOURNAL_FILES_MAX 7168 - --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c -@@ -21,6 +21,7 @@ +@@ -20,6 +20,7 @@ #include "strv.h" #include "time-util.h" #include "utf8.h" @@ -330,7 +332,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c -@@ -13,6 +13,7 @@ +@@ -12,6 +12,7 @@ #include "set.h" #include "string-util.h" #include "strv.h" @@ -351,9 +353,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -41,6 +41,7 @@ - #include "process-util.h" #include "string-util.h" #include "strv.h" + #include "user-util.h" +#include "missing_stdlib.h" #define log_debug_bus_message(m) \ @@ -361,16 +363,26 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -14,6 +14,7 @@ - #include "missing_resource.h" + #include "string-util.h" #include "time-util.h" #include "util.h" +#include "missing_stdlib.h" #define MAX_SIZE (2*1024*1024) +--- a/src/libsystemd/sd-journal/sd-journal.c ++++ b/src/libsystemd/sd-journal/sd-journal.c +@@ -40,6 +40,7 @@ + #include "string-util.h" + #include "strv.h" + #include "syslog-util.h" ++#include "missing_stdlib.h" + + #define JOURNAL_FILES_MAX 7168 + --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c -@@ -21,6 +21,7 @@ +@@ -24,6 +24,7 @@ #include "string-util.h" #include "strv.h" #include "tmpfile-util.h" @@ -410,17 +422,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Settings *s; --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c -@@ -19,6 +19,7 @@ +@@ -21,6 +21,7 @@ #include "nss-util.h" #include "signal-util.h" #include "string-util.h" +#include "missing_stdlib.h" - NSS_GETHOSTBYNAME_PROTOTYPES(mymachines); - NSS_GETPW_PROTOTYPES(mymachines); + static void setup_logging(void) { + /* We need a dummy function because log_parse_environment is a macro. */ --- a/src/portable/portable.c +++ b/src/portable/portable.c -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "strv.h" #include "tmpfile-util.h" #include "user-util.h" @@ -430,7 +442,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c -@@ -37,6 +37,7 @@ +@@ -41,6 +41,7 @@ #include "terminal-util.h" #include "utf8.h" #include "verbs.h" @@ -460,7 +472,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> char *cgroup_path; --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c -@@ -44,6 +44,7 @@ +@@ -45,6 +45,7 @@ #include "unit-def.h" #include "user-util.h" #include "utf8.h" @@ -551,16 +563,16 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -22,6 +22,7 @@ - #include "strv.h" #include "sysexits.h" #include "udev-builtin.h" + #include "udev-util.h" +#include "missing_stdlib.h" _printf_(2,3) static void path_prepend(char **path, const char *fmt, ...) { --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c -@@ -34,6 +34,7 @@ +@@ -33,6 +33,7 @@ #include "udev-util.h" #include "udev-watch.h" #include "user-util.h" @@ -570,7 +582,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> sd_device *device; --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c -@@ -30,6 +30,7 @@ +@@ -31,6 +31,7 @@ #include "udev-rules.h" #include "user-util.h" #include "virt.h" @@ -578,13 +590,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") ---- a/src/basic/mountpoint-util.c -+++ b/src/basic/mountpoint-util.c -@@ -10,6 +10,7 @@ - #include "fs-util.h" - #include "missing_stat.h" - #include "missing_syscall.h" -+#include "missing_stdlib.h" - #include "mountpoint-util.h" +--- a/src/basic/percent-util.c ++++ b/src/basic/percent-util.c +@@ -3,6 +3,7 @@ + #include "percent-util.h" + #include "string-util.h" #include "parse-util.h" - #include "path-util.h" ++#include "missing_stdlib.h" + + static int parse_parts_value_whole(const char *p, const char *symbol) { + const char *pc, *n; diff --git a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch index a978558b42..54d714266e 100644 --- a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch +++ b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch @@ -1,7 +1,7 @@ -From d3ed0da271738fd0fc3d3e4d82d6f5810334b05e Mon Sep 17 00:00:00 2001 +From 2069f0b0d5ab8f869aeba635a347e0b11d362b30 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 26 Oct 2017 22:10:42 -0700 -Subject: [PATCH 06/26] Include netinet/if_ether.h +Subject: [PATCH] Include netinet/if_ether.h Fixes /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' @@ -31,6 +31,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Scott Murray <scott.murray@konsulko.com> [rebased for systemd 247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/libsystemd-network/sd-dhcp6-client.c | 1 - src/libsystemd/sd-netlink/netlink-types.c | 1 + @@ -56,7 +57,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> 21 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c -index 66f87c4b95..de1264ae46 100644 +index 410bfda10e..e70ed8be92 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,6 @@ @@ -68,7 +69,7 @@ index 66f87c4b95..de1264ae46 100644 #include "sd-dhcp6-client.h" diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c -index 6fb6c147d9..8eda02d202 100644 +index ed7b9a8cd1..112c0b09e4 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -3,6 +3,7 @@ @@ -80,7 +81,7 @@ index 6fb6c147d9..8eda02d202 100644 #include <linux/netlink.h> #include <linux/rtnetlink.h> diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index bb67beb665..f5780f1aec 100644 +index e7c4ed3c7c..3a1e4f9072 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -3,6 +3,7 @@ @@ -92,7 +93,7 @@ index bb67beb665..f5780f1aec 100644 /* When we include libgen.h because we need dirname() we immediately * undefine basename() since libgen.h defines it as a macro to the POSIX diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c -index e27f36067b..8868f1da5d 100644 +index cf7ca88d6f..34ab468191 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -1,5 +1,6 @@ @@ -103,7 +104,7 @@ index e27f36067b..8868f1da5d 100644 #include "bond.h" #include "bond-util.h" diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c -index 1f59cd8b42..5fdbae7e99 100644 +index 38432f1578..79ccfe578e 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -1,5 +1,6 @@ @@ -114,7 +115,7 @@ index 1f59cd8b42..5fdbae7e99 100644 #include "bridge.h" diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c -index 82e71c3920..fbae86e216 100644 +index 77c5f8c4e7..04be1b4ab2 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -1,5 +1,6 @@ @@ -125,19 +126,19 @@ index 82e71c3920..fbae86e216 100644 #include <linux/if_ether.h> #include <linux/if_macsec.h> diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf -index 4e89761f2c..91251fa6ec 100644 +index 8abe044890..3c54c58928 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf -@@ -2,6 +2,7 @@ +@@ -3,6 +3,7 @@ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") #endif +#include <netinet/if_ether.h> #include <stddef.h> #include "bareudp.h" - #include "bond.h" + #include "batadv.h" diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c -index 9f390b5781..62aeafb1e4 100644 +index b31f0fa81a..c80e1ff537 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -1,5 +1,6 @@ @@ -148,7 +149,7 @@ index 9f390b5781..62aeafb1e4 100644 #include <netinet/in.h> #include <unistd.h> diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c -index e53c73c30c..9bf0771b84 100644 +index 2847b336c9..4d6af8c642 100644 --- a/src/network/networkd-brvlan.c +++ b/src/network/networkd-brvlan.c @@ -4,6 +4,7 @@ @@ -160,7 +161,7 @@ index e53c73c30c..9bf0771b84 100644 #include <stdbool.h> diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c -index 9f58121350..554d006cb8 100644 +index 00d055cf8d..65821c1d31 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -1,7 +1,8 @@ @@ -171,9 +172,9 @@ index 9f58121350..554d006cb8 100644 +#include <net/if_arp.h> +#include <net/if.h> + #include "bus-error.h" #include "dhcp-internal.h" - #include "dhcp6-internal.h" -@@ -10,6 +11,7 @@ +@@ -11,6 +12,7 @@ #include "networkd-dhcp-common.h" #include "networkd-link.h" #include "networkd-manager.h" @@ -182,7 +183,7 @@ index 9f58121350..554d006cb8 100644 #include "parse-util.h" #include "socket-util.h" diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c -index cf279c640d..bae541029b 100644 +index 5cdf432c27..93cffb9863 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,8 +1,8 @@ @@ -197,7 +198,7 @@ index cf279c640d..bae541029b 100644 #include "sd-dhcp-server.h" diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c -index f3c1e5f609..e4ef6eca63 100644 +index 23dc3a45db..7ae6c2467a 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -1,9 +1,9 @@ @@ -212,7 +213,7 @@ index f3c1e5f609..e4ef6eca63 100644 #include "escape.h" #include "alloc-util.h" diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c -index 5c077c1ec8..fa98042aa5 100644 +index aa077d6219..4f6ce22059 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -3,9 +3,9 @@ @@ -227,7 +228,7 @@ index 5c077c1ec8..fa98042aa5 100644 #include "sd-dhcp6-client.h" diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 3bfe636691..e0c68c8ad3 100644 +index 8219d95b0d..c92230453b 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1,8 +1,8 @@ @@ -241,7 +242,7 @@ index 3bfe636691..e0c68c8ad3 100644 #include <unistd.h> diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c -index 3254641461..f0ada419fd 100644 +index e5ffd35b6f..871ebb32c6 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -1,5 +1,6 @@ @@ -252,7 +253,7 @@ index 3254641461..f0ada419fd 100644 #include <netinet/in.h> #include <linux/netdevice.h> diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c -index 0ed89584ef..e7e157c201 100644 +index a74541a6c9..a10549b336 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,7 +1,10 @@ @@ -268,7 +269,7 @@ index 0ed89584ef..e7e157c201 100644 #include "alloc-util.h" #include "netlink-util.h" diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c -index 475cac7527..9bae6eda16 100644 +index ce34449554..0b5dc01182 100644 --- a/src/network/test-network-tables.c +++ b/src/network/test-network-tables.c @@ -1,5 +1,6 @@ @@ -279,7 +280,7 @@ index 475cac7527..9bae6eda16 100644 #include "dhcp6-internal.h" #include "dhcp6-protocol.h" diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c -index e6fab262f2..41dd3d7df7 100644 +index 654d36a83a..f4ed42d543 100644 --- a/src/shared/ethtool-util.c +++ b/src/shared/ethtool-util.c @@ -1,5 +1,6 @@ @@ -290,7 +291,7 @@ index e6fab262f2..41dd3d7df7 100644 #include <sys/ioctl.h> #include <linux/ethtool.h> diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h -index f94b3e15bf..08a7e4fa09 100644 +index 11e2906681..a171df0737 100644 --- a/src/shared/ethtool-util.h +++ b/src/shared/ethtool-util.h @@ -3,6 +3,7 @@ @@ -302,7 +303,7 @@ index f94b3e15bf..08a7e4fa09 100644 #include "conf-parser.h" diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c -index d12fd0e299..636806dc23 100644 +index 31e5d0cd67..f25f821364 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -1,5 +1,6 @@ @@ -323,6 +324,3 @@ index 87e1fb133e..13876029d0 100644 #include "alloc-util.h" #include "device-util.h" #include "errno-util.h" --- -2.25.1 - diff --git a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 6865421586..2ff08c7fae 100644 --- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch @@ -1,8 +1,7 @@ -From 87a14dde13c8fa68239a4ab62914a093062b3b29 Mon Sep 17 00:00:00 2001 +From bca73ff2fbff2dc311040a87a4f536f89af07ad6 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH 07/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not - defined +Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined If the standard library doesn't provide brace expansion users just won't get it. @@ -17,6 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/glob-util.c | 12 ++++++++++++ src/test/test-glob-util.c | 16 ++++++++++++++++ @@ -115,10 +115,10 @@ index df6444c433..79a692046e 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index 9906c70eef..5eb63b1d57 100644 +index 6b73d1e6d5..26b3b74275 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c -@@ -63,6 +63,12 @@ +@@ -66,6 +66,12 @@ #include "umask-util.h" #include "user-util.h" @@ -131,7 +131,7 @@ index 9906c70eef..5eb63b1d57 100644 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1936,7 +1942,9 @@ finish: +@@ -1947,7 +1953,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -141,7 +141,7 @@ index 9906c70eef..5eb63b1d57 100644 }; int r = 0, k; char **fn; -@@ -1956,7 +1964,9 @@ static int glob_item(Item *i, action_t action) { +@@ -1967,7 +1975,9 @@ static int glob_item(Item *i, action_t action) { static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -151,6 +151,3 @@ index 9906c70eef..5eb63b1d57 100644 }; int r = 0, k; char **fn; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch index 94cdc2efde..142ca01345 100644 --- a/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch @@ -1,7 +1,7 @@ -From 8caea3fe87d55fd16de7d1b8266239fa954cb498 Mon Sep 17 00:00:00 2001 +From e0d1912f0246c97e5e7b4177691363d2d077e11d Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH 08/26] add missing FTW_ macros for musl +Subject: [PATCH] add missing FTW_ macros for musl This is to avoid build failures like below for musl. @@ -10,6 +10,7 @@ This is to avoid build failures like below for musl. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_type.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) @@ -42,6 +43,3 @@ index aeaf6ad5ec..3df1084ef2 100644 +#ifndef FTW_SKIP_SIBLINGS +#define FTW_SKIP_SIBLINGS 3 +#endif --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch index 76cc75cf6a..53f0a1ba62 100644 --- a/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch @@ -1,17 +1,18 @@ -From d8e4f0aa1760e4c7bb8476beecd35025c9cbb95a Mon Sep 17 00:00:00 2001 +From bb41fe773881a8f1d9615d388320b9c6fc47bfe5 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:03:47 +0800 -Subject: [PATCH 09/26] fix missing of __register_atfork for non-glibc builds +Subject: [PATCH] fix missing of __register_atfork for non-glibc builds Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/process-util.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 0851613fc9..4417101569 100644 +index 7d4301eadb..caa9dfe3a3 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -18,6 +18,9 @@ @@ -24,7 +25,7 @@ index 0851613fc9..4417101569 100644 #include "alloc-util.h" #include "architecture.h" -@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) { +@@ -1121,11 +1124,15 @@ void reset_cached_pid(void) { cached_pid = CACHED_PID_UNSET; } @@ -40,6 +41,3 @@ index 0851613fc9..4417101569 100644 pid_t getpid_cached(void) { static bool installed = false; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch index aeacd865ae..af1a6bb053 100644 --- a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch @@ -1,7 +1,7 @@ -From e45bb02174812e4935214f42a18725be320770d5 Mon Sep 17 00:00:00 2001 +From dc40487e0ac26e3ca317429b9c3e8f01772de60a Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH 10/26] Use uintmax_t for handling rlim_t +Subject: [PATCH] Use uintmax_t for handling rlim_t PRIu{32,64} is not right format to represent rlim_t type therefore use %ju and typecast the rlim_t variables to @@ -20,6 +20,7 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/format-util.h | 8 +------- src/basic/rlimit-util.c | 10 +++++----- @@ -46,10 +47,10 @@ index b7e18768e3..3195ab205d 100644 #if SIZEOF_DEV_T == 8 # define DEV_FMT "%" PRIu64 diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c -index 880976312c..9e1b61cd4a 100644 +index 23d108d5df..94373c9422 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c -@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { +@@ -308,13 +308,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) s = strdup("infinity"); else if (rl->rlim_cur >= RLIM_INFINITY) @@ -67,7 +68,7 @@ index 880976312c..9e1b61cd4a 100644 if (!s) return -ENOMEM; -@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { +@@ -405,7 +405,7 @@ int rlimit_nofile_safe(void) { rl.rlim_cur = FD_SETSIZE; if (setrlimit(RLIMIT_NOFILE, &rl) < 0) @@ -77,10 +78,10 @@ index 880976312c..9e1b61cd4a 100644 return 1; } diff --git a/src/core/execute.c b/src/core/execute.c -index 89632e0582..335283776c 100644 +index f82fc294c0..4696d055a8 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -5288,9 +5288,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { +@@ -5370,9 +5370,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n", @@ -92,6 +93,3 @@ index 89632e0582..335283776c 100644 } if (c->ioprio_set) { --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch index 6d7fdbcb64..b1d782719c 100644 --- a/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ b/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch @@ -1,13 +1,13 @@ -From d1db531ddd3bbf94d5e764b7917bcc8684ff6357 Mon Sep 17 00:00:00 2001 +From f8be7b283309e4332eedc088774daac637afef7b Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Wed, 28 Feb 2018 21:25:22 -0800 -Subject: [PATCH 11/26] test-sizeof.c: Disable tests for missing typedefs in - musl +Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/test/test-sizeof.c | 4 ++++ 1 file changed, 4 insertions(+) @@ -37,6 +37,3 @@ index 3c9dc180fa..e1a59d408c 100644 info(pid_t); info(uid_t); info(gid_t); --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index c15b6e7d82..5f2178734d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -1,7 +1,7 @@ -From 03e89da266edf70121a19ffc32a78cc3b97585ef Mon Sep 17 00:00:00 2001 +From 06915b70735caa66987af758ebdc4207757ae758 Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH 12/26] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() +Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to do and it's not portable (not supported by musl). See: @@ -25,20 +25,22 @@ just historical and not actually necessary or desired behaviour? Upstream-Status: Inappropriate [musl specific] Signed-off-by: Andre McCurdy <armccurdy@gmail.com> + --- - src/basic/fs-util.h | 22 +++++++++++++++++++++- + src/basic/fs-util.h | 23 +++++++++++++++++++++-- src/shared/base-filesystem.c | 6 +++--- - 2 files changed, 24 insertions(+), 4 deletions(-) + 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 5dc8853eac..0491b3dae2 100644 +index 027037f7a7..16eb379caf 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h -@@ -43,7 +43,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); +@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st); --#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) +-#define laccess(path, mode) \ +- (faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) < 0 ? -errno : 0) +/* + Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to + do and it's not portable (not supported by musl). See: @@ -94,6 +96,3 @@ index 1d05409086..1ed06c31ab 100644 continue; } --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 89736bcfde..51b145729d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -1,8 +1,7 @@ -From dd134880e9a16595ab473934577e873c748e9c7a Mon Sep 17 00:00:00 2001 +From 0c44af262cfa07c57db4b32de1f7610af47797f4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH 13/26] Define glibc compatible basename() for non-glibc - systems +Subject: [PATCH] Define glibc compatible basename() for non-glibc systems Fixes builds with musl, even though systemd is adamant about using non-posix basename implementation, we have a way out @@ -10,12 +9,13 @@ using non-posix basename implementation, we have a way out Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- src/machine/machine-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index f5780f1aec..aec5825b3e 100644 +index 3a1e4f9072..ab87b9882c 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -11,6 +11,11 @@ @@ -30,6 +30,3 @@ index f5780f1aec..aec5825b3e 100644 #include "alloc-util.h" #include "bus-common-errors.h" #include "bus-get-properties.h" --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index e95d2ae078..7444d4375f 100644 --- a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -1,7 +1,7 @@ -From 55af446156da863b5b36a1109845858956a4c274 Mon Sep 17 00:00:00 2001 +From 0f4b60e34a806055c678eb97a7ec7e21291bcf48 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH 14/26] Do not disable buffering when writing to oom_score_adj +Subject: [PATCH] Do not disable buffering when writing to oom_score_adj On musl, disabling buffering when writing to oom_score_adj will cause the following error. @@ -19,15 +19,16 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 4417101569..556dab8ebf 100644 +index caa9dfe3a3..6101f43db5 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) { +@@ -1523,7 +1523,7 @@ int set_oom_score_adjust(int value) { sprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t, @@ -36,6 +37,3 @@ index 4417101569..556dab8ebf 100644 } int pidfd_get_pid(int fd, pid_t *ret) { --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index 5cdcf84dc1..90cc70d216 100644 --- a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -1,7 +1,7 @@ -From e382845aed90cfe4496a8351d57d4466dd2e9a9c Mon Sep 17 00:00:00 2001 +From c30ab62d18ce88187f5eb6c236e0977c9337f68d Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH 15/26] distinguish XSI-compliant strerror_r from GNU-specifi +Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi strerror_r XSI-compliant strerror_r and GNU-specifi strerror_r are different. @@ -18,28 +18,12 @@ assigned to (char *) variable, resulting in segment fault. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- - src/journal/journal-send.c | 5 +++++ - src/libsystemd/sd-bus/bus-error.c | 5 +++++ + src/libsystemd/sd-bus/bus-error.c | 5 +++++ + src/libsystemd/sd-journal/journal-send.c | 5 +++++ 2 files changed, 10 insertions(+) -diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c -index e8e6ad555b..8ca5271d02 100644 ---- a/src/journal/journal-send.c -+++ b/src/journal/journal-send.c -@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove - char* j; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+ j = buffer + 8 + k; -+#else - j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+#endif - if (errno == 0) { - char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; - diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index 8da2024a50..9605a9b869 100644 --- a/src/libsystemd/sd-bus/bus-error.c @@ -57,6 +41,20 @@ index 8da2024a50..9605a9b869 100644 if (errno == ERANGE || strlen(x) >= k - 1) { free(m); k *= 2; --- -2.27.0 - +diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c +index e8e6ad555b..8ca5271d02 100644 +--- a/src/libsystemd/sd-journal/journal-send.c ++++ b/src/libsystemd/sd-journal/journal-send.c +@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + diff --git a/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch index 9a125de638..de7f9ecfa2 100644 --- a/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ b/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch @@ -1,7 +1,7 @@ -From 0c7af5f288231a8c0545e169e01ba5ee173cafe7 Mon Sep 17 00:00:00 2001 +From fa86e5578256dddb296fd30128929ea7c4b792a4 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:18:00 +0800 -Subject: [PATCH 16/26] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP +Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP for currently unknown reasons they get exported to the shared libries even without being listed in the sym file @@ -11,6 +11,7 @@ Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/libsystemd/sd-bus/bus-error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) @@ -30,6 +31,3 @@ index 9605a9b869..38b6cf90c3 100644 /* Additional maps registered with sd_bus_error_add_map() are in this * NULL terminated array */ --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch index 31747c6b40..d9ef2b8a47 100644 --- a/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch +++ b/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch @@ -1,7 +1,7 @@ -From 32dd7a47b87793cd836ab4bb776d1524f24c2d58 Mon Sep 17 00:00:00 2001 +From 11e730694706fa354a0e43c588ef66677a777d9a Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:27:54 +0800 -Subject: [PATCH 17/26] missing_type.h: add __compar_d_fn_t definition +Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition Fix the following compile failure: src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'? @@ -9,6 +9,7 @@ src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_type.h | 1 + 1 file changed, 1 insertion(+) @@ -25,6 +26,3 @@ index 3df1084ef2..697aa7f58a 100644 #endif #ifndef __COMPAR_FN_T --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch index 56d361a213..3b60854233 100644 --- a/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -1,7 +1,7 @@ -From bfc3416edeb69082ac9b9c9e844f12d7b45bb006 Mon Sep 17 00:00:00 2001 +From 45bae28d3da6607d33d54f4b30a500f5249aadde Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH 18/26] avoid redefinition of prctl_mm_map structure +Subject: [PATCH] avoid redefinition of prctl_mm_map structure Fix the following compile failure: error: redefinition of 'struct prctl_mm_map' @@ -9,6 +9,7 @@ error: redefinition of 'struct prctl_mm_map' Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/basic/missing_prctl.h | 2 ++ 1 file changed, 2 insertions(+) @@ -27,6 +28,3 @@ index ab851306ba..5547cad875 100644 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ #ifndef PR_CAP_AMBIENT --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch b/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch index 6ca196489b..7d6433f317 100644 --- a/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch +++ b/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch @@ -1,16 +1,17 @@ -From e427f03de2c56e868bb0f24aa231315b2dae1b71 Mon Sep 17 00:00:00 2001 +From 6e593ff2afbe4bfe15eee2ec34e51490a38462f5 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Fri, 7 Aug 2020 15:19:27 +0000 -Subject: [PATCH 19/26] Handle missing LOCK_EX +Subject: [PATCH] Handle missing LOCK_EX Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> + --- src/partition/makefs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/partition/makefs.c b/src/partition/makefs.c -index fd924d2231..b97580fdcc 100644 +index 7c94fbfedb..42f966722d 100644 --- a/src/partition/makefs.c +++ b/src/partition/makefs.c @@ -6,6 +6,7 @@ @@ -21,6 +22,3 @@ index fd924d2231..b97580fdcc 100644 #include "alloc-util.h" #include "blockdev-util.h" --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch index f74de43849..1faee1c055 100644 --- a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch @@ -1,7 +1,7 @@ -From 9abbc5e69e21aef0d4d4567e69302fa660b76c53 Mon Sep 17 00:00:00 2001 +From ac579b296aa29c2f1dad9425c6d795e154ec8f7c Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Fri, 7 Aug 2020 15:20:17 +0000 -Subject: [PATCH 20/26] Fix incompatible pointer type struct sockaddr_un * +Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un * | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns': | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] @@ -18,15 +18,16 @@ Subject: [PATCH 20/26] Fix incompatible pointer type struct sockaddr_un * Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> + --- src/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 0842731c18..3528b7ff14 100644 +index a4ac8ed2bb..0c41a48d4b 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -5084,7 +5084,7 @@ static int cant_be_in_netns(void) { +@@ -5125,7 +5125,7 @@ static int cant_be_in_netns(void) { if (fd < 0) return log_error_errno(errno, "Failed to allocate udev control socket: %m"); @@ -35,6 +36,3 @@ index 0842731c18..3528b7ff14 100644 if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch index fa6652a5bf..14c8ff73a0 100644 --- a/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch @@ -1,7 +1,7 @@ -From 1f5bc54bed0b365e7e448c26f6c792dbe8b3b198 Mon Sep 17 00:00:00 2001 +From 6bc78df50adb48d24a2abfdf65b44b932cc5a571 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 16:53:06 +0800 -Subject: [PATCH 21/26] test-json.c: define M_PIl +Subject: [PATCH] test-json.c: define M_PIl Fix the following compile failure: src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? @@ -9,6 +9,7 @@ src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this functi Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + --- src/test/test-json.c | 4 ++++ 1 file changed, 4 insertions(+) @@ -28,6 +29,3 @@ index 1d4b11945e..572c8cf9d0 100644 static void test_tokenizer(const char *data, ...) { unsigned line = 0, column = 0; void *state = NULL; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch index 675fd20f11..bd627c51e9 100644 --- a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch @@ -1,7 +1,7 @@ -From 564dba5ad0cd884e3f69fa19ca64095413578ea5 Mon Sep 17 00:00:00 2001 +From 7cb6579572b50ef44bc0a321a4c73cce55b0c2f2 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Fri, 1 Mar 2019 15:22:15 +0800 -Subject: [PATCH 22/26] do not disable buffer in writing files +Subject: [PATCH] do not disable buffer in writing files Do not disable buffer in writing files, otherwise we get failure at boot for musl like below. @@ -18,10 +18,12 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/basic/cgroup-util.c | 10 +++++----- src/basic/procfs-util.c | 4 ++-- src/basic/smack-util.c | 2 +- + src/basic/sysctl-util.c | 2 +- src/basic/util.c | 2 +- src/binfmt/binfmt.c | 6 +++--- src/core/main.c | 4 ++-- @@ -32,18 +34,15 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> src/nspawn/nspawn-cgroup.c | 2 +- src/nspawn/nspawn.c | 6 +++--- src/shared/cgroup-setup.c | 4 ++-- - src/shared/sysctl-util.c | 2 +- src/sleep/sleep.c | 8 ++++---- - src/udev/udevadm-trigger.c | 2 +- - src/udev/udevd.c | 2 +- src/vconsole/vconsole-setup.c | 2 +- - 18 files changed, 35 insertions(+), 35 deletions(-) + 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index bb960f183c..cb804c5f4b 100644 +index 50c1ae1b2b..5b40e92163 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -759,7 +759,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -765,7 +765,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (isempty(sc)) { @@ -52,7 +51,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -777,7 +777,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -783,7 +783,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (streq(sc, "0")) { @@ -61,7 +60,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -804,7 +804,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -810,7 +810,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -70,7 +69,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -820,7 +820,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -79,7 +78,7 @@ index bb960f183c..cb804c5f4b 100644 if (r < 0) return r; -@@ -1646,7 +1646,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri if (r < 0) return r; @@ -121,11 +120,24 @@ index 3362ee3924..80c0f2a52e 100644 if (r < 0) return r; +diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c +index c96b5cd77f..d2476d9665 100644 +--- a/src/basic/sysctl-util.c ++++ b/src/basic/sysctl-util.c +@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c + + log_debug("Setting '%s' to '%s'", p, value); + +- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); + } + + int sysctl_read(const char *property, char **ret) { diff --git a/src/basic/util.c b/src/basic/util.c -index f98ecf3858..13e0f7431f 100644 +index 955b18bd2a..6d89c90176 100644 --- a/src/basic/util.c +++ b/src/basic/util.c -@@ -267,7 +267,7 @@ void disable_coredumps(void) { +@@ -234,7 +234,7 @@ void disable_coredumps(void) { if (detect_container() > 0) return; @@ -135,7 +147,7 @@ index f98ecf3858..13e0f7431f 100644 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index 43ed2f385b..37a6f578f7 100644 +index f6b72e0bae..e9fd4d06be 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { @@ -156,7 +168,7 @@ index 43ed2f385b..37a6f578f7 100644 if (r < 0) return log_error_errno(r, "Failed to add binary format: %m"); -@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) { +@@ -222,7 +222,7 @@ static int run(int argc, char *argv[]) { } /* Flush out all rules */ @@ -166,10 +178,10 @@ index 43ed2f385b..37a6f578f7 100644 STRV_FOREACH(f, files) { k = apply_file(*f, true); diff --git a/src/core/main.c b/src/core/main.c -index a280b756ff..334532cd42 100644 +index 3ee8d0a869..ec36e3e80f 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void) { +@@ -1401,7 +1401,7 @@ static int bump_unix_max_dgram_qlen(void) { if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) return 0; @@ -178,7 +190,7 @@ index a280b756ff..334532cd42 100644 if (r < 0) return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); -@@ -1666,7 +1666,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { if (getpid_cached() != 1) return; @@ -188,7 +200,7 @@ index a280b756ff..334532cd42 100644 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); } diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index 1fe592af70..603942a000 100644 +index 8cc1696a4f..ab7b4ba2c3 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c @@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { @@ -214,7 +226,7 @@ index 1fe592af70..603942a000 100644 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); #endif diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c -index d8f91f4e66..a088e6e2d8 100644 +index 58e35e403e..1d0beb4008 100644 --- a/src/hibernate-resume/hibernate-resume.c +++ b/src/hibernate-resume/hibernate-resume.c @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { @@ -227,20 +239,20 @@ index d8f91f4e66..a088e6e2d8 100644 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); return EXIT_FAILURE; diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index d06f90ce1d..43d0a58750 100644 +index d82f01a164..b8fd63346c 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -1976,7 +1976,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -1987,7 +1987,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, if (!value) return -ENOMEM; - r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); + r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); if (r < 0) { - if (r == -ELOOP) - return -EINVAL; + /* On failure, clear cache entry, as we do not know how it fails. */ + device_remove_cached_sysattr_value(device, sysattr); diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 7d757aa286..a5d9da5b7e 100644 +index 3bc424b83b..5f5eef0843 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1330,7 +1330,7 @@ static int trigger_device(Manager *m, sd_device *d) { @@ -266,10 +278,10 @@ index cb01b25bc6..e92051268b 100644 log_error_errno(r, "Failed to move process: %m"); goto finish; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 3528b7ff14..11b0c20f95 100644 +index 0c41a48d4b..9c893b18e4 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2667,7 +2667,7 @@ static int reset_audit_loginuid(void) { +@@ -2695,7 +2695,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -278,7 +290,7 @@ index 3528b7ff14..11b0c20f95 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -3920,13 +3920,13 @@ static int setup_uid_map(pid_t pid) { +@@ -3948,13 +3948,13 @@ static int setup_uid_map(pid_t pid) { xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); @@ -316,21 +328,8 @@ index f197f715c7..077f893177 100644 if (r < 0) { log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); -diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c -index 670c33108b..7c7c3dcfb6 100644 ---- a/src/shared/sysctl-util.c -+++ b/src/shared/sysctl-util.c -@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c - - log_debug("Setting '%s' to '%s'", p, value); - -- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - } - - int sysctl_read(const char *property, char **content) { diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 39ab554290..d0e566645d 100644 +index 262d4cea66..0523e8dc9b 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -48,7 +48,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca @@ -369,34 +368,8 @@ index 39ab554290..d0e566645d 100644 if (k >= 0) return 0; log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c -index 5c74184c33..65f528314e 100644 ---- a/src/udev/udevadm-trigger.c -+++ b/src/udev/udevadm-trigger.c -@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set **settle_s - if (!filename) - return log_oom(); - -- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, action, 0); - if (r < 0) { - bool ignore = IN_SET(r, -ENOENT, -ENODEV); - -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index d24b8d4398..d123a43904 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -1192,7 +1192,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { - - filename = strjoina(syspath, "/uevent"); - log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); -- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, "change", 0); - if (r < 0) - return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); - return 0; diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index b28e2853e1..115b7233a0 100644 +index d1c3febdd5..1cc68694d1 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { @@ -408,6 +381,3 @@ index b28e2853e1..115b7233a0 100644 if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch b/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch index 1cc3985d12..7d1bd60255 100644 --- a/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch +++ b/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch @@ -1,7 +1,7 @@ -From bbda4a48a34662393117fc677c3a678d4ce4c2ec Mon Sep 17 00:00:00 2001 +From d73755cc60f401f0f20f357752e45aeeeef8e83f Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH 25/26] Handle __cpu_mask usage +Subject: [PATCH] Handle __cpu_mask usage Fixes errors: @@ -18,6 +18,7 @@ add a typedef to cpu-set-util.h defining __cpu_mask appropriately. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- src/shared/cpu-set-util.h | 2 ++ src/test/test-sizeof.c | 2 +- @@ -55,6 +56,3 @@ index e1a59d408c..c269ea6e8c 100644 /* Print information about various types. Useful when diagnosing * gcc diagnostics on an unfamiliar architecture. */ --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index 4180afb08e..068600fa44 100644 --- a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch @@ -1,7 +1,7 @@ -From 47bf88f74717b417e4adbcc04256334b2335c873 Mon Sep 17 00:00:00 2001 +From 04e94f9a15101daa8f65a9af269d26cda2a24056 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH 26/26] Handle missing gshadow +Subject: [PATCH] Handle missing gshadow gshadow usage is now present in the userdb code. Mask all uses of it to allow compilation on musl @@ -10,6 +10,7 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> [Rebased for v247] Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> + --- src/shared/user-record-nss.c | 20 ++++++++++++++++++++ src/shared/user-record-nss.h | 4 ++++ @@ -138,10 +139,10 @@ index 22ab04d6ee..4e52e7a911 100644 #include <shadow.h> diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index 2d480283d1..0d19764f2e 100644 +index 613350bd46..5c821d28cd 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c -@@ -929,13 +929,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -938,13 +938,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { if (gr) { _cleanup_free_ char *buffer = NULL; bool incomplete = false; @@ -155,10 +156,10 @@ index 2d480283d1..0d19764f2e 100644 iterator->synthesize_nobody = false; +#if ENABLE_GSHADOW - r = nss_sgrp_for_group(gr, &sgrp, &buffer); - if (r < 0) { - log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name); -@@ -943,6 +946,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + if (!FLAGS_SET(iterator->flags, USERDB_AVOID_SHADOW)) { + r = nss_sgrp_for_group(gr, &sgrp, &buffer); + if (r < 0) { +@@ -957,6 +960,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { } r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); @@ -168,6 +169,3 @@ index 2d480283d1..0d19764f2e 100644 if (r < 0) return r; --- -2.27.0 - diff --git a/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch b/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch deleted file mode 100644 index 94a4c307b5..0000000000 --- a/poky/meta/recipes-core/systemd/systemd/0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 297aba739cd689e4dc9f43bb1422ec88d481099a Mon Sep 17 00:00:00 2001 -From: Paul Gortmaker <paul.gortmaker@windriver.com> -Date: Wed, 13 Jan 2021 21:09:33 +0000 -Subject: [PATCH] proc: dont trigger mount error with invalid options on old - kernels - -As of commit 4e39995371738b04d98d27b0d34ea8fe09ec9fab ("core: introduce -ProtectProc= and ProcSubset= to expose hidepid= and subset= procfs -mount options") kernels older than v5.8 generate multple warnings at -boot, as seen in this Yocto build from today: - - qemux86-64 login: root - [ 65.829009] proc: Bad value for 'hidepid' - root@qemux86-64:~# dmesg|grep proc: - [ 16.990706] proc: Bad value for 'hidepid' - [ 28.060178] proc: Bad value for 'hidepid' - [ 28.874229] proc: Bad value for 'hidepid' - [ 32.685107] proc: Bad value for 'hidepid' - [ 65.829009] proc: Bad value for 'hidepid' - root@qemux86-64:~# - -The systemd maintainer has dismissed this as something people should -simply ignore[1] and has no interest in trying to avoid it by -proactively checking the kernel version, so people can safely assume -that they will never see this version check commit upstream. - -However, as can be seen above, telling people to just ignore it is not -an option, as we'll end up answering the same question and dealing with -the same bug over and over again. - -The commit that triggers this is systemd v247-rc1~378^2~3 -- so any -systemd 247 and above plus kernel v5.7 or older will need this. - -[1] https://github.com/systemd/systemd/issues/16896 - -Upstream-Status: Denied [https://github.com/systemd/systemd/issues/16896] -Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> - -Index: git/src/core/namespace.c -=================================================================== ---- git.orig/src/core/namespace.c -+++ git/src/core/namespace.c -@@ -4,7 +4,9 @@ - #include <linux/loop.h> - #include <sched.h> - #include <stdio.h> -+#include <stdlib.h> - #include <sys/mount.h> -+#include <sys/utsname.h> - #include <unistd.h> - #include <linux/fs.h> - -@@ -860,13 +862,32 @@ static int mount_sysfs(const MountEntry - - static int mount_procfs(const MountEntry *m, const NamespaceInfo *ns_info) { - const char *entry_path; -- int r; -+ int r, major, minor; -+ struct utsname uts; -+ bool old = false; - - assert(m); - assert(ns_info); - - entry_path = mount_entry_path(m); - -+ /* If uname says that the system is older than v5.8, then the textual hidepid= stuff is not -+ * supported by the kernel, and thus the per-instance hidepid= neither, which means we -+ * really don't want to use it, since it would affect our host's /proc * mount. Hence let's -+ * gracefully fallback to a classic, unrestricted version. */ -+ -+ r = uname(&uts); -+ if (r < 0) -+ return errno; -+ -+ major = atoi(uts.release); -+ minor = atoi(strchr(uts.release, '.') + 1); -+ -+ if (major < 5 || (major == 5 && minor < 8)) { -+ log_debug("Pre v5.8 kernel detected [v%d.%d] - skipping hidepid=", major, minor); -+ old = true; -+ } -+ - /* Mount a new instance, so that we get the one that matches our user namespace, if we are running in - * one. i.e we don't reuse existing mounts here under any condition, we want a new instance owned by - * our user namespace and with our hidepid= settings applied. Hence, let's get rid of everything -@@ -875,8 +896,8 @@ static int mount_procfs(const MountEntry - (void) mkdir_p_label(entry_path, 0755); - (void) umount_recursive(entry_path, 0); - -- if (ns_info->protect_proc != PROTECT_PROC_DEFAULT || -- ns_info->proc_subset != PROC_SUBSET_ALL) { -+ if (!old && (ns_info->protect_proc != PROTECT_PROC_DEFAULT || -+ ns_info->proc_subset != PROC_SUBSET_ALL)) { - _cleanup_free_ char *opts = NULL; - - /* Starting with kernel 5.8 procfs' hidepid= logic is truly per-instance (previously it diff --git a/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index bbee6e6b28..2289404d8d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch @@ -1,4 +1,4 @@ -From 7b32582c066549fea0f7180a6c575e7fa37a867f Mon Sep 17 00:00:00 2001 +From 366cd28f5f93ba7c861cd32a718251770d74830e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 12 Apr 2021 23:44:53 -0700 Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl @@ -10,15 +10,16 @@ them here in case they are undefined Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- src/basic/missing_syscall.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h -index 0594a1b930..495d161334 100644 +index 1384324804..0202d00372 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h -@@ -15,6 +15,12 @@ +@@ -20,6 +20,12 @@ #include <asm/sgidefs.h> #endif @@ -28,9 +29,6 @@ index 0594a1b930..495d161334 100644 +#define _MIPS_SIM_ABI64 3 +#endif + - #if defined(__x86_64__) && defined(__ILP32__) - # define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000) - #elif defined(__ia64__) --- -2.31.1 - + #include "missing_keyctl.h" + #include "missing_stat.h" + #include "missing_syscall_def.h" diff --git a/poky/meta/recipes-core/systemd/systemd_247.6.bb b/poky/meta/recipes-core/systemd/systemd_248.3.bb index ce6ac7ebaa..4e65656494 100644 --- a/poky/meta/recipes-core/systemd/systemd_247.6.bb +++ b/poky/meta/recipes-core/systemd/systemd_248.3.bb @@ -14,7 +14,8 @@ inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu # that we don't build both udev and systemd in world builds. REQUIRED_DISTRO_FEATURES = "systemd" -SRC_URI += "file://touchscreen.rules \ +SRC_URI += " \ + file://touchscreen.rules \ file://00-create-volatile.conf \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ @@ -24,9 +25,7 @@ SRC_URI += "file://touchscreen.rules \ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0003-implment-systemd-sysv-install-for-OE.patch \ file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ - file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.patch \ - file://0027-proc-dont-trigger-mount-error-with-invalid-options-o.patch \ - file://0001-analyze-resolve-executable-path-if-it-is-relative.patch \ + file://0001-test-parse-argument-Include-signal.h.patch \ " # patches needed by musl @@ -474,6 +473,7 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c ${rootlibexecdir}/systemd/systemd-machined \ ${rootlibexecdir}/systemd/systemd-pull \ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ + ${exec_prefix}/lib/tmpfiles.d/README \ ${systemd_system_unitdir}/systemd-nspawn@.service \ ${libdir}/libnss_mymachines.so.2 \ ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ @@ -605,6 +605,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${exec_prefix}/lib/environment.d \ ${localstatedir} \ ${rootlibexecdir}/modprobe.d/systemd.conf \ + ${rootlibexecdir}/modprobe.d/README \ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ @@ -647,6 +648,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/ata_id \ ${rootlibexecdir}/udev/cdrom_id \ ${rootlibexecdir}/udev/collect \ + ${rootlibexecdir}/udev/dmi_memory_id \ ${rootlibexecdir}/udev/fido_id \ ${rootlibexecdir}/udev/findkeyboards \ ${rootlibexecdir}/udev/keyboard-force-release.sh \ @@ -674,6 +676,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ + ${rootlibexecdir}/udev/rules.d/70-memory.rules \ ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ @@ -683,6 +686,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ + ${rootlibexecdir}/udev/rules.d/README \ ${sysconfdir}/udev \ ${sysconfdir}/init.d/systemd-udevd \ ${systemd_unitdir}/system/*udev* \ diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc index cbf6102ee0..6b47f417aa 100644 --- a/poky/meta/recipes-core/util-linux/util-linux.inc +++ b/poky/meta/recipes-core/util-linux/util-linux.inc @@ -27,8 +27,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da FILESEXTRAPATHS_prepend := "${THISDIR}/util-linux:" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" -BPN = "util-linux" -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ file://configure-sbindir.patch \ file://runuser.pamd \ file://runuser-l.pamd \ |