From c723b72979bfac6362509cf1fe086900f6641f28 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 8 Jan 2021 16:14:09 -0600 Subject: poky: subtree update:796be0593a..10c69538c0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alan Perry (1): binutils: add libopcodes package for perf Alex Stewart (1): opkg: upgrade to version 0.4.4 Alexander Kanavin (73): selftest/reproducible: enable world reproducibility test selftest/reproducible: add an exclusion list for items that are not yet reproducible kea: upgrade 1.7.10 -> 1.8.1 valgrind: exclude bar_bad/bar_bad_xml from ptests bzip2: run ptests without valgrind lttng-tools: disable more failing ptests glib-2.0: add a patch to increase a test timeout acpica: upgrade 20201113 -> 20201217 bind: upgrade 9.16.9 -> 9.16.10 diffoscope: upgrade 161 -> 163 dnf: upgrade 4.4.0 -> 4.5.2 enchant2: upgrade 2.2.13 -> 2.2.14 epiphany: upgrade 3.38.1 -> 3.38.2 ethtool: upgrade 5.9 -> 5.10 gtk+3: upgrade 3.24.23 -> 3.24.24 init-system-helpers: upgrade 1.58 -> 1.60 kbd: upgrade 2.3.0 -> 2.4.0 kea: upgrade 1.8.1 -> 1.8.2 libmodulemd: upgrade 2.9.4 -> 2.11.1 libpcre2: upgrade 10.35 -> 10.36 libtirpc: upgrade 1.2.6 -> 1.3.1 libusb1: upgrade 1.0.23 -> 1.0.24 libva: upgrade 2.9.0 -> 2.10.0 libx11: upgrade 1.6.12 -> 1.7.0 lighttpd: upgrade 1.4.56 -> 1.4.57 ninja: upgrade 1.10.1 -> 1.10.2 puzzles: upgrade to latest revision python3-hypothesis: upgrade 5.41.5 -> 5.43.3 python3-py: upgrade 1.9.0 -> 1.10.0 python3-setuptools-scm: upgrade 4.1.2 -> 5.0.1 sqlite3: upgrade 3.33.0 -> 3.34.0 stress-ng: upgrade 0.11.24 -> 0.12.00 sudo: upgrade 1.9.3p1 -> 1.9.4p1 sysvinit: upgrade 2.97 -> 2.98 vala: upgrade 0.50.1 -> 0.50.2 vulkan-headers: upgrade 1.2.154.0 -> 1.2.162.0 webkitgtk: upgrade 2.30.2 -> 2.30.4 xprop: upgrade 1.2.4 -> 1.2.5 xserver-xorg: upgrade 1.20.9 -> 1.20.10 glib-2.0: update 2.66.2 -> 2.66.4 rpm: update 4.16.0 -> 4.16.1.2 piglit: update to latest revision sbc: update 1.4 -> 1.5 libdnf: update 0.55.0 -> 0.55.2 libva-utils: update 2.9.1 -> 2.10.0 python3-importlib-metadata: update 3.1.1 -> 3.3.0 python3: update 3.9.0 -> 3.9.1 vulkan-loader: upgrade 1.2.154.1 -> 1.2.162.0 vulkan-tools: upgrade 1.2.154.0 -> 1.2.162.0 systemd-bootchart: update 233 -> 234 zstd: add recipe from meta-oe zstd: update 1.4.5 -> 1.4.8 devtool: gitsm:// should be handled same as git:// in upgrades ovmf: upgrade 202008 -> 202011 libksba: update 1.4.0 -> 1.5.0 libjitterentropy: update 2.2.0 -> 3.0.0 icu: update 68.1 -> 68.2 gnutls: update 3.6.15 -> 3.7.0 gnupg: update 2.2.23 -> 2.2.26 boost: update 1.74.0 -> 1.75.0 kexec-tools: update 2.0.20 -> 2.0.21 vulkan-samples: update to latest revision libpam: update 1.3.1 -> 1.5.1 strace: update 5.9 -> 5.10 python3-pytest: update 6.1.2 -> 6.2.1 mtools: update 4.0.25 -> 4.0.26 gnu-config: update to latest revision cmake: update 3.18.4 -> 3.19.2 ccache: upgrade 3.7.11 -> 4.1 ccache.bbclass: use ccache from host distribution gawk: add missing ptest dependency util-linux: upgrade 2.36 -> 2.36.1 ell: upgrade 0.33 -> 0.35 Anatol Belski (1): iproute2: Make it easier to manipulate SUBDIRS list from bbappend Anuj Mittal (2): mesa: add more details to elf-tls patch mesa: remove patch disabling asm Bruce Ashfield (23): linux-yocto-rt/5.4: update to -rt44 linux-yocto/5.4: update to v5.4.80 lttng-modules: fix build against v5.10+ kern-tools: non-gcc config support and option re-classification linux-yocto/cfg: qemuppc: set CONFIG_SCSI to '=y' linux-yocto/5.4: update to v5.4.82 linux-yocto/cfg: qemuarm64-gfx.cfg: add CONFIG_INPUT_UINPUT linux-yocto/5.4: update to v5.4.83 linux-yocto/5.8/cfg: fix -tiny warnings linux-yocto/5.4/cfg: fix -tiny warnings systemtap: fix on target build for 4.4 and 5.10+ linux-yocto/5.4/cfg: fix FIRMWARE_LOADER warnings kernel-devsrc: fix 32bit ARM devsrc builds linux-yocto/5.4: update to v5.4.85 linux-yocto-dev: bump to v5.11-rc libc-headers: update to v5.10 machine/qemuarm*: add vmalloc kernel parameter linux-yocto: introduce v5.10 reference kernel recipes linux-yocto/5.10: update to v5.10.2 conf/machine: bump qemu preferred versions to 5.10 poky/poky-tiny: set preferred kernel to 5.10 yocto-bsp: explicitly set preferred version for reference boards poky-alt: don't use conditional assignment for preferred kernel version Changqing Li (2): libexif: fix CVE-2020-0198; CVE-2020-0452 libpam: support usrmerge Chris Laplante (1): contrib/git-hooks: add a sendemail-validate example hook that adds FROM: lines to outgoing patch emails Christopher Larson (2): grub-efi-cfg: exclude OVERRIDES from build_efi_cfg vardeps uboot-extlinux-config: exclude OVERRIDES from do_create_extlinux_config vardeps Deepak Rawat (1): openssl: add support for mingw64 as target Diego Sueiro (2): wic: Introduce empty plugin to create unformatted empty partitions modutils-initscripts: Use depmod -a when modules.dep is empty Dmitry Baryshkov (3): perl: fix installation failure because of shell issue linux-firmware: upgrade 20201118 -> 20201218 linux-firmware: package firmware for Lontium lt9611uxc bridge Easwar Hariharan (1): classes/kernel-fitimage: make fitimage_emit_section_config more readable Elvis Stansvik (1): ref-manual: terms: Fix poky tarball root folder Jack Mitchell (1): distutils3: allow setup.py to be run from a different directory to ${S} Joey Degges (4): bitbake: tests/fetch: Organize usehead tests by net requirements bitbake: tests/fetch: Document behavior of test_gitfetch_usehead bitbake: tests/fetch: Test usehead with a non-default name bitbake: fetch/git: Fix usehead for non-default names Jose Quaresma (11): gstreamer1.0: upgrade 1.18.1 -> 1.18.2 gstreamer1.0-plugins-bad: v4l2codecs fix typo gstreamer1.0-plugins-bad: add support for aom plugin gstreamer1.0-plugins-bad: add support for x265 plugin gstreamer1.0-plugins-bad: sctp plugin uses the internal usrsctp static lib gstreamer1.0-plugins-bad: remove unsupported plugins comment gstreamer1.0-plugins-bad: netsim plugin don't have external deps gstreamer1.0-plugins-bad: transcode plugin external deps is always present gstreamer1.0: use the correct meson option for the capabilities shaderc: upgrade 2020.3 -> 2020.4 spirv-tools: upgrade 2020.5 -> 2020.6 Khairul Rohaizzat Jamaluddin (3): openssl: Update 1.1.1h -> 1.1.1i go: Update 1.15.5 -> 1.15.6 curl: Update 7.73.0 -> 7.74.0 Khem Raj (21): musl: Update to latest master systemd: Fix reallocarray check go.bbclass: Use external linker for native packages qemuriscv: check serial consoles w.r.t. /proc/consoles busybox-inittab: Implement SYSVINIT_ENABLED_GETTYS and USE_VT initscripts: use quotes for shell variable comparision busybox: Install /etc/default/rcS when used as init system busybox: Run mdev as daemon rcS: Define identifier for init system used initscripts: Use initctl on sysvinit only busybox: Sync rcS.default with sysvinit ltp: Fix ltp-pan crash on 32bit arches using 64bit time_t pulseaudio: Fix build with clang for non-x86 target util-linux: Build fixes for 32bit arches with 64bit time_t libpam: Drop musl patches ccache: Build fixes for clang and riscv32 shadow: Remove lastlog pam plugin on musl system rxvt-unicode: Disable lastlog on musl systems openssh: Disable lastlog on musl dropbear: Disable lastlog and wtmp on musl ccache: Fix build on aarch64/clang Lee Chee Yang (2): gdk-pixbuf: fix CVE-2020-29385 wic/direct/kparser: ensure fsuuid for vfat and msdos align with format Li Wang (2): qemu: CVE-2020-25723 qemu: CVE-2020-28916 Luca Boccassi (6): classes/kernel-fitimage: add ability to sign individual images systemd: update 246 -> 247 systemd: add package config for systemd-oomd systemd: ship new systemd-dissect in -extra-utils systemd: set -Dmode=release as recommended by NEWS systemd: add RRECOMMENDS for weak dependencies, if enabled Mark Jonas (1): parted: Make readline dependency optional Martin Jansa (2): license.bbclass: Add COMMON_LICENSE_DIR and LICENSE_PATH dirs to PSEUDO_IGNORE_PATHS busybox.inc: install rcS, rcK and rcS.default only with busybox in VIRTUAL-RUNTIME_init_manager Maxime Roussin-Bélanger (1): meta: add missing descriptions in some support recipes Michael Halstead (1): releases: conf: add link to 3.2.1, update to include 3.2.1 Milan Shah (2): oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters bitbake: utils: add docstrings to functions Mingli Yu (1): kbd: fix transaction conflict Nathan Rossi (7): gcc: Add patch to resolve i*86 tune configuration overrides qemu.inc: Add seccomp PACKAGECONFIG option ncurses: Prevent LDFLAGS being emitted in .pc files which: add nativesdk to BBCLASSEXTEND sed: add nativesdk to BBCLASSEXTEND grep: add nativesdk to BBCLASSEXTEND coreutils: enable xattrs by default for nativesdk Ovidiu Panait (3): timezone: upgrade to 2020e timezone: upgrade to 2020f variables: Add documentation for KERNEL_DTC_FLAGS Paul Barker (8): bitbake.conf: Prevent pyc file generation in pseudo context documentation: Simplify oe_wiki and oe_home links documentation: Simplify layerindex and layer links documentation: Simplify remaining yocto_home links profile-manual: Simplify yocto_bugs link ref-manual: Simplify oe_lists link documentation: Use https links where possible selftest: Add argument to keep build dir Paul Eggleton (11): classes/kernel-fitimage: add variable for description classes/kernel-fitimage: allow substituting mkimage command classes/kernel-fitimage: add ability to add additional signing options oe-selftest: move FIT image tests to their own module oe-selftest: fitimage: Test for FIT_DESC oe-selftest: fitimage: add test for signing FIT images classes: minor corrections to kernel-fitimage section variables: clarify KERNEL_ALT_IMAGETYPE reference variables: explicitly state that UBOOT_MKIMAGE_DTCOPTS is optional variables: Add documentation for new kernel-fitimage vars ref-manual: use consistent capitalisation of U-Boot Peter Kjellerstedt (7): lib/oe/path: Add canonicalize() bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHS wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS glibc: Make adjtime() for 32 bit support being called with delta == NULL bitbake: cache: Make CoreRecipeInfo include rprovides_pkg for skipped recipes bitbake: cooker: Include all packages a recipe provides in SkippedPackage.rprovides apr-util: Only specify --with-dbm=gdbm if gdbm support is enabled Richard Purdie (22): pseudo: Drop patches merged into upstream branch bitbake: data_smart: Ensure hash reflects vardepvalue flags correctly linuxloader: Avoid confusing string concat errors systemd: Ensure uid/gid ranges are set deterministically grub: Fix build reproducibility issue u-boot-tools: Fix reproducibility issue grub: Add second fix for determinism issue oeqa/commands: Ensure sync can be found regardless of PATH cups: Mark CVE-2009-0032 as a non-issue cups: Mark CVE-2008-1033 as a non-issue groff: Fix reproducibility issue man-db: Avoid reproducibility failures after fixing groff-native meta-selftest/staticids: Add ids for other recipes selftest/reproducible: Add useradd-staticids to reproducible builds tests grub: Further reproducibility fix man-db: Fix reproducibility issue bitbake.conf: Add mkfifo to HOSTTOOLS bitbake.conf: Add /run/ to PSEUDO_IGNORE_PATHS ppp: Update 2.4.8 -> 2.4.9 ppp: Fix reproducibility issue sanity: Bump min python version to 3.6 pseudo: Add lchmod wrapper Robert Yang (6): buildtools-tarball.bb: Fix PATH for environment setup script ncurses: Make ncurses-tools depend on ncurses-terminfo-base minicom: RDEPENDS on ncurses-terminfo-base archiver.bbclass: Fix --runall=deploy_archives for images ccache: Extend to nativesdk ccache.bbclass: Set CCACHE_TEMPDIR Ross Burton (13): wic-image-minimal: only depend on syslinux on x86 targets syslinux: rewrite recipe so only target code is x86-specific wic-tools: don't build syslinux-native for targets without syslinux image-uefi.conf: add EFI arch variable systemd-boot: build the EFI stub systemd-boot: allow building for Arm targets wic-tools: add grub-efi and systemd-boot on arm64 lib/oe/qa: handle the 'no specific instruction set' ELF e_machine value local.conf: add aarch64 to the SDKMACHINE example values kernel: set COMPATIBLE_HOST to *-linux bitbake.conf: default SDKMACHINE to the build host architecture diffstat: point the license checksum at the license ruby: remove tcl DEPENDS Scott Murray (2): grub: fix "CVE:" line in one of the patches patch: fix CVE-2019-20633 Sinan Kaya (1): gcsections: add more suppressions for SDK builds Steve Sakoman (1): oeqa/selftest/cases/devtool.py: fix typo in ignore_patterns call Tanu Kaskinen (6): maintainers.inc: remove myself from maintainers pulseaudio: Remove OE_LT_RPATH_ALLOW pulseaudio: disable EsounD support pulseaudio: disable GConf support pulseaudio: switch build system from Autotools to Meson pulseaudio: fix client.conf location Teoh Jay Shen (2): oeqa/terminal : improve the test case oeqa/suspend : add test for suspend state Tim Orling (6): python3-hypothesis: upgrade 5.41.4 -> 5.41.5 python3-importlib-metadata: upgrade 3.1.0 -> 3.1.1 python3-pygments: upgrade v2.7.2 -> v2.7.3 python3-setuptools: upgrade 50.3.2 -> 51.0.0 python3-setuptools-scm: add python3-toml dep python3-packaging: upgrade 20.4 -> 20.8 Tomasz Dziendzielski (1): populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is disabled Trevor Woerner (7): mesa.inc: switch true/enabled false/disabled mesa: update 20.2.4 -> 20.3.1 insane.bbclass: allow fifos selftest-chown: add test for fifos PSPLASH_FIFO_DIR: refactor psplash: fix working on first boot (sysvinit) psplash (sysvinit): add textual updates Vivien Didelot (4): README.hardware: prettify headline README.hardware: fix the dd command meta-yocto-bsp: use provided variables meta-yocto-bsp: use mmcblk0 for root partition Wang Mingyu (4): libaio: upgrade 0.3.111 -> 0.3.112 readline: upgrade 8.0 -> 8.1 man-pages: upgrade 5.09 ->5.10 mobile-broadband-provider-info: upgrade 20190618 ->20201225 Yi Zhao (6): dhcpcd: upgrade 9.3.2 -> 9.3.4 dhcpcd: fix SECCOMP for i386 inetutils: add dnsdomainname to ALTERNATIVE libcap: update 2.45 -> 2.46 libcap-ng: upgrade 0.8.1 -> 0.8.2 dhcpcd: upgrade 9.3.4 -> 9.4.0 Zhixiong Chi (1): glibc: CVE-2020-29562 and CVE-2020-29573 zangrc (3): bash: Rename patch name systemtap: upgrade 4.3 -> 4.4 msmtp: upgrade 1.8.13 -> 1.8.14 zhengruoqin (2): cantarell-fonts: upgrade 0.201 -> 0.301 gdbm: upgrade 1.18.1 -> 1.19 Signed-off-by: Andrew Geissler Change-Id: I9000a711651a4e884e8bfccc438c95fce184b35e --- .../recipes-core/busybox/busybox-inittab_1.32.0.bb | 50 ++ poky/meta/recipes-core/busybox/busybox.inc | 3 +- poky/meta/recipes-core/busybox/busybox/mdev.cfg | 2 + poky/meta/recipes-core/busybox/busybox_1.32.0.bb | 1 + poky/meta/recipes-core/busybox/files/mdev | 56 +- poky/meta/recipes-core/busybox/files/rcS.default | 31 + poky/meta/recipes-core/coreutils/coreutils_8.32.bb | 3 + poky/meta/recipes-core/dropbear/dropbear.inc | 3 + ...01-ell-add-missing-include-in-dhcp-server.patch | 23 + .../ell/ell/0001-pem.c-do-not-use-rawmemchr.patch | 27 + poky/meta/recipes-core/ell/ell_0.33.bb | 21 - poky/meta/recipes-core/ell/ell_0.35.bb | 24 + ...ts-codegen.py-bump-timeout-to-100-seconds.patch | 26 + .../glib-2.0/glib-2.0/relocate-modules.patch | 2 +- poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.2.bb | 49 -- poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.4.bb | 50 ++ ...Allow-adjtime-with-NULL-argument-BZ-26833.patch | 110 +++ .../recipes-core/glibc/glibc/CVE-2020-29562.patch | 155 +++++ .../recipes-core/glibc/glibc/CVE-2020-29573.patch | 56 ++ poky/meta/recipes-core/glibc/glibc_2.32.bb | 3 + .../initscripts/init-system-helpers_1.58.bb | 41 -- .../initscripts/init-system-helpers_1.60.bb | 41 ++ .../initscripts/initscripts-1.0/checkroot.sh | 2 +- .../initscripts/initscripts-1.0/mountall.sh | 22 +- poky/meta/recipes-core/kbd/kbd_2.3.0.bb | 38 -- poky/meta/recipes-core/kbd/kbd_2.4.0.bb | 45 ++ poky/meta/recipes-core/meta/buildtools-tarball.bb | 2 +- poky/meta/recipes-core/meta/wic-tools.bb | 9 +- .../musl/musl/0001-crt-Add-.file-directive.patch | 59 -- ...slibdir-and-libdir-as-default-pathes-to-l.patch | 8 +- poky/meta/recipes-core/musl/musl_git.bb | 2 +- ...ig.in-Do-not-include-LDFLAGS-in-generated.patch | 29 + poky/meta/recipes-core/ncurses/ncurses.inc | 2 +- poky/meta/recipes-core/ncurses/ncurses_6.2.bb | 1 + poky/meta/recipes-core/ovmf/ovmf_git.bb | 6 +- poky/meta/recipes-core/psplash/files/psplash-init | 4 +- poky/meta/recipes-core/psplash/psplash_git.bb | 6 + .../readline/readline-8.0/configure-fix.patch | 35 - .../readline/readline-8.0/norpath.patch | 21 - .../readline/readline-8.0/rl-native.map | 12 - .../readline/readline-8.1/configure-fix.patch | 35 + .../readline/readline-8.1/norpath.patch | 21 + .../readline/readline-8.1/rl-native.map | 12 + poky/meta/recipes-core/readline/readline_8.0.bb | 7 - poky/meta/recipes-core/readline/readline_8.1.bb | 7 + .../recipes-core/systemd/systemd-boot_246.6.bb | 70 -- .../recipes-core/systemd/systemd-boot_247.2.bb | 70 ++ .../recipes-core/systemd/systemd-conf_246.1.bb | 44 -- .../recipes-core/systemd/systemd-conf_247.2.bb | 44 ++ poky/meta/recipes-core/systemd/systemd.inc | 4 +- .../systemd/0001-Handle-missing-gshadow.patch | 162 ----- ...t-install-dependency-links-at-install-tim.patch | 8 +- ...01-do-not-disable-buffer-in-writing-files.patch | 411 ------------ ....in-use-ROOTPREFIX-without-suffixed-slash.patch | 6 +- .../0002-don-t-use-glibc-specific-qsort_r.patch | 57 +- ...src-login-brightness.c-include-sys-wait.h.patch | 29 - ...e.h-add-__compare_fn_t-and-comparison_fn_.patch | 16 +- .../0003-src-basic-copy.c-include-signal.h.patch | 31 - ...llback-parse_printf_format-implementation.patch | 60 +- ...-cpu-set-util.h-add-__cpu_mask-definition.patch | 58 -- ...asic-missing.h-check-for-missing-strndupa.patch | 158 ++--- .../systemd/0006-Include-netinet-if_ether.h.patch | 237 ++++--- ...if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | 156 +++++ ...-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch | 153 ----- .../0008-add-missing-FTW_-macros-for-musl.patch | 10 +- ...-of-__register_atfork-for-non-glibc-build.patch | 45 ++ .../0010-Use-uintmax_t-for-handling-rlim_t.patch | 97 +++ ...-of-__register_atfork-for-non-glibc-build.patch | 43 -- .../0011-Use-uintmax_t-for-handling-rlim_t.patch | 95 --- ....c-Disable-tests-for-missing-typedefs-in-.patch | 42 ++ ...ass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 99 +++ ...c-compatible-basename-for-non-glibc-syste.patch | 35 + ...ble-buffering-when-writing-to-oom_score_a.patch | 41 ++ ....c-Disable-tests-for-missing-typedefs-in-.patch | 39 -- ...-XSI-compliant-strerror_r-from-GNU-specif.patch | 62 ++ ...ass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | 97 --- ...c-compatible-basename-for-non-glibc-syste.patch | 32 - ...rt_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch | 35 + ...ble-buffering-when-writing-to-oom_score_a.patch | 39 -- ...ing_type.h-add-__compar_d_fn_t-definition.patch | 30 + ...id-redefinition-of-prctl_mm_map-structure.patch | 32 + ...-XSI-compliant-strerror_r-from-GNU-specif.patch | 60 -- .../systemd/0019-Handle-missing-LOCK_EX.patch | 26 + ...rt_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch | 33 - ...ompatible-pointer-type-struct-sockaddr_un.patch | 40 ++ ...ing_type.h-add-__compar_d_fn_t-definition.patch | 28 - .../systemd/0021-Handle-missing-LOCK_EX.patch | 23 - ...id-redefinition-of-prctl_mm_map-structure.patch | 30 - .../systemd/0021-test-json.c-define-M_PIl.patch | 33 + ...ompatible-pointer-type-struct-sockaddr_un.patch | 37 - ...22-do-not-disable-buffer-in-writing-files.patch | 413 ++++++++++++ .../systemd/systemd/0023-Include-sys-wait.h.patch | 31 + .../systemd/systemd/0024-Include-signal.h.patch | 33 + .../systemd/0024-test-json.c-define-M_PIl.patch | 31 - .../systemd/0025-Handle-__cpu_mask-usage.patch | 60 ++ .../systemd/0026-Handle-missing-gshadow.patch | 173 +++++ ...elinux-hook-handling-to-enumerate-nexthop.patch | 46 -- poky/meta/recipes-core/systemd/systemd_246.6.bb | 732 -------------------- poky/meta/recipes-core/systemd/systemd_247.2.bb | 745 +++++++++++++++++++++ poky/meta/recipes-core/sysvinit/sysvinit/rc | 9 +- .../recipes-core/sysvinit/sysvinit/rcS-default | 7 + poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb | 112 ---- poky/meta/recipes-core/sysvinit/sysvinit_2.98.bb | 117 ++++ ...o-not-build-plymouth-ctrl.c-w-disabled-pl.patch | 52 ++ ...ck-do-not-assume-__NR_settimeofday_time32.patch | 30 + .../recipes-core/util-linux/util-linux_2.36.1.bb | 361 ++++++++++ .../recipes-core/util-linux/util-linux_2.36.bb | 359 ---------- 107 files changed, 4060 insertions(+), 3370 deletions(-) create mode 100644 poky/meta/recipes-core/busybox/files/rcS.default create mode 100644 poky/meta/recipes-core/ell/ell/0001-ell-add-missing-include-in-dhcp-server.patch create mode 100644 poky/meta/recipes-core/ell/ell/0001-pem.c-do-not-use-rawmemchr.patch delete mode 100644 poky/meta/recipes-core/ell/ell_0.33.bb create mode 100644 poky/meta/recipes-core/ell/ell_0.35.bb create mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch delete mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.2.bb create mode 100644 poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.4.bb create mode 100644 poky/meta/recipes-core/glibc/glibc/0031-linux-Allow-adjtime-with-NULL-argument-BZ-26833.patch create mode 100644 poky/meta/recipes-core/glibc/glibc/CVE-2020-29562.patch create mode 100644 poky/meta/recipes-core/glibc/glibc/CVE-2020-29573.patch delete mode 100644 poky/meta/recipes-core/initscripts/init-system-helpers_1.58.bb create mode 100644 poky/meta/recipes-core/initscripts/init-system-helpers_1.60.bb delete mode 100644 poky/meta/recipes-core/kbd/kbd_2.3.0.bb create mode 100644 poky/meta/recipes-core/kbd/kbd_2.4.0.bb create mode 100644 poky/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch delete mode 100644 poky/meta/recipes-core/readline/readline-8.0/configure-fix.patch delete mode 100644 poky/meta/recipes-core/readline/readline-8.0/norpath.patch delete mode 100644 poky/meta/recipes-core/readline/readline-8.0/rl-native.map create mode 100644 poky/meta/recipes-core/readline/readline-8.1/configure-fix.patch create mode 100644 poky/meta/recipes-core/readline/readline-8.1/norpath.patch create mode 100644 poky/meta/recipes-core/readline/readline-8.1/rl-native.map delete mode 100644 poky/meta/recipes-core/readline/readline_8.0.bb create mode 100644 poky/meta/recipes-core/readline/readline_8.1.bb delete mode 100644 poky/meta/recipes-core/systemd/systemd-boot_246.6.bb create mode 100644 poky/meta/recipes-core/systemd/systemd-boot_247.2.bb delete mode 100644 poky/meta/recipes-core/systemd/systemd-conf_246.1.bb create mode 100644 poky/meta/recipes-core/systemd/systemd-conf_247.2.bb delete mode 100644 poky/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0023-Include-sys-wait.h.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0024-Include-signal.h.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch create mode 100644 poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch delete mode 100644 poky/meta/recipes-core/systemd/systemd_246.6.bb create mode 100644 poky/meta/recipes-core/systemd/systemd_247.2.bb delete mode 100644 poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb create mode 100644 poky/meta/recipes-core/sysvinit/sysvinit_2.98.bb create mode 100644 poky/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch create mode 100644 poky/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch create mode 100644 poky/meta/recipes-core/util-linux/util-linux_2.36.1.bb delete mode 100644 poky/meta/recipes-core/util-linux/util-linux_2.36.bb (limited to 'poky/meta/recipes-core') diff --git a/poky/meta/recipes-core/busybox/busybox-inittab_1.32.0.bb b/poky/meta/recipes-core/busybox/busybox-inittab_1.32.0.bb index 61fb8cbad..8d0f419f4 100644 --- a/poky/meta/recipes-core/busybox/busybox-inittab_1.32.0.bb +++ b/poky/meta/recipes-core/busybox/busybox-inittab_1.32.0.bb @@ -23,6 +23,53 @@ do_install() { id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab done + if [ "${USE_VT}" = "1" ]; then + cat <>${D}${sysconfdir}/inittab +# ${base_sbindir}/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# + +EOF + + for n in ${SYSVINIT_ENABLED_GETTYS} + do + echo "tty$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab + done + echo "" >> ${D}${sysconfdir}/inittab + fi + +} + +pkg_postinst_${PN} () { +# run this on host and on target +if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then + exit 0 +fi +} + +pkg_postinst_ontarget_${PN} () { +# run this on the target +if [ -e /proc/consoles ]; then + tmp="${SERIAL_CONSOLES_CHECK}" + for i in $tmp + do + j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g` + k=`echo ${i} | sed s/^.*\://g` + if [ -z "`grep ${j} /proc/consoles`" ]; then + if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then + sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab + fi + fi + done + kill -HUP 1 +else + exit 1 +fi } # SERIAL_CONSOLES is generally defined by the MACHINE .conf. @@ -33,3 +80,6 @@ FILES_${PN} = "${sysconfdir}/inittab" CONFFILES_${PN} = "${sysconfdir}/inittab" RCONFLICTS_${PN} = "sysvinit-inittab" + +USE_VT ?= "1" +SYSVINIT_ENABLED_GETTYS ?= "1" diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index e0522be72..47fcb5930 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -309,9 +309,10 @@ do_install () { install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev fi fi - if grep -q "CONFIG_INIT=y" ${B}/.config; then + if grep -q "CONFIG_INIT=y" ${B}/.config && ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','busybox','true','false',d)}; then install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${WORKDIR}/rcS.default ${D}${sysconfdir}/default/rcS fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then diff --git a/poky/meta/recipes-core/busybox/busybox/mdev.cfg b/poky/meta/recipes-core/busybox/busybox/mdev.cfg index 6aefe90e4..143e6097c 100644 --- a/poky/meta/recipes-core/busybox/busybox/mdev.cfg +++ b/poky/meta/recipes-core/busybox/busybox/mdev.cfg @@ -9,3 +9,5 @@ CONFIG_SETSID=y CONFIG_CTTYHACK=y CONFIG_FEATURE_SHADOWPASSWDS=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_MDEV_DAEMON=y diff --git a/poky/meta/recipes-core/busybox/busybox_1.32.0.bb b/poky/meta/recipes-core/busybox/busybox_1.32.0.bb index 8e23b0d4a..3a669444d 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.32.0.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.32.0.bb @@ -33,6 +33,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://getopts.cfg \ file://resize.cfg \ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ + ${@["", "file://rcS.default"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \ file://syslog.cfg \ file://unicode.cfg \ diff --git a/poky/meta/recipes-core/busybox/files/mdev b/poky/meta/recipes-core/busybox/files/mdev index 8c9c06e96..2fbdfb073 100755 --- a/poky/meta/recipes-core/busybox/files/mdev +++ b/poky/meta/recipes-core/busybox/files/mdev @@ -1,21 +1,43 @@ #!/bin/sh -mount -t proc proc /proc -mount -t sysfs sysfs /sys -mount -t tmpfs tmpfs /dev -o size=64k,mode=0755 -mkdir /dev/pts /dev/shm -chmod 777 /dev/shm -mount -t devpts devpts /dev/pts -touch /dev/mdev.seq -#sysctl -w kernel.hotplug=/sbin/mdev -echo "/sbin/mdev" > /proc/sys/kernel/hotplug -mdev -s - # -# We might have mounted something over /dev, see if /dev/initctl is there. +# Run the mdev daemon # -if test ! -p /dev/initctl -then - rm -f /dev/initctl - mknod -m 600 /dev/initctl p -fi + +DAEMON="mdev" +PIDFILE="/var/run/$DAEMON.pid" + + +start() { + echo -n "Starting $DAEMON... " + start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df + [ $? -eq 0 ] && echo "OK" || echo "ERROR" + + # coldplug modules + find /sys/ -name modalias -print0 | \ + xargs -0 sort -u | \ + tr '\n' '\0' | \ + xargs -0 modprobe -abq +} + +stop() { + echo -n "Stopping $DAEMON... " + start-stop-daemon -K -p $PIDFILE + [ $? -eq 0 ] && echo "OK" || echo "ERROR" +} + +restart() { + stop + start +} + +case "$1" in + start|stop|restart) + "$1" + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/poky/meta/recipes-core/busybox/files/rcS.default b/poky/meta/recipes-core/busybox/files/rcS.default new file mode 100644 index 000000000..44c9747e3 --- /dev/null +++ b/poky/meta/recipes-core/busybox/files/rcS.default @@ -0,0 +1,31 @@ +# +# Defaults for the boot scripts in /etc/rcS.d +# + +# Time files in /tmp are kept in days. +TMPTIME=0 +# Set to yes if you want sulogin to be spawned on bootup +SULOGIN=no +# Set to no if you want to be able to login over telnet/rlogin +# before system startup is complete (as soon as inetd is started) +DELAYLOGIN=no +# Assume that the BIOS clock is set to UTC time (recommended) +UTC=yes +# Set VERBOSE to "no" if you would like a more quiet bootup. +VERBOSE=no +# Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically +EDITMOTD=no +# Whether to fsck root on boot +ENABLE_ROOTFS_FSCK=no +# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup. +FSCKFIX=yes +# Set TICKADJ to the correct tick value for this specific machine +#TICKADJ=10000 +# Enable caching in populate-volatile.sh +VOLATILE_ENABLE_CACHE=yes +# Indicate whether the rootfs is intended to be read-only or not. +# Setting ROOTFS_READ_ONLY to yes and rebooting will give you a read-only rootfs. +# Normally you should not change this value. +ROOTFS_READ_ONLY=no +# Indicate init system type +INIT_SYSTEM=busybox diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb index 4eb357e31..320f93bdc 100644 --- a/poky/meta/recipes-core/coreutils/coreutils_8.32.bb +++ b/poky/meta/recipes-core/coreutils/coreutils_8.32.bb @@ -39,6 +39,9 @@ PACKAGECONFIG_class-target ??= "\ # The lib/oe/path.py requires xattr PACKAGECONFIG_class-native ??= "xattr" +# oe-core builds need xattr support +PACKAGECONFIG_class-nativesdk ??= "xattr" + # with, without, depends, rdepends # PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," diff --git a/poky/meta/recipes-core/dropbear/dropbear.inc b/poky/meta/recipes-core/dropbear/dropbear.inc index 080ee26b2..a30f98faa 100644 --- a/poky/meta/recipes-core/dropbear/dropbear.inc +++ b/poky/meta/recipes-core/dropbear/dropbear.inc @@ -58,6 +58,9 @@ EXTRA_OECONF += "\ # This is causing [textrel] QA warning EXTRA_OECONF += "--disable-harden" +# musl does not implement wtmp/logwtmp APIs +EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog" + do_install() { install -d ${D}${sysconfdir} \ ${D}${sysconfdir}/init.d \ diff --git a/poky/meta/recipes-core/ell/ell/0001-ell-add-missing-include-in-dhcp-server.patch b/poky/meta/recipes-core/ell/ell/0001-ell-add-missing-include-in-dhcp-server.patch new file mode 100644 index 000000000..2460d26bd --- /dev/null +++ b/poky/meta/recipes-core/ell/ell/0001-ell-add-missing-include-in-dhcp-server.patch @@ -0,0 +1,23 @@ +From dd350f4e2258b5a638bc8fb26a6193147902d292 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=89rico=20Nogueira?= +Date: Mon, 30 Nov 2020 18:40:33 -0300 +Subject: [PATCH] ell: add missing include in dhcp-server. + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin +--- + ell/dhcp-server.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ell/dhcp-server.c b/ell/dhcp-server.c +index c983ed4..144e83e 100644 +--- a/ell/dhcp-server.c ++++ b/ell/dhcp-server.c +@@ -24,6 +24,7 @@ + #include + #endif + ++#include + #include + #include + #include diff --git a/poky/meta/recipes-core/ell/ell/0001-pem.c-do-not-use-rawmemchr.patch b/poky/meta/recipes-core/ell/ell/0001-pem.c-do-not-use-rawmemchr.patch new file mode 100644 index 000000000..f0ce6f136 --- /dev/null +++ b/poky/meta/recipes-core/ell/ell/0001-pem.c-do-not-use-rawmemchr.patch @@ -0,0 +1,27 @@ +From 277e1eca67fcc23cb31be7b826d83a19d9b89bd2 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 22 Dec 2020 10:30:54 +0000 +Subject: [PATCH] pem.c: do not use rawmemchr() + +This is a glibc-only function, and causes build failures with +alternative libc implementations such as musl. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + ell/pem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ell/pem.c b/ell/pem.c +index 790f2c2..237ae02 100644 +--- a/ell/pem.c ++++ b/ell/pem.c +@@ -224,7 +224,7 @@ static uint8_t *pem_load_buffer(const void *buf, size_t buf_len, + + /* Check that each header line has a key and a colon */ + while (start < end) { +- const char *lf = rawmemchr(start, '\n'); ++ const char *lf = memchr(start, '\n', end - start); + const char *colon = memchr(start, ':', lf - start); + + if (!colon) diff --git a/poky/meta/recipes-core/ell/ell_0.33.bb b/poky/meta/recipes-core/ell/ell_0.33.bb deleted file mode 100644 index 2fa05104f..000000000 --- a/poky/meta/recipes-core/ell/ell_0.33.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Embedded Linux Library" -DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \ -low-level functionality for system daemons. It typically has no \ -dependencies other than the Linux kernel, C standard library, and \ -libdl (for dynamic linking). While ELL is designed to be efficient \ -and compact enough for use on embedded Linux platforms, it is not \ -limited to resource-constrained systems." -SECTION = "libs" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" - -DEPENDS = "dbus" - -inherit autotools pkgconfig - -SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "d9e40e641164150394b74b719b9726fc734f24b2cde679cf5f3be6915c34eded" - -do_configure_prepend () { - mkdir -p ${S}/build-aux -} diff --git a/poky/meta/recipes-core/ell/ell_0.35.bb b/poky/meta/recipes-core/ell/ell_0.35.bb new file mode 100644 index 000000000..ccc54b5ff --- /dev/null +++ b/poky/meta/recipes-core/ell/ell_0.35.bb @@ -0,0 +1,24 @@ +SUMMARY = "Embedded Linux Library" +DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \ +low-level functionality for system daemons. It typically has no \ +dependencies other than the Linux kernel, C standard library, and \ +libdl (for dynamic linking). While ELL is designed to be efficient \ +and compact enough for use on embedded Linux platforms, it is not \ +limited to resource-constrained systems." +SECTION = "libs" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" + +DEPENDS = "dbus" + +inherit autotools pkgconfig + +SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \ + file://0001-ell-add-missing-include-in-dhcp-server.patch \ + file://0001-pem.c-do-not-use-rawmemchr.patch \ + " +SRC_URI[sha256sum] = "2bfe9da7781f65f1cb1595a5a068a3ae74d4b68b74f287c6f0c892cfe623913f" + +do_configure_prepend () { + mkdir -p ${S}/build-aux +} diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch new file mode 100644 index 000000000..508c8c3ba --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch @@ -0,0 +1,26 @@ +From b833254bcc9fcf4cdc2572027b1154d799535ca4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sun, 20 Dec 2020 22:01:43 +0100 +Subject: [PATCH] gio/tests/codegen.py: bump timeout to 100 seconds + +This may be necessary on overloaded CI systems. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + gio/tests/codegen.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py +index 51de0ed..ca98c9d 100644 +--- a/gio/tests/codegen.py ++++ b/gio/tests/codegen.py +@@ -51,7 +51,7 @@ class TestCodegen(unittest.TestCase): + cwd = '' + + def setUp(self): +- self.timeout_seconds = 10 # seconds per test ++ self.timeout_seconds = 100 # seconds per test + self.tmpdir = tempfile.TemporaryDirectory() + self.cwd = os.getcwd() + os.chdir(self.tmpdir.name) 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 2b8e93051..4cbcc29a5 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 85931fbb981b5aae38f1c1370d5d3c091cb862b8 Mon Sep 17 00:00:00 2001 +From 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001 From: Ross Burton 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.66.2.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.2.bb deleted file mode 100644 index 1f8366085..000000000 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.2.bb +++ /dev/null @@ -1,49 +0,0 @@ -require glib.inc - -PE = "1" - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ - file://run-ptest \ - file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ - file://Enable-more-tests-while-cross-compiling.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0001-Do-not-ignore-return-value-of-write.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ - file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ - file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ - file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ - " - -SRC_URI_append_class-native = " file://relocate-modules.patch" - -SRC_URI[sha256sum] = "ec390bed4e8dd0f89e918f385e8d4cfd7470b1ef7c1ce93ec5c4fc6e3c6a17c4" - -# Find any meson cross files in FILESPATH that are relevant for the current -# build (using siteinfo) and add them to EXTRA_OEMESON. -inherit siteinfo -def find_meson_cross_files(d): - if bb.data.inherits_class('native', d): - return "" - - corebase = d.getVar("COREBASE") - import collections - sitedata = siteinfo_data(d) - # filename -> found - files = collections.OrderedDict() - for path in d.getVar("FILESPATH").split(":"): - for element in sitedata: - filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) - files[filename.replace(corebase, "${COREBASE}")] = os.path.exists(filename) - - items = ["--cross-file=" + k for k,v in files.items() if v] - d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) - items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] - d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) - -python () { - find_meson_cross_files(d) -} diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.4.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.4.bb new file mode 100644 index 000000000..70e8aa878 --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.66.4.bb @@ -0,0 +1,50 @@ +require glib.inc + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://Enable-more-tests-while-cross-compiling.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0001-Do-not-ignore-return-value-of-write.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch \ + " + +SRC_URI_append_class-native = " file://relocate-modules.patch" + +SRC_URI[sha256sum] = "97df8670e32f9fd4f7392b0980e661dd625012015d58350da1e58e343f4af984" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + corebase = d.getVar("COREBASE") + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + files[filename.replace(corebase, "${COREBASE}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} diff --git a/poky/meta/recipes-core/glibc/glibc/0031-linux-Allow-adjtime-with-NULL-argument-BZ-26833.patch b/poky/meta/recipes-core/glibc/glibc/0031-linux-Allow-adjtime-with-NULL-argument-BZ-26833.patch new file mode 100644 index 000000000..a458a2a22 --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/0031-linux-Allow-adjtime-with-NULL-argument-BZ-26833.patch @@ -0,0 +1,110 @@ +From 75a193b7611bade31a150dfcc528b973e3d46231 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Mon, 2 Nov 2020 16:18:29 -0300 +Subject: [PATCH] linux: Allow adjtime with NULL argument [BZ #26833] + +The adjtime interface allows return the amount of time remaining +from any previous adjustment that has not yet been completed by +passing a NULL as first argument. This was introduced with y2038 +support 0308077e3a. + +Checked on i686-linux-gnu. + +Reviewed-by: Lukasz Majewski +Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=75a193b7611bade31a150dfcc528b973e3d46231] +Signed-off-by: Peter Kjellerstedt +--- + sysdeps/unix/sysv/linux/adjtime.c | 11 +++++--- + time/Makefile | 3 ++- + time/tst-adjtime.c | 44 +++++++++++++++++++++++++++++++ + 3 files changed, 54 insertions(+), 4 deletions(-) + create mode 100644 time/tst-adjtime.c + +diff --git a/sysdeps/unix/sysv/linux/adjtime.c b/sysdeps/unix/sysv/linux/adjtime.c +index 3f9a4ea2eb..6d1d1b6af2 100644 +--- a/sysdeps/unix/sysv/linux/adjtime.c ++++ b/sysdeps/unix/sysv/linux/adjtime.c +@@ -68,11 +68,16 @@ libc_hidden_def (__adjtime64) + int + __adjtime (const struct timeval *itv, struct timeval *otv) + { +- struct __timeval64 itv64, otv64; ++ struct __timeval64 itv64, *pitv64 = NULL; ++ struct __timeval64 otv64; + int retval; + +- itv64 = valid_timeval_to_timeval64 (*itv); +- retval = __adjtime64 (&itv64, otv != NULL ? &otv64 : NULL); ++ if (itv != NULL) ++ { ++ itv64 = valid_timeval_to_timeval64 (*itv); ++ pitv64 = &itv64; ++ } ++ retval = __adjtime64 (pitv64, otv != NULL ? &otv64 : NULL); + if (otv != NULL) + *otv = valid_timeval64_to_timeval (otv64); + +diff --git a/time/Makefile b/time/Makefile +index 26aa835166..f27a75a115 100644 +--- a/time/Makefile ++++ b/time/Makefile +@@ -47,7 +47,8 @@ tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ + tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \ + tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \ + tst-tzname tst-y2039 bug-mktime4 tst-strftime2 tst-strftime3 \ +- tst-clock tst-clock2 tst-clock_nanosleep tst-cpuclock1 ++ tst-clock tst-clock2 tst-clock_nanosleep tst-cpuclock1 \ ++ tst-adjtime + + include ../Rules + +diff --git a/time/tst-adjtime.c b/time/tst-adjtime.c +new file mode 100644 +index 0000000000..ae2b37cdab +--- /dev/null ++++ b/time/tst-adjtime.c +@@ -0,0 +1,44 @@ ++/* Basic tests for adjtime. ++ Copyright (C) 2020 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++#include ++#include ++ ++ ++static int ++do_test (void) ++{ ++ /* Check if the interface allows getting the amount of time remaining ++ from any previous adjustment that has not yet been completed. This ++ is a non-privileged function of adjtime. */ ++ struct timeval tv; ++ int r = adjtime (NULL, &tv); ++ if (r == -1) ++ { ++ if (errno == ENOSYS) ++ FAIL_UNSUPPORTED ("adjtime unsupported"); ++ FAIL_EXIT1 ("adjtime (NULL, ...) failed: %m"); ++ } ++ ++ return 0; ++} ++ ++#include diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2020-29562.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2020-29562.patch new file mode 100644 index 000000000..134b4e361 --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/CVE-2020-29562.patch @@ -0,0 +1,155 @@ +From 228edd356f03bf62dcf2b1335f25d43c602ee68d Mon Sep 17 00:00:00 2001 +From: Michael Colavita +Date: Thu, 19 Nov 2020 11:44:40 -0500 +Subject: [PATCH] iconv: Fix incorrect UCS4 inner loop bounds (BZ#26923) + +Previously, in UCS4 conversion routines we limit the number of +characters we examine to the minimum of the number of characters in the +input and the number of characters in the output. This is not the +correct behavior when __GCONV_IGNORE_ERRORS is set, as we do not consume +an output character when we skip a code unit. Instead, track the input +and output pointers and terminate the loop when either reaches its +limit. + +This resolves assertion failures when resetting the input buffer in a step of +iconv, which assumes that the input will be fully consumed given sufficient +output space. + +Upstream-Status: Backport [git://sourceware.org/git/glibc.git] +CVE: CVE-2020-29562 +Signed-off-by: Zhixiong Chi +--- + iconv/Makefile | 2 +- + iconv/gconv_simple.c | 16 ++++---------- + iconv/tst-iconv8.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 55 insertions(+), 13 deletions(-) + create mode 100644 iconv/tst-iconv8.c + +diff --git a/iconv/Makefile b/iconv/Makefile +index 30bf996d3a..f9b51e23ec 100644 +--- a/iconv/Makefile ++++ b/iconv/Makefile +@@ -44,7 +44,7 @@ CFLAGS-linereader.c += -DNO_TRANSLITERATION + CFLAGS-simple-hash.c += -I../locale + + tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 \ +- tst-iconv7 tst-iconv-mt tst-iconv-opt ++ tst-iconv7 tst-iconv8 tst-iconv-mt tst-iconv-opt + + others = iconv_prog iconvconfig + install-others-programs = $(inst_bindir)/iconv +diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c +index d4797fba17..963b29f246 100644 +--- a/iconv/gconv_simple.c ++++ b/iconv/gconv_simple.c +@@ -239,11 +239,9 @@ ucs4_internal_loop (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + uint32_t inval; + +@@ -307,11 +305,9 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + if (__glibc_unlikely (inptr[0] > 0x80)) + { +@@ -613,11 +609,9 @@ ucs4le_internal_loop (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + uint32_t inval; + +@@ -684,11 +678,9 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step, + int flags = step_data->__flags; + const unsigned char *inptr = *inptrp; + unsigned char *outptr = *outptrp; +- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4; + int result; +- size_t cnt; + +- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) ++ for (; inptr + 4 <= inend && outptr + 4 <= outend; inptr += 4) + { + if (__glibc_unlikely (inptr[3] > 0x80)) + { +diff --git a/iconv/tst-iconv8.c b/iconv/tst-iconv8.c +new file mode 100644 +index 0000000000..0b92b19f66 +--- /dev/null ++++ b/iconv/tst-iconv8.c +@@ -0,0 +1,50 @@ ++/* Test iconv behavior on UCS4 conversions with //IGNORE. ++ Copyright (C) 2020 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Derived from BZ #26923 */ ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ iconv_t cd = iconv_open ("UTF-8//IGNORE", "ISO-10646/UCS4/"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ /* ++ * Convert sequence beginning with an irreversible character into buffer that ++ * is too small. ++ */ ++ char input[12] = "\xe1\x80\xa1" "AAAAAAAAA"; ++ char *inptr = input; ++ size_t insize = sizeof (input); ++ char output[6]; ++ char *outptr = output; ++ size_t outsize = sizeof (output); ++ ++ TEST_VERIFY (iconv (cd, &inptr, &insize, &outptr, &outsize) == -1); ++ TEST_VERIFY (errno == E2BIG); ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ return 0; ++} ++ ++#include +-- +2.17.0 + diff --git a/poky/meta/recipes-core/glibc/glibc/CVE-2020-29573.patch b/poky/meta/recipes-core/glibc/glibc/CVE-2020-29573.patch new file mode 100644 index 000000000..0f54d72ca --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/CVE-2020-29573.patch @@ -0,0 +1,56 @@ +From 681900d29683722b1cb0a8e565a0585846ec5a61 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 22 Sep 2020 19:07:48 +0200 +Subject: [PATCH] x86: Harden printf against non-normal long double values (bug + 26649) + +The behavior of isnan/__builtin_isnan on bit patterns that do not +correspond to something that the CPU would produce from valid inputs +is currently under-defined in the toolchain. (The GCC built-in and +glibc disagree.) + +The isnan check in PRINTF_FP_FETCH in stdio-common/printf_fp.c +assumes the GCC behavior that returns true for non-normal numbers +which are not specified as NaN. (The glibc implementation returns +false for such numbers.) + +At present, passing non-normal numbers to __mpn_extract_long_double +causes this function to produce irregularly shaped multi-precision +integers, triggering undefined behavior in __printf_fp_l. + +With GCC 10 and glibc 2.32, this behavior is not visible because +__builtin_isnan is used, which avoids calling +__mpn_extract_long_double in this case. This commit updates the +implementation of __mpn_extract_long_double so that regularly shaped +multi-precision integers are produced in this case, avoiding +undefined behavior in __printf_fp_l. + +Upstream-Status: Backport [git://sourceware.org/git/glibc.git] +CVE: CVE-2020-29573 +Signed-off-by: Zhixiong Chi +--- + sysdeps/i386/ldbl2mpn.c | 8 ++++ + 1 files changed, 8 insertions(+) + +diff --git a/sysdeps/i386/ldbl2mpn.c b/sysdeps/i386/ldbl2mpn.c +index ec8464eef7..23afedfb67 100644 +--- a/sysdeps/i386/ldbl2mpn.c ++++ b/sysdeps/i386/ldbl2mpn.c +@@ -115,6 +115,14 @@ __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size, + && res_ptr[N - 1] == 0) + /* Pseudo zero. */ + *expt = 0; ++ else ++ /* Unlike other floating point formats, the most significant bit ++ is explicit and expected to be set for normal numbers. Set it ++ in case it is cleared in the input. Otherwise, callers will ++ not be able to produce the expected multi-precision integer ++ layout by shifting. */ ++ res_ptr[N - 1] |= (mp_limb_t) 1 << (LDBL_MANT_DIG - 1 ++ - ((N - 1) * BITS_PER_MP_LIMB)); + + return N; + } +-- +2.17.0 + diff --git a/poky/meta/recipes-core/glibc/glibc_2.32.bb b/poky/meta/recipes-core/glibc/glibc_2.32.bb index 2a0e46438..b850c28c7 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.32.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.32.bb @@ -43,6 +43,9 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ + file://0031-linux-Allow-adjtime-with-NULL-argument-BZ-26833.patch \ + file://CVE-2020-29562.patch \ + file://CVE-2020-29573.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" diff --git a/poky/meta/recipes-core/initscripts/init-system-helpers_1.58.bb b/poky/meta/recipes-core/initscripts/init-system-helpers_1.58.bb deleted file mode 100644 index b591f412c..000000000 --- a/poky/meta/recipes-core/initscripts/init-system-helpers_1.58.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "helper tools for all init systems" -DESCRIPTION = "This package contains helper tools that are necessary for switching between \ -the various init systems that Debian contains (e. g. sysvinit or \ -systemd). An example is deb-systemd-helper, a script that enables systemd unit \ -files without depending on a running systemd. \ -\ -It also includes the \"service\", \"invoke-rc.d\", and \"update-rc.d\" scripts which \ -provide an abstraction for enabling, disabling, starting, and stopping \ -services for all supported Debian init systems as specified by the policy. \ -\ -While this package is maintained by pkg-systemd-maintainers, it is NOT \ -specific to systemd at all. Maintainers of other init systems are welcome to \ -include their helpers in this package." -HOMEPAGE = "https://salsa.debian.org/debian/init-system-helpers" -SECTION = "base" -LICENSE = "BSD-3-Clause & GPLv2" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=ee2b1830fcfead84d07bc060ec43e072" - -SRCREV = "6a1860c6f5ad295af605ddf588933544e7c24ce1" -SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git;protocol=https" - -S = "${WORKDIR}/git" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install() { - install -d -m 0755 ${D}${sbindir} - install -m 0755 ${S}/script/invoke-rc.d ${D}${sbindir} - install -m 0755 ${S}/script/service ${D}${sbindir} -} - -PACKAGES += "${PN}-invoke-rc.d ${PN}-service" - -FILES_${PN} = "" -FILES_${PN}-invoke-rc.d = "${sbindir}/invoke-rc.d" -FILES_${PN}-service = "${sbindir}/service" - -ALLOW_EMPTY_${PN} = "1" - -RRECOMMENDS_${PN} += "${PN}-invoke-rc.d ${PN}-service" diff --git a/poky/meta/recipes-core/initscripts/init-system-helpers_1.60.bb b/poky/meta/recipes-core/initscripts/init-system-helpers_1.60.bb new file mode 100644 index 000000000..33977e66c --- /dev/null +++ b/poky/meta/recipes-core/initscripts/init-system-helpers_1.60.bb @@ -0,0 +1,41 @@ +SUMMARY = "helper tools for all init systems" +DESCRIPTION = "This package contains helper tools that are necessary for switching between \ +the various init systems that Debian contains (e. g. sysvinit or \ +systemd). An example is deb-systemd-helper, a script that enables systemd unit \ +files without depending on a running systemd. \ +\ +It also includes the \"service\", \"invoke-rc.d\", and \"update-rc.d\" scripts which \ +provide an abstraction for enabling, disabling, starting, and stopping \ +services for all supported Debian init systems as specified by the policy. \ +\ +While this package is maintained by pkg-systemd-maintainers, it is NOT \ +specific to systemd at all. Maintainers of other init systems are welcome to \ +include their helpers in this package." +HOMEPAGE = "https://salsa.debian.org/debian/init-system-helpers" +SECTION = "base" +LICENSE = "BSD-3-Clause & GPLv2" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=ee2b1830fcfead84d07bc060ec43e072" + +SRCREV = "dbd9197569c0935029acd5c9b02b84c68fd937ee" +SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git;protocol=https" + +S = "${WORKDIR}/git" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d -m 0755 ${D}${sbindir} + install -m 0755 ${S}/script/invoke-rc.d ${D}${sbindir} + install -m 0755 ${S}/script/service ${D}${sbindir} +} + +PACKAGES += "${PN}-invoke-rc.d ${PN}-service" + +FILES_${PN} = "" +FILES_${PN}-invoke-rc.d = "${sbindir}/invoke-rc.d" +FILES_${PN}-service = "${sbindir}/service" + +ALLOW_EMPTY_${PN} = "1" + +RRECOMMENDS_${PN} += "${PN}-invoke-rc.d ${PN}-service" diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh index 02f0351fc..a63e71b78 100755 --- a/poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh +++ b/poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh @@ -74,7 +74,7 @@ test "$VERBOSE" != no && echo "Activating swap" # # Check the root filesystem. # -if test -f /fastboot || test $rootcheck = no +if test -f /fastboot || test "$rootcheck" = "no" then test $rootcheck = yes && echo "Fast boot, no filesystem check" else diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh index c719be5d9..2839d57cb 100755 --- a/poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh +++ b/poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh @@ -19,15 +19,21 @@ test "$VERBOSE" != no && echo "Mounting local filesystems..." mount -at nonfs,nosmbfs,noncpfs 2>/dev/null -# -# We might have mounted something over /dev, see if /dev/initctl is there. -# -if test ! -p /dev/initctl -then - rm -f /dev/initctl - mknod -m 600 /dev/initctl p + +# We might have mounted something over /run; see if +# /dev/initctl is present. Look for +# /sbin/init.sysvinit to verify that sysvinit (and +# not busybox or systemd) is installed as default init). +INITCTL="/dev/initctl" +if [ ! -p "$INITCTL" ] && [ "${INIT_SYSTEM}" = "sysvinit" ]; then + # Create new control channel + rm -f "$INITCTL" + mknod -m 600 "$INITCTL" p + + # Reopen control channel. + PID="$(pidof -s /sbin/init || echo 1)" + [ -n "$PID" ] && kill -s USR1 "$PID" fi -kill -USR1 1 # # Execute swapon command again, in case we want to swap to diff --git a/poky/meta/recipes-core/kbd/kbd_2.3.0.bb b/poky/meta/recipes-core/kbd/kbd_2.3.0.bb deleted file mode 100644 index 529f49bef..000000000 --- a/poky/meta/recipes-core/kbd/kbd_2.3.0.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "Keytable files and keyboard utilities" -HOMEPAGE = "http://www.kbd-project.org/" -# everything minus console-fonts is GPLv2+ -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" - -inherit autotools gettext pkgconfig - -DEPENDS += "flex-native" - -RREPLACES_${PN} = "console-tools" -RPROVIDES_${PN} = "console-tools" -RCONFLICTS_${PN} = "console-tools" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ - " - -SRC_URI[sha256sum] = "685056143cb8effd0a1d44b5c391eb50d80dcfd014b1a4d6e2650a28d61cb82a" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - " - -PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam," - -PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" - -FILES_${PN}-consolefonts = "${datadir}/consolefonts" -FILES_${PN}-consoletrans = "${datadir}/consoletrans" -FILES_${PN}-keymaps = "${datadir}/keymaps" -FILES_${PN}-unimaps = "${datadir}/unimaps" - -inherit update-alternatives - -ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}" -ALTERNATIVE_PRIORITY = "100" - -BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-core/kbd/kbd_2.4.0.bb b/poky/meta/recipes-core/kbd/kbd_2.4.0.bb new file mode 100644 index 000000000..65ba70bf4 --- /dev/null +++ b/poky/meta/recipes-core/kbd/kbd_2.4.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "Keytable files and keyboard utilities" +HOMEPAGE = "http://www.kbd-project.org/" +# everything minus console-fonts is GPLv2+ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" + +inherit autotools gettext pkgconfig + +DEPENDS += "flex-native" + +RREPLACES_${PN} = "console-tools" +RPROVIDES_${PN} = "console-tools" +RCONFLICTS_${PN} = "console-tools" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ + " + +SRC_URI[sha256sum] = "55f0740458cfd3a84e775e50d7e8b92dc01846db1edad8e2411ccc293ece9b9f" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + " + +PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam," + +PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" + +FILES_${PN}-consolefonts = "${datadir}/consolefonts" +FILES_${PN}-consoletrans = "${datadir}/consoletrans" +FILES_${PN}-keymaps = "${datadir}/keymaps" +FILES_${PN}-unimaps = "${datadir}/unimaps" + +do_install_append () { + if [ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', '', d)} = yes ] \ + && [ -f ${D}${sysconfdir}/pam.d/vlock ]; then + mv -f ${D}${sysconfdir}/pam.d/vlock ${D}${sysconfdir}/pam.d/vlock.kbd + fi +} + +inherit update-alternatives + +ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'vlock','', d)}" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-core/meta/buildtools-tarball.bb b/poky/meta/recipes-core/meta/buildtools-tarball.bb index 560b8d67b..9da81d552 100644 --- a/poky/meta/recipes-core/meta/buildtools-tarball.bb +++ b/poky/meta/recipes-core/meta/buildtools-tarball.bb @@ -67,7 +67,7 @@ create_sdk_files_append () { # Generate new (mini) sdk-environment-setup file script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}} touch $script - echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script + echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${sbindir_nativesdk}:${SDKPATHNATIVE}${base_bindir_nativesdk}:${SDKPATHNATIVE}${base_sbindir_nativesdk}:$PATH' >> $script echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script diff --git a/poky/meta/recipes-core/meta/wic-tools.bb b/poky/meta/recipes-core/meta/wic-tools.bb index 3e7d0ed48..bc6cc0d18 100644 --- a/poky/meta/recipes-core/meta/wic-tools.bb +++ b/poky/meta/recipes-core/meta/wic-tools.bb @@ -3,14 +3,15 @@ SUMMARY = "A meta recipe to build native tools used by wic." LICENSE = "MIT" DEPENDS = "\ - parted-native syslinux-native gptfdisk-native dosfstools-native \ + parted-native gptfdisk-native dosfstools-native \ mtools-native bmap-tools-native grub-native cdrtools-native \ btrfs-tools-native squashfs-tools-native pseudo-native \ e2fsprogs-native util-linux-native tar-native\ " -DEPENDS_append_x86 = " syslinux grub-efi systemd-boot" -DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot" -DEPENDS_append_x86-x32 = " syslinux grub-efi" +DEPENDS_append_x86 = " syslinux-native syslinux grub-efi systemd-boot" +DEPENDS_append_x86-64 = " syslinux-native syslinux grub-efi systemd-boot" +DEPENDS_append_x86-x32 = " syslinux-native syslinux grub-efi" +DEPENDS_append_aarch64 = " grub-efi systemd-boot" INHIBIT_DEFAULT_DEPS = "1" diff --git a/poky/meta/recipes-core/musl/musl/0001-crt-Add-.file-directive.patch b/poky/meta/recipes-core/musl/musl/0001-crt-Add-.file-directive.patch index d2bd587e3..35c8b6574 100644 --- a/poky/meta/recipes-core/musl/musl/0001-crt-Add-.file-directive.patch +++ b/poky/meta/recipes-core/musl/musl/0001-crt-Add-.file-directive.patch @@ -43,8 +43,6 @@ Signed-off-by: Khem Raj crt/x86_64/crtn.s | 1 + 28 files changed, 28 insertions(+) -diff --git a/crt/aarch64/crti.s b/crt/aarch64/crti.s -index 775df0ac..0f7c23a9 100644 --- a/crt/aarch64/crti.s +++ b/crt/aarch64/crti.s @@ -1,3 +1,4 @@ @@ -52,8 +50,6 @@ index 775df0ac..0f7c23a9 100644 .section .init .global _init .type _init,%function -diff --git a/crt/aarch64/crtn.s b/crt/aarch64/crtn.s -index 73cab692..d62fc129 100644 --- a/crt/aarch64/crtn.s +++ b/crt/aarch64/crtn.s @@ -1,3 +1,4 @@ @@ -61,8 +57,6 @@ index 73cab692..d62fc129 100644 .section .init ldp x29,x30,[sp],#16 ret -diff --git a/crt/arm/crti.s b/crt/arm/crti.s -index 18dc1e41..8df72979 100644 --- a/crt/arm/crti.s +++ b/crt/arm/crti.s @@ -1,3 +1,4 @@ @@ -70,8 +64,6 @@ index 18dc1e41..8df72979 100644 .syntax unified .section .init -diff --git a/crt/arm/crtn.s b/crt/arm/crtn.s -index dc020f92..7451355b 100644 --- a/crt/arm/crtn.s +++ b/crt/arm/crtn.s @@ -1,3 +1,4 @@ @@ -79,8 +71,6 @@ index dc020f92..7451355b 100644 .syntax unified .section .init -diff --git a/crt/i386/crti.s b/crt/i386/crti.s -index d2682a20..2823fc3b 100644 --- a/crt/i386/crti.s +++ b/crt/i386/crti.s @@ -1,3 +1,4 @@ @@ -88,8 +78,6 @@ index d2682a20..2823fc3b 100644 .section .init .global _init _init: -diff --git a/crt/i386/crtn.s b/crt/i386/crtn.s -index f3b61e01..04fb1646 100644 --- a/crt/i386/crtn.s +++ b/crt/i386/crtn.s @@ -1,3 +1,4 @@ @@ -97,8 +85,6 @@ index f3b61e01..04fb1646 100644 .section .init add $12,%esp ret -diff --git a/crt/microblaze/crti.s b/crt/microblaze/crti.s -index ed1c2fa4..29ee4733 100644 --- a/crt/microblaze/crti.s +++ b/crt/microblaze/crti.s @@ -1,3 +1,4 @@ @@ -106,8 +92,6 @@ index ed1c2fa4..29ee4733 100644 .section .init .global _init .align 2 -diff --git a/crt/microblaze/crtn.s b/crt/microblaze/crtn.s -index 1e02c984..c2083749 100644 --- a/crt/microblaze/crtn.s +++ b/crt/microblaze/crtn.s @@ -1,3 +1,4 @@ @@ -115,8 +99,6 @@ index 1e02c984..c2083749 100644 .section .init lwi r15, r1, 0 rtsd r15, 8 -diff --git a/crt/mips/crti.s b/crt/mips/crti.s -index 39dee380..0211764e 100644 --- a/crt/mips/crti.s +++ b/crt/mips/crti.s @@ -1,3 +1,4 @@ @@ -124,8 +106,6 @@ index 39dee380..0211764e 100644 .set noreorder .section .init -diff --git a/crt/mips/crtn.s b/crt/mips/crtn.s -index 506a04b7..606490cf 100644 --- a/crt/mips/crtn.s +++ b/crt/mips/crtn.s @@ -1,3 +1,4 @@ @@ -133,8 +113,6 @@ index 506a04b7..606490cf 100644 .set noreorder .section .init -diff --git a/crt/mips64/crti.s b/crt/mips64/crti.s -index c962dd09..f2c19cdd 100644 --- a/crt/mips64/crti.s +++ b/crt/mips64/crti.s @@ -1,3 +1,4 @@ @@ -142,8 +120,6 @@ index c962dd09..f2c19cdd 100644 .set noreorder .section .init -diff --git a/crt/mips64/crtn.s b/crt/mips64/crtn.s -index f3930b24..68903ffa 100644 --- a/crt/mips64/crtn.s +++ b/crt/mips64/crtn.s @@ -1,3 +1,4 @@ @@ -151,8 +127,6 @@ index f3930b24..68903ffa 100644 .set noreorder .section .init -diff --git a/crt/mipsn32/crti.s b/crt/mipsn32/crti.s -index 14fa28d9..a35387d3 100644 --- a/crt/mipsn32/crti.s +++ b/crt/mipsn32/crti.s @@ -1,3 +1,4 @@ @@ -160,8 +134,6 @@ index 14fa28d9..a35387d3 100644 .set noreorder .section .init .global _init -diff --git a/crt/mipsn32/crtn.s b/crt/mipsn32/crtn.s -index dccd7e89..bdb6e561 100644 --- a/crt/mipsn32/crtn.s +++ b/crt/mipsn32/crtn.s @@ -1,3 +1,4 @@ @@ -169,8 +141,6 @@ index dccd7e89..bdb6e561 100644 .set noreorder .section .init ld $gp, 16($sp) -diff --git a/crt/or1k/crti.s b/crt/or1k/crti.s -index 7e741459..919369ca 100644 --- a/crt/or1k/crti.s +++ b/crt/or1k/crti.s @@ -1,3 +1,4 @@ @@ -178,8 +148,6 @@ index 7e741459..919369ca 100644 .section .init .global _init _init: -diff --git a/crt/or1k/crtn.s b/crt/or1k/crtn.s -index 4185a027..d670b327 100644 --- a/crt/or1k/crtn.s +++ b/crt/or1k/crtn.s @@ -1,3 +1,4 @@ @@ -187,8 +155,6 @@ index 4185a027..d670b327 100644 .section .init l.lwz r9,0(r1) l.jr r9 -diff --git a/crt/powerpc/crti.s b/crt/powerpc/crti.s -index 60461ca4..b748ca48 100644 --- a/crt/powerpc/crti.s +++ b/crt/powerpc/crti.s @@ -1,3 +1,4 @@ @@ -196,8 +162,6 @@ index 60461ca4..b748ca48 100644 .section .init .align 2 .global _init -diff --git a/crt/powerpc/crtn.s b/crt/powerpc/crtn.s -index 2d14a6f0..d989e36f 100644 --- a/crt/powerpc/crtn.s +++ b/crt/powerpc/crtn.s @@ -1,3 +1,4 @@ @@ -205,8 +169,6 @@ index 2d14a6f0..d989e36f 100644 .section .init .align 2 lwz 0,36(1) -diff --git a/crt/powerpc64/crti.s b/crt/powerpc64/crti.s -index 9f712f0e..d3323a67 100644 --- a/crt/powerpc64/crti.s +++ b/crt/powerpc64/crti.s @@ -1,3 +1,4 @@ @@ -214,8 +176,6 @@ index 9f712f0e..d3323a67 100644 .section .init .align 2 .global _init -diff --git a/crt/powerpc64/crtn.s b/crt/powerpc64/crtn.s -index a7a9f4a0..5e71ae66 100644 --- a/crt/powerpc64/crtn.s +++ b/crt/powerpc64/crtn.s @@ -1,3 +1,4 @@ @@ -223,8 +183,6 @@ index a7a9f4a0..5e71ae66 100644 .section .init .align 2 addi 1, 1, 32 -diff --git a/crt/s390x/crti.s b/crt/s390x/crti.s -index f453205b..3da3c5e1 100644 --- a/crt/s390x/crti.s +++ b/crt/s390x/crti.s @@ -1,3 +1,4 @@ @@ -232,8 +190,6 @@ index f453205b..3da3c5e1 100644 .section .init .align 2 .global _init -diff --git a/crt/s390x/crtn.s b/crt/s390x/crtn.s -index 06066dc9..bfd55caf 100644 --- a/crt/s390x/crtn.s +++ b/crt/s390x/crtn.s @@ -1,3 +1,4 @@ @@ -241,8 +197,6 @@ index 06066dc9..bfd55caf 100644 .section .init .align 2 lmg %r14, %r15, 272(%r15) -diff --git a/crt/sh/crti.s b/crt/sh/crti.s -index d99bfd5c..77d61c51 100644 --- a/crt/sh/crti.s +++ b/crt/sh/crti.s @@ -1,3 +1,4 @@ @@ -250,8 +204,6 @@ index d99bfd5c..77d61c51 100644 .section .init .global _init .type _init, @function -diff --git a/crt/sh/crtn.s b/crt/sh/crtn.s -index 958ce951..29deb5be 100644 --- a/crt/sh/crtn.s +++ b/crt/sh/crtn.s @@ -1,3 +1,4 @@ @@ -259,8 +211,6 @@ index 958ce951..29deb5be 100644 .section .init lds.l @r15+, pr mov.l @r15+, r14 -diff --git a/crt/x32/crti.s b/crt/x32/crti.s -index 4788968b..8668b7c7 100644 --- a/crt/x32/crti.s +++ b/crt/x32/crti.s @@ -1,3 +1,4 @@ @@ -268,8 +218,6 @@ index 4788968b..8668b7c7 100644 .section .init .global _init _init: -diff --git a/crt/x32/crtn.s b/crt/x32/crtn.s -index 29198b77..ef73d295 100644 --- a/crt/x32/crtn.s +++ b/crt/x32/crtn.s @@ -1,3 +1,4 @@ @@ -277,8 +225,6 @@ index 29198b77..ef73d295 100644 .section .init pop %rax ret -diff --git a/crt/x86_64/crti.s b/crt/x86_64/crti.s -index 4788968b..8668b7c7 100644 --- a/crt/x86_64/crti.s +++ b/crt/x86_64/crti.s @@ -1,3 +1,4 @@ @@ -286,8 +232,6 @@ index 4788968b..8668b7c7 100644 .section .init .global _init _init: -diff --git a/crt/x86_64/crtn.s b/crt/x86_64/crtn.s -index 29198b77..ef73d295 100644 --- a/crt/x86_64/crtn.s +++ b/crt/x86_64/crtn.s @@ -1,3 +1,4 @@ @@ -295,6 +239,3 @@ index 29198b77..ef73d295 100644 .section .init pop %rax ret --- -2.29.1 - diff --git a/poky/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch b/poky/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch index f57aae5f3..0aeb5eb5c 100644 --- a/poky/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch +++ b/poky/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch @@ -34,16 +34,16 @@ Signed-off-by: Serhey Popovych LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) --- a/ldso/dynlink.c +++ b/ldso/dynlink.c -@@ -24,6 +24,8 @@ - #include "libc.h" - #include "dynlink.h" +@@ -29,6 +29,8 @@ + #define realloc __libc_realloc + #define free __libc_free +#define SYS_PATH_DFLT SYSLIBDIR ":" LIBDIR + static void error(const char *, ...); #define MAXP2(a,b) (-(-(a)&-(b))) -@@ -1071,7 +1073,7 @@ static struct dso *load_library(const ch +@@ -1094,7 +1096,7 @@ static struct dso *load_library(const ch sys_path = ""; } } diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index 23c2072ea..d4e75f918 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -4,7 +4,7 @@ require musl.inc inherit linuxloader -SRCREV = "d91a6cf6e369a79587c5665fce9635e5634ca201" +SRCREV = "1e4204d522670a1d8b8ab85f1cfefa960547e8af" BASEVER = "1.2.1" diff --git a/poky/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch b/poky/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch new file mode 100644 index 000000000..1eb17767a --- /dev/null +++ b/poky/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch @@ -0,0 +1,29 @@ +From 3b3e87934bb6d8511261d7c3d6e39b4f71849272 Mon Sep 17 00:00:00 2001 +From: Nathan Rossi +Date: Mon, 14 Dec 2020 13:39:02 +1000 +Subject: [PATCH] gen-pkgconfig.in: Do not include LDFLAGS in generated pc + files + +Including the LDFLAGS in the pkgconfig output is problematic as OE +includes build host specific paths and options (e.g. uninative and +'-Wl,--dynamic-linker='). + +Upstream-Status: Inappropriate [OE Specific] +Signed-off-by: Nathan Rossi +--- + misc/gen-pkgconfig.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in +index 8f00b824b9..009d215663 100644 +--- a/misc/gen-pkgconfig.in ++++ b/misc/gen-pkgconfig.in +@@ -80,7 +80,7 @@ if [ "$includedir" != "/usr/include" ]; then + fi + + lib_flags= +-for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ ++for opt in -L$libdir @LIBS@ + do + case $opt in + -l*) # LIBS is handled specially below diff --git a/poky/meta/recipes-core/ncurses/ncurses.inc b/poky/meta/recipes-core/ncurses/ncurses.inc index 4b6188966..fe4e8a5d6 100644 --- a/poky/meta/recipes-core/ncurses/ncurses.inc +++ b/poky/meta/recipes-core/ncurses/ncurses.inc @@ -312,7 +312,7 @@ FILES_${PN}-tools = "\ " # 'reset' is a symlink to 'tset' which is in the 'ncurses' package -RDEPENDS_${PN}-tools = "${PN}" +RDEPENDS_${PN}-tools = "${PN} ${PN}-terminfo-base" FILES_${PN}-terminfo = "\ ${datadir}/terminfo \ diff --git a/poky/meta/recipes-core/ncurses/ncurses_6.2.bb b/poky/meta/recipes-core/ncurses/ncurses_6.2.bb index f3c84c287..e7d7396a2 100644 --- a/poky/meta/recipes-core/ncurses/ncurses_6.2.bb +++ b/poky/meta/recipes-core/ncurses/ncurses_6.2.bb @@ -2,6 +2,7 @@ require ncurses.inc SRC_URI += "file://0001-tic-hang.patch \ file://0002-configure-reproducible.patch \ + file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ " # commit id corresponds to the revision in package version SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4" diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb index 04c4449ec..d785ff670 100644 --- a/poky/meta/recipes-core/ovmf/ovmf_git.bb +++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb @@ -17,10 +17,10 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0002-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ file://0003-ovmf-enable-long-path-file.patch \ file://0004-ovmf-Update-to-latest.patch \ - " + " -PV = "edk2-stable202008" -SRCREV = "06dc822d045c2bb42e497487935485302486e151" +PV = "edk2-stable202011" +SRCREV = "872f953262d68a11da7bc2fb3ded16df234b8700" UPSTREAM_CHECK_GITTAGREGEX = "(?Pedk2-stable.*)" inherit deploy diff --git a/poky/meta/recipes-core/psplash/files/psplash-init b/poky/meta/recipes-core/psplash/files/psplash-init index f58e04373..e0f80bcdc 100755 --- a/poky/meta/recipes-core/psplash/files/psplash-init +++ b/poky/meta/recipes-core/psplash/files/psplash-init @@ -7,6 +7,9 @@ # Default-Stop: ### END INIT INFO +. /etc/default/rcS +export PSPLASH_FIFO_DIR + if [ ! -e /dev/fb0 ]; then echo "Framebuffer /dev/fb0 not detected" echo "Boot splashscreen disabled" @@ -23,7 +26,6 @@ for x in $CMDLINE; do esac done -export PSPLASH_FIFO_DIR=/mnt/.psplash [ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR if ! mountpoint -q $PSPLASH_FIFO_DIR; then mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k diff --git a/poky/meta/recipes-core/psplash/psplash_git.bb b/poky/meta/recipes-core/psplash/psplash_git.bb index 44f0007da..59e1e3f19 100644 --- a/poky/meta/recipes-core/psplash/psplash_git.bb +++ b/poky/meta/recipes-core/psplash/psplash_git.bb @@ -102,6 +102,10 @@ do_install_append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh + + # make fifo for psplash + install -d ${D}/mnt + mkfifo ${D}/mnt/psplash_fifo fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then @@ -122,3 +126,5 @@ SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'pspl INITSCRIPT_NAME = "psplash.sh" INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." + +FILES_${PN} += "/mnt" diff --git a/poky/meta/recipes-core/readline/readline-8.0/configure-fix.patch b/poky/meta/recipes-core/readline/readline-8.0/configure-fix.patch deleted file mode 100644 index ef3104f8a..000000000 --- a/poky/meta/recipes-core/readline/readline-8.0/configure-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Pending - -Without this it fails to link against libtermcap causing various missing -symbols issues. - -RP - 8/10/08 - -Support 6.3 which uses configure.ac rather than configure.in. -Signed-off-by: Hongxu Jia ---- - configure.ac | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index cea8f91..9075b8f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -218,10 +218,10 @@ if test -f ${srcdir}/support/shobj-conf; then - AC_MSG_CHECKING(configuration for building shared libraries) - eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` - --# case "$SHLIB_LIBS" in --# *curses*|*termcap*|*termlib*) ;; --# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; --# esac -+ case "$SHLIB_LIBS" in -+ *curses*|*termcap*|*termlib*) ;; -+ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; -+ esac - - AC_SUBST(SHOBJ_CC) - AC_SUBST(SHOBJ_CFLAGS) --- -1.8.1.2 - diff --git a/poky/meta/recipes-core/readline/readline-8.0/norpath.patch b/poky/meta/recipes-core/readline/readline-8.0/norpath.patch deleted file mode 100644 index 5d71582b7..000000000 --- a/poky/meta/recipes-core/readline/readline-8.0/norpath.patch +++ /dev/null @@ -1,21 +0,0 @@ -This support script ends up hardcoding unnecessary rpaths into the libraries. We -will search $libdir automatically so this is just wastes space. There may be some -cases this is necessary but our use cases aren't one of them. - -Upstream-Status: Inappropriate - -RP 2012/2/23 - -Index: readline-6.2/support/shobj-conf -=================================================================== ---- readline-6.2.orig/support/shobj-conf 2012-02-23 11:06:37.193179379 +0000 -+++ readline-6.2/support/shobj-conf 2012-02-23 11:06:50.049178918 +0000 -@@ -114,7 +114,7 @@ - SHOBJ_LD='${CC}' - SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' - -- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' -+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' - SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' - ;; - diff --git a/poky/meta/recipes-core/readline/readline-8.0/rl-native.map b/poky/meta/recipes-core/readline/readline-8.0/rl-native.map deleted file mode 100644 index 5e7d49cdd..000000000 --- a/poky/meta/recipes-core/readline/readline-8.0/rl-native.map +++ /dev/null @@ -1,12 +0,0 @@ -READLINE_6.3 { - rl_change_environment; - rl_clear_history; - rl_executing_key; - rl_executing_keyseq; - rl_filename_stat_hook; - rl_history_substr_search_backward; - rl_history_substr_search_forward; - rl_input_available_hook; - rl_print_last_kbd_macro; - rl_signal_event_hook; -}; diff --git a/poky/meta/recipes-core/readline/readline-8.1/configure-fix.patch b/poky/meta/recipes-core/readline/readline-8.1/configure-fix.patch new file mode 100644 index 000000000..ef3104f8a --- /dev/null +++ b/poky/meta/recipes-core/readline/readline-8.1/configure-fix.patch @@ -0,0 +1,35 @@ +Upstream-Status: Pending + +Without this it fails to link against libtermcap causing various missing +symbols issues. + +RP - 8/10/08 + +Support 6.3 which uses configure.ac rather than configure.in. +Signed-off-by: Hongxu Jia +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cea8f91..9075b8f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -218,10 +218,10 @@ if test -f ${srcdir}/support/shobj-conf; then + AC_MSG_CHECKING(configuration for building shared libraries) + eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + +-# case "$SHLIB_LIBS" in +-# *curses*|*termcap*|*termlib*) ;; +-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; +-# esac ++ case "$SHLIB_LIBS" in ++ *curses*|*termcap*|*termlib*) ;; ++ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; ++ esac + + AC_SUBST(SHOBJ_CC) + AC_SUBST(SHOBJ_CFLAGS) +-- +1.8.1.2 + diff --git a/poky/meta/recipes-core/readline/readline-8.1/norpath.patch b/poky/meta/recipes-core/readline/readline-8.1/norpath.patch new file mode 100644 index 000000000..5d71582b7 --- /dev/null +++ b/poky/meta/recipes-core/readline/readline-8.1/norpath.patch @@ -0,0 +1,21 @@ +This support script ends up hardcoding unnecessary rpaths into the libraries. We +will search $libdir automatically so this is just wastes space. There may be some +cases this is necessary but our use cases aren't one of them. + +Upstream-Status: Inappropriate + +RP 2012/2/23 + +Index: readline-6.2/support/shobj-conf +=================================================================== +--- readline-6.2.orig/support/shobj-conf 2012-02-23 11:06:37.193179379 +0000 ++++ readline-6.2/support/shobj-conf 2012-02-23 11:06:50.049178918 +0000 +@@ -114,7 +114,7 @@ + SHOBJ_LD='${CC}' + SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' + +- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' ++ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' + SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' + ;; + diff --git a/poky/meta/recipes-core/readline/readline-8.1/rl-native.map b/poky/meta/recipes-core/readline/readline-8.1/rl-native.map new file mode 100644 index 000000000..5e7d49cdd --- /dev/null +++ b/poky/meta/recipes-core/readline/readline-8.1/rl-native.map @@ -0,0 +1,12 @@ +READLINE_6.3 { + rl_change_environment; + rl_clear_history; + rl_executing_key; + rl_executing_keyseq; + rl_filename_stat_hook; + rl_history_substr_search_backward; + rl_history_substr_search_forward; + rl_input_available_hook; + rl_print_last_kbd_macro; + rl_signal_event_hook; +}; diff --git a/poky/meta/recipes-core/readline/readline_8.0.bb b/poky/meta/recipes-core/readline/readline_8.0.bb deleted file mode 100644 index 99d022a32..000000000 --- a/poky/meta/recipes-core/readline/readline_8.0.bb +++ /dev/null @@ -1,7 +0,0 @@ -require readline.inc - -SRC_URI += "file://configure-fix.patch \ - file://norpath.patch" - -SRC_URI[archive.md5sum] = "7e6c1f16aee3244a69aba6e438295ca3" -SRC_URI[archive.sha256sum] = "e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" diff --git a/poky/meta/recipes-core/readline/readline_8.1.bb b/poky/meta/recipes-core/readline/readline_8.1.bb new file mode 100644 index 000000000..0786a0816 --- /dev/null +++ b/poky/meta/recipes-core/readline/readline_8.1.bb @@ -0,0 +1,7 @@ +require readline.inc + +SRC_URI += "file://configure-fix.patch \ + file://norpath.patch" + +SRC_URI[archive.md5sum] = "e9557dd5b1409f5d7b37ef717c64518e" +SRC_URI[archive.sha256sum] = "f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" diff --git a/poky/meta/recipes-core/systemd/systemd-boot_246.6.bb b/poky/meta/recipes-core/systemd/systemd-boot_246.6.bb deleted file mode 100644 index f92c63981..000000000 --- a/poky/meta/recipes-core/systemd/systemd-boot_246.6.bb +++ /dev/null @@ -1,70 +0,0 @@ -require systemd.inc -FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" - -require conf/image-uefi.conf - -DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" - -inherit meson pkgconfig gettext -inherit deploy - -LDFLAGS_prepend = "${@ " ".join(d.getVar('LD').split()[1:])} " - -do_write_config[vardeps] += "CC OBJCOPY" -do_write_config_append() { - cat >${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross < -Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH] Handle missing gshadow - -gshadow usage is now present in the userdb code. Mask all uses of it to -allow compilation on musl - -Upstream-Status: Inappropriate [musl specific] -Signed-off-by: Alex Kiernan ---- - src/shared/group-record-nss.c | 20 ++++++++++++++++++++ - src/shared/group-record-nss.h | 4 ++++ - src/shared/userdb.c | 6 ++++++ - 3 files changed, 30 insertions(+) - ---- a/src/shared/group-record-nss.c -+++ b/src/shared/group-record-nss.c -@@ -19,8 +19,10 @@ int nss_group_to_group_record( - if (isempty(grp->gr_name)) - return -EINVAL; - -+#if ENABLE_GSHADOW - if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name)) - return -EINVAL; -+#endif - - g = group_record_new(); - if (!g) -@@ -36,6 +38,7 @@ int nss_group_to_group_record( - - g->gid = grp->gr_gid; - -+#if ENABLE_GSHADOW - if (sgrp) { - if (looks_like_hashed_password(sgrp->sg_passwd)) { - g->hashed_password = strv_new(sgrp->sg_passwd); -@@ -51,6 +54,7 @@ int nss_group_to_group_record( - if (!g->administrators) - return -ENOMEM; - } -+#endif - - r = json_build(&g->json, JSON_BUILD_OBJECT( - JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), -@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct grou - assert(ret_sgrp); - assert(ret_buffer); - -+#if ENABLE_GSHADOW - for (;;) { - _cleanup_free_ char *buf = NULL; - struct sgrp sgrp, *result; -@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct grou - buflen *= 2; - buf = mfree(buf); - } -+#else -+ return -ESRCH; -+#endif - } - - int nss_group_record_by_name( -@@ -115,7 +123,9 @@ int nss_group_record_by_name( - struct group grp, *result; - bool incomplete = false; - size_t buflen = 4096; -+#if ENABLE_GSHADOW - struct sgrp sgrp, *sresult = NULL; -+#endif - int r; - - assert(name); -@@ -145,6 +155,7 @@ int nss_group_record_by_name( - buf = mfree(buf); - } - -+#if ENABLE_GSHADOW - if (with_shadow) { - r = nss_sgrp_for_group(result, &sgrp, &sbuf); - if (r < 0) { -@@ -156,6 +167,9 @@ int nss_group_record_by_name( - incomplete = true; - - r = nss_group_to_group_record(result, sresult, ret); -+#else -+ r = nss_group_to_group_record(result, NULL, ret); -+#endif - if (r < 0) - return r; - -@@ -172,7 +186,9 @@ int nss_group_record_by_gid( - struct group grp, *result; - bool incomplete = false; - size_t buflen = 4096; -+#if ENABLE_GSHADOW - struct sgrp sgrp, *sresult = NULL; -+#endif - int r; - - assert(ret); -@@ -200,6 +216,7 @@ int nss_group_record_by_gid( - buf = mfree(buf); - } - -+#if ENABLE_GSHADOW - if (with_shadow) { - r = nss_sgrp_for_group(result, &sgrp, &sbuf); - if (r < 0) { -@@ -211,6 +228,9 @@ int nss_group_record_by_gid( - incomplete = true; - - r = nss_group_to_group_record(result, sresult, ret); -+#else -+ r = nss_group_to_group_record(result, NULL, ret); -+#endif - if (r < 0) - return r; - ---- a/src/shared/group-record-nss.h -+++ b/src/shared/group-record-nss.h -@@ -2,7 +2,11 @@ - #pragma once - - #include -+#if ENABLE_GSHADOW - #include -+#else -+struct sgrp; -+#endif - - #include "group-record.h" - ---- a/src/shared/userdb.c -+++ b/src/shared/userdb.c -@@ -930,13 +930,16 @@ int groupdb_iterator_get(UserDBIterator - if (gr) { - _cleanup_free_ char *buffer = NULL; - bool incomplete = false; -+#if ENABLE_GSHADOW - struct sgrp sgrp; -+#endif - - if (streq_ptr(gr->gr_name, "root")) - iterator->synthesize_root = false; - if (gr->gr_gid == GID_NOBODY) - iterator->synthesize_nobody = false; - -+#if ENABLE_GSHADOW - r = nss_sgrp_for_group(gr, &sgrp, &buffer); - if (r < 0) { - log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name); -@@ -944,6 +947,9 @@ int groupdb_iterator_get(UserDBIterator - } - - r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); -+#else -+ r = nss_group_to_group_record(gr, NULL, ret); -+#endif - if (r < 0) - return r; - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch index 2676c144f..8dd22eeb7 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -29,7 +29,7 @@ Index: systemd-stable/units/meson.build =================================================================== --- systemd-stable.orig/units/meson.build +++ systemd-stable/units/meson.build -@@ -54,8 +54,7 @@ units = [ +@@ -55,8 +55,7 @@ units = [ ['poweroff.target', '', (with_runlevels ? 'runlevel0.target' : '')], ['printer.target', ''], @@ -38,8 +38,8 @@ Index: systemd-stable/units/meson.build + ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'], ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], ['reboot.target', '', - (with_runlevels ? 'runlevel6.target ctrl-alt-del.target' : 'ctrl-alt-del.target')], -@@ -162,8 +161,7 @@ in_units = [ + 'ctrl-alt-del.target' + (with_runlevels ? ' runlevel6.target' : '')], +@@ -166,8 +165,7 @@ in_units = [ ['rc-local.service', 'HAVE_SYSV_COMPAT'], ['rescue.service', ''], ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], @@ -64,7 +64,7 @@ Index: systemd-stable/units/systemd-binfmt.service.in =================================================================== --- systemd-stable.orig/units/systemd-binfmt.service.in +++ systemd-stable/units/systemd-binfmt.service.in -@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc +@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems DefaultDependencies=no Conflicts=shutdown.target diff --git a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch deleted file mode 100644 index 39a975319..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch +++ /dev/null @@ -1,411 +0,0 @@ -From f92fd7e77ed5aab2dda01a20e6891c37f09415d3 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Fri, 1 Mar 2019 15:22:15 +0800 -Subject: [PATCH] do not disable buffer in writing files - -Do not disable buffer in writing files, otherwise we get -failure at boot for musl like below. - - [!!!!!!] Failed to allocate manager object. - -And there will be other failures, critical or not critical. -This is specific to musl. - -Upstream-Status: Inappropriate [musl] - -Signed-off-by: Chen Qi -[Rebased for v242] -Signed-off-by: Andrej Valek -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/cgroup-util.c | 10 +++++----- - src/basic/procfs-util.c | 4 ++-- - src/basic/smack-util.c | 2 +- - src/basic/util.c | 2 +- - src/binfmt/binfmt.c | 6 +++--- - src/core/main.c | 4 ++-- - src/core/smack-setup.c | 8 ++++---- - src/hibernate-resume/hibernate-resume.c | 2 +- - src/libsystemd/sd-device/sd-device.c | 2 +- - src/login/logind-dbus.c | 2 +- - src/nspawn/nspawn-cgroup.c | 2 +- - src/nspawn/nspawn.c | 6 +++--- - src/shared/cgroup-setup.c | 4 ++-- - src/shared/sysctl-util.c | 2 +- - src/sleep/sleep.c | 8 ++++---- - src/udev/udevadm-trigger.c | 2 +- - src/udev/udevd.c | 2 +- - src/vconsole/vconsole-setup.c | 2 +- - 18 files changed, 35 insertions(+), 35 deletions(-) - -Index: systemd-stable/src/basic/cgroup-util.c -=================================================================== ---- systemd-stable.orig/src/basic/cgroup-util.c -+++ systemd-stable/src/basic/cgroup-util.c -@@ -769,7 +769,7 @@ int cg_install_release_agent(const char - - sc = strstrip(contents); - if (isempty(sc)) { -- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, agent, 0); - if (r < 0) - return r; - } else if (!path_equal(sc, agent)) -@@ -787,7 +787,7 @@ int cg_install_release_agent(const char - - sc = strstrip(contents); - if (streq(sc, "0")) { -- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "1", 0); - if (r < 0) - return r; - -@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const cha - if (r < 0) - return r; - -- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "0", 0); - if (r < 0) - return r; - -@@ -824,7 +824,7 @@ int cg_uninstall_release_agent(const cha - if (r < 0) - return r; - -- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, "", 0); - if (r < 0) - return r; - -@@ -1656,7 +1656,7 @@ int cg_set_attribute(const char *control - if (r < 0) - return r; - -- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(p, value, 0); - } - - int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { -Index: systemd-stable/src/basic/procfs-util.c -=================================================================== ---- systemd-stable.orig/src/basic/procfs-util.c -+++ systemd-stable/src/basic/procfs-util.c -@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi - * 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 */ -- r = write_string_file("/proc/sys/kernel/pid_max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/pid_max", buffer, 0); - if (r < 0) - return r; - } - - sprintf(buffer, "%" PRIu64, limit); -- r = write_string_file("/proc/sys/kernel/threads-max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/threads-max", buffer, 0); - if (r < 0) { - uint64_t threads_max; - -Index: systemd-stable/src/basic/smack-util.c -=================================================================== ---- systemd-stable.orig/src/basic/smack-util.c -+++ systemd-stable/src/basic/smack-util.c -@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const - return 0; - - p = procfs_file_alloca(pid, "attr/current"); -- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, label, 0); - if (r < 0) - return r; - -Index: systemd-stable/src/basic/util.c -=================================================================== ---- systemd-stable.orig/src/basic/util.c -+++ systemd-stable/src/basic/util.c -@@ -267,7 +267,7 @@ void disable_coredumps(void) { - if (detect_container() > 0) - return; - -- r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); - if (r < 0) - log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); - } -Index: systemd-stable/src/binfmt/binfmt.c -=================================================================== ---- systemd-stable.orig/src/binfmt/binfmt.c -+++ systemd-stable/src/binfmt/binfmt.c -@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) - if (!fn) - return log_oom(); - -- return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(fn, "-1", 0); - } - - static int apply_rule(const char *rule) { -@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) - - (void) delete_rule(rule); - -- r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); - if (r < 0) - return log_error_errno(r, "Failed to add binary format: %m"); - -@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) { - } - - /* Flush out all rules */ -- (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); -+ (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); - - STRV_FOREACH(f, files) { - k = apply_file(*f, true); -Index: systemd-stable/src/core/main.c -=================================================================== ---- systemd-stable.orig/src/core/main.c -+++ systemd-stable/src/core/main.c -@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void - if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) - return 0; - -- r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); -+ r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); - if (r < 0) - return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, - "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); -@@ -1668,7 +1668,7 @@ static void initialize_core_pattern(bool - if (getpid_cached() != 1) - return; - -- r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); - if (r < 0) - log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); - } -Index: systemd-stable/src/core/smack-setup.c -=================================================================== ---- systemd-stable.orig/src/core/smack-setup.c -+++ systemd-stable/src/core/smack-setup.c -@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) - } - - #ifdef SMACK_RUN_LABEL -- r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK label \"" SMACK_RUN_LABEL "\" on self: %m"); -- r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); - r = write_string_file("/sys/fs/smackfs/netlabel", -- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); -+ "0.0.0.0/0 " SMACK_RUN_LABEL, 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); -- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", 0); - if (r < 0) - log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); - #endif -Index: systemd-stable/src/hibernate-resume/hibernate-resume.c -=================================================================== ---- systemd-stable.orig/src/hibernate-resume/hibernate-resume.c -+++ systemd-stable/src/hibernate-resume/hibernate-resume.c -@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { - return EXIT_FAILURE; - } - -- r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume", major_minor, 0); - if (r < 0) { - log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); - return EXIT_FAILURE; -Index: systemd-stable/src/libsystemd/sd-device/sd-device.c -=================================================================== ---- systemd-stable.orig/src/libsystemd/sd-device/sd-device.c -+++ systemd-stable/src/libsystemd/sd-device/sd-device.c -@@ -1877,7 +1877,7 @@ _public_ int sd_device_set_sysattr_value - if (!value) - return -ENOMEM; - -- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); -+ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); - if (r < 0) { - if (r == -ELOOP) - return -EINVAL; -Index: systemd-stable/src/login/logind-dbus.c -=================================================================== ---- systemd-stable.orig/src/login/logind-dbus.c -+++ systemd-stable/src/login/logind-dbus.c -@@ -1341,7 +1341,7 @@ static int trigger_device(Manager *m, sd - if (!t) - return -ENOMEM; - -- (void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ (void) write_string_file(t, "change", 0); - } - - return 0; -Index: systemd-stable/src/nspawn/nspawn-cgroup.c -=================================================================== ---- systemd-stable.orig/src/nspawn/nspawn-cgroup.c -+++ systemd-stable/src/nspawn/nspawn-cgroup.c -@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified - fn = strjoina(tree, cgroup, "/cgroup.procs"); - - sprintf(pid_string, PID_FMT, pid); -- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); -+ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); - if (r < 0) { - log_error_errno(r, "Failed to move process: %m"); - goto finish; -Index: systemd-stable/src/nspawn/nspawn.c -=================================================================== ---- systemd-stable.orig/src/nspawn/nspawn.c -+++ systemd-stable/src/nspawn/nspawn.c -@@ -2493,7 +2493,7 @@ static int reset_audit_loginuid(void) { - if (streq(p, "4294967295")) - return 0; - -- r = write_string_file("/proc/self/loginuid", "4294967295", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/self/loginuid", "4294967295", 0); - if (r < 0) { - log_error_errno(r, - "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -3726,13 +3726,13 @@ static int setup_uid_map(pid_t pid) { - - xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); - xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); -- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(uid_map, line, 0); - if (r < 0) - return log_error_errno(r, "Failed to write UID map: %m"); - - /* We always assign the same UID and GID ranges */ - xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); -- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(uid_map, line, 0); - if (r < 0) - return log_error_errno(r, "Failed to write GID map: %m"); - -Index: systemd-stable/src/shared/cgroup-setup.c -=================================================================== ---- systemd-stable.orig/src/shared/cgroup-setup.c -+++ systemd-stable/src/shared/cgroup-setup.c -@@ -267,7 +267,7 @@ int cg_attach(const char *controller, co - - xsprintf(c, PID_FMT "\n", pid); - -- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(fs, c, 0); - if (r < 0) - return r; - -@@ -817,7 +817,7 @@ int cg_enable_everywhere( - return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); - } - -- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_stream(f, s, 0); - 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); -Index: systemd-stable/src/shared/sysctl-util.c -=================================================================== ---- systemd-stable.orig/src/shared/sysctl-util.c -+++ systemd-stable/src/shared/sysctl-util.c -@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, con - - log_debug("Setting '%s' to '%s'", p, value); - -- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - } - - int sysctl_read(const char *property, char **content) { -Index: systemd-stable/src/sleep/sleep.c -=================================================================== ---- systemd-stable.orig/src/sleep/sleep.c -+++ systemd-stable/src/sleep/sleep.c -@@ -48,7 +48,7 @@ static int write_hibernate_location_info - assert(hibernate_location->swap); - - xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); -- r = write_string_file("/sys/power/resume", resume_str, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume", resume_str, 0); - 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); -@@ -75,7 +75,7 @@ static int write_hibernate_location_info - } - - xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); -- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/power/resume_offset", offset_str, 0); - if (r < 0) - return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", - hibernate_location->swap->device, offset_str); -@@ -92,7 +92,7 @@ static int write_mode(char **modes) { - STRV_FOREACH(mode, modes) { - int k; - -- k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER); -+ k = write_string_file("/sys/power/disk", *mode, 0); - if (k >= 0) - return 0; - -@@ -114,7 +114,7 @@ static int write_state(FILE **f, char ** - STRV_FOREACH(state, states) { - int k; - -- k = write_string_stream(*f, *state, WRITE_STRING_FILE_DISABLE_BUFFER); -+ k = write_string_stream(*f, *state, 0); - if (k >= 0) - return 0; - log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -Index: systemd-stable/src/udev/udevadm-trigger.c -=================================================================== ---- systemd-stable.orig/src/udev/udevadm-trigger.c -+++ systemd-stable/src/udev/udevadm-trigger.c -@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerato - if (!filename) - return log_oom(); - -- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, action, 0); - if (r < 0) { - bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS); - -Index: systemd-stable/src/udev/udevd.c -=================================================================== ---- systemd-stable.orig/src/udev/udevd.c -+++ systemd-stable/src/udev/udevd.c -@@ -1153,7 +1153,7 @@ static int synthesize_change_one(sd_devi - - filename = strjoina(syspath, "/uevent"); - log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); -- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(filename, "change", 0); - if (r < 0) - return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); - return 0; -Index: systemd-stable/src/vconsole/vconsole-setup.c -=================================================================== ---- systemd-stable.orig/src/vconsole/vconsole-setup.c -+++ systemd-stable/src/vconsole/vconsole-setup.c -@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *na - static int toggle_utf8_sysfs(bool utf8) { - int r; - -- r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0); - if (r < 0) - return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); - 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 index 622a4108b..e49e06672 100644 --- 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 @@ -14,8 +14,8 @@ Signed-off-by: Khem Raj --- a/src/core/systemd.pc.in +++ b/src/core/systemd.pc.in -@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_di - tmpfiles_dir=${prefix}/lib/tmpfiles.d +@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir} + tmpfiles_dir=/usr/lib/tmpfiles.d tmpfilesdir=${tmpfiles_dir} -sysusers_dir=${rootprefix}/lib/sysusers.d @@ -34,4 +34,4 @@ Signed-off-by: Khem Raj +modules_load_dir=${prefix}/lib/modules-load.d modulesloaddir=${modules_load_dir} - catalog_dir=${prefix}/lib/systemd/catalog + catalog_dir=/usr/lib/systemd/catalog diff --git a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index 30fe9a14d..d856bcb58 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -1,7 +1,7 @@ -From 3eb12a6ba0bce149717eaabeb1505d379b3d705a Mon Sep 17 00:00:00 2001 +From 66ece0b870b3a34fdabc48b88437e6cc354e9fce Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 13:41:41 +0800 -Subject: [PATCH] don't use glibc-specific qsort_r +Subject: [PATCH 02/26] don't use glibc-specific qsort_r Upstream-Status: Inappropriate [musl specific] @@ -10,18 +10,19 @@ Signed-off-by: Khem Raj Signed-off-by: Chen Qi [Rebased for v242] Signed-off-by: Andrej Valek - +[Rebased for v247] +Signed-off-by: Luca Boccassi --- src/basic/sort-util.h | 14 ------------ src/libsystemd/sd-hwdb/hwdb-util.c | 19 +++++++++++----- src/shared/format-table.c | 36 ++++++++++++++++++++---------- 3 files changed, 38 insertions(+), 31 deletions(-) -Index: systemd-stable/src/basic/sort-util.h -=================================================================== ---- systemd-stable.orig/src/basic/sort-util.h -+++ systemd-stable/src/basic/sort-util.h -@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *bas +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index 1d194a1f04..3394c9eb72 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ }) @@ -39,11 +40,11 @@ Index: systemd-stable/src/basic/sort-util.h - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ - }) -Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c -=================================================================== ---- systemd-stable.orig/src/libsystemd/sd-hwdb/hwdb-util.c -+++ systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c -@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) +diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c +index 4c94ba9c88..95495dba6d 100644 +--- a/src/libsystemd/sd-hwdb/hwdb-util.c ++++ b/src/libsystemd/sd-hwdb/hwdb-util.c +@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) { DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); @@ -60,7 +61,7 @@ Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c } static int trie_node_add_value(struct trie *trie, struct trie_node *node, -@@ -158,7 +162,10 @@ static int trie_node_add_value(struct tr +@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .value_off = v, }; @@ -72,7 +73,7 @@ Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c 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. */ -@@ -184,7 +191,9 @@ static int trie_node_add_value(struct tr +@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .line_number = line_number, }; node->values_count++; @@ -83,11 +84,11 @@ Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c return 0; } -Index: systemd-stable/src/shared/format-table.c -=================================================================== ---- systemd-stable.orig/src/shared/format-table.c -+++ systemd-stable/src/shared/format-table.c -@@ -1246,31 +1246,33 @@ static int cell_data_compare(TableData * +diff --git a/src/shared/format-table.c b/src/shared/format-table.c +index a13a198b7a..bce10bc607 100644 +--- a/src/shared/format-table.c ++++ b/src/shared/format-table.c +@@ -1243,30 +1243,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t return CMP(index_a, index_b); } @@ -95,7 +96,6 @@ Index: systemd-stable/src/shared/format-table.c +static Table *user_table; +static int table_data_compare(const void *x, const void *y) { + const size_t *a = x, *b=y; - size_t i; int r; - assert(t); @@ -115,8 +115,8 @@ Index: systemd-stable/src/shared/format-table.c return 1; /* Order other lines by the sorting map */ -- for (i = 0; i < t->n_sort_map; i++) { -+ for (i = 0; i < user_table->n_sort_map; i++) { +- 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]]; @@ -131,8 +131,8 @@ Index: systemd-stable/src/shared/format-table.c } /* Order identical lines by the order there were originally added in */ -@@ -1798,7 +1800,12 @@ int table_print(Table *t, FILE *f) { - for (i = 0; i < n_rows; i++) +@@ -1844,7 +1846,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); @@ -145,8 +145,8 @@ Index: systemd-stable/src/shared/format-table.c } if (t->display_map) -@@ -2375,7 +2382,12 @@ int table_to_json(Table *t, JsonVariant - for (i = 0; i < n_rows; i++) +@@ -2440,7 +2447,12 @@ int table_to_json(Table *t, JsonVariant **ret) { + 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); @@ -159,3 +159,6 @@ Index: systemd-stable/src/shared/format-table.c } if (t->display_map) +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch b/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch deleted file mode 100644 index ba7424d87..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0002-src-login-brightness.c-include-sys-wait.h.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 106922335ec502bcb4451c54a89be49f88fa54de Mon Sep 17 00:00:00 2001 -From: Scott Murray -Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH] Include sys/wait.h - -Fixes: -src/login/logind-brightness.c:158:85: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'? - 158 | r = sd_event_add_child(w->manager->event, &w->child_event_source, w->child, WEXITED, on_brightness_writer_exit, w); - | ^~~~~~~ - -Upstream-Status: Pending - -Signed-off-by: Scott Murray - ---- - src/login/logind-brightness.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c -index 3f4b65e1fdf1..5af7e3d5ce3f 100644 ---- a/src/login/logind-brightness.c -+++ b/src/login/logind-brightness.c -@@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ - -+#include - #include "bus-util.h" - #include "device-util.h" - #include "hash-funcs.h" diff --git a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch index 140489514..f43a22aa8 100644 --- a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch @@ -1,7 +1,7 @@ -From 233de872b9b033ec842c2135152d2e006ac44c16 Mon Sep 17 00:00:00 2001 +From 9f0d5996bbb2db3679a4075fa8301750b786c03b Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t +Subject: [PATCH 03/26] missing_type.h: add __compare_fn_t and comparison_fn_t Make it work with musl where comparison_fn_t and __compare_fn_t is not provided. @@ -13,7 +13,6 @@ Signed-off-by: Alex Kiernan Signed-off-by: Chen Qi [Rebased for v242] Signed-off-by: Andrej Valek - --- src/basic/missing_type.h | 9 +++++++++ src/basic/sort-util.h | 1 + @@ -22,7 +21,7 @@ Signed-off-by: Andrej Valek 4 files changed, 12 insertions(+) diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h -index bf8a6caa1b46..c487e65e7bde 100644 +index f6233090a9..aeaf6ad5ec 100644 --- a/src/basic/missing_type.h +++ b/src/basic/missing_type.h @@ -10,3 +10,12 @@ @@ -39,7 +38,7 @@ index bf8a6caa1b46..c487e65e7bde 100644 +typedef int (*__compar_fn_t)(const void *, const void *); +#endif diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h -index 27d68b341cf3..307ea4ac0e8e 100644 +index 3394c9eb72..d9cb2aecb6 100644 --- a/src/basic/sort-util.h +++ b/src/basic/sort-util.h @@ -4,6 +4,7 @@ @@ -51,7 +50,7 @@ index 27d68b341cf3..307ea4ac0e8e 100644 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *arg); diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c -index 128674327362..09ccd613e32c 100644 +index 8a7f82812a..a56f12f47f 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -10,6 +10,7 @@ @@ -63,7 +62,7 @@ index 128674327362..09ccd613e32c 100644 #if HAVE_KMOD #include "module-util.h" diff --git a/src/journal/catalog.c b/src/journal/catalog.c -index 70b2c8b46c4e..d574a64586f1 100644 +index 0f6ad8a29e..4e1077ade4 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -28,6 +28,7 @@ @@ -74,3 +73,6 @@ index 70b2c8b46c4e..d574a64586f1 100644 const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch b/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch deleted file mode 100644 index 538a99c7d..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0003-src-basic-copy.c-include-signal.h.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 082d2eb2a65525890a913723764e67a36ee75384 Mon Sep 17 00:00:00 2001 -From: Scott Murray -Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH] Include signal.h - -Fixes several signal set related errors: -src/basic/copy.c:92:19: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration] -src/basic/copy.c:93:19: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration] -src/basic/copy.c:93:34: error: 'SIGINT' undeclared (first use in this function) -src/basic/copy.c:95:13: error: implicit declaration of function 'sigtimedwait' [-Werror=implicit-function-declaration] - -Upstream-Status: Pending - -Signed-off-by: Scott Murray - ---- - src/basic/copy.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/copy.c b/src/basic/copy.c -index 9028868f696d..5168586fa522 100644 ---- a/src/basic/copy.c -+++ b/src/basic/copy.c -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - #include "alloc-util.h" - #include "btrfs-util.h" 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 e65c54361..bdd64a025 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -1,7 +1,7 @@ -From 8af168cefca01f8f2da336f1c82620c284dc74f2 Mon Sep 17 00:00:00 2001 +From f3dbe29f7620a063af4d8eb3ea7c48ecd410200d Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 14:04:21 +0800 -Subject: [PATCH] add fallback parse_printf_format implementation +Subject: [PATCH 04/26] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific] @@ -10,7 +10,6 @@ Signed-off-by: Khem Raj Signed-off-by: Chen Qi [rebased for systemd 243] Signed-off-by: Scott Murray - --- meson.build | 1 + src/basic/meson.build | 5 + @@ -22,11 +21,11 @@ Signed-off-by: Scott Murray create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h -Index: systemd-stable/meson.build -=================================================================== ---- systemd-stable.orig/meson.build -+++ systemd-stable/meson.build -@@ -638,6 +638,7 @@ endif +diff --git a/meson.build b/meson.build +index f406d595e6..6aa47fc755 100644 +--- a/meson.build ++++ b/meson.build +@@ -646,6 +646,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -34,11 +33,11 @@ Index: systemd-stable/meson.build 'sys/auxv.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', -Index: systemd-stable/src/basic/meson.build -=================================================================== ---- systemd-stable.orig/src/basic/meson.build -+++ systemd-stable/src/basic/meson.build -@@ -317,6 +317,11 @@ foreach item : [['af', af_list_txt, +diff --git a/src/basic/meson.build b/src/basic/meson.build +index 1183ea83ad..aa5c958850 100644 +--- a/src/basic/meson.build ++++ b/src/basic/meson.build +@@ -322,6 +322,11 @@ foreach item : [['af', af_list_txt, 'af', ''], endforeach basic_sources += generated_gperf_headers @@ -50,10 +49,11 @@ Index: systemd-stable/src/basic/meson.build basic_gcrypt_sources = files( 'gcrypt-util.c', 'gcrypt-util.h') -Index: systemd-stable/src/basic/parse-printf-format.c -=================================================================== +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 -+++ systemd-stable/src/basic/parse-printf-format.c ++++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -328,10 +328,11 @@ Index: systemd-stable/src/basic/parse-printf-format.c + + return last; +} -Index: systemd-stable/src/basic/parse-printf-format.h -=================================================================== +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 -+++ systemd-stable/src/basic/parse-printf-format.h ++++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -390,12 +391,12 @@ Index: systemd-stable/src/basic/parse-printf-format.h +size_t parse_printf_format(const char *fmt, size_t n, int *types); + +#endif /* HAVE_PRINTF_H */ -Index: systemd-stable/src/basic/stdio-util.h -=================================================================== ---- systemd-stable.orig/src/basic/stdio-util.h -+++ systemd-stable/src/basic/stdio-util.h +diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h +index 6dc1e72312..cea76b36cf 100644 +--- a/src/basic/stdio-util.h ++++ b/src/basic/stdio-util.h @@ -1,13 +1,13 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include @@ -409,10 +410,10 @@ Index: systemd-stable/src/basic/stdio-util.h #define snprintf_ok(buf, len, fmt, ...) \ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) -Index: systemd-stable/src/journal/journal-send.c -=================================================================== ---- systemd-stable.orig/src/journal/journal-send.c -+++ systemd-stable/src/journal/journal-send.c +diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +index fd3fd7ef9c..e8e6ad555b 100644 +--- a/src/journal/journal-send.c ++++ b/src/journal/journal-send.c @@ -2,7 +2,6 @@ #include @@ -429,3 +430,6 @@ Index: systemd-stable/src/journal/journal-send.c #define SNDBUF_SIZE (8*1024*1024) +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch b/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch deleted file mode 100644 index d394444c1..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch +++ /dev/null @@ -1,58 +0,0 @@ -From dbe8b3ee45580defeefcac929b897c5437ffc50b Mon Sep 17 00:00:00 2001 -From: Scott Murray -Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH] Handle __cpu_mask usage - -Fixes errors: - -src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) -src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) - -__cpu_mask is an internal type of glibc's cpu_set implementation, not -part of the POSIX definition, which is problematic when building with -musl, which does not define a matching type. From inspection of musl's -sched.h, however, it is clear that the corresponding type would be -unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, -add a typedef to cpu-set-util.h defining __cpu_mask appropriately. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Scott Murray - ---- - src/shared/cpu-set-util.h | 2 ++ - src/test/test-sizeof.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h -index 27812dfd5923..0ab40731ea93 100644 ---- a/src/shared/cpu-set-util.h -+++ b/src/shared/cpu-set-util.h -@@ -6,6 +6,8 @@ - #include "macro.h" - #include "missing_syscall.h" - -+typedef unsigned long __cpu_mask; -+ - /* This wraps the libc interface with a variable to keep the allocated size. */ - typedef struct CPUSet { - cpu_set_t *set; -diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c -index c65062d2562c..8b6eefa9cdae 100644 ---- a/src/test/test-sizeof.c -+++ b/src/test/test-sizeof.c -@@ -1,6 +1,5 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ - --#include - #include - #include - #include -@@ -10,6 +9,7 @@ - #include - - #include "time-util.h" -+#include "cpu-set-util.h" - - /* Print information about various types. Useful when diagnosing - * gcc diagnostics on an unfamiliar architecture. */ 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 8e7a2fb6e..154e57b54 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch @@ -1,7 +1,7 @@ -From 7e771de87cf728a8678f1f28f391bba3589e2496 Mon Sep 17 00:00:00 2001 +From 5aeae0ea89f5af74ed5d95bed1d87a03b3801ff0 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 14:18:21 +0800 -Subject: [PATCH] src/basic/missing.h: check for missing strndupa +Subject: [PATCH 05/26] src/basic/missing.h: check for missing strndupa include missing.h for definition of strndupa @@ -15,7 +15,8 @@ Signed-off-by: Andrej Valek Signed-off-by: Scott Murray Signed-off-by: Alex Kiernan [rebased for systemd 244] - +[Rebased for v247] +Signed-off-by: Luca Boccassi --- meson.build | 1 + src/backlight/backlight.c | 1 + @@ -70,31 +71,31 @@ Signed-off-by: Alex Kiernan 50 files changed, 61 insertions(+) diff --git a/meson.build b/meson.build -index 9187439bdd..bea9935a91 100644 +index 6aa47fc755..0d0fa4963c 100644 --- a/meson.build +++ b/meson.build -@@ -527,6 +527,7 @@ foreach ident : [ - #include - #include +@@ -535,6 +535,7 @@ foreach ident : [ #include '''], + ['mallinfo', '''#include '''], + ['close_range', '''#include '''], + ['strndupa' , '''#include '''], ] have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c -index 3a644363e1..73946a829b 100644 +index d1b6a81e33..38b7008371 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c -@@ -17,6 +17,7 @@ +@@ -19,6 +19,7 @@ #include "string-util.h" #include "strv.h" #include "util.h" +#include "missing_stdlib.h" - static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { - const char *subsystem, *sysname, *value; + static int help(void) { + _cleanup_free_ char *link = NULL; diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index e94fcfad02..856a7068b0 100644 +index f28bf1866a..bb960f183c 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -38,6 +38,7 @@ @@ -106,7 +107,7 @@ index e94fcfad02..856a7068b0 100644 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 b8dc98915f..5049b37594 100644 +index a84863ff22..d4f5d57231 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -15,6 +15,7 @@ @@ -115,13 +116,13 @@ index b8dc98915f..5049b37594 100644 #include "utf8.h" +#include "missing_stdlib.h" - #define VALID_CHARS_ENV_NAME \ - DIGITS LETTERS \ + /* 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 c6fe203808..b7ef932d28 100644 +index d4054cf46a..b608863e45 100644 --- a/src/basic/log.c +++ b/src/basic/log.c -@@ -35,6 +35,7 @@ +@@ -36,6 +36,7 @@ #include "terminal-util.h" #include "time-util.h" #include "utf8.h" @@ -130,7 +131,7 @@ index c6fe203808..b7ef932d28 100644 #define SNDBUF_SIZE (8*1024*1024) diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h -index 188a8d4406..1e16ec287a 100644 +index 8c76f93eb2..9068bfb4f0 100644 --- a/src/basic/missing_stdlib.h +++ b/src/basic/missing_stdlib.h @@ -11,3 +11,15 @@ @@ -150,10 +151,10 @@ index 188a8d4406..1e16ec287a 100644 + }) +#endif diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c -index 6ebc2b95fd..88f4359bab 100644 +index f91f8f7a08..fb31596216 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "stat-util.h" #include "stdio-util.h" #include "user-util.h" @@ -162,10 +163,10 @@ index 6ebc2b95fd..88f4359bab 100644 int mkdir_safe_internal( const char *path, diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c -index 44f0438cf4..54b4133343 100644 +index 5d4dafe3a5..70749750d4 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c -@@ -19,6 +19,7 @@ +@@ -22,6 +22,7 @@ #include "stat-util.h" #include "string-util.h" #include "strv.h" @@ -174,7 +175,7 @@ index 44f0438cf4..54b4133343 100644 int parse_boolean(const char *v) { if (!v) diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c -index 52968dee34..2f4f7e3dcd 100644 +index 96b82170d0..71342b46af 100644 --- a/src/basic/path-lookup.c +++ b/src/basic/path-lookup.c @@ -15,6 +15,7 @@ @@ -186,7 +187,7 @@ index 52968dee34..2f4f7e3dcd 100644 int xdg_user_runtime_dir(char **ret, const char *suffix) { const char *e; diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c -index ba47ca5812..8baf728fde 100644 +index 0b6fb137bd..e8e8c7b270 100644 --- a/src/basic/proc-cmdline.c +++ b/src/basic/proc-cmdline.c @@ -15,6 +15,7 @@ @@ -198,7 +199,7 @@ index ba47ca5812..8baf728fde 100644 int proc_cmdline(char **ret) { const char *e; diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index 7aaf95bfce..da7e836f14 100644 +index ccab71f7d2..8f9eee8d36 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c @@ -11,6 +11,7 @@ @@ -210,7 +211,7 @@ index 7aaf95bfce..da7e836f14 100644 int procfs_tasks_get_limit(uint64_t *ret) { _cleanup_free_ char *value = NULL; diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c -index c94ee26bd9..14e35b4653 100644 +index 4989f4f37c..ca00bf99d8 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -27,6 +27,7 @@ @@ -222,10 +223,10 @@ index c94ee26bd9..14e35b4653 100644 #if HAVE_SELINUX DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); diff --git a/src/basic/time-util.c b/src/basic/time-util.c -index 15cc1b8851..02bb3f01f9 100644 +index 5318d6378d..23c2f77675 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c -@@ -26,6 +26,7 @@ +@@ -27,6 +27,7 @@ #include "string-util.h" #include "strv.h" #include "time-util.h" @@ -234,7 +235,7 @@ index 15cc1b8851..02bb3f01f9 100644 static clockid_t map_clock_id(clockid_t c) { diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c -index b96e1f927f..cba979baca 100644 +index cd34f88bb9..3a77b6f2ca 100644 --- a/src/boot/bless-boot.c +++ b/src/boot/bless-boot.c @@ -18,6 +18,7 @@ @@ -246,10 +247,10 @@ index b96e1f927f..cba979baca 100644 static char **arg_path = NULL; diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c -index b7d2e32639..fdbc1df95e 100644 +index 37c581fb22..e02789d689 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c -@@ -15,6 +15,7 @@ +@@ -16,6 +16,7 @@ #include "fileio.h" #include "limits-util.h" #include "path-util.h" @@ -258,7 +259,7 @@ index b7d2e32639..fdbc1df95e 100644 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 50f7ada8ce..5c760ee487 100644 +index abe009c395..0451e58d1c 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -41,6 +41,7 @@ @@ -270,7 +271,7 @@ index 50f7ada8ce..5c760ee487 100644 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 951450e53d..50d134e9a1 100644 +index d6223db305..3654c344ee 100644 --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c @@ -7,6 +7,7 @@ @@ -282,10 +283,10 @@ index 951450e53d..50d134e9a1 100644 int bus_property_get_triggered_unit( sd_bus *bus, diff --git a/src/core/execute.c b/src/core/execute.c -index 2a4840a3a9..d3f1e0e0f8 100644 +index c992b8d5d3..89632e0582 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -89,6 +89,7 @@ +@@ -96,6 +96,7 @@ #include "unit.h" #include "user-util.h" #include "utmp-wtmp.h" @@ -294,7 +295,7 @@ index 2a4840a3a9..d3f1e0e0f8 100644 #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 09ccd613e3..f4e64fa283 100644 +index a56f12f47f..6b8729ef67 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -11,6 +11,7 @@ @@ -306,7 +307,7 @@ index 09ccd613e3..f4e64fa283 100644 #if HAVE_KMOD #include "module-util.h" diff --git a/src/core/service.c b/src/core/service.c -index 00e61945ba..1ecab28354 100644 +index d7bdeb7cca..bfd483b2c0 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -41,6 +41,7 @@ @@ -318,7 +319,7 @@ index 00e61945ba..1ecab28354 100644 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 35885dfb47..bb9f0660a6 100644 +index 30c67ffe7c..595bc30726 100644 --- a/src/coredump/coredump-vacuum.c +++ b/src/coredump/coredump-vacuum.c @@ -16,6 +16,7 @@ @@ -330,7 +331,7 @@ index 35885dfb47..bb9f0660a6 100644 #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/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c -index 77dfdefd64..e21ecbeff8 100644 +index d2aa1815c2..a851aa203f 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -22,6 +22,7 @@ @@ -342,10 +343,10 @@ index 77dfdefd64..e21ecbeff8 100644 #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 8d4897b942..15476b3c83 100644 +index bcf2e01d5c..5394d1dc01 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c -@@ -69,6 +69,7 @@ +@@ -73,6 +73,7 @@ #include "unit-name.h" #include "user-util.h" #include "varlink.h" @@ -354,7 +355,7 @@ index 8d4897b942..15476b3c83 100644 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c -index 6fb0abb419..2d94d9938e 100644 +index cb1ab88ca5..7f35759540 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -40,6 +40,7 @@ @@ -366,7 +367,7 @@ index 6fb0abb419..2d94d9938e 100644 #define JOURNAL_FILES_MAX 7168 diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c -index 55e35cd902..0ed98f9224 100644 +index 86ff5bdfa2..3fd053a358 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -21,6 +21,7 @@ @@ -378,7 +379,7 @@ index 55e35cd902..0ed98f9224 100644 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 6abac8822c..c74c9cd7fa 100644 +index 275c4318a1..5ffee59d17 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -13,6 +13,7 @@ @@ -390,7 +391,7 @@ index 6abac8822c..c74c9cd7fa 100644 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 fc7e8e844a..7af4dd2712 100644 +index 4881fd0d32..c865f1133b 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -28,6 +28,7 @@ @@ -402,7 +403,7 @@ index fc7e8e844a..7af4dd2712 100644 #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 9de5e454a6..fe86c93c63 100644 +index b8d4dc8d95..a8bac2665d 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -41,6 +41,7 @@ @@ -414,7 +415,7 @@ index 9de5e454a6..fe86c93c63 100644 #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 8de0a859ee..58044b6ba9 100644 +index 8c6711797a..fac178823a 100644 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -14,6 +14,7 @@ @@ -426,7 +427,7 @@ index 8de0a859ee..58044b6ba9 100644 #define MAX_SIZE (2*1024*1024) diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c -index 233d081300..40a32b9700 100644 +index cb8153f4fe..d52a56019d 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -21,6 +21,7 @@ @@ -438,7 +439,7 @@ index 233d081300..40a32b9700 100644 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 16f4289585..6c5e438b36 100644 +index 8e7a94db55..b5c368c6d1 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -31,6 +31,7 @@ @@ -450,7 +451,7 @@ index 16f4289585..6c5e438b36 100644 #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 bed1e42697..e4847c2bee 100644 +index 2fa21a067a..2e9995aa62 100644 --- a/src/network/generator/network-generator.c +++ b/src/network/generator/network-generator.c @@ -13,6 +13,7 @@ @@ -462,7 +463,7 @@ index bed1e42697..e4847c2bee 100644 /* # .network diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c -index d341fa25aa..91646bc2c2 100644 +index 92bb5120ab..eeca905c75 100644 --- a/src/nspawn/nspawn-settings.c +++ b/src/nspawn/nspawn-settings.c @@ -16,6 +16,7 @@ @@ -474,7 +475,7 @@ index d341fa25aa..91646bc2c2 100644 Settings *settings_new(void) { Settings *s; diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c -index 5db0dcef76..681f8677e4 100644 +index 53f0492116..c71941fdd7 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -19,6 +19,7 @@ @@ -486,7 +487,7 @@ index 5db0dcef76..681f8677e4 100644 NSS_GETHOSTBYNAME_PROTOTYPES(mymachines); NSS_GETPW_PROTOTYPES(mymachines); diff --git a/src/portable/portable.c b/src/portable/portable.c -index 3a1367ec2b..f29336cb1e 100644 +index ed7eac0291..78986977f8 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -31,6 +31,7 @@ @@ -498,31 +499,31 @@ index 3a1367ec2b..f29336cb1e 100644 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile"); diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c -index 3072b984e5..c46ae374bf 100644 +index b479335769..212d0bed20 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c -@@ -36,6 +36,7 @@ - #include "strv.h" +@@ -37,6 +37,7 @@ #include "terminal-util.h" + #include "utf8.h" #include "verbs.h" +#include "missing_stdlib.h" 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 8ad4694046..da5082c02a 100644 +index 32f68d5e6a..bda1e1ef4f 100644 --- a/src/shared/bus-get-properties.c +++ b/src/shared/bus-get-properties.c -@@ -3,6 +3,7 @@ - #include "bus-get-properties.h" +@@ -4,6 +4,7 @@ #include "rlimit-util.h" + #include "stdio-util.h" #include "string-util.h" +#include "missing_stdlib.h" 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 b21fe39326..af2640005c 100644 +index 3e97be9671..2b8ca838f7 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c @@ -10,6 +10,7 @@ @@ -534,10 +535,10 @@ index b21fe39326..af2640005c 100644 struct CGroupInfo { char *cgroup_path; diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c -index f2652ed9a5..eb019fc89f 100644 +index 2bab2299fb..62afdc7973 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c -@@ -39,6 +39,7 @@ +@@ -44,6 +44,7 @@ #include "unit-def.h" #include "user-util.h" #include "utf8.h" @@ -546,22 +547,22 @@ index f2652ed9a5..eb019fc89f 100644 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 77c1c62182..5cd31f3c15 100644 +index fbda218b3b..aae0be75c6 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c -@@ -22,6 +22,7 @@ +@@ -21,6 +21,7 @@ + #include "path-util.h" #include "socket-util.h" #include "stdio-util.h" - /* #include "string-util.h" */ +#include "missing_stdlib.h" 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 b812665315..8e68f7f8fc 100644 +index 8bd1e3a6ac..f8d6eab9bd 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c -@@ -23,6 +23,7 @@ +@@ -17,6 +17,7 @@ #include "string-util.h" #include "strv.h" #include "utf8.h" @@ -570,7 +571,7 @@ index b812665315..8e68f7f8fc 100644 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 7c4fc7021d..3fbaf5a639 100644 +index e95b638f4d..a1bf15baa8 100644 --- a/src/shared/journal-importer.c +++ b/src/shared/journal-importer.c @@ -14,6 +14,7 @@ @@ -582,7 +583,7 @@ index 7c4fc7021d..3fbaf5a639 100644 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 899e894ab7..628854ac9c 100644 +index bf574d32a5..a09c79d2fb 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -41,6 +41,7 @@ @@ -594,10 +595,10 @@ index 899e894ab7..628854ac9c 100644 /* 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 e03be6d23b..50e3d1f75c 100644 +index f689d9f28f..aae3957c2f 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c -@@ -23,6 +23,7 @@ +@@ -26,6 +26,7 @@ #include "strv.h" #include "terminal-util.h" #include "util.h" @@ -606,7 +607,7 @@ index e03be6d23b..50e3d1f75c 100644 static pid_t pager_pid = 0; diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c -index 7cb7d8a477..8e7d7f9e7c 100644 +index 5d5bf7f21d..f1002ffa6c 100644 --- a/src/shared/uid-range.c +++ b/src/shared/uid-range.c @@ -9,6 +9,7 @@ @@ -618,7 +619,7 @@ index 7cb7d8a477..8e7d7f9e7c 100644 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 b461aead60..9941695ed9 100644 +index 4391d9f1f5..9b73cd0aeb 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -26,6 +26,7 @@ @@ -630,7 +631,7 @@ index b461aead60..9941695ed9 100644 #define BUFFER_SIZE (256 * 1024) diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c -index 52217429b1..70708dedf3 100644 +index f0f9679769..128fc164da 100644 --- a/src/test/test-hexdecoct.c +++ b/src/test/test-hexdecoct.c @@ -6,6 +6,7 @@ @@ -642,7 +643,7 @@ index 52217429b1..70708dedf3 100644 static void test_hexchar(void) { assert_se(hexchar(0xa) == 'a'); diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c -index 6c020ac0ed..10723ec46c 100644 +index 0da59e2c75..66da3741ee 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -22,6 +22,7 @@ @@ -654,7 +655,7 @@ index 6c020ac0ed..10723ec46c 100644 _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 e1c2baf7f2..62d4086802 100644 +index 5159d19a38..0ed5b65844 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -34,6 +34,7 @@ @@ -666,7 +667,7 @@ index e1c2baf7f2..62d4086802 100644 typedef struct Spawn { sd_device *device; diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index c36f032f66..36970813d8 100644 +index ef6a0c112c..422fc19127 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -30,6 +30,7 @@ @@ -677,3 +678,6 @@ index c36f032f66..36970813d8 100644 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch index abc438e4b..b689cf129 100644 --- a/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch +++ b/poky/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch @@ -1,7 +1,7 @@ -From 47818052121d135632f5e46c369e3e4706a0f9e0 Mon Sep 17 00:00:00 2001 +From d3ed0da271738fd0fc3d3e4d82d6f5810334b05e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 26 Oct 2017 22:10:42 -0700 -Subject: [PATCH] Include netinet/if_ether.h +Subject: [PATCH 06/26] Include netinet/if_ether.h Fixes /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' @@ -29,7 +29,8 @@ Signed-off-by: Khem Raj Signed-off-by: Chen Qi [rebased for systemd 243] Signed-off-by: Scott Murray - +[rebased for systemd 247] +Signed-off-by: Luca Boccassi --- src/libsystemd-network/sd-dhcp6-client.c | 1 - src/libsystemd/sd-netlink/netlink-types.c | 1 + @@ -52,10 +53,10 @@ Signed-off-by: Scott Murray src/udev/udev-builtin-net_setup_link.c | 1 + 19 files changed, 18 insertions(+), 4 deletions(-) -Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c -=================================================================== ---- systemd-stable.orig/src/libsystemd-network/sd-dhcp6-client.c -+++ systemd-stable/src/libsystemd-network/sd-dhcp6-client.c +diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c +index 30ac526fc9..126077e13c 100644 +--- a/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,6 @@ #include @@ -64,10 +65,10 @@ Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c #include #include "sd-dhcp6-client.h" -Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c -=================================================================== ---- systemd-stable.orig/src/libsystemd/sd-netlink/netlink-types.c -+++ systemd-stable/src/libsystemd/sd-netlink/netlink-types.c +diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c +index 6fb6c147d9..8eda02d202 100644 +--- a/src/libsystemd/sd-netlink/netlink-types.c ++++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -3,6 +3,7 @@ #include #include @@ -76,10 +77,10 @@ Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c #include #include #include -Index: systemd-stable/src/machine/machine-dbus.c -=================================================================== ---- systemd-stable.orig/src/machine/machine-dbus.c -+++ systemd-stable/src/machine/machine-dbus.c +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c +index bb67beb665..f5780f1aec 100644 +--- a/src/machine/machine-dbus.c ++++ b/src/machine/machine-dbus.c @@ -3,6 +3,7 @@ #include #include @@ -88,66 +89,66 @@ Index: systemd-stable/src/machine/machine-dbus.c /* When we include libgen.h because we need dirname() we immediately * undefine basename() since libgen.h defines it as a macro to the POSIX -Index: systemd-stable/src/network/netdev/bond.c -=================================================================== ---- systemd-stable.orig/src/network/netdev/bond.c -+++ systemd-stable/src/network/netdev/bond.c +diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c +index e27f36067b..8868f1da5d 100644 +--- a/src/network/netdev/bond.c ++++ b/src/network/netdev/bond.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include "alloc-util.h" #include "bond.h" #include "bond-util.h" -Index: systemd-stable/src/network/netdev/bridge.c -=================================================================== ---- systemd-stable.orig/src/network/netdev/bridge.c -+++ systemd-stable/src/network/netdev/bridge.c +diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c +index 1f59cd8b42..5fdbae7e99 100644 +--- a/src/network/netdev/bridge.c ++++ b/src/network/netdev/bridge.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include "bridge.h" -Index: systemd-stable/src/network/netdev/macsec.c -=================================================================== ---- systemd-stable.orig/src/network/netdev/macsec.c -+++ systemd-stable/src/network/netdev/macsec.c +diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c +index 82e71c3920..fbae86e216 100644 +--- a/src/network/netdev/macsec.c ++++ b/src/network/netdev/macsec.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include -Index: systemd-stable/src/network/netdev/netdev-gperf.gperf -=================================================================== ---- systemd-stable.orig/src/network/netdev/netdev-gperf.gperf -+++ systemd-stable/src/network/netdev/netdev-gperf.gperf +diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf +index 4e89761f2c..91251fa6ec 100644 +--- a/src/network/netdev/netdev-gperf.gperf ++++ b/src/network/netdev/netdev-gperf.gperf @@ -2,6 +2,7 @@ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") #endif +#include #include + #include "bareudp.h" #include "bond.h" - #include "bridge.h" -Index: systemd-stable/src/network/netdev/netdev.c -=================================================================== ---- systemd-stable.orig/src/network/netdev/netdev.c -+++ systemd-stable/src/network/netdev/netdev.c +diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c +index 9f390b5781..62aeafb1e4 100644 +--- a/src/network/netdev/netdev.c ++++ b/src/network/netdev/netdev.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include -Index: systemd-stable/src/network/networkd-brvlan.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-brvlan.c -+++ systemd-stable/src/network/networkd-brvlan.c +diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c +index e53c73c30c..9bf0771b84 100644 +--- a/src/network/networkd-brvlan.c ++++ b/src/network/networkd-brvlan.c @@ -4,6 +4,7 @@ ***/ @@ -156,24 +157,49 @@ Index: systemd-stable/src/network/networkd-brvlan.c #include #include -Index: systemd-stable/src/network/networkd-dhcp-common.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-dhcp-common.c -+++ systemd-stable/src/network/networkd-dhcp-common.c -@@ -5,6 +5,7 @@ - #include "escape.h" - #include "in-addr-util.h" +diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c +index c338c775a7..ab35d65c53 100644 +--- a/src/network/networkd-dhcp-common.c ++++ b/src/network/networkd-dhcp-common.c +@@ -1,7 +1,8 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + + #include +-#include ++#include ++#include + + #include "dhcp-internal.h" + #include "dhcp6-internal.h" +@@ -10,6 +10,7 @@ #include "networkd-dhcp-common.h" + #include "networkd-link.h" + #include "networkd-manager.h" +#include #include "networkd-network.h" #include "parse-util.h" - #include "string-table.h" -Index: systemd-stable/src/network/networkd-dhcp4.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-dhcp4.c -+++ systemd-stable/src/network/networkd-dhcp4.c + #include "socket-util.h" +diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c +index cf279c640d..bae541029b 100644 +--- a/src/network/networkd-dhcp-server.c ++++ b/src/network/networkd-dhcp-server.c +@@ -1,8 +1,8 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + + #include +-#include +-#include ++#include ++#include + + #include "sd-dhcp-server.h" + +diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c +index 02d33841b6..a30d8dd82c 100644 +--- a/src/network/networkd-dhcp4.c ++++ b/src/network/networkd-dhcp4.c @@ -1,9 +1,9 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include @@ -183,10 +209,10 @@ Index: systemd-stable/src/network/networkd-dhcp4.c #include "escape.h" #include "alloc-util.h" -Index: systemd-stable/src/network/networkd-dhcp6.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-dhcp6.c -+++ systemd-stable/src/network/networkd-dhcp6.c +diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c +index d4d4182ee5..635d08f7d5 100644 +--- a/src/network/networkd-dhcp6.c ++++ b/src/network/networkd-dhcp6.c @@ -3,9 +3,9 @@ Copyright © 2014 Intel Corporation. All rights reserved. ***/ @@ -198,12 +224,12 @@ Index: systemd-stable/src/network/networkd-dhcp6.c #include "sd-dhcp6-client.h" -Index: systemd-stable/src/network/networkd-link.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-link.c -+++ systemd-stable/src/network/networkd-link.c +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index ced18de425..07b43770de 100644 +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c @@ -1,8 +1,8 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include @@ -212,41 +238,59 @@ Index: systemd-stable/src/network/networkd-link.c #include #include -Index: systemd-stable/src/network/networkd-network.c -=================================================================== ---- systemd-stable.orig/src/network/networkd-network.c -+++ systemd-stable/src/network/networkd-network.c +diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c +index 3254641461..f0ada419fd 100644 +--- a/src/network/networkd-network.c ++++ b/src/network/networkd-network.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include -Index: systemd-stable/src/network/test-network-tables.c -=================================================================== ---- systemd-stable.orig/src/network/test-network-tables.c -+++ systemd-stable/src/network/test-network-tables.c -@@ -1,3 +1,4 @@ +diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c +index 10f30c1a7e..579885726c 100644 +--- a/src/network/networkd-route.c ++++ b/src/network/networkd-route.c +@@ -1,7 +1,10 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + + #include +-#include ++/* linux/ipv6_route.h conflicts with netinet/in.h so define manually */ ++#ifndef IP6_RT_PRIO_USER ++#define IP6_RT_PRIO_USER 1024 ++#endif + + #include "alloc-util.h" + #include "netlink-util.h" +diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c +index 475cac7527..9bae6eda16 100644 +--- a/src/network/test-network-tables.c ++++ b/src/network/test-network-tables.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include #include "bond.h" #include "dhcp6-internal.h" #include "dhcp6-protocol.h" -Index: systemd-stable/src/shared/ethtool-util.c -=================================================================== ---- systemd-stable.orig/src/shared/ethtool-util.c -+++ systemd-stable/src/shared/ethtool-util.c +diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c +index e6fab262f2..41dd3d7df7 100644 +--- a/src/shared/ethtool-util.c ++++ b/src/shared/ethtool-util.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include -Index: systemd-stable/src/shared/ethtool-util.h -=================================================================== ---- systemd-stable.orig/src/shared/ethtool-util.h -+++ systemd-stable/src/shared/ethtool-util.h +diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h +index f94b3e15bf..08a7e4fa09 100644 +--- a/src/shared/ethtool-util.h ++++ b/src/shared/ethtool-util.h @@ -3,6 +3,7 @@ #include @@ -255,25 +299,28 @@ Index: systemd-stable/src/shared/ethtool-util.h #include #include "conf-parser.h" -Index: systemd-stable/src/udev/net/link-config.c -=================================================================== ---- systemd-stable.orig/src/udev/net/link-config.c -+++ systemd-stable/src/udev/net/link-config.c +diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c +index d12fd0e299..636806dc23 100644 +--- a/src/udev/net/link-config.c ++++ b/src/udev/net/link-config.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include #include #include -Index: systemd-stable/src/udev/udev-builtin-net_setup_link.c -=================================================================== ---- systemd-stable.orig/src/udev/udev-builtin-net_setup_link.c -+++ systemd-stable/src/udev/udev-builtin-net_setup_link.c +diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c +index cb12b943fe..5a28c8b563 100644 +--- a/src/udev/udev-builtin-net_setup_link.c ++++ b/src/udev/udev-builtin-net_setup_link.c @@ -1,5 +1,6 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#include #include "device-util.h" #include "alloc-util.h" #include "link-config.h" +-- +2.27.0 + 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 new file mode 100644 index 000000000..686542158 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch @@ -0,0 +1,156 @@ +From 87a14dde13c8fa68239a4ab62914a093062b3b29 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 14:56:21 +0800 +Subject: [PATCH 07/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not + defined + +If the standard library doesn't provide brace +expansion users just won't get it. + +Dont use GNU GLOB extentions on non-glibc systems + +Conditionalize use of GLOB_ALTDIRFUNC + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + src/basic/glob-util.c | 12 ++++++++++++ + src/test/test-glob-util.c | 16 ++++++++++++++++ + 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 bc0278e57f..c973f82e54 100644 +--- a/src/basic/glob-util.c ++++ b/src/basic/glob-util.c +@@ -12,6 +12,12 @@ + #include "path-util.h" + #include "strv.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + static void closedir_wrapper(void* v) { + (void) closedir(v); + } +@@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) { + int safe_glob(const char *path, int flags, glob_t *pglob) { + int k; + ++#ifdef GLOB_ALTDIRFUNC + /* 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 flags, glob_t *pglob) { + pglob->gl_lstat = lstat; + if (!pglob->gl_stat) + pglob->gl_stat = stat; ++#endif + + errno = 0; ++#ifdef GLOB_ALTDIRFUNC + k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); ++#else ++ k = glob(path, flags, NULL, pglob); ++#endif + 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 df6444c433..79a692046e 100644 +--- a/src/test/test-glob-util.c ++++ b/src/test/test-glob-util.c +@@ -12,6 +12,12 @@ + #include "rm-rf.h" + #include "tmpfile-util.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + static void test_glob_exists(void) { + char name[] = "/tmp/test-glob_exists.XXXXXX"; + int fd = -1; +@@ -39,11 +45,13 @@ static void test_glob_no_dot(void) { + const char *fn; + + _cleanup_globfree_ glob_t g = { ++#ifdef GLOB_ALTDIRFUNC + .gl_closedir = closedir_wrapper, + .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, + .gl_opendir = (void *(*)(const char *)) opendir, + .gl_lstat = lstat, + .gl_stat = stat, ++#endif + }; + + int r; +@@ -51,11 +59,19 @@ static void test_glob_no_dot(void) { + assert_se(mkdtemp(template)); + + fn = strjoina(template, "/*"); ++#ifdef GLOB_ALTDIRFUNC + r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); ++#else ++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); ++#endif + assert_se(r == GLOB_NOMATCH); + + fn = strjoina(template, "/.*"); ++#ifdef GLOB_ALTDIRFUNC + r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); ++#else ++ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); ++#endif + 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 9906c70eef..5eb63b1d57 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -63,6 +63,12 @@ + #include "umask-util.h" + #include "user-util.h" + ++/* Don't fail if the standard library ++ * doesn't provide brace expansion */ ++#ifndef GLOB_BRACE ++#define GLOB_BRACE 0 ++#endif ++ + /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates + * them in the file system. This is intended to be used to create + * properly owned directories beneath /tmp, /var/tmp, /run, which are +@@ -1936,7 +1942,9 @@ finish: + + static int glob_item(Item *i, action_t action) { + _cleanup_globfree_ glob_t g = { ++#ifdef GLOB_ALTDIRFUNC + .gl_opendir = (void *(*)(const char *)) opendir_nomod, ++#endif + }; + int r = 0, k; + char **fn; +@@ -1956,7 +1964,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 = { ++#ifdef GLOB_ALTDIRFUNC + .gl_opendir = (void *(*)(const char *)) opendir_nomod, ++#endif + }; + int r = 0, k; + char **fn; +-- +2.27.0 + 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 deleted file mode 100644 index dd6ecebeb..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 77f98727f1d19a8fb327b55c92f1a9ee7b859e9f Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined - -If the standard library doesn't provide brace -expansion users just won't get it. - -Dont use GNU GLOB extentions on non-glibc systems - -Conditionalize use of GLOB_ALTDIRFUNC - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/glob-util.c | 12 ++++++++++++ - src/test/test-glob-util.c | 16 ++++++++++++++++ - src/tmpfiles/tmpfiles.c | 10 ++++++++++ - 3 files changed, 38 insertions(+) - -Index: systemd-stable/src/basic/glob-util.c -=================================================================== ---- systemd-stable.orig/src/basic/glob-util.c -+++ systemd-stable/src/basic/glob-util.c -@@ -12,6 +12,12 @@ - #include "path-util.h" - #include "strv.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - static void closedir_wrapper(void* v) { - (void) closedir(v); - } -@@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) { - int safe_glob(const char *path, int flags, glob_t *pglob) { - int k; - -+#ifdef GLOB_ALTDIRFUNC - /* 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 - pglob->gl_lstat = lstat; - if (!pglob->gl_stat) - pglob->gl_stat = stat; -+#endif - - errno = 0; -+#ifdef GLOB_ALTDIRFUNC - k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); -+#else -+ k = glob(path, flags, NULL, pglob); -+#endif - if (k == GLOB_NOMATCH) - return -ENOENT; - if (k == GLOB_NOSPACE) -Index: systemd-stable/src/test/test-glob-util.c -=================================================================== ---- systemd-stable.orig/src/test/test-glob-util.c -+++ systemd-stable/src/test/test-glob-util.c -@@ -12,6 +12,12 @@ - #include "rm-rf.h" - #include "tmpfile-util.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - static void test_glob_exists(void) { - char name[] = "/tmp/test-glob_exists.XXXXXX"; - int fd = -1; -@@ -39,11 +45,13 @@ static void test_glob_no_dot(void) { - const char *fn; - - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_closedir = closedir_wrapper, - .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, - .gl_opendir = (void *(*)(const char *)) opendir, - .gl_lstat = lstat, - .gl_stat = stat, -+#endif - }; - - int r; -@@ -51,11 +59,19 @@ static void test_glob_no_dot(void) { - assert_se(mkdtemp(template)); - - fn = strjoina(template, "/*"); -+#ifdef GLOB_ALTDIRFUNC - r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); -+#else -+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); -+#endif - assert_se(r == GLOB_NOMATCH); - - fn = strjoina(template, "/.*"); -+#ifdef GLOB_ALTDIRFUNC - r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); -+#else -+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); -+#endif - assert_se(r == GLOB_NOMATCH); - - (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); -Index: systemd-stable/src/tmpfiles/tmpfiles.c -=================================================================== ---- systemd-stable.orig/src/tmpfiles/tmpfiles.c -+++ systemd-stable/src/tmpfiles/tmpfiles.c -@@ -59,6 +59,12 @@ - #include "umask-util.h" - #include "user-util.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates - * them in the file system. This is intended to be used to create - * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1867,7 +1873,9 @@ finish: - - static int glob_item(Item *i, action_t action) { - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_opendir = (void *(*)(const char *)) opendir_nomod, -+#endif - }; - int r = 0, k; - char **fn; -@@ -1887,7 +1895,9 @@ static int glob_item(Item *i, action_t a - - static int glob_item_recursively(Item *i, fdaction_t action) { - _cleanup_globfree_ glob_t g = { -+#ifdef GLOB_ALTDIRFUNC - .gl_opendir = (void *(*)(const char *)) opendir_nomod, -+#endif - }; - int r = 0, k; - char **fn; 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 1f618932e..94cdc2efd 100644 --- a/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch @@ -1,7 +1,7 @@ -From 7c440cfc53aa52c9dc91c3a8c105bcf314c53af6 Mon Sep 17 00:00:00 2001 +From 8caea3fe87d55fd16de7d1b8266239fa954cb498 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH] add missing FTW_ macros for musl +Subject: [PATCH 08/26] add missing FTW_ macros for musl This is to avoid build failures like below for musl. @@ -10,13 +10,12 @@ This is to avoid build failures like below for musl. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi - --- src/basic/missing_type.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h -index c487e65e7bde..23602ebbd533 100644 +index aeaf6ad5ec..3df1084ef2 100644 --- a/src/basic/missing_type.h +++ b/src/basic/missing_type.h @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *); @@ -43,3 +42,6 @@ index c487e65e7bde..23602ebbd533 100644 +#ifndef FTW_SKIP_SIBLINGS +#define FTW_SKIP_SIBLINGS 3 +#endif +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch new file mode 100644 index 000000000..76cc75cf6 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch @@ -0,0 +1,45 @@ +From d8e4f0aa1760e4c7bb8476beecd35025c9cbb95a Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:03:47 +0800 +Subject: [PATCH 09/26] fix missing of __register_atfork for non-glibc builds + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/basic/process-util.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/basic/process-util.c b/src/basic/process-util.c +index 0851613fc9..4417101569 100644 +--- a/src/basic/process-util.c ++++ b/src/basic/process-util.c +@@ -18,6 +18,9 @@ + #if HAVE_VALGRIND_VALGRIND_H + #include + #endif ++#ifndef __GLIBC__ ++#include ++#endif + + #include "alloc-util.h" + #include "architecture.h" +@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) { + cached_pid = CACHED_PID_UNSET; + } + ++#ifdef __GLIBC__ + /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc + * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against + * libpthread, as it is part of glibc anyway. */ + extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); + extern void* __dso_handle _weak_; ++#else ++#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child) ++#endif + + pid_t getpid_cached(void) { + static bool installed = false; +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch new file mode 100644 index 000000000..aeacd865a --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch @@ -0,0 +1,97 @@ +From e45bb02174812e4935214f42a18725be320770d5 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:12:41 +0800 +Subject: [PATCH 10/26] Use uintmax_t for handling rlim_t + +PRIu{32,64} is not right format to represent rlim_t type +therefore use %ju and typecast the rlim_t variables to +uintmax_t. + +Fixes portablility errors like + +execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=] +| fprintf(f, "%s%s: " RLIM_FMT "\n", +| ^~~~~~~~ +| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); +| ~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] + +Signed-off-by: Khem Raj +[Rebased for v241] +Signed-off-by: Chen Qi +--- + src/basic/format-util.h | 8 +------- + src/basic/rlimit-util.c | 10 +++++----- + src/core/execute.c | 4 ++-- + 3 files changed, 8 insertions(+), 14 deletions(-) + +diff --git a/src/basic/format-util.h b/src/basic/format-util.h +index b7e18768e3..3195ab205d 100644 +--- a/src/basic/format-util.h ++++ b/src/basic/format-util.h +@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); + # define PRI_TIMEX "li" + #endif + +-#if SIZEOF_RLIM_T == 8 +-# define RLIM_FMT "%" PRIu64 +-#elif SIZEOF_RLIM_T == 4 +-# define RLIM_FMT "%" PRIu32 +-#else +-# error Unknown rlim_t size +-#endif ++#define RLIM_FMT "%ju" + + #if SIZEOF_DEV_T == 8 + # define DEV_FMT "%" PRIu64 +diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c +index 880976312c..9e1b61cd4a 100644 +--- a/src/basic/rlimit-util.c ++++ b/src/basic/rlimit-util.c +@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { + if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) + s = strdup("infinity"); + else if (rl->rlim_cur >= RLIM_INFINITY) +- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); ++ (void) asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); + else if (rl->rlim_max >= RLIM_INFINITY) +- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); ++ (void) asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); + else if (rl->rlim_cur == rl->rlim_max) +- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur); ++ (void) asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); + else +- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); ++ (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); + + if (!s) + return -ENOMEM; +@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { + + rl.rlim_cur = FD_SETSIZE; + if (setrlimit(RLIMIT_NOFILE, &rl) < 0) +- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); ++ return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); + + return 1; + } +diff --git a/src/core/execute.c b/src/core/execute.c +index 89632e0582..335283776c 100644 +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -5288,9 +5288,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { + for (unsigned i = 0; i < RLIM_NLIMITS; i++) + if (c->rlimit[i]) { + fprintf(f, "%sLimit%s: " RLIM_FMT "\n", +- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); ++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max); + fprintf(f, "%sLimit%sSoft: " RLIM_FMT "\n", +- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur); ++ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur); + } + + if (c->ioprio_set) { +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch deleted file mode 100644 index 15055161f..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ /dev/null @@ -1,43 +0,0 @@ -From eed7427db98cc01db7e9b3479655d68b044bc85b Mon Sep 17 00:00:00 2001 -From: Chen Qi -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] - -Signed-off-by: Chen Qi - ---- - src/basic/process-util.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -Index: systemd-stable/src/basic/process-util.c -=================================================================== ---- systemd-stable.orig/src/basic/process-util.c -+++ systemd-stable/src/basic/process-util.c -@@ -18,6 +18,9 @@ - #if HAVE_VALGRIND_VALGRIND_H - #include - #endif -+#ifndef __GLIBC__ -+#include -+#endif - - #include "alloc-util.h" - #include "architecture.h" -@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) { - cached_pid = CACHED_PID_UNSET; - } - -+#ifdef __GLIBC__ - /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc - * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against - * libpthread, as it is part of glibc anyway. */ - extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); - extern void* __dso_handle _weak_; -+#else -+#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child) -+#endif - - pid_t getpid_cached(void) { - static bool installed = false; diff --git a/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch deleted file mode 100644 index a6fcd2f5d..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 4aa91347ae975051dbe4dd2f98a1f4f459f2604f Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH] Use uintmax_t for handling rlim_t - -PRIu{32,64} is not right format to represent rlim_t type -therefore use %ju and typecast the rlim_t variables to -uintmax_t. - -Fixes portablility errors like - -execute.c:3446:36: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'rlim_t {aka long long unsigned int}' [-Werror=format=] -| fprintf(f, "%s%s: " RLIM_FMT "\n", -| ^~~~~~~~ -| prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); -| ~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] - -Signed-off-by: Khem Raj -[Rebased for v241] -Signed-off-by: Chen Qi - ---- - src/basic/format-util.h | 8 +------- - src/basic/rlimit-util.c | 10 +++++----- - src/core/execute.c | 4 ++-- - 3 files changed, 8 insertions(+), 14 deletions(-) - -Index: systemd-stable/src/basic/format-util.h -=================================================================== ---- systemd-stable.orig/src/basic/format-util.h -+++ systemd-stable/src/basic/format-util.h -@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 - # define PRI_TIMEX "li" - #endif - --#if SIZEOF_RLIM_T == 8 --# define RLIM_FMT "%" PRIu64 --#elif SIZEOF_RLIM_T == 4 --# define RLIM_FMT "%" PRIu32 --#else --# error Unknown rlim_t size --#endif -+#define RLIM_FMT "%ju" - - #if SIZEOF_DEV_T == 8 - # define DEV_FMT "%" PRIu64 -Index: systemd-stable/src/basic/rlimit-util.c -=================================================================== ---- systemd-stable.orig/src/basic/rlimit-util.c -+++ systemd-stable/src/basic/rlimit-util.c -@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *r - if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) - s = strdup("infinity"); - else if (rl->rlim_cur >= RLIM_INFINITY) -- (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); -+ (void) asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); - else if (rl->rlim_max >= RLIM_INFINITY) -- (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); -+ (void) asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); - else if (rl->rlim_cur == rl->rlim_max) -- (void) asprintf(&s, RLIM_FMT, rl->rlim_cur); -+ (void) asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); - else -- (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); -+ (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); - - if (!s) - return -ENOMEM; -@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { - - rl.rlim_cur = FD_SETSIZE; - if (setrlimit(RLIMIT_NOFILE, &rl) < 0) -- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); -+ return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); - - return 1; - } -Index: systemd-stable/src/core/execute.c -=================================================================== ---- systemd-stable.orig/src/core/execute.c -+++ systemd-stable/src/core/execute.c -@@ -4686,9 +4686,9 @@ void exec_context_dump(const ExecContext - for (i = 0; i < RLIM_NLIMITS; i++) - if (c->rlimit[i]) { - fprintf(f, "%sLimit%s: " RLIM_FMT "\n", -- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); -+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_max); - fprintf(f, "%sLimit%sSoft: " RLIM_FMT "\n", -- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_cur); -+ prefix, rlimit_to_string(i), (uintmax_t)c->rlimit[i]->rlim_cur); - } - - if (c->ioprio_set) { 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 new file mode 100644 index 000000000..6d7fdbcb6 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch @@ -0,0 +1,42 @@ +From d1db531ddd3bbf94d5e764b7917bcc8684ff6357 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Wed, 28 Feb 2018 21:25:22 -0800 +Subject: [PATCH 11/26] test-sizeof.c: Disable tests for missing typedefs in + musl + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +Signed-off-by: Chen Qi +--- + 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 3c9dc180fa..e1a59d408c 100644 +--- a/src/test/test-sizeof.c ++++ b/src/test/test-sizeof.c +@@ -55,8 +55,10 @@ int main(void) { + info(unsigned); + info(long unsigned); + info(long long unsigned); ++#ifdef __GLIBC__ + info(__syscall_ulong_t); + info(__syscall_slong_t); ++#endif + + info(float); + info(double); +@@ -74,7 +76,9 @@ int main(void) { + info(ssize_t); + info(time_t); + info(usec_t); ++#ifdef __GLIBC__ + info(__time_t); ++#endif + info(pid_t); + info(uid_t); + info(gid_t); +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch new file mode 100644 index 000000000..c15b6e7d8 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -0,0 +1,99 @@ +From 03e89da266edf70121a19ffc32a78cc3b97585ef Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Tue, 10 Oct 2017 14:33:30 -0700 +Subject: [PATCH 12/26] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() + +Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right +thing to do and it's not portable (not supported by musl). See: + + http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html + http://www.openwall.com/lists/musl/2015/02/05/2 + +Note that laccess() is never passing AT_EACCESS so a lot of the +discussion in the links above doesn't apply. Note also that +(currently) all systemd callers of laccess() pass mode as F_OK, so +only check for existence of a file, not access permissions. +Therefore, in this case, the only distiction between faccessat() +with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour +for broken symlinks; laccess() on a broken symlink will succeed with +(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). + +The laccess() macros was added to systemd some time ago and it's not +clear if or why it needs to return success for broken symlinks. Maybe +just historical and not actually necessary or desired behaviour? + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Andre McCurdy +--- + src/basic/fs-util.h | 22 +++++++++++++++++++++- + src/shared/base-filesystem.c | 6 +++--- + 2 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h +index 5dc8853eac..0491b3dae2 100644 +--- a/src/basic/fs-util.h ++++ b/src/basic/fs-util.h +@@ -43,7 +43,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); + int fd_warn_permissions(const char *path, int fd); + int stat_warn_permissions(const char *path, const struct stat *st); + +-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) ++/* ++ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to ++ do and it's not portable (not supported by musl). See: ++ ++ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html ++ http://www.openwall.com/lists/musl/2015/02/05/2 ++ ++ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in ++ the links above doesn't apply. Note also that (currently) all systemd callers ++ of laccess() pass mode as F_OK, so only check for existence of a file, not ++ access permissions. Therefore, in this case, the only distiction between ++ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the ++ behaviour for broken symlinks; laccess() on a broken symlink will succeed ++ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). ++ ++ The laccess() macros was added to systemd some time ago and it's not clear if ++ or why it needs to return success for broken symlinks. Maybe just historical ++ and not actually necessary or desired behaviour? ++*/ ++ ++#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0) + + 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 1d05409086..1ed06c31ab 100644 +--- a/src/shared/base-filesystem.c ++++ b/src/shared/base-filesystem.c +@@ -54,7 +54,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 (i = 0; i < ELEMENTSOF(table); i ++) { +- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) ++ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) + continue; + + if (table[i].target) { +@@ -62,7 +62,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) { +- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0) ++ if (faccessat(fd, s, F_OK, 0) < 0) + continue; + + /* check if a specific file exists at the target path */ +@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { + if (!p) + return log_oom(); + +- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0) ++ if (faccessat(fd, p, F_OK, 0) < 0) + continue; + } + +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch new file mode 100644 index 000000000..89736bcfd --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -0,0 +1,35 @@ +From dd134880e9a16595ab473934577e873c748e9c7a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 27 May 2018 08:36:44 -0700 +Subject: [PATCH 13/26] Define glibc compatible basename() for non-glibc + systems + +Fixes builds with musl, even though systemd is adamant about +using non-posix basename implementation, we have a way out + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +--- + src/machine/machine-dbus.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c +index f5780f1aec..aec5825b3e 100644 +--- a/src/machine/machine-dbus.c ++++ b/src/machine/machine-dbus.c +@@ -11,6 +11,11 @@ + #include + #undef basename + ++#if !defined(__GLIBC__) ++#include ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif ++ + #include "alloc-util.h" + #include "bus-common-errors.h" + #include "bus-get-properties.h" +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch new file mode 100644 index 000000000..e95d2ae07 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -0,0 +1,41 @@ +From 55af446156da863b5b36a1109845858956a4c274 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Wed, 4 Jul 2018 15:00:44 +0800 +Subject: [PATCH 14/26] Do not disable buffering when writing to oom_score_adj + +On musl, disabling buffering when writing to oom_score_adj will +cause the following error. + + Failed to adjust OOM setting: Invalid argument + +This error appears for systemd-udevd.service and dbus.service. +This is because kernel receives '-' instead of the whole '-900' +if buffering is disabled. + +This is libc implementation specific, as glibc does not have this issue. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + src/basic/process-util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/process-util.c b/src/basic/process-util.c +index 4417101569..556dab8ebf 100644 +--- a/src/basic/process-util.c ++++ b/src/basic/process-util.c +@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) { + sprintf(t, "%i", value); + + return write_string_file("/proc/self/oom_score_adj", t, +- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); ++ WRITE_STRING_FILE_VERIFY_ON_FAILURE); + } + + int pidfd_get_pid(int fd, pid_t *ret) { +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/poky/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch deleted file mode 100644 index 049096d2a..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 62fac5e3ff0fccd329cdc49605258b6d0e573a3e Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 28 Feb 2018 21:25:22 -0800 -Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj -Signed-off-by: Chen Qi - ---- - 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 1020e0cb3153..c65062d2562c 100644 ---- a/src/test/test-sizeof.c -+++ b/src/test/test-sizeof.c -@@ -44,8 +44,10 @@ int main(void) { - info(unsigned); - info(long unsigned); - info(long long unsigned); -+#ifdef __GLIBC__ - info(__syscall_ulong_t); - info(__syscall_slong_t); -+#endif - - info(float); - info(double); -@@ -63,7 +65,9 @@ int main(void) { - info(ssize_t); - info(time_t); - info(usec_t); -+#ifdef __GLIBC__ - info(__time_t); -+#endif - info(pid_t); - info(uid_t); - info(gid_t); 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 new file mode 100644 index 000000000..5cdcf84dc --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -0,0 +1,62 @@ +From e382845aed90cfe4496a8351d57d4466dd2e9a9c Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Tue, 10 Jul 2018 15:40:17 +0800 +Subject: [PATCH 15/26] distinguish XSI-compliant strerror_r from GNU-specifi + strerror_r + +XSI-compliant strerror_r and GNU-specifi strerror_r are different. + + int strerror_r(int errnum, char *buf, size_t buflen); + /* XSI-compliant */ + + char *strerror_r(int errnum, char *buf, size_t buflen); + /* GNU-specific */ + +We need to distinguish between them. Otherwise, we'll get an int value +assigned to (char *) variable, resulting in segment fault. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/journal/journal-send.c | 5 +++++ + src/libsystemd/sd-bus/bus-error.c | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c +index e8e6ad555b..8ca5271d02 100644 +--- a/src/journal/journal-send.c ++++ b/src/journal/journal-send.c +@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove + char* j; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++ j = buffer + 8 + k; ++#else + j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); ++#endif + if (errno == 0) { + char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; + +diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c +index 8da2024a50..9605a9b869 100644 +--- a/src/libsystemd/sd-bus/bus-error.c ++++ b/src/libsystemd/sd-bus/bus-error.c +@@ -392,7 +392,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { + return; + + errno = 0; ++#ifndef __GLIBC__ ++ strerror_r(error, m, k); ++ x = m; ++#else + x = strerror_r(error, m, k); ++#endif + if (errno == ERANGE || strlen(x) >= k - 1) { + free(m); + k *= 2; +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch deleted file mode 100644 index 0a7594c06..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ /dev/null @@ -1,97 +0,0 @@ -From e6f871078d8d6f076c84f908fa57af15417ab87d Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() - -Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right -thing to do and it's not portable (not supported by musl). See: - - http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html - http://www.openwall.com/lists/musl/2015/02/05/2 - -Note that laccess() is never passing AT_EACCESS so a lot of the -discussion in the links above doesn't apply. Note also that -(currently) all systemd callers of laccess() pass mode as F_OK, so -only check for existence of a file, not access permissions. -Therefore, in this case, the only distiction between faccessat() -with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour -for broken symlinks; laccess() on a broken symlink will succeed with -(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). - -The laccess() macros was added to systemd some time ago and it's not -clear if or why it needs to return success for broken symlinks. Maybe -just historical and not actually necessary or desired behaviour? - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Andre McCurdy - ---- - src/basic/fs-util.h | 22 +++++++++++++++++++++- - src/shared/base-filesystem.c | 6 +++--- - 2 files changed, 24 insertions(+), 4 deletions(-) - -Index: systemd-stable/src/basic/fs-util.h -=================================================================== ---- systemd-stable.orig/src/basic/fs-util.h -+++ systemd-stable/src/basic/fs-util.h -@@ -42,7 +42,27 @@ int fchmod_opath(int fd, mode_t m); - int fd_warn_permissions(const char *path, int fd); - int stat_warn_permissions(const char *path, const struct stat *st); - --#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) -+/* -+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to -+ do and it's not portable (not supported by musl). See: -+ -+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html -+ http://www.openwall.com/lists/musl/2015/02/05/2 -+ -+ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in -+ the links above doesn't apply. Note also that (currently) all systemd callers -+ of laccess() pass mode as F_OK, so only check for existence of a file, not -+ access permissions. Therefore, in this case, the only distiction between -+ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the -+ behaviour for broken symlinks; laccess() on a broken symlink will succeed -+ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). -+ -+ The laccess() macros was added to systemd some time ago and it's not clear if -+ or why it needs to return success for broken symlinks. Maybe just historical -+ and not actually necessary or desired behaviour? -+*/ -+ -+#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0) - - 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); -Index: systemd-stable/src/shared/base-filesystem.c -=================================================================== ---- systemd-stable.orig/src/shared/base-filesystem.c -+++ systemd-stable/src/shared/base-filesystem.c -@@ -54,7 +54,7 @@ int base_filesystem_create(const char *r - return log_error_errno(errno, "Failed to open root file system: %m"); - - for (i = 0; i < ELEMENTSOF(table); i ++) { -- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) -+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) - continue; - - if (table[i].target) { -@@ -62,7 +62,7 @@ int base_filesystem_create(const char *r - - /* check if one of the targets exists */ - NULSTR_FOREACH(s, table[i].target) { -- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0) -+ if (faccessat(fd, s, F_OK, 0) < 0) - continue; - - /* check if a specific file exists at the target path */ -@@ -73,7 +73,7 @@ int base_filesystem_create(const char *r - if (!p) - return log_oom(); - -- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0) -+ if (faccessat(fd, p, F_OK, 0) < 0) - continue; - } - diff --git a/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch deleted file mode 100644 index 67d504191..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ec335ef3bb903a7eaf054103cc51411e71e6448c Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH] Define glibc compatible basename() for non-glibc systems - -Fixes builds with musl, even though systemd is adamant about -using non-posix basename implementation, we have a way out - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj - ---- - src/machine/machine-dbus.c | 5 +++++ - 1 file changed, 5 insertions(+) - -Index: systemd-stable/src/machine/machine-dbus.c -=================================================================== ---- systemd-stable.orig/src/machine/machine-dbus.c -+++ systemd-stable/src/machine/machine-dbus.c -@@ -11,6 +11,11 @@ - #include - #undef basename - -+#if !defined(__GLIBC__) -+#include -+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) -+#endif -+ - #include "alloc-util.h" - #include "bus-common-errors.h" - #include "bus-get-properties.h" 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 new file mode 100644 index 000000000..9a125de63 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch @@ -0,0 +1,35 @@ +From 0c7af5f288231a8c0545e169e01ba5ee173cafe7 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:18:00 +0800 +Subject: [PATCH 16/26] 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 +[Rebased for v241] +Signed-off-by: Chen Qi +--- + 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 9605a9b869..38b6cf90c3 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 */ +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch deleted file mode 100644 index 3d456ec83..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ /dev/null @@ -1,39 +0,0 @@ -From bb28a9c870bb47dcdb1ccebaa8e3a5a86730a244 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH] Do not disable buffering when writing to oom_score_adj - -On musl, disabling buffering when writing to oom_score_adj will -cause the following error. - - Failed to adjust OOM setting: Invalid argument - -This error appears for systemd-udevd.service and dbus.service. -This is because kernel receives '-' instead of the whole '-900' -if buffering is disabled. - -This is libc implementation specific, as glibc does not have this issue. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi -[rebased for systemd 243] -Signed-off-by: Scott Murray - ---- - src/basic/process-util.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-stable/src/basic/process-util.c -=================================================================== ---- systemd-stable.orig/src/basic/process-util.c -+++ systemd-stable/src/basic/process-util.c -@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) { - sprintf(t, "%i", value); - - return write_string_file("/proc/self/oom_score_adj", t, -- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); -+ WRITE_STRING_FILE_VERIFY_ON_FAILURE); - } - - int pidfd_get_pid(int fd, pid_t *ret) { 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 new file mode 100644 index 000000000..31747c6b4 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch @@ -0,0 +1,30 @@ +From 32dd7a47b87793cd836ab4bb776d1524f24c2d58 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:27:54 +0800 +Subject: [PATCH 17/26] 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 +--- + 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 +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch new file mode 100644 index 000000000..56d361a21 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -0,0 +1,32 @@ +From bfc3416edeb69082ac9b9c9e844f12d7b45bb006 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 15:44:54 +0800 +Subject: [PATCH 18/26] avoid redefinition of prctl_mm_map structure + +Fix the following compile failure: +error: redefinition of 'struct prctl_mm_map' + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + src/basic/missing_prctl.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h +index ab851306ba..5547cad875 100644 +--- a/src/basic/missing_prctl.h ++++ b/src/basic/missing_prctl.h +@@ -1,7 +1,9 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + #pragma once + ++#ifdef __GLIBC__ + #include ++#endif + + /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ + #ifndef PR_CAP_AMBIENT +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch deleted file mode 100644 index 48fd007e1..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 4938705454cf46cfe8deac8ce457d5d2432cbead Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi - strerror_r - -XSI-compliant strerror_r and GNU-specifi strerror_r are different. - - int strerror_r(int errnum, char *buf, size_t buflen); - /* XSI-compliant */ - - char *strerror_r(int errnum, char *buf, size_t buflen); - /* GNU-specific */ - -We need to distinguish between them. Otherwise, we'll get an int value -assigned to (char *) variable, resulting in segment fault. - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/journal/journal-send.c | 5 +++++ - src/libsystemd/sd-bus/bus-error.c | 5 +++++ - 2 files changed, 10 insertions(+) - -Index: systemd-stable/src/journal/journal-send.c -=================================================================== ---- systemd-stable.orig/src/journal/journal-send.c -+++ systemd-stable/src/journal/journal-send.c -@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co - char* j; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+ j = buffer + 8 + k; -+#else - j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k); -+#endif - if (errno == 0) { - char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; - -Index: systemd-stable/src/libsystemd/sd-bus/bus-error.c -=================================================================== ---- systemd-stable.orig/src/libsystemd/sd-bus/bus-error.c -+++ systemd-stable/src/libsystemd/sd-bus/bus-error.c -@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_er - return; - - errno = 0; -+#ifndef __GLIBC__ -+ strerror_r(error, m, k); -+ x = m; -+#else - x = strerror_r(error, m, k); -+#endif - if (errno == ERANGE || strlen(x) >= k - 1) { - free(m); - k *= 2; 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 new file mode 100644 index 000000000..6ca196489 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch @@ -0,0 +1,26 @@ +From e427f03de2c56e868bb0f24aa231315b2dae1b71 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan +Date: Fri, 7 Aug 2020 15:19:27 +0000 +Subject: [PATCH 19/26] Handle missing LOCK_EX + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Alex Kiernan +--- + src/partition/makefs.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/partition/makefs.c b/src/partition/makefs.c +index fd924d2231..b97580fdcc 100644 +--- a/src/partition/makefs.c ++++ b/src/partition/makefs.c +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include "alloc-util.h" + #include "blockdev-util.h" +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/poky/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch deleted file mode 100644 index 3b8064677..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1c4c73a7cc0fb59eb68ab70699f7f51af5c163b2 Mon Sep 17 00:00:00 2001 -From: Chen Qi -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 -[Rebased for v241] -Signed-off-by: Chen Qi - ---- - 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 28a5159c4480..962a4de10c56 100644 ---- a/src/libsystemd/sd-bus/bus-error.c -+++ b/src/libsystemd/sd-bus/bus-error.c -@@ -54,8 +54,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/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 new file mode 100644 index 000000000..f74de4384 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch @@ -0,0 +1,40 @@ +From 9abbc5e69e21aef0d4d4567e69302fa660b76c53 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan +Date: Fri, 7 Aug 2020 15:20:17 +0000 +Subject: [PATCH 20/26] 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 +--- + src/nspawn/nspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 0842731c18..3528b7ff14 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -5084,7 +5084,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.un, SOCKADDR_UN_LEN(sa.un)) < 0) { ++ if (connect(fd, (struct sockaddr *)&sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { + + if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) + return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch b/poky/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch deleted file mode 100644 index db4041bbb..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0020-missing_type.h-add-__compar_d_fn_t-definition.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8303d49cabaf3ab8890ba1d266972c721dfe6ee8 Mon Sep 17 00:00:00 2001 -From: Chen Qi -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 - ---- - 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 23602ebbd533..917d314a81bf 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/0021-Handle-missing-LOCK_EX.patch b/poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch deleted file mode 100644 index 67d9162c0..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 190854c2114dc6e74c8859dc251e3737e3c0f353 Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -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 ---- - src/partition/makefs.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/partition/makefs.c b/src/partition/makefs.c -index 97f50c9033..7f55acd229 100644 ---- a/src/partition/makefs.c -+++ b/src/partition/makefs.c -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - - #include "alloc-util.h" - #include "blockdev-util.h" diff --git a/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch b/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch deleted file mode 100644 index 7dacc3683..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6364ff5534678c158a7fb8d4e50d0a6ce72c1ad8 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH] avoid redefinition of prctl_mm_map structure - -Fix the following compile failure: -error: redefinition of 'struct prctl_mm_map' - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - src/basic/missing_prctl.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h -index f80cd17f346b..47e489354053 100644 ---- a/src/basic/missing_prctl.h -+++ b/src/basic/missing_prctl.h -@@ -1,7 +1,9 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ - #pragma once - -+#ifdef __GLIBC__ - #include -+#endif - - /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ - #ifndef PR_CAP_AMBIENT 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 new file mode 100644 index 000000000..fa6652a5b --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch @@ -0,0 +1,33 @@ +From 1f5bc54bed0b365e7e448c26f6c792dbe8b3b198 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 25 Feb 2019 16:53:06 +0800 +Subject: [PATCH 21/26] test-json.c: define M_PIl + +Fix the following compile failure: +src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Chen Qi +--- + 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 1d4b11945e..572c8cf9d0 100644 +--- a/src/test/test-json.c ++++ b/src/test/test-json.c +@@ -13,6 +13,10 @@ + #include "tests.h" + #include "util.h" + ++#ifndef M_PIl ++#define M_PIl 3.141592653589793238462643383279502884L ++#endif ++ + static void test_tokenizer(const char *data, ...) { + unsigned line = 0, column = 0; + void *state = NULL; +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch deleted file mode 100644 index d57ca1fd3..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 328c39fae2631deb5737dd56f46159dd6b4cdbed Mon Sep 17 00:00:00 2001 -From: Alex Kiernan -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 ---- - src/nspawn/nspawn.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 0450c9f795..7305db04ef 100644 ---- a/src/nspawn/nspawn.c -+++ b/src/nspawn/nspawn.c -@@ -4890,7 +4890,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.un, SOCKADDR_UN_LEN(sa.un)) < 0) { -+ if (connect(fd, (struct sockaddr *)&sa.un, 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/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 new file mode 100644 index 000000000..675fd20f1 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch @@ -0,0 +1,413 @@ +From 564dba5ad0cd884e3f69fa19ca64095413578ea5 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Fri, 1 Mar 2019 15:22:15 +0800 +Subject: [PATCH 22/26] do not disable buffer in writing files + +Do not disable buffer in writing files, otherwise we get +failure at boot for musl like below. + + [!!!!!!] Failed to allocate manager object. + +And there will be other failures, critical or not critical. +This is specific to musl. + +Upstream-Status: Inappropriate [musl] + +Signed-off-by: Chen Qi +[Rebased for v242] +Signed-off-by: Andrej Valek +[rebased for systemd 243] +Signed-off-by: Scott Murray +--- + src/basic/cgroup-util.c | 10 +++++----- + src/basic/procfs-util.c | 4 ++-- + src/basic/smack-util.c | 2 +- + src/basic/util.c | 2 +- + src/binfmt/binfmt.c | 6 +++--- + src/core/main.c | 4 ++-- + src/core/smack-setup.c | 8 ++++---- + src/hibernate-resume/hibernate-resume.c | 2 +- + src/libsystemd/sd-device/sd-device.c | 2 +- + src/login/logind-dbus.c | 2 +- + src/nspawn/nspawn-cgroup.c | 2 +- + src/nspawn/nspawn.c | 6 +++--- + src/shared/cgroup-setup.c | 4 ++-- + src/shared/sysctl-util.c | 2 +- + src/sleep/sleep.c | 8 ++++---- + src/udev/udevadm-trigger.c | 2 +- + src/udev/udevd.c | 2 +- + src/vconsole/vconsole-setup.c | 2 +- + 18 files changed, 35 insertions(+), 35 deletions(-) + +diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c +index bb960f183c..cb804c5f4b 100644 +--- a/src/basic/cgroup-util.c ++++ b/src/basic/cgroup-util.c +@@ -759,7 +759,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { + + sc = strstrip(contents); + if (isempty(sc)) { +- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, agent, 0); + if (r < 0) + return r; + } else if (!path_equal(sc, agent)) +@@ -777,7 +777,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { + + sc = strstrip(contents); + if (streq(sc, "0")) { +- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "1", 0); + if (r < 0) + return r; + +@@ -804,7 +804,7 @@ int cg_uninstall_release_agent(const char *controller) { + if (r < 0) + return r; + +- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "0", 0); + if (r < 0) + return r; + +@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const char *controller) { + if (r < 0) + return r; + +- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, "", 0); + if (r < 0) + return r; + +@@ -1646,7 +1646,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri + if (r < 0) + return r; + +- return write_string_file(p, value, WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, 0); + } + + int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { +diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c +index 8f9eee8d36..480f8cc0b4 100644 +--- a/src/basic/procfs-util.c ++++ b/src/basic/procfs-util.c +@@ -86,13 +86,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 */ +- r = write_string_file("/proc/sys/kernel/pid_max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/pid_max", buffer, 0); + if (r < 0) + return r; + } + + sprintf(buffer, "%" PRIu64, limit); +- r = write_string_file("/proc/sys/kernel/threads-max", buffer, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/threads-max", buffer, 0); + if (r < 0) { + uint64_t threads_max; + +diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c +index 3362ee3924..80c0f2a52e 100644 +--- a/src/basic/smack-util.c ++++ b/src/basic/smack-util.c +@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { + return 0; + + p = procfs_file_alloca(pid, "attr/current"); +- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(p, label, 0); + if (r < 0) + return r; + +diff --git a/src/basic/util.c b/src/basic/util.c +index f98ecf3858..13e0f7431f 100644 +--- a/src/basic/util.c ++++ b/src/basic/util.c +@@ -267,7 +267,7 @@ void disable_coredumps(void) { + if (detect_container() > 0) + return; + +- r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); + 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 43ed2f385b..37a6f578f7 100644 +--- a/src/binfmt/binfmt.c ++++ b/src/binfmt/binfmt.c +@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { + if (!fn) + return log_oom(); + +- return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(fn, "-1", 0); + } + + static int apply_rule(const char *rule) { +@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) { + + (void) delete_rule(rule); + +- r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); + if (r < 0) + return log_error_errno(r, "Failed to add binary format: %m"); + +@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) { + } + + /* Flush out all rules */ +- (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); ++ (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); + + STRV_FOREACH(f, files) { + k = apply_file(*f, true); +diff --git a/src/core/main.c b/src/core/main.c +index a280b756ff..334532cd42 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void) { + if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) + return 0; + +- r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); ++ r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); + if (r < 0) + return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, + "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); +@@ -1666,7 +1666,7 @@ static void initialize_core_pattern(bool skip_setup) { + if (getpid_cached() != 1) + return; + +- r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); + 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 1fe592af70..603942a000 100644 +--- a/src/core/smack-setup.c ++++ b/src/core/smack-setup.c +@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { + } + + #ifdef SMACK_RUN_LABEL +- r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK label \"" SMACK_RUN_LABEL "\" on self: %m"); +- r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/fs/smackfs/ambient", SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); + r = write_string_file("/sys/fs/smackfs/netlabel", +- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); ++ "0.0.0.0/0 " SMACK_RUN_LABEL, 0); + if (r < 0) + log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); +- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", 0); + 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 d8f91f4e66..a088e6e2d8 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[]) { + return EXIT_FAILURE; + } + +- r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/power/resume", major_minor, 0); + 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/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c +index d06f90ce1d..43d0a58750 100644 +--- a/src/libsystemd/sd-device/sd-device.c ++++ b/src/libsystemd/sd-device/sd-device.c +@@ -1976,7 +1976,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, + if (!value) + return -ENOMEM; + +- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); ++ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); + if (r < 0) { + if (r == -ELOOP) + return -EINVAL; +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index 7d757aa286..a5d9da5b7e 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -1330,7 +1330,7 @@ static int trigger_device(Manager *m, sd_device *d) { + if (!t) + return -ENOMEM; + +- (void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER); ++ (void) write_string_file(t, "change", 0); + } + + return 0; +diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c +index cb01b25bc6..e92051268b 100644 +--- a/src/nspawn/nspawn-cgroup.c ++++ b/src/nspawn/nspawn-cgroup.c +@@ -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); +- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); ++ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); + 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 3528b7ff14..11b0c20f95 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -2667,7 +2667,7 @@ static int reset_audit_loginuid(void) { + if (streq(p, "4294967295")) + return 0; + +- r = write_string_file("/proc/self/loginuid", "4294967295", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/proc/self/loginuid", "4294967295", 0); + if (r < 0) { + log_error_errno(r, + "Failed to reset audit login UID. This probably means that your kernel is too\n" +@@ -3920,13 +3920,13 @@ static int setup_uid_map(pid_t pid) { + + xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); + xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); +- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(uid_map, line, 0); + if (r < 0) + return log_error_errno(r, "Failed to write UID map: %m"); + + /* We always assign the same UID and GID ranges */ + xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); +- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(uid_map, line, 0); + if (r < 0) + return log_error_errno(r, "Failed to write GID map: %m"); + +diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c +index f197f715c7..077f893177 100644 +--- a/src/shared/cgroup-setup.c ++++ b/src/shared/cgroup-setup.c +@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { + + xsprintf(c, PID_FMT "\n", pid); + +- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, c, 0); + if (r < 0) + return r; + +@@ -799,7 +799,7 @@ int cg_enable_everywhere( + return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); + } + +- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_stream(f, s, 0); + if (r < 0) { + log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", + FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); +diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c +index 670c33108b..7c7c3dcfb6 100644 +--- a/src/shared/sysctl-util.c ++++ b/src/shared/sysctl-util.c +@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c + + log_debug("Setting '%s' to '%s'", p, value); + +- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); + } + + int sysctl_read(const char *property, char **content) { +diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c +index 39ab554290..d0e566645d 100644 +--- a/src/sleep/sleep.c ++++ b/src/sleep/sleep.c +@@ -48,7 +48,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)); +- r = write_string_file("/sys/power/resume", resume_str, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/power/resume", resume_str, 0); + 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); +@@ -75,7 +75,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca + } + + xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); +- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/power/resume_offset", offset_str, 0); + if (r < 0) + return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", + hibernate_location->swap->device, offset_str); +@@ -92,7 +92,7 @@ static int write_mode(char **modes) { + STRV_FOREACH(mode, modes) { + int k; + +- k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER); ++ k = write_string_file("/sys/power/disk", *mode, 0); + if (k >= 0) + return 0; + +@@ -114,7 +114,7 @@ static int write_state(FILE **f, char **states) { + STRV_FOREACH(state, states) { + int k; + +- k = write_string_stream(*f, *state, WRITE_STRING_FILE_DISABLE_BUFFER); ++ k = write_string_stream(*f, *state, 0); + if (k >= 0) + return 0; + log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); +diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c +index 5c74184c33..65f528314e 100644 +--- a/src/udev/udevadm-trigger.c ++++ b/src/udev/udevadm-trigger.c +@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set **settle_s + if (!filename) + return log_oom(); + +- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(filename, action, 0); + if (r < 0) { + bool ignore = IN_SET(r, -ENOENT, -ENODEV); + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index d24b8d4398..d123a43904 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -1192,7 +1192,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { + + filename = strjoina(syspath, "/uevent"); + log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); +- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(filename, "change", 0); + if (r < 0) + return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); + return 0; +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index b28e2853e1..115b7233a0 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { + static int toggle_utf8_sysfs(bool utf8) { + int r; + +- r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file("/sys/module/vt/parameters/default_utf8", one_zero(utf8), 0); + if (r < 0) + return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); + +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0023-Include-sys-wait.h.patch b/poky/meta/recipes-core/systemd/systemd/0023-Include-sys-wait.h.patch new file mode 100644 index 000000000..ea4a024b8 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0023-Include-sys-wait.h.patch @@ -0,0 +1,31 @@ +From 359e7a38824a906b0a24f5775f41a2ae3358bf06 Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Fri, 13 Sep 2019 19:26:27 -0400 +Subject: [PATCH 23/26] Include sys/wait.h + +Fixes: +src/login/logind-brightness.c:158:85: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'? + 158 | r = sd_event_add_child(w->manager->event, &w->child_event_source, w->child, WEXITED, on_brightness_writer_exit, w); + | ^~~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Scott Murray +--- + src/login/logind-brightness.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c +index a6a1603396..54848ce209 100644 +--- a/src/login/logind-brightness.c ++++ b/src/login/logind-brightness.c +@@ -1,5 +1,6 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + ++#include + #include "bus-util.h" + #include "device-util.h" + #include "hash-funcs.h" +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0024-Include-signal.h.patch b/poky/meta/recipes-core/systemd/systemd/0024-Include-signal.h.patch new file mode 100644 index 000000000..2820d7b32 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0024-Include-signal.h.patch @@ -0,0 +1,33 @@ +From 0592da08e16a17ceef0949ec9901397d8ec5af92 Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Fri, 13 Sep 2019 19:26:27 -0400 +Subject: [PATCH 24/26] Include signal.h + +Fixes several signal set related errors: +src/basic/copy.c:92:19: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration] +src/basic/copy.c:93:19: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration] +src/basic/copy.c:93:34: error: 'SIGINT' undeclared (first use in this function) +src/basic/copy.c:95:13: error: implicit declaration of function 'sigtimedwait' [-Werror=implicit-function-declaration] + +Upstream-Status: Pending + +Signed-off-by: Scott Murray +--- + src/basic/copy.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/copy.c b/src/basic/copy.c +index 6a9c3a396f..8948bb4013 100644 +--- a/src/basic/copy.c ++++ b/src/basic/copy.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "alloc-util.h" + #include "btrfs-util.h" +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch b/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch deleted file mode 100644 index 80beada3d..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a05cc5fb3dc0e51682c40196285cdda34ec90783 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Mon, 25 Feb 2019 16:53:06 +0800 -Subject: [PATCH] test-json.c: define M_PIl - -Fix the following compile failure: -src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Chen Qi - ---- - 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 a6613043b924..ca823ea79f05 100644 ---- a/src/test/test-json.c -+++ b/src/test/test-json.c -@@ -12,6 +12,10 @@ - #include "tests.h" - #include "util.h" - -+#ifndef M_PIl -+#define M_PIl 3.141592653589793238462643383279502884L -+#endif -+ - static void test_tokenizer(const char *data, ...) { - unsigned line = 0, column = 0; - void *state = NULL; 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 new file mode 100644 index 000000000..1cc3985d1 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch @@ -0,0 +1,60 @@ +From bbda4a48a34662393117fc677c3a678d4ce4c2ec Mon Sep 17 00:00:00 2001 +From: Scott Murray +Date: Fri, 13 Sep 2019 19:26:27 -0400 +Subject: [PATCH 25/26] Handle __cpu_mask usage + +Fixes errors: + +src/test/test-cpu-set-util.c:18:54: error: '__cpu_mask' undeclared (first use in this function) +src/test/test-sizeof.c:73:14: error: '__cpu_mask' undeclared (first use in this function) + +__cpu_mask is an internal type of glibc's cpu_set implementation, not +part of the POSIX definition, which is problematic when building with +musl, which does not define a matching type. From inspection of musl's +sched.h, however, it is clear that the corresponding type would be +unsigned long, which does match glibc's actual __CPU_MASK_TYPE. So, +add a typedef to cpu-set-util.h defining __cpu_mask appropriately. + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Scott Murray +--- + src/shared/cpu-set-util.h | 2 ++ + src/test/test-sizeof.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h +index 3c63a58826..4c2d4347fc 100644 +--- a/src/shared/cpu-set-util.h ++++ b/src/shared/cpu-set-util.h +@@ -6,6 +6,8 @@ + #include "macro.h" + #include "missing_syscall.h" + ++typedef unsigned long __cpu_mask; ++ + /* This wraps the libc interface with a variable to keep the allocated size. */ + typedef struct CPUSet { + cpu_set_t *set; +diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c +index e1a59d408c..c269ea6e8c 100644 +--- a/src/test/test-sizeof.c ++++ b/src/test/test-sizeof.c +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: LGPL-2.1-or-later */ + +-#include + #include + #include + #include +@@ -10,6 +9,7 @@ + #include + + #include "time-util.h" ++#include "cpu-set-util.h" + + /* Print information about various types. Useful when diagnosing + * gcc diagnostics on an unfamiliar architecture. */ +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch new file mode 100644 index 000000000..4180afb08 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch @@ -0,0 +1,173 @@ +From 47bf88f74717b417e4adbcc04256334b2335c873 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan +Date: Tue, 10 Mar 2020 11:05:20 +0000 +Subject: [PATCH 26/26] Handle missing gshadow + +gshadow usage is now present in the userdb code. Mask all uses of it to +allow compilation on musl + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Alex Kiernan +[Rebased for v247] +Signed-off-by: Luca Boccassi +--- + src/shared/user-record-nss.c | 20 ++++++++++++++++++++ + src/shared/user-record-nss.h | 4 ++++ + src/shared/userdb.c | 6 ++++++ + 3 files changed, 30 insertions(+) + +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( + if (isempty(grp->gr_name)) + return -EINVAL; + ++#if ENABLE_GSHADOW + if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name)) + return -EINVAL; ++#endif + + g = group_record_new(); + if (!g) +@@ -348,6 +350,7 @@ int nss_group_to_group_record( + + g->gid = grp->gr_gid; + ++#if ENABLE_GSHADOW + if (sgrp) { + if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { + g->hashed_password = strv_new(sgrp->sg_passwd); +@@ -363,6 +366,7 @@ int nss_group_to_group_record( + if (r < 0) + return r; + } ++#endif + + 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 group *grp, struct sgrp *ret_sgrp, char **re + assert(ret_sgrp); + assert(ret_buffer); + ++#if ENABLE_GSHADOW + for (;;) { + _cleanup_free_ char *buf = NULL; + struct sgrp sgrp, *result; +@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re + buflen *= 2; + buf = mfree(buf); + } ++#else ++ return -ESRCH; ++#endif + } + + int nss_group_record_by_name( +@@ -427,7 +435,9 @@ int nss_group_record_by_name( + struct group grp, *result; + bool incomplete = false; + size_t buflen = 4096; ++#if ENABLE_GSHADOW + struct sgrp sgrp, *sresult = NULL; ++#endif + int r; + + assert(name); +@@ -457,6 +467,7 @@ int nss_group_record_by_name( + buf = mfree(buf); + } + ++#if ENABLE_GSHADOW + if (with_shadow) { + r = nss_sgrp_for_group(result, &sgrp, &sbuf); + if (r < 0) { +@@ -468,6 +479,9 @@ int nss_group_record_by_name( + incomplete = true; + + r = nss_group_to_group_record(result, sresult, ret); ++#else ++ r = nss_group_to_group_record(result, NULL, ret); ++#endif + if (r < 0) + return r; + +@@ -484,7 +498,9 @@ int nss_group_record_by_gid( + struct group grp, *result; + bool incomplete = false; + size_t buflen = 4096; ++#if ENABLE_GSHADOW + struct sgrp sgrp, *sresult = NULL; ++#endif + int r; + + assert(ret); +@@ -512,6 +528,7 @@ int nss_group_record_by_gid( + buf = mfree(buf); + } + ++#if ENABLE_GSHADOW + if (with_shadow) { + r = nss_sgrp_for_group(result, &sgrp, &sbuf); + if (r < 0) { +@@ -523,6 +540,9 @@ int nss_group_record_by_gid( + incomplete = true; + + r = nss_group_to_group_record(result, sresult, ret); ++#else ++ r = nss_group_to_group_record(result, NULL, ret); ++#endif + 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 @@ + #pragma once + + #include ++#if ENABLE_GSHADOW + #include ++#else ++struct sgrp; ++#endif + #include + #include + +diff --git a/src/shared/userdb.c b/src/shared/userdb.c +index 2d480283d1..0d19764f2e 100644 +--- a/src/shared/userdb.c ++++ b/src/shared/userdb.c +@@ -929,13 +929,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + if (gr) { + _cleanup_free_ char *buffer = NULL; + bool incomplete = false; ++#if ENABLE_GSHADOW + struct sgrp sgrp; ++#endif + + if (streq_ptr(gr->gr_name, "root")) + iterator->synthesize_root = false; + if (gr->gr_gid == GID_NOBODY) + iterator->synthesize_nobody = false; + ++#if ENABLE_GSHADOW + r = nss_sgrp_for_group(gr, &sgrp, &buffer); + if (r < 0) { + log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name); +@@ -943,6 +946,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { + } + + r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); ++#else ++ r = nss_group_to_group_record(gr, NULL, ret); ++#endif + if (r < 0) + return r; + +-- +2.27.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch b/poky/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch deleted file mode 100644 index b1c92ed71..000000000 --- a/poky/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 92b555aaabf710e0a672a7244e8c0e3963075133 Mon Sep 17 00:00:00 2001 -From: Purushottam choudhary -Date: Wed, 28 Oct 2020 22:11:49 +0530 -Subject: [PATCH] network: selinux hook handling to enumerate nexthop - -When selinux is enabled, the call of -manager_rtnl_enumerate_nexthop() fails. - -This fix is to facilitate selinux hook handling for enumerating -nexthop. - -In manager_rtnl_enumerate_nexthop() there is a check -if "Not supported" is returned by the send_netlink() call. - -This check expects that -EOPNOTSUPP is returned, -the selinux hook seems to return -EINVAL instead. - -This happens in kernel older than 5.3 -(more specificallytorvalds/linux@65ee00a) as it does not support -nexthop handling through netlink. - -And if SELinux is enforced in the order kernel, callingRTM_GETNEXTHOP -returns -EINVAL. - -Thus adding a call in the manager_rtnl_enumerate_nexthop for the -extra return -EINVAL. - -Upstream-Status: Backport -https://github.com/systemd/systemd/commit/92b555aaabf710e0a672a7244e8c0e3963075133 ---- - src/network/networkd-manager.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c -index a6c1a39..2a9be85 100644 ---- a/src/network/networkd-manager.c -+++ b/src/network/networkd-manager.c -@@ -2121,7 +2121,7 @@ int manager_rtnl_enumerate_nexthop(Manager *m) { - - r = sd_netlink_call(m->rtnl, req, 0, &reply); - if (r < 0) { -- if (r == -EOPNOTSUPP) { -+ if (r == -EOPNOTSUPP || r == -EINVAL) { - log_debug("Nexthop are not supported by the kernel. Ignoring."); - return 0; - } diff --git a/poky/meta/recipes-core/systemd/systemd_246.6.bb b/poky/meta/recipes-core/systemd/systemd_246.6.bb deleted file mode 100644 index d9e7b1a00..000000000 --- a/poky/meta/recipes-core/systemd/systemd_246.6.bb +++ /dev/null @@ -1,732 +0,0 @@ -require systemd.inc - -PROVIDES = "udev" - -PE = "1" - -DEPENDS = "intltool-native gperf-native libcap util-linux" - -SECTION = "base/shell" - -inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check - -# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so -# that we don't build both udev and systemd in world builds. -REQUIRED_DISTRO_FEATURES = "systemd" - -SRC_URI += "file://touchscreen.rules \ - file://00-create-volatile.conf \ - file://init \ - file://99-default.preset \ - 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://selinux-hook-handling-to-enumerate-nexthop.patch \ - file://0001-logind-Restore-chvt-as-non-root-user-without-polkit.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://0004-add-fallback-parse_printf_format-implementation.patch \ - file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ - file://0006-Include-netinet-if_ether.h.patch \ - file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \ - file://0008-add-missing-FTW_-macros-for-musl.patch \ - file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ - file://0011-Use-uintmax_t-for-handling-rlim_t.patch \ - file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ - file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ - file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ - file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ - file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ - file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ - file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ - file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ - file://0021-Handle-missing-LOCK_EX.patch \ - file://0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \ - file://0024-test-json.c-define-M_PIl.patch \ - file://0001-do-not-disable-buffer-in-writing-files.patch \ - file://0002-src-login-brightness.c-include-sys-wait.h.patch \ - file://0003-src-basic-copy.c-include-signal.h.patch \ - file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ - file://0001-Handle-missing-gshadow.patch \ - " - -PAM_PLUGINS = " \ - pam-plugin-unix \ - pam-plugin-loginuid \ - pam-plugin-keyinit \ -" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ - backlight \ - binfmt \ - gshadow \ - hibernate \ - hostnamed \ - idn \ - ima \ - kmod \ - localed \ - logind \ - machined \ - myhostname \ - networkd \ - nss \ - nss-mymachines \ - nss-resolve \ - quotacheck \ - randomseed \ - resolved \ - set-time-epoch \ - sysusers \ - sysvinit \ - timedated \ - timesyncd \ - userdb \ - utmp \ - vconsole \ - xz \ -" - -PACKAGECONFIG_remove_libc-musl = " \ - gshadow \ - idn \ - localed \ - myhostname \ - nss \ - nss-mymachines \ - nss-resolve \ - sysusers \ - userdb \ - utmp \ -" - -CFLAGS_append_libc-musl = " -D__UAPI_DEF_ETHHDR=0 " - -# Use the upstream systemd serial-getty@.service and rely on -# systemd-getty-generator instead of using the OE-core specific -# systemd-serialgetty.bb - not enabled by default. -PACKAGECONFIG[serial-getty-generator] = "" - -PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" -PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" -PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" -PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" -PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" -PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" -PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" -PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" -PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" -PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" -PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" -PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" -PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" -# Sign the journal for anti-tampering -PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" -PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" -PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" -PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" -PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" -PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" -PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" -# importd requires curl/xz/zlib/bzip2/gcrypt -PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" -# Update NAT firewall rules -PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" -PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" -PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" -PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" -PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn" -PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2" -PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" -PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" -PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" -PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" -PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" -PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" -PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" -PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" -PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" -PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" -PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" -PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" -PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" -PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" -PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" -PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode" -PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" -PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" -PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" -PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" -# libseccomp is found in meta-security -PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" -PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" -PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" -PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" -PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" -# When enabled use reproducble build timestamp if set as time epoch, -# or build time if not. When disabled, time epoch is unset. -def build_epoch(d): - epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" - return '-Dtime-epoch=%d' % int(epoch) -PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" -PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" -PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" -PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" -PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" -PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" -PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" -PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" -PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" -PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" -# Verify keymaps on locale change -PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" -PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" -PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" - -# Helper variables to clarify locations. This mirrors the logic in systemd's -# build system. -rootprefix ?= "${root_prefix}" -rootlibdir ?= "${base_libdir}" -rootlibexecdir = "${rootprefix}/lib" - -# This links udev statically with systemd helper library. -# Otherwise udev package would depend on systemd package (which has the needed shared library), -# and always pull it into images. -EXTRA_OEMESON += "-Dlink-udev-shared=false" - -EXTRA_OEMESON += "-Dnobody-user=nobody \ - -Dnobody-group=nobody \ - -Drootlibdir=${rootlibdir} \ - -Drootprefix=${rootprefix} \ - -Ddefault-locale=C \ - " - -# Hardcode target binary paths to avoid using paths from sysroot -EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ - -Dkmod-path=${base_bindir}/kmod \ - -Dmount-path=${base_bindir}/mount \ - -Dquotacheck-path=${sbindir}/quotacheck \ - -Dquotaon-path=${sbindir}/quotaon \ - -Dsulogin-path=${base_sbindir}/sulogin \ - -Dnologin-path=${base_sbindir}/nologin \ - -Dumount-path=${base_bindir}/umount" - -do_install() { - meson_do_install - install -d ${D}/${base_sbindir} - if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then - # Provided by a separate recipe - rm ${D}${systemd_unitdir}/system/serial-getty* -f - fi - - # Provide support for initramfs - [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init - [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd - - install -d ${D}${sysconfdir}/udev/rules.d/ - install -d ${D}${sysconfdir}/tmpfiles.d - for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do - install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ - done - - install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ - - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd - sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd - install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install - fi - - chown root:systemd-journal ${D}/${localstatedir}/log/journal - - # Delete journal README, as log can be symlinked inside volatile. - rm -f ${D}/${localstatedir}/log/README - - # journal-remote creates this at start - rm -rf ${D}/${localstatedir}/log/journal/remote - - install -d ${D}${systemd_unitdir}/system/graphical.target.wants - install -d ${D}${systemd_unitdir}/system/multi-user.target.wants - install -d ${D}${systemd_unitdir}/system/poweroff.target.wants - install -d ${D}${systemd_unitdir}/system/reboot.target.wants - install -d ${D}${systemd_unitdir}/system/rescue.target.wants - - # Create symlinks for systemd-update-utmp-runlevel.service - if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service - ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service - fi - - # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it - # for existence else it fails - if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then - ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} - fi - if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then - echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf - echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf - echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf - ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd - else - sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf - ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd - fi - if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then - rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf - rm -r ${D}${sysconfdir}/X11 - fi - - # If polkit is setup fixup permissions and ownership - if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then - if [ -d ${D}${datadir}/polkit-1/rules.d ]; then - chmod 700 ${D}${datadir}/polkit-1/rules.d - chown polkitd:root ${D}${datadir}/polkit-1/rules.d - fi - fi - - # create link for existing udev rules - ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm - - # duplicate udevadm for postinst script - install -d ${D}${libexecdir} - ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm - - # install default policy for presets - # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto - install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset - - # add a profile fragment to disable systemd pager with busybox less - install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh -} - -python populate_packages_prepend (){ - systemdlibdir = d.getVar("rootlibdir") - do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) -} -PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" - -PACKAGE_BEFORE_PN = "\ - ${PN}-gui \ - ${PN}-vconsole-setup \ - ${PN}-initramfs \ - ${PN}-analyze \ - ${PN}-kernel-install \ - ${PN}-rpm-macros \ - ${PN}-binfmt \ - ${PN}-zsh-completion \ - ${PN}-container \ - ${PN}-journal-gatewayd \ - ${PN}-journal-upload \ - ${PN}-journal-remote \ - ${PN}-extra-utils \ - ${PN}-udev-rules \ - udev \ - udev-hwdb \ -" - -SUMMARY_${PN}-container = "Tools for containers and VMs" -DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." - -SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events" -DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default." - -SUMMARY_${PN}-journal-upload = "Send journal messages over the network" -DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." - -SUMMARY_${PN}-journal-remote = "Receive journal messages over the network" -DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." - -SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ -" -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" - -USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ -" -GROUPADD_PARAM_${PN} = "-r systemd-journal" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" -USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" -USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy" -USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway" -USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote" -USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload" - -FILES_${PN}-analyze = "${bindir}/systemd-analyze" - -FILES_${PN}-initramfs = "/init" -RDEPENDS_${PN}-initramfs = "${PN}" - -FILES_${PN}-gui = "${bindir}/systemadm" - -FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ - ${systemd_unitdir}/system/systemd-vconsole-setup.service \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" - -RDEPENDS_${PN}-kernel-install += "bash" -FILES_${PN}-kernel-install = "${bindir}/kernel-install \ - ${sysconfdir}/kernel/ \ - ${exec_prefix}/lib/kernel \ - " -FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ - " - -FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" - -FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ - ${exec_prefix}/lib/binfmt.d \ - ${rootlibexecdir}/systemd/systemd-binfmt \ - ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ - ${systemd_unitdir}/system/systemd-binfmt.service" -RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" - -RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" - - -FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ - ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ - ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ - ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ - ${datadir}/systemd/gatewayd/browse.html \ - " -SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" - -FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ - ${systemd_system_unitdir}/systemd-journal-upload.service \ - ${sysconfdir}/systemd/journal-upload.conf \ - " -SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service" - -FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ - ${sysconfdir}/systemd/journal-remote.conf \ - ${systemd_system_unitdir}/systemd-journal-remote.service \ - ${systemd_system_unitdir}/systemd-journal-remote.socket \ - " -SYSTEMD_SERVICE_${PN}-journal-remote = "systemd-journal-remote.socket" - - -FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ - ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ - ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ - ${base_bindir}/machinectl \ - ${bindir}/systemd-nspawn \ - ${nonarch_libdir}/systemd/import-pubring.gpg \ - ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ - ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ - ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ - ${systemd_system_unitdir}/machine.slice \ - ${systemd_system_unitdir}/machines.target \ - ${systemd_system_unitdir}/org.freedesktop.import1.busname \ - ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ - ${systemd_system_unitdir}/systemd-importd.service \ - ${systemd_system_unitdir}/systemd-machined.service \ - ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ - ${systemd_system_unitdir}/var-lib-machines.mount \ - ${rootlibexecdir}/systemd/systemd-import \ - ${rootlibexecdir}/systemd/systemd-importd \ - ${rootlibexecdir}/systemd/systemd-machined \ - ${rootlibexecdir}/systemd/systemd-pull \ - ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ - ${systemd_system_unitdir}/systemd-nspawn@.service \ - ${libdir}/libnss_mymachines.so.2 \ - ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ - ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ - ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ - ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ - ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ - " - -RRECOMMENDS_${PN}-container += "\ - ${PN}-journal-upload \ - ${PN}-journal-remote \ - ${PN}-journal-gatewayd \ - " - -FILES_${PN}-extra-utils = "\ - ${base_bindir}/systemd-escape \ - ${base_bindir}/systemd-inhibit \ - ${bindir}/systemd-detect-virt \ - ${bindir}/systemd-path \ - ${bindir}/systemd-run \ - ${bindir}/systemd-cat \ - ${bindir}/systemd-delta \ - ${bindir}/systemd-cgls \ - ${bindir}/systemd-cgtop \ - ${bindir}/systemd-stdio-bridge \ - ${base_bindir}/systemd-ask-password \ - ${base_bindir}/systemd-tty-ask-password-agent \ - ${systemd_unitdir}/system/systemd-ask-password-console.path \ - ${systemd_unitdir}/system/systemd-ask-password-console.service \ - ${systemd_unitdir}/system/systemd-ask-password-wall.path \ - ${systemd_unitdir}/system/systemd-ask-password-wall.service \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ - ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ - ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ - ${rootlibexecdir}/systemd/systemd-resolve-host \ - ${rootlibexecdir}/systemd/systemd-ac-power \ - ${rootlibexecdir}/systemd/systemd-activate \ - ${rootlibexecdir}/systemd/systemd-bus-proxyd \ - ${systemd_unitdir}/system/systemd-bus-proxyd.service \ - ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ - ${rootlibexecdir}/systemd/systemd-socket-proxyd \ - ${rootlibexecdir}/systemd/systemd-reply-password \ - ${rootlibexecdir}/systemd/systemd-sleep \ - ${rootlibexecdir}/systemd/system-sleep \ - ${systemd_unitdir}/system/systemd-hibernate.service \ - ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ - ${systemd_unitdir}/system/systemd-suspend.service \ - ${systemd_unitdir}/system/sleep.target \ - ${rootlibexecdir}/systemd/systemd-initctl \ - ${systemd_unitdir}/system/systemd-initctl.service \ - ${systemd_unitdir}/system/systemd-initctl.socket \ - ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ - ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ - ${rootlibexecdir}/systemd/systemd-cgroups-agent \ -" - -FILES_${PN}-udev-rules = "\ - ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \ - ${rootlibexecdir}/udev/rules.d/71-seat.rules \ - ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \ - ${rootlibexecdir}/udev/rules.d/99-systemd.rules \ -" - -CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ - ${sysconfdir}/systemd/journald.conf \ - ${sysconfdir}/systemd/logind.conf \ - ${sysconfdir}/systemd/networkd.conf \ - ${sysconfdir}/systemd/pstore.conf \ - ${sysconfdir}/systemd/resolved.conf \ - ${sysconfdir}/systemd/sleep.conf \ - ${sysconfdir}/systemd/system.conf \ - ${sysconfdir}/systemd/timesyncd.conf \ - ${sysconfdir}/systemd/user.conf \ -" - -FILES_${PN} = " ${base_bindir}/* \ - ${base_sbindir}/shutdown \ - ${base_sbindir}/halt \ - ${base_sbindir}/poweroff \ - ${base_sbindir}/runlevel \ - ${base_sbindir}/telinit \ - ${base_sbindir}/resolvconf \ - ${base_sbindir}/reboot \ - ${base_sbindir}/init \ - ${datadir}/dbus-1/services \ - ${datadir}/dbus-1/system-services \ - ${datadir}/polkit-1 \ - ${datadir}/${BPN} \ - ${datadir}/factory \ - ${sysconfdir}/dbus-1/ \ - ${sysconfdir}/modules-load.d/ \ - ${sysconfdir}/pam.d/ \ - ${sysconfdir}/profile.d/ \ - ${sysconfdir}/sysctl.d/ \ - ${sysconfdir}/systemd/ \ - ${sysconfdir}/tmpfiles.d/ \ - ${sysconfdir}/xdg/ \ - ${sysconfdir}/init.d/README \ - ${sysconfdir}/resolv-conf.systemd \ - ${sysconfdir}/X11/xinit/xinitrc.d/* \ - ${rootlibexecdir}/systemd/* \ - ${systemd_unitdir}/* \ - ${base_libdir}/security/*.so \ - /cgroup \ - ${bindir}/systemd* \ - ${bindir}/busctl \ - ${bindir}/coredumpctl \ - ${bindir}/localectl \ - ${bindir}/hostnamectl \ - ${bindir}/resolvectl \ - ${bindir}/timedatectl \ - ${bindir}/bootctl \ - ${exec_prefix}/lib/tmpfiles.d/*.conf \ - ${exec_prefix}/lib/systemd \ - ${exec_prefix}/lib/modules-load.d \ - ${exec_prefix}/lib/sysctl.d \ - ${exec_prefix}/lib/sysusers.d \ - ${exec_prefix}/lib/environment.d \ - ${localstatedir} \ - ${rootlibexecdir}/modprobe.d/systemd.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ - " - -FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" - -RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" -RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS_${PN} += "volatile-binds" - -RRECOMMENDS_${PN} += "systemd-extra-utils \ - udev-hwdb \ - e2fsprogs-e2fsck \ - kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ - os-release \ - systemd-conf \ -" - -INSANE_SKIP_${PN} += "dev-so libdir" -INSANE_SKIP_${PN}-dbg += "libdir" -INSANE_SKIP_${PN}-doc += " libdir" - -RPROVIDES_udev = "hotplug" - -RDEPENDS_udev-hwdb += "udev" - -FILES_udev += "${base_sbindir}/udevd \ - ${rootlibexecdir}/systemd/network/99-default.link \ - ${rootlibexecdir}/systemd/systemd-udevd \ - ${rootlibexecdir}/udev/accelerometer \ - ${rootlibexecdir}/udev/ata_id \ - ${rootlibexecdir}/udev/cdrom_id \ - ${rootlibexecdir}/udev/collect \ - ${rootlibexecdir}/udev/fido_id \ - ${rootlibexecdir}/udev/findkeyboards \ - ${rootlibexecdir}/udev/keyboard-force-release.sh \ - ${rootlibexecdir}/udev/keymap \ - ${rootlibexecdir}/udev/mtd_probe \ - ${rootlibexecdir}/udev/scsi_id \ - ${rootlibexecdir}/udev/v4l_id \ - ${rootlibexecdir}/udev/keymaps \ - ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \ - ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \ - ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ - ${rootlibexecdir}/udev/rules.d/60-block.rules \ - ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \ - ${rootlibexecdir}/udev/rules.d/60-drm.rules \ - ${rootlibexecdir}/udev/rules.d/60-evdev.rules \ - ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \ - ${rootlibexecdir}/udev/rules.d/60-input-id.rules \ - ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ - ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ - ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ - ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ - ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ - ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ - ${rootlibexecdir}/udev/rules.d/60-serial.rules \ - ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ - ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ - ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ - ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ - ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ - ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ - ${rootlibexecdir}/udev/rules.d/75-net-description.rules \ - ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \ - ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \ - ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ - ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ - ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ - ${sysconfdir}/udev \ - ${sysconfdir}/init.d/systemd-udevd \ - ${systemd_unitdir}/system/*udev* \ - ${systemd_unitdir}/system/*.wants/*udev* \ - ${base_bindir}/systemd-hwdb \ - ${base_bindir}/udevadm \ - ${base_sbindir}/udevadm \ - ${libexecdir}/${MLPREFIX}udevadm \ - ${datadir}/bash-completion/completions/udevadm \ - ${systemd_unitdir}/system/systemd-hwdb-update.service \ - " - -FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ - " - -RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" - -INITSCRIPT_PACKAGES = "udev" -INITSCRIPT_NAME_udev = "systemd-udevd" -INITSCRIPT_PARAMS_udev = "start 03 S ." - -python __anonymous() { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") -} - -python do_warn_musl() { - if d.getVar('TCLIBC') == "musl": - bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") -} -addtask warn_musl before do_configure - -ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" - -ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" -ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" -ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" - -ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" -ALTERNATIVE_PRIORITY[halt] ?= "300" - -ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" -ALTERNATIVE_PRIORITY[reboot] ?= "300" - -ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" -ALTERNATIVE_PRIORITY[shutdown] ?= "300" - -ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" -ALTERNATIVE_PRIORITY[poweroff] ?= "300" - -ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" -ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" -ALTERNATIVE_PRIORITY[runlevel] ?= "300" - -pkg_postinst_${PN}_libc-glibc () { - sed -e '/^hosts:/s/\s*\//' \ - -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ - -i $D${sysconfdir}/nsswitch.conf -} - -pkg_prerm_${PN}_libc-glibc () { - sed -e '/^hosts:/s/\s*\//' \ - -e '/^hosts:/s/\s*myhostname//' \ - -i $D${sysconfdir}/nsswitch.conf -} - -PACKAGE_WRITE_DEPS += "qemu-native" -pkg_postinst_udev-hwdb () { - if test -n "$D"; then - $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" - else - udevadm hwdb --update - fi -} - -pkg_prerm_udev-hwdb () { - rm -f $D${sysconfdir}/udev/hwdb.bin -} diff --git a/poky/meta/recipes-core/systemd/systemd_247.2.bb b/poky/meta/recipes-core/systemd/systemd_247.2.bb new file mode 100644 index 000000000..5eea78eff --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd_247.2.bb @@ -0,0 +1,745 @@ +require systemd.inc + +PROVIDES = "udev" + +PE = "1" + +DEPENDS = "intltool-native gperf-native libcap util-linux" + +SECTION = "base/shell" + +inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check + +# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so +# that we don't build both udev and systemd in world builds. +REQUIRED_DISTRO_FEATURES = "systemd" + +SRC_URI += "file://touchscreen.rules \ + file://00-create-volatile.conf \ + file://init \ + file://99-default.preset \ + 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-logind-Restore-chvt-as-non-root-user-without-polkit.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://0004-add-fallback-parse_printf_format-implementation.patch \ + file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ + file://0006-Include-netinet-if_ether.h.patch \ + file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ + file://0008-add-missing-FTW_-macros-for-musl.patch \ + file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ + file://0010-Use-uintmax_t-for-handling-rlim_t.patch \ + file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ + file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ + 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://0023-Include-sys-wait.h.patch \ + file://0024-Include-signal.h.patch \ + file://0025-Handle-__cpu_mask-usage.patch \ + file://0026-Handle-missing-gshadow.patch \ + " + +PAM_PLUGINS = " \ + pam-plugin-unix \ + pam-plugin-loginuid \ + pam-plugin-keyinit \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ + backlight \ + binfmt \ + gshadow \ + hibernate \ + hostnamed \ + idn \ + ima \ + kmod \ + localed \ + logind \ + machined \ + myhostname \ + networkd \ + nss \ + nss-mymachines \ + nss-resolve \ + quotacheck \ + randomseed \ + resolved \ + set-time-epoch \ + sysusers \ + sysvinit \ + timedated \ + timesyncd \ + userdb \ + utmp \ + vconsole \ + xz \ +" + +PACKAGECONFIG_remove_libc-musl = " \ + gshadow \ + idn \ + localed \ + myhostname \ + nss \ + nss-mymachines \ + nss-resolve \ + sysusers \ + userdb \ + utmp \ +" + +CFLAGS_append_libc-musl = " -D__UAPI_DEF_ETHHDR=0 " + +# Some of the dependencies are weak-style recommends - if not available at runtime, +# systemd won't fail but the library-related feature will be skipped with a warning. + +# Use the upstream systemd serial-getty@.service and rely on +# systemd-getty-generator instead of using the OE-core specific +# systemd-serialgetty.bb - not enabled by default. +PACKAGECONFIG[serial-getty-generator] = "" + +PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" +PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" +PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" +PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" +PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" +PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" +PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" +PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup" +PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" +PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" +PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" +PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" +PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" +# Sign the journal for anti-tampering +PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" +PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" +PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" +PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" +PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" +PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" +PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" +# importd requires curl/xz/zlib/bzip2/gcrypt +PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" +# Update NAT firewall rules +PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" +PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" +PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" +PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" +PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn" +PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2" +PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" +PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" +PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" +PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" +PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" +PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" +PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" +PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" +PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" +PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" +PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false" +PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" +PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" +PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" +PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" +PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode" +PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" +PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" +PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" +PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" +# libseccomp is found in meta-security +PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" +PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" +PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" +PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" +PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" +# When enabled use reproducble build timestamp if set as time epoch, +# or build time if not. When disabled, time epoch is unset. +def build_epoch(d): + epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" + return '-Dtime-epoch=%d' % int(epoch) +PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" +PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" +PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" +PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" +PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" +PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" +PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" +PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" +PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" +PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" +# Verify keymaps on locale change +PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" +PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" +PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" + +# Helper variables to clarify locations. This mirrors the logic in systemd's +# build system. +rootprefix ?= "${root_prefix}" +rootlibdir ?= "${base_libdir}" +rootlibexecdir = "${rootprefix}/lib" + +# This links udev statically with systemd helper library. +# Otherwise udev package would depend on systemd package (which has the needed shared library), +# and always pull it into images. +EXTRA_OEMESON += "-Dlink-udev-shared=false" + +EXTRA_OEMESON += "-Dnobody-user=nobody \ + -Dnobody-group=nobody \ + -Drootlibdir=${rootlibdir} \ + -Drootprefix=${rootprefix} \ + -Ddefault-locale=C \ + -Dmode=release \ + -Dsystem-alloc-uid-min=101 \ + -Dsystem-uid-max=999 \ + -Dsystem-alloc-gid-min=101 \ + -Dsystem-gid-max=999 \ + " + +# Hardcode target binary paths to avoid using paths from sysroot +EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ + -Dkmod-path=${base_bindir}/kmod \ + -Dmount-path=${base_bindir}/mount \ + -Dquotacheck-path=${sbindir}/quotacheck \ + -Dquotaon-path=${sbindir}/quotaon \ + -Dsulogin-path=${base_sbindir}/sulogin \ + -Dnologin-path=${base_sbindir}/nologin \ + -Dumount-path=${base_bindir}/umount" + +do_install() { + meson_do_install + install -d ${D}/${base_sbindir} + if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then + # Provided by a separate recipe + rm ${D}${systemd_unitdir}/system/serial-getty* -f + fi + + # Provide support for initramfs + [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init + [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd + + install -d ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/tmpfiles.d + for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do + install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ + done + + install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd + sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd + install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install + fi + + chown root:systemd-journal ${D}/${localstatedir}/log/journal + + # Delete journal README, as log can be symlinked inside volatile. + rm -f ${D}/${localstatedir}/log/README + + # journal-remote creates this at start + rm -rf ${D}/${localstatedir}/log/journal/remote + + install -d ${D}${systemd_unitdir}/system/graphical.target.wants + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + install -d ${D}${systemd_unitdir}/system/poweroff.target.wants + install -d ${D}${systemd_unitdir}/system/reboot.target.wants + install -d ${D}${systemd_unitdir}/system/rescue.target.wants + + # Create symlinks for systemd-update-utmp-runlevel.service + if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service + ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service + fi + + # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it + # for existence else it fails + if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} + fi + if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then + echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf + echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf + echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf + ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd + else + sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf + ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then + rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf + rm -r ${D}${sysconfdir}/X11 + fi + + # If polkit is setup fixup permissions and ownership + if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then + if [ -d ${D}${datadir}/polkit-1/rules.d ]; then + chmod 700 ${D}${datadir}/polkit-1/rules.d + chown polkitd:root ${D}${datadir}/polkit-1/rules.d + fi + fi + + # create link for existing udev rules + ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm + + # duplicate udevadm for postinst script + install -d ${D}${libexecdir} + ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm + + # install default policy for presets + # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto + install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset + + # add a profile fragment to disable systemd pager with busybox less + install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh +} + +python populate_packages_prepend (){ + systemdlibdir = d.getVar("rootlibdir") + do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) +} +PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" + +PACKAGE_BEFORE_PN = "\ + ${PN}-gui \ + ${PN}-vconsole-setup \ + ${PN}-initramfs \ + ${PN}-analyze \ + ${PN}-kernel-install \ + ${PN}-rpm-macros \ + ${PN}-binfmt \ + ${PN}-zsh-completion \ + ${PN}-container \ + ${PN}-journal-gatewayd \ + ${PN}-journal-upload \ + ${PN}-journal-remote \ + ${PN}-extra-utils \ + ${PN}-udev-rules \ + udev \ + udev-hwdb \ +" + +SUMMARY_${PN}-container = "Tools for containers and VMs" +DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." + +SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events" +DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default." + +SUMMARY_${PN}-journal-upload = "Send journal messages over the network" +DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." + +SUMMARY_${PN}-journal-remote = "Receive journal messages over the network" +DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." + +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ +" +SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" + +USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ +" +GROUPADD_PARAM_${PN} = "-r systemd-journal" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" +USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" +USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy" +USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway" +USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote" +USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload" + +FILES_${PN}-analyze = "${bindir}/systemd-analyze" + +FILES_${PN}-initramfs = "/init" +RDEPENDS_${PN}-initramfs = "${PN}" + +FILES_${PN}-gui = "${bindir}/systemadm" + +FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ + ${systemd_unitdir}/system/systemd-vconsole-setup.service \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" + +RDEPENDS_${PN}-kernel-install += "bash" +FILES_${PN}-kernel-install = "${bindir}/kernel-install \ + ${sysconfdir}/kernel/ \ + ${exec_prefix}/lib/kernel \ + " +FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ + " + +FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" + +FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ + ${exec_prefix}/lib/binfmt.d \ + ${rootlibexecdir}/systemd/systemd-binfmt \ + ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ + ${systemd_unitdir}/system/systemd-binfmt.service" +RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" + +RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" + + +FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ + ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ + ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ + ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ + ${datadir}/systemd/gatewayd/browse.html \ + " +SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" + +FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ + ${systemd_system_unitdir}/systemd-journal-upload.service \ + ${sysconfdir}/systemd/journal-upload.conf \ + " +SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service" + +FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ + ${sysconfdir}/systemd/journal-remote.conf \ + ${systemd_system_unitdir}/systemd-journal-remote.service \ + ${systemd_system_unitdir}/systemd-journal-remote.socket \ + " +SYSTEMD_SERVICE_${PN}-journal-remote = "systemd-journal-remote.socket" + + +FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ + ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ + ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ + ${base_bindir}/machinectl \ + ${bindir}/systemd-nspawn \ + ${nonarch_libdir}/systemd/import-pubring.gpg \ + ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ + ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ + ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/machine.slice \ + ${systemd_system_unitdir}/machines.target \ + ${systemd_system_unitdir}/org.freedesktop.import1.busname \ + ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ + ${systemd_system_unitdir}/systemd-importd.service \ + ${systemd_system_unitdir}/systemd-machined.service \ + ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ + ${systemd_system_unitdir}/var-lib-machines.mount \ + ${rootlibexecdir}/systemd/systemd-import \ + ${rootlibexecdir}/systemd/systemd-importd \ + ${rootlibexecdir}/systemd/systemd-machined \ + ${rootlibexecdir}/systemd/systemd-pull \ + ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ + ${systemd_system_unitdir}/systemd-nspawn@.service \ + ${libdir}/libnss_mymachines.so.2 \ + ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ + ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ + ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ + ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ + ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ + " + +RRECOMMENDS_${PN}-container += "\ + ${PN}-journal-upload \ + ${PN}-journal-remote \ + ${PN}-journal-gatewayd \ + " + +FILES_${PN}-extra-utils = "\ + ${base_bindir}/systemd-escape \ + ${base_bindir}/systemd-inhibit \ + ${bindir}/systemd-detect-virt \ + ${bindir}/systemd-dissect \ + ${bindir}/systemd-path \ + ${bindir}/systemd-run \ + ${bindir}/systemd-cat \ + ${bindir}/systemd-delta \ + ${bindir}/systemd-cgls \ + ${bindir}/systemd-cgtop \ + ${bindir}/systemd-stdio-bridge \ + ${base_bindir}/systemd-ask-password \ + ${base_bindir}/systemd-tty-ask-password-agent \ + ${systemd_unitdir}/system/systemd-ask-password-console.path \ + ${systemd_unitdir}/system/systemd-ask-password-console.service \ + ${systemd_unitdir}/system/systemd-ask-password-wall.path \ + ${systemd_unitdir}/system/systemd-ask-password-wall.service \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \ + ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \ + ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \ + ${rootlibexecdir}/systemd/systemd-resolve-host \ + ${rootlibexecdir}/systemd/systemd-ac-power \ + ${rootlibexecdir}/systemd/systemd-activate \ + ${rootlibexecdir}/systemd/systemd-bus-proxyd \ + ${systemd_unitdir}/system/systemd-bus-proxyd.service \ + ${systemd_unitdir}/system/systemd-bus-proxyd.socket \ + ${rootlibexecdir}/systemd/systemd-socket-proxyd \ + ${rootlibexecdir}/systemd/systemd-reply-password \ + ${rootlibexecdir}/systemd/systemd-sleep \ + ${rootlibexecdir}/systemd/system-sleep \ + ${systemd_unitdir}/system/systemd-hibernate.service \ + ${systemd_unitdir}/system/systemd-hybrid-sleep.service \ + ${systemd_unitdir}/system/systemd-suspend.service \ + ${systemd_unitdir}/system/sleep.target \ + ${rootlibexecdir}/systemd/systemd-initctl \ + ${systemd_unitdir}/system/systemd-initctl.service \ + ${systemd_unitdir}/system/systemd-initctl.socket \ + ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \ + ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ + ${rootlibexecdir}/systemd/systemd-cgroups-agent \ +" + +FILES_${PN}-udev-rules = "\ + ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \ + ${rootlibexecdir}/udev/rules.d/71-seat.rules \ + ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \ + ${rootlibexecdir}/udev/rules.d/99-systemd.rules \ +" + +CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ + ${sysconfdir}/systemd/journald.conf \ + ${sysconfdir}/systemd/logind.conf \ + ${sysconfdir}/systemd/networkd.conf \ + ${sysconfdir}/systemd/pstore.conf \ + ${sysconfdir}/systemd/resolved.conf \ + ${sysconfdir}/systemd/sleep.conf \ + ${sysconfdir}/systemd/system.conf \ + ${sysconfdir}/systemd/timesyncd.conf \ + ${sysconfdir}/systemd/user.conf \ +" + +FILES_${PN} = " ${base_bindir}/* \ + ${base_sbindir}/shutdown \ + ${base_sbindir}/halt \ + ${base_sbindir}/poweroff \ + ${base_sbindir}/runlevel \ + ${base_sbindir}/telinit \ + ${base_sbindir}/resolvconf \ + ${base_sbindir}/reboot \ + ${base_sbindir}/init \ + ${datadir}/dbus-1/services \ + ${datadir}/dbus-1/system-services \ + ${datadir}/polkit-1 \ + ${datadir}/${BPN} \ + ${datadir}/factory \ + ${sysconfdir}/dbus-1/ \ + ${sysconfdir}/modules-load.d/ \ + ${sysconfdir}/pam.d/ \ + ${sysconfdir}/profile.d/ \ + ${sysconfdir}/sysctl.d/ \ + ${sysconfdir}/systemd/ \ + ${sysconfdir}/tmpfiles.d/ \ + ${sysconfdir}/xdg/ \ + ${sysconfdir}/init.d/README \ + ${sysconfdir}/resolv-conf.systemd \ + ${sysconfdir}/X11/xinit/xinitrc.d/* \ + ${rootlibexecdir}/systemd/* \ + ${libdir}/pam.d \ + ${nonarch_libdir}/pam.d \ + ${systemd_unitdir}/* \ + ${base_libdir}/security/*.so \ + /cgroup \ + ${bindir}/systemd* \ + ${bindir}/busctl \ + ${bindir}/coredumpctl \ + ${bindir}/localectl \ + ${bindir}/hostnamectl \ + ${bindir}/resolvectl \ + ${bindir}/timedatectl \ + ${bindir}/bootctl \ + ${bindir}/oomctl \ + ${exec_prefix}/lib/tmpfiles.d/*.conf \ + ${exec_prefix}/lib/systemd \ + ${exec_prefix}/lib/modules-load.d \ + ${exec_prefix}/lib/sysctl.d \ + ${exec_prefix}/lib/sysusers.d \ + ${exec_prefix}/lib/environment.d \ + ${localstatedir} \ + ${rootlibexecdir}/modprobe.d/systemd.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ + ${datadir}/dbus-1/system.d/org.freedesktop.oom1.conf \ + " + +FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" + +RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" +RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" +RDEPENDS_${PN} += "volatile-binds" + +RRECOMMENDS_${PN} += "systemd-extra-utils \ + udev-hwdb \ + e2fsprogs-e2fsck \ + kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ + os-release \ + systemd-conf \ +" + +INSANE_SKIP_${PN} += "dev-so libdir" +INSANE_SKIP_${PN}-dbg += "libdir" +INSANE_SKIP_${PN}-doc += " libdir" + +RPROVIDES_udev = "hotplug" + +RDEPENDS_udev-hwdb += "udev" + +FILES_udev += "${base_sbindir}/udevd \ + ${rootlibexecdir}/systemd/network/99-default.link \ + ${rootlibexecdir}/systemd/systemd-udevd \ + ${rootlibexecdir}/udev/accelerometer \ + ${rootlibexecdir}/udev/ata_id \ + ${rootlibexecdir}/udev/cdrom_id \ + ${rootlibexecdir}/udev/collect \ + ${rootlibexecdir}/udev/fido_id \ + ${rootlibexecdir}/udev/findkeyboards \ + ${rootlibexecdir}/udev/keyboard-force-release.sh \ + ${rootlibexecdir}/udev/keymap \ + ${rootlibexecdir}/udev/mtd_probe \ + ${rootlibexecdir}/udev/scsi_id \ + ${rootlibexecdir}/udev/v4l_id \ + ${rootlibexecdir}/udev/keymaps \ + ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \ + ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \ + ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ + ${rootlibexecdir}/udev/rules.d/60-block.rules \ + ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \ + ${rootlibexecdir}/udev/rules.d/60-drm.rules \ + ${rootlibexecdir}/udev/rules.d/60-evdev.rules \ + ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \ + ${rootlibexecdir}/udev/rules.d/60-input-id.rules \ + ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ + ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ + ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ + ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ + ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ + ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ + ${rootlibexecdir}/udev/rules.d/60-serial.rules \ + ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ + ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ + ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ + ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ + ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ + ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ + ${rootlibexecdir}/udev/rules.d/75-net-description.rules \ + ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \ + ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \ + ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ + ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ + ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ + ${sysconfdir}/udev \ + ${sysconfdir}/init.d/systemd-udevd \ + ${systemd_unitdir}/system/*udev* \ + ${systemd_unitdir}/system/*.wants/*udev* \ + ${base_bindir}/systemd-hwdb \ + ${base_bindir}/udevadm \ + ${base_sbindir}/udevadm \ + ${libexecdir}/${MLPREFIX}udevadm \ + ${datadir}/bash-completion/completions/udevadm \ + ${systemd_unitdir}/system/systemd-hwdb-update.service \ + " + +FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ + " + +RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" + +INITSCRIPT_PACKAGES = "udev" +INITSCRIPT_NAME_udev = "systemd-udevd" +INITSCRIPT_PARAMS_udev = "start 03 S ." + +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + +python do_warn_musl() { + if d.getVar('TCLIBC') == "musl": + bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") +} +addtask warn_musl before do_configure + +ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" + +ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" +ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" + +ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" +ALTERNATIVE_PRIORITY[halt] ?= "300" + +ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" +ALTERNATIVE_PRIORITY[reboot] ?= "300" + +ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" +ALTERNATIVE_PRIORITY[shutdown] ?= "300" + +ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" +ALTERNATIVE_PRIORITY[poweroff] ?= "300" + +ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" +ALTERNATIVE_PRIORITY[runlevel] ?= "300" + +pkg_postinst_${PN}_libc-glibc () { + sed -e '/^hosts:/s/\s*\//' \ + -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf +} + +pkg_prerm_${PN}_libc-glibc () { + sed -e '/^hosts:/s/\s*\//' \ + -e '/^hosts:/s/\s*myhostname//' \ + -i $D${sysconfdir}/nsswitch.conf +} + +PACKAGE_WRITE_DEPS += "qemu-native" +pkg_postinst_udev-hwdb () { + if test -n "$D"; then + $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" + else + udevadm hwdb --update + fi +} + +pkg_prerm_udev-hwdb () { + rm -f $D${sysconfdir}/udev/hwdb.bin +} diff --git a/poky/meta/recipes-core/sysvinit/sysvinit/rc b/poky/meta/recipes-core/sysvinit/sysvinit/rc index d0d314982..41196ec90 100755 --- a/poky/meta/recipes-core/sysvinit/sysvinit/rc +++ b/poky/meta/recipes-core/sysvinit/sysvinit/rc @@ -17,6 +17,7 @@ . /etc/default/rcS export VERBOSE +export PSPLASH_FIFO_DIR startup_progress() { step=$(($step + $step_change)) @@ -27,7 +28,7 @@ startup_progress() { fi #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size" if type psplash-write >/dev/null 2>&1; then - PSPLASH_FIFO_DIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true + psplash-write "PROGRESS $progress" || true fi } @@ -159,6 +160,9 @@ startup() { # [ -f $previous_start ] && [ ! -f $stop ] && continue fi + if [ x"${PSPLASH_TEXT_UPDATES}" = x"yes" ]; then + psplash-write "MSG $(basename $i .sh | cut -c 4-)" || true + fi case "$runlevel" in 0|6) startup $i stop @@ -173,7 +177,6 @@ startup() { #Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then if type psplash-write >/dev/null 2>&1; then - PSPLASH_FIFO_DIR=/mnt/.psplash psplash-write "QUIT" || true - umount -l /mnt/.psplash + psplash-write "QUIT" || true fi fi diff --git a/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default b/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default index 709cdf6ec..f7c4a2f84 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default +++ b/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default @@ -27,3 +27,10 @@ VOLATILE_ENABLE_CACHE=yes # Setting ROOTFS_READ_ONLY to yes and rebooting will give you a read-only rootfs. # Normally you should not change this value. ROOTFS_READ_ONLY=no +# rcS is also used when using busybox init and shares initscripts, some initscripts +# need to have specific behavior depending on init system +INIT_SYSTEM=sysvinit +# set the psplash fifo directory +PSPLASH_FIFO_DIR=/mnt +# psplash textual updates knob +PSPLASH_TEXT_UPDATES=#PSPLASH_TEXT# diff --git a/poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb b/poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb deleted file mode 100644 index 98916f7f1..000000000 --- a/poky/meta/recipes-core/sysvinit/sysvinit_2.97.bb +++ /dev/null @@ -1,112 +0,0 @@ -SUMMARY = "System-V like init" -DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts." -HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/" -SECTION = "base" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ - file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \ - " - -RDEPENDS_${PN} = "${PN}-inittab" - -SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ - file://install.patch \ - file://crypt-lib.patch \ - file://pidof-add-m-option.patch \ - file://realpath.patch \ - file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ - file://rcS-default \ - file://rc \ - file://rcS \ - file://bootlogd.init \ - file://01_bootlogd \ - " -SRC_URI[sha256sum] = "2d5996857519bfd8634d2e1debabb3238fb38440f65fbfdc46420ee8bdf25110" - -S = "${WORKDIR}/sysvinit-${PV}" - -inherit update-alternatives features_check -DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" -do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" - -REQUIRED_DISTRO_FEATURES = "sysvinit" - -ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" - -ALTERNATIVE_PRIORITY = "200" - -ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" -ALTERNATIVE_PRIORITY[init] = "50" - -ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" -ALTERNATIVE_PRIORITY[mountpoint] = "20" - -ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" -ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" -ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" -ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" -ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" - -ALTERNATIVE_${PN}-pidof = "pidof" -ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" - -ALTERNATIVE_${PN}-sulogin = "sulogin" -ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" - -ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" - -ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" -ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" -ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" -ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" -ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" -ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" -ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" - -PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" -FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" -FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" -FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" - -RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd" - -CFLAGS_prepend = "-D_GNU_SOURCE " -export LCRYPT = "-lcrypt" -EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ - 'base_sbindir=${base_sbindir}' \ - 'bindir=${bindir}' \ - 'sbindir=${sbindir}' \ - 'sysconfdir=${sysconfdir}' \ - 'includedir=${includedir}' \ - 'mandir=${mandir}' \ - MNTPOINT=yes" - -do_install () { - oe_runmake 'ROOT=${D}' install - - install -d ${D}${sysconfdir} \ - ${D}${sysconfdir}/default \ - ${D}${sysconfdir}/init.d - for level in S 0 1 2 3 4 5 6; do - install -d ${D}${sysconfdir}/rc$level.d - done - - install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS - install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd - ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd - - update-rc.d -r ${D} bootlogd start 07 S . - update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . - - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles - - chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown - chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown - - # Already provided by e2fsprogs; sysvinit's version is a copy from there - rm ${D}${base_sbindir}/logsave - rm ${D}${mandir}/man8/logsave.8 -} diff --git a/poky/meta/recipes-core/sysvinit/sysvinit_2.98.bb b/poky/meta/recipes-core/sysvinit/sysvinit_2.98.bb new file mode 100644 index 000000000..41009bc18 --- /dev/null +++ b/poky/meta/recipes-core/sysvinit/sysvinit_2.98.bb @@ -0,0 +1,117 @@ +SUMMARY = "System-V like init" +DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts." +HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \ + " + +RDEPENDS_${PN} = "${PN}-inittab" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ + file://install.patch \ + file://crypt-lib.patch \ + file://pidof-add-m-option.patch \ + file://realpath.patch \ + file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ + file://rcS-default \ + file://rc \ + file://rcS \ + file://bootlogd.init \ + file://01_bootlogd \ + " +SRC_URI[sha256sum] = "7b2c3ffaf19eaf1ca80268762f85f9e4eb8e3c973213d49f9802605b72caa7dc" + +S = "${WORKDIR}/sysvinit-${PV}" + +inherit update-alternatives features_check +DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" +do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" + +PACKAGECONFIG[psplash-text-updates] = ",," + +REQUIRED_DISTRO_FEATURES = "sysvinit" + +ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" + +ALTERNATIVE_PRIORITY = "200" + +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" +ALTERNATIVE_PRIORITY[init] = "50" + +ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" +ALTERNATIVE_PRIORITY[mountpoint] = "20" + +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" + +ALTERNATIVE_${PN}-pidof = "pidof" +ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" + +ALTERNATIVE_${PN}-sulogin = "sulogin" +ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" + +ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" + +ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" +ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" +ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" +ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" +ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" +ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" +ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" + +PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" +FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" +FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" +FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" + +RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd" + +CFLAGS_prepend = "-D_GNU_SOURCE " +export LCRYPT = "-lcrypt" +EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ + 'base_sbindir=${base_sbindir}' \ + 'bindir=${bindir}' \ + 'sbindir=${sbindir}' \ + 'sysconfdir=${sysconfdir}' \ + 'includedir=${includedir}' \ + 'mandir=${mandir}' \ + MNTPOINT=yes" + +do_install () { + oe_runmake 'ROOT=${D}' install + + install -d ${D}${sysconfdir} \ + ${D}${sysconfdir}/default \ + ${D}${sysconfdir}/init.d + for level in S 0 1 2 3 4 5 6; do + install -d ${D}${sysconfdir}/rc$level.d + done + + sed -e \ + 's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \ + ${WORKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS + chmod 0644 ${D}${sysconfdir}/default/rcS + install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd + ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd + + update-rc.d -r ${D} bootlogd start 07 S . + update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . + + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles + + chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown + chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown + + # Already provided by e2fsprogs; sysvinit's version is a copy from there + rm ${D}${base_sbindir}/logsave + rm ${D}${mandir}/man8/logsave.8 +} diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch b/poky/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch new file mode 100644 index 000000000..f3ae5ef94 --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch @@ -0,0 +1,52 @@ +From 5547316c85cd45c0ea29c4c7c48eecd616783cd5 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Tue, 17 Nov 2020 11:27:48 +0100 +Subject: [PATCH] build-sys: do not build plymouth-ctrl.c w/ disabled plymouth + +Do not build plymouth-ctrl.c in agetty and sulogin in case the plymouth +support is disabled. + +Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/5547316c85cd45c0ea29c4c7c48eecd616783cd5] +Signed-off-by: Pino Toscano +--- + login-utils/Makemodule.am | 6 ++++-- + term-utils/Makemodule.am | 6 ++++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am +index 4f52cea3c..8bc3ee37e 100644 +--- a/login-utils/Makemodule.am ++++ b/login-utils/Makemodule.am +@@ -31,8 +31,10 @@ dist_man_MANS += login-utils/sulogin.8 + sulogin_SOURCES = \ + login-utils/sulogin.c \ + login-utils/sulogin-consoles.c \ +- login-utils/sulogin-consoles.h \ +- lib/plymouth-ctrl.c ++ login-utils/sulogin-consoles.h ++if USE_PLYMOUTH_SUPPORT ++sulogin_SOURCES += lib/plymouth-ctrl.c ++endif + sulogin_LDADD = $(LDADD) libcommon.la + + if HAVE_LIBCRYPT +diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am +index 92df7dbc8..c424dbdf8 100644 +--- a/term-utils/Makemodule.am ++++ b/term-utils/Makemodule.am +@@ -42,8 +42,10 @@ endif # BUILD_SCRIPTLIVE + if BUILD_AGETTY + sbin_PROGRAMS += agetty + dist_man_MANS += term-utils/agetty.8 +-agetty_SOURCES = term-utils/agetty.c \ +- lib/plymouth-ctrl.c ++agetty_SOURCES = term-utils/agetty.c ++if USE_PLYMOUTH_SUPPORT ++agetty_SOURCES += lib/plymouth-ctrl.c ++endif + agetty_LDADD = $(LDADD) libcommon.la + if BSD + agetty_LDADD += -lutil +-- +2.29.2 + diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch b/poky/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch new file mode 100644 index 000000000..3e818470f --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch @@ -0,0 +1,30 @@ +From 367972fae13d170675768d63678577cae1890143 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Tue, 17 Nov 2020 11:32:45 +0100 +Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32 + +Check that __NR_settimeofday_time32 exists before trying to use it as +syscall number. + +Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/367972fae13d170675768d63678577cae1890143] +Signed-off-by: Pino Toscano +--- + sys-utils/hwclock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c +index 1f7ef3317..db448687d 100644 +--- a/sys-utils/hwclock.c ++++ b/sys-utils/hwclock.c +@@ -678,7 +678,7 @@ display_time(struct timeval hwctime) + #ifndef SYS_settimeofday + # ifdef __NR_settimeofday + # define SYS_settimeofday __NR_settimeofday +-# else ++# elif defined(__NR_settimeofday_time32) + # define SYS_settimeofday __NR_settimeofday_time32 + # endif + #endif +-- +2.29.2 + diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.36.1.bb b/poky/meta/recipes-core/util-linux/util-linux_2.36.1.bb new file mode 100644 index 000000000..bf4692227 --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux_2.36.1.bb @@ -0,0 +1,361 @@ +SUMMARY = "A suite of basic system administration utilities" +HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" +DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ +commonly found on most Linux systems. Some of the more important utilities include \ +disk partitioning, kernel message management, filesystem creation, and system login." + +SECTION = "base" + +LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" +LICENSE_${PN}-libblkid = "LGPLv2.1+" +LICENSE_${PN}-libfdisk = "LGPLv2.1+" +LICENSE_${PN}-libmount = "LGPLv2.1+" +LICENSE_${PN}-libsmartcols = "LGPLv2.1+" +LICENSE_${PN}-libuuid = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ + file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ + file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ + file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ + file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ + file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ + file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ + file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ +" + +#gtk-doc is not enabled as it requires xmlto which requires util-linux +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +DEPENDS = "libcap-ng ncurses virtual/crypt zlib" + +MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ + file://configure-sbindir.patch \ + file://runuser.pamd \ + file://runuser-l.pamd \ + file://ptest.patch \ + file://run-ptest \ + file://display_testname_for_subtest.patch \ + file://avoid_parallel_tests.patch \ + file://0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch \ + file://0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch \ + " +SRC_URI[sha256sum] = "09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed" + +PACKAGES =+ "${PN}-swaponoff" +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" + +python util_linux_binpackages () { + def pkg_hook(f, pkg, file_regex, output_pattern, modulename): + pn = d.getVar('PN') + d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) + + if d.getVar('ALTERNATIVE_' + pkg): + return + if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): + d.setVar('ALTERNATIVE_' + pkg, modulename) + + bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) + for dir in bindirs: + do_split_packages(d, root=dir, + file_regex=r'(.*)', output_pattern='${PN}-%s', + description='${PN} %s', + hook=pkg_hook, extra_depends='') + + # There are some symlinks for some binaries which we have ignored + # above. Add them to the package owning the binary they are + # pointing to + extras = {} + dvar = d.getVar('PKGD') + for root in bindirs: + for walkroot, dirs, files in os.walk(dvar + root): + for f in files: + file = os.path.join(walkroot, f) + if not os.path.islink(file): + continue + + pkg = os.path.basename(os.readlink(file)) + extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1) + + pn = d.getVar('PN') + for pkg, links in extras.items(): + of = d.getVar('FILES_' + pn + '-' + pkg) + links = of + links + d.setVar('FILES_' + pn + '-' + pkg, links) +} + +# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS +PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " + +python util_linux_libpackages() { + do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$', + output_pattern='${PN}-lib%s', + description='${PN} lib%s', + extra_depends='', prepend=True, allow_links=True) +} + +PACKAGESPLITFUNCS =+ "util_linux_libpackages" + +PACKAGES_DYNAMIC = "^${PN}-.*" + +CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" +UTIL_LINUX_LIBDIR = "${libdir}" +UTIL_LINUX_LIBDIR_class-target = "${base_libdir}" +EXTRA_OECONF = "\ + --enable-libuuid --enable-libblkid \ + \ + --enable-fsck --enable-kill --enable-last --enable-mesg \ + --enable-mount --enable-partx --enable-raw --enable-rfkill \ + --enable-unshare --enable-write \ + \ + --disable-bfs --disable-chfn-chsh --disable-login \ + --disable-makeinstall-chown --disable-minix --disable-newgrp \ + --disable-use-tty-group --disable-vipw \ + \ + --without-udev \ + \ + usrsbin_execdir='${sbindir}' \ + --libdir='${UTIL_LINUX_LIBDIR}' \ +" + +EXTRA_OECONF_append_class-target = " --enable-setpriv" +EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv" +EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv" +EXTRA_OECONF_append = " --disable-hwclock-gplv3" + +# enable pcre2 for native/nativesdk to match host distros +# this helps to keep same expectations when using the SDK or +# build host versions during development +# +PACKAGECONFIG ?= "pcre2" +PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +# inherit manpages requires this to be present, however util-linux does not have +# configuration options, and installs manpages always +PACKAGECONFIG[manpages] = "" +PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," +# Respect the systemd feature for uuidd +PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" +# Build python bindings for libmount +PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" +# Readline support +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +# PCRE support in hardlink +PACKAGECONFIG[pcre2] = ",,libpcre2" + +EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "" +FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" +FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" +FILES_${PN}-mount = "${sysconfdir}/default/mountall" +FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*" +FILES_${PN}-su = "${sysconfdir}/pam.d/su-l" +CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l" +FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ + ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ + ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" + +# Util-linux' blkid replaces the e2fsprogs one +RCONFLICTS_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" +RREPLACES_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" + +RRECOMMENDS_${PN}_class-native = "" +RRECOMMENDS_${PN}_class-nativesdk = "" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" + +RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev" + +RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" +RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz" +RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug" +RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" +ALLOW_EMPTY_${PN}-swaponoff = "1" + +#SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim" +SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service" +SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable" +SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service" +SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable" + +do_install () { + # with ccache the timestamps on compiled files may + # end up earlier than on their inputs, this allows + # for the resultant compilation in the install step. + oe_runmake 'CC=${CC}' 'LD=${LD}' \ + 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install + + mkdir -p ${D}${base_bindir} + + sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" + sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin" + binprogs_a="dmesg getopt kill more umount mount login su mountpoint" + + if [ "${base_sbindir}" != "${sbindir}" ]; then + mkdir -p ${D}${base_sbindir} + for p in $sbinprogs $sbinprogs_a; do + if [ -f "${D}${sbindir}/$p" ]; then + mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" + fi + done + fi + + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + for p in $binprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" + fi + done + fi + + install -d ${D}${sysconfdir}/default/ + echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall + + rm -f ${D}${bindir}/chkdupexe +} + +do_install_append_class-target () { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then + install -d ${D}${sysconfdir}/pam.d + install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser + install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l + # Required for "su -" aka "su --login" because + # otherwise it uses "other", which has "auth pam_deny.so" + # and thus prevents the operation. + ln -s su ${D}${sysconfdir}/pam.d/su-l + fi +} +# nologin causes a conflict with shadow-native +# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir}) +do_install_append_class-native () { + rm -f ${D}${base_sbindir}/nologin + rm -f ${D}${base_bindir}/kill +} + +ALTERNATIVE_PRIORITY = "80" + +ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" +ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" +ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" +ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt" +ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" +ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" +ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" +ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" +ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock" +ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" +ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" +ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim" +ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" +ALTERNATIVE_${PN}-agetty = "getty" +ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" +ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" +ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" +ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" +ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" +ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" +ALTERNATIVE_${PN}-last = "last lastb" +ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" +ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb" +ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger" +ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" +ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg" +ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" +ALTERNATIVE_LINK_NAME[mcookie] = "${bindir}/mcookie" +ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" +ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" +ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" +ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" +ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter" +ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" +ALTERNATIVE_LINK_NAME[prlimit] = "${bindir}/prlimit" +ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" +ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" +ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" +ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" +ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" +ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" +ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" +ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" +ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" +ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" +ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" +ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" +ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset" +ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" +ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" +ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" +ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" +ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" + +ALTERNATIVE_${PN}-doc = "\ +blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ +mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ +" +ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" + +ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" +ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" +ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" +ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" +ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" +ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" +ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" +ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" +ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" +ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" +ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" +ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" +ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" +ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" +ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" +ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" + + +BBCLASSEXTEND = "native nativesdk" + +PTEST_BINDIR = "1" +do_compile_ptest() { + oe_runmake buildtest-TESTS +} + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/ts + find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; + + cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ + cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected + cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ + cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} + + # The original paths of executables to be tested point to a local folder containing + # the executables. We want to test the installed executables, not the local copies. + # So strip the paths, the executables will be located via "which" + sed -i \ + -e '/^TS_CMD/ s|$top_builddir/||g' \ + -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ + ${D}${PTEST_PATH}/tests/commands.sh + + # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' + sed -i -e \ + '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ + ${D}${PTEST_PATH}/tests/functions.sh + + # Running "kill" without the the complete path would use the shell's built-in kill + sed -i -e \ + '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ + ${D}${PTEST_PATH}/tests/commands.sh + + + sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest + +} diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.36.bb b/poky/meta/recipes-core/util-linux/util-linux_2.36.bb deleted file mode 100644 index 474f1e188..000000000 --- a/poky/meta/recipes-core/util-linux/util-linux_2.36.bb +++ /dev/null @@ -1,359 +0,0 @@ -SUMMARY = "A suite of basic system administration utilities" -HOMEPAGE = "https://en.wikipedia.org/wiki/Util-linux" -DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ -commonly found on most Linux systems. Some of the more important utilities include \ -disk partitioning, kernel message management, filesystem creation, and system login." - -SECTION = "base" - -LICENSE = "GPLv2+ & LGPLv2.1+ & BSD-3-Clause & BSD-4-Clause" -LICENSE_${PN}-libblkid = "LGPLv2.1+" -LICENSE_${PN}-libfdisk = "LGPLv2.1+" -LICENSE_${PN}-libmount = "LGPLv2.1+" -LICENSE_${PN}-libsmartcols = "LGPLv2.1+" -LICENSE_${PN}-libuuid = "BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://README.licensing;md5=0fd5c050c6187d2bf0a4492b7f4e33da \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ - file://Documentation/licenses/COPYING.BSD-3-Clause;md5=58dcd8452651fc8b07d1f65ce07ca8af \ - file://Documentation/licenses/COPYING.BSD-4-Clause-UC;md5=263860f8968d8bafa5392cab74285262 \ - file://libuuid/COPYING;md5=6d2cafc999feb2c2de84d4d24b23290c \ - file://libmount/COPYING;md5=7c7e39fb7d70ffe5d693a643e29987c2 \ - file://libblkid/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ - file://libfdisk/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ - file://libsmartcols/COPYING;md5=693bcbbe16d3a4a4b37bc906bc01cc04 \ -" - -#gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest -DEPENDS = "libcap-ng ncurses virtual/crypt zlib" - -MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ - file://configure-sbindir.patch \ - file://runuser.pamd \ - file://runuser-l.pamd \ - file://ptest.patch \ - file://run-ptest \ - file://display_testname_for_subtest.patch \ - file://avoid_parallel_tests.patch \ - " -SRC_URI[sha256sum] = "9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1" - -PACKAGES =+ "${PN}-swaponoff" -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" - -python util_linux_binpackages () { - def pkg_hook(f, pkg, file_regex, output_pattern, modulename): - pn = d.getVar('PN') - d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) - - if d.getVar('ALTERNATIVE_' + pkg): - return - if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): - d.setVar('ALTERNATIVE_' + pkg, modulename) - - bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) - for dir in bindirs: - do_split_packages(d, root=dir, - file_regex=r'(.*)', output_pattern='${PN}-%s', - description='${PN} %s', - hook=pkg_hook, extra_depends='') - - # There are some symlinks for some binaries which we have ignored - # above. Add them to the package owning the binary they are - # pointing to - extras = {} - dvar = d.getVar('PKGD') - for root in bindirs: - for walkroot, dirs, files in os.walk(dvar + root): - for f in files: - file = os.path.join(walkroot, f) - if not os.path.islink(file): - continue - - pkg = os.path.basename(os.readlink(file)) - extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1) - - pn = d.getVar('PN') - for pkg, links in extras.items(): - of = d.getVar('FILES_' + pn + '-' + pkg) - links = of + links - d.setVar('FILES_' + pn + '-' + pkg, links) -} - -# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS -PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " - -python util_linux_libpackages() { - do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(.*)\.so\..*$', - output_pattern='${PN}-lib%s', - description='${PN} lib%s', - extra_depends='', prepend=True, allow_links=True) -} - -PACKAGESPLITFUNCS =+ "util_linux_libpackages" - -PACKAGES_DYNAMIC = "^${PN}-.*" - -CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" -UTIL_LINUX_LIBDIR = "${libdir}" -UTIL_LINUX_LIBDIR_class-target = "${base_libdir}" -EXTRA_OECONF = "\ - --enable-libuuid --enable-libblkid \ - \ - --enable-fsck --enable-kill --enable-last --enable-mesg \ - --enable-mount --enable-partx --enable-raw --enable-rfkill \ - --enable-unshare --enable-write \ - \ - --disable-bfs --disable-chfn-chsh --disable-login \ - --disable-makeinstall-chown --disable-minix --disable-newgrp \ - --disable-use-tty-group --disable-vipw \ - \ - --without-udev \ - \ - usrsbin_execdir='${sbindir}' \ - --libdir='${UTIL_LINUX_LIBDIR}' \ -" - -EXTRA_OECONF_append_class-target = " --enable-setpriv" -EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv" -EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv" -EXTRA_OECONF_append = " --disable-hwclock-gplv3" - -# enable pcre2 for native/nativesdk to match host distros -# this helps to keep same expectations when using the SDK or -# build host versions during development -# -PACKAGECONFIG ?= "pcre2" -PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -# inherit manpages requires this to be present, however util-linux does not have -# configuration options, and installs manpages always -PACKAGECONFIG[manpages] = "" -PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," -# Respect the systemd feature for uuidd -PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" -# Build python bindings for libmount -PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" -# Readline support -PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" -# PCRE support in hardlink -PACKAGECONFIG[pcre2] = ",,libpcre2" - -EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" - -ALLOW_EMPTY_${PN} = "1" -FILES_${PN} = "" -FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" -FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" -FILES_${PN}-mount = "${sysconfdir}/default/mountall" -FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*" -FILES_${PN}-su = "${sysconfdir}/pam.d/su-l" -CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l" -FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ - ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ - ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" - -# Util-linux' blkid replaces the e2fsprogs one -RCONFLICTS_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" -RREPLACES_${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" - -RRECOMMENDS_${PN}_class-native = "" -RRECOMMENDS_${PN}_class-nativesdk = "" -RDEPENDS_${PN}_class-native = "" -RDEPENDS_${PN}_class-nativesdk = "" - -RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev" - -RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" -RDEPENDS_${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs grep iproute2 kmod mdadm procps sed socat which xz" -RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug" -RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" -ALLOW_EMPTY_${PN}-swaponoff = "1" - -#SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim" -SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service" -SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable" -SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service" -SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable" - -do_install () { - # with ccache the timestamps on compiled files may - # end up earlier than on their inputs, this allows - # for the resultant compilation in the install step. - oe_runmake 'CC=${CC}' 'LD=${LD}' \ - 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install - - mkdir -p ${D}${base_bindir} - - sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" - sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin" - binprogs_a="dmesg getopt kill more umount mount login su mountpoint" - - if [ "${base_sbindir}" != "${sbindir}" ]; then - mkdir -p ${D}${base_sbindir} - for p in $sbinprogs $sbinprogs_a; do - if [ -f "${D}${sbindir}/$p" ]; then - mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" - fi - done - fi - - if [ "${base_bindir}" != "${bindir}" ]; then - mkdir -p ${D}${base_bindir} - for p in $binprogs_a; do - if [ -f "${D}${bindir}/$p" ]; then - mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" - fi - done - fi - - install -d ${D}${sysconfdir}/default/ - echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall - - rm -f ${D}${bindir}/chkdupexe -} - -do_install_append_class-target () { - if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then - install -d ${D}${sysconfdir}/pam.d - install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser - install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l - # Required for "su -" aka "su --login" because - # otherwise it uses "other", which has "auth pam_deny.so" - # and thus prevents the operation. - ln -s su ${D}${sysconfdir}/pam.d/su-l - fi -} -# nologin causes a conflict with shadow-native -# kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir}) -do_install_append_class-native () { - rm -f ${D}${base_sbindir}/nologin - rm -f ${D}${base_bindir}/kill -} - -ALTERNATIVE_PRIORITY = "80" - -ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" -ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" -ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" -ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt" -ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" -ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" -ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" -ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" -ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock" -ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" -ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" -ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim" -ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" -ALTERNATIVE_${PN}-agetty = "getty" -ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" -ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" -ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" -ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" -ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" -ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" -ALTERNATIVE_${PN}-last = "last lastb" -ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" -ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb" -ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger" -ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" -ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg" -ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" -ALTERNATIVE_LINK_NAME[mcookie] = "${bindir}/mcookie" -ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" -ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" -ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" -ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" -ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter" -ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" -ALTERNATIVE_LINK_NAME[prlimit] = "${bindir}/prlimit" -ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" -ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" -ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" -ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" -ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" -ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" -ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" -ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" -ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" -ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" -ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" -ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" -ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset" -ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" -ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" -ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" -ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" -ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" - -ALTERNATIVE_${PN}-doc = "\ -blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ -mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ -" -ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" - -ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" -ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" -ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" -ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" -ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" -ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" -ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" -ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" -ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" -ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" -ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" -ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" -ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" -ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" -ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" -ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" -ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" -ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" -ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" - - -BBCLASSEXTEND = "native nativesdk" - -PTEST_BINDIR = "1" -do_compile_ptest() { - oe_runmake buildtest-TESTS -} - -do_install_ptest() { - mkdir -p ${D}${PTEST_PATH}/tests/ts - find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; - - cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ - cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected - cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ - cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} - - # The original paths of executables to be tested point to a local folder containing - # the executables. We want to test the installed executables, not the local copies. - # So strip the paths, the executables will be located via "which" - sed -i \ - -e '/^TS_CMD/ s|$top_builddir/||g' \ - -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \ - ${D}${PTEST_PATH}/tests/commands.sh - - # Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]' - sed -i -e \ - '/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 2>/dev/null`|g' \ - ${D}${PTEST_PATH}/tests/functions.sh - - # Running "kill" without the the complete path would use the shell's built-in kill - sed -i -e \ - '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ - ${D}${PTEST_PATH}/tests/commands.sh - - - sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest - -} -- cgit v1.2.3