summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd-boot_250.4.bb (renamed from meta/recipes-core/systemd/systemd-boot_248.3.bb)20
-rw-r--r--meta/recipes-core/systemd/systemd-bootconf_1.00.bb6
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb8
-rw-r--r--meta/recipes-core/systemd/systemd-conf_1.0.bb4
-rw-r--r--meta/recipes-core/systemd/systemd-machine-units_1.0.bb4
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty.bb22
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl5
-rw-r--r--meta/recipes-core/systemd/systemd.inc9
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch453
-rw-r--r--meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch44
-rw-r--r--meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch50
-rw-r--r--meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch14
-rw-r--r--meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch39
-rw-r--r--meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch112
-rw-r--r--meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch16
-rw-r--r--meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch30
-rw-r--r--meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch144
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch326
-rw-r--r--meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch26
-rw-r--r--meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch6
-rw-r--r--meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch50
-rw-r--r--meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch23
-rw-r--r--meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch6
-rw-r--r--meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch4
-rw-r--r--meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch2
-rw-r--r--meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch2
-rw-r--r--meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch2
-rw-r--r--meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch8
-rw-r--r--meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch257
-rw-r--r--meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch4
-rw-r--r--meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch24
-rw-r--r--meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch22
-rw-r--r--meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch253
-rw-r--r--meta/recipes-core/systemd/systemd_250.4.bb (renamed from meta/recipes-core/systemd/systemd_248.3.bb)288
40 files changed, 1414 insertions, 967 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_248.3.bb b/meta/recipes-core/systemd/systemd-boot_250.4.bb
index 249e620f4e..23a64bf30d 100644
--- a/meta/recipes-core/systemd/systemd-boot_248.3.bb
+++ b/meta/recipes-core/systemd/systemd-boot_250.4.bb
@@ -3,15 +3,15 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
require conf/image-uefi.conf
-DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
+DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native python3-jinja2-native"
inherit meson pkgconfig gettext
inherit deploy
-LDFLAGS_prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
+LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
do_write_config[vardeps] += "CC OBJCOPY"
-do_write_config_append() {
+do_write_config:append() {
cat >${WORKDIR}/meson-${PN}.cross <<EOF
[binaries]
efi_cc = ${@meson_array('CC', d)}
@@ -19,11 +19,14 @@ objcopy = ${@meson_array('OBJCOPY', d)}
EOF
}
+# need to use ${HOST_PREFIX} here, otherwise ld.bfd could be used from HOSTTOOLS_NONFATAL
+EFI_LD = "bfd"
+
EXTRA_OEMESON += "-Defi=true \
-Dgnu-efi=true \
-Defi-includedir=${STAGING_INCDIR}/efi \
-Defi-libdir=${STAGING_LIBDIR} \
- -Defi-ld=${@ d.getVar('LD').split()[0]} \
+ -Defi-ld=${EFI_LD} \
-Dman=false \
--cross-file ${WORKDIR}/meson-${PN}.cross \
"
@@ -41,15 +44,15 @@ python __anonymous () {
d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
}
-FILES_${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
+FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
-RDEPENDS_${PN} += "virtual/systemd-bootconf"
+RDEPENDS:${PN} += "virtual-systemd-bootconf"
# Imported from the old gummiboot recipe
-TUNE_CCARGS_remove = "-mfpmath=sse"
+TUNE_CCARGS:remove = "-mfpmath=sse"
COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux"
-COMPATIBLE_HOST_x86-x32 = "null"
+COMPATIBLE_HOST:x86-x32 = "null"
do_compile() {
ninja \
@@ -68,3 +71,4 @@ do_deploy () {
}
addtask deploy before do_build after do_compile
+
diff --git a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
index d13b8c518f..19637546a9 100644
--- a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
+++ b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
@@ -2,7 +2,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SUMMARY = "Basic systemd-boot configuration files"
-RPROVIDES_${PN} += "virtual/systemd-bootconf"
+RPROVIDES:${PN} += "virtual-systemd-bootconf"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit systemd-boot-cfg
@@ -12,7 +12,7 @@ S = "${WORKDIR}"
LABELS = "boot"
ROOT ?= "root=/dev/sda2"
-APPEND_append = " ${ROOT}"
+APPEND:append = " ${ROOT}"
python do_configure() {
bb.build.exec_func('build_efi_cfg', d)
@@ -29,4 +29,4 @@ do_install() {
install *.conf ${D}/boot/loader/entries/
}
-FILES_${PN} = "/boot/loader/* /boot/loader/entries/*"
+FILES:${PN} = "/boot/loader/* /boot/loader/entries/*"
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index 361dc1cbb4..55ebf99117 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -12,7 +12,7 @@ inherit features_check
INHIBIT_DEFAULT_DEPS = "1"
-ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY:${PN} = "1"
REQUIRED_DISTRO_FEATURES = "systemd"
@@ -25,7 +25,7 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
syslog.busybox \
"
-pkg_postinst_${PN} () {
+pkg_postinst:${PN} () {
cd $D${sysconfdir}/init.d || exit 0
@@ -38,7 +38,7 @@ pkg_postinst_${PN} () {
fi
for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
- if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
+ if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_system_unitdir}/$i.service ] ; then
echo -n "$i: "
systemctl $OPTS mask $i.service
fi
@@ -46,4 +46,4 @@ pkg_postinst_${PN} () {
echo
}
-RDEPENDS_${PN} = "systemd"
+RDEPENDS:${PN} = "systemd"
diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb
index 235923be85..61ce7939d3 100644
--- a/meta/recipes-core/systemd/systemd-conf_1.0.bb
+++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb
@@ -29,13 +29,13 @@ do_install() {
}
# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
-do_install_append_qemuall() {
+do_install:append:qemuall() {
install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} = "\
+FILES:${PN} = "\
${systemd_unitdir}/journald.conf.d/ \
${systemd_unitdir}/logind.conf.d/ \
${systemd_unitdir}/system.conf.d/ \
diff --git a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
index 02756f43d7..12f27d6ae3 100644
--- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
+++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb
@@ -8,6 +8,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
PR = "r19"
inherit systemd
-SYSTEMD_SERVICE_${PN} = ""
+SYSTEMD_SERVICE:${PN} = ""
-ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index 34defeb3b1..fd888bb834 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -1,6 +1,6 @@
SUMMARY = "Serial terminal support for systemd"
HOMEPAGE = "https://www.freedesktop.org/wiki/Software/systemd/"
-LICENSE = "GPLv2+"
+LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
PR = "r5"
@@ -19,11 +19,11 @@ REQUIRED_DISTRO_FEATURES = "systemd"
do_install() {
if [ ! -z "${SERIAL_CONSOLES}" ] ; then
default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'`
- install -d ${D}${systemd_unitdir}/system/
+ install -d ${D}${systemd_system_unitdir}/
install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
- install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/
- sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_unitdir}/system/serial-getty@.service
- sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_unitdir}/system/serial-getty@.service
+ install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/
+ sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service
+ sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service
tmp="${SERIAL_CONSOLES}"
for entry in $tmp ; do
@@ -31,14 +31,14 @@ do_install() {
ttydev=`echo $entry | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'`
if [ "$baudrate" = "$default_baudrate" ] ; then
# enable the service
- ln -sf ${systemd_unitdir}/system/serial-getty@.service \
+ ln -sf ${systemd_system_unitdir}/serial-getty@.service \
${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service
else
# install custom service file for the non-default baudrate
- install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service
- sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_unitdir}/system/serial-getty$baudrate@.service
+ install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service
+ sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service
# enable the service
- ln -sf ${systemd_unitdir}/system/serial-getty$baudrate@.service \
+ ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \
${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty$baudrate@$ttydev.service
fi
done
@@ -46,7 +46,7 @@ do_install() {
}
# This is a machine specific file
-FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
+FILES:${PN} = "${systemd_system_unitdir}/*.service ${sysconfdir}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index e8c3d2d1ee..6324319a45 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -191,7 +191,7 @@ class SystemdUnit():
except KeyError:
pass
- def enable(self):
+ def enable(self, caller_unit=None):
# if we're enabling an instance, first extract the actual instance
# then figure out what the template unit is
template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit)
@@ -227,7 +227,8 @@ class SystemdUnit():
try:
for also in config.get('Install', 'Also'):
try:
- SystemdUnit(self.root, also).enable()
+ if caller_unit != also:
+ SystemdUnit(self.root, also).enable(unit)
except SystemdUnitNotFoundError as e:
sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit))
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 0524a25008..ac454b8afd 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -10,13 +10,12 @@ state, maintains mount and automount points and implements an \
elaborate transactional dependency-based service control logic. It can \
work as a drop-in replacement for sysvinit."
-LICENSE = "GPLv2 & LGPLv2.1"
+LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "37c4cfde0ce613f0f00544d3f4e2e72bf93d9c76"
-SRCBRANCH = "v248-stable"
-SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \
-"
+SRCREV = "c3aead556847dd2694d559620123b65ff16afe8c"
+SRCBRANCH = "v250-stable"
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
new file mode 100644
index 0000000000..2363679c98
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch
@@ -0,0 +1,453 @@
+From 4c2e932664ec67662f4a0306cca4a7cd82853bda Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Jan 2022 22:19:37 -0800
+Subject: [PATCH] Adjust for musl headers
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libsystemd-network/sd-dhcp6-client.c | 2 +-
+ src/network/netdev/bareudp.c | 2 +-
+ src/network/netdev/batadv.c | 2 +-
+ src/network/netdev/bond.c | 2 +-
+ src/network/netdev/bridge.c | 2 +-
+ src/network/netdev/dummy.c | 2 +-
+ src/network/netdev/geneve.c | 2 +-
+ src/network/netdev/ifb.c | 2 +-
+ src/network/netdev/ipoib.c | 2 +-
+ src/network/netdev/ipvlan.c | 2 +-
+ src/network/netdev/macsec.c | 2 +-
+ src/network/netdev/macvlan.c | 2 +-
+ src/network/netdev/netdev.c | 2 +-
+ src/network/netdev/netdevsim.c | 2 +-
+ src/network/netdev/nlmon.c | 2 +-
+ src/network/netdev/tunnel.c | 2 +-
+ src/network/netdev/vcan.c | 2 +-
+ src/network/netdev/veth.c | 2 +-
+ src/network/netdev/vlan.c | 2 +-
+ src/network/netdev/vrf.c | 2 +-
+ src/network/netdev/vxcan.c | 2 +-
+ src/network/netdev/vxlan.c | 2 +-
+ src/network/netdev/xfrm.c | 2 +-
+ src/network/networkd-bridge-mdb.c | 4 ++--
+ src/network/networkd-dhcp-common.c | 3 ++-
+ src/network/networkd-dhcp-prefix-delegation.c | 4 ++--
+ src/network/networkd-dhcp-server.c | 2 +-
+ src/network/networkd-dhcp4.c | 2 +-
+ src/network/networkd-link.c | 2 +-
+ src/network/networkd-route.c | 8 ++++----
+ src/network/networkd-setlink.c | 2 +-
+ src/shared/linux/ethtool.h | 3 ++-
+ src/shared/netif-util.c | 2 +-
+ src/udev/udev-builtin-net_id.c | 2 +-
+ 34 files changed, 41 insertions(+), 39 deletions(-)
+
+--- a/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/libsystemd-network/sd-dhcp6-client.c
+@@ -5,7 +5,7 @@
+
+ #include <errno.h>
+ #include <sys/ioctl.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_infiniband.h>
+
+ #include "sd-dhcp6-client.h"
+--- a/src/network/netdev/bareudp.c
++++ b/src/network/netdev/bareudp.c
+@@ -2,7 +2,7 @@
+ * Copyright © 2020 VMware, Inc. */
+
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "bareudp.h"
+ #include "netlink-util.h"
+--- a/src/network/netdev/batadv.c
++++ b/src/network/netdev/batadv.c
+@@ -3,7 +3,7 @@
+ #include <inttypes.h>
+ #include <netinet/in.h>
+ #include <linux/genetlink.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "batadv.h"
+ #include "fileio.h"
+--- a/src/network/netdev/bond.c
++++ b/src/network/netdev/bond.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "alloc-util.h"
+ #include "bond.h"
+--- a/src/network/netdev/bridge.c
++++ b/src/network/netdev/bridge.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_bridge.h>
+
+ #include "bridge.h"
+--- a/src/network/netdev/dummy.c
++++ b/src/network/netdev/dummy.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "dummy.h"
+
+--- a/src/network/netdev/geneve.c
++++ b/src/network/netdev/geneve.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "alloc-util.h"
+ #include "conf-parser.h"
+--- a/src/network/netdev/ifb.c
++++ b/src/network/netdev/ifb.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later
+ * Copyright © 2019 VMware, Inc. */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "ifb.h"
+
+--- a/src/network/netdev/ipoib.c
++++ b/src/network/netdev/ipoib.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_link.h>
+
+ #include "ipoib.h"
+--- a/src/network/netdev/ipvlan.c
++++ b/src/network/netdev/ipvlan.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "conf-parser.h"
+ #include "ipvlan.h"
+--- a/src/network/netdev/macsec.c
++++ b/src/network/netdev/macsec.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_ether.h>
+ #include <linux/if_macsec.h>
+ #include <linux/genetlink.h>
+--- a/src/network/netdev/macvlan.c
++++ b/src/network/netdev/macvlan.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "conf-parser.h"
+ #include "macvlan.h"
+--- a/src/network/netdev/netdev.c
++++ b/src/network/netdev/netdev.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <unistd.h>
+
+ #include "alloc-util.h"
+--- a/src/network/netdev/netdevsim.c
++++ b/src/network/netdev/netdevsim.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "netdevsim.h"
+
+--- a/src/network/netdev/nlmon.c
++++ b/src/network/netdev/nlmon.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "nlmon.h"
+
+--- a/src/network/netdev/tunnel.c
++++ b/src/network/netdev/tunnel.c
+@@ -2,7 +2,7 @@
+
+ #include <netinet/in.h>
+ #include <linux/fou.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_tunnel.h>
+ #include <linux/ip.h>
+ #include <linux/ip6_tunnel.h>
+--- a/src/network/netdev/vcan.c
++++ b/src/network/netdev/vcan.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "vcan.h"
+
+--- a/src/network/netdev/veth.c
++++ b/src/network/netdev/veth.c
+@@ -3,7 +3,7 @@
+ #include <errno.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/veth.h>
+
+ #include "netlink-util.h"
+--- a/src/network/netdev/vlan.c
++++ b/src/network/netdev/vlan.c
+@@ -2,7 +2,7 @@
+
+ #include <errno.h>
+ #include <net/if.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_vlan.h>
+
+ #include "parse-util.h"
+--- a/src/network/netdev/vrf.c
++++ b/src/network/netdev/vrf.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "vrf.h"
+
+--- a/src/network/netdev/vxcan.c
++++ b/src/network/netdev/vxcan.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include <linux/can/vxcan.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "vxcan.h"
+
+--- a/src/network/netdev/vxlan.c
++++ b/src/network/netdev/vxlan.c
+@@ -2,7 +2,7 @@
+
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "conf-parser.h"
+ #include "alloc-util.h"
+--- a/src/network/netdev/xfrm.c
++++ b/src/network/netdev/xfrm.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "missing_network.h"
+ #include "xfrm.h"
+--- a/src/network/networkd-bridge-mdb.c
++++ b/src/network/networkd-bridge-mdb.c
+@@ -1,7 +1,5 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <net/if.h>
+-#include <linux/if_bridge.h>
+
+ #include "netlink-util.h"
+ #include "networkd-bridge-mdb.h"
+@@ -11,6 +9,8 @@
+ #include "networkd-queue.h"
+ #include "string-util.h"
+ #include "vlan-util.h"
++#include <net/if.h>
++#include <linux/if_bridge.h>
+
+ #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
+
+--- 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 <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
++#include <net/if.h>
+
+ #include "bus-error.h"
+ #include "dhcp-identifier.h"
+--- a/src/network/networkd-dhcp-prefix-delegation.c
++++ b/src/network/networkd-dhcp-prefix-delegation.c
+@@ -1,7 +1,5 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/ipv6_route.h>
+-
+ #include "sd-dhcp6-client.h"
+
+ #include "hashmap.h"
+@@ -21,6 +19,8 @@
+ #include "strv.h"
+ #include "tunnel.h"
+
++#include <linux/ipv6_route.h>
++
+ bool link_dhcp_pd_is_enabled(Link *link) {
+ assert(link);
+
+--- a/src/network/networkd-dhcp-server.c
++++ b/src/network/networkd-dhcp-server.c
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if.h>
+
+ #include "sd-dhcp-server.h"
+--- a/src/network/networkd-dhcp4.c
++++ b/src/network/networkd-dhcp4.c
+@@ -3,7 +3,7 @@
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "alloc-util.h"
+ #include "dhcp-client-internal.h"
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -3,7 +3,7 @@
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_link.h>
+ #include <linux/netdevice.h>
+ #include <sys/socket.h>
+--- a/src/network/networkd-route.c
++++ b/src/network/networkd-route.c
+@@ -1,9 +1,5 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/icmpv6.h>
+-#include <linux/ipv6_route.h>
+-#include <linux/nexthop.h>
+-
+ #include "alloc-util.h"
+ #include "event-util.h"
+ #include "netlink-util.h"
+@@ -21,6 +17,10 @@
+ #include "vrf.h"
+ #include "wireguard.h"
+
++#include <linux/icmpv6.h>
++#include <linux/ipv6_route.h>
++#include <linux/nexthop.h>
++
+ int route_new(Route **ret) {
+ _cleanup_(route_freep) Route *route = NULL;
+
+--- a/src/network/networkd-setlink.c
++++ b/src/network/networkd-setlink.c
+@@ -2,7 +2,7 @@
+
+ #include <netinet/in.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/if_bridge.h>
+
+ #include "missing_network.h"
+--- a/src/shared/linux/ethtool.h
++++ b/src/shared/linux/ethtool.h
+@@ -16,7 +16,8 @@
+
+ #include <linux/kernel.h>
+ #include <linux/types.h>
+-#include <linux/if_ether.h>
++#include <netinet/if_ether.h>
++//#include <linux/if_ether.h>
+
+ #ifndef __KERNEL__
+ #include <limits.h> /* for INT_MAX */
+--- a/src/shared/netif-util.c
++++ b/src/shared/netif-util.c
+@@ -1,6 +1,6 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+
+ #include "arphrd-util.h"
+ #include "device-util.h"
+--- a/src/udev/udev-builtin-net_id.c
++++ b/src/udev/udev-builtin-net_id.c
+@@ -18,7 +18,7 @@
+ #include <stdarg.h>
+ #include <unistd.h>
+ #include <linux/if.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/netdevice.h>
+ #include <linux/pci_regs.h>
+
+--- a/src/network/netdev/wireguard.c
++++ b/src/network/netdev/wireguard.c
+@@ -6,7 +6,7 @@
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+-#include <linux/if_arp.h>
++//#include <linux/if_arp.h>
+ #include <linux/ipv6_route.h>
+
+ #include "sd-resolve.h"
diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 8dd22eeb7b..330ad492ba 100644
--- a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -1,4 +1,4 @@
-From 564830719be2017c4953589d50f21a9e856a4ecc Mon Sep 17 00:00:00 2001
+From f9974d7dc289551bfbf823b716fd32b43c54e465 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Thu, 21 Feb 2019 16:23:24 +0800
Subject: [PATCH] binfmt: Don't install dependency links at install time for
@@ -25,11 +25,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
units/systemd-binfmt.service.in | 4 ++++
3 files changed, 9 insertions(+), 4 deletions(-)
-Index: systemd-stable/units/meson.build
-===================================================================
---- systemd-stable.orig/units/meson.build
-+++ systemd-stable/units/meson.build
-@@ -55,8 +55,7 @@ units = [
+diff --git a/units/meson.build b/units/meson.build
+index a9bf28f6d9..11d3644168 100644
+--- a/units/meson.build
++++ b/units/meson.build
+@@ -63,8 +63,7 @@ units = [
['poweroff.target', '',
(with_runlevels ? 'runlevel0.target' : '')],
['printer.target', ''],
@@ -39,31 +39,31 @@ Index: systemd-stable/units/meson.build
['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
['reboot.target', '',
'ctrl-alt-del.target' + (with_runlevels ? ' runlevel6.target' : '')],
-@@ -166,8 +165,7 @@ in_units = [
- ['rc-local.service', 'HAVE_SYSV_COMPAT'],
+@@ -184,8 +183,7 @@ in_units = [
['rescue.service', ''],
+ ['serial-getty@.service', ''],
['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
- ['systemd-binfmt.service', 'ENABLE_BINFMT',
- 'sysinit.target.wants/'],
+ ['systemd-binfmt.service', 'ENABLE_BINFMT'],
- ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'],
+ ['systemd-bless-boot.service', 'HAVE_GNU_EFI HAVE_BLKID'],
['systemd-boot-check-no-failures.service', ''],
['systemd-coredump@.service', 'ENABLE_COREDUMP'],
-Index: systemd-stable/units/proc-sys-fs-binfmt_misc.automount
-===================================================================
---- systemd-stable.orig/units/proc-sys-fs-binfmt_misc.automount
-+++ systemd-stable/units/proc-sys-fs-binfmt_misc.automount
-@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 172c8757ab..f65d8930c6 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -19,3 +19,6 @@ ConditionPathIsReadWrite=/proc/sys/
[Automount]
Where=/proc/sys/fs/binfmt_misc
+
+[Install]
+WantedBy=sysinit.target
-Index: systemd-stable/units/systemd-binfmt.service.in
-===================================================================
---- systemd-stable.orig/units/systemd-binfmt.service.in
-+++ systemd-stable/units/systemd-binfmt.service.in
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index 96f595ad72..7c010bb224 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
@@ -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
@@ -71,10 +71,10 @@ Index: systemd-stable/units/systemd-binfmt.service.in
+Wants=proc-sys-fs-binfmt_misc.automount
After=proc-sys-fs-binfmt_misc.automount
After=proc-sys-fs-binfmt_misc.mount
- Before=sysinit.target shutdown.target
-@@ -30,3 +31,6 @@ RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- ExecStop=@rootlibexecdir@/systemd-binfmt --unregister
+ After=local-fs.target
+@@ -31,3 +32,6 @@ RemainAfterExit=yes
+ ExecStart={{ROOTLIBEXECDIR}}/systemd-binfmt
+ ExecStop={{ROOTLIBEXECDIR}}/systemd-binfmt --unregister
TimeoutSec=90s
+
+[Install]
diff --git a/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch
new file mode 100644
index 0000000000..03a29b5327
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch
@@ -0,0 +1,50 @@
+From fbc10748c7c59d82024a4d35146b8dfef8d52927 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Jan 2022 15:15:11 -0800
+Subject: [PATCH 1/2] pass correct parameters to getdents64
+
+Fixes
+../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types]
+ n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size);
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+../git/src/basic/stat-util.c:102:28: error: incompatible pointer types passing 'union (unnamed union at ../git/src/basic/stat-util.c:78:9) *' to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types]
+ n = getdents64(fd, &buffer, sizeof(buffer));
+ ^~~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/recurse-dir.c | 2 +-
+ src/basic/stat-util.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c
+index efa1797b7b..797285e3be 100644
+--- a/src/basic/recurse-dir.c
++++ b/src/basic/recurse-dir.c
+@@ -54,7 +54,7 @@ int readdir_all(int dir_fd,
+ bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX);
+ assert(bs > de->buffer_size);
+
+- n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size);
++ n = getdents64(dir_fd, de->buffer + de->buffer_size, bs - de->buffer_size);
+ if (n < 0)
+ return -errno;
+ if (n == 0)
+diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
+index efac7b002e..9e1fe7f5a0 100644
+--- a/src/basic/stat-util.c
++++ b/src/basic/stat-util.c
+@@ -99,7 +99,7 @@ int dir_is_empty_at(int dir_fd, const char *path) {
+ return fd;
+ }
+
+- n = getdents64(fd, &buffer, sizeof(buffer));
++ n = getdents64(fd, (struct dirent *)&buffer, sizeof(buffer));
+ if (n < 0)
+ return -errno;
+
+--
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch b/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
index 3af1daac9c..898e8af904 100644
--- a/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
+++ b/meta/recipes-core/systemd/systemd/0001-test-parse-argument-Include-signal.h.patch
@@ -1,4 +1,4 @@
-From 1adde6721ead386ccee6efe48038d6944b96319a Mon Sep 17 00:00:00 2001
+From 93c7e482d39cf7765974b3c729d29c1b120a60e3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 24 May 2021 18:26:27 -0700
Subject: [PATCH] test-parse-argument: Include signal.h
@@ -8,22 +8,20 @@ src/test/test-parse-argument.c:49:29: error: use of undeclared identifier 'SIGAB
Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19718]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/test/test-parse-argument.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/test-parse-argument.c b/src/test/test-parse-argument.c
-index 4081a9f25a..820d69f092 100644
+index cf3d54288a..15104e5282 100644
--- a/src/test/test-parse-argument.c
+++ b/src/test/test-parse-argument.c
-@@ -3,6 +3,7 @@
+@@ -5,6 +5,7 @@
#include "parse-argument.h"
#include "stdio-util.h"
#include "tests.h"
+#include <signal.h>
- static void test_parse_json_argument(void) {
- log_info("/* %s */", __func__);
---
-2.31.1
-
+ TEST(parse_json_argument) {
+ JsonFormatFlags flags = JSON_FORMAT_PRETTY;
diff --git a/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch b/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch
deleted file mode 100644
index 0ba5fa2547..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 027ac2ad0695bb506460f9dd7e57149b71055887 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Jun 2021 23:21:01 -0700
-Subject: [PATCH] test-seccomp: Check for __NR_ppoll before use
-
-some newer architectures like riscv32 do not have __NR_ppoll from get go
-
-Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/19858]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/test/test-seccomp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
-index b1f917eb54..daac0fcea8 100644
---- a/src/test/test-seccomp.c
-+++ b/src/test/test-seccomp.c
-@@ -832,7 +832,7 @@ static void test_load_syscall_filter_set_raw(void) {
- assert_se(s = hashmap_new(NULL));
- #if defined __NR_poll && __NR_poll >= 0
- assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(-1)) >= 0);
--#else
-+#elif defined __NR_ppoll
- assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0);
- #endif
-
-@@ -849,7 +849,8 @@ static void test_load_syscall_filter_set_raw(void) {
- assert_se(s = hashmap_new(NULL));
- #if defined __NR_poll && __NR_poll >= 0
- assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_poll + 1), INT_TO_PTR(EILSEQ)) >= 0);
--#else
-+#elif defined __NR_ppoll
-+ assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(-1)) >= 0);
- assert_se(hashmap_put(s, UINT32_TO_PTR(__NR_ppoll + 1), INT_TO_PTR(EILSEQ)) >= 0);
- #endif
-
---
-2.32.0
-
diff --git a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
new file mode 100644
index 0000000000..7dfa1a0df2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch
@@ -0,0 +1,29 @@
+From d16f7b37c917b91e951b9313e2c8264c72ed93e5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 21 Jan 2022 15:17:37 -0800
+Subject: [PATCH 2/2] Add sys/stat.h for S_IFDIR
+
+../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR'
+ r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR);
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/shared/mkdir-label.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c
+index d36a6466d7..63b764cd83 100644
+--- a/src/shared/mkdir-label.c
++++ b/src/shared/mkdir-label.c
+@@ -4,6 +4,7 @@
+ #include "selinux-util.h"
+ #include "smack-util.h"
+ #include "user-util.h"
++#include <sys/stat.h>
+
+ int mkdirat_label(int dirfd, const char *path, mode_t mode) {
+ int r;
+--
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
index 4cdf66e767..5027682df2 100644
--- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -1,4 +1,4 @@
-From 159c53612444ec1df492bae528a5a88a275b93bf Mon Sep 17 00:00:00 2001
+From 5d730902f47498a2866b46875352f6810a01d67c Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 13:41:41 +0800
Subject: [PATCH] don't use glibc-specific qsort_r
@@ -14,20 +14,18 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
- src/basic/sort-util.h | 14 ------------
- src/libsystemd/sd-hwdb/hwdb-util.c | 19 +++++++++++-----
- src/shared/format-table.c | 36 ++++++++++++++++++++----------
+ src/basic/sort-util.h | 14 --------------
+ src/shared/format-table.c | 36 ++++++++++++++++++++++++------------
+ src/shared/hwdb-util.c | 19 ++++++++++++++-----
3 files changed, 38 insertions(+), 31 deletions(-)
-diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index 49586a4a24..d92a5ab0ed 100644
--- a/src/basic/sort-util.h
+++ b/src/basic/sort-util.h
-@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f
- _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
+@@ -61,18 +61,4 @@ static inline void _qsort_safe(void *bas
+ _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \
})
--static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
+-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) {
- if (nmemb <= 1)
- return;
-
@@ -38,59 +36,13 @@ index 49586a4a24..d92a5ab0ed 100644
-#define typesafe_qsort_r(p, n, func, userdata) \
- ({ \
- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
-- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
+- qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \
- })
-
int cmp_int(const int *a, const int *b);
-diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
-index fd45ff0f54..ac4b63c49b 100644
---- a/src/libsystemd/sd-hwdb/hwdb-util.c
-+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
-@@ -126,9 +126,13 @@ static struct trie* trie_free(struct trie *trie) {
-
- DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
-
--static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
-- return strcmp(trie->strings->buf + a->key_off,
-- trie->strings->buf + b->key_off);
-+static struct trie *trie_node_add_value_trie;
-+static int trie_values_cmp(const void *v1, const void *v2) {
-+ const struct trie_value_entry *a = v1;
-+ const struct trie_value_entry *b = v2;
-+
-+ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
-+ trie_node_add_value_trie->strings->buf + b->key_off);
- }
-
- static int trie_node_add_value(struct trie *trie, struct trie_node *node,
-@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- .value_off = v,
- };
-
-- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
-+
- if (val) {
- /* At this point we have 2 identical properties on the same match-string.
- * Since we process files in order, we just replace the previous value. */
-@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
- .line_number = line_number,
- };
- node->values_count++;
-- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
-+ trie_node_add_value_trie = trie;
-+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
-+ trie_node_add_value_trie = NULL;
- return 0;
- }
-
-diff --git a/src/shared/format-table.c b/src/shared/format-table.c
-index dccb796b26..c3ab8ac296 100644
--- a/src/shared/format-table.c
+++ b/src/shared/format-table.c
-@@ -1290,30 +1290,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
+@@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData *
return CMP(index_a, index_b);
}
@@ -133,7 +85,7 @@ index dccb796b26..c3ab8ac296 100644
}
/* Order identical lines by the order there were originally added in */
-@@ -1952,7 +1954,12 @@ int table_print(Table *t, FILE *f) {
+@@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) {
for (size_t i = 0; i < n_rows; i++)
sorted[i] = i * t->n_columns;
@@ -147,7 +99,7 @@ index dccb796b26..c3ab8ac296 100644
}
if (t->display_map)
-@@ -2580,7 +2587,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
+@@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant
for (size_t i = 0; i < n_rows; i++)
sorted[i] = i * t->n_columns;
@@ -161,3 +113,45 @@ index dccb796b26..c3ab8ac296 100644
}
if (t->display_map)
+--- a/src/shared/hwdb-util.c
++++ b/src/shared/hwdb-util.c
+@@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri
+
+ DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
+
+-static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
+- return strcmp(trie->strings->buf + a->key_off,
+- trie->strings->buf + b->key_off);
++static struct trie *trie_node_add_value_trie;
++static int trie_values_cmp(const void *v1, const void *v2) {
++ const struct trie_value_entry *a = v1;
++ const struct trie_value_entry *b = v2;
++
++ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
++ trie_node_add_value_trie->strings->buf + b->key_off);
+ }
+
+ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
+@@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr
+ .value_off = v,
+ };
+
+- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
++
+ if (val) {
+ /* At this point we have 2 identical properties on the same match-string.
+ * Since we process files in order, we just replace the previous value. */
+@@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr
+ .line_number = line_number,
+ };
+ node->values_count++;
+- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
++ trie_node_add_value_trie = trie;
++ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
++ trie_node_add_value_trie = NULL;
+ return 0;
+ }
+
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
index 9b1768d9ca..f3edc7d82b 100644
--- a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
+++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
@@ -1,4 +1,4 @@
-From 4afb8adc83348bf75964fc10af7902e04dd62637 Mon Sep 17 00:00:00 2001
+From 3b42a888685aee1776a12cff84a5fe0063378483 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 13:55:12 +0800
Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t
@@ -21,8 +21,6 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
src/libsystemd/sd-journal/catalog.c | 1 +
4 files changed, 12 insertions(+)
-diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-index f6233090a9..aeaf6ad5ec 100644
--- a/src/basic/missing_type.h
+++ b/src/basic/missing_type.h
@@ -10,3 +10,12 @@
@@ -38,8 +36,6 @@ index f6233090a9..aeaf6ad5ec 100644
+#define __COMPAR_FN_T
+typedef int (*__compar_fn_t)(const void *, const void *);
+#endif
-diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
-index d92a5ab0ed..a63867c716 100644
--- a/src/basic/sort-util.h
+++ b/src/basic/sort-util.h
@@ -4,6 +4,7 @@
@@ -48,22 +44,18 @@ index d92a5ab0ed..a63867c716 100644
#include "macro.h"
+#include "missing_type.h"
- 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 8a7f82812a..a56f12f47f 100644
+ /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
+ * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -10,6 +10,7 @@
- #include "kmod-setup.h"
#include "macro.h"
+ #include "recurse-dir.h"
#include "string-util.h"
+#include "missing_type.h"
#if HAVE_KMOD
#include "module-util.h"
-diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
-index aea3241d18..75e6c56a28 100644
--- a/src/libsystemd/sd-journal/catalog.c
+++ b/src/libsystemd/sd-journal/catalog.c
@@ -28,6 +28,7 @@
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
index dc40a2fe8d..d93f630752 100644
--- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
+++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -1,7 +1,7 @@
-From 6c18e5f9373da3e3b38f2c5727e2aefe07fcbbd9 Mon Sep 17 00:00:00 2001
+From 3e0df2c22bfd37bc62bf09a01ec498e40d3599de Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sat, 22 May 2021 20:26:24 +0200
-Subject: [PATCH] [PATCH] add fallback parse_printf_format implementation
+Subject: [PATCH] add fallback parse_printf_format implementation
Upstream-Status: Inappropriate [musl specific]
@@ -10,6 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
[rebased for systemd 243]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
---
meson.build | 1 +
src/basic/meson.build | 5 +
@@ -21,11 +22,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
create mode 100644 src/basic/parse-printf-format.c
create mode 100644 src/basic/parse-printf-format.h
-diff --git a/meson.build b/meson.build
-index 27186d63a3..2abb7b3188 100644
--- a/meson.build
+++ b/meson.build
-@@ -675,6 +675,7 @@ endif
+@@ -686,6 +686,7 @@ endif
foreach header : ['crypt.h',
'linux/memfd.h',
'linux/vm_sockets.h',
@@ -33,11 +32,9 @@ index 27186d63a3..2abb7b3188 100644
'sys/auxv.h',
'valgrind/memcheck.h',
'valgrind/valgrind.h',
-diff --git a/src/basic/meson.build b/src/basic/meson.build
-index 60ef801a25..aba2172edd 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
-@@ -341,6 +341,11 @@ endforeach
+@@ -335,6 +335,11 @@ endforeach
basic_sources += generated_gperf_headers
@@ -49,9 +46,6 @@ index 60ef801a25..aba2172edd 100644
############################################################
arch_list = [
-diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
-new file mode 100644
-index 0000000000..49437e5445
--- /dev/null
+++ b/src/basic/parse-printf-format.c
@@ -0,0 +1,273 @@
@@ -328,9 +322,6 @@ index 0000000000..49437e5445
+
+ return last;
+}
-diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h
-new file mode 100644
-index 0000000000..47be7522d7
--- /dev/null
+++ b/src/basic/parse-printf-format.h
@@ -0,0 +1,57 @@
@@ -391,8 +382,6 @@ index 0000000000..47be7522d7
+size_t parse_printf_format(const char *fmt, size_t n, int *types);
+
+#endif /* HAVE_PRINTF_H */
-diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index 6dc1e72312..cea76b36cf 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -1,13 +1,13 @@
@@ -408,10 +397,8 @@ index 6dc1e72312..cea76b36cf 100644
#include "memory-util.h"
+#include "parse-printf-format.h"
- #define snprintf_ok(buf, len, fmt, ...) \
- ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
-diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
-index fd3fd7ef9c..e8e6ad555b 100644
+ #define snprintf_ok(buf, len, fmt, ...) \
+ ({ \
--- a/src/libsystemd/sd-journal/journal-send.c
+++ b/src/libsystemd/sd-journal/journal-send.c
@@ -2,7 +2,6 @@
@@ -430,6 +417,3 @@ index fd3fd7ef9c..e8e6ad555b 100644
#define SNDBUF_SIZE (8*1024*1024)
---
-2.24.0
-
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index 814c28f5b9..36545c2f60 100644
--- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -1,4 +1,4 @@
-From 6b0732ac7164914ce16e231e35980b849bdfc4c8 Mon Sep 17 00:00:00 2001
+From cef23a651ea200e30e1e6ed2a2564505e3a42d46 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 14:18:21 +0800
Subject: [PATCH] src/basic/missing.h: check for missing strndupa
@@ -29,9 +29,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
src/basic/mountpoint-util.c | 1 +
src/basic/parse-util.c | 1 +
src/basic/path-lookup.c | 1 +
+ src/basic/percent-util.c | 1 +
src/basic/proc-cmdline.c | 1 +
src/basic/procfs-util.c | 1 +
- src/basic/selinux-util.c | 1 +
src/basic/time-util.c | 1 +
src/boot/bless-boot.c | 1 +
src/core/dbus-cgroup.c | 1 +
@@ -74,14 +74,14 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/meson.build
+++ b/meson.build
-@@ -550,6 +550,7 @@ foreach ident : [
- ['execveat', '''#include <unistd.h>'''],
- ['close_range', '''#include <unistd.h>'''],
- ['epoll_pwait2', '''#include <sys/epoll.h>'''],
-+ ['strndupa' , '''#include <string.h>'''],
- ]
+@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec
+ endforeach
- have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+ foreach ident : [
++ ['strndupa' , '''#include <string.h>'''],
+ ['memfd_create', '''#include <sys/mman.h>'''],
+ ['gettid', '''#include <sys/types.h>
+ #include <unistd.h>'''],
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -19,6 +19,7 @@
@@ -94,7 +94,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
_cleanup_free_ char *link = NULL;
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
-@@ -38,6 +38,7 @@
+@@ -37,6 +37,7 @@
#include "unit-name.h"
#include "user-util.h"
#include "xattr-util.h"
@@ -104,7 +104,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
_cleanup_free_ char *fs = NULL;
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
-@@ -18,6 +18,7 @@
+@@ -19,6 +19,7 @@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
@@ -142,7 +142,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
+#endif
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
-@@ -14,6 +14,7 @@
+@@ -15,6 +15,7 @@
#include "stat-util.h"
#include "stdio-util.h"
#include "user-util.h"
@@ -152,17 +152,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
const char *path,
--- a/src/basic/mountpoint-util.c
+++ b/src/basic/mountpoint-util.c
-@@ -12,6 +12,7 @@
+@@ -13,6 +13,7 @@
#include "missing_stat.h"
#include "missing_syscall.h"
#include "mkdir.h"
+#include "missing_stdlib.h"
#include "mountpoint-util.h"
+ #include "nulstr-util.h"
#include "parse-util.h"
- #include "path-util.h"
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
-@@ -19,6 +19,7 @@
+@@ -18,6 +18,7 @@
#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
@@ -172,7 +172,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
if (!v)
--- a/src/basic/path-lookup.c
+++ b/src/basic/path-lookup.c
-@@ -15,6 +15,7 @@
+@@ -16,6 +16,7 @@
#include "strv.h"
#include "tmpfile-util.h"
#include "user-util.h"
@@ -180,6 +180,16 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
int xdg_user_runtime_dir(char **ret, const char *suffix) {
const char *e;
+--- a/src/basic/percent-util.c
++++ b/src/basic/percent-util.c
+@@ -3,6 +3,7 @@
+ #include "percent-util.h"
+ #include "string-util.h"
+ #include "parse-util.h"
++#include "missing_stdlib.h"
+
+ static int parse_parts_value_whole(const char *p, const char *symbol) {
+ const char *pc, *n;
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -15,6 +15,7 @@
@@ -192,27 +202,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
const char *e;
--- a/src/basic/procfs-util.c
+++ b/src/basic/procfs-util.c
-@@ -11,6 +11,7 @@
+@@ -12,6 +12,7 @@
#include "procfs-util.h"
#include "stdio-util.h"
#include "string-util.h"
+#include "missing_stdlib.h"
- int procfs_tasks_get_limit(uint64_t *ret) {
+ int procfs_get_pid_max(uint64_t *ret) {
_cleanup_free_ char *value = NULL;
---- a/src/basic/selinux-util.c
-+++ b/src/basic/selinux-util.c
-@@ -27,6 +27,7 @@
- #include "selinux-util.h"
- #include "stdio-util.h"
- #include "time-util.h"
-+#include "missing_stdlib.h"
-
- #if HAVE_SELINUX
- DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(context_t, context_free, NULL);
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
-@@ -27,6 +27,7 @@
+@@ -26,6 +26,7 @@
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
@@ -222,7 +222,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/src/boot/bless-boot.c
+++ b/src/boot/bless-boot.c
-@@ -18,6 +18,7 @@
+@@ -19,6 +19,7 @@
#include "util.h"
#include "verbs.h"
#include "virt.h"
@@ -230,19 +230,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static char **arg_path = NULL;
---- a/src/core/dbus-cgroup.c
-+++ b/src/core/dbus-cgroup.c
-@@ -17,6 +17,7 @@
- #include "limits-util.h"
- #include "path-util.h"
- #include "percent-util.h"
-+#include "missing_stdlib.h"
-
- BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
-
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
-@@ -41,6 +41,7 @@
+@@ -44,6 +44,7 @@
#include "unit-printf.h"
#include "user-util.h"
#include "utf8.h"
@@ -262,7 +252,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
sd_bus *bus,
--- a/src/core/execute.c
+++ b/src/core/execute.c
-@@ -96,6 +96,7 @@
+@@ -102,6 +102,7 @@
#include "unit-serialize.h"
#include "user-util.h"
#include "utmp-wtmp.h"
@@ -273,7 +263,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -11,6 +11,7 @@
- #include "macro.h"
+ #include "recurse-dir.h"
#include "string-util.h"
#include "missing_type.h"
+#include "missing_stdlib.h"
@@ -282,7 +272,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include "module-util.h"
--- a/src/core/service.c
+++ b/src/core/service.c
-@@ -41,6 +41,7 @@
+@@ -42,6 +42,7 @@
#include "unit.h"
#include "utf8.h"
#include "util.h"
@@ -312,7 +302,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
-@@ -72,6 +72,7 @@
+@@ -73,6 +73,7 @@
#include "unit-name.h"
#include "user-util.h"
#include "varlink.h"
@@ -352,7 +342,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
-@@ -41,6 +41,7 @@
+@@ -43,6 +43,7 @@
#include "string-util.h"
#include "strv.h"
#include "user-util.h"
@@ -372,7 +362,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/src/libsystemd/sd-journal/sd-journal.c
+++ b/src/libsystemd/sd-journal/sd-journal.c
-@@ -40,6 +40,7 @@
+@@ -41,6 +41,7 @@
#include "string-util.h"
#include "strv.h"
#include "syslog-util.h"
@@ -412,7 +402,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
# .network
--- a/src/nspawn/nspawn-settings.c
+++ b/src/nspawn/nspawn-settings.c
-@@ -16,6 +16,7 @@
+@@ -17,6 +17,7 @@
#include "strv.h"
#include "user-util.h"
#include "util.h"
@@ -428,23 +418,23 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
#include "string-util.h"
+#include "missing_stdlib.h"
- static void setup_logging(void) {
- /* We need a dummy function because log_parse_environment is a macro. */
+ static void setup_logging_once(void) {
+ static pthread_once_t once = PTHREAD_ONCE_INIT;
--- a/src/portable/portable.c
+++ b/src/portable/portable.c
-@@ -32,6 +32,7 @@
+@@ -39,6 +39,7 @@
#include "strv.h"
#include "tmpfile-util.h"
#include "user-util.h"
+#include "missing_stdlib.h"
- static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
-
+ /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was
+ * dropped there by the portable service logic and b) for which image it was dropped there. */
--- a/src/resolve/resolvectl.c
+++ b/src/resolve/resolvectl.c
-@@ -41,6 +41,7 @@
- #include "terminal-util.h"
+@@ -43,6 +43,7 @@
#include "utf8.h"
+ #include "verb-log-control.h"
#include "verbs.h"
+#include "missing_stdlib.h"
@@ -472,7 +462,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
char *cgroup_path;
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
-@@ -45,6 +45,7 @@
+@@ -49,6 +49,7 @@
#include "unit-def.h"
#include "user-util.h"
#include "utf8.h"
@@ -502,7 +492,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
const char *n;
--- a/src/shared/journal-importer.c
+++ b/src/shared/journal-importer.c
-@@ -14,6 +14,7 @@
+@@ -15,6 +15,7 @@
#include "parse-util.h"
#include "string-util.h"
#include "unaligned.h"
@@ -512,7 +502,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
-@@ -41,6 +41,7 @@
+@@ -42,6 +42,7 @@
#include "utf8.h"
#include "util.h"
#include "web-util.h"
@@ -552,14 +542,14 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
-@@ -6,6 +6,7 @@
- #include "hexdecoct.h"
+@@ -7,6 +7,7 @@
#include "macro.h"
+ #include "random-util.h"
#include "string-util.h"
+#include "missing_stdlib.h"
+ #include "tests.h"
- static void test_hexchar(void) {
- assert_se(hexchar(0xa) == 'a');
+ TEST(hexchar) {
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
@@ -22,6 +22,7 @@
@@ -572,7 +562,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
static void path_prepend(char **path, const char *fmt, ...) {
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
-@@ -33,6 +33,7 @@
+@@ -35,6 +35,7 @@
#include "udev-util.h"
#include "udev-watch.h"
#include "user-util.h"
@@ -582,21 +572,31 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
sd_device *device;
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
-@@ -31,6 +31,7 @@
- #include "udev-rules.h"
+@@ -34,6 +34,7 @@
+ #include "udev-util.h"
#include "user-util.h"
#include "virt.h"
+#include "missing_stdlib.h"
#define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
---- a/src/basic/percent-util.c
-+++ b/src/basic/percent-util.c
-@@ -3,6 +3,7 @@
- #include "percent-util.h"
- #include "string-util.h"
+--- a/src/core/dbus-cgroup.c
++++ b/src/core/dbus-cgroup.c
+@@ -21,6 +21,7 @@
#include "parse-util.h"
+ #include "path-util.h"
+ #include "percent-util.h"
+#include "missing_stdlib.h"
+ #include "socket-util.h"
- static int parse_parts_value_whole(const char *p, const char *symbol) {
- const char *pc, *n;
+ BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -29,6 +29,7 @@
+ #include "util.h"
+ #include "virt.h"
+ #include "volatile-util.h"
++#include "missing_stdlib.h"
+
+ typedef enum MountPointFlags {
+ MOUNT_NOAUTO = 1 << 0,
diff --git a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
deleted file mode 100644
index 54d714266e..0000000000
--- a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ /dev/null
@@ -1,326 +0,0 @@
-From 2069f0b0d5ab8f869aeba635a347e0b11d362b30 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 26 Oct 2017 22:10:42 -0700
-Subject: [PATCH] Include netinet/if_ether.h
-
-Fixes
-/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
- struct ethhdr {
- ^~~~~~
-
-and related arphdr, arpreq, and arpreq_old errors
-/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
- struct arphdr {
- ^~~~~~
-
-The latter requires removing some includes of net/if_arp.h to avoid
-conflicting with netinet/if_ether.h.
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-[rebased for systemd 243]
-Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-[rebased for systemd 243]
-Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-[rebased for systemd 247]
-Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
-
----
- src/libsystemd-network/sd-dhcp6-client.c | 1 -
- src/libsystemd/sd-netlink/netlink-types.c | 1 +
- src/machine/machine-dbus.c | 1 +
- src/network/netdev/bond.c | 1 +
- src/network/netdev/bridge.c | 1 +
- src/network/netdev/macsec.c | 1 +
- src/network/netdev/netdev-gperf.gperf | 1 +
- src/network/netdev/netdev.c | 1 +
- src/network/networkd-brvlan.c | 1 +
- src/network/networkd-dhcp-common.c | 4 +++-
- src/network/networkd-dhcp-server.c | 4 ++--
- src/network/networkd-dhcp4.c | 2 +-
- src/network/networkd-dhcp6.c | 2 +-
- src/network/networkd-link.c | 2 +-
- src/network/networkd-network.c | 1 +
- src/network/networkd-route.c | 5 ++++-
- src/network/test-network-tables.c | 1 +
- src/shared/ethtool-util.c | 1 +
- src/shared/ethtool-util.h | 1 +
- src/udev/net/link-config.c | 1 +
- src/udev/udev-builtin-net_setup_link.c | 1 +
- 21 files changed, 26 insertions(+), 8 deletions(-)
-
-diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
-index 410bfda10e..e70ed8be92 100644
---- a/src/libsystemd-network/sd-dhcp6-client.c
-+++ b/src/libsystemd-network/sd-dhcp6-client.c
-@@ -5,7 +5,6 @@
-
- #include <errno.h>
- #include <sys/ioctl.h>
--#include <linux/if_arp.h>
- #include <linux/if_infiniband.h>
-
- #include "sd-dhcp6-client.h"
-diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
-index ed7b9a8cd1..112c0b09e4 100644
---- a/src/libsystemd/sd-netlink/netlink-types.c
-+++ b/src/libsystemd/sd-netlink/netlink-types.c
-@@ -3,6 +3,7 @@
- #include <netinet/in.h>
- #include <stdint.h>
- #include <sys/socket.h>
-+#include <netinet/if_ether.h>
- #include <linux/can/vxcan.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
-diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
-index e7c4ed3c7c..3a1e4f9072 100644
---- a/src/machine/machine-dbus.c
-+++ b/src/machine/machine-dbus.c
-@@ -3,6 +3,7 @@
- #include <errno.h>
- #include <sys/mount.h>
- #include <sys/wait.h>
-+#include <netinet/if_ether.h>
-
- /* When we include libgen.h because we need dirname() we immediately
- * undefine basename() since libgen.h defines it as a macro to the POSIX
-diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
-index cf7ca88d6f..34ab468191 100644
---- a/src/network/netdev/bond.c
-+++ b/src/network/netdev/bond.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include "alloc-util.h"
- #include "bond.h"
- #include "bond-util.h"
-diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
-index 38432f1578..79ccfe578e 100644
---- a/src/network/netdev/bridge.c
-+++ b/src/network/netdev/bridge.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <net/if.h>
-
- #include "bridge.h"
-diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
-index 77c5f8c4e7..04be1b4ab2 100644
---- a/src/network/netdev/macsec.c
-+++ b/src/network/netdev/macsec.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <linux/if_ether.h>
- #include <linux/if_macsec.h>
-diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
-index 8abe044890..3c54c58928 100644
---- a/src/network/netdev/netdev-gperf.gperf
-+++ b/src/network/netdev/netdev-gperf.gperf
-@@ -3,6 +3,7 @@
- #if __GNUC__ >= 7
- _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
- #endif
-+#include <netinet/if_ether.h>
- #include <stddef.h>
- #include "bareudp.h"
- #include "batadv.h"
-diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
-index b31f0fa81a..c80e1ff537 100644
---- a/src/network/netdev/netdev.c
-+++ b/src/network/netdev/netdev.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <net/if.h>
- #include <netinet/in.h>
- #include <unistd.h>
-diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
-index 2847b336c9..4d6af8c642 100644
---- a/src/network/networkd-brvlan.c
-+++ b/src/network/networkd-brvlan.c
-@@ -4,6 +4,7 @@
- ***/
-
- #include <netinet/in.h>
-+#include <netinet/if_ether.h>
- #include <linux/if_bridge.h>
- #include <stdbool.h>
-
-diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
-index 00d055cf8d..65821c1d31 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 <netinet/in.h>
--#include <linux/if_arp.h>
-+#include <net/if_arp.h>
-+#include <net/if.h>
-
- #include "bus-error.h"
- #include "dhcp-internal.h"
-@@ -11,6 +12,7 @@
- #include "networkd-dhcp-common.h"
- #include "networkd-link.h"
- #include "networkd-manager.h"
-+#include <netinet/if_ether.h>
- #include "networkd-network.h"
- #include "parse-util.h"
- #include "socket-util.h"
-diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
-index 5cdf432c27..93cffb9863 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 <netinet/in.h>
--#include <linux/if_arp.h>
--#include <linux/if.h>
-+#include <net/if_arp.h>
-+#include <net/if.h>
-
- #include "sd-dhcp-server.h"
-
-diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
-index 23dc3a45db..7ae6c2467a 100644
---- a/src/network/networkd-dhcp4.c
-+++ b/src/network/networkd-dhcp4.c
-@@ -1,9 +1,9 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #include <linux/if.h>
--#include <linux/if_arp.h>
-
- #include "escape.h"
- #include "alloc-util.h"
-diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
-index aa077d6219..4f6ce22059 100644
---- a/src/network/networkd-dhcp6.c
-+++ b/src/network/networkd-dhcp6.c
-@@ -3,9 +3,9 @@
- Copyright © 2014 Intel Corporation. All rights reserved.
- ***/
-
-+#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <linux/if.h>
--#include <linux/if_arp.h>
-
- #include "sd-dhcp6-client.h"
-
-diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index 8219d95b0d..c92230453b 100644
---- a/src/network/networkd-link.c
-+++ b/src/network/networkd-link.c
-@@ -1,8 +1,8 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <netinet/in.h>
- #include <linux/if.h>
--#include <linux/if_arp.h>
- #include <linux/if_link.h>
- #include <unistd.h>
-
-diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
-index e5ffd35b6f..871ebb32c6 100644
---- a/src/network/networkd-network.c
-+++ b/src/network/networkd-network.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <net/if.h>
- #include <netinet/in.h>
- #include <linux/netdevice.h>
-diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
-index a74541a6c9..a10549b336 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 <linux/icmpv6.h>
--#include <linux/ipv6_route.h>
-+/* 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 ce34449554..0b5dc01182 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 <netinet/if_ether.h>
- #include "bond.h"
- #include "dhcp6-internal.h"
- #include "dhcp6-protocol.h"
-diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
-index 654d36a83a..f4ed42d543 100644
---- a/src/shared/ethtool-util.c
-+++ b/src/shared/ethtool-util.c
-@@ -1,5 +1,6 @@
- /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
-+#include <netinet/if_ether.h>
- #include <net/if.h>
- #include <sys/ioctl.h>
- #include <linux/ethtool.h>
-diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
-index 11e2906681..a171df0737 100644
---- a/src/shared/ethtool-util.h
-+++ b/src/shared/ethtool-util.h
-@@ -3,6 +3,7 @@
-
- #include <macro.h>
- #include <net/ethernet.h>
-+#include <netinet/if_ether.h>
- #include <linux/ethtool.h>
-
- #include "conf-parser.h"
-diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
-index 31e5d0cd67..f25f821364 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-or-later */
-
-+#include <netinet/if_ether.h>
- #include <linux/netdevice.h>
- #include <netinet/ether.h>
- #include <unistd.h>
-diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
-index 87e1fb133e..13876029d0 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-or-later */
-
-+#include <netinet/if_ether.h>
- #include "alloc-util.h"
- #include "device-util.h"
- #include "errno-util.h"
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index 2ff08c7fae..846c01bd4f 100644
--- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -1,4 +1,4 @@
-From bca73ff2fbff2dc311040a87a4f536f89af07ad6 Mon Sep 17 00:00:00 2001
+From fb068403b25002156435350165ea418a6338a313 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 14:56:21 +0800
Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined
@@ -23,8 +23,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
src/tmpfiles/tmpfiles.c | 10 ++++++++++
3 files changed, 38 insertions(+)
-diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
-index bc0278e57f..c973f82e54 100644
--- a/src/basic/glob-util.c
+++ b/src/basic/glob-util.c
@@ -12,6 +12,12 @@
@@ -48,7 +46,7 @@ index bc0278e57f..c973f82e54 100644
/* 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) {
+@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag
pglob->gl_lstat = lstat;
if (!pglob->gl_stat)
pglob->gl_stat = stat;
@@ -63,12 +61,10 @@ index bc0278e57f..c973f82e54 100644
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"
+@@ -13,6 +13,12 @@
+ #include "tests.h"
#include "tmpfile-util.h"
+/* Don't fail if the standard library
@@ -77,10 +73,10 @@ index df6444c433..79a692046e 100644
+#define GLOB_BRACE 0
+#endif
+
- static void test_glob_exists(void) {
+ TEST(glob_exists) {
char name[] = "/tmp/test-glob_exists.XXXXXX";
int fd = -1;
-@@ -39,11 +45,13 @@ static void test_glob_no_dot(void) {
+@@ -40,11 +46,13 @@ TEST(glob_no_dot) {
const char *fn;
_cleanup_globfree_ glob_t g = {
@@ -94,7 +90,7 @@ index df6444c433..79a692046e 100644
};
int r;
-@@ -51,11 +59,19 @@ static void test_glob_no_dot(void) {
+@@ -52,11 +60,19 @@ TEST(glob_no_dot) {
assert_se(mkdtemp(template));
fn = strjoina(template, "/*");
@@ -114,11 +110,9 @@ index df6444c433..79a692046e 100644
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 6b73d1e6d5..26b3b74275 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
-@@ -66,6 +66,12 @@
+@@ -67,6 +67,12 @@
#include "umask-util.h"
#include "user-util.h"
@@ -131,7 +125,7 @@ index 6b73d1e6d5..26b3b74275 100644
/* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
* them in the file system. This is intended to be used to create
* properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -1947,7 +1953,9 @@ finish:
+@@ -1961,7 +1967,9 @@ finish:
static int glob_item(Item *i, action_t action) {
_cleanup_globfree_ glob_t g = {
@@ -141,7 +135,7 @@ index 6b73d1e6d5..26b3b74275 100644
};
int r = 0, k;
char **fn;
-@@ -1967,7 +1975,9 @@ static int glob_item(Item *i, action_t action) {
+@@ -1981,7 +1989,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 = {
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
index 142ca01345..57e18a5808 100644
--- a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
@@ -1,4 +1,4 @@
-From e0d1912f0246c97e5e7b4177691363d2d077e11d Mon Sep 17 00:00:00 2001
+From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:00:06 +0800
Subject: [PATCH] add missing FTW_ macros for musl
@@ -13,13 +13,12 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/basic/missing_type.h | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
+ src/shared/mount-setup.c | 1 +
+ 2 files changed, 21 insertions(+)
-diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
-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 *);
+@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi
#define __COMPAR_FN_T
typedef int (*__compar_fn_t)(const void *, const void *);
#endif
@@ -43,3 +42,23 @@ index aeaf6ad5ec..3df1084ef2 100644
+#ifndef FTW_SKIP_SIBLINGS
+#define FTW_SKIP_SIBLINGS 3
+#endif
+--- a/src/shared/mount-setup.c
++++ b/src/shared/mount-setup.c
+@@ -32,6 +32,7 @@
+ #include "strv.h"
+ #include "user-util.h"
+ #include "virt.h"
++#include "missing_type.h"
+
+ typedef enum MountMode {
+ MNT_NONE = 0,
+--- a/src/test/test-recurse-dir.c
++++ b/src/test/test-recurse-dir.c
+@@ -6,6 +6,7 @@
+ #include "recurse-dir.h"
+ #include "strv.h"
+ #include "tests.h"
++#include "missing_type.h"
+
+ static char **list_nftw = NULL;
+
diff --git a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
index 53f0a1ba62..0fc320420e 100644
--- a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -1,4 +1,4 @@
-From bb41fe773881a8f1d9615d388320b9c6fc47bfe5 Mon Sep 17 00:00:00 2001
+From c7453b716ae308b89cf4b2b231a36ddd38a49752 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:03:47 +0800
Subject: [PATCH] fix missing of __register_atfork for non-glibc builds
@@ -12,7 +12,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
1 file changed, 7 insertions(+)
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index 7d4301eadb..caa9dfe3a3 100644
+index 461bbfe9a5..2d06f9f60a 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -18,6 +18,9 @@
@@ -25,7 +25,7 @@ index 7d4301eadb..caa9dfe3a3 100644
#include "alloc-util.h"
#include "architecture.h"
-@@ -1121,11 +1124,15 @@ void reset_cached_pid(void) {
+@@ -1202,11 +1205,15 @@ void reset_cached_pid(void) {
cached_pid = CACHED_PID_UNSET;
}
diff --git a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
index 940db4c5c6..029f413aa8 100644
--- a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,4 +1,4 @@
-From dc40487e0ac26e3ca317429b9c3e8f01772de60a Mon Sep 17 00:00:00 2001
+From 856010e268a6aca8e5f02502457afe289bd877f1 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:12:41 +0800
Subject: [PATCH] Use uintmax_t for handling rlim_t
@@ -23,16 +23,14 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/basic/format-util.h | 8 +-------
- src/basic/rlimit-util.c | 10 +++++-----
+ src/basic/rlimit-util.c | 12 ++++++------
src/core/execute.c | 4 ++--
- 3 files changed, 8 insertions(+), 14 deletions(-)
+ 3 files changed, 9 insertions(+), 15 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"
+@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32
+ # error Unknown timex member size
#endif
-#if SIZEOF_RLIM_T == 8
@@ -46,38 +44,36 @@ index b7e18768e3..3195ab205d 100644
#if SIZEOF_DEV_T == 8
# define DEV_FMT "%" PRIu64
-diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
-index 23d108d5df..b037734ee3 100644
--- a/src/basic/rlimit-util.c
+++ b/src/basic/rlimit-util.c
-@@ -43,7 +43,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) {
+@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons
fixed.rlim_max == highest.rlim_max)
return 0;
- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max);
+ log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max);
- if (setrlimit(resource, &fixed) < 0)
- return -errno;
-@@ -308,13 +308,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
+ return RET_NERRNO(setrlimit(resource, &fixed));
+ }
+@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r
if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
- s = strdup("infinity");
+ r = free_and_strdup(&s, "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);
+- r = asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max);
++ r = 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);
+- r = asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur);
++ r = 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);
+- r = asprintf(&s, RLIM_FMT, rl->rlim_cur);
++ r = 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)
+- r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max);
++ r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max);
+ if (r < 0)
return -ENOMEM;
-@@ -405,7 +405,7 @@ int rlimit_nofile_safe(void) {
+
+@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) {
rl.rlim_cur = FD_SETSIZE;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
@@ -86,11 +82,9 @@ index 23d108d5df..b037734ee3 100644
return 1;
}
-diff --git a/src/core/execute.c b/src/core/execute.c
-index f82fc294c0..4696d055a8 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
-@@ -5370,9 +5370,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
+@@ -5639,9 +5639,9 @@ void exec_context_dump(const ExecContext
for (unsigned i = 0; i < RLIM_NLIMITS; i++)
if (c->rlimit[i]) {
fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
diff --git a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
index b1d782719c..327084bae9 100644
--- a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -1,4 +1,4 @@
-From f8be7b283309e4332eedc088774daac637afef7b Mon Sep 17 00:00:00 2001
+From ad395dda5db9b1ae156be121cfc8a38960de6c55 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Wed, 28 Feb 2018 21:25:22 -0800
Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl
@@ -12,8 +12,6 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/test/test-sizeof.c | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index 3c9dc180fa..e1a59d408c 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -55,8 +55,10 @@ int main(void) {
@@ -24,10 +22,10 @@ index 3c9dc180fa..e1a59d408c 100644
info(__syscall_ulong_t);
info(__syscall_slong_t);
+#endif
+ info(intmax_t);
+ info(uintmax_t);
- info(float);
- info(double);
-@@ -74,7 +76,9 @@ int main(void) {
+@@ -76,7 +78,9 @@ int main(void) {
info(ssize_t);
info(time_t);
info(usec_t);
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index 5f2178734d..0026a7b72a 100644
--- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -1,4 +1,4 @@
-From 06915b70735caa66987af758ebdc4207757ae758 Mon Sep 17 00:00:00 2001
+From 5d4c6b2f4b88b69b31f967371d2a6136c65dc3fd Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 10 Oct 2017 14:33:30 -0700
Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
@@ -31,16 +31,12 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
src/shared/base-filesystem.c | 6 +++---
2 files changed, 24 insertions(+), 5 deletions(-)
-diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
-index 027037f7a7..16eb379caf 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
-@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]);
+@@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct
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) < 0 ? -errno : 0)
+/*
+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
+ do and it's not portable (not supported by musl). See:
@@ -60,25 +56,24 @@ index 027037f7a7..16eb379caf 100644
+ 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)
+ #define laccess(path, mode) \
+- RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW))
++ RET_NERRNO(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) {
+@@ -117,7 +117,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 ++) {
+ for (size_t 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) {
+@@ -125,7 +125,7 @@ int base_filesystem_create(const char *r
/* check if one of the targets exists */
NULSTR_FOREACH(s, table[i].target) {
@@ -87,7 +82,7 @@ index 1d05409086..1ed06c31ab 100644
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) {
+@@ -136,7 +136,7 @@ int base_filesystem_create(const char *r
if (!p)
return log_oom();
diff --git a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index 51b145729d..612a535d3c 100644
--- a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -1,4 +1,4 @@
-From 0c44af262cfa07c57db4b32de1f7610af47797f4 Mon Sep 17 00:00:00 2001
+From 1803ea271b93370fdcf7ec497277344f1e775429 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 27 May 2018 08:36:44 -0700
Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
@@ -14,11 +14,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src/machine/machine-dbus.c | 5 +++++
1 file changed, 5 insertions(+)
-diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
-index 3a1e4f9072..ab87b9882c 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
-@@ -11,6 +11,11 @@
+@@ -10,6 +10,11 @@
#include <libgen.h>
#undef basename
diff --git a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index 7444d4375f..baf4903803 100644
--- a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -1,4 +1,4 @@
-From 0f4b60e34a806055c678eb97a7ec7e21291bcf48 Mon Sep 17 00:00:00 2001
+From 30b08f76ea7f5c324afedf97f0867b76dac9f128 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Wed, 4 Jul 2018 15:00:44 +0800
Subject: [PATCH] Do not disable buffering when writing to oom_score_adj
@@ -24,16 +24,14 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
src/basic/process-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/basic/process-util.c b/src/basic/process-util.c
-index caa9dfe3a3..6101f43db5 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
-@@ -1523,7 +1523,7 @@ int set_oom_score_adjust(int value) {
- sprintf(t, "%i", value);
+@@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) {
+ xsprintf(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) {
+ int get_oom_score_adjust(int *ret) {
diff --git a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index 90cc70d216..878914b307 100644
--- a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -1,4 +1,4 @@
-From c30ab62d18ce88187f5eb6c236e0977c9337f68d Mon Sep 17 00:00:00 2001
+From 873202f63f9f117c6e5a98e444cc709057042979 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 10 Jul 2018 15:40:17 +0800
Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi
@@ -24,11 +24,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/libsystemd/sd-journal/journal-send.c | 5 +++++
2 files changed, 10 insertions(+)
-diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
-index 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) {
+@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er
return;
errno = 0;
@@ -41,11 +39,9 @@ index 8da2024a50..9605a9b869 100644
if (errno == ERANGE || strlen(x) >= k - 1) {
free(m);
k *= 2;
-diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
-index e8e6ad555b..8ca5271d02 100644
--- a/src/libsystemd/sd-journal/journal-send.c
+++ b/src/libsystemd/sd-journal/journal-send.c
-@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
+@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co
char* j;
errno = 0;
diff --git a/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
index de7f9ecfa2..e6507c5f89 100644
--- a/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
+++ b/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -1,4 +1,4 @@
-From fa86e5578256dddb296fd30128929ea7c4b792a4 Mon Sep 17 00:00:00 2001
+From e7441559266074e7a33e3c11ff5cdaf5ba9c0e24 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:18:00 +0800
Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
@@ -17,7 +17,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
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
+index c49be29e46..90731bd7e7 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -55,8 +55,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
diff --git a/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
index d9ef2b8a47..eeff693bc4 100644
--- a/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
+++ b/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
@@ -1,4 +1,4 @@
-From 11e730694706fa354a0e43c588ef66677a777d9a Mon Sep 17 00:00:00 2001
+From 64f4d2eb976b9f23ce85b3655a876f7299eafd58 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:27:54 +0800
Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition
diff --git a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
index 3b60854233..5ca5386289 100644
--- a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
+++ b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
@@ -1,4 +1,4 @@
-From 45bae28d3da6607d33d54f4b30a500f5249aadde Mon Sep 17 00:00:00 2001
+From d95330f328c23c1cd6c51aeca43f081746cf2899 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:44:54 +0800
Subject: [PATCH] avoid redefinition of prctl_mm_map structure
diff --git a/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch b/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
index 7d6433f317..d51ac4265a 100644
--- a/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
+++ b/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
@@ -1,4 +1,4 @@
-From 6e593ff2afbe4bfe15eee2ec34e51490a38462f5 Mon Sep 17 00:00:00 2001
+From 2284f2f44b1b30f10b9196e0f5c6d0a2e0c1871f Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Fri, 7 Aug 2020 15:19:27 +0000
Subject: [PATCH] Handle missing LOCK_EX
diff --git a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
index 1faee1c055..1ba5c1292b 100644
--- a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
+++ b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
@@ -1,4 +1,4 @@
-From ac579b296aa29c2f1dad9425c6d795e154ec8f7c Mon Sep 17 00:00:00 2001
+From a6a25e1ecae91f48a4f87bf0cc17eaaf0a919ffe Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Fri, 7 Aug 2020 15:20:17 +0000
Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un *
@@ -23,16 +23,14 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index a4ac8ed2bb..0c41a48d4b 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
-@@ -5125,7 +5125,7 @@ static int cant_be_in_netns(void) {
+@@ -5389,7 +5389,7 @@ static int cant_be_in_netns(void) {
if (fd < 0)
return log_error_errno(errno, "Failed to allocate udev control socket: %m");
-- if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
-+ if (connect(fd, (struct sockaddr *)&sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
+- if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
++ if (connect(fd, (struct sockaddr *)&sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno))
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
diff --git a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
index 14c8ff73a0..dfab8fbbdf 100644
--- a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
+++ b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
@@ -1,4 +1,4 @@
-From 6bc78df50adb48d24a2abfdf65b44b932cc5a571 Mon Sep 17 00:00:00 2001
+From 47472da6e8900773c26da8fd26699367447d97a6 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 16:53:06 +0800
Subject: [PATCH] test-json.c: define M_PIl
@@ -14,11 +14,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
src/test/test-json.c | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/src/test/test-json.c b/src/test/test-json.c
-index 1d4b11945e..572c8cf9d0 100644
--- a/src/test/test-json.c
+++ b/src/test/test-json.c
-@@ -13,6 +13,10 @@
+@@ -14,6 +14,10 @@
#include "tests.h"
#include "util.h"
@@ -26,6 +24,6 @@ index 1d4b11945e..572c8cf9d0 100644
+#define M_PIl 3.141592653589793238462643383279502884L
+#endif
+
- static void test_tokenizer(const char *data, ...) {
+ static void test_tokenizer_one(const char *data, ...) {
unsigned line = 0, column = 0;
void *state = NULL;
diff --git a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
index bd627c51e9..d389e1d9f9 100644
--- a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
@@ -1,4 +1,4 @@
-From 7cb6579572b50ef44bc0a321a4c73cce55b0c2f2 Mon Sep 17 00:00:00 2001
+From 0f9422780a569c79a4b28e44c79c70b4a354bd92 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Fri, 1 Mar 2019 15:22:15 +0800
Subject: [PATCH] do not disable buffer in writing files
@@ -22,7 +22,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
src/basic/cgroup-util.c | 10 +++++-----
src/basic/procfs-util.c | 4 ++--
- src/basic/smack-util.c | 2 +-
src/basic/sysctl-util.c | 2 +-
src/basic/util.c | 2 +-
src/binfmt/binfmt.c | 6 +++---
@@ -30,19 +29,27 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
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/mount-util.c | 4 ++--
+ src/shared/smack-util.c | 2 +-
src/sleep/sleep.c | 8 ++++----
src/vconsole/vconsole-setup.c | 2 +-
- 16 files changed, 33 insertions(+), 33 deletions(-)
+ 16 files changed, 34 insertions(+), 34 deletions(-)
-diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
-index 50c1ae1b2b..5b40e92163 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
-@@ -765,7 +765,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+@@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *c
+ if (r < 0)
+ return r;
+
+- r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(killfile, "1", 0);
+ if (r < 0)
+ return r;
+
+@@ -803,7 +803,7 @@ int cg_install_release_agent(const char
sc = strstrip(contents);
if (isempty(sc)) {
@@ -51,7 +58,7 @@ index 50c1ae1b2b..5b40e92163 100644
if (r < 0)
return r;
} else if (!path_equal(sc, agent))
-@@ -783,7 +783,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
+@@ -821,7 +821,7 @@ int cg_install_release_agent(const char
sc = strstrip(contents);
if (streq(sc, "0")) {
@@ -60,7 +67,7 @@ index 50c1ae1b2b..5b40e92163 100644
if (r < 0)
return r;
-@@ -810,7 +810,7 @@ int cg_uninstall_release_agent(const char *controller) {
+@@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const cha
if (r < 0)
return r;
@@ -69,7 +76,7 @@ index 50c1ae1b2b..5b40e92163 100644
if (r < 0)
return r;
-@@ -820,7 +820,7 @@ int cg_uninstall_release_agent(const char *controller) {
+@@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const cha
if (r < 0)
return r;
@@ -78,7 +85,7 @@ index 50c1ae1b2b..5b40e92163 100644
if (r < 0)
return r;
-@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
+@@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *control
if (r < 0)
return r;
@@ -87,11 +94,9 @@ index 50c1ae1b2b..5b40e92163 100644
}
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) {
+@@ -64,13 +64,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 */
@@ -107,37 +112,20 @@ index 8f9eee8d36..480f8cc0b4 100644
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/sysctl-util.c b/src/basic/sysctl-util.c
-index c96b5cd77f..d2476d9665 100644
--- a/src/basic/sysctl-util.c
+++ b/src/basic/sysctl-util.c
-@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c
+@@ -58,7 +58,7 @@ int sysctl_write(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);
+- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
}
- int sysctl_read(const char *property, char **ret) {
-diff --git a/src/basic/util.c b/src/basic/util.c
-index 955b18bd2a..6d89c90176 100644
+ int sysctl_writef(const char *property, const char *format, ...) {
--- a/src/basic/util.c
+++ b/src/basic/util.c
-@@ -234,7 +234,7 @@ void disable_coredumps(void) {
+@@ -168,7 +168,7 @@ void disable_coredumps(void) {
if (detect_container() > 0)
return;
@@ -146,67 +134,61 @@ index 955b18bd2a..6d89c90176 100644
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 f6b72e0bae..e9fd4d06be 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();
+@@ -29,7 +29,7 @@ static bool arg_unregister = false;
+ static int delete_rule(const char *rulename) {
+ const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename);
- 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);
+ static int apply_rule(const char *filename, unsigned line, const char *rule) {
+@@ -59,7 +59,7 @@ static int apply_rule(const char *filena
+ if (r >= 0)
+ log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename);
- 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");
-
-@@ -222,7 +222,7 @@ static int run(int argc, char *argv[]) {
+ return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m",
+ filename, line, rulename);
+@@ -226,7 +226,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 3ee8d0a869..ec36e3e80f 100644
+- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m");
+ else
--- a/src/core/main.c
+++ b/src/core/main.c
-@@ -1401,7 +1401,7 @@ static int bump_unix_max_dgram_qlen(void) {
+@@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void
if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
return 0;
-- 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);
+- r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER,
++ 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");
-@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) {
+@@ -1737,7 +1737,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);
- }
-diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
-index 8cc1696a4f..ab7b4ba2c3 100644
+ log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m",
+ arg_early_core_pattern);
--- a/src/core/smack-setup.c
+++ b/src/core/smack-setup.c
-@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) {
+@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy)
}
- #ifdef SMACK_RUN_LABEL
+ #if HAVE_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)
@@ -225,8 +207,6 @@ index 8cc1696a4f..ab7b4ba2c3 100644
if (r < 0)
log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
#endif
-diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
-index 58e35e403e..1d0beb4008 100644
--- a/src/hibernate-resume/hibernate-resume.c
+++ b/src/hibernate-resume/hibernate-resume.c
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
@@ -238,11 +218,9 @@ index 58e35e403e..1d0beb4008 100644
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 d82f01a164..b8fd63346c 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
-@@ -1987,7 +1987,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
+@@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value
if (!value)
return -ENOMEM;
@@ -251,24 +229,9 @@ index d82f01a164..b8fd63346c 100644
if (r < 0) {
/* On failure, clear cache entry, as we do not know how it fails. */
device_remove_cached_sysattr_value(device, sysattr);
-diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
-index 3bc424b83b..5f5eef0843 100644
---- a/src/login/logind-dbus.c
-+++ b/src/login/logind-dbus.c
-@@ -1330,7 +1330,7 @@ static int trigger_device(Manager *m, sd_device *d) {
- 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) {
+@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
fn = strjoina(tree, cgroup, "/cgroup.procs");
sprintf(pid_string, PID_FMT, pid);
@@ -277,11 +240,9 @@ index cb01b25bc6..e92051268b 100644
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 0c41a48d4b..9c893b18e4 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
-@@ -2695,7 +2695,7 @@ static int reset_audit_loginuid(void) {
+@@ -2757,7 +2757,7 @@ static int reset_audit_loginuid(void) {
if (streq(p, "4294967295"))
return 0;
@@ -290,27 +251,27 @@ index 0c41a48d4b..9c893b18e4 100644
if (r < 0) {
log_error_errno(r,
"Failed to reset audit login UID. This probably means that your kernel is too\n"
-@@ -3948,13 +3948,13 @@ static int setup_uid_map(pid_t pid) {
+@@ -4163,7 +4163,7 @@ static int setup_uid_map(
+ return log_oom();
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);
+- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(uid_map, s, 0);
if (r < 0)
return log_error_errno(r, "Failed to write UID map: %m");
- /* We always assign the same UID and GID ranges */
+@@ -4173,7 +4173,7 @@ static int setup_uid_map(
+ return log_oom();
+
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);
+- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(uid_map, s, 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) {
+@@ -345,7 +345,7 @@ int cg_attach(const char *controller, co
xsprintf(c, PID_FMT "\n", pid);
@@ -319,7 +280,7 @@ index f197f715c7..077f893177 100644
if (r < 0)
return r;
-@@ -799,7 +799,7 @@ int cg_enable_everywhere(
+@@ -877,7 +877,7 @@ int cg_enable_everywhere(
return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
}
@@ -328,11 +289,20 @@ index f197f715c7..077f893177 100644
if (r < 0) {
log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
-diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
-index 262d4cea66..0523e8dc9b 100644
+--- a/src/shared/smack-util.c
++++ b/src/shared/smack-util.c
+@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const
+ 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;
+
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
-@@ -48,7 +48,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
+@@ -46,7 +46,7 @@ static int write_hibernate_location_info
assert(hibernate_location->swap);
xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
@@ -341,7 +311,7 @@ index 262d4cea66..0523e8dc9b 100644
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
+@@ -73,7 +73,7 @@ static int write_hibernate_location_info
}
xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
@@ -350,7 +320,7 @@ index 262d4cea66..0523e8dc9b 100644
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) {
+@@ -90,7 +90,7 @@ static int write_mode(char **modes) {
STRV_FOREACH(mode, modes) {
int k;
@@ -359,7 +329,7 @@ index 262d4cea66..0523e8dc9b 100644
if (k >= 0)
return 0;
-@@ -114,7 +114,7 @@ static int write_state(FILE **f, char **states) {
+@@ -112,7 +112,7 @@ static int write_state(FILE **f, char **
STRV_FOREACH(state, states) {
int k;
@@ -368,11 +338,9 @@ index 262d4cea66..0523e8dc9b 100644
if (k >= 0)
return 0;
log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
-diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
-index d1c3febdd5..1cc68694d1 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
-@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
+@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na
static int toggle_utf8_sysfs(bool utf8) {
int r;
@@ -381,3 +349,72 @@ index d1c3febdd5..1cc68694d1 100644
if (r < 0)
return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
+--- a/src/basic/namespace-util.c
++++ b/src/basic/namespace-util.c
+@@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map,
+ freeze();
+
+ xsprintf(path, "/proc/" PID_FMT "/uid_map", pid);
+- r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, uid_map, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write UID map: %m");
+
+ xsprintf(path, "/proc/" PID_FMT "/gid_map", pid);
+- r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, gid_map, 0);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write GID map: %m");
+
+--- a/src/core/cgroup.c
++++ b/src/core/cgroup.c
+@@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u,
+ else
+ u->freezer_state = FREEZER_THAWING;
+
+- r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0);
+ if (r < 0)
+ return r;
+
+--- a/src/home/homework.c
++++ b/src/home/homework.c
+@@ -284,7 +284,7 @@ static void drop_caches_now(void) {
+ * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not
+ * more. */
+
+- r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to drop caches, ignoring: %m");
+ else
+--- a/src/shared/binfmt-util.c
++++ b/src/shared/binfmt-util.c
+@@ -26,7 +26,7 @@ int disable_binfmt(void) {
+ if (r < 0)
+ return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m");
+
+- r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER);
++ r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0);
+ if (r < 0)
+ return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m");
+
+--- a/src/shared/coredump-util.c
++++ b/src/shared/coredump-util.c
+@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value)
+ sprintf(t, "0x%"PRIx64, value);
+
+ return write_string_file("/proc/self/coredump_filter", t,
+- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
++ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
+ }
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_even
+ log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value);
+ r = write_string_file(buf, value,
+ WRITE_STRING_FILE_VERIFY_ON_FAILURE |
+- WRITE_STRING_FILE_DISABLE_BUFFER |
+ WRITE_STRING_FILE_AVOID_NEWLINE |
+ WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
+ if (r < 0)
diff --git a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
index 7d1bd60255..e001ed59e8 100644
--- a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
+++ b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
@@ -1,4 +1,4 @@
-From d73755cc60f401f0f20f357752e45aeeeef8e83f Mon Sep 17 00:00:00 2001
+From e4f9ef547fa342102db15188544daa18e71e9c66 Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Fri, 13 Sep 2019 19:26:27 -0400
Subject: [PATCH] Handle __cpu_mask usage
@@ -38,7 +38,7 @@ index 3c63a58826..4c2d4347fc 100644
typedef struct CPUSet {
cpu_set_t *set;
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index e1a59d408c..c269ea6e8c 100644
+index 4403c0aa52..e7e4ae112d 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -1,6 +1,5 @@
diff --git a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
index 068600fa44..2d06ab84a2 100644
--- a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
+++ b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
@@ -1,4 +1,4 @@
-From 04e94f9a15101daa8f65a9af269d26cda2a24056 Mon Sep 17 00:00:00 2001
+From 66a926cf906260c2fb5ea851e55efe03edd444dc Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Tue, 10 Mar 2020 11:05:20 +0000
Subject: [PATCH] Handle missing gshadow
@@ -14,11 +14,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
src/shared/user-record-nss.c | 20 ++++++++++++++++++++
src/shared/user-record-nss.h | 4 ++++
- src/shared/userdb.c | 6 ++++++
- 3 files changed, 30 insertions(+)
+ src/shared/userdb.c | 7 ++++++-
+ 3 files changed, 30 insertions(+), 1 deletion(-)
-diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
-index 88b8fc2f8f..a819d41bac 100644
--- a/src/shared/user-record-nss.c
+++ b/src/shared/user-record-nss.c
@@ -331,8 +331,10 @@ int nss_group_to_group_record(
@@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644
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
+@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou
assert(ret_sgrp);
assert(ret_buffer);
@@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644
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
+@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou
buflen *= 2;
buf = mfree(buf);
}
@@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644
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 @@
@@ -138,28 +134,26 @@ index 22ab04d6ee..4e52e7a911 100644
#include <pwd.h>
#include <shadow.h>
-diff --git a/src/shared/userdb.c b/src/shared/userdb.c
-index 613350bd46..5c821d28cd 100644
--- a/src/shared/userdb.c
+++ b/src/shared/userdb.c
-@@ -938,13 +938,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
+@@ -1046,13 +1046,15 @@ 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
- if (!FLAGS_SET(iterator->flags, USERDB_AVOID_SHADOW)) {
+ if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
r = nss_sgrp_for_group(gr, &sgrp, &buffer);
if (r < 0) {
-@@ -957,6 +960,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
+@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator
}
r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
diff --git a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
index 2289404d8d..f4a71be7cc 100644
--- a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
@@ -1,4 +1,4 @@
-From 366cd28f5f93ba7c861cd32a718251770d74830e Mon Sep 17 00:00:00 2001
+From 6f0dd2ba75b68036d7b4ebfe47ac5eaf44d26f06 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 12 Apr 2021 23:44:53 -0700
Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl
@@ -15,8 +15,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src/basic/missing_syscall.h | 6 ++++++
1 file changed, 6 insertions(+)
-diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
-index 1384324804..0202d00372 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -20,6 +20,12 @@
@@ -24,11 +22,21 @@ index 1384324804..0202d00372 100644
#endif
+#ifndef _MIPS_SIM_ABI32
-+#define _MIPS_SIM_ABI32 1
-+#define _MIPS_SIM_NABI32 2
-+#define _MIPS_SIM_ABI64 3
++#define _MIPS_SIM_ABI32 1
++#define _MIPS_SIM_NABI32 2
++#define _MIPS_SIM_ABI64 3
+#endif
+
+ #include "macro.h"
#include "missing_keyctl.h"
#include "missing_stat.h"
- #include "missing_syscall_def.h"
+--- a/src/shared/base-filesystem.c
++++ b/src/shared/base-filesystem.c
+@@ -19,6 +19,7 @@
+ #include "string-util.h"
+ #include "umask-util.h"
+ #include "user-util.h"
++#include "missing_syscall.h"
+
+ typedef struct BaseFilesystem {
+ const char *dir; /* directory or symlink to create */
diff --git a/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
new file mode 100644
index 0000000000..782b9645cb
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0029-network-enable-KeepConfiguration-when-running-on-net.patch
@@ -0,0 +1,253 @@
+From 6f4e84126aaa4e26cb6865b054ea5ddebd3906e5 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Thu, 3 Feb 2022 12:14:19 +0900
+Subject: [PATCH] network: enable KeepConfiguration= when running on network
+ filesystem
+Cc: pavel@zhukoff.net
+
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/22383]
+[YOCTO #14708]
+
+network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
+
+To emphasize this is DHCPv4. No behavior is changed.
+
+stat-util: introduce path_is_network_fs()
+
+network: enable KeepConfiguration= when running on network filesystem
+
+Also, set KeepConfiguration=dhcp-on-stop by default when running in
+initrd.
+
+Fixes #21967.
+---
+ man/systemd.network.xml | 6 +++--
+ src/basic/stat-util.c | 9 +++++++
+ src/basic/stat-util.h | 1 +
+ src/network/generator/network-generator.c | 4 ++--
+ src/network/generator/network-generator.h | 2 +-
+ src/network/networkd-manager.c | 29 +++++++++++++++++++++++
+ src/network/networkd-manager.h | 2 ++
+ src/network/networkd-network.c | 12 ++++++----
+ src/network/test-networkd-conf.c | 5 ++++
+ 9 files changed, 60 insertions(+), 10 deletions(-)
+
+diff --git a/man/systemd.network.xml b/man/systemd.network.xml
+index af431e4f2c..f90cff4cd6 100644
+--- a/man/systemd.network.xml
++++ b/man/systemd.network.xml
+@@ -944,8 +944,10 @@ Table=1234</programlisting></para>
+ lease expires. This is contrary to the DHCP specification, but may be the best choice if,
+ e.g., the root filesystem relies on this connection. The setting <literal>dhcp</literal>
+ implies <literal>dhcp-on-stop</literal>, and <literal>yes</literal> implies
+- <literal>dhcp</literal> and <literal>static</literal>. Defaults to <literal>no</literal>.
+- </para>
++ <literal>dhcp</literal> and <literal>static</literal>. Defaults to
++ <literal>dhcp-on-stop</literal> when <command>systemd-networkd</command> is running in
++ initrd, <literal>yes</literal> when the root filesystem is a network filesystem, and
++ <literal>no</literal> otherwise.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
+index efac7b002e..c2269844f8 100644
+--- a/src/basic/stat-util.c
++++ b/src/basic/stat-util.c
+@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
+ return is_temporary_fs(&s);
+ }
+
++int path_is_network_fs(const char *path) {
++ struct statfs s;
++
++ if (statfs(path, &s) < 0)
++ return -errno;
++
++ return is_network_fs(&s);
++}
++
+ int stat_verify_regular(const struct stat *st) {
+ assert(st);
+
+diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
+index a566114f7c..f7d2f12aa9 100644
+--- a/src/basic/stat-util.h
++++ b/src/basic/stat-util.h
+@@ -53,6 +53,7 @@ int fd_is_temporary_fs(int fd);
+ int fd_is_network_fs(int fd);
+
+ int path_is_temporary_fs(const char *path);
++int path_is_network_fs(const char *path);
+
+ /* Because statfs.t_type can be int on some architectures, we have to cast
+ * the const magic to the type, otherwise the compiler warns about
+diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
+index c081ec673c..063ad08d80 100644
+--- a/src/network/generator/network-generator.c
++++ b/src/network/generator/network-generator.c
+@@ -47,7 +47,7 @@ static const char * const dracut_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "off",
+ [DHCP_TYPE_ON] = "on",
+ [DHCP_TYPE_ANY] = "any",
+- [DHCP_TYPE_DHCP] = "dhcp",
++ [DHCP_TYPE_DHCP4] = "dhcp",
+ [DHCP_TYPE_DHCP6] = "dhcp6",
+ [DHCP_TYPE_AUTO6] = "auto6",
+ [DHCP_TYPE_EITHER6] = "either6",
+@@ -62,7 +62,7 @@ static const char * const networkd_dhcp_type_table[_DHCP_TYPE_MAX] = {
+ [DHCP_TYPE_OFF] = "no",
+ [DHCP_TYPE_ON] = "yes",
+ [DHCP_TYPE_ANY] = "yes",
+- [DHCP_TYPE_DHCP] = "ipv4",
++ [DHCP_TYPE_DHCP4] = "ipv4",
+ [DHCP_TYPE_DHCP6] = "ipv6",
+ [DHCP_TYPE_AUTO6] = "no", /* TODO: enable other setting? */
+ [DHCP_TYPE_EITHER6] = "ipv6", /* TODO: enable other setting? */
+diff --git a/src/network/generator/network-generator.h b/src/network/generator/network-generator.h
+index dd0a58738b..0e0da2a57a 100644
+--- a/src/network/generator/network-generator.h
++++ b/src/network/generator/network-generator.h
+@@ -13,7 +13,7 @@ typedef enum DHCPType {
+ DHCP_TYPE_OFF,
+ DHCP_TYPE_ON,
+ DHCP_TYPE_ANY,
+- DHCP_TYPE_DHCP,
++ DHCP_TYPE_DHCP4,
+ DHCP_TYPE_DHCP6,
+ DHCP_TYPE_AUTO6,
+ DHCP_TYPE_EITHER6,
+diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
+index 7e89366ae8..3261f289e9 100644
+--- a/src/network/networkd-manager.c
++++ b/src/network/networkd-manager.c
+@@ -398,6 +398,30 @@ static int signal_restart_callback(sd_event_source *s, const struct signalfd_sig
+ return sd_event_exit(sd_event_source_get_event(s), 0);
+ }
+
++static int manager_set_keep_configuration(Manager *m) {
++ int r;
++
++ assert(m);
++
++ if (in_initrd()) {
++ log_debug("Running in initrd, keep DHCPv4 addresses on stopping networkd by default.");
++ m->keep_configuration = KEEP_CONFIGURATION_DHCP_ON_STOP;
++ return 0;
++ }
++
++ r = path_is_network_fs("/");
++ if (r < 0)
++ return log_error_errno(r, "Failed to detect if root is network filesystem: %m");
++ if (r == 0) {
++ m->keep_configuration = _KEEP_CONFIGURATION_INVALID;
++ return 0;
++ }
++
++ log_debug("Running on network filesystem, enabling KeepConfiguration= by default.");
++ m->keep_configuration = KEEP_CONFIGURATION_YES;
++ return 0;
++}
++
+ int manager_setup(Manager *m) {
+ int r;
+
+@@ -453,6 +477,10 @@ int manager_setup(Manager *m) {
+ if (r < 0)
+ return r;
+
++ r = manager_set_keep_configuration(m);
++ if (r < 0)
++ return r;
++
+ m->state_file = strdup("/run/systemd/netif/state");
+ if (!m->state_file)
+ return -ENOMEM;
+@@ -468,6 +496,7 @@ int manager_new(Manager **ret, bool test_mode) {
+ return -ENOMEM;
+
+ *m = (Manager) {
++ .keep_configuration = _KEEP_CONFIGURATION_INVALID,
+ .test_mode = test_mode,
+ .speed_meter_interval_usec = SPEED_METER_DEFAULT_TIME_INTERVAL,
+ .online_state = _LINK_ONLINE_STATE_INVALID,
+diff --git a/src/network/networkd-manager.h b/src/network/networkd-manager.h
+index 36313589a3..86de529124 100644
+--- a/src/network/networkd-manager.h
++++ b/src/network/networkd-manager.h
+@@ -28,6 +28,8 @@ struct Manager {
+ Hashmap *polkit_registry;
+ int ethtool_fd;
+
++ KeepConfiguration keep_configuration;
++
+ bool test_mode;
+ bool enumerating;
+ bool dirty;
+diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
+index 3142be471f..edcd68d616 100644
+--- a/src/network/networkd-network.c
++++ b/src/network/networkd-network.c
+@@ -124,6 +124,7 @@ int network_verify(Network *network) {
+ int r;
+
+ assert(network);
++ assert(network->manager);
+ assert(network->filename);
+
+ if (net_match_is_empty(&network->match) && !network->conditions)
+@@ -248,10 +249,11 @@ int network_verify(Network *network) {
+ }
+
+ if (network->dhcp_critical >= 0) {
+- if (network->keep_configuration >= 0)
+- log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
+- "Ignoring CriticalConnection=.", network->filename);
+- else if (network->dhcp_critical)
++ if (network->keep_configuration >= 0) {
++ if (network->manager->keep_configuration < 0)
++ log_warning("%s: Both KeepConfiguration= and deprecated CriticalConnection= are set. "
++ "Ignoring CriticalConnection=.", network->filename);
++ } else if (network->dhcp_critical)
+ /* CriticalConnection=yes also preserve foreign static configurations. */
+ network->keep_configuration = KEEP_CONFIGURATION_YES;
+ else
+@@ -386,7 +388,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
+ .allmulticast = -1,
+ .promiscuous = -1,
+
+- .keep_configuration = _KEEP_CONFIGURATION_INVALID,
++ .keep_configuration = manager->keep_configuration,
+
+ .dhcp_duid.type = _DUID_TYPE_INVALID,
+ .dhcp_critical = -1,
+diff --git a/src/network/test-networkd-conf.c b/src/network/test-networkd-conf.c
+index 4b00a98086..5f1328e39c 100644
+--- a/src/network/test-networkd-conf.c
++++ b/src/network/test-networkd-conf.c
+@@ -6,6 +6,7 @@
+ #include "net-condition.h"
+ #include "networkd-address.h"
+ #include "networkd-conf.h"
++#include "networkd-manager.h"
+ #include "networkd-network.h"
+ #include "strv.h"
+
+@@ -166,11 +167,15 @@ static void test_config_parse_ether_addr(void) {
+ }
+
+ static void test_config_parse_address_one(const char *rvalue, int family, unsigned n_addresses, const union in_addr_union *u, unsigned char prefixlen) {
++ _cleanup_(manager_freep) Manager *manager = NULL;
+ _cleanup_(network_unrefp) Network *network = NULL;
+
++ assert_se(manager_new(&manager, /* test_mode = */ true) >= 0);
+ assert_se(network = new0(Network, 1));
+ network->n_ref = 1;
++ network->manager = manager;
+ assert_se(network->filename = strdup("hogehoge.network"));
++
+ assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "*", &network->match.ifname, network) == 0);
+ assert_se(config_parse_address("network", "filename", 1, "section", 1, "Address", 0, rvalue, network, network) == 0);
+ assert_se(ordered_hashmap_size(network->addresses_by_section) == 1);
+--
+2.34.1
+
diff --git a/meta/recipes-core/systemd/systemd_248.3.bb b/meta/recipes-core/systemd/systemd_250.4.bb
index f5022a99c2..2b346113b5 100644
--- a/meta/recipes-core/systemd/systemd_248.3.bb
+++ b/meta/recipes-core/systemd/systemd_250.4.bb
@@ -4,7 +4,7 @@ PROVIDES = "udev"
PE = "1"
-DEPENDS = "intltool-native gperf-native libcap util-linux"
+DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native"
SECTION = "base/shell"
@@ -14,8 +14,7 @@ inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu
# that we don't build both udev and systemd in world builds.
REQUIRED_DISTRO_FEATURES = "systemd"
-SRC_URI += " \
- file://touchscreen.rules \
+SRC_URI += "file://touchscreen.rules \
file://00-create-volatile.conf \
${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \
@@ -26,17 +25,16 @@ SRC_URI += " \
file://0003-implment-systemd-sysv-install-for-OE.patch \
file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \
file://0001-test-parse-argument-Include-signal.h.patch \
- file://0001-test-seccomp-Check-for-__NR_ppoll-before-use.patch \
+ file://0029-network-enable-KeepConfiguration-when-running-on-net.patch \
"
# patches needed by musl
-SRC_URI_append_libc-musl = " ${SRC_URI_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 \
@@ -56,6 +54,9 @@ SRC_URI_MUSL = "\
file://0025-Handle-__cpu_mask-usage.patch \
file://0026-Handle-missing-gshadow.patch \
file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
+ file://0001-pass-correct-parameters-to-getdents64.patch \
+ file://0002-Add-sys-stat.h-for-S_IFDIR.patch \
+ file://0001-Adjust-for-musl-headers.patch \
"
PAM_PLUGINS = " \
@@ -68,6 +69,7 @@ PACKAGECONFIG ??= " \
${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \
backlight \
binfmt \
gshadow \
@@ -95,10 +97,11 @@ PACKAGECONFIG ??= " \
userdb \
utmp \
vconsole \
- xz \
+ wheel-group \
+ zstd \
"
-PACKAGECONFIG_remove_libc-musl = " \
+PACKAGECONFIG:remove:libc-musl = " \
gshadow \
idn \
localed \
@@ -111,7 +114,10 @@ PACKAGECONFIG_remove_libc-musl = " \
utmp \
"
-CFLAGS_append_libc-musl = " -D__UAPI_DEF_ETHHDR=0 "
+# https://github.com/seccomp/libseccomp/issues/347
+PACKAGECONFIG:remove:mipsarch = "seccomp"
+
+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.
@@ -129,11 +135,14 @@ 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[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device"
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"
+PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false"
+PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
@@ -151,6 +160,9 @@ 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"
+# Link udev shared with systemd helper library.
+# If enabled the udev package depends on the systemd package (which has the needed shared library).
+PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false"
PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
@@ -196,11 +208,13 @@ 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[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false"
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"
+PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd"
# Helper variables to clarify locations. This mirrors the logic in systemd's
# build system.
@@ -208,11 +222,6 @@ 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} \
@@ -240,7 +249,7 @@ 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
+ rm ${D}${systemd_system_unitdir}/serial-getty* -f
fi
# Provide support for initramfs
@@ -262,33 +271,37 @@ do_install() {
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
+ if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then
+ # /var/log is typically a symbolic link to inside /var/volatile,
+ # which is expected to be empty.
+ rm -rf ${D}${localstatedir}/log
+ else
+ chown root:systemd-journal ${D}${localstatedir}/log/journal
- # journal-remote creates this at start
- rm -rf ${D}/${localstatedir}/log/journal/remote
+ # journal-remote creates this at start
+ rm -rf ${D}${localstatedir}/log/journal/remote
+ fi
- 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
+ install -d ${D}${systemd_system_unitdir}/graphical.target.wants
+ install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
+ install -d ${D}${systemd_system_unitdir}/poweroff.target.wants
+ install -d ${D}${systemd_system_unitdir}/reboot.target.wants
+ install -d ${D}${systemd_system_unitdir}/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
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/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)}
+ if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ] &&
+ ! ${@bb.utils.contains('PACKAGECONFIG', 'networkd', 'true', 'false', d)}; then
+ echo 'd /run/systemd/netif/links 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
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
@@ -315,8 +328,8 @@ do_install() {
# If polkit is not available and a fallback was requested, install a drop-in that allows networkd to
# request hostname changes via DBUS without elevating its privileges
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then
- install -d ${D}${systemd_unitdir}/system/systemd-hostnamed.service.d/
- install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_unitdir}/system/systemd-hostnamed.service.d/
+ install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
+ install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/
install -d ${D}${datadir}/dbus-1/system.d/
install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/
fi
@@ -336,9 +349,9 @@ do_install() {
install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh
}
-python populate_packages_prepend (){
+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)
+ do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
}
PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
@@ -357,100 +370,103 @@ PACKAGE_BEFORE_PN = "\
${PN}-journal-remote \
${PN}-extra-utils \
${PN}-udev-rules \
+ libsystemd-shared \
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}-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-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-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."
+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."
+
+SUMMARY:libsystemd-shared = "Systemd shared library"
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"
+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-gatewayd', '', 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;"
-GROUPADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/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 /sbin/nologin systemd-resolve;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /sbin/nologin systemd-bus-proxy"
-USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /sbin/nologin systemd-journal-gateway"
-USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /sbin/nologin systemd-journal-remote"
-USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /sbin/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 \
+GROUPADD_PARAM:${PN} = "-r systemd-journal;"
+GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}"
+USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}"
+USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/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 /sbin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM:${PN}-extra-utils = "--system -d / -M --shell /sbin/nologin systemd-bus-proxy"
+USERADD_PARAM:${PN}-journal-gatewayd = "--system -d / -M --shell /sbin/nologin systemd-journal-gateway"
+USERADD_PARAM:${PN}-journal-remote = "--system -d / -M --shell /sbin/nologin systemd-journal-remote"
+USERADD_PARAM:${PN}-journal-upload = "--system -d / -M --shell /sbin/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_system_unitdir}/systemd-vconsole-setup.service \
+ ${systemd_system_unitdir}/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}-rpm-macros = "${exec_prefix}/lib/rpm \
"
-FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions"
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+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"
+ ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \
+ ${systemd_system_unitdir}/systemd-binfmt.service"
+RRECOMMENDS:${PN}-binfmt = "kernel-module-binfmt-misc"
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+RRECOMMENDS:${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+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"
+SYSTEMD_SERVICE:${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
-FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
+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"
+SYSTEMD_SERVICE:${PN}-journal-upload = "systemd-journal-upload.service"
-FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
+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"
+SYSTEMD_SERVICE:${PN}-journal-remote = "systemd-journal-remote.socket"
-FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+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 \
@@ -486,7 +502,7 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
"
# "machinectl import-tar" uses "tar --numeric-owner", not supported by busybox.
-RRECOMMENDS_${PN}-container += "\
+RRECOMMENDS:${PN}-container += "\
${PN}-journal-gatewayd \
${PN}-journal-remote \
${PN}-journal-upload \
@@ -496,7 +512,7 @@ RRECOMMENDS_${PN}-container += "\
tar \
"
-FILES_${PN}-extra-utils = "\
+FILES:${PN}-extra-utils = "\
${base_bindir}/systemd-escape \
${base_bindir}/systemd-inhibit \
${bindir}/systemd-detect-virt \
@@ -511,43 +527,43 @@ FILES_${PN}-extra-utils = "\
${bindir}/systemd-sysext \
${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 \
+ ${systemd_system_unitdir}/systemd-ask-password-console.path \
+ ${systemd_system_unitdir}/systemd-ask-password-console.service \
+ ${systemd_system_unitdir}/systemd-ask-password-wall.path \
+ ${systemd_system_unitdir}/systemd-ask-password-wall.service \
+ ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \
+ ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \
+ ${systemd_system_unitdir}/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 \
+ ${systemd_system_unitdir}/systemd-bus-proxyd.service \
+ ${systemd_system_unitdir}/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 \
+ ${systemd_system_unitdir}/systemd-hibernate.service \
+ ${systemd_system_unitdir}/systemd-hybrid-sleep.service \
+ ${systemd_system_unitdir}/systemd-suspend.service \
+ ${systemd_system_unitdir}/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 \
+ ${systemd_system_unitdir}/systemd-initctl.service \
+ ${systemd_system_unitdir}/systemd-initctl.socket \
+ ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \
${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
${rootlibexecdir}/systemd/systemd-cgroups-agent \
"
-FILES_${PN}-udev-rules = "\
+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 \
+CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \
${sysconfdir}/systemd/journald.conf \
${sysconfdir}/systemd/logind.conf \
${sysconfdir}/systemd/networkd.conf \
@@ -559,7 +575,7 @@ CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
${sysconfdir}/systemd/user.conf \
"
-FILES_${PN} = " ${base_bindir}/* \
+FILES:${PN} = " ${base_bindir}/* \
${base_sbindir}/shutdown \
${base_sbindir}/halt \
${base_sbindir}/poweroff \
@@ -619,15 +635,16 @@ FILES_${PN} = " ${base_bindir}/* \
${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 \
+ ${datadir}/dbus-1/system.d/org.freedesktop.home1.conf \
"
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+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"
+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 \
+RRECOMMENDS:${PN} += "systemd-extra-utils \
udev-hwdb \
e2fsprogs-e2fsck \
kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \
@@ -635,15 +652,18 @@ RRECOMMENDS_${PN} += "systemd-extra-utils \
systemd-conf \
"
-INSANE_SKIP_${PN} += "dev-so libdir"
-INSANE_SKIP_${PN}-dbg += "libdir"
-INSANE_SKIP_${PN}-doc += " libdir"
+INSANE_SKIP:${PN} += "dev-so libdir"
+INSANE_SKIP:${PN}-dbg += "libdir"
+INSANE_SKIP:${PN}-doc += " libdir"
+INSANE_SKIP:libsystemd-shared += "libdir"
+
+FILES:libsystemd-shared = "${rootlibexecdir}/systemd/libsystemd-shared*.so"
-RPROVIDES_udev = "hotplug"
+RPROVIDES:udev = "hotplug"
-RDEPENDS_udev-hwdb += "udev"
+RDEPENDS:udev-hwdb += "udev"
-FILES_udev += "${base_sbindir}/udevd \
+FILES:udev += "${base_sbindir}/udevd \
${rootlibexecdir}/systemd/network/99-default.link \
${rootlibexecdir}/systemd/systemd-udevd \
${rootlibexecdir}/udev/accelerometer \
@@ -677,6 +697,7 @@ FILES_udev += "${base_sbindir}/udevd \
${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-camera.rules \
${rootlibexecdir}/udev/rules.d/70-joystick.rules \
${rootlibexecdir}/udev/rules.d/70-memory.rules \
${rootlibexecdir}/udev/rules.d/70-mouse.rules \
@@ -687,32 +708,39 @@ FILES_udev += "${base_sbindir}/udevd \
${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/81-net-dhcp.rules \
${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
${rootlibexecdir}/udev/rules.d/README \
${sysconfdir}/udev \
${sysconfdir}/init.d/systemd-udevd \
- ${systemd_unitdir}/system/*udev* \
- ${systemd_unitdir}/system/*.wants/*udev* \
+ ${systemd_system_unitdir}/*udev* \
+ ${systemd_system_unitdir}/*.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 \
+ ${systemd_system_unitdir}/systemd-hwdb-update.service \
"
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
+FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
"
-RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', 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 ."
+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")
+
+ if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d):
+ bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]")
+
+ if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d):
+ bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]")
}
python do_warn_musl() {
@@ -721,7 +749,7 @@ python do_warn_musl() {
}
addtask warn_musl before do_configure
-ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
+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"
@@ -747,20 +775,20 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-pkg_postinst_${PN}_libc-glibc () {
+pkg_postinst:${PN}:libc-glibc () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
-i $D${sysconfdir}/nsswitch.conf
}
-pkg_prerm_${PN}_libc-glibc () {
+pkg_prerm:${PN}:libc-glibc () {
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
-e '/^hosts:/s/\s*myhostname//' \
-i $D${sysconfdir}/nsswitch.conf
}
PACKAGE_WRITE_DEPS += "qemu-native"
-pkg_postinst_udev-hwdb () {
+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
@@ -768,6 +796,6 @@ pkg_postinst_udev-hwdb () {
fi
}
-pkg_prerm_udev-hwdb () {
+pkg_prerm:udev-hwdb () {
rm -f $D${sysconfdir}/udev/hwdb.bin
}