summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-07-29 18:24:38 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-07-29 18:26:37 +0300
commitcb2a94c39eddda6e0df65f98fff97cce711c9134 (patch)
tree0233c00d99735de440f920eb45ef10d47e14c00a /poky/meta/recipes-core
parent322e9fc9c6aafb1be6757915ca920b5170642aa7 (diff)
downloadopenbmc-cb2a94c39eddda6e0df65f98fff97cce711c9134.tar.xz
subtree updates2.12.0-rc1
meta-openembedded: 5357c7a40e..a47ef04661: Adrian Fiergolski (1): python3-matplotlib: add missing dependency Adrian Freihofer (2): conntrack-tools: fix postinst script modemmanager: update to 1.18.8 Akash Hadke (2): ntfs-3g-ntfsprogs: Set CVE_PRODUCT to "tuxera:ntfs-3g" iperf: Set CVE_PRODUCT to "iperf_project:iperf" Armin Kuster (5): meta-oe-image: fix build depends meta-python-image: Fix build depends meta-gnome: fix layer depends. mariadb: update to 10.7.4 mariadb: Fix i386 Clang builds Ashish Sharma (1): netserver: don't change permissions on /dev/null Aurélien Bertron (1): fix(syslog-ng): warning about conf version Bartosz Golaszewski (2): python3-speedtest-cli: fix RDEPENDS python3-pybluez: fix a runtime issue with python 3.10 Bassem Boubaker (1): conntrack-tools: Fix missing capability Changqing Li (5): chrony: create /var/lib/chrony by systemd-tmpfiles redis: upgrade 6.2.6 -> 6.2.7 redis: upgrade 7.0-rc3 -> 7.0.2 apache2: upgrade 2.4.53 -> 2.4.54 zabbix: upgrade 5.2.6 -> 5.4.12 Chen Qi (1): ntfs-3g-ntfsprogs: upgrade to 2022.5.17 Davide Gardenal (11): emlog: ignore unrelated CVEs imagemagick: upgrade 7.0.10-25 -> 7.0.10-62 usrsctp: add CVE_VERSION to correctly check for CVEs openflow: ignore CVE-2018-1078 ntp: ignore many CVEs wireshark: upgrade 3.4.11 -> 3.4.12 thrift: add CVE_PRODUCT to fix CVE reporting spice: ignore patched CVEs quagga: ignore CVE-2016-4049 freeradius: ignore patched CVEs openflow: ignore unrelated CVEs Denys Dmytriyenko (3): devmem2: reinstate previous patches, removed by mistake devmem2: add support for different page sizes devmem2: the source and patches moved to github repo Diego Sueiro (1): bats: upgrade 1.6.0 -> 1.6.1 Gianfranco (2): sdbus-c++-libsystemd: Bump SRCREV to last commit of 250-stable branch libmtp: Add doxygen-native dependency in case documentation build is enabled in PACKAGECONFIG. This fixes a FTBFS due to missing dependency. Gianfranco Costamagna (1): vboxguestdrivers: upgrade 6.1.32 -> 6.1.34 Hitendra Prajapati (1): cyrus-sasl: CVE-2022-24407 failure to properly escape SQL input allows an attacker to execute arbitrary SQL commands Javier Viguera (1): networkmanager: fix build with enabled ppp Jeremy Puhlman (1): freeradius: mutlilib fixes Jiaqing Zhao (2): openldap: Remove libgcrypt dependency openldap: Upgrade 2.5.9 -> 2.5.12 Joerg Vehlow (1): jq: Fix typo OE_EXTRACONF -> EXTRA_OECONF Julien STEPHAN (1): libcamera: fix packaging Kai Kang (4): conntrack-tools: fix postinst script python3-wxgtk4: backport patch to fix svg issue libportal: add distro features check graphviz: rrecommends on liberation-fonts Khem Raj (11): ufw: Fix packaging errors found with ppc64 libcereal: Enable for glibc/ppc mimic: Use special rateconv.c license makedumpfile: Use right TARGET for ppc32 evince: Add dbus to depnedencies on non-x11 builds evolution-data-server: Do not pass --library-path to gir compiler python3-wxgtk4: Needs x11 for sip module unattended-upgrades: Disable auto-detecting modules sdbus-c++: Link with libatomic on mips/ppc32 sdbus-c++: Link with libatomic for rv32 sdbus-c++-libsystemd: Fix patch fuzz Markus Volk (1): minidlna: fix obsolete license warning Martin Jansa (3): ostree: prevent ostree-native depending on target virtual/kernel to provide kernel-module-overlay leveldb: switch from master branch to main tesseract-lang: switch from master branch to main Michael Opdenacker (1): devmem2: update SRC_URI according to redirect Mingli Yu (1): s-nail: Set VAL_MTA Nicolas Dechesne (1): imlib2: update SRC_URI Peter Marko (1): libgpiod: move test dependencies to ptest package Richard Neill (1): bats: Add patch to fix false-negatives caused by teardown code Wentao Zhang (1): protobuf-c: update to 1.4.1 fix CVE-2022-33070 Xu Huan (1): python3-astroid: upgrade 2.11.2 -> 2.11.3 Yi Zhao (4): frr: inherit autotools-brokensep instead of autotools networkmanager: fix parallel build failure dnsmasq: Security fix CVE-2022-0934 strongswan: upgrade 5.9.5 -> 5.9.6 Yue Tao (2): exo: upgrade 4.16.3 -> 4.16.4 dlt-daemon: upgrade to commit 6a3bd901d8 to fix CVE-2022-31291 wangmy (5): php: upgrade 8.1.4 -> 8.1.5 php: upgrade 8.1.5 -> 8.1.6 postgresql: upgrade 14.2 -> 14.3 postgresql: upgrade 14.3 -> 14.4 php: upgrade 8.1.6 -> 8.1.7 meta-security: 93f2146211..c79262a30b: Anton Antonov (1): Parsec-service: Update installation procedure Armin Kuster (5): fscrypt: add distro_check on pam aide: Update 01.17.4 tpm2-pkcs11: tpm2-pkcs11 module missing tpm2-tools: Add missing rdepends oeqa/cases/tpm2: fix and enhance test suite Davide Gardenal (1): sssd: ignore CVE-2018-16838 Jeremy A. Puhlman (5): aide: Add depend on audit when audit is enabled. lib-perl: prefix man pages to avoid conflicting with base perl libmhash: add multilib header python3-privacyidea: add correct path to lib/privacyidea clamav: make install owner match the added user name Jose Quaresma (1): meta-integrity: kernel-modsign: prevents splitting out debug symbols poky: d84c73d1ef..e4b5c35fd4: Ahmed Hossam (1): insane.bbclass: host-user-contaminated: Correct per package home path Alejandro Hernandez Samaniego (2): package.bbclass: Fix base directory for debugsource files when using externalsrc package.bbclass: Fix kernel source handling when not using externalsrc Alex Kiernan (1): pypi.bbclass: Set CVE_PRODUCT to PYPI_PACKAGE Alexander Kanavin (41): systemd: upgrade 250.4 -> 250.5 mesa: upgrade 22.0.0 -> 22.0.2 bind: upgrade 9.18.1 -> 9.18.2 cronie: upgrade 1.6.0 -> 1.6.1 epiphany: upgrade 42.0 -> 42.2 ffmpeg: upgrade 5.0 -> 5.0.1 fribidi: upgrade 1.0.11 -> 1.0.12 libinput: upgrade 1.19.3 -> 1.19.4 sqlite3: upgrade 3.38.2 -> 3.38.3 webkitgtk: upgrade 2.36.0 -> 2.36.1 xwayland: upgrade 22.1.0 -> 22.1.1 mmc-utils: upgrade to latest revision gst-devtools: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-libav: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-omx: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-plugins-bad: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-plugins-base: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-plugins-good: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-plugins-ugly: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-python: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-rtsp-server: upgrade 1.20.1 -> 1.20.2 gstreamer1.0: upgrade 1.20.1 -> 1.20.2 gstreamer1.0-vaapi: upgrade 1.20.1 -> 1.20.2 libcgroup: upgrade 2.0.1 -> 2.0.2 mesa: upgrade 22.0.2 -> 22.0.3 mobile-broadband-provider-info: upgrade 20220315 -> 20220511 sqlite3: upgrade 3.38.3 -> 3.38.5 bash: submit patch upstream valgrind: submit arm patches upstream zip/unzip: mark all submittable patches as Inactive-Upstream python3: use built-in distutils for ptest, rather than setuptools' 'fork' wireless-regdb: upgrade 2022.04.08 -> 2022.06.06 oeqa/sdk: drop the nativesdk-python 2.x test at: take tarballs from debian openssl: update 3.0.4 -> 3.0.5 gstreamer1.0: upgrade 1.20.2 -> 1.20.3 weston: update 10.0.0 -> 10.0.1 glib-2.0: upgrade 2.72.2 -> 2.72.3 glib-networking: upgrade 2.72.0 -> 2.72.1 libsoup: upgrade 3.0.6 -> 3.0.7 waffle: correctly request wayland-scanner executable Aryaman Gupta (1): e2fsprogs: update upstream status Bruce Ashfield (48): linux-yocto/5.10: update to v5.10.110 linux-yocto/5.10: base: enable kernel crypto userspace API linux-yocto/5.10: update to v5.10.112 linux-yocto/5.15: arm: poky-tiny cleanup and fixes linux-yocto/5.15: update to v5.15.33 linux-yocto/5.15: base: enable kernel crypto userspace API linux-yocto/5.15: kasan: fix BUG: sleeping function called from invalid context linux-yocto/5.15: fix ppc boot linux-yocto/5.15: netfilter: conntrack: avoid useless indirection during conntrack destruction linux-yocto/5.15: update to v5.15.35 linux-yocto/5.15: Fix CVE-2022-28796 linux-yocto: enable powerpc debug fragment linux-yocto/5.15: fix -standard kernel build issue linux-yocto/5.15: update to v5.15.36 linux-yocto/5.15: fix qemuarm graphical boot strace: fix ptest failure in landlock yocto-bsps: update to v5.15.36 linux-yocto/5.15: update to v5.15.37 linux-yocto/5.10: update to v5.10.113 linux-yocto/5.15: update to v5.15.38 linux-yocto/5.10: update to v5.10.114 linux-yocto/5.15: bpf: explicitly disable unpriv eBPF by default linux-yocto/5.15: update to v5.15.43 linux-yocto/5.10: update to v5.10.118 linux-yocto/5.15: Enable MDIO bus config linux-yocto/5.15: cfg/xen: Move x86 configs to separate file linux-yocto/5.15: update to v5.15.44 linux-yocto/5.10: update to v5.10.119 lttng-modules: fix build against 5.18-rc7+ linux-yocto/5.10: update to v5.10.121 linux-yocto/5.10: update to v5.10.123 linux-yocto/5.10: update to v5.10.128 linux-yocto/5.10: fix build_OID_registry/conmakehash buildpaths warning linux-yocto/5.10: fix buildpaths issue with gen-mach-types linux-yocto/5.10: update to v5.10.130 linux-yocto/5.10: fix buildpaths issue with pnmtologo linux-yocto/5.15: update to v5.15.46 linux-yocto/5.15: update to v5.15.48 linux-yocto/5.15: drop obselete GPIO sysfs ABI linux-yocto/5.15: update to v5.15.52 linux-yocto/5.15: fix qemuppc buildpaths warning linux-yocto/5.15: fix build_OID_registry buildpaths warning linux-yocto/5.15: fix buildpaths issue with gen-mach-types linux-yocto/5.15: update to v5.15.54 linux-yocto/5.15: fix buildpaths issue with pnmtologo kernel-devsrc: fix reproducibility and buildpaths QA warning kernel-devsrc: ppc32: fix reproducibility perf: fix reproducibility in 5.19+ Chanho Park (2): cargo_common.bbclass: enable bitbake vendoring for externalsrc externalsrc.bbclass: support crate fetcher on externalsrc Chen Qi (1): go-helloworld: remove unused GO_WORKDIR Christoph Lauer (1): package.bbclass: Avoid stripping signed kernel modules in splitdebuginfo Claudius Heine (2): overlayfs: add docs about skipping QA check & service dependencies classes: rootfs-postcommands: add skip option to overlayfs_qa_check David Bagonyi (1): sanity.bbclass: Add ftps to accepted URI protocols for mirrors sanity Davide Gardenal (14): cve-check: add JSON format to summary output cve-check: fix symlinks where link and output path are equal rootfs-postcommands: fix symlinks where link and output path are equal openssl: minor security upgrade 3.0.2 -> 3.0.3 freetype: backport patch for CVE-2022-27404 freetype: backport patch for CVE-2022-27405 freetype: backport patch for CVE-2022-27406 qemu: backport patch for CVE-2021-4206 qemu: backport patch for CVE-2021-4207 base-passwd: Disable shell for default users libpcre2: upgrade 10.39 -> 10.40 ncurses: update to patchlevel 20220423 baremetal-image: fix broken symlink in do_rootfs efivar: add musl libc compatibility Dmitry Baryshkov (6): linux-firmware: upgrade 20220411 -> 20220509 image.bbclass: allow overriding dependency on virtual/kernel:do_deploy linux-firmware: package new Qualcomm firmware linux-firmware: split ath3k firmware linux-firmware: add support for building snapshots linux-firmware: upgrade 20220509 -> 20220610 Ernst Sjöstrand (2): cve-check: Add helper for symlink handling cve-check: Only include installed packages for rootfs manifest Felix Moessbauer (1): wic/plugins/rootfs: Fix permissions when splitting rootfs folders across partitions Gunjan Gupta (1): bitbake: fetch2/osc: Small fixes for osc fetcher He Zhe (1): lttng-modules: Fix build failure for 5.10.119+ and 5.15.44+ kernel Hitendra Prajapati (1): pcre2: CVE-2022-1586 Out-of-bounds read Jack Mitchell (1): meson.bbclass: add cython binary to cross/native toolchain config Jeremy Puhlman (1): gcc: depend on zstd-native Jiaqing Zhao (8): libxml2: Upgrade 2.9.13 -> 2.9.14 sed: Specify shell for "nobody" user in run-ptest strace: Don't run ptest as "nobody" systemd: Drop 0001-test-parse-argument-Include-signal.h.patch systemd: Remove __compare_fn_t type in musl-specific patch systemd: Drop 0002-don-t-use-glibc-specific-qsort_r.patch systemd: Correct path returned in sd_path_lookup() systemd: Correct 0001-pass-correct-parameters-to-getdents64.patch Joerg Vehlow (1): libseccomp: Add missing files for ptests Jon Mason (2): poky-tiny: enable qemuarmv5/qemuarm64 and cleanups qemuarmv5: use arm-versatile-926ejs KMACHINE Jose Quaresma (3): archiver: use bb.note instead of echo archiver: don't use machine variables in shared recipes curl: backport openssl fix CN check error code Justin Bronder (1): pulseaudio: conditionally depend on alsa-plugins-pulseaudio-conf Kai Kang (2): xxhash: fix build with gcc 12 glibc-tests: not clear BBCLASSEXTEND Khem Raj (11): kmod: Enable xz support by default qemu: Add packageconfig for libbpf support linux-yocto: Enable powerpc-debug fragment for ppc64 LE systemd: Fix build regression with latest update ovmf: Fix native build with gcc-12 gcc: Upgrade to 11.3 release systemd: Drop redundant musl patches systemd: Document future actions needed for set of musl patches systemd: Drop 0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch systemd: Update patch status libmodule-build-perl: Use env utility to find perl interpreter Konrad Weihmann (1): linux-firmware: replace mkdir by install Lee Chee Yang (1): ghostscript: fix CVE-2022-2085 Lucas Stach (1): perf: sort-pmuevents: really keep array terminators Marcel Ziswiler (1): alsa-plugins: fix libavtp vs. avtp packageconfig Markus Volk (2): mesa.inc: package 00-radv-defaults.conf python3: Backport patch to fix an issue in subinterpreters Marta Rybczynska (9): cve-update-db-native: update the CVE database once a day only cve-update-db-native: let the user to drive the update interval cve-check: Fix report generation cve-check: move update_symlinks to a library cve-check: write empty fragment files in the text mode cve-check: fix return type in check_cves cve-update-db-native: make it possible to disable database updates cve-check: add support for Ignored CVEs oeqa/selftest/cve_check: add tests for Ignored and partial reports Martin Jansa (9): staging.bbclass: process direct dependencies in deterministic order insane.bbclass: make sure to close .patch files makedevs: Don't use COPYING.patch just to add license file into ${S} patch.py: make sure that patches/series file exists before quilt pop lttng-modules: fix shell syntax buildhistory.bbclass: fix shell syntax when using dash rootfs.py: close kernel_abi_ver_file mesa: backport a patch to support compositors without zwp_linux_dmabuf_v1 again wic: fix WicError message Matt Madison (1): bitbake: providers: use local variable for packages_dynamic pattern Maxime Roussin-Bélanger (1): libffi: fix native build being not portable Michael Opdenacker (4): rootfs-postcommands.bbclass: correct comments manuals: switch to the sstate mirror shared between all versions docs: BB_HASHSERVE_UPSTREAM: update to new host ref-manual: variables: remove sphinx directive from literal block Ming Liu (3): udev-extraconf: let automount base directory configurable udev-extraconf: fix some systemd automount issues udev-extraconf:mount.sh: fix path mismatching issues Mingli Yu (2): perl: Fix build with gcc-12 oescripts: change compare logic in OEListPackageconfigTests Muhammad Hamza (6): initramfs-framework: move storage mounts to actual rootfs udev-extraconf/mount.sh: add LABELs to mountpoints udev-extraconf/mount.sh: save mount name in our tmp filecache udev-extraconf/mount.sh: only mount devices on hotplug udev-extraconf: force systemd-udevd to use shared MountFlags udev-extraconf/mount.sh: ignore lvm in automount Naveen Saini (1): pciutils: avoid lspci conflict with busybox Nick Potenski (1): systemd: systemd-systemctl: Support instance conf files during enable Pascal Bach (1): bin_package: install into base_prefix Paul Eggleton (4): devtool: ignore pn- overrides when determining SRC_URI overrides patch: handle if S points to a subdirectory of a git repo devtool: finish: handle patching when S points to subdir of a git repo oe-selftest: devtool: test modify git recipe building from a subdir Paulo Neves (2): python: Avoid shebang overflow on python-config.py gtk-doc: Fix potential shebang overflow on gtkdoc-mkhtml2 Pavel Zhukov (3): bitbake.conf: Make TCLIBC and TCMODE lazy assigned systemd: update 0008-add-missing-FTW_-macros-for-musl.patch harfbuzz: Fix compilation with clang Peter Bergin (1): rust: fix issue building cross-canadian tools for aarch64 on x86_64 Peter Kjellerstedt (4): license_image.bbclass: Make QA errors fail the build libseccomp: Correct LIC_FILES_CHKSUM license.bbclass: Bound beginline and endline in copy_license_files() base.bbclass: Correct the test for obsolete license exceptions Peter Marko (2): openssl: extract legacy provider module to a separate package alsa-state: correct license Pgowda (1): binutils : CVE-2019-1010204 Portia (1): volatile-binds: Change DefaultDependencies from false to no Raju Kumar Pothuraju (1): kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set Rasmus Villemoes (1): e2fsprogs: add alternatives handling of lsattr as well Richard Purdie (79): bitbake: tests/parse: Fix one test overwriting another bitbake: server/process: Drop unused import bitbake: ui/buildinfohelper: Drop unused import bitbake: cooker: Drop unused loop bitbake: msg: Drop unused local variable bitbake: buildinfohelper: Drop unused function bitbake: fetch2/crate: Drop unused import bitbake: siggen: Drop pointless break statement bitbake: ui/knotty: Drop pointless pass statement bitbake: persist_data: Use a valid exception for missing implementation bitbake: runqueue: Drop pointless variable assignment bitbake: buildinfohelper: Drop unused variables bitbake: fetch2/osc: Add missing parameter bitbake: runqueue: Fix sig file location when using multiconfig bitbake: fetch/git : Use cat as pager lib/sstatesig: Fix find_siginfo to match sstate filename generation base: Avoid circular references to our own scripts scripts: Make git intercept global scripts/git: Ensure we don't have circular references package: Ensure we track whether PRSERV was active or not abi_version/sstate: Bump hashequiv and sstate versions due to git changes build-appliance-image: Update to kirkstone head revision vim: Upgrade 8.2.4681 -> 8.2.4912 cairo: Add missing GPLv3 license checksum entry sanity: Don't warn about make 4.2.1 for mint bitbake: build: Add clean_stamp API function to allow removal of task stamps staging: Fix rare sysroot corruption issue selftest/imagefeatures/overlayfs: Always append to DISTRO_FEATURES vim: Upgrade 8.2.4912 -> 8.2.5034 to fix 9 CVEs tiff: Add jbig PACKAGECONFIG and clarify CVE-2022-1210 libxslt: Mark CVE-2022-29824 as not applying cve-extra-exclusions: Add kernel CVEs cve-check: Allow warnings to be disabled rust-common: Fix sstate signatures between arm hf and non-hf rust-common: Drop LLVM_TARGET and simplify rust-common: Fix native signature dependency issues lzo: Add further info to a patch and mark as Inactive-Upstream glib-2.0: upgrade 2.72.1 -> 2.72.2 libxkbcommon: upgrade 1.4.0 -> 1.4.1 gtk+3: upgrade 3.24.33 -> 3.24.34 webkitgtk: upgrade 2.36.1 -> 2.36.3 openssl: Backport fix for ptest cert expiry gcc-cross-canadian: Add nativesdk-zstd dependency local.conf.sample: Update sstate url to new 'all' path sanity: Switch to make 4.0 as a minimum version perl: Add dependency on make-native to avoid race issues glibc: Drop make-native dependency vim: Upgrade 8.2.5034 -> 8.2.5083 uboot-sign: Fix potential index error issues selftest/multiconfig: Test that multiconfigs in separate layers works gcc-source: Fix incorrect task dependencies from ${B} liberror-perl: Update sstate/equiv versions to clean cache python3: Remove problematic paths from sysroot files python3: Ensure stale empty python module directories don't break the build bitbake: server/process: Fix logging issues where only the first message was displayed build-appliance-image: Update to kirkstone head revision unzip: Port debian fixes for two CVEs cve-extra-exclusions: Clean up and ignore three CVEs (2xqemu and nasm) vim: 8.2.5083 -> 9.0.0005 openssl: Upgrade 3.0.3 -> 3.0.4 coreutils: Tweak packaging variable names for coreutils-dev oeqa/runtime/scp: Disable scp test for dropbear packagegroup-core-ssh-dropbear: Add openssh-sftp-server recommendation oe-selftest-image: Ensure the image has sftp as well as dropbear qemu: Avoid accidental librdmacm linkage glibc-tests: Avoid reproducibility issues qemu: Fix slirp determinism issue qemu: Add PACKAGECONFIG for brlapi gperf: Add a patch to work around reproducibility issues gperf: Switch to upstream patch udev-extraconf/initrdscripts/parted: Rename mount.blacklist -> mount.ignorelist insane: Fix buildpaths test to work with special devices lua: Fix multilib buildpath reproducibility issues vala: Fix on target wrapper buildpaths issue gtk-doc: Remove hardcoded buildpath kernel-arch: Fix buildpaths leaking into external module compiles gcc-runtime: Fix build when using gold gcc-runtime: Fix missing MLPREFIX in debug mappings selftest/runtime_test/virgl: Disable for all almalinux Robert Joslyn (3): powerpc: Remove invalid GLIBC_EXTRA_OECONF curl: Backport CVE fixes curl: Fix multiple CVEs Robert Yang (1): bitbake: fetch2/ssh.py: decode path back for ssh Roland Hieber (1): bitbake: cache: correctly handle file names containing colons Ross Burton (12): cve-check: no need to depend on the fetch task oeqa/selftest: add test for git working correctly inside pseudo Revert "bitbake.conf: mark all directories as safe for git to read" oeqa/selftest/cve_check: add tests for recipe and image reports tiff: mark CVE-2022-1622 and CVE-2022-1623 as invalid cups: ignore CVE-2022-26691 busybox: fix CVE-2022-30065 cve-check: hook cleanup to the BuildCompleted event, not CookerExit tiff: backport the fix for CVE-2022-2056, CVE-2022-2057, and CVE-2022-2058 vim: upgrade to 9.0.0021 perl: don't install Makefile.old into perl-ptest pulseaudio: add m4-native to DEPENDS Sakib Sajal (1): u-boot: fix CVE-2022-34835 Samuli Piippo (1): binutils: Bump to latest 2.38 release branch Sean Anderson (1): rootfs.py: find .ko.zst kernel modules Stefan Wiehler (1): kernel-yocto.bbclass: Reset to exiting on non-zero return code at end of task Steve Sakoman (11): scripts/contrib/oe-build-perf-report-email.py: remove obsolete check for phantomjs and optipng poky.conf: bump version for 4.0.1 release virgl: skip headless test on alma 8.6 python3: fix reproducibility issue with python3-core go: upgrade 1.17.8 -> 1.17.10 poky.conf: bump version for 4.0.2 openssh: break dependency on base package for -dev package dropbear: break dependency on base package for -dev package ruby: add PACKAGECONFIG for capstone qemu: add PACKAGECONFIG for capstone qemu: Avoid accidental libvdeplug linkage Sundeep KOKKONDA (4): rust-common: Ensure sstate signatures have correct dependencues for do_rust_gen_targets rust-common: Fix for target definitions returning 'NoneType' for arm glibc: stable 2.35 branch updates binutils : stable 2.38 branch updates Thomas Roos (1): recipetool/devtool: Fix python egg whitespace issues in PACKAGECONFIG Tomasz Dziendzielski (1): bitbake: data: Do not depend on vardepvalueexclude flag Wentao Zhang (1): harfbuzz: fix CVE-2022-33068 Xiaobing Luo (1): devtool: Fix _copy_file() TypeError Yi Zhao (2): popt: fix override syntax in RDEPENDS git: fix override syntax in RDEPENDS leimaohui (1): cve-check.bbclass: Added do_populate_sdk[recrdeptask]. wangmy (15): librepo: upgrade 1.14.2 -> 1.14.3 cups: upgrade 2.4.1 -> 2.4.2 logrotate: upgrade 3.19.0 -> 3.20.1 iso-codes: upgrade 4.9.0 -> 4.10.0 lttng-ust: upgrade 2.13.2 -> 2.13.3 gst-devtools: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-libav: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-omx: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-plugins-bad: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-plugins-base: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-plugins-good: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-plugins-ugly: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-python: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-rtsp-server: upgrade 1.20.2 -> 1.20.3 gstreamer1.0-vaapi: upgrade 1.20.2 -> 1.20.3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie30881bf20846b7311381bed443623fce8912406
Diffstat (limited to 'poky/meta/recipes-core')
-rw-r--r--poky/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch57
-rw-r--r--poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb1
-rw-r--r--poky/meta/recipes-core/busybox/busybox/CVE-2022-30065.patch29
-rw-r--r--poky/meta/recipes-core/busybox/busybox_1.35.0.bb1
-rw-r--r--poky/meta/recipes-core/coreutils/coreutils_9.0.bb3
-rw-r--r--poky/meta/recipes-core/dropbear/dropbear.inc5
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch2
-rw-r--r--poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb (renamed from poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.1.bb)2
-rw-r--r--poky/meta/recipes-core/glib-networking/glib-networking_2.72.1.bb (renamed from poky/meta/recipes-core/glib-networking/glib-networking_2.72.0.bb)2
-rw-r--r--poky/meta/recipes-core/glibc/glibc-tests_2.35.bb8
-rw-r--r--poky/meta/recipes-core/glibc/glibc-version.inc2
-rw-r--r--poky/meta/recipes-core/glibc/glibc/reproducible-paths.patch23
-rw-r--r--poky/meta/recipes-core/glibc/glibc_2.35.bb2
-rw-r--r--poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb2
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh2
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh2
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-install-testfs.sh2
-rw-r--r--poky/meta/recipes-core/initrdscripts/files/init-install.sh2
-rwxr-xr-xpoky/meta/recipes-core/initrdscripts/initramfs-framework/finish9
-rw-r--r--poky/meta/recipes-core/libcgroup/libcgroup_2.0.2.bb (renamed from poky/meta/recipes-core/libcgroup/libcgroup_2.0.1.bb)2
-rw-r--r--poky/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch99
-rw-r--r--poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch21
-rw-r--r--poky/meta/recipes-core/libxml/libxml2_2.9.14.bb (renamed from poky/meta/recipes-core/libxml/libxml2_2.9.13.bb)5
-rw-r--r--poky/meta/recipes-core/meta/cve-update-db-native.bb14
-rw-r--r--poky/meta/recipes-core/ncurses/ncurses.inc2
-rw-r--r--poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb (renamed from poky/meta/recipes-core/ncurses/ncurses_6.3.bb)4
-rw-r--r--poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning-1.patch51
-rw-r--r--poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning.patch49
-rw-r--r--poky/meta/recipes-core/ovmf/ovmf_git.bb6
-rw-r--r--poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb1
-rw-r--r--poky/meta/recipes-core/systemd/systemd-boot_250.5.bb (renamed from poky/meta/recipes-core/systemd/systemd-boot_250.4.bb)0
-rwxr-xr-xpoky/meta/recipes-core/systemd/systemd-systemctl/systemctl14
-rw-r--r--poky/meta/recipes-core/systemd/systemd.inc2
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch98
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch73
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch13
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch46
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch42
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch27
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch10
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch157
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch (renamed from poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch)41
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch20
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch159
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch12
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch24
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch9
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch16
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch4
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch18
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch4
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch4
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch10
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch33
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch28
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch2
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch24
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch36
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch8
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch239
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch4
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch16
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch11
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch253
-rw-r--r--poky/meta/recipes-core/systemd/systemd_250.5.bb (renamed from poky/meta/recipes-core/systemd/systemd_250.4.bb)12
-rw-r--r--poky/meta/recipes-core/udev/udev-extraconf/mount.ignorelist (renamed from poky/meta/recipes-core/udev/udev-extraconf/mount.blacklist)0
-rw-r--r--poky/meta/recipes-core/udev/udev-extraconf/mount.sh90
-rw-r--r--poky/meta/recipes-core/udev/udev-extraconf_1.1.bb27
-rw-r--r--poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in2
69 files changed, 1008 insertions, 990 deletions
diff --git a/poky/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch b/poky/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
new file mode 100644
index 0000000000..bfaa786018
--- /dev/null
+++ b/poky/meta/recipes-core/base-passwd/base-passwd/disable-shell.patch
@@ -0,0 +1,57 @@
+From 91e0db96741359173ddf2be083aafcc1a3c32472 Mon Sep 17 00:00:00 2001
+From: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
+Date: Mon, 18 Apr 2022 11:22:43 +0800
+Subject: [PATCH] Disable shell for default users
+
+Change the shell of all global static users other than root (which
+retains /bin/sh) and sync (as /bin/sync is rather harmless) to
+/sbin/nologin (as /usr/sbin/nologin does not exist in openembedded)
+
+Upstream-Status: Backport [https://launchpad.net/ubuntu/+source/base-passwd/3.5.30]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
+---
+ passwd.master | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/passwd.master b/passwd.master
+index e1c32ff..0cd5ffd 100644
+--- a/passwd.master
++++ b/passwd.master
+@@ -1,18 +1,18 @@
+ root::0:0:root:/root:/bin/sh
+-daemon:*:1:1:daemon:/usr/sbin:/bin/sh
+-bin:*:2:2:bin:/bin:/bin/sh
+-sys:*:3:3:sys:/dev:/bin/sh
++daemon:*:1:1:daemon:/usr/sbin:/sbin/nologin
++bin:*:2:2:bin:/bin:/sbin/nologin
++sys:*:3:3:sys:/dev:/sbin/nologin
+ sync:*:4:65534:sync:/bin:/bin/sync
+-games:*:5:60:games:/usr/games:/bin/sh
+-man:*:6:12:man:/var/cache/man:/bin/sh
+-lp:*:7:7:lp:/var/spool/lpd:/bin/sh
+-mail:*:8:8:mail:/var/mail:/bin/sh
+-news:*:9:9:news:/var/spool/news:/bin/sh
+-uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
+-proxy:*:13:13:proxy:/bin:/bin/sh
+-www-data:*:33:33:www-data:/var/www:/bin/sh
+-backup:*:34:34:backup:/var/backups:/bin/sh
+-list:*:38:38:Mailing List Manager:/var/list:/bin/sh
+-irc:*:39:39:ircd:/var/run/ircd:/bin/sh
+-gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+-nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
++games:*:5:60:games:/usr/games:/sbin/nologin
++man:*:6:12:man:/var/cache/man:/sbin/nologin
++lp:*:7:7:lp:/var/spool/lpd:/sbin/nologin
++mail:*:8:8:mail:/var/mail:/sbin/nologin
++news:*:9:9:news:/var/spool/news:/sbin/nologin
++uucp:*:10:10:uucp:/var/spool/uucp:/sbin/nologin
++proxy:*:13:13:proxy:/bin:/sbin/nologin
++www-data:*:33:33:www-data:/var/www:/sbin/nologin
++backup:*:34:34:backup:/var/backups:/sbin/nologin
++list:*:38:38:Mailing List Manager:/var/list:/sbin/nologin
++irc:*:39:39:ircd:/var/run/ircd:/sbin/nologin
++gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/sbin/nologin
++nobody:*:65534:65534:nobody:/nonexistent:/sbin/nologin
+--
+2.32.0
+
diff --git a/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 9a27ad3ab5..ef7792ae49 100644
--- a/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar
file://input.patch \
file://disable-docs.patch \
file://kvm.patch \
+ file://disable-shell.patch \
"
SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
diff --git a/poky/meta/recipes-core/busybox/busybox/CVE-2022-30065.patch b/poky/meta/recipes-core/busybox/busybox/CVE-2022-30065.patch
new file mode 100644
index 0000000000..25ad653b25
--- /dev/null
+++ b/poky/meta/recipes-core/busybox/busybox/CVE-2022-30065.patch
@@ -0,0 +1,29 @@
+Fix use-after-free in awk.
+
+CVE: CVE-2022-30065
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2022-June/089768.html]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+fixes https://bugs.busybox.net/show_bug.cgi?id=14781
+
+Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
+---
+ editors/awk.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/editors/awk.c b/editors/awk.c
+index 079d0bde5..728ee8685 100644
+--- a/editors/awk.c
++++ b/editors/awk.c
+@@ -3128,6 +3128,9 @@ static var *evaluate(node *op, var *res)
+
+ case XC( OC_MOVE ):
+ debug_printf_eval("MOVE\n");
++ /* make sure that we never return a temp var */
++ if (L.v == TMPVAR0)
++ L.v = res;
+ /* if source is a temporary string, jusk relink it to dest */
+ if (R.v == TMPVAR1
+ && !(R.v->type & VF_NUMBER)
+--
+2.36.1
diff --git a/poky/meta/recipes-core/busybox/busybox_1.35.0.bb b/poky/meta/recipes-core/busybox/busybox_1.35.0.bb
index f2f1b35902..edf896485e 100644
--- a/poky/meta/recipes-core/busybox/busybox_1.35.0.bb
+++ b/poky/meta/recipes-core/busybox/busybox_1.35.0.bb
@@ -49,6 +49,7 @@ 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://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \
file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \
+ file://CVE-2022-30065.patch \
"
SRC_URI:append:libc-musl = " file://musl.cfg "
diff --git a/poky/meta/recipes-core/coreutils/coreutils_9.0.bb b/poky/meta/recipes-core/coreutils/coreutils_9.0.bb
index e4a948c7e5..865cffd4cd 100644
--- a/poky/meta/recipes-core/coreutils/coreutils_9.0.bb
+++ b/poky/meta/recipes-core/coreutils/coreutils_9.0.bb
@@ -174,8 +174,9 @@ RDEPENDS:${PN}-ptest += "bash findutils gawk liberror-perl make perl perl-module
# -dev automatic dependencies fails as we don't want libmodule-build-perl-dev, its too heavy
# may need tweaking if DEPENDS changes
+# Can't use ${PN}-dev here since flags with overrides and key expansion not supported
RRECOMMENDS:coreutils-dev[nodeprrecs] = "1"
-RRECOMMENDS:coreutils-dev = "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev"
+RRECOMMENDS:${PN}-dev += "acl-dev attr-dev gmp-dev libcap-dev bash-dev findutils-dev gawk-dev shadow-dev"
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
diff --git a/poky/meta/recipes-core/dropbear/dropbear.inc b/poky/meta/recipes-core/dropbear/dropbear.inc
index 78f9f9adbd..2d6e64cf8d 100644
--- a/poky/meta/recipes-core/dropbear/dropbear.inc
+++ b/poky/meta/recipes-core/dropbear/dropbear.inc
@@ -12,6 +12,11 @@ DEPENDS = "zlib virtual/crypt"
RPROVIDES:${PN} = "ssh sshd"
RCONFLICTS:${PN} = "openssh-sshd openssh"
+# break dependency on base package for -dev package
+# otherwise SDK fails to build as the main openssh and dropbear packages
+# conflict with each other
+RDEPENDS:${PN}-dev = ""
+
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
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 816b790ce7..c0114397d8 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 d52b1b530c5d8a1e70ae45d6e2139e9d3f25207f Mon Sep 17 00:00:00 2001
+From 9a66887179d28d696562dcac43ad05d67580cfdb 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
diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.1.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
index c9ccedd81f..dd1ea508d2 100644
--- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.1.bb
+++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
@@ -19,7 +19,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
"
SRC_URI:append:class-native = " file://relocate-modules.patch"
-SRC_URI[sha256sum] = "c07e57147b254cef92ce80a0378dc0c02a4358e7de4702e9f403069781095fe2"
+SRC_URI[sha256sum] = "4a39a2f624b8512d500d5840173eda7fa85f51c109052eae806acece85d345f0"
# 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/glib-networking/glib-networking_2.72.0.bb b/poky/meta/recipes-core/glib-networking/glib-networking_2.72.1.bb
index d578f17aa5..41f18d1c48 100644
--- a/poky/meta/recipes-core/glib-networking/glib-networking_2.72.0.bb
+++ b/poky/meta/recipes-core/glib-networking/glib-networking_2.72.1.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
SECTION = "libs"
DEPENDS = "glib-2.0"
-SRC_URI[archive.sha256sum] = "100aaebb369285041de52da422b6b716789d5e4d7549a3a71ba587b932e0823b"
+SRC_URI[archive.sha256sum] = "6fc1bedc8062484dc8a0204965995ef2367c3db5c934058ff1607e5a24d95a74"
PACKAGECONFIG ??= "openssl ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
diff --git a/poky/meta/recipes-core/glibc/glibc-tests_2.35.bb b/poky/meta/recipes-core/glibc/glibc-tests_2.35.bb
index 414f8660de..96d0569ff6 100644
--- a/poky/meta/recipes-core/glibc/glibc-tests_2.35.bb
+++ b/poky/meta/recipes-core/glibc/glibc-tests_2.35.bb
@@ -5,6 +5,7 @@ inherit ptest features_check
REQUIRED_DISTRO_FEATURES = "ptest"
SRC_URI:append = " \
+ file://reproducible-paths.patch \
file://run-ptest \
"
@@ -18,7 +19,8 @@ python __anonymous() {
d.setVar("PROVIDES", "${PN} ${PN}-ptest")
d.setVar("RPROVIDES", "${PN} ${PN}-ptest")
- d.setVar("BBCLASSEXTEND", "")
+ bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip()
+ d.setVar("BBCLASSEXTEND", bbclassextend)
d.setVar("RRECOMMENDS", "")
d.setVar("SYSTEMD_SERVICE:nscd", "")
d.setVar("SYSTEMD_PACKAGES", "")
@@ -30,6 +32,8 @@ RRECOMMENDS:${PN} = ""
RDEPENDS:${PN} = " glibc sed"
DEPENDS:append = " sed"
+export oe_srcdir="${exec_prefix}/src/debug/glibc/${PV}/"
+
# Just build tests for target - do not run them
do_check:append () {
oe_runmake -i check run-built-tests=no
@@ -95,7 +99,7 @@ python populate_packages:prepend () {
d.setVar('DEBIAN_NAMES', '')
}
-FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/glibc-tests/*"
+FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*"
EXCLUDE_FROM_SHLIBS = "1"
diff --git a/poky/meta/recipes-core/glibc/glibc-version.inc b/poky/meta/recipes-core/glibc/glibc-version.inc
index 080e905b6e..99017ce1d4 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.35/master"
PV = "2.35"
-SRCREV_glibc ?= "24962427071fa532c3c48c918e9d64d719cc8a6c"
+SRCREV_glibc ?= "b6aade18a7e5719c942aa2da6cf3157aca993fa4"
SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
diff --git a/poky/meta/recipes-core/glibc/glibc/reproducible-paths.patch b/poky/meta/recipes-core/glibc/glibc/reproducible-paths.patch
new file mode 100644
index 0000000000..0754dca62b
--- /dev/null
+++ b/poky/meta/recipes-core/glibc/glibc/reproducible-paths.patch
@@ -0,0 +1,23 @@
+Avoid hardcoded build time paths in the output binaries by replacing the compile
+definitions with the output locations.
+
+Upstream-Status: Inappropriate [would need reworking somehow to be acceptable upstream]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: git/support/Makefile
+===================================================================
+--- git.orig/support/Makefile
++++ git/support/Makefile
+@@ -216,9 +216,9 @@ libsupport-inhibit-o += .o
+ endif
+
+ CFLAGS-support_paths.c = \
+- -DSRCDIR_PATH=\"`cd .. ; pwd`\" \
+- -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
+- -DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
++ -DSRCDIR_PATH=\"$(oe_srcdir)\" \
++ -DOBJDIR_PATH=\"$(libdir)/glibc-tests/ptest/tests/glibc-ptest\" \
++ -DOBJDIR_ELF_LDSO_PATH=\"$(slibdir)/$(rtld-installed-name)\" \
+ -DINSTDIR_PATH=\"$(prefix)\" \
+ -DLIBDIR_PATH=\"$(libdir)\" \
+ -DBINDIR_PATH=\"$(bindir)\" \
diff --git a/poky/meta/recipes-core/glibc/glibc_2.35.bb b/poky/meta/recipes-core/glibc/glibc_2.35.bb
index 6ea5b1efb5..96fe39c548 100644
--- a/poky/meta/recipes-core/glibc/glibc_2.35.bb
+++ b/poky/meta/recipes-core/glibc/glibc_2.35.bb
@@ -16,7 +16,7 @@ CVE_CHECK_IGNORE += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024"
# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853
CVE_CHECK_IGNORE += "CVE-2019-1010025"
-DEPENDS += "gperf-native bison-native make-native"
+DEPENDS += "gperf-native bison-native"
NATIVESDKFIXES ?= ""
NATIVESDKFIXES:class-nativesdk = "\
diff --git a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index dfb9690a60..398481aef7 100644
--- a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
inherit core-image setuptools3
-SRCREV ?= "0674ae7bc46ebfa90c55bbedec6b22dc5f48dacf"
+SRCREV ?= "213f174999a16daee955296162e62fa3386f841d"
SRC_URI = "git://git.yoctoproject.org/poky;branch=kirkstone \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index 1fcd29e54c..4bd6ace7b3 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -138,7 +138,7 @@ touch /ssd/etc/controllerimage
if [ -d /ssd/etc/ ] ; then
# We dont want udev to mount our root device while we're booting...
if [ -d /ssd/etc/udev/ ] ; then
- echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
+ echo "/dev/${device}" >> /ssd/etc/udev/mount.ignorelist
fi
fi
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f667518b89..ffd3870199 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -229,7 +229,7 @@ if [ -d /tgt_root/etc/ ] ; then
echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
if [ -d /tgt_root/etc/udev/ ] ; then
- echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
+ echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist
fi
fi
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/poky/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
index 7b49001659..8ab74ddc5d 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
@@ -164,7 +164,7 @@ if [ -d /tgt_root/etc/ ] ; then
echo "$bootfs /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
if [ -d /tgt_root/etc/udev/ ] ; then
- echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
+ echo "/dev/${device}" >> /tgt_root/etc/udev/mount.ignorelist
fi
fi
umount /tgt_root
diff --git a/poky/meta/recipes-core/initrdscripts/files/init-install.sh b/poky/meta/recipes-core/initrdscripts/files/init-install.sh
index e71579631b..df33791ec7 100644
--- a/poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -261,7 +261,7 @@ if [ -d /tgt_root/etc/ ] ; then
echo "$bootdev /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
if [ -d /tgt_root/etc/udev/ ] ; then
- echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
+ echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist
fi
fi
umount /tgt_root
diff --git a/poky/meta/recipes-core/initrdscripts/initramfs-framework/finish b/poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
index f08a920867..ac0de9f996 100755
--- a/poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
+++ b/poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -26,6 +26,15 @@ finish_run() {
info "Switching root to '$ROOTFS_DIR'..."
+ debug "Moving basic mounts onto rootfs"
+ for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
+ # Parse any OCT or HEX encoded chars such as spaces
+ # in the mount points to actual ASCII chars
+ dir=`printf $dir`
+ mkdir -p "${ROOTFS_DIR}/media/${dir##*/}"
+ mount -n --move "$dir" "${ROOTFS_DIR}/media/${dir##*/}"
+ done
+
debug "Moving /dev, /proc and /sys onto rootfs..."
mount --move /dev $ROOTFS_DIR/dev
mount --move /proc $ROOTFS_DIR/proc
diff --git a/poky/meta/recipes-core/libcgroup/libcgroup_2.0.1.bb b/poky/meta/recipes-core/libcgroup/libcgroup_2.0.2.bb
index 857a4e86fd..7ade372cae 100644
--- a/poky/meta/recipes-core/libcgroup/libcgroup_2.0.1.bb
+++ b/poky/meta/recipes-core/libcgroup/libcgroup_2.0.2.bb
@@ -13,7 +13,7 @@ DEPENDS = "bison-native flex-native"
SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz"
-SRC_URI[sha256sum] = "2dd9c566a90a053e7a5f47607e225648ba7aa9bb7763514dd4778e2ed530fe90"
+SRC_URI[sha256sum] = "8ef63b32e0aff619547dbb8a25e1f6bab152d7c4864795cf915571a5994d0cf8"
UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/releases/"
DEPENDS:append:libc-musl = " fts "
diff --git a/poky/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch b/poky/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
deleted file mode 100644
index e188914613..0000000000
--- a/poky/meta/recipes-core/libxml/libxml2/CVE-2022-23308-fix-regression.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 646fe48d1c8a74310c409ddf81fe7df6700052af Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 22 Feb 2022 11:51:08 +0100
-Subject: [PATCH] Fix --without-valid build
-
-Regressed in commit 652dd12a.
----
- valid.c | 58 ++++++++++++++++++++++++++++-----------------------------
- 1 file changed, 29 insertions(+), 29 deletions(-)
----
-
-From https://github.com/GNOME/libxml2.git
- commit 646fe48d1c8a74310c409ddf81fe7df6700052af
-
-CVE: CVE-2022-23308
-Upstream-Status: Backport
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-
-diff --git a/valid.c b/valid.c
-index 8e596f1d..9684683a 100644
---- a/valid.c
-+++ b/valid.c
-@@ -479,35 +479,6 @@ nodeVPop(xmlValidCtxtPtr ctxt)
- return (ret);
- }
-
--/**
-- * xmlValidNormalizeString:
-- * @str: a string
-- *
-- * Normalize a string in-place.
-- */
--static void
--xmlValidNormalizeString(xmlChar *str) {
-- xmlChar *dst;
-- const xmlChar *src;
--
-- if (str == NULL)
-- return;
-- src = str;
-- dst = str;
--
-- while (*src == 0x20) src++;
-- while (*src != 0) {
-- if (*src == 0x20) {
-- while (*src == 0x20) src++;
-- if (*src != 0)
-- *dst++ = 0x20;
-- } else {
-- *dst++ = *src++;
-- }
-- }
-- *dst = 0;
--}
--
- #ifdef DEBUG_VALID_ALGO
- static void
- xmlValidPrintNode(xmlNodePtr cur) {
-@@ -2636,6 +2607,35 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
- (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
- xmlFree((char *)(str));
-
-+/**
-+ * xmlValidNormalizeString:
-+ * @str: a string
-+ *
-+ * Normalize a string in-place.
-+ */
-+static void
-+xmlValidNormalizeString(xmlChar *str) {
-+ xmlChar *dst;
-+ const xmlChar *src;
-+
-+ if (str == NULL)
-+ return;
-+ src = str;
-+ dst = str;
-+
-+ while (*src == 0x20) src++;
-+ while (*src != 0) {
-+ if (*src == 0x20) {
-+ while (*src == 0x20) src++;
-+ if (*src != 0)
-+ *dst++ = 0x20;
-+ } else {
-+ *dst++ = *src++;
-+ }
-+ }
-+ *dst = 0;
-+}
-+
- static int
- xmlIsStreaming(xmlValidCtxtPtr ctxt) {
- xmlParserCtxtPtr pctxt;
---
-2.35.1
-
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 d211f65da3..cc9da88a29 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,4 +1,4 @@
-From f57da62218cf72c1342da82abafdac6b0a2e4997 Mon Sep 17 00:00:00 2001
+From 7196bce35954c4b46391cb0139aeb15ed628fa54 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
@@ -16,16 +16,18 @@ 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>
+
+Rebase to 2.9.14
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
- libxml.m4 | 190 ++----------------------------------------------------
- 1 file changed, 5 insertions(+), 185 deletions(-)
+ libxml.m4 | 189 ++----------------------------------------------------
+ 1 file changed, 5 insertions(+), 184 deletions(-)
-Index: libxml2-2.9.13/libxml.m4
-===================================================================
---- libxml2-2.9.13.orig/libxml.m4
-+++ libxml2-2.9.13/libxml.m4
+diff --git a/libxml.m4 b/libxml.m4
+index fc7790c..1c53585 100644
+--- a/libxml.m4
++++ b/libxml.m4
@@ -1,191 +1,12 @@
-# Configure paths for LIBXML2
-# Simon Josefsson 2020-02-12
@@ -223,3 +225,6 @@ Index: libxml2-2.9.13/libxml.m4
- AC_SUBST(XML_LIBS)
- rm -f conf.xmltest
])
+--
+2.34.1
+
diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.13.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.14.bb
index e361b53bfd..3081ebf92f 100644
--- a/poky/meta/recipes-core/libxml/libxml2_2.9.13.bb
+++ b/poky/meta/recipes-core/libxml/libxml2_2.9.14.bb
@@ -23,11 +23,8 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te
file://remove-fuzz-from-ptests.patch \
file://libxml-m4-use-pkgconfig.patch \
"
-# will be in v2.9.14
-#
-SRC_URI += "file://CVE-2022-23308-fix-regression.patch"
-SRC_URI[archive.sha256sum] = "276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e"
+SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
BINCONFIG = "${bindir}/xml2-config"
diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb
index e5822cee58..18af89b53e 100644
--- a/poky/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb
@@ -13,6 +13,10 @@ deltask do_install
deltask do_populate_sysroot
NVDCVE_URL ?= "https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-"
+# CVE database update interval, in seconds. By default: once a day (24*60*60).
+# Use 0 to force the update
+# Use a negative value to skip the update
+CVE_DB_UPDATE_INTERVAL ?= "86400"
python () {
if not bb.data.inherits_class("cve-check", d):
@@ -43,12 +47,18 @@ python do_fetch() {
if os.path.exists(db_file):
os.remove(db_file)
- # Don't refresh the database more than once an hour
+ # The NVD database changes once a day, so no need to update more frequently
+ # Allow the user to force-update
try:
import time
- if time.time() - os.path.getmtime(db_file) < (60*60):
+ update_interval = int(d.getVar("CVE_DB_UPDATE_INTERVAL"))
+ if update_interval < 0:
+ bb.note("CVE database update skipped")
+ return
+ if time.time() - os.path.getmtime(db_file) < update_interval:
bb.debug(2, "Recently updated, skipping")
return
+
except OSError:
pass
diff --git a/poky/meta/recipes-core/ncurses/ncurses.inc b/poky/meta/recipes-core/ncurses/ncurses.inc
index 7a7c7dd227..1abcfae1fe 100644
--- a/poky/meta/recipes-core/ncurses/ncurses.inc
+++ b/poky/meta/recipes-core/ncurses/ncurses.inc
@@ -2,7 +2,7 @@ SUMMARY = "The New Curses library"
DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library."
HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=9529289636145d1bf093c96af067695a;endline=27"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c5a4600fdef86384c41ca33ecc70a4b8;endline=27"
SECTION = "libs"
DEPENDS = "ncurses-native"
DEPENDS:class-native = ""
diff --git a/poky/meta/recipes-core/ncurses/ncurses_6.3.bb b/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb
index f0256dad22..f67a3f5bf4 100644
--- a/poky/meta/recipes-core/ncurses/ncurses_6.3.bb
+++ b/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb
@@ -5,10 +5,10 @@ SRC_URI += "file://0001-tic-hang.patch \
file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \
"
# commit id corresponds to the revision in package version
-SRCREV = "51d0fd9cc3edb975f04224f29f777f8f448e8ced"
+SRCREV = "a0bc708bc6954b5d3c0a38d92b683c3ec3135260"
S = "${WORKDIR}/git"
EXTRA_OECONF += "--with-abi-version=5"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)$"
# This is needed when using patchlevel versions like 6.1+20181013
-#CVE_VERSION = "${@d.getVar("PV").split('+')[0]}.${@d.getVar("PV").split('+')[1]}"
+CVE_VERSION = "${@d.getVar("PV").split('+')[0]}.${@d.getVar("PV").split('+')[1]}"
diff --git a/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning-1.patch b/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning-1.patch
new file mode 100644
index 0000000000..23366b4d07
--- /dev/null
+++ b/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning-1.patch
@@ -0,0 +1,51 @@
+From b0a0b7b605aeb8106e7b50d1efeb746f401498cc Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Thu, 24 Mar 2022 20:04:35 +0800
+Subject: [PATCH] BaseTools: fix gcc12 warning
+
+Sdk/C/LzmaEnc.c: In function ?LzmaEnc_CodeOneMemBlock?:
+Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*p.rc.outStream? [-Werror=dangling-pointer=]
+ 2828 | p->rc.outStream = &outStream.vt;
+ | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
+Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here
+ 2811 | CLzmaEnc_SeqOutStreamBuf outStream;
+ | ^~~~~~~~~
+Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here
+Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ?outStream? in ?*(CLzmaEnc *)pp.rc.outStream? [-Werror=dangling-pointer=]
+ 2828 | p->rc.outStream = &outStream.vt;
+ | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
+Sdk/C/LzmaEnc.c:2811:28: note: ?outStream? declared here
+ 2811 | CLzmaEnc_SeqOutStreamBuf outStream;
+ | ^~~~~~~~~
+Sdk/C/LzmaEnc.c:2811:28: note: ?pp? declared here
+cc1: all warnings being treated as errors
+
+Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/85021f8cf22d1bd4114803c6c610dea5ef0059f1]
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Reviewed-by: Bob Feng <bob.c.feng@intel.com>
+---
+ BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
+index 4e9b499f8d..4b9f5fa692 100644
+--- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
++++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
+@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
+
+ nowPos64 = p->nowPos64;
+ RangeEnc_Init(&p->rc);
+- p->rc.outStream = &outStream.vt;
+
+ if (desiredPackSize == 0)
+ return SZ_ERROR_OUTPUT_EOF;
+
++ p->rc.outStream = &outStream.vt;
+ res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
++ p->rc.outStream = NULL;
+
+ *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
+ *destLen -= outStream.rem;
+--
+2.36.1
+
diff --git a/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning.patch b/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning.patch
new file mode 100644
index 0000000000..91c01647db
--- /dev/null
+++ b/poky/meta/recipes-core/ovmf/ovmf/0001-BaseTools-fix-gcc12-warning.patch
@@ -0,0 +1,49 @@
+From 2435c17e56652479315853cec5b91fb0ea0911a3 Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Thu, 24 Mar 2022 20:04:34 +0800
+Subject: [PATCH] BaseTools: fix gcc12 warning
+
+GenFfs.c:545:5: error: pointer ?InFileHandle? used after ?fclose? [-Werror=use-after-free]
+ 545 | Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+GenFfs.c:544:5: note: call to ?fclose? here
+ 544 | fclose (InFileHandle);
+ | ^~~~~~~~~~~~~~~~~~~~~
+
+Upstream-Status: Backport [https://github.com/tianocore/edk2/commit/7b005f344e533cd913c3ca05b266f9872df886d1]
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+Reviewed-by: Bob Feng <bob.c.feng@intel.com>
+---
+ BaseTools/Source/C/GenFfs/GenFfs.c | 2 +-
+ BaseTools/Source/C/GenSec/GenSec.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
+index 949025c333..d78d62ab36 100644
+--- a/BaseTools/Source/C/GenFfs/GenFfs.c
++++ b/BaseTools/Source/C/GenFfs/GenFfs.c
+@@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment)
+ PeFileBuffer = (UINT8 *) malloc (PeFileSize);
+ if (PeFileBuffer == NULL) {
+ fclose (InFileHandle);
+- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle);
++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
+diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
+index d54a4f9e0a..b1d05367ec 100644
+--- a/BaseTools/Source/C/GenSec/GenSec.c
++++ b/BaseTools/Source/C/GenSec/GenSec.c
+@@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment)
+ PeFileBuffer = (UINT8 *) malloc (PeFileSize);
+ if (PeFileBuffer == NULL) {
+ fclose (InFileHandle);
+- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle);
++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile);
+ return EFI_OUT_OF_RESOURCES;
+ }
+ fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
+--
+2.36.1
+
diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb
index b15d40eac8..84e3360a3a 100644
--- a/poky/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb
@@ -15,12 +15,18 @@ PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm', '', d)
PACKAGECONFIG[secureboot] = ",,,"
PACKAGECONFIG[tpm] = "-D TPM_ENABLE=TRUE,-D TPM_ENABLE=FALSE,,"
+# GCC12 trips on it
+#see https://src.fedoraproject.org/rpms/edk2/blob/rawhide/f/0032-Basetools-turn-off-gcc12-warning.patch
+BUILD_CFLAGS += "-Wno-error=stringop-overflow"
+
SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
file://0001-ovmf-update-path-to-native-BaseTools.patch \
file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
file://0003-ovmf-Update-to-latest.patch \
file://0005-debug-prefix-map.patch \
file://0006-reproducible.patch \
+ file://0001-BaseTools-fix-gcc12-warning.patch \
+ file://0001-BaseTools-fix-gcc12-warning-1.patch \
"
PV = "edk2-stable202202"
diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
index 4f844ad925..d06c6a5609 100644
--- a/poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
+++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
@@ -4,3 +4,4 @@ PR = "r1"
inherit packagegroup
RDEPENDS:${PN} = "dropbear"
+RRECOMMENDS:${PN} = "openssh-sftp-server"
diff --git a/poky/meta/recipes-core/systemd/systemd-boot_250.4.bb b/poky/meta/recipes-core/systemd/systemd-boot_250.5.bb
index b67706b731..b67706b731 100644
--- a/poky/meta/recipes-core/systemd/systemd-boot_250.4.bb
+++ b/poky/meta/recipes-core/systemd/systemd-boot_250.5.bb
diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 6324319a45..6d19666d82 100755
--- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -11,6 +11,7 @@ import re
import sys
from collections import namedtuple
+from itertools import chain
from pathlib import Path
version = 1.0
@@ -25,12 +26,16 @@ locations = list()
class SystemdFile():
"""Class representing a single systemd configuration file"""
- def __init__(self, root, path):
+ def __init__(self, root, path, instance_unit_name):
self.sections = dict()
self._parse(root, path)
dirname = os.path.basename(path.name) + ".d"
for location in locations:
- for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):
+ files = (root / location / "system" / dirname).glob("*.conf")
+ if instance_unit_name:
+ inst_dirname = instance_unit_name + ".d"
+ files = chain(files, (root / location / "system" / inst_dirname).glob("*.conf"))
+ for path2 in sorted(files):
self._parse(root, path2)
def _parse(self, root, path):
@@ -195,8 +200,11 @@ class SystemdUnit():
# if we're enabling an instance, first extract the actual instance
# then figure out what the template unit is
template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit)
+ instance_unit_name = None
if template:
instance = template.group('instance')
+ if instance != "":
+ instance_unit_name = self.unit
unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1)
else:
instance = None
@@ -208,7 +216,7 @@ class SystemdUnit():
# ignore aliases
return
- config = SystemdFile(self.root, path)
+ config = SystemdFile(self.root, path, instance_unit_name)
if instance == "":
try:
default_instance = config.get('Install', 'DefaultInstance')[0]
diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc
index ac454b8afd..309105290f 100644
--- a/poky/meta/recipes-core/systemd/systemd.inc
+++ b/poky/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "c3aead556847dd2694d559620123b65ff16afe8c"
+SRCREV = "4a31fa2fb040005b73253da75cf84949b8485175"
SRCBRANCH = "v250-stable"
SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch b/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
index 2363679c98..c42c66786f 100644
--- a/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
@@ -1,4 +1,4 @@
-From 4c2e932664ec67662f4a0306cca4a7cd82853bda Mon Sep 17 00:00:00 2001
+From 9a1841402ce3ef21a10a7314a07a615f8196d406 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 22:19:37 -0800
Subject: [PATCH] Adjust for musl headers
@@ -6,6 +6,7 @@ Subject: [PATCH] Adjust for musl headers
Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/libsystemd-network/sd-dhcp6-client.c | 2 +-
src/network/netdev/bareudp.c | 2 +-
@@ -29,6 +30,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src/network/netdev/vrf.c | 2 +-
src/network/netdev/vxcan.c | 2 +-
src/network/netdev/vxlan.c | 2 +-
+ src/network/netdev/wireguard.c | 2 +-
src/network/netdev/xfrm.c | 2 +-
src/network/networkd-bridge-mdb.c | 4 ++--
src/network/networkd-dhcp-common.c | 3 ++-
@@ -41,8 +43,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src/shared/linux/ethtool.h | 3 ++-
src/shared/netif-util.c | 2 +-
src/udev/udev-builtin-net_id.c | 2 +-
- 34 files changed, 41 insertions(+), 39 deletions(-)
+ 35 files changed, 42 insertions(+), 40 deletions(-)
+diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
+index 84bc739bba..ff8cb6bf9d 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -5,7 +5,7 @@
@@ -54,6 +58,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_infiniband.h>
#include "sd-dhcp6-client.h"
+diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c
+index 8ff0eb1360..7e06b8d57d 100644
--- a/src/network/netdev/bareudp.c
+++ b/src/network/netdev/bareudp.c
@@ -2,7 +2,7 @@
@@ -65,6 +71,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "bareudp.h"
#include "netlink-util.h"
+diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c
+index 15f3aee3a6..ec76428436 100644
--- a/src/network/netdev/batadv.c
+++ b/src/network/netdev/batadv.c
@@ -3,7 +3,7 @@
@@ -76,6 +84,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "batadv.h"
#include "fileio.h"
+diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
+index 5d94aa1d68..4e379a326d 100644
--- a/src/network/netdev/bond.c
+++ b/src/network/netdev/bond.c
@@ -1,7 +1,7 @@
@@ -87,6 +97,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "alloc-util.h"
#include "bond.h"
+diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
+index b974f2ae0a..9a5f18d556 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -2,7 +2,7 @@
@@ -98,6 +110,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_bridge.h>
#include "bridge.h"
+diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c
+index 00df1d2787..77b506b422 100644
--- a/src/network/netdev/dummy.c
+++ b/src/network/netdev/dummy.c
@@ -1,6 +1,6 @@
@@ -108,6 +122,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "dummy.h"
+diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
+index 224c17e979..fb79cc13f6 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,7 +2,7 @@
@@ -119,6 +135,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "alloc-util.h"
#include "conf-parser.h"
+diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c
+index d7ff44cb9e..e037629ae4 100644
--- a/src/network/netdev/ifb.c
+++ b/src/network/netdev/ifb.c
@@ -1,7 +1,7 @@
@@ -130,6 +148,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "ifb.h"
+diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c
+index e0ff9e8c62..ab085c1f6d 100644
--- a/src/network/netdev/ipoib.c
+++ b/src/network/netdev/ipoib.c
@@ -1,6 +1,6 @@
@@ -140,6 +160,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_link.h>
#include "ipoib.h"
+diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c
+index d15766cd7b..60728b4f94 100644
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -2,7 +2,7 @@
@@ -151,6 +173,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "conf-parser.h"
#include "ipvlan.h"
+diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
+index f1a566a9ca..1f37927a83 100644
--- a/src/network/netdev/macsec.c
+++ b/src/network/netdev/macsec.c
@@ -1,7 +1,7 @@
@@ -162,6 +186,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_ether.h>
#include <linux/if_macsec.h>
#include <linux/genetlink.h>
+diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c
+index c41be6e78f..ee2660c5bf 100644
--- a/src/network/netdev/macvlan.c
+++ b/src/network/netdev/macvlan.c
@@ -2,7 +2,7 @@
@@ -173,6 +199,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "conf-parser.h"
#include "macvlan.h"
+diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
+index 8e7fe11c18..701ab2bd69 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -2,7 +2,7 @@
@@ -184,6 +212,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <unistd.h>
#include "alloc-util.h"
+diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c
+index 15d5c132f9..a3ffa48b15 100644
--- a/src/network/netdev/netdevsim.c
+++ b/src/network/netdev/netdevsim.c
@@ -1,6 +1,6 @@
@@ -194,6 +224,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "netdevsim.h"
+diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c
+index ff372092e6..eef66811f4 100644
--- a/src/network/netdev/nlmon.c
+++ b/src/network/netdev/nlmon.c
@@ -1,6 +1,6 @@
@@ -204,6 +236,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "nlmon.h"
+diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c
+index 97e534fe99..0302c1cb94 100644
--- a/src/network/netdev/tunnel.c
+++ b/src/network/netdev/tunnel.c
@@ -2,7 +2,7 @@
@@ -215,6 +249,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_tunnel.h>
#include <linux/ip.h>
#include <linux/ip6_tunnel.h>
+diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c
+index 380547ee1e..137c1adf8a 100644
--- a/src/network/netdev/vcan.c
+++ b/src/network/netdev/vcan.c
@@ -1,6 +1,6 @@
@@ -225,6 +261,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "vcan.h"
+diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c
+index c946e81fc0..d1a6be73f9 100644
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -3,7 +3,7 @@
@@ -236,6 +274,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/veth.h>
#include "netlink-util.h"
+diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c
+index af3e77963e..efa4b0a164 100644
--- a/src/network/netdev/vlan.c
+++ b/src/network/netdev/vlan.c
@@ -2,7 +2,7 @@
@@ -247,6 +287,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_vlan.h>
#include "parse-util.h"
+diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c
+index b1b6707441..1c6d1982e1 100644
--- a/src/network/netdev/vrf.c
+++ b/src/network/netdev/vrf.c
@@ -2,7 +2,7 @@
@@ -258,6 +300,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "vrf.h"
+diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c
+index a0ba048eb1..875f2e5901 100644
--- a/src/network/netdev/vxcan.c
+++ b/src/network/netdev/vxcan.c
@@ -1,7 +1,7 @@
@@ -269,6 +313,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "vxcan.h"
+diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c
+index 30b0855598..a065158801 100644
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -2,7 +2,7 @@
@@ -280,6 +326,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "conf-parser.h"
#include "alloc-util.h"
+diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
+index 88f668753a..5fc753384b 100644
+--- a/src/network/netdev/wireguard.c
++++ b/src/network/netdev/wireguard.c
+@@ -6,7 +6,7 @@
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/ipv6_route.h>
+
+ #include "sd-resolve.h"
+diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c
+index ef5e735b2b..419afd75f2 100644
--- a/src/network/netdev/xfrm.c
+++ b/src/network/netdev/xfrm.c
@@ -1,6 +1,6 @@
@@ -290,6 +351,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "missing_network.h"
#include "xfrm.h"
+diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
+index 10025a97ae..a0239ea83a 100644
--- a/src/network/networkd-bridge-mdb.c
+++ b/src/network/networkd-bridge-mdb.c
@@ -1,7 +1,5 @@
@@ -309,6 +372,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
+diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
+index 7996960bd1..e870b9ba26 100644
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -1,7 +1,8 @@
@@ -321,6 +386,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "bus-error.h"
#include "dhcp-identifier.h"
+diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c
+index 7be9713d46..e830fcd575 100644
--- a/src/network/networkd-dhcp-prefix-delegation.c
+++ b/src/network/networkd-dhcp-prefix-delegation.c
@@ -1,7 +1,5 @@
@@ -340,6 +407,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
bool link_dhcp_pd_is_enabled(Link *link) {
assert(link);
+diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
+index 9acfd17d49..3108289602 100644
--- a/src/network/networkd-dhcp-server.c
+++ b/src/network/networkd-dhcp-server.c
@@ -1,7 +1,7 @@
@@ -351,6 +420,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if.h>
#include "sd-dhcp-server.h"
+diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
+index cb9c428ae9..a35d58f3f1 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -3,7 +3,7 @@
@@ -362,6 +433,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "alloc-util.h"
#include "dhcp-client-internal.h"
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index b62a154828..75949e6094 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -3,7 +3,7 @@
@@ -373,6 +446,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_link.h>
#include <linux/netdevice.h>
#include <sys/socket.h>
+diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
+index ee7a535075..ce6ed64133 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1,9 +1,5 @@
@@ -396,6 +471,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
int route_new(Route **ret) {
_cleanup_(route_freep) Route *route = NULL;
+diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
+index e00cc1e589..e392c7e1a2 100644
--- a/src/network/networkd-setlink.c
+++ b/src/network/networkd-setlink.c
@@ -2,7 +2,7 @@
@@ -407,6 +484,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/if_bridge.h>
#include "missing_network.h"
+diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
+index 974d4292e7..fe9b8a9e07 100644
--- a/src/shared/linux/ethtool.h
+++ b/src/shared/linux/ethtool.h
@@ -16,7 +16,8 @@
@@ -419,6 +498,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#ifndef __KERNEL__
#include <limits.h> /* for INT_MAX */
+diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
+index 603d4de109..7e3531808a 100644
--- a/src/shared/netif-util.c
+++ b/src/shared/netif-util.c
@@ -1,6 +1,6 @@
@@ -429,6 +510,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "arphrd-util.h"
#include "device-util.h"
+diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
+index 65e003eb15..0b3dc04be0 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -18,7 +18,7 @@
@@ -440,14 +523,3 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include <linux/netdevice.h>
#include <linux/pci_regs.h>
---- a/src/network/netdev/wireguard.c
-+++ b/src/network/netdev/wireguard.c
-@@ -6,7 +6,7 @@
- #include <sys/ioctl.h>
- #include <net/if.h>
- #include <netinet/in.h>
--#include <linux/if_arp.h>
-+//#include <linux/if_arp.h>
- #include <linux/ipv6_route.h>
-
- #include "sd-resolve.h"
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch b/poky/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
new file mode 100644
index 0000000000..31efc4cc4b
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch
@@ -0,0 +1,73 @@
+From beb0219b71510bc63aed81d2a970a04349d6c616 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 29 Sep 2020 18:01:41 -0700
+Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr
+
+These directories are moved to /lib since systemd v246, commit
+4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto,
+the old /usr/lib is still being used.
+
+Upstream-Status: Inappropriate (OE-specific)
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
+---
+ src/core/systemd.pc.in | 8 ++++----
+ src/libsystemd/sd-path/sd-path.c | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
+index fc0f8c34fa..65996bbed8 100644
+--- a/src/core/systemd.pc.in
++++ b/src/core/systemd.pc.in
+@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
+ tmpfiles_dir=${prefix}/lib/tmpfiles.d
+ tmpfilesdir=${tmpfiles_dir}
+
+-sysusers_dir=${rootprefix}/lib/sysusers.d
++sysusers_dir=${prefix}/lib/sysusers.d
+ sysusersdir=${sysusers_dir}
+
+-sysctl_dir=${rootprefix}/lib/sysctl.d
++sysctl_dir=${prefix}/lib/sysctl.d
+ sysctldir=${sysctl_dir}
+
+-binfmt_dir=${rootprefix}/lib/binfmt.d
++binfmt_dir=${prefix}/lib/binfmt.d
+ binfmtdir=${binfmt_dir}
+
+-modules_load_dir=${rootprefix}/lib/modules-load.d
++modules_load_dir=${prefix}/lib/modules-load.d
+ modulesloaddir=${modules_load_dir}
+
+ catalog_dir=${prefix}/lib/systemd/catalog
+diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c
+index ff1e0d5f8e..19a001f47e 100644
+--- a/src/libsystemd/sd-path/sd-path.c
++++ b/src/libsystemd/sd-path/sd-path.c
+@@ -362,19 +362,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
+ return 0;
+
+ case SD_PATH_SYSUSERS:
+- *ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d";
++ *ret = "/usr/lib/sysusers.d";
+ return 0;
+
+ case SD_PATH_SYSCTL:
+- *ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d";
++ *ret = "/usr/lib/sysctl.d";
+ return 0;
+
+ case SD_PATH_BINFMT:
+- *ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d";
++ *ret = "/usr/lib/binfmt.d";
+ return 0;
+
+ case SD_PATH_MODULES_LOAD:
+- *ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d";
++ *ret = "/usr/lib/modules-load.d";
+ return 0;
+
+ case SD_PATH_CATALOG:
+--
+2.34.1
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch b/poky/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch
index 03a29b5327..9ebff9825a 100644
--- a/poky/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch
@@ -1,7 +1,7 @@
-From fbc10748c7c59d82024a4d35146b8dfef8d52927 Mon Sep 17 00:00:00 2001
+From dab02796780f00d689cc1c7a0ba81abe7c5f28d0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 15:15:11 -0800
-Subject: [PATCH 1/2] pass correct parameters to getdents64
+Subject: [PATCH] pass correct parameters to getdents64
Fixes
../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types]
@@ -12,15 +12,16 @@ Fixes
n = getdents64(fd, &buffer, sizeof(buffer));
^~~~~~~
-Upstream-Status: Pending
+Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
src/basic/recurse-dir.c | 2 +-
src/basic/stat-util.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c
-index efa1797b7b..797285e3be 100644
+index efa1797b7b..03ff10ebe9 100644
--- a/src/basic/recurse-dir.c
+++ b/src/basic/recurse-dir.c
@@ -54,7 +54,7 @@ int readdir_all(int dir_fd,
@@ -28,12 +29,12 @@ index efa1797b7b..797285e3be 100644
assert(bs > de->buffer_size);
- n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size);
-+ n = getdents64(dir_fd, de->buffer + de->buffer_size, bs - de->buffer_size);
++ n = getdents64(dir_fd, (struct dirent*)((uint8_t*) de->buffer + de->buffer_size), bs - de->buffer_size);
if (n < 0)
return -errno;
if (n == 0)
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
-index efac7b002e..9e1fe7f5a0 100644
+index c2269844f8..7cd6c7fa42 100644
--- a/src/basic/stat-util.c
+++ b/src/basic/stat-util.c
@@ -99,7 +99,7 @@ int dir_is_empty_at(int dir_fd, const char *path) {
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch b/poky/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch
new file mode 100644
index 0000000000..8567283537
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-resolve-Use-sockaddr-pointer-type-for-bind.patch
@@ -0,0 +1,46 @@
+From ad1428f29196bcc88ae382ee67ff705928e2be24 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 5 May 2022 20:25:37 -0700
+Subject: [PATCH] resolve: Use sockaddr pointer type for bind()
+
+bind() expects sockaddr* but SERVER_ADDRESS is sockaddr_in type struct
+
+Fixes errors with clang e.g.
+
+../git/src/resolve/test-resolved-stream.c:112:32: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
+ assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
+ ^~~~~~~~~~~~~~~
+../git/src/resolve/test-resolved-stream.c:251:39: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
+ r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23281]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/resolve/test-resolved-stream.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/resolve/test-resolved-stream.c b/src/resolve/test-resolved-stream.c
+index f12c729e50..504b532002 100644
+--- a/src/resolve/test-resolved-stream.c
++++ b/src/resolve/test-resolved-stream.c
+@@ -109,7 +109,7 @@ static void *tcp_dns_server(void *p) {
+
+ assert_se((bindfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)) >= 0);
+ assert_se(setsockopt(bindfd, SOL_SOCKET, SO_REUSEADDR, &(int){1}, sizeof(int)) >= 0);
+- assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
++ assert_se(bind(bindfd, (struct sockaddr*)&SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
+ assert_se(listen(bindfd, 1) >= 0);
+ assert_se((acceptfd = accept(bindfd, NULL, NULL)) >= 0);
+ server_handle(acceptfd);
+@@ -248,7 +248,7 @@ static void test_dns_stream(bool tls) {
+ assert_se((clientfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)) >= 0);
+
+ for (int i = 0; i < 100; i++) {
+- r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
++ r = connect(clientfd, (struct sockaddr*)&SERVER_ADDRESS, sizeof(SERVER_ADDRESS));
+ if (r >= 0)
+ break;
+ usleep(EVENT_TIMEOUT_USEC / 100);
+--
+2.36.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch b/poky/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
deleted file mode 100644
index 752824688f..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 58860e0f248576a80ff2af256ba42713c186ae93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 29 Sep 2020 18:01:41 -0700
-Subject: [PATCH] systemd.pc.in: use ROOTPREFIX without suffixed slash
-
-This complements the commit
-https://github.com/poettering/systemd/commit/b612c26ceb9f56af0271fc9f07c1724d2d260a8a
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/core/systemd.pc.in | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
-index b5cc8f9..21dbf30 100644
---- a/src/core/systemd.pc.in
-+++ b/src/core/systemd.pc.in
-@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir}
- tmpfiles_dir=${prefix}/lib/tmpfiles.d
- tmpfilesdir=${tmpfiles_dir}
-
--sysusers_dir=${rootprefix}/lib/sysusers.d
-+sysusers_dir=${prefix}/lib/sysusers.d
- sysusersdir=${sysusers_dir}
-
--sysctl_dir=${rootprefix}/lib/sysctl.d
-+sysctl_dir=${prefix}/lib/sysctl.d
- sysctldir=${sysctl_dir}
-
--binfmt_dir=${rootprefix}/lib/binfmt.d
-+binfmt_dir=${prefix}/lib/binfmt.d
- binfmtdir=${binfmt_dir}
-
--modules_load_dir=${rootprefix}/lib/modules-load.d
-+modules_load_dir=${prefix}/lib/modules-load.d
- modulesloaddir=${modules_load_dir}
-
- catalog_dir=${prefix}/lib/systemd/catalog
---
-2.25.1
-
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
deleted file mode 100644
index 898e8af904..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 93c7e482d39cf7765974b3c729d29c1b120a60e3 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 cf3d54288a..15104e5282 100644
---- a/src/test/test-parse-argument.c
-+++ b/src/test/test-parse-argument.c
-@@ -5,6 +5,7 @@
- #include "parse-argument.h"
- #include "stdio-util.h"
- #include "tests.h"
-+#include <signal.h>
-
- TEST(parse_json_argument) {
- JsonFormatFlags flags = JSON_FORMAT_PRETTY;
diff --git a/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
index 7dfa1a0df2..8cf0546450 100644
--- a/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
+++ b/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
@@ -1,13 +1,14 @@
-From d16f7b37c917b91e951b9313e2c8264c72ed93e5 Mon Sep 17 00:00:00 2001
+From 4b731a5e2547b5292f9a774b849e14c0cf7b3955 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 15:17:37 -0800
-Subject: [PATCH 2/2] Add sys/stat.h for S_IFDIR
+Subject: [PATCH] Add sys/stat.h for S_IFDIR
../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR'
r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR);
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/23441]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/shared/mkdir-label.c | 1 +
1 file changed, 1 insertion(+)
@@ -24,6 +25,3 @@ index d36a6466d7..63b764cd83 100644
int mkdirat_label(int dirfd, const char *path, mode_t mode) {
int r;
---
-2.34.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
deleted file mode 100644
index 5027682df2..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 5d730902f47498a2866b46875352f6810a01d67c 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] don't use glibc-specific qsort_r
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-[Rebased for v241]
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-[Rebased for v242]
-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/shared/format-table.c | 36 ++++++++++++++++++++++++------------
- src/shared/hwdb-util.c | 19 ++++++++++++++-----
- 3 files changed, 38 insertions(+), 31 deletions(-)
-
---- a/src/basic/sort-util.h
-+++ b/src/basic/sort-util.h
-@@ -61,18 +61,4 @@ static inline void _qsort_safe(void *bas
- _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \
- })
-
--static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) {
-- if (nmemb <= 1)
-- return;
--
-- assert(base);
-- qsort_r(base, nmemb, size, compar, userdata);
--}
--
--#define typesafe_qsort_r(p, n, func, userdata) \
-- ({ \
-- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
-- qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \
-- })
--
- int cmp_int(const int *a, const int *b);
---- a/src/shared/format-table.c
-+++ b/src/shared/format-table.c
-@@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData *
- return CMP(index_a, index_b);
- }
-
--static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
-+static Table *user_table;
-+static int table_data_compare(const void *x, const void *y) {
-+ const size_t *a = x, *b=y;
- int r;
-
-- assert(t);
-- assert(t->sort_map);
-+ assert(user_table);
-+ assert(user_table->sort_map);
-
- /* Make sure the header stays at the beginning */
-- if (*a < t->n_columns && *b < t->n_columns)
-+ if (*a < user_table->n_columns && *b < user_table->n_columns)
- return 0;
-- if (*a < t->n_columns)
-+ if (*a < user_table->n_columns)
- return -1;
-- if (*b < t->n_columns)
-+ if (*b < user_table->n_columns)
- return 1;
-
- /* Order other lines by the sorting map */
-- for (size_t i = 0; i < t->n_sort_map; i++) {
-+ for (size_t i = 0; i < user_table->n_sort_map; i++) {
- TableData *d, *dd;
-
-- d = t->data[*a + t->sort_map[i]];
-- dd = t->data[*b + t->sort_map[i]];
-+ d = user_table->data[*a + user_table->sort_map[i]];
-+ dd = user_table->data[*b + user_table->sort_map[i]];
-
- r = cell_data_compare(d, *a, dd, *b);
- if (r != 0)
-- return t->reverse_map && t->reverse_map[t->sort_map[i]] ? -r : r;
-+ return user_table->reverse_map && user_table->reverse_map[user_table->sort_map[i]] ? -r : r;
- }
-
- /* Order identical lines by the order there were originally added in */
-@@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) {
- for (size_t i = 0; i < n_rows; i++)
- sorted[i] = i * t->n_columns;
-
-- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
-+ if (n_rows <= 1)
-+ return 0;
-+ assert(sorted);
-+ user_table = t;
-+ qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
-+ user_table = NULL;
- }
-
- if (t->display_map)
-@@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant
- for (size_t i = 0; i < n_rows; i++)
- sorted[i] = i * t->n_columns;
-
-- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
-+ if (n_rows <= 1)
-+ return 0;
-+ assert(sorted);
-+ user_table = t;
-+ qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
-+ user_table = NULL;
- }
-
- if (t->display_map)
---- a/src/shared/hwdb-util.c
-+++ b/src/shared/hwdb-util.c
-@@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri
-
- DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
-
--static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
-- return strcmp(trie->strings->buf + a->key_off,
-- trie->strings->buf + b->key_off);
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
-+ const struct trie_value_entry *a = v1;
-+ const struct trie_value_entry *b = v2;
-+
-+ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
-+ trie_node_add_value_trie->strings->buf + b->key_off);
- }
-
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr
- .value_off = v,
- };
-
-- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
-+
- if (val) {
- /* At this point we have 2 identical properties on the same match-string.
- * Since we process files in order, we just replace the previous value. */
-@@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr
- .line_number = line_number,
- };
- node->values_count++;
-- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
- return 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-comparison_fn_t.patch
index f3edc7d82b..c28c8381e8 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-comparison_fn_t.patch
@@ -1,10 +1,9 @@
-From 3b42a888685aee1776a12cff84a5fe0063378483 Mon Sep 17 00:00:00 2001
+From 5513b918d02900a3a78fd0e0300a118b163edfef 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] missing_type.h: add __compare_fn_t and comparison_fn_t
+Subject: [PATCH] missing_type.h: add comparison_fn_t
-Make it work with musl where comparison_fn_t and __compare_fn_t
-is not provided.
+Make it work with musl where comparison_fn_t and is not provided.
Upstream-Status: Inappropriate [musl specific]
@@ -13,17 +12,19 @@ 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>
-
+[Rebased for v250, Drop __compare_fn_t]
+Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
- src/basic/missing_type.h | 9 +++++++++
+ src/basic/missing_type.h | 4 ++++
src/basic/sort-util.h | 1 +
- src/core/kmod-setup.c | 1 +
src/libsystemd/sd-journal/catalog.c | 1 +
- 4 files changed, 12 insertions(+)
+ 3 files changed, 6 insertions(+)
+diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
+index f6233090a9..6c0456349d 100644
--- a/src/basic/missing_type.h
+++ b/src/basic/missing_type.h
-@@ -10,3 +10,12 @@
+@@ -10,3 +10,7 @@
#if !HAVE_CHAR16_T
#define char16_t uint16_t
#endif
@@ -31,11 +32,8 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+#ifndef __GLIBC__
+typedef int (*comparison_fn_t)(const void *, const void *);
+#endif
-+
-+#ifndef __COMPAR_FN_T
-+#define __COMPAR_FN_T
-+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 02a6784d99..0b33c83d59 100644
--- a/src/basic/sort-util.h
+++ b/src/basic/sort-util.h
@@ -4,6 +4,7 @@
@@ -46,16 +44,8 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
/* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
* external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
---- a/src/core/kmod-setup.c
-+++ b/src/core/kmod-setup.c
-@@ -10,6 +10,7 @@
- #include "macro.h"
- #include "recurse-dir.h"
- #include "string-util.h"
-+#include "missing_type.h"
-
- #if HAVE_KMOD
- #include "module-util.h"
+diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
+index 8fc87b131a..36a6efdbd8 100644
--- a/src/libsystemd/sd-journal/catalog.c
+++ b/src/libsystemd/sd-journal/catalog.c
@@ -28,6 +28,7 @@
@@ -66,3 +56,6 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
const char * const catalog_file_dirs[] = {
"/usr/local/lib/systemd/catalog/",
+--
+2.34.1
+
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 d93f630752..1bd538b0c0 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,4 +1,4 @@
-From 3e0df2c22bfd37bc62bf09a01ec498e40d3599de Mon Sep 17 00:00:00 2001
+From 3d9910dcda697b1e361bba49c99050ee0d116742 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] add fallback parse_printf_format implementation
@@ -22,6 +22,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
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 cb9936ee8b..ae53345260 100644
--- a/meson.build
+++ b/meson.build
@@ -686,6 +686,7 @@ endif
@@ -32,9 +34,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
'sys/auxv.h',
'valgrind/memcheck.h',
'valgrind/valgrind.h',
+diff --git a/src/basic/meson.build b/src/basic/meson.build
+index 49e1e7f43e..4131494bfa 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
-@@ -335,6 +335,11 @@ endforeach
+@@ -334,6 +334,11 @@ endforeach
basic_sources += generated_gperf_headers
@@ -46,6 +50,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
############################################################
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
--- /dev/null
+++ b/src/basic/parse-printf-format.c
@@ -0,0 +1,273 @@
@@ -322,6 +329,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+ return last;
+}
+diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
+new file mode 100644
+index 0000000000..47be7522d7
--- /dev/null
+++ b/src/basic/parse-printf-format.h
@@ -0,0 +1,57 @@
@@ -382,6 +392,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+size_t parse_printf_format(const char *fmt, size_t n, int *types);
+
+#endif /* HAVE_PRINTF_H */
+diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
+index 69d7062ec6..f55c5aab2c 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -1,13 +1,13 @@
@@ -399,6 +411,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
#define snprintf_ok(buf, len, fmt, ...) \
({ \
+diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
+index 1e10ed5524..e6ceba54f9 100644
--- a/src/libsystemd/sd-journal/journal-send.c
+++ b/src/libsystemd/sd-journal/journal-send.c
@@ -2,7 +2,6 @@
@@ -409,7 +423,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
#include <stddef.h>
#include <sys/un.h>
#include <unistd.h>
-@@ -21,6 +20,7 @@
+@@ -25,6 +24,7 @@
#include "stdio-util.h"
#include "string-util.h"
#include "tmpfile-util.h"
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 36545c2f60..680930ca3c 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,4 +1,4 @@
-From cef23a651ea200e30e1e6ed2a2564505e3a42d46 Mon Sep 17 00:00:00 2001
+From 106b7bd7186c9d6c1dcd72bd4ca6457d3fa72d0b 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] src/basic/missing.h: check for missing strndupa
@@ -17,7 +17,6 @@ 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 +
@@ -41,6 +40,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
src/core/kmod-setup.c | 1 +
src/core/service.c | 1 +
src/coredump/coredump-vacuum.c | 1 +
+ src/fstab-generator/fstab-generator.c | 1 +
src/journal-remote/journal-remote-main.c | 1 +
src/journal/journalctl.c | 1 +
src/libsystemd/sd-bus/bus-message.c | 1 +
@@ -70,11 +70,13 @@ 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 +
- 51 files changed, 62 insertions(+)
+ 52 files changed, 63 insertions(+)
+diff --git a/meson.build b/meson.build
+index cb9936ee8b..7ab201c6d9 100644
--- a/meson.build
+++ b/meson.build
-@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec
+@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__secure_getenv']
endforeach
foreach ident : [
@@ -82,6 +84,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
['memfd_create', '''#include <sys/mman.h>'''],
['gettid', '''#include <sys/types.h>
#include <unistd.h>'''],
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index 5a3095cbba..22cfa4d526 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -19,6 +19,7 @@
@@ -92,6 +96,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int help(void) {
_cleanup_free_ char *link = NULL;
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index a626ecf2e2..f7dc6c8421 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -37,6 +37,7 @@
@@ -102,6 +108,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
_cleanup_free_ char *fs = NULL;
+diff --git a/src/basic/env-util.c b/src/basic/env-util.c
+index 885967e7f3..d0b7dc845e 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -19,6 +19,7 @@
@@ -112,6 +120,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
/* We follow bash for the character set. Different shells have different rules. */
#define VALID_BASH_ENV_NAME_CHARS \
+diff --git a/src/basic/log.c b/src/basic/log.c
+index 12071e2ebd..15254c7bbc 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -36,6 +36,7 @@
@@ -122,6 +132,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define SNDBUF_SIZE (8*1024*1024)
+diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
+index 8c76f93eb2..9068bfb4f0 100644
--- a/src/basic/missing_stdlib.h
+++ b/src/basic/missing_stdlib.h
@@ -11,3 +11,15 @@
@@ -140,6 +152,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
+ (char *)memcpy(__new, __old, __len); \
+ })
+#endif
+diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
+index 51a0d74e87..03569f71f8 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
@@ -15,6 +15,7 @@
@@ -150,6 +164,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int mkdir_safe_internal(
const char *path,
+diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
+index 82a33a6829..d947774b40 100644
--- a/src/basic/mountpoint-util.c
+++ b/src/basic/mountpoint-util.c
@@ -13,6 +13,7 @@
@@ -160,6 +176,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include "mountpoint-util.h"
#include "nulstr-util.h"
#include "parse-util.h"
+diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
+index 2888ab6523..d941afec2d 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
@@ -18,6 +18,7 @@
@@ -170,6 +188,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int parse_boolean(const char *v) {
if (!v)
+diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
+index 6fb8c40e7a..c4b59e8518 100644
--- a/src/basic/path-lookup.c
+++ b/src/basic/path-lookup.c
@@ -16,6 +16,7 @@
@@ -180,6 +200,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int xdg_user_runtime_dir(char **ret, const char *suffix) {
const char *e;
+diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c
+index cab9d0eaea..5f6ca258e9 100644
--- a/src/basic/percent-util.c
+++ b/src/basic/percent-util.c
@@ -3,6 +3,7 @@
@@ -190,6 +212,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int parse_parts_value_whole(const char *p, const char *symbol) {
const char *pc, *n;
+diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
+index 410b8a3eb5..f2c4355609 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -15,6 +15,7 @@
@@ -200,6 +224,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int proc_cmdline(char **ret) {
const char *e;
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index 65f96abb06..e485a0196b 100644
--- a/src/basic/procfs-util.c
+++ b/src/basic/procfs-util.c
@@ -12,6 +12,7 @@
@@ -210,6 +236,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int procfs_get_pid_max(uint64_t *ret) {
_cleanup_free_ char *value = NULL;
+diff --git a/src/basic/time-util.c b/src/basic/time-util.c
+index b659d6905d..020112be24 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -26,6 +26,7 @@
@@ -220,6 +248,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static clockid_t map_clock_id(clockid_t c) {
+diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
+index 9e4b0d1f72..d640316ff7 100644
--- a/src/boot/bless-boot.c
+++ b/src/boot/bless-boot.c
@@ -19,6 +19,7 @@
@@ -230,6 +260,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static char **arg_path = NULL;
+diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
+index f0d8759e85..b4c1053e64 100644
+--- a/src/core/dbus-cgroup.c
++++ b/src/core/dbus-cgroup.c
+@@ -21,6 +21,7 @@
+ #include "parse-util.h"
+ #include "path-util.h"
+ #include "percent-util.h"
++#include "missing_stdlib.h"
+ #include "socket-util.h"
+
+ BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 5c499e5d06..e7ab1bb9a5 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -44,6 +44,7 @@
@@ -240,6 +284,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
+diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
+index 32a2ec0ff9..36be2511e4 100644
--- a/src/core/dbus-util.c
+++ b/src/core/dbus-util.c
@@ -9,6 +9,7 @@
@@ -250,6 +296,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int bus_property_get_triggered_unit(
sd_bus *bus,
+diff --git a/src/core/execute.c b/src/core/execute.c
+index 0b20d386d3..fccfb9268c 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -102,6 +102,7 @@
@@ -260,16 +308,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
+diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
+index d054668b8e..9b4caa7651 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
-@@ -11,6 +11,7 @@
+@@ -10,6 +10,7 @@
+ #include "macro.h"
#include "recurse-dir.h"
#include "string-util.h"
- #include "missing_type.h"
+#include "missing_stdlib.h"
#if HAVE_KMOD
#include "module-util.h"
+diff --git a/src/core/service.c b/src/core/service.c
+index 87f0d34c8c..ccda3feb29 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -42,6 +42,7 @@
@@ -280,6 +332,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
+diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
+index dcf9cc03cd..8f8d992ec2 100644
--- a/src/coredump/coredump-vacuum.c
+++ b/src/coredump/coredump-vacuum.c
@@ -16,6 +16,7 @@
@@ -290,6 +344,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
#define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index 9b32383a76..f8d3397a06 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -29,6 +29,7 @@
+ #include "util.h"
+ #include "virt.h"
+ #include "volatile-util.h"
++#include "missing_stdlib.h"
+
+ typedef enum MountPointFlags {
+ MOUNT_NOAUTO = 1 << 0,
+diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
+index 3e3646e45f..6a8fc60f6d 100644
--- a/src/journal-remote/journal-remote-main.c
+++ b/src/journal-remote/journal-remote-main.c
@@ -24,6 +24,7 @@
@@ -300,6 +368,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
#define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
+diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
+index 3c4a7c0a7a..6a792404f2 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -73,6 +73,7 @@
@@ -310,6 +380,8 @@ 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 */
+diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
+index 96529b422b..ddb5e9c698 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -20,6 +20,7 @@
@@ -320,6 +392,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
+diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
+index 28d8336718..5d3ce88a53 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
@@ -12,6 +12,7 @@
@@ -330,6 +404,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int node_vtable_get_userdata(
sd_bus *bus,
+diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
+index 14951ccb33..b7f86ca501 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -28,6 +28,7 @@
@@ -340,6 +416,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define SNDBUF_SIZE (8*1024*1024)
+diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
+index 9e1d29cc1d..8c3165f0ce 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -43,6 +43,7 @@
@@ -350,6 +428,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define log_debug_bus_message(m) \
do { \
+diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
+index 317653bedc..d028216c48 100644
--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
@@ -14,6 +14,7 @@
@@ -360,6 +440,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define MAX_SIZE (2*1024*1024)
+diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
+index 7a6cc4aca3..b7f7cd65c5 100644
--- a/src/libsystemd/sd-journal/sd-journal.c
+++ b/src/libsystemd/sd-journal/sd-journal.c
@@ -41,6 +41,7 @@
@@ -370,6 +452,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define JOURNAL_FILES_MAX 7168
+diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
+index 10d2ed7aec..4fbe3f6b4a 100644
--- a/src/locale/keymap-util.c
+++ b/src/locale/keymap-util.c
@@ -24,6 +24,7 @@
@@ -380,6 +464,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static bool startswith_comma(const char *s, const char *prefix) {
s = startswith(s, prefix);
+diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
+index 5bd7efc3e8..282899601e 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
@@ -31,6 +31,7 @@
@@ -390,6 +476,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include "pam-util.h"
#include "parse-util.h"
#include "path-util.h"
+diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
+index 063ad08d80..f9823a433b 100644
--- a/src/network/generator/network-generator.c
+++ b/src/network/generator/network-generator.c
@@ -13,6 +13,7 @@
@@ -400,6 +488,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
/*
# .network
+diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
+index 1f58bf3ed4..8457a3b0e3 100644
--- a/src/nspawn/nspawn-settings.c
+++ b/src/nspawn/nspawn-settings.c
@@ -17,6 +17,7 @@
@@ -410,6 +500,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Settings *settings_new(void) {
Settings *s;
+diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
+index c64e79bdff..eda26b0b9a 100644
--- a/src/nss-mymachines/nss-mymachines.c
+++ b/src/nss-mymachines/nss-mymachines.c
@@ -21,6 +21,7 @@
@@ -420,6 +512,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static void setup_logging_once(void) {
static pthread_once_t once = PTHREAD_ONCE_INIT;
+diff --git a/src/portable/portable.c b/src/portable/portable.c
+index 0e6461ba93..54148d5924 100644
--- a/src/portable/portable.c
+++ b/src/portable/portable.c
@@ -39,6 +39,7 @@
@@ -430,6 +524,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
/* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was
* dropped there by the portable service logic and b) for which image it was dropped there. */
+diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
+index 5b3ceeff36..d36d1d57ae 100644
--- a/src/resolve/resolvectl.c
+++ b/src/resolve/resolvectl.c
@@ -43,6 +43,7 @@
@@ -440,6 +536,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int arg_family = AF_UNSPEC;
static int arg_ifindex = 0;
+diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
+index 8b4f66b22e..5926e4c61b 100644
--- a/src/shared/bus-get-properties.c
+++ b/src/shared/bus-get-properties.c
@@ -4,6 +4,7 @@
@@ -450,6 +548,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int bus_property_get_bool(
sd_bus *bus,
+diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
+index 87c0334fec..402ab3493b 100644
--- a/src/shared/bus-unit-procs.c
+++ b/src/shared/bus-unit-procs.c
@@ -10,6 +10,7 @@
@@ -460,6 +560,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
struct CGroupInfo {
char *cgroup_path;
+diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
+index dcce530c99..faf5a5bda0 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -49,6 +49,7 @@
@@ -470,6 +572,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
assert(message);
+diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
+index 4a2b7684bc..ee6d687c58 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -21,6 +21,7 @@
@@ -480,6 +584,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
sd_event *e = userdata;
+diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
+index f54b187a1b..299758c7e4 100644
--- a/src/shared/dns-domain.c
+++ b/src/shared/dns-domain.c
@@ -17,6 +17,7 @@
@@ -490,6 +596,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
const char *n;
+diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
+index c6caf9330a..ebe33bd44a 100644
--- a/src/shared/journal-importer.c
+++ b/src/shared/journal-importer.c
@@ -15,6 +15,7 @@
@@ -500,6 +608,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
enum {
IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
+diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
+index cf83eb6bca..e672a003a3 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -42,6 +42,7 @@
@@ -510,6 +620,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
/* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
#define PRINT_LINE_THRESHOLD 3
+diff --git a/src/shared/pager.c b/src/shared/pager.c
+index f75ef62d2d..530001a821 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -26,6 +26,7 @@
@@ -520,6 +632,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static pid_t pager_pid = 0;
+diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
+index 2c07a1b7a8..2a9d6ef4ab 100644
--- a/src/shared/uid-range.c
+++ b/src/shared/uid-range.c
@@ -9,6 +9,7 @@
@@ -530,6 +644,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
assert(range);
+diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
+index 7e9ab19666..56f619e54e 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/socket-proxy/socket-proxyd.c
@@ -26,6 +26,7 @@
@@ -540,6 +656,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define BUFFER_SIZE (256 * 1024)
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index cc9a7cb838..a679614a47 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
@@ -7,6 +7,7 @@
@@ -550,6 +668,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include "tests.h"
TEST(hexchar) {
+diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
+index ae92e45205..1e6f3205cb 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
@@ -22,6 +22,7 @@
@@ -560,6 +680,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
_printf_(2,3)
static void path_prepend(char **path, const char *fmt, ...) {
+diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
+index a60e4f294c..571c43765b 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -35,6 +35,7 @@
@@ -570,6 +692,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
typedef struct Spawn {
sd_device *device;
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index 1a384d6b38..0089833e3f 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -34,6 +34,7 @@
@@ -580,23 +704,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
---- a/src/core/dbus-cgroup.c
-+++ b/src/core/dbus-cgroup.c
-@@ -21,6 +21,7 @@
- #include "parse-util.h"
- #include "path-util.h"
- #include "percent-util.h"
-+#include "missing_stdlib.h"
- #include "socket-util.h"
-
- BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
---- a/src/fstab-generator/fstab-generator.c
-+++ b/src/fstab-generator/fstab-generator.c
-@@ -29,6 +29,7 @@
- #include "util.h"
- #include "virt.h"
- #include "volatile-util.h"
-+#include "missing_stdlib.h"
-
- typedef enum MountPointFlags {
- MOUNT_NOAUTO = 1 << 0,
+--
+2.34.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 846c01bd4f..b84fbaa67e 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,4 +1,4 @@
-From fb068403b25002156435350165ea418a6338a313 Mon Sep 17 00:00:00 2001
+From 74c664bcd6b9a5fcf3466310c07f608d12456f7f 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] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined
@@ -23,6 +23,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
src/tmpfiles/tmpfiles.c | 10 ++++++++++
3 files changed, 38 insertions(+)
+diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
+index e026b29478..815e56ef68 100644
--- a/src/basic/glob-util.c
+++ b/src/basic/glob-util.c
@@ -12,6 +12,12 @@
@@ -46,7 +48,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
/* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
assert(!(flags & GLOB_ALTDIRFUNC));
-@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag
+@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
pglob->gl_lstat = lstat;
if (!pglob->gl_stat)
pglob->gl_stat = stat;
@@ -61,6 +63,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (k == GLOB_NOMATCH)
return -ENOENT;
if (k == GLOB_NOSPACE)
+diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
+index ec8b74f48f..d99a6095df 100644
--- a/src/test/test-glob-util.c
+++ b/src/test/test-glob-util.c
@@ -13,6 +13,12 @@
@@ -110,6 +114,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
assert_se(r == GLOB_NOMATCH);
(void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
+diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
+index fcab51c208..fdef1807ae 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -67,6 +67,12 @@
@@ -135,7 +141,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
};
int r = 0, k;
char **fn;
-@@ -1981,7 +1989,9 @@ static int glob_item(Item *i, action_t a
+@@ -1981,7 +1989,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 = {
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 57e18a5808..0c0d3d0b62 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,4 +1,4 @@
-From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 Mon Sep 17 00:00:00 2001
+From a0450f7909348e7ff1d58adc0aee4119a0519c1f 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] add missing FTW_ macros for musl
@@ -7,20 +7,26 @@ This is to avoid build failures like below for musl.
locale-util.c:296:24: error: 'FTW_STOP' undeclared
+Revisit this when upgrading to 251+ since most of these defines are not
+needed anymore except FTW_CONTINUE
+
Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- src/basic/missing_type.h | 20 ++++++++++++++++++++
- src/shared/mount-setup.c | 1 +
- 2 files changed, 21 insertions(+)
+ src/basic/missing_type.h | 20 ++++++++++++++++++++
+ src/shared/mount-setup.c | 1 +
+ src/test/test-recurse-dir.c | 1 +
+ 3 files changed, 22 insertions(+)
+diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
+index 6c0456349d..5140892e22 100644
--- a/src/basic/missing_type.h
+++ b/src/basic/missing_type.h
-@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi
- #define __COMPAR_FN_T
- typedef int (*__compar_fn_t)(const void *, const void *);
+@@ -14,3 +14,23 @@
+ #ifndef __GLIBC__
+ typedef int (*comparison_fn_t)(const void *, const void *);
#endif
+
+#ifndef FTW_ACTIONRETVAL
@@ -42,6 +48,8 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+#ifndef FTW_SKIP_SIBLINGS
+#define FTW_SKIP_SIBLINGS 3
+#endif
+diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c
+index 7917968497..cc3d5baaab 100644
--- a/src/shared/mount-setup.c
+++ b/src/shared/mount-setup.c
@@ -32,6 +32,7 @@
@@ -52,6 +60,8 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
typedef enum MountMode {
MNT_NONE = 0,
+diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c
+index 2c2120b136..bc60a178a2 100644
--- a/src/test/test-recurse-dir.c
+++ b/src/test/test-recurse-dir.c
@@ -6,6 +6,7 @@
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 0fc320420e..e7b7269f95 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,10 +1,13 @@
-From c7453b716ae308b89cf4b2b231a36ddd38a49752 Mon Sep 17 00:00:00 2001
+From 3ca0920429f7eaf8c59f9ac8afd30a43b83d95ed 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] fix missing of __register_atfork for non-glibc builds
Upstream-Status: Inappropriate [musl specific]
+Drop this when upgrading to 251+, systemd does not use
+__register_atfork anymore
+
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
@@ -12,7 +15,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
1 file changed, 7 insertions(+)
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index 461bbfe9a5..2d06f9f60a 100644
+index c971852158..df6e85b1fc 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -18,6 +18,9 @@
@@ -25,7 +28,7 @@ index 461bbfe9a5..2d06f9f60a 100644
#include "alloc-util.h"
#include "architecture.h"
-@@ -1202,11 +1205,15 @@ void reset_cached_pid(void) {
+@@ -1161,11 +1164,15 @@ void reset_cached_pid(void) {
cached_pid = CACHED_PID_UNSET;
}
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 029f413aa8..3a47d09e8a 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,4 +1,4 @@
-From 856010e268a6aca8e5f02502457afe289bd877f1 Mon Sep 17 00:00:00 2001
+From 48a791aae7a47a2a08e9e60c18054071a43b8cda 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] Use uintmax_t for handling rlim_t
@@ -27,9 +27,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/core/execute.c | 4 ++--
3 files changed, 9 insertions(+), 15 deletions(-)
+diff --git a/src/basic/format-util.h b/src/basic/format-util.h
+index 8719df3e29..9becc96066 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
-@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32
+@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
# error Unknown timex member size
#endif
@@ -44,9 +46,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
#if SIZEOF_DEV_T == 8
# define DEV_FMT "%" PRIu64
+diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
+index 33dfde9d6c..e018fd81fd 100644
--- a/src/basic/rlimit-util.c
+++ b/src/basic/rlimit-util.c
-@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons
+@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) {
fixed.rlim_max == highest.rlim_max)
return 0;
@@ -55,7 +59,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
return RET_NERRNO(setrlimit(resource, &fixed));
}
-@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r
+@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
r = free_and_strdup(&s, "infinity");
else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -82,9 +86,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
return 1;
}
+diff --git a/src/core/execute.c b/src/core/execute.c
+index fccfb9268c..90f00e10a5 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
-@@ -5639,9 +5639,9 @@ void exec_context_dump(const ExecContext
+@@ -5633,9 +5633,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",
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 327084bae9..7e4587cc23 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,4 +1,4 @@
-From ad395dda5db9b1ae156be121cfc8a38960de6c55 Mon Sep 17 00:00:00 2001
+From e8025c8eefdf1be4bba34c48f3430838f3859c52 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] test-sizeof.c: Disable tests for missing typedefs in musl
@@ -12,6 +12,8 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/test/test-sizeof.c | 4 ++++
1 file changed, 4 insertions(+)
+diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
+index f349852553..602772227e 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -55,8 +55,10 @@ int main(void) {
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 0026a7b72a..6eecd3197c 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,4 +1,4 @@
-From 5d4c6b2f4b88b69b31f967371d2a6136c65dc3fd Mon Sep 17 00:00:00 2001
+From 46fdc959257d60d9b32953cae0152ae118f8564b Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 10 Oct 2017 14:33:30 -0700
Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
@@ -27,13 +27,15 @@ Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
- src/basic/fs-util.h | 23 +++++++++++++++++++++--
+ src/basic/fs-util.h | 21 ++++++++++++++++++++-
src/shared/base-filesystem.c | 6 +++---
- 2 files changed, 24 insertions(+), 5 deletions(-)
+ 2 files changed, 23 insertions(+), 4 deletions(-)
+diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
+index 0bbb3f6298..3dc494dbfb 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
-@@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct
+@@ -46,8 +46,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);
@@ -62,9 +64,11 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
int touch(const char *path);
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index 5f5328c8cf..d396bc99fe 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
-@@ -117,7 +117,7 @@ int base_filesystem_create(const char *r
+@@ -117,7 +117,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
return log_error_errno(errno, "Failed to open root file system: %m");
for (size_t i = 0; i < ELEMENTSOF(table); i++) {
@@ -73,7 +77,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
continue;
if (table[i].target) {
-@@ -125,7 +125,7 @@ int base_filesystem_create(const char *r
+@@ -125,7 +125,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
/* check if one of the targets exists */
NULSTR_FOREACH(s, table[i].target) {
@@ -82,7 +86,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
continue;
/* check if a specific file exists at the target path */
-@@ -136,7 +136,7 @@ int base_filesystem_create(const char *r
+@@ -136,7 +136,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
if (!p)
return log_oom();
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 612a535d3c..7b22d6214f 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,4 +1,4 @@
-From 1803ea271b93370fdcf7ec497277344f1e775429 Mon Sep 17 00:00:00 2001
+From d0bdce977b7acc5e45e82cf84256c4bedc0e74c4 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] Define glibc compatible basename() for non-glibc systems
@@ -14,6 +14,8 @@ 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 8f11afd65b..a2b57deb7a 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -10,6 +10,11 @@
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 baf4903803..015347cb6a 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,4 +1,4 @@
-From 30b08f76ea7f5c324afedf97f0867b76dac9f128 Mon Sep 17 00:00:00 2001
+From e480d28305907c3874f4e58b722b8aa43c3ac7a2 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] Do not disable buffering when writing to oom_score_adj
@@ -24,6 +24,8 @@ 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 df6e85b1fc..635dbb5d26 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) {
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 878914b307..c563982607 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,4 +1,4 @@
-From 873202f63f9f117c6e5a98e444cc709057042979 Mon Sep 17 00:00:00 2001
+From 0542d27ebbb250c09bdcfcf9f2ea3d27426fe522 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] distinguish XSI-compliant strerror_r from GNU-specifi
@@ -24,9 +24,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/libsystemd/sd-journal/journal-send.c | 5 +++++
2 files changed, 10 insertions(+)
+diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
+index bdfa145ab7..61928f4bf3 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
-@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er
+@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
return;
errno = 0;
@@ -39,9 +41,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
if (errno == ERANGE || strlen(x) >= k - 1) {
free(m);
k *= 2;
+diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
+index e6ceba54f9..285ebbc9ef 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(co
+@@ -370,7 +370,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
char* j;
errno = 0;
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
deleted file mode 100644
index e6507c5f89..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e7441559266074e7a33e3c11ff5cdaf5ba9c0e24 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] 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
-
-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(-)
-
-diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
-index c49be29e46..90731bd7e7 100644
---- a/src/libsystemd/sd-bus/bus-error.c
-+++ b/src/libsystemd/sd-bus/bus-error.c
-@@ -55,8 +55,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
- };
-
- /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
--extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[];
--extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[];
-+extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[] _hidden_;
-+extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[] _hidden_;
-
- /* Additional maps registered with sd_bus_error_add_map() are in this
- * NULL terminated array */
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
deleted file mode 100644
index eeff693bc4..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 64f4d2eb976b9f23ce85b3655a876f7299eafd58 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] 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'?
-
-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(+)
-
-diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index 3df1084ef2..697aa7f58a 100644
---- a/src/basic/missing_type.h
-+++ b/src/basic/missing_type.h
-@@ -13,6 +13,7 @@
-
- #ifndef __GLIBC__
- typedef int (*comparison_fn_t)(const void *, const void *);
-+typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
- #endif
-
- #ifndef __COMPAR_FN_T
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 5ca5386289..1fcba7af08 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,4 +1,4 @@
-From d95330f328c23c1cd6c51aeca43f081746cf2899 Mon Sep 17 00:00:00 2001
+From e1d0210b47906dd121f936f3181092835df6a95c 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] avoid redefinition of prctl_mm_map structure
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
deleted file mode 100644
index d51ac4265a..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 2284f2f44b1b30f10b9196e0f5c6d0a2e0c1871f 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] 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 7c94fbfedb..42f966722d 100644
---- a/src/partition/makefs.c
-+++ b/src/partition/makefs.c
-@@ -6,6 +6,7 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <unistd.h>
-+#include <sys/file.h>
-
- #include "alloc-util.h"
- #include "blockdev-util.h"
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
deleted file mode 100644
index 1ba5c1292b..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a6a25e1ecae91f48a4f87bf0cc17eaaf0a919ffe 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] 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]
-| 4893 | if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
-| | ^~~~~~
-| | |
-| | struct sockaddr_un *
-| In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22,
-| from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21:
-| /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *'
-| 384 | int connect (int, const struct sockaddr *, socklen_t);
-| | ^~~~~~~~~~~~~~~~~~~~~~~
-| cc1: some warnings being treated as errors
-
-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(-)
-
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -5389,7 +5389,7 @@ static int cant_be_in_netns(void) {
- if (fd < 0)
- return log_error_errno(errno, "Failed to allocate udev control socket: %m");
-
-- if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
-+ if (connect(fd, (struct sockaddr *)&sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
-
- if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno))
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
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 dfab8fbbdf..82a01f732e 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,4 +1,4 @@
-From 47472da6e8900773c26da8fd26699367447d97a6 Mon Sep 17 00:00:00 2001
+From e10a73de254b570bbc29b26423dbb86b4265bb05 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] test-json.c: define M_PIl
@@ -8,12 +8,18 @@ src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this functi
Upstream-Status: Inappropriate [musl specific]
+This is fixed upstream where systemd no longer needs M_PIl so it could
+be dropped when upgrading to 251+ see
+https://github.com/systemd/systemd/commit/f9a1fd2a3b2d8212ba84ef1c3b55657ced34475e
+
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/test/test-json.c | 4 ++++
1 file changed, 4 insertions(+)
+diff --git a/src/test/test-json.c b/src/test/test-json.c
+index b385edc269..5e5830238c 100644
--- a/src/test/test-json.c
+++ b/src/test/test-json.c
@@ -14,6 +14,10 @@
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 d389e1d9f9..4dd6ff6e2e 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,4 +1,4 @@
-From 0f9422780a569c79a4b28e44c79c70b4a354bd92 Mon Sep 17 00:00:00 2001
+From 414e2f97008a1f3c26a260a6dc4d51a8c1fa6900 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] do not disable buffer in writing files
@@ -20,27 +20,34 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
- src/basic/cgroup-util.c | 10 +++++-----
+ src/basic/cgroup-util.c | 12 ++++++------
+ src/basic/namespace-util.c | 4 ++--
src/basic/procfs-util.c | 4 ++--
src/basic/sysctl-util.c | 2 +-
src/basic/util.c | 2 +-
src/binfmt/binfmt.c | 6 +++---
+ src/core/cgroup.c | 2 +-
src/core/main.c | 4 ++--
src/core/smack-setup.c | 8 ++++----
src/hibernate-resume/hibernate-resume.c | 2 +-
+ src/home/homework.c | 2 +-
src/libsystemd/sd-device/sd-device.c | 2 +-
src/nspawn/nspawn-cgroup.c | 2 +-
src/nspawn/nspawn.c | 6 +++---
+ src/shared/binfmt-util.c | 2 +-
src/shared/cgroup-setup.c | 4 ++--
- src/shared/mount-util.c | 4 ++--
+ src/shared/coredump-util.c | 2 +-
src/shared/smack-util.c | 2 +-
src/sleep/sleep.c | 8 ++++----
+ src/udev/udev-rules.c | 1 -
src/vconsole/vconsole-setup.c | 2 +-
- 16 files changed, 34 insertions(+), 34 deletions(-)
+ 21 files changed, 39 insertions(+), 40 deletions(-)
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index f7dc6c8421..5f7a27c2c4 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
-@@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *c
+@@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *controller, const char *path) {
if (r < 0)
return r;
@@ -49,7 +56,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
-@@ -803,7 +803,7 @@ int cg_install_release_agent(const char
+@@ -803,7 +803,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
sc = strstrip(contents);
if (isempty(sc)) {
@@ -58,7 +65,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
} else if (!path_equal(sc, agent))
-@@ -821,7 +821,7 @@ int cg_install_release_agent(const char
+@@ -821,7 +821,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
sc = strstrip(contents);
if (streq(sc, "0")) {
@@ -67,7 +74,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
-@@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const cha
+@@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const char *controller) {
if (r < 0)
return r;
@@ -76,7 +83,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
-@@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const cha
+@@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const char *controller) {
if (r < 0)
return r;
@@ -85,7 +92,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
-@@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *control
+@@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
if (r < 0)
return r;
@@ -94,9 +101,30 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
}
int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
+diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c
+index b9120a5ed0..78e460b75f 100644
+--- a/src/basic/namespace-util.c
++++ b/src/basic/namespace-util.c
+@@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) {
+ freeze();
+
+ xsprintf(path, "/proc/" PID_FMT "/uid_map", pid);
+- r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, uid_map, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write UID map: %m");
+
+ xsprintf(path, "/proc/" PID_FMT "/gid_map", pid);
+- r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, gid_map, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write GID map: %m");
+
+diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
+index e485a0196b..8bff210356 100644
--- a/src/basic/procfs-util.c
+++ b/src/basic/procfs-util.c
-@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi
+@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limit) {
* decrease it, as threads-max is the much more relevant sysctl. */
if (limit > pid_max-1) {
sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -112,9 +140,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0) {
uint64_t threads_max;
+diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
+index b66a6622ae..8d1c93008a 100644
--- a/src/basic/sysctl-util.c
+++ b/src/basic/sysctl-util.c
-@@ -58,7 +58,7 @@ int sysctl_write(const char *property, c
+@@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) {
log_debug("Setting '%s' to '%s'", p, value);
@@ -123,6 +153,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
}
int sysctl_writef(const char *property, const char *format, ...) {
+diff --git a/src/basic/util.c b/src/basic/util.c
+index d7ef382737..31c35118d1 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -168,7 +168,7 @@ void disable_coredumps(void) {
@@ -134,6 +166,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
}
+diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
+index 18231c2618..6c598d55c8 100644
--- a/src/binfmt/binfmt.c
+++ b/src/binfmt/binfmt.c
@@ -29,7 +29,7 @@ static bool arg_unregister = false;
@@ -145,7 +179,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
}
static int apply_rule(const char *filename, unsigned line, const char *rule) {
-@@ -59,7 +59,7 @@ static int apply_rule(const char *filena
+@@ -59,7 +59,7 @@ static int apply_rule(const char *filename, unsigned line, const char *rule) {
if (r >= 0)
log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename);
@@ -163,9 +197,24 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m");
else
+diff --git a/src/core/cgroup.c b/src/core/cgroup.c
+index f58de95a49..7a97ab6f99 100644
+--- a/src/core/cgroup.c
++++ b/src/core/cgroup.c
+@@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) {
+ else
+ u->freezer_state = FREEZER_THAWING;
+
+- r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0);
+ if (r < 0)
+ return r;
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 57aedb9b93..7ef36d22f5 100644
--- a/src/core/main.c
+++ b/src/core/main.c
-@@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void
+@@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void) {
if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
return 0;
@@ -174,7 +223,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
"%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN);
if (r < 0)
return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
-@@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool
+@@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool skip_setup) {
if (getpid_cached() != 1)
return;
@@ -183,9 +232,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
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 f88cb80834..68055fb64a 100644
--- a/src/core/smack-setup.c
+++ b/src/core/smack-setup.c
-@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy)
+@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) {
}
#if HAVE_SMACK_RUN_LABEL
@@ -207,6 +258,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
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 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[]) {
@@ -218,9 +271,24 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0) {
log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
return EXIT_FAILURE;
+diff --git a/src/home/homework.c b/src/home/homework.c
+index 9fdc74b775..9858a2b415 100644
+--- a/src/home/homework.c
++++ b/src/home/homework.c
+@@ -284,7 +284,7 @@ static void drop_caches_now(void) {
+ * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not
+ * more. */
+
+- r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to drop caches, ignoring: %m");
+ else
+diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
+index b163a0fb6b..fd6c5301d6 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
-@@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value
+@@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
if (!value)
return -ENOMEM;
@@ -229,9 +297,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0) {
/* On failure, clear cache entry, as we do not know how it fails. */
device_remove_cached_sysattr_value(device, sysattr);
+diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
+index d472e80c03..c7780c7fc6 100644
--- a/src/nspawn/nspawn-cgroup.c
+++ b/src/nspawn/nspawn-cgroup.c
-@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
+@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
fn = strjoina(tree, cgroup, "/cgroup.procs");
sprintf(pid_string, PID_FMT, pid);
@@ -240,9 +310,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0) {
log_error_errno(r, "Failed to move process: %m");
goto finish;
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index fb6af295b5..0d83f1e4d2 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
-@@ -2757,7 +2757,7 @@ static int reset_audit_loginuid(void) {
+@@ -2759,7 +2759,7 @@ static int reset_audit_loginuid(void) {
if (streq(p, "4294967295"))
return 0;
@@ -251,7 +323,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0) {
log_error_errno(r,
"Failed to reset audit login UID. This probably means that your kernel is too\n"
-@@ -4163,7 +4163,7 @@ static int setup_uid_map(
+@@ -4175,7 +4175,7 @@ static int setup_uid_map(
return log_oom();
xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
@@ -260,7 +332,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return log_error_errno(r, "Failed to write UID map: %m");
-@@ -4173,7 +4173,7 @@ static int setup_uid_map(
+@@ -4185,7 +4185,7 @@ static int setup_uid_map(
return log_oom();
xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
@@ -269,9 +341,24 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return log_error_errno(r, "Failed to write GID map: %m");
+diff --git a/src/shared/binfmt-util.c b/src/shared/binfmt-util.c
+index 724d7f27d9..dd725cff92 100644
+--- a/src/shared/binfmt-util.c
++++ b/src/shared/binfmt-util.c
+@@ -26,7 +26,7 @@ int disable_binfmt(void) {
+ if (r < 0)
+ return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m");
+
+- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0);
+ if (r < 0)
+ return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m");
+
+diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
+index 8bda66ca36..4e1e9943ee 100644
--- a/src/shared/cgroup-setup.c
+++ b/src/shared/cgroup-setup.c
-@@ -345,7 +345,7 @@ int cg_attach(const char *controller, co
+@@ -345,7 +345,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
xsprintf(c, PID_FMT "\n", pid);
@@ -289,9 +376,22 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
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/coredump-util.c b/src/shared/coredump-util.c
+index a0b648bf79..13f921390d 100644
+--- a/src/shared/coredump-util.c
++++ b/src/shared/coredump-util.c
+@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value) {
+ sprintf(t, "0x%"PRIx64, value);
+
+ return write_string_file("/proc/self/coredump_filter", t,
+- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
++ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
+ }
+diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c
+index 0df1778cb2..3b9a0c934e 100644
--- a/src/shared/smack-util.c
+++ b/src/shared/smack-util.c
-@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const
+@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
return 0;
p = procfs_file_alloca(pid, "attr/current");
@@ -300,9 +400,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return r;
+diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
+index 7064f3a905..8f2a7d9da2 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
-@@ -46,7 +46,7 @@ static int write_hibernate_location_info
+@@ -46,7 +46,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
assert(hibernate_location->swap);
xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
@@ -311,7 +413,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
hibernate_location->swap->device, resume_str);
-@@ -73,7 +73,7 @@ static int write_hibernate_location_info
+@@ -73,7 +73,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
}
xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
@@ -329,7 +431,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (k >= 0)
return 0;
-@@ -112,7 +112,7 @@ static int write_state(FILE **f, char **
+@@ -112,7 +112,7 @@ static int write_state(FILE **f, char **states) {
STRV_FOREACH(state, states) {
int k;
@@ -338,9 +440,23 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (k >= 0)
return 0;
log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index 0089833e3f..0a6a3abbb4 100644
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_event(
+ log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value);
+ r = write_string_file(buf, value,
+ WRITE_STRING_FILE_VERIFY_ON_FAILURE |
+- WRITE_STRING_FILE_DISABLE_BUFFER |
+ WRITE_STRING_FILE_AVOID_NEWLINE |
+ WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
+ if (r < 0)
+diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
+index 50930d4af3..5efd5d3728 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
-@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na
+@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
static int toggle_utf8_sysfs(bool utf8) {
int r;
@@ -349,72 +465,3 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
if (r < 0)
return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
---- a/src/basic/namespace-util.c
-+++ b/src/basic/namespace-util.c
-@@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map,
- freeze();
-
- xsprintf(path, "/proc/" PID_FMT "/uid_map", pid);
-- r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
-+ r = write_string_file(path, uid_map, 0);
- if (r < 0)
- return log_error_errno(r, "Failed to write UID map: %m");
-
- xsprintf(path, "/proc/" PID_FMT "/gid_map", pid);
-- r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
-+ r = write_string_file(path, gid_map, 0);
- if (r < 0)
- return log_error_errno(r, "Failed to write GID map: %m");
-
---- a/src/core/cgroup.c
-+++ b/src/core/cgroup.c
-@@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u,
- else
- u->freezer_state = FREEZER_THAWING;
-
-- r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER);
-+ r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0);
- if (r < 0)
- return r;
-
---- a/src/home/homework.c
-+++ b/src/home/homework.c
-@@ -284,7 +284,7 @@ static void drop_caches_now(void) {
- * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not
- * more. */
-
-- r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER);
-+ r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0);
- if (r < 0)
- log_warning_errno(r, "Failed to drop caches, ignoring: %m");
- else
---- a/src/shared/binfmt-util.c
-+++ b/src/shared/binfmt-util.c
-@@ -26,7 +26,7 @@ int disable_binfmt(void) {
- if (r < 0)
- return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m");
-
-- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
-+ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0);
- if (r < 0)
- return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m");
-
---- a/src/shared/coredump-util.c
-+++ b/src/shared/coredump-util.c
-@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value)
- sprintf(t, "0x%"PRIx64, value);
-
- return write_string_file("/proc/self/coredump_filter", t,
-- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
-+ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
- }
---- a/src/udev/udev-rules.c
-+++ b/src/udev/udev-rules.c
-@@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_even
- log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value);
- r = write_string_file(buf, value,
- WRITE_STRING_FILE_VERIFY_ON_FAILURE |
-- WRITE_STRING_FILE_DISABLE_BUFFER |
- WRITE_STRING_FILE_AVOID_NEWLINE |
- WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
- if (r < 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 e001ed59e8..6981d70af0 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,4 +1,4 @@
-From e4f9ef547fa342102db15188544daa18e71e9c66 Mon Sep 17 00:00:00 2001
+From 8871f78c559f37169c0cfaf20b0af1dbec0399af 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] Handle __cpu_mask usage
@@ -38,7 +38,7 @@ index 3c63a58826..4c2d4347fc 100644
typedef struct CPUSet {
cpu_set_t *set;
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index 4403c0aa52..e7e4ae112d 100644
+index 602772227e..7f1ed19d77 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -1,6 +1,5 @@
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 2d06ab84a2..2c56838644 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,4 +1,4 @@
-From 66a926cf906260c2fb5ea851e55efe03edd444dc Mon Sep 17 00:00:00 2001
+From ec519727bb1ceda6e7787ccf86237a6aad07137c 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] Handle missing gshadow
@@ -17,6 +17,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
src/shared/userdb.c | 7 ++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
+diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
+index 88b8fc2f8f..a819d41bac 100644
--- a/src/shared/user-record-nss.c
+++ b/src/shared/user-record-nss.c
@@ -331,8 +331,10 @@ int nss_group_to_group_record(
@@ -46,7 +48,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
r = json_build(&g->json, JSON_BUILD_OBJECT(
JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
-@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou
+@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
assert(ret_sgrp);
assert(ret_buffer);
@@ -54,7 +56,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
for (;;) {
_cleanup_free_ char *buf = NULL;
struct sgrp sgrp, *result;
-@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou
+@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
buflen *= 2;
buf = mfree(buf);
}
@@ -120,6 +122,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
if (r < 0)
return r;
+diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h
+index 22ab04d6ee..4e52e7a911 100644
--- a/src/shared/user-record-nss.h
+++ b/src/shared/user-record-nss.h
@@ -2,7 +2,11 @@
@@ -134,9 +138,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include <pwd.h>
#include <shadow.h>
+diff --git a/src/shared/userdb.c b/src/shared/userdb.c
+index 0eddd382e6..d506b8e263 100644
--- a/src/shared/userdb.c
+++ b/src/shared/userdb.c
-@@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator
+@@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
if (gr) {
_cleanup_free_ char *buffer = NULL;
bool incomplete = false;
@@ -153,7 +159,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
r = nss_sgrp_for_group(gr, &sgrp, &buffer);
if (r < 0) {
-@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator
+@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
}
r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
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 f4a71be7cc..6c97a272e2 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 6f0dd2ba75b68036d7b4ebfe47ac5eaf44d26f06 Mon Sep 17 00:00:00 2001
+From 754a16eeb255c06dbdd4655632276573f0f075ec 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
@@ -12,9 +12,12 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- src/basic/missing_syscall.h | 6 ++++++
- 1 file changed, 6 insertions(+)
+ src/basic/missing_syscall.h | 6 ++++++
+ src/shared/base-filesystem.c | 1 +
+ 2 files changed, 7 insertions(+)
+diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
+index 793d111c55..9665848b88 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -20,6 +20,12 @@
@@ -30,6 +33,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#include "macro.h"
#include "missing_keyctl.h"
#include "missing_stat.h"
+diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
+index d396bc99fe..7e9c0c3412 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -19,6 +19,7 @@
diff --git a/poky/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch b/poky/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
deleted file mode 100644
index 782b9645cb..0000000000
--- a/poky/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-From 6f4e84126aaa4e26cb6865b054ea5ddebd3906e5 Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Thu, 3 Feb 2022 12:14:19 +0900
-Subject: [PATCH] network: enable KeepConfiguration= when running on network
- filesystem
-Cc: pavel@zhukoff.net
-
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/22383]
-[YOCTO #14708]
-
-network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
-
-To emphasize this is DHCPv4. No behavior is changed.
-
-stat-util: introduce path_is_network_fs()
-
-network: enable KeepConfiguration= when running on network filesystem
-
-Also, set KeepConfiguration=dhcp-on-stop by default when running in
-initrd.
-
-Fixes #21967.
----
- man/systemd.network.xml | 6 +++--
- src/basic/stat-util.c | 9 +++++++
- src/basic/stat-util.h | 1 +
- src/network/generator/network-generator.c | 4 ++--
- src/network/generator/network-generator.h | 2 +-
- src/network/networkd-manager.c | 29 +++++++++++++++++++++++
- src/network/networkd-manager.h | 2 ++
- src/network/networkd-network.c | 12 ++++++----
- src/network/test-networkd-conf.c | 5 ++++
- 9 files changed, 60 insertions(+), 10 deletions(-)
-
-diff --git a/man/systemd.network.xml b/man/systemd.network.xml
-index af431e4f2c..f90cff4cd6 100644
---- a/man/systemd.network.xml
-+++ b/man/systemd.network.xml
-@@ -944,8 +944,10 @@ Table=1234</programlisting></para>
- lease expires. This is contrary to the DHCP specification, but may be the best choice if,
- e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal>
- implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies
-- <literal>dhcp</literal> and <literal>static</literal>. Defaults to <literal>no</literal>.
-- </para>
-+ <literal>dhcp</literal> and <literal>static</literal>. Defaults to
-+ <literal>dhcp-on-stop</literal> when <command>systemd-networkd</command> is running in
-+ initrd, <literal>yes</literal> when the root filesystem is a network filesystem, and
-+ <literal>no</literal> otherwise.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
-index efac7b002e..c2269844f8 100644
---- a/src/basic/stat-util.c
-+++ b/src/basic/stat-util.c
-@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
- return is_temporary_fs(&s);
- }
-
-+int path_is_network_fs(const char *path) {
-+ struct statfs s;
-+
-+ if (statfs(path, &s) < 0)
-+ return -errno;
-+
-+ return is_network_fs(&s);
-+}
-+
- int stat_verify_regular(const struct stat *st) {
- assert(st);
-
-diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
-index a566114f7c..f7d2f12aa9 100644
---- a/src/basic/stat-util.h
-+++ b/src/basic/stat-util.h
-@@ -53,6 +53,7 @@ int fd_is_temporary_fs(int fd);
- int fd_is_network_fs(int fd);
-
- int path_is_temporary_fs(const char *path);
-+int path_is_network_fs(const char *path);
-
- /* Because statfs.t_type can be int on some architectures, we have to cast
- * the const magic to the type, otherwise the compiler warns about
-diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
-index c081ec673c..063ad08d80 100644
---- a/src/network/generator/network-generator.c
-+++ b/src/network/generator/network-generator.c
-@@ -47,7 +47,7 @@ static const char * const dracut_dhcp_type_table[_DHCP_TYPE_MAX] = {
- [DHCP_TYPE_OFF] = "off",
- [DHCP_TYPE_ON] = "on",
- [DHCP_TYPE_ANY] = "any",
-- [DHCP_TYPE_DHCP] = "dhcp",
-+ [DHCP_TYPE_DHCP4] = "dhcp",
- [DHCP_TYPE_DHCP6] = "dhcp6",
- [DHCP_TYPE_AUTO6] = "auto6",
- [DHCP_TYPE_EITHER6] = "either6",
-@@ -62,7 +62,7 @@ static const char * const networkd_dhcp_type_table[_DHCP_TYPE_MAX] = {
- [DHCP_TYPE_OFF] = "no",
- [DHCP_TYPE_ON] = "yes",
- [DHCP_TYPE_ANY] = "yes",
-- [DHCP_TYPE_DHCP] = "ipv4",
-+ [DHCP_TYPE_DHCP4] = "ipv4",
- [DHCP_TYPE_DHCP6] = "ipv6",
- [DHCP_TYPE_AUTO6] = "no", /* TODO: enable other setting? */
- [DHCP_TYPE_EITHER6] = "ipv6", /* TODO: enable other setting? */
-diff --git a/src/network/generator/network-generator.h b/src/network/generator/network-generator.h
-index dd0a58738b..0e0da2a57a 100644
---- a/src/network/generator/network-generator.h
-+++ b/src/network/generator/network-generator.h
-@@ -13,7 +13,7 @@ typedef enum DHCPType {
- DHCP_TYPE_OFF,
- DHCP_TYPE_ON,
- DHCP_TYPE_ANY,
-- DHCP_TYPE_DHCP,
-+ DHCP_TYPE_DHCP4,
- DHCP_TYPE_DHCP6,
- DHCP_TYPE_AUTO6,
- DHCP_TYPE_EITHER6,
-diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
-index 7e89366ae8..3261f289e9 100644
---- a/src/network/networkd-manager.c
-+++ b/src/network/networkd-manager.c
-@@ -398,6 +398,30 @@ static int signal_restart_callback(sd_event_source *s, const struct signalfd_sig
- return sd_event_exit(sd_event_source_get_event(s), 0);
- }
-
-+static int manager_set_keep_configuration(Manager *m) {
-+ int r;
-+
-+ assert(m);
-+
-+ if (in_initrd()) {
-+ log_debug("Running in initrd, keep DHCPv4 addresses on stopping networkd by default.");
-+ m->keep_configuration = KEEP_CONFIGURATION_DHCP_ON_STOP;
-+ return 0;
-+ }
-+
-+ r = path_is_network_fs("/");
-+ if (r < 0)
-+ return log_error_errno(r, "Failed to detect if root is network filesystem: %m");
-+ if (r == 0) {
-+ m->keep_configuration = _KEEP_CONFIGURATION_INVALID;
-+ return 0;
-+ }
-+
-+ log_debug("Running on network filesystem, enabling KeepConfiguration= by default.");
-+ m->keep_configuration = KEEP_CONFIGURATION_YES;
-+ return 0;
-+}
-+
- int manager_setup(Manager *m) {
- int r;
-
-@@ -453,6 +477,10 @@ int manager_setup(Manager *m) {
- if (r < 0)
- return r;
-
-+ r = manager_set_keep_configuration(m);
-+ if (r < 0)
-+ return r;
-+
- m->state_file = strdup("/run/systemd/netif/state");
- if (!m->state_file)
- return -ENOMEM;
-@@ -468,6 +496,7 @@ int manager_new(Manager **ret, bool test_mode) {
- return -ENOMEM;
-
- *m = (Manager) {
-+ .keep_configuration = _KEEP_CONFIGURATION_INVALID,
- .test_mode = test_mode,
- .speed_meter_interval_usec = SPEED_METER_DEFAULT_TIME_INTERVAL,
- .online_state = _LINK_ONLINE_STATE_INVALID,
-diff --git a/src/network/networkd-manager.h b/src/network/networkd-manager.h
-index 36313589a3..86de529124 100644
---- a/src/network/networkd-manager.h
-+++ b/src/network/networkd-manager.h
-@@ -28,6 +28,8 @@ struct Manager {
- Hashmap *polkit_registry;
- int ethtool_fd;
-
-+ KeepConfiguration keep_configuration;
-+
- bool test_mode;
- bool enumerating;
- bool dirty;
-diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
-index 3142be471f..edcd68d616 100644
---- a/src/network/networkd-network.c
-+++ b/src/network/networkd-network.c
-@@ -124,6 +124,7 @@ int network_verify(Network *network) {
- int r;
-
- assert(network);
-+ assert(network->manager);
- assert(network->filename);
-
- if (net_match_is_empty(&network->match) && !network->conditions)
-@@ -248,10 +249,11 @@ int network_verify(Network *network) {
- }
-
- if (network->dhcp_critical >= 0) {
-- if (network->keep_configuration >= 0)
-- log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
-- "Ignoring CriticalConnection=.", network->filename);
-- else if (network->dhcp_critical)
-+ if (network->keep_configuration >= 0) {
-+ if (network->manager->keep_configuration < 0)
-+ log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
-+ "Ignoring CriticalConnection=.", network->filename);
-+ } else if (network->dhcp_critical)
- /* CriticalConnection=yes also preserve foreign static configurations. */
- network->keep_configuration = KEEP_CONFIGURATION_YES;
- else
-@@ -386,7 +388,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
- .allmulticast = -1,
- .promiscuous = -1,
-
-- .keep_configuration = _KEEP_CONFIGURATION_INVALID,
-+ .keep_configuration = manager->keep_configuration,
-
- .dhcp_duid.type = _DUID_TYPE_INVALID,
- .dhcp_critical = -1,
-diff --git a/src/network/test-networkd-conf.c b/src/network/test-networkd-conf.c
-index 4b00a98086..5f1328e39c 100644
---- a/src/network/test-networkd-conf.c
-+++ b/src/network/test-networkd-conf.c
-@@ -6,6 +6,7 @@
- #include "net-condition.h"
- #include "networkd-address.h"
- #include "networkd-conf.h"
-+#include "networkd-manager.h"
- #include "networkd-network.h"
- #include "strv.h"
-
-@@ -166,11 +167,15 @@ static void test_config_parse_ether_addr(void) {
- }
-
- static void test_config_parse_address_one(const char *rvalue, int family, unsigned n_addresses, const union in_addr_union *u, unsigned char prefixlen) {
-+ _cleanup_(manager_freep) Manager *manager = NULL;
- _cleanup_(network_unrefp) Network *network = NULL;
-
-+ assert_se(manager_new(&manager, /* test_mode = */ true) >= 0);
- assert_se(network = new0(Network, 1));
- network->n_ref = 1;
-+ network->manager = manager;
- assert_se(network->filename = strdup("hogehoge.network"));
-+
- assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "*", &network->match.ifname, network) == 0);
- assert_se(config_parse_address("network", "filename", 1, "section", 1, "Address", 0, rvalue, network, network) == 0);
- assert_se(ordered_hashmap_size(network->addresses_by_section) == 1);
---
-2.34.1
-
diff --git a/poky/meta/recipes-core/systemd/systemd_250.4.bb b/poky/meta/recipes-core/systemd/systemd_250.5.bb
index 15e2185dff..006b2f86ea 100644
--- a/poky/meta/recipes-core/systemd/systemd_250.4.bb
+++ b/poky/meta/recipes-core/systemd/systemd_250.5.bb
@@ -23,16 +23,14 @@ SRC_URI += "file://touchscreen.rules \
file://systemd-pager.sh \
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-test-parse-argument-Include-signal.h.patch \
- file://0029-network-enable-KeepConfiguration-when-running-on-net.patch \
+ file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \
+ file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \
"
# patches needed by musl
SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
SRC_URI_MUSL = "\
- file://0002-don-t-use-glibc-specific-qsort_r.patch \
- file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
+ file://0003-missing_type.h-add-comparison_fn_t.patch \
file://0004-add-fallback-parse_printf_format-implementation.patch \
file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
@@ -44,11 +42,7 @@ SRC_URI_MUSL = "\
file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
- file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
- file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \
file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \
- file://0019-Handle-missing-LOCK_EX.patch \
- file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \
file://0021-test-json.c-define-M_PIl.patch \
file://0022-do-not-disable-buffer-in-writing-files.patch \
file://0025-Handle-__cpu_mask-usage.patch \
diff --git a/poky/meta/recipes-core/udev/udev-extraconf/mount.blacklist b/poky/meta/recipes-core/udev/udev-extraconf/mount.ignorelist
index e49349428b..e49349428b 100644
--- a/poky/meta/recipes-core/udev/udev-extraconf/mount.blacklist
+++ b/poky/meta/recipes-core/udev/udev-extraconf/mount.ignorelist
diff --git a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
index b23731870e..43acb3a7a0 100644
--- a/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/poky/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -6,6 +6,7 @@
BASE_INIT="`readlink -f "@base_sbindir@/init"`"
INIT_SYSTEMD="@systemd_unitdir@/systemd"
+MOUNT_BASE="@MOUNT_BASE@"
if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
# systemd as init uses systemd-mount to mount block devices
@@ -26,11 +27,11 @@ fi
PMOUNT="/usr/bin/pmount"
-for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*`
+for line in `grep -h -v ^# /etc/udev/mount.ignorelist /etc/udev/mount.ignorelist.d/*`
do
if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
then
- logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
+ logger "udev/mount.sh" "[$DEVNAME] is marked to ignore"
exit 0
fi
done
@@ -39,11 +40,21 @@ automount_systemd() {
name="`basename "$DEVNAME"`"
# Skip already mounted partitions
- if [ -f /run/systemd/transient/run-media-$name.mount ]; then
- logger "mount.sh/automount" "/run/media/$name already mounted"
+ if [ -f /run/systemd/transient/$(echo $MOUNT_BASE | cut -d '/' -f 2- | sed 's#/#-#g')-*$name.mount ]; then
+ logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted"
return
fi
+ # Get the unique name for mount point
+ get_label_name "${DEVNAME}"
+
+ # Only go for auto-mounting when the device has been cleaned up in remove
+ # or has not been identified yet
+ if [ -e "/tmp/.automount-$name" ]; then
+ logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already cached"
+ return
+ fi
+
# Skip the partition which are already in /etc/fstab
grep "^[[:space:]]*$DEVNAME" /etc/fstab && return
for n in LABEL PARTLABEL UUID PARTUUID; do
@@ -53,7 +64,7 @@ automount_systemd() {
grep "^[[:space:]]*$tmp" /etc/fstab && return
done
- [ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
+ [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
MOUNT="$MOUNT -o silent"
@@ -65,17 +76,19 @@ automount_systemd() {
;;
swap)
return ;;
+ lvm*|LVM*)
+ return ;;
# TODO
*)
;;
esac
- if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name"
+ if ! $MOUNT --no-block -t auto $DEVNAME "$MOUNT_BASE/$name"
then
- #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!"
- rm_dir "/run/media/$name"
+ #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"$MOUNT_BASE/$name\" failed!"
+ rm_dir "$MOUNT_BASE/$name"
else
- logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful"
+ logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful"
touch "/tmp/.automount-$name"
fi
}
@@ -93,7 +106,17 @@ automount() {
# configured in fstab
grep -q "^$DEVNAME " /proc/mounts && return
- ! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
+ # Get the unique name for mount point
+ get_label_name "${DEVNAME}"
+
+ # Only go for auto-mounting when the device has been cleaned up in remove
+ # or has not been identified yet
+ if [ -e "/tmp/.automount-$name" ]; then
+ logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already cached"
+ return
+ fi
+
+ ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
then
@@ -108,18 +131,23 @@ automount() {
;;
swap)
return ;;
+ lvm*|LVM*)
+ return ;;
# TODO
*)
;;
esac
- if ! $MOUNT -t auto $DEVNAME "/run/media/$name"
+ if ! $MOUNT -t auto $DEVNAME "$MOUNT_BASE/$name"
then
- #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/run/media/$name\" failed!"
- rm_dir "/run/media/$name"
+ #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"$MOUNT_BASE/$name\" failed!"
+ rm_dir "$MOUNT_BASE/$name"
else
- logger "mount.sh/automount" "Auto-mount of [/run/media/$name] successful"
- touch "/tmp/.automount-$name"
+ logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful"
+ # The actual device might not be present in the remove event so blkid cannot
+ # be used to calculate what name was generated here. Simply save the mount
+ # name in our tmp file.
+ echo "$name" > "/tmp/.automount-$name"
fi
}
@@ -133,6 +161,18 @@ rm_dir() {
fi
}
+get_label_name() {
+ # Get the LABEL or PARTLABEL
+ LABEL=`/sbin/blkid | grep "$1:" | grep -o 'LABEL=".*"' | cut -d '"' -f2`
+ # If the $DEVNAME has a LABEL or a PARTLABEL
+ if [ -n "$LABEL" ]; then
+ # Set the mount location dir name to LABEL appended
+ # with $name e.g. label-sda. That would avoid overlapping
+ # mounts in case two devices have same LABEL
+ name="${LABEL}-${name}"
+ fi
+}
+
# No ID_FS_TYPE for cdrom device, yet it should be mounted
name="`basename "$DEVNAME"`"
[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
@@ -150,12 +190,18 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_t
fi
if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
- for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
- do
- $UMOUNT $mnt
- done
-
- # Remove empty directories from auto-mounter
name="`basename "$DEVNAME"`"
- test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
+ tmpfile=`find /tmp | grep "\.automount-.*${name}$"`
+ if [ ! -e "/sys/$DEVPATH" -a -e "$tmpfile" ]; then
+ logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter"
+ for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
+ do
+ $UMOUNT $mnt
+ done
+ # Remove mount directory created by the auto-mounter
+ # and clean up our tmp cache file
+ mntdir=`cat "$tmpfile"`
+ rm_dir "$MOUNT_BASE/$mntdir"
+ rm "$tmpfile"
+ fi
fi
diff --git a/poky/meta/recipes-core/udev/udev-extraconf_1.1.bb b/poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 2ba35b0df6..30f1fe76d0 100644
--- a/poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -1,13 +1,13 @@
SUMMARY = "Extra machine specific configuration files"
HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
-DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
+DESCRIPTION = "Extra machine specific configuration files for udev, specifically information on devices to ignore."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = " \
file://automount.rules \
file://mount.sh \
- file://mount.blacklist \
+ file://mount.ignorelist \
file://autonet.rules \
file://network.sh \
file://localextra.rules \
@@ -15,6 +15,7 @@ SRC_URI = " \
S = "${WORKDIR}"
+MOUNT_BASE = "/run/media"
do_install() {
install -d ${D}${sysconfdir}/udev/rules.d
@@ -23,21 +24,33 @@ do_install() {
install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules
install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules
- install -d ${D}${sysconfdir}/udev/mount.blacklist.d
- install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
+ install -d ${D}${sysconfdir}/udev/mount.ignorelist.d
+ install -m 0644 ${WORKDIR}/mount.ignorelist ${D}${sysconfdir}/udev/
install -d ${D}${sysconfdir}/udev/scripts/
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
+ sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
}
-FILES:${PN} = "${sysconfdir}/udev"
-RDEPENDS:${PN} = "udev"
-CONFFILES:${PN} = "${sysconfdir}/udev/mount.blacklist"
+pkg_postinst:${PN} () {
+ if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+ sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service
+ fi
+}
+
+pkg_postrm:${PN} () {
+ if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+ sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service
+ fi
+}
+
+RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
+CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
# to replace udev-extra-rules from meta-oe
RPROVIDES:${PN} = "udev-extra-rules"
diff --git a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
index 6612d2aae0..8fe7d8d4f9 100644
--- a/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
+++ b/poky/meta/recipes-core/volatile-binds/files/volatile-binds.service.in
@@ -1,6 +1,6 @@
[Unit]
Description=Bind mount volatile @where@
-DefaultDependencies=false
+DefaultDependencies=no
Before=local-fs.target
RequiresMountsFor=@whatparent@ @whereparent@
ConditionPathIsReadWrite=@whatparent@