diff options
Diffstat (limited to 'meta/recipes-core/systemd')
44 files changed, 1184 insertions, 1911 deletions
diff --git a/meta/recipes-core/systemd/dlopen-deps.inc b/meta/recipes-core/systemd/dlopen-deps.inc new file mode 100644 index 0000000000..e0b333398c --- /dev/null +++ b/meta/recipes-core/systemd/dlopen-deps.inc | |||
@@ -0,0 +1,81 @@ | |||
1 | PACKAGEFUNCS =+ "package_generate_dlopen_deps" | ||
2 | |||
3 | python package_generate_dlopen_deps() { | ||
4 | # https://systemd.io/ELF_DLOPEN_METADATA/ | ||
5 | |||
6 | import struct, json | ||
7 | |||
8 | def extract_segment(filename, segment): | ||
9 | """ | ||
10 | Return the named segment from the ELF. | ||
11 | """ | ||
12 | import tempfile, subprocess | ||
13 | |||
14 | with tempfile.NamedTemporaryFile() as f: | ||
15 | try: | ||
16 | cmd = [d.getVar("OBJCOPY"), "--dump-section", f"{segment}={f.name}", filename] | ||
17 | subprocess.run(cmd, check=True) | ||
18 | with open(f.name, "rb") as f2: | ||
19 | return f2.read() | ||
20 | except subprocess.CalledProcessError as e: | ||
21 | # binutils-objcopy has 0 exit code if the segment can't be found, but llvm-objcopy | ||
22 | # does not. Assume the failure isn't critical and ignore errors. | ||
23 | if e.returncode == 1: | ||
24 | return b"" | ||
25 | raise e | ||
26 | |||
27 | def parse(buffer, is_little): | ||
28 | deps = [] | ||
29 | offset = 0 | ||
30 | while offset < len(buffer): | ||
31 | format = f"{'<' if is_little else '>'}iii" | ||
32 | name_size, desc_size, note_type = struct.unpack_from(format, buffer, offset) | ||
33 | offset += struct.calcsize(format) | ||
34 | |||
35 | format = f"{name_size}s0i{desc_size}s0i" | ||
36 | if note_type == 0x407c0c0a: | ||
37 | name_b, desc_b = struct.unpack_from(format, buffer, offset) | ||
38 | name = name_b.strip(b"\x00").decode("ascii") | ||
39 | if name == "FDO": | ||
40 | desc = desc_b.strip(b"\x00").decode("utf-8") | ||
41 | deps.append(*json.loads(desc)) | ||
42 | offset += struct.calcsize(format) | ||
43 | return deps | ||
44 | |||
45 | dep_map = { | ||
46 | "required": "RDEPENDS", | ||
47 | "recommended": "RRECOMMENDS", | ||
48 | "suggested": "RSUGGESTS" | ||
49 | } | ||
50 | |||
51 | shlibs = oe.package.read_shlib_providers(d) | ||
52 | |||
53 | for pkg, files in pkgfiles.items(): | ||
54 | # Skip -dbg packages as we won't need to generate dependencies for those | ||
55 | # but scanning can take time | ||
56 | if pkg.endswith("-dbg"): | ||
57 | continue | ||
58 | |||
59 | for f in files: | ||
60 | # Skip symlinks, just look for real libraries | ||
61 | if cpath.islink(f): | ||
62 | continue | ||
63 | |||
64 | if ".so." in f or f.endswith(".so"): | ||
65 | try: | ||
66 | elf = oe.qa.ELFFile(f) | ||
67 | elf.open() | ||
68 | for dep in parse(extract_segment(f, ".note.dlopen"), elf.isLittleEndian()): | ||
69 | for soname in dep["soname"]: | ||
70 | if soname in shlibs: | ||
71 | # TODO assumes the first match is good | ||
72 | package, version = list(shlibs[soname].values())[0] | ||
73 | dependency = dep_map[dep["priority"]] | ||
74 | bb.note(f"{pkg}: adding {dependency} on {package} via .note.dlopen") | ||
75 | d.appendVar(f"{dependency}:{pkg}", f" {package} (>= {version})") | ||
76 | else: | ||
77 | bb.warn(f"cannot find {soname}") | ||
78 | except oe.qa.NotELFFileError as e: | ||
79 | bb.note(f"Cannot extract ELF notes: {e}") | ||
80 | pass | ||
81 | } | ||
diff --git a/meta/recipes-core/systemd/systemd-boot-native_255.4.bb b/meta/recipes-core/systemd/systemd-boot-native_257.6.bb index 73db59b14e..05ebe7b63e 100644 --- a/meta/recipes-core/systemd/systemd-boot-native_255.4.bb +++ b/meta/recipes-core/systemd/systemd-boot-native_257.6.bb | |||
@@ -1,4 +1,5 @@ | |||
1 | require systemd.inc | 1 | require systemd.inc |
2 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" | ||
2 | 3 | ||
3 | inherit native | 4 | inherit native |
4 | 5 | ||
@@ -8,8 +9,10 @@ deltask do_compile | |||
8 | do_install () { | 9 | do_install () { |
9 | install -Dm 0755 ${S}/src/ukify/ukify.py ${D}${bindir}/ukify | 10 | install -Dm 0755 ${S}/src/ukify/ukify.py ${D}${bindir}/ukify |
10 | } | 11 | } |
11 | addtask install after do_unpack | 12 | addtask install after do_patch |
12 | 13 | ||
13 | PACKAGES = "${PN}" | 14 | PACKAGES = "${PN}" |
14 | 15 | ||
15 | FILES:${PN} = "${bindir}/ukify" | 16 | FILES:${PN} = "${bindir}/ukify" |
17 | |||
18 | RDEPENDS:${PN} += "python3-pefile-native" | ||
diff --git a/meta/recipes-core/systemd/systemd-boot_255.4.bb b/meta/recipes-core/systemd/systemd-boot_257.6.bb index 4ee25ee72f..c6c443f929 100644 --- a/meta/recipes-core/systemd/systemd-boot_255.4.bb +++ b/meta/recipes-core/systemd/systemd-boot_257.6.bb | |||
@@ -3,15 +3,15 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" | |||
3 | 3 | ||
4 | require conf/image-uefi.conf | 4 | require conf/image-uefi.conf |
5 | 5 | ||
6 | DEPENDS = "intltool-native libcap util-linux gperf-native python3-jinja2-native python3-pyelftools-native" | 6 | DEPENDS = "libcap util-linux gperf-native python3-jinja2-native python3-pyelftools-native" |
7 | 7 | ||
8 | inherit meson pkgconfig gettext | 8 | inherit meson pkgconfig gettext |
9 | inherit deploy | 9 | inherit deploy |
10 | 10 | ||
11 | LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} " | 11 | LDFLAGS =+ "${@ " ".join(d.getVar('LD').split()[1:])} " |
12 | 12 | ||
13 | EFI_LD = "bfd" | 13 | EFI_LD = "bfd" |
14 | LDFLAGS:append = " -fuse-ld=${EFI_LD}" | 14 | LDFLAGS += "-fuse-ld=${EFI_LD}" |
15 | 15 | ||
16 | do_write_config[vardeps] += "EFI_LD" | 16 | do_write_config[vardeps] += "EFI_LD" |
17 | do_write_config:append() { | 17 | do_write_config:append() { |
@@ -47,20 +47,28 @@ FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}" | |||
47 | 47 | ||
48 | RDEPENDS:${PN} += "virtual-systemd-bootconf" | 48 | RDEPENDS:${PN} += "virtual-systemd-bootconf" |
49 | 49 | ||
50 | # efi portions use -mgeneral-regs-only option which conflicts with SSE | ||
51 | # especially clang throws errors about it | ||
52 | # error: the 'sse' unit is not supported with this instruction set | ||
53 | TUNE_CCARGS:remove = "-mfpmath=sse" | ||
54 | |||
50 | CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" | 55 | CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" |
51 | 56 | ||
52 | COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" | 57 | # arm-poky-linux-musleabi-clang: error: unsupported option '-mgeneral-regs-only' for target 'arm-poky-linux-musleabi' |
58 | TOOLCHAIN:arm = "gcc" | ||
59 | |||
60 | COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*|riscv.*)-linux" | ||
53 | COMPATIBLE_HOST:x86-x32 = "null" | 61 | COMPATIBLE_HOST:x86-x32 = "null" |
54 | 62 | ||
55 | do_install() { | 63 | do_install() { |
56 | install -d ${D}${EFI_FILES_PATH} | 64 | install -d ${D}${EFI_FILES_PATH} |
57 | install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} | 65 | install ${B}/src/boot/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} |
58 | } | 66 | } |
59 | 67 | ||
60 | do_deploy () { | 68 | do_deploy () { |
61 | install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} | 69 | install ${B}/src/boot/systemd-boot*.efi ${DEPLOYDIR} |
62 | install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR} | 70 | install ${B}/src/boot/linux*.efi.stub ${DEPLOYDIR} |
63 | install ${B}/src/boot/efi/addon*.efi.stub ${DEPLOYDIR} | 71 | install ${B}/src/boot/addon*.efi.stub ${DEPLOYDIR} |
64 | } | 72 | } |
65 | 73 | ||
66 | addtask deploy before do_build after do_compile | 74 | 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 19637546a9..5efac3e410 100644 --- a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb +++ b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb | |||
@@ -7,7 +7,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
7 | 7 | ||
8 | inherit systemd-boot-cfg | 8 | inherit systemd-boot-cfg |
9 | 9 | ||
10 | S = "${WORKDIR}" | 10 | S = "${UNPACKDIR}" |
11 | 11 | ||
12 | LABELS = "boot" | 12 | LABELS = "boot" |
13 | 13 | ||
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb index c03d97f9c9..d6da34e9b8 100644 --- a/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/meta/recipes-core/systemd/systemd-compat-units.bb | |||
@@ -2,10 +2,9 @@ SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" | |||
2 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" | 2 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" |
3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
4 | 4 | ||
5 | |||
6 | PACKAGE_WRITE_DEPS += "systemd-systemctl-native" | 5 | PACKAGE_WRITE_DEPS += "systemd-systemctl-native" |
7 | 6 | ||
8 | S = "${WORKDIR}" | 7 | S = "${UNPACKDIR}" |
9 | 8 | ||
10 | inherit features_check | 9 | inherit features_check |
11 | 10 | ||
@@ -25,7 +24,7 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \ | |||
25 | syslog.busybox \ | 24 | syslog.busybox \ |
26 | " | 25 | " |
27 | 26 | ||
28 | pkg_postinst:${PN} () { | 27 | pkg_postinst_ontarget:${PN} () { |
29 | 28 | ||
30 | test -d $D${sysconfdir}/init.d || exit 0 | 29 | test -d $D${sysconfdir}/init.d || exit 0 |
31 | cd $D${sysconfdir}/init.d | 30 | cd $D${sysconfdir}/init.d |
diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb index 2355936631..60066cd60a 100644 --- a/meta/recipes-core/systemd/systemd-conf_1.0.bb +++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb | |||
@@ -21,19 +21,21 @@ SRC_URI = "\ | |||
21 | file://wired.network \ | 21 | file://wired.network \ |
22 | " | 22 | " |
23 | 23 | ||
24 | S = "${UNPACKDIR}" | ||
25 | |||
24 | do_install() { | 26 | do_install() { |
25 | install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf | 27 | install -D -m0644 ${S}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf |
26 | install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf | 28 | install -D -m0644 ${S}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf |
27 | install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf | 29 | install -D -m0644 ${S}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf |
28 | 30 | ||
29 | if ${@bb.utils.contains('PACKAGECONFIG', 'dhcp-ethernet', 'true', 'false', d)}; then | 31 | if ${@bb.utils.contains('PACKAGECONFIG', 'dhcp-ethernet', 'true', 'false', d)}; then |
30 | install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network | 32 | install -D -m0644 ${S}/wired.network ${D}${systemd_unitdir}/network/80-wired.network |
31 | fi | 33 | fi |
32 | } | 34 | } |
33 | 35 | ||
34 | # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 | 36 | # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 |
35 | do_install:append:qemuall() { | 37 | do_install:append:qemuall() { |
36 | install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf | 38 | install -D -m0644 ${S}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf |
37 | } | 39 | } |
38 | 40 | ||
39 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 41 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
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 8df7ff7cf1..a366f199ee 100644 --- a/meta/recipes-core/systemd/systemd-machine-units_1.0.bb +++ b/meta/recipes-core/systemd/systemd-machine-units_1.0.bb | |||
@@ -5,7 +5,6 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
5 | 5 | ||
6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 6 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
7 | 7 | ||
8 | |||
9 | inherit systemd features_check | 8 | inherit systemd features_check |
10 | REQUIRED_DISTRO_FEATURES += "usrmerge" | 9 | REQUIRED_DISTRO_FEATURES += "usrmerge" |
11 | SYSTEMD_SERVICE:${PN} = "" | 10 | SYSTEMD_SERVICE:${PN} = "" |
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index 44a93ac684..c3fe9d5b6d 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb | |||
@@ -1,15 +1,13 @@ | |||
1 | SUMMARY = "Serial terminal support for systemd" | 1 | SUMMARY = "Serial terminal support for systemd (using SERIAL_CONSOLES)" |
2 | HOMEPAGE = "https://www.freedesktop.org/wiki/Software/systemd/" | 2 | HOMEPAGE = "https://www.freedesktop.org/wiki/Software/systemd/" |
3 | LICENSE = "GPL-2.0-or-later" | 3 | LICENSE = "GPL-2.0-or-later" |
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" | 4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" |
5 | 5 | ||
6 | 6 | # Note that this recipe explicitly creates a serial-getty@ service for every tty | |
7 | SERIAL_CONSOLES ?= "115200;ttyS0" | 7 | # in SERIAL_CONSOLES. This is typically not always needed with systemd as it |
8 | SERIAL_TERM ?= "linux" | 8 | # will probe at boot and generate getty instances for any active consoles as |
9 | 9 | # required. This recipe (enabled via disabling serial-getty-generator in systemd) | |
10 | SRC_URI = "file://serial-getty@.service" | 10 | # should only be used if the generator is not appropriate. |
11 | |||
12 | S = "${WORKDIR}" | ||
13 | 11 | ||
14 | # As this package is tied to systemd, only build it when we're also building systemd. | 12 | # As this package is tied to systemd, only build it when we're also building systemd. |
15 | inherit features_check | 13 | inherit features_check |
@@ -19,11 +17,7 @@ REQUIRED_DISTRO_FEATURES += "usrmerge" | |||
19 | do_install() { | 17 | do_install() { |
20 | if [ ! -z "${SERIAL_CONSOLES}" ] ; then | 18 | if [ ! -z "${SERIAL_CONSOLES}" ] ; then |
21 | default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` | 19 | default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` |
22 | install -d ${D}${systemd_system_unitdir}/ | ||
23 | install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ | 20 | install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ |
24 | install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/ | ||
25 | sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service | ||
26 | sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service | ||
27 | 21 | ||
28 | tmp="${SERIAL_CONSOLES}" | 22 | tmp="${SERIAL_CONSOLES}" |
29 | for entry in $tmp ; do | 23 | for entry in $tmp ; do |
@@ -35,7 +29,7 @@ do_install() { | |||
35 | ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service | 29 | ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service |
36 | else | 30 | else |
37 | # install custom service file for the non-default baudrate | 31 | # install custom service file for the non-default baudrate |
38 | install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service | 32 | install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service |
39 | sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service | 33 | sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service |
40 | # enable the service | 34 | # enable the service |
41 | ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \ | 35 | ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \ |
@@ -46,7 +40,7 @@ do_install() { | |||
46 | } | 40 | } |
47 | 41 | ||
48 | # This is a machine specific file | 42 | # This is a machine specific file |
49 | FILES:${PN} = "${systemd_system_unitdir}/*.service ${sysconfdir}" | ||
50 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 43 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
44 | FILES:${PN} = "${sysconfdir}" | ||
51 | 45 | ||
52 | ALLOW_EMPTY:${PN} = "1" | 46 | ALLOW_EMPTY:${PN} = "1" |
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service deleted file mode 100644 index b16fe1188e..0000000000 --- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | # SPDX-License-Identifier: LGPL-2.1+ | ||
2 | # | ||
3 | # This file is part of systemd. | ||
4 | # | ||
5 | # systemd is free software; you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU Lesser General Public License as published by | ||
7 | # the Free Software Foundation; either version 2.1 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | |||
10 | [Unit] | ||
11 | Description=Serial Getty on %I | ||
12 | Documentation=man:agetty(8) man:systemd-getty-generator(8) | ||
13 | Documentation=http://0pointer.de/blog/projects/serial-console.html | ||
14 | PartOf=dev-%i.device | ||
15 | ConditionPathExists=/dev/%i | ||
16 | After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target | ||
17 | After=rc-local.service | ||
18 | |||
19 | # If additional gettys are spawned during boot then we should make | ||
20 | # sure that this is synchronized before getty.target, even though | ||
21 | # getty.target didn't actually pull it in. | ||
22 | Before=getty.target | ||
23 | IgnoreOnIsolate=yes | ||
24 | |||
25 | # IgnoreOnIsolate causes issues with sulogin, if someone isolates | ||
26 | # rescue.target or starts rescue.service from multi-user.target or | ||
27 | # graphical.target. | ||
28 | Conflicts=rescue.service | ||
29 | Before=rescue.service | ||
30 | |||
31 | [Service] | ||
32 | Environment="TERM=@TERM@" | ||
33 | ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM | ||
34 | Type=idle | ||
35 | Restart=always | ||
36 | UtmpIdentifier=%I | ||
37 | TTYPath=/dev/%I | ||
38 | TTYReset=yes | ||
39 | TTYVHangup=yes | ||
40 | KillMode=process | ||
41 | IgnoreSIGPIPE=no | ||
42 | SendSIGHUP=yes | ||
43 | |||
44 | [Install] | ||
45 | WantedBy=getty.target | ||
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb deleted file mode 100644 index 54283bcba1..0000000000 --- a/meta/recipes-core/systemd/systemd-systemctl-native.bb +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | SUMMARY = "Wrapper for enabling systemd services" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | |||
7 | inherit native | ||
8 | |||
9 | SRC_URI = "file://systemctl" | ||
10 | |||
11 | S = "${WORKDIR}" | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}${bindir} | ||
15 | install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} | ||
16 | } | ||
diff --git a/meta/recipes-core/systemd/systemd-systemctl-native_257.6.bb b/meta/recipes-core/systemd/systemd-systemctl-native_257.6.bb new file mode 100644 index 0000000000..041a040a26 --- /dev/null +++ b/meta/recipes-core/systemd/systemd-systemctl-native_257.6.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "Systemctl executable from systemd" | ||
2 | |||
3 | require systemd.inc | ||
4 | |||
5 | DEPENDS = "gperf-native libcap-native util-linux-native python3-jinja2-native" | ||
6 | |||
7 | inherit pkgconfig meson native | ||
8 | |||
9 | MESON_TARGET = "systemctl:executable" | ||
10 | MESON_INSTALL_TAGS = "systemctl" | ||
11 | EXTRA_OEMESON += "-Dlink-systemctl-shared=false" | ||
12 | |||
13 | # Systemctl is supposed to operate on target, but the target sysroot is not | ||
14 | # determined at run-time, but rather set during configure | ||
15 | # More details are here https://github.com/systemd/systemd/issues/35897#issuecomment-2665405887 | ||
16 | EXTRA_OEMESON += "--sysconfdir ${sysconfdir_native}" | ||
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl deleted file mode 100755 index 2229bc7b6d..0000000000 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ /dev/null | |||
@@ -1,362 +0,0 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | """systemctl: subset of systemctl used for image construction | ||
3 | |||
4 | Mask/preset systemd units | ||
5 | """ | ||
6 | |||
7 | import argparse | ||
8 | import fnmatch | ||
9 | import os | ||
10 | import re | ||
11 | import sys | ||
12 | |||
13 | from collections import namedtuple | ||
14 | from itertools import chain | ||
15 | from pathlib import Path | ||
16 | |||
17 | version = 1.0 | ||
18 | |||
19 | ROOT = Path("/") | ||
20 | SYSCONFDIR = Path("etc") | ||
21 | BASE_LIBDIR = Path("lib") | ||
22 | LIBDIR = Path("usr", "lib") | ||
23 | |||
24 | locations = list() | ||
25 | |||
26 | |||
27 | class SystemdFile(): | ||
28 | """Class representing a single systemd configuration file""" | ||
29 | |||
30 | _clearable_keys = ['WantedBy'] | ||
31 | |||
32 | def __init__(self, root, path, instance_unit_name): | ||
33 | self.sections = dict() | ||
34 | self._parse(root, path) | ||
35 | dirname = os.path.basename(path.name) + ".d" | ||
36 | for location in locations: | ||
37 | files = (root / location / "system" / dirname).glob("*.conf") | ||
38 | if instance_unit_name: | ||
39 | inst_dirname = instance_unit_name + ".d" | ||
40 | files = chain(files, (root / location / "system" / inst_dirname).glob("*.conf")) | ||
41 | for path2 in sorted(files): | ||
42 | self._parse(root, path2) | ||
43 | |||
44 | def _parse(self, root, path): | ||
45 | """Parse a systemd syntax configuration file | ||
46 | |||
47 | Args: | ||
48 | path: A pathlib.Path object pointing to the file | ||
49 | |||
50 | """ | ||
51 | skip_re = re.compile(r"^\s*([#;]|$)") | ||
52 | section_re = re.compile(r"^\s*\[(?P<section>.*)\]") | ||
53 | kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)") | ||
54 | section = None | ||
55 | |||
56 | if path.is_symlink(): | ||
57 | try: | ||
58 | path.resolve() | ||
59 | except FileNotFoundError: | ||
60 | # broken symlink, try relative to root | ||
61 | path = root / Path(os.readlink(str(path))).relative_to(ROOT) | ||
62 | |||
63 | with path.open() as f: | ||
64 | for line in f: | ||
65 | if skip_re.match(line): | ||
66 | continue | ||
67 | |||
68 | line = line.strip() | ||
69 | m = section_re.match(line) | ||
70 | if m: | ||
71 | if m.group('section') not in self.sections: | ||
72 | section = dict() | ||
73 | self.sections[m.group('section')] = section | ||
74 | else: | ||
75 | section = self.sections[m.group('section')] | ||
76 | continue | ||
77 | |||
78 | while line.endswith("\\"): | ||
79 | line += f.readline().rstrip("\n") | ||
80 | |||
81 | m = kv_re.match(line) | ||
82 | k = m.group('key') | ||
83 | v = m.group('value') | ||
84 | if k not in section: | ||
85 | section[k] = list() | ||
86 | |||
87 | # If we come across a "key=" line for a "clearable key", then | ||
88 | # forget all preceding assignments. This works because we are | ||
89 | # processing files in correct parse order. | ||
90 | if k in self._clearable_keys and not v: | ||
91 | del section[k] | ||
92 | continue | ||
93 | |||
94 | section[k].extend(v.split()) | ||
95 | |||
96 | def get(self, section, prop): | ||
97 | """Get a property from section | ||
98 | |||
99 | Args: | ||
100 | section: Section to retrieve property from | ||
101 | prop: Property to retrieve | ||
102 | |||
103 | Returns: | ||
104 | List representing all properties of type prop in section. | ||
105 | |||
106 | Raises: | ||
107 | KeyError: if ``section`` or ``prop`` not found | ||
108 | """ | ||
109 | return self.sections[section][prop] | ||
110 | |||
111 | |||
112 | class Presets(): | ||
113 | """Class representing all systemd presets""" | ||
114 | def __init__(self, scope, root): | ||
115 | self.directives = list() | ||
116 | self._collect_presets(scope, root) | ||
117 | |||
118 | def _parse_presets(self, presets): | ||
119 | """Parse presets out of a set of preset files""" | ||
120 | skip_re = re.compile(r"^\s*([#;]|$)") | ||
121 | directive_re = re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))") | ||
122 | |||
123 | Directive = namedtuple("Directive", "action unit_name") | ||
124 | for preset in presets: | ||
125 | with preset.open() as f: | ||
126 | for line in f: | ||
127 | m = directive_re.match(line) | ||
128 | if m: | ||
129 | directive = Directive(action=m.group('action'), | ||
130 | unit_name=m.group('unit_name')) | ||
131 | self.directives.append(directive) | ||
132 | elif skip_re.match(line): | ||
133 | pass | ||
134 | else: | ||
135 | sys.exit("Unparsed preset line in {}".format(preset)) | ||
136 | |||
137 | def _collect_presets(self, scope, root): | ||
138 | """Collect list of preset files""" | ||
139 | presets = dict() | ||
140 | for location in locations: | ||
141 | paths = (root / location / scope).glob("*.preset") | ||
142 | for path in paths: | ||
143 | # earlier names override later ones | ||
144 | if path.name not in presets: | ||
145 | presets[path.name] = path | ||
146 | |||
147 | self._parse_presets([v for k, v in sorted(presets.items())]) | ||
148 | |||
149 | def state(self, unit_name): | ||
150 | """Return state of preset for unit_name | ||
151 | |||
152 | Args: | ||
153 | presets: set of presets | ||
154 | unit_name: name of the unit | ||
155 | |||
156 | Returns: | ||
157 | None: no matching preset | ||
158 | `enable`: unit_name is enabled | ||
159 | `disable`: unit_name is disabled | ||
160 | """ | ||
161 | for directive in self.directives: | ||
162 | if fnmatch.fnmatch(unit_name, directive.unit_name): | ||
163 | return directive.action | ||
164 | |||
165 | return None | ||
166 | |||
167 | |||
168 | def add_link(path, target): | ||
169 | try: | ||
170 | path.parent.mkdir(parents=True) | ||
171 | except FileExistsError: | ||
172 | pass | ||
173 | if not path.is_symlink(): | ||
174 | print("ln -s {} {}".format(target, path)) | ||
175 | path.symlink_to(target) | ||
176 | |||
177 | |||
178 | class SystemdUnitNotFoundError(Exception): | ||
179 | def __init__(self, path, unit): | ||
180 | self.path = path | ||
181 | self.unit = unit | ||
182 | |||
183 | |||
184 | class SystemdUnit(): | ||
185 | def __init__(self, root, unit): | ||
186 | self.root = root | ||
187 | self.unit = unit | ||
188 | self.config = None | ||
189 | |||
190 | def _path_for_unit(self, unit): | ||
191 | for location in locations: | ||
192 | path = self.root / location / "system" / unit | ||
193 | if path.exists() or path.is_symlink(): | ||
194 | return path | ||
195 | |||
196 | raise SystemdUnitNotFoundError(self.root, unit) | ||
197 | |||
198 | def _process_deps(self, config, service, location, prop, dirstem, instance): | ||
199 | systemdir = self.root / SYSCONFDIR / "systemd" / "system" | ||
200 | |||
201 | target = ROOT / location.relative_to(self.root) | ||
202 | try: | ||
203 | for dependent in config.get('Install', prop): | ||
204 | # expand any %i to instance (ignoring escape sequence %%) | ||
205 | dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent) | ||
206 | wants = systemdir / "{}.{}".format(dependent, dirstem) / service | ||
207 | add_link(wants, target) | ||
208 | |||
209 | except KeyError: | ||
210 | pass | ||
211 | |||
212 | def enable(self, units_enabled=[]): | ||
213 | # if we're enabling an instance, first extract the actual instance | ||
214 | # then figure out what the template unit is | ||
215 | template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) | ||
216 | instance_unit_name = None | ||
217 | if template: | ||
218 | instance = template.group('instance') | ||
219 | if instance != "": | ||
220 | instance_unit_name = self.unit | ||
221 | unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1) | ||
222 | else: | ||
223 | instance = None | ||
224 | unit = self.unit | ||
225 | |||
226 | path = self._path_for_unit(unit) | ||
227 | |||
228 | if path.is_symlink(): | ||
229 | # ignore aliases | ||
230 | return | ||
231 | |||
232 | config = SystemdFile(self.root, path, instance_unit_name) | ||
233 | if instance == "": | ||
234 | try: | ||
235 | default_instance = config.get('Install', 'DefaultInstance')[0] | ||
236 | except KeyError: | ||
237 | # no default instance, so nothing to enable | ||
238 | return | ||
239 | |||
240 | service = self.unit.replace("@.", | ||
241 | "@{}.".format(default_instance)) | ||
242 | else: | ||
243 | service = self.unit | ||
244 | |||
245 | self._process_deps(config, service, path, 'WantedBy', 'wants', instance) | ||
246 | self._process_deps(config, service, path, 'RequiredBy', 'requires', instance) | ||
247 | |||
248 | try: | ||
249 | for also in config.get('Install', 'Also'): | ||
250 | try: | ||
251 | units_enabled.append(unit) | ||
252 | if also not in units_enabled: | ||
253 | SystemdUnit(self.root, also).enable(units_enabled) | ||
254 | except SystemdUnitNotFoundError as e: | ||
255 | sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) | ||
256 | |||
257 | except KeyError: | ||
258 | pass | ||
259 | |||
260 | systemdir = self.root / SYSCONFDIR / "systemd" / "system" | ||
261 | target = ROOT / path.relative_to(self.root) | ||
262 | try: | ||
263 | for dest in config.get('Install', 'Alias'): | ||
264 | alias = systemdir / dest | ||
265 | add_link(alias, target) | ||
266 | |||
267 | except KeyError: | ||
268 | pass | ||
269 | |||
270 | def mask(self): | ||
271 | systemdir = self.root / SYSCONFDIR / "systemd" / "system" | ||
272 | add_link(systemdir / self.unit, "/dev/null") | ||
273 | |||
274 | |||
275 | def collect_services(root): | ||
276 | """Collect list of service files""" | ||
277 | services = set() | ||
278 | for location in locations: | ||
279 | paths = (root / location / "system").glob("*") | ||
280 | for path in paths: | ||
281 | if path.is_dir(): | ||
282 | continue | ||
283 | services.add(path.name) | ||
284 | |||
285 | return services | ||
286 | |||
287 | |||
288 | def preset_all(root): | ||
289 | presets = Presets('system-preset', root) | ||
290 | services = collect_services(root) | ||
291 | |||
292 | for service in services: | ||
293 | state = presets.state(service) | ||
294 | |||
295 | if state == "enable" or state is None: | ||
296 | try: | ||
297 | SystemdUnit(root, service).enable() | ||
298 | except SystemdUnitNotFoundError: | ||
299 | sys.exit("Error: Systemctl preset_all issue in %s" % service) | ||
300 | |||
301 | # If we populate the systemd links we also create /etc/machine-id, which | ||
302 | # allows systemd to boot with the filesystem read-only before generating | ||
303 | # a real value and then committing it back. | ||
304 | # | ||
305 | # For the stateless configuration, where /etc is generated at runtime | ||
306 | # (for example on a tmpfs), this script shouldn't run at all and we | ||
307 | # allow systemd to completely populate /etc. | ||
308 | (root / SYSCONFDIR / "machine-id").touch() | ||
309 | |||
310 | |||
311 | def main(): | ||
312 | if sys.version_info < (3, 4, 0): | ||
313 | sys.exit("Python 3.4 or greater is required") | ||
314 | |||
315 | parser = argparse.ArgumentParser() | ||
316 | parser.add_argument('command', nargs='?', choices=['enable', 'mask', | ||
317 | 'preset-all']) | ||
318 | parser.add_argument('service', nargs=argparse.REMAINDER) | ||
319 | parser.add_argument('--root') | ||
320 | parser.add_argument('--preset-mode', | ||
321 | choices=['full', 'enable-only', 'disable-only'], | ||
322 | default='full') | ||
323 | |||
324 | args = parser.parse_args() | ||
325 | |||
326 | root = Path(args.root) if args.root else ROOT | ||
327 | |||
328 | locations.append(SYSCONFDIR / "systemd") | ||
329 | # Handle the usrmerge case by ignoring /lib when it's a symlink | ||
330 | if not (root / BASE_LIBDIR).is_symlink(): | ||
331 | locations.append(BASE_LIBDIR / "systemd") | ||
332 | locations.append(LIBDIR / "systemd") | ||
333 | |||
334 | command = args.command | ||
335 | if not command: | ||
336 | parser.print_help() | ||
337 | return 0 | ||
338 | |||
339 | if command == "mask": | ||
340 | for service in args.service: | ||
341 | try: | ||
342 | SystemdUnit(root, service).mask() | ||
343 | except SystemdUnitNotFoundError as e: | ||
344 | sys.exit("Error: Systemctl main mask issue in %s (%s)" % (service, e.unit)) | ||
345 | elif command == "enable": | ||
346 | for service in args.service: | ||
347 | try: | ||
348 | SystemdUnit(root, service).enable() | ||
349 | except SystemdUnitNotFoundError as e: | ||
350 | sys.exit("Error: Systemctl main enable issue in %s (%s)" % (service, e.unit)) | ||
351 | elif command == "preset-all": | ||
352 | if len(args.service) != 0: | ||
353 | sys.exit("Too many arguments.") | ||
354 | if args.preset_mode != "enable-only": | ||
355 | sys.exit("Only enable-only is supported as preset-mode.") | ||
356 | preset_all(root) | ||
357 | else: | ||
358 | raise RuntimeError() | ||
359 | |||
360 | |||
361 | if __name__ == '__main__': | ||
362 | main() | ||
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index a35db5091e..101457140f 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc | |||
@@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later" | |||
15 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 15 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
16 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | 16 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" |
17 | 17 | ||
18 | SRCREV = "387a14a7b67b8b76adaed4175e14bb7e39b2f738" | 18 | SRCREV = "00a12c234e2506f5cab683460199575f13c454db" |
19 | SRCBRANCH = "v255-stable" | 19 | SRCBRANCH = "v257-stable" |
20 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" | 20 | SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}" |
21 | 21 | ||
22 | S = "${WORKDIR}/git" | 22 | CVE_PRODUCT = "systemd" |
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf index c4277221a2..1092bda010 100644 --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf | |||
@@ -1,8 +1,9 @@ | |||
1 | #This goes hand-in-hand with the base-files of OE-Core. The file must | 1 | # This goes hand-in-hand with the base-files of OE-Core. The file must |
2 | # be sorted before 'systemd.conf' becuase this attempts to create a file | 2 | # be sorted before 'systemd.conf' because this attempts to create a file |
3 | # inside /var/log. | 3 | # inside /var/log. |
4 | 4 | ||
5 | 5 | ||
6 | d /run/lock 1777 - - - | 6 | d /run/lock 1777 - - - |
7 | d /var/volatile/log - - - - | 7 | d /var/volatile/log - - - - |
8 | d /var/volatile/tmp 1777 - - | 8 | d /var/volatile/tmp 1777 - - |
9 | L /var/tmp - - - - /var/volatile/tmp | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch b/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch new file mode 100644 index 0000000000..850e356b2f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 425ad51e727058b48dd4580fd6afe7e51e96a28a Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Kjellerstedt <pkj@axis.com> | ||
3 | Date: Tue, 21 Jan 2025 05:02:00 +0100 | ||
4 | Subject: [PATCH] Do not create /var/log/README | ||
5 | |||
6 | /var/log/README is a link to /usr/share/doc/systemd/README.logs. The | ||
7 | latter is packaged in systemd-doc and likely not installed, which leaves | ||
8 | /var/log/README as a dead link. Since /var/log/README is not very | ||
9 | useful, just remove it. | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE specific] | ||
12 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | ||
13 | --- | ||
14 | tmpfiles.d/legacy.conf.in | 3 --- | ||
15 | 1 file changed, 3 deletions(-) | ||
16 | |||
17 | diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in | ||
18 | index b475500e58..650c91a8da 100644 | ||
19 | --- a/tmpfiles.d/legacy.conf.in | ||
20 | +++ b/tmpfiles.d/legacy.conf.in | ||
21 | @@ -13,9 +13,6 @@ | ||
22 | |||
23 | d /run/lock 0755 root root - | ||
24 | L /var/lock - - - - ../run/lock | ||
25 | -{% if CREATE_LOG_DIRS %} | ||
26 | -L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs | ||
27 | -{% endif %} | ||
28 | |||
29 | {% if HAVE_SYSV_COMPAT %} | ||
30 | # /run/lock/subsys is used for serializing SysV service execution, and | ||
diff --git a/meta/recipes-core/systemd/systemd/0002-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 be231cf6b2..5101f9227e 100644 --- a/meta/recipes-core/systemd/systemd/0002-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,7 +1,7 @@ | |||
1 | From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001 | 1 | From e5fd143f215f072404c544f694cb026a4231503e Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Thu, 21 Feb 2019 16:23:24 +0800 | 3 | Date: Thu, 21 Feb 2019 16:23:24 +0800 |
4 | Subject: [PATCH 1/2] binfmt: Don't install dependency links at install time | 4 | Subject: [PATCH 01/26] binfmt: Don't install dependency links at install time |
5 | for the binfmt services | 5 | for the binfmt services |
6 | 6 | ||
7 | use [Install] blocks so that they get created when the service is enabled | 7 | use [Install] blocks so that they get created when the service is enabled |
@@ -25,10 +25,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
25 | 3 files changed, 7 insertions(+), 2 deletions(-) | 25 | 3 files changed, 7 insertions(+), 2 deletions(-) |
26 | 26 | ||
27 | diff --git a/units/meson.build b/units/meson.build | 27 | diff --git a/units/meson.build b/units/meson.build |
28 | index e7bfb7f838..1d5ec4b178 100644 | 28 | index 96f4852741..0a3a4fee67 100644 |
29 | --- a/units/meson.build | 29 | --- a/units/meson.build |
30 | +++ b/units/meson.build | 30 | +++ b/units/meson.build |
31 | @@ -154,7 +154,6 @@ units = [ | 31 | @@ -156,7 +156,6 @@ units = [ |
32 | { | 32 | { |
33 | 'file' : 'proc-sys-fs-binfmt_misc.automount', | 33 | 'file' : 'proc-sys-fs-binfmt_misc.automount', |
34 | 'conditions' : ['ENABLE_BINFMT'], | 34 | 'conditions' : ['ENABLE_BINFMT'], |
@@ -36,7 +36,7 @@ index e7bfb7f838..1d5ec4b178 100644 | |||
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | 'file' : 'proc-sys-fs-binfmt_misc.mount', | 38 | 'file' : 'proc-sys-fs-binfmt_misc.mount', |
39 | @@ -251,7 +250,6 @@ units = [ | 39 | @@ -258,7 +257,6 @@ units = [ |
40 | { | 40 | { |
41 | 'file' : 'systemd-binfmt.service.in', | 41 | 'file' : 'systemd-binfmt.service.in', |
42 | 'conditions' : ['ENABLE_BINFMT'], | 42 | 'conditions' : ['ENABLE_BINFMT'], |
@@ -45,7 +45,7 @@ index e7bfb7f838..1d5ec4b178 100644 | |||
45 | { | 45 | { |
46 | 'file' : 'systemd-bless-boot.service.in', | 46 | 'file' : 'systemd-bless-boot.service.in', |
47 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount | 47 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount |
48 | index 5d212015a5..6c2900ca77 100644 | 48 | index 7ec21e76c9..fee4d1345f 100644 |
49 | --- a/units/proc-sys-fs-binfmt_misc.automount | 49 | --- a/units/proc-sys-fs-binfmt_misc.automount |
50 | +++ b/units/proc-sys-fs-binfmt_misc.automount | 50 | +++ b/units/proc-sys-fs-binfmt_misc.automount |
51 | @@ -22,3 +22,6 @@ Before=shutdown.target | 51 | @@ -22,3 +22,6 @@ Before=shutdown.target |
@@ -56,11 +56,11 @@ index 5d212015a5..6c2900ca77 100644 | |||
56 | +[Install] | 56 | +[Install] |
57 | +WantedBy=sysinit.target | 57 | +WantedBy=sysinit.target |
58 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in | 58 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in |
59 | index 6861c76674..531e9fbd90 100644 | 59 | index 318bf8efc2..6ef684861d 100644 |
60 | --- a/units/systemd-binfmt.service.in | 60 | --- a/units/systemd-binfmt.service.in |
61 | +++ b/units/systemd-binfmt.service.in | 61 | +++ b/units/systemd-binfmt.service.in |
62 | @@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html | 62 | @@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html |
63 | Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems | 63 | Documentation=https://systemd.io/API_FILE_SYSTEMS |
64 | DefaultDependencies=no | 64 | DefaultDependencies=no |
65 | Conflicts=shutdown.target | 65 | Conflicts=shutdown.target |
66 | +Wants=proc-sys-fs-binfmt_misc.automount | 66 | +Wants=proc-sys-fs-binfmt_misc.automount |
diff --git a/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch index acff18dc43..d8bb572261 100644 --- a/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch +++ b/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 5712d56f1cd654d2e5d2e9117ff77fe4c299f76b Mon Sep 17 00:00:00 2001 | 1 | From fab8c573d06340868f070446118673b1c23584c5 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sat, 5 Sep 2015 06:31:47 +0000 | 3 | Date: Sat, 5 Sep 2015 06:31:47 +0000 |
4 | Subject: [PATCH] implment systemd-sysv-install for OE | 4 | Subject: [PATCH 02/26] implment systemd-sysv-install for OE |
5 | 5 | ||
6 | Use update-rc.d for enabling/disabling and status command | 6 | Use update-rc.d for enabling/disabling and status command |
7 | to check the status of the sysv service | 7 | to check the status of the sysv service |
@@ -39,5 +39,5 @@ index cb58d8243b..000bdf6165 100755 | |||
39 | *) | 39 | *) |
40 | usage ;; | 40 | usage ;; |
41 | -- | 41 | -- |
42 | 2.39.2 | 42 | 2.34.1 |
43 | 43 | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch index 2aa5dee6b5..f2094eb71d 100644 --- a/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch +++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 01195eb9f7d59139fb45df506ac6b3968c14a57f Mon Sep 17 00:00:00 2001 | 1 | From f99ef6c4407b56e8d15455fe27eb732ada87215b Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 | 3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 |
4 | Subject: [PATCH 01/22] missing_type.h: add comparison_fn_t | 4 | Subject: [PATCH 03/26] missing_type.h: add comparison_fn_t |
5 | 5 | ||
6 | Make it work with musl where comparison_fn_t and is not provided. | 6 | Make it work with musl where comparison_fn_t and is not provided. |
7 | 7 | ||
@@ -21,12 +21,12 @@ Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | |||
21 | 3 files changed, 6 insertions(+) | 21 | 3 files changed, 6 insertions(+) |
22 | 22 | ||
23 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | 23 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h |
24 | index f6233090a9..6c0456349d 100644 | 24 | index 1d17705c35..fc33b76ec1 100644 |
25 | --- a/src/basic/missing_type.h | 25 | --- a/src/basic/missing_type.h |
26 | +++ b/src/basic/missing_type.h | 26 | +++ b/src/basic/missing_type.h |
27 | @@ -10,3 +10,7 @@ | 27 | @@ -10,3 +10,7 @@ |
28 | #if !HAVE_CHAR16_T | 28 | #if !HAVE_CHAR16_T |
29 | #define char16_t uint16_t | 29 | # define char16_t uint16_t |
30 | #endif | 30 | #endif |
31 | + | 31 | + |
32 | +#ifndef __GLIBC__ | 32 | +#ifndef __GLIBC__ |
@@ -45,10 +45,10 @@ index 9c818bd747..ef10c8be2c 100644 | |||
45 | /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the | 45 | /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the |
46 | * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that | 46 | * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that |
47 | diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c | 47 | diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c |
48 | index ae91534198..7f67eea38b 100644 | 48 | index 7dcc35d8d5..87b8d6aad6 100644 |
49 | --- a/src/libsystemd/sd-journal/catalog.c | 49 | --- a/src/libsystemd/sd-journal/catalog.c |
50 | +++ b/src/libsystemd/sd-journal/catalog.c | 50 | +++ b/src/libsystemd/sd-journal/catalog.c |
51 | @@ -28,6 +28,7 @@ | 51 | @@ -29,6 +29,7 @@ |
52 | #include "string-util.h" | 52 | #include "string-util.h" |
53 | #include "strv.h" | 53 | #include "strv.h" |
54 | #include "tmpfile-util.h" | 54 | #include "tmpfile-util.h" |
diff --git a/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch deleted file mode 100644 index 5595b5bc23..0000000000 --- a/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch +++ /dev/null | |||
@@ -1,699 +0,0 @@ | |||
1 | From 87f1d38f40c5fe9cadf2b2de442473e4e5605788 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 | ||
4 | Subject: [PATCH 03/22] src/basic/missing.h: check for missing strndupa | ||
5 | |||
6 | include missing.h for definition of strndupa | ||
7 | |||
8 | Upstream-Status: Inappropriate [musl specific] | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | [Rebased for v242] | ||
13 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
14 | [rebased for systemd 243] | ||
15 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
16 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
17 | [rebased for systemd 244] | ||
18 | [Rebased for v247] | ||
19 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | ||
20 | [Rebased for v254] | ||
21 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
22 | [Rebased for v255.1] | ||
23 | --- | ||
24 | meson.build | 1 + | ||
25 | src/backlight/backlight.c | 1 + | ||
26 | src/basic/cgroup-util.c | 1 + | ||
27 | src/basic/env-util.c | 1 + | ||
28 | src/basic/log.c | 1 + | ||
29 | src/basic/missing_stdlib.h | 12 ++++++++++++ | ||
30 | src/basic/mkdir.c | 1 + | ||
31 | src/basic/mountpoint-util.c | 1 + | ||
32 | src/basic/parse-util.c | 1 + | ||
33 | src/basic/path-lookup.c | 1 + | ||
34 | src/basic/percent-util.c | 1 + | ||
35 | src/basic/proc-cmdline.c | 1 + | ||
36 | src/basic/procfs-util.c | 1 + | ||
37 | src/basic/time-util.c | 1 + | ||
38 | src/boot/bless-boot.c | 1 + | ||
39 | src/core/dbus-cgroup.c | 1 + | ||
40 | src/core/dbus-execute.c | 1 + | ||
41 | src/core/dbus-util.c | 1 + | ||
42 | src/core/execute.c | 1 + | ||
43 | src/core/kmod-setup.c | 1 + | ||
44 | src/core/service.c | 1 + | ||
45 | src/coredump/coredump-vacuum.c | 1 + | ||
46 | src/fstab-generator/fstab-generator.c | 1 + | ||
47 | src/journal-remote/journal-remote-main.c | 1 + | ||
48 | src/journal/journalctl.c | 1 + | ||
49 | src/libsystemd/sd-bus/bus-message.c | 1 + | ||
50 | src/libsystemd/sd-bus/bus-objects.c | 1 + | ||
51 | src/libsystemd/sd-bus/bus-socket.c | 1 + | ||
52 | src/libsystemd/sd-bus/sd-bus.c | 1 + | ||
53 | src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + | ||
54 | src/libsystemd/sd-journal/sd-journal.c | 1 + | ||
55 | src/login/pam_systemd.c | 1 + | ||
56 | src/network/generator/network-generator.c | 1 + | ||
57 | src/nspawn/nspawn-settings.c | 1 + | ||
58 | src/nss-mymachines/nss-mymachines.c | 1 + | ||
59 | src/portable/portable.c | 1 + | ||
60 | src/resolve/resolvectl.c | 1 + | ||
61 | src/shared/bus-get-properties.c | 1 + | ||
62 | src/shared/bus-unit-procs.c | 1 + | ||
63 | src/shared/bus-unit-util.c | 1 + | ||
64 | src/shared/bus-util.c | 1 + | ||
65 | src/shared/dns-domain.c | 1 + | ||
66 | src/shared/journal-importer.c | 1 + | ||
67 | src/shared/logs-show.c | 1 + | ||
68 | src/shared/pager.c | 1 + | ||
69 | src/socket-proxy/socket-proxyd.c | 1 + | ||
70 | src/test/test-hexdecoct.c | 1 + | ||
71 | src/udev/udev-builtin-net_id.c | 1 + | ||
72 | src/udev/udev-builtin-path_id.c | 1 + | ||
73 | src/udev/udev-event.c | 1 + | ||
74 | src/udev/udev-rules.c | 1 + | ||
75 | 51 files changed, 62 insertions(+) | ||
76 | |||
77 | diff --git a/meson.build b/meson.build | ||
78 | index 01fd3ffc19..61a872b753 100644 | ||
79 | --- a/meson.build | ||
80 | +++ b/meson.build | ||
81 | @@ -567,6 +567,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] | ||
82 | endforeach | ||
83 | |||
84 | foreach ident : [ | ||
85 | + ['strndupa' , '''#include <string.h>'''], | ||
86 | ['memfd_create', '''#include <sys/mman.h>'''], | ||
87 | ['gettid', '''#include <sys/types.h> | ||
88 | #include <unistd.h>'''], | ||
89 | diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c | ||
90 | index 5ac9f904a9..99d5122dd7 100644 | ||
91 | --- a/src/backlight/backlight.c | ||
92 | +++ b/src/backlight/backlight.c | ||
93 | @@ -20,6 +20,7 @@ | ||
94 | #include "string-util.h" | ||
95 | #include "strv.h" | ||
96 | #include "terminal-util.h" | ||
97 | +#include "missing_stdlib.h" | ||
98 | |||
99 | #define PCI_CLASS_GRAPHICS_CARD 0x30000 | ||
100 | |||
101 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | ||
102 | index 18b16ecc0e..d2be79622f 100644 | ||
103 | --- a/src/basic/cgroup-util.c | ||
104 | +++ b/src/basic/cgroup-util.c | ||
105 | @@ -38,6 +38,7 @@ | ||
106 | #include "unit-name.h" | ||
107 | #include "user-util.h" | ||
108 | #include "xattr-util.h" | ||
109 | +#include "missing_stdlib.h" | ||
110 | |||
111 | static int cg_enumerate_items(const char *controller, const char *path, FILE **ret, const char *item) { | ||
112 | _cleanup_free_ char *fs = NULL; | ||
113 | diff --git a/src/basic/env-util.c b/src/basic/env-util.c | ||
114 | index d3bf73385f..16b17358ca 100644 | ||
115 | --- a/src/basic/env-util.c | ||
116 | +++ b/src/basic/env-util.c | ||
117 | @@ -19,6 +19,7 @@ | ||
118 | #include "string-util.h" | ||
119 | #include "strv.h" | ||
120 | #include "utf8.h" | ||
121 | +#include "missing_stdlib.h" | ||
122 | |||
123 | /* We follow bash for the character set. Different shells have different rules. */ | ||
124 | #define VALID_BASH_ENV_NAME_CHARS \ | ||
125 | diff --git a/src/basic/log.c b/src/basic/log.c | ||
126 | index 1470611a75..9924ec2b9a 100644 | ||
127 | --- a/src/basic/log.c | ||
128 | +++ b/src/basic/log.c | ||
129 | @@ -40,6 +40,7 @@ | ||
130 | #include "terminal-util.h" | ||
131 | #include "time-util.h" | ||
132 | #include "utf8.h" | ||
133 | +#include "missing_stdlib.h" | ||
134 | |||
135 | #define SNDBUF_SIZE (8*1024*1024) | ||
136 | #define IOVEC_MAX 256U | ||
137 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h | ||
138 | index 8c76f93eb2..9068bfb4f0 100644 | ||
139 | --- a/src/basic/missing_stdlib.h | ||
140 | +++ b/src/basic/missing_stdlib.h | ||
141 | @@ -11,3 +11,15 @@ | ||
142 | # error "neither secure_getenv nor __secure_getenv are available" | ||
143 | # endif | ||
144 | #endif | ||
145 | + | ||
146 | +/* string.h */ | ||
147 | +#if ! HAVE_STRNDUPA | ||
148 | +#define strndupa(s, n) \ | ||
149 | + ({ \ | ||
150 | + const char *__old = (s); \ | ||
151 | + size_t __len = strnlen(__old, (n)); \ | ||
152 | + char *__new = (char *)alloca(__len + 1); \ | ||
153 | + __new[__len] = '\0'; \ | ||
154 | + (char *)memcpy(__new, __old, __len); \ | ||
155 | + }) | ||
156 | +#endif | ||
157 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c | ||
158 | index c770e5ed32..1fd8816cd0 100644 | ||
159 | --- a/src/basic/mkdir.c | ||
160 | +++ b/src/basic/mkdir.c | ||
161 | @@ -16,6 +16,7 @@ | ||
162 | #include "stat-util.h" | ||
163 | #include "stdio-util.h" | ||
164 | #include "user-util.h" | ||
165 | +#include "missing_stdlib.h" | ||
166 | |||
167 | int mkdirat_safe_internal( | ||
168 | int dir_fd, | ||
169 | diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c | ||
170 | index bf67f7e01a..409f8d8a73 100644 | ||
171 | --- a/src/basic/mountpoint-util.c | ||
172 | +++ b/src/basic/mountpoint-util.c | ||
173 | @@ -18,6 +18,7 @@ | ||
174 | #include "missing_stat.h" | ||
175 | #include "missing_syscall.h" | ||
176 | #include "mkdir.h" | ||
177 | +#include "missing_stdlib.h" | ||
178 | #include "mountpoint-util.h" | ||
179 | #include "nulstr-util.h" | ||
180 | #include "parse-util.h" | ||
181 | diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c | ||
182 | index 0430e33e40..f3728de026 100644 | ||
183 | --- a/src/basic/parse-util.c | ||
184 | +++ b/src/basic/parse-util.c | ||
185 | @@ -18,6 +18,7 @@ | ||
186 | #include "stat-util.h" | ||
187 | #include "string-util.h" | ||
188 | #include "strv.h" | ||
189 | +#include "missing_stdlib.h" | ||
190 | |||
191 | int parse_boolean(const char *v) { | ||
192 | if (!v) | ||
193 | diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c | ||
194 | index 4e3d59fc56..726e240df0 100644 | ||
195 | --- a/src/basic/path-lookup.c | ||
196 | +++ b/src/basic/path-lookup.c | ||
197 | @@ -16,6 +16,7 @@ | ||
198 | #include "strv.h" | ||
199 | #include "tmpfile-util.h" | ||
200 | #include "user-util.h" | ||
201 | +#include "missing_stdlib.h" | ||
202 | |||
203 | int xdg_user_runtime_dir(char **ret, const char *suffix) { | ||
204 | const char *e; | ||
205 | diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c | ||
206 | index cab9d0eaea..5f6ca258e9 100644 | ||
207 | --- a/src/basic/percent-util.c | ||
208 | +++ b/src/basic/percent-util.c | ||
209 | @@ -3,6 +3,7 @@ | ||
210 | #include "percent-util.h" | ||
211 | #include "string-util.h" | ||
212 | #include "parse-util.h" | ||
213 | +#include "missing_stdlib.h" | ||
214 | |||
215 | static int parse_parts_value_whole(const char *p, const char *symbol) { | ||
216 | const char *pc, *n; | ||
217 | diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c | ||
218 | index 522d8de1f4..7c129dc0fc 100644 | ||
219 | --- a/src/basic/proc-cmdline.c | ||
220 | +++ b/src/basic/proc-cmdline.c | ||
221 | @@ -16,6 +16,7 @@ | ||
222 | #include "string-util.h" | ||
223 | #include "strv.h" | ||
224 | #include "virt.h" | ||
225 | +#include "missing_stdlib.h" | ||
226 | |||
227 | int proc_cmdline_filter_pid1_args(char **argv, char ***ret) { | ||
228 | enum { | ||
229 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | ||
230 | index d7cfcd9105..6cb0ddf575 100644 | ||
231 | --- a/src/basic/procfs-util.c | ||
232 | +++ b/src/basic/procfs-util.c | ||
233 | @@ -12,6 +12,7 @@ | ||
234 | #include "procfs-util.h" | ||
235 | #include "stdio-util.h" | ||
236 | #include "string-util.h" | ||
237 | +#include "missing_stdlib.h" | ||
238 | |||
239 | int procfs_get_pid_max(uint64_t *ret) { | ||
240 | _cleanup_free_ char *value = NULL; | ||
241 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
242 | index f9014dc560..1d7840a5b5 100644 | ||
243 | --- a/src/basic/time-util.c | ||
244 | +++ b/src/basic/time-util.c | ||
245 | @@ -27,6 +27,7 @@ | ||
246 | #include "string-util.h" | ||
247 | #include "strv.h" | ||
248 | #include "time-util.h" | ||
249 | +#include "missing_stdlib.h" | ||
250 | |||
251 | static clockid_t map_clock_id(clockid_t c) { | ||
252 | |||
253 | diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c | ||
254 | index 0c0b4f23c7..68fe5ca509 100644 | ||
255 | --- a/src/boot/bless-boot.c | ||
256 | +++ b/src/boot/bless-boot.c | ||
257 | @@ -22,6 +22,7 @@ | ||
258 | #include "terminal-util.h" | ||
259 | #include "verbs.h" | ||
260 | #include "virt.h" | ||
261 | +#include "missing_stdlib.h" | ||
262 | |||
263 | static char **arg_path = NULL; | ||
264 | |||
265 | diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c | ||
266 | index 4237e694c0..05f9d9d9a9 100644 | ||
267 | --- a/src/core/dbus-cgroup.c | ||
268 | +++ b/src/core/dbus-cgroup.c | ||
269 | @@ -25,6 +25,7 @@ | ||
270 | #include "parse-util.h" | ||
271 | #include "path-util.h" | ||
272 | #include "percent-util.h" | ||
273 | +#include "missing_stdlib.h" | ||
274 | #include "socket-util.h" | ||
275 | |||
276 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", CGroupTasksMax, cgroup_tasks_max_resolve); | ||
277 | diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c | ||
278 | index 4daa1cefd3..2c77901471 100644 | ||
279 | --- a/src/core/dbus-execute.c | ||
280 | +++ b/src/core/dbus-execute.c | ||
281 | @@ -42,6 +42,7 @@ | ||
282 | #include "unit-printf.h" | ||
283 | #include "user-util.h" | ||
284 | #include "utf8.h" | ||
285 | +#include "missing_stdlib.h" | ||
286 | |||
287 | BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); | ||
288 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); | ||
289 | diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c | ||
290 | index d680a64268..e59f48103e 100644 | ||
291 | --- a/src/core/dbus-util.c | ||
292 | +++ b/src/core/dbus-util.c | ||
293 | @@ -9,6 +9,7 @@ | ||
294 | #include "unit-printf.h" | ||
295 | #include "user-util.h" | ||
296 | #include "unit.h" | ||
297 | +#include "missing_stdlib.h" | ||
298 | |||
299 | int bus_property_get_triggered_unit( | ||
300 | sd_bus *bus, | ||
301 | diff --git a/src/core/execute.c b/src/core/execute.c | ||
302 | index ef0bf88687..bd3da0c401 100644 | ||
303 | --- a/src/core/execute.c | ||
304 | +++ b/src/core/execute.c | ||
305 | @@ -72,6 +72,7 @@ | ||
306 | #include "unit-serialize.h" | ||
307 | #include "user-util.h" | ||
308 | #include "utmp-wtmp.h" | ||
309 | +#include "missing_stdlib.h" | ||
310 | |||
311 | static bool is_terminal_input(ExecInput i) { | ||
312 | return IN_SET(i, | ||
313 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c | ||
314 | index b8e3f7aadd..8ce8ca68d8 100644 | ||
315 | --- a/src/core/kmod-setup.c | ||
316 | +++ b/src/core/kmod-setup.c | ||
317 | @@ -13,6 +13,7 @@ | ||
318 | #include "string-util.h" | ||
319 | #include "strv.h" | ||
320 | #include "virt.h" | ||
321 | +#include "missing_stdlib.h" | ||
322 | |||
323 | #if HAVE_KMOD | ||
324 | #include "module-util.h" | ||
325 | diff --git a/src/core/service.c b/src/core/service.c | ||
326 | index b9eb40c555..268fe7573b 100644 | ||
327 | --- a/src/core/service.c | ||
328 | +++ b/src/core/service.c | ||
329 | @@ -45,6 +45,7 @@ | ||
330 | #include "unit-name.h" | ||
331 | #include "unit.h" | ||
332 | #include "utf8.h" | ||
333 | +#include "missing_stdlib.h" | ||
334 | |||
335 | #define service_spawn(...) service_spawn_internal(__func__, __VA_ARGS__) | ||
336 | |||
337 | diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c | ||
338 | index 7e0c98cb7d..978a7f5874 100644 | ||
339 | --- a/src/coredump/coredump-vacuum.c | ||
340 | +++ b/src/coredump/coredump-vacuum.c | ||
341 | @@ -17,6 +17,7 @@ | ||
342 | #include "string-util.h" | ||
343 | #include "time-util.h" | ||
344 | #include "user-util.h" | ||
345 | +#include "missing_stdlib.h" | ||
346 | |||
347 | #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ | ||
348 | #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ | ||
349 | diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c | ||
350 | index 016f3baa7f..b1def81313 100644 | ||
351 | --- a/src/fstab-generator/fstab-generator.c | ||
352 | +++ b/src/fstab-generator/fstab-generator.c | ||
353 | @@ -37,6 +37,7 @@ | ||
354 | #include "unit-name.h" | ||
355 | #include "virt.h" | ||
356 | #include "volatile-util.h" | ||
357 | +#include "missing_stdlib.h" | ||
358 | |||
359 | typedef enum MountPointFlags { | ||
360 | MOUNT_NOAUTO = 1 << 0, | ||
361 | diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c | ||
362 | index da0f20d3ce..f22ce41908 100644 | ||
363 | --- a/src/journal-remote/journal-remote-main.c | ||
364 | +++ b/src/journal-remote/journal-remote-main.c | ||
365 | @@ -27,6 +27,7 @@ | ||
366 | #include "stat-util.h" | ||
367 | #include "string-table.h" | ||
368 | #include "strv.h" | ||
369 | +#include "missing_stdlib.h" | ||
370 | |||
371 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" | ||
372 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" | ||
373 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c | ||
374 | index 7f3dcd56a4..41b7cbaaf1 100644 | ||
375 | --- a/src/journal/journalctl.c | ||
376 | +++ b/src/journal/journalctl.c | ||
377 | @@ -77,6 +77,7 @@ | ||
378 | #include "unit-name.h" | ||
379 | #include "user-util.h" | ||
380 | #include "varlink.h" | ||
381 | +#include "missing_stdlib.h" | ||
382 | |||
383 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) | ||
384 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ | ||
385 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c | ||
386 | index ff0228081f..9066fcb133 100644 | ||
387 | --- a/src/libsystemd/sd-bus/bus-message.c | ||
388 | +++ b/src/libsystemd/sd-bus/bus-message.c | ||
389 | @@ -19,6 +19,7 @@ | ||
390 | #include "strv.h" | ||
391 | #include "time-util.h" | ||
392 | #include "utf8.h" | ||
393 | +#include "missing_stdlib.h" | ||
394 | |||
395 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); | ||
396 | static int message_parse_fields(sd_bus_message *m); | ||
397 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c | ||
398 | index c25c40ff37..57a5da704f 100644 | ||
399 | --- a/src/libsystemd/sd-bus/bus-objects.c | ||
400 | +++ b/src/libsystemd/sd-bus/bus-objects.c | ||
401 | @@ -11,6 +11,7 @@ | ||
402 | #include "missing_capability.h" | ||
403 | #include "string-util.h" | ||
404 | #include "strv.h" | ||
405 | +#include "missing_stdlib.h" | ||
406 | |||
407 | static int node_vtable_get_userdata( | ||
408 | sd_bus *bus, | ||
409 | diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c | ||
410 | index 3c59d0d615..746922d46f 100644 | ||
411 | --- a/src/libsystemd/sd-bus/bus-socket.c | ||
412 | +++ b/src/libsystemd/sd-bus/bus-socket.c | ||
413 | @@ -29,6 +29,7 @@ | ||
414 | #include "string-util.h" | ||
415 | #include "user-util.h" | ||
416 | #include "utf8.h" | ||
417 | +#include "missing_stdlib.h" | ||
418 | |||
419 | #define SNDBUF_SIZE (8*1024*1024) | ||
420 | |||
421 | diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c | ||
422 | index 4a0259f8bb..aaa90d2223 100644 | ||
423 | --- a/src/libsystemd/sd-bus/sd-bus.c | ||
424 | +++ b/src/libsystemd/sd-bus/sd-bus.c | ||
425 | @@ -46,6 +46,7 @@ | ||
426 | #include "string-util.h" | ||
427 | #include "strv.h" | ||
428 | #include "user-util.h" | ||
429 | +#include "missing_stdlib.h" | ||
430 | |||
431 | #define log_debug_bus_message(m) \ | ||
432 | do { \ | ||
433 | diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
434 | index d988588de0..458df8df9a 100644 | ||
435 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
436 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
437 | @@ -14,6 +14,7 @@ | ||
438 | #include "string-util.h" | ||
439 | #include "tests.h" | ||
440 | #include "time-util.h" | ||
441 | +#include "missing_stdlib.h" | ||
442 | |||
443 | #define MAX_SIZE (2*1024*1024) | ||
444 | |||
445 | diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c | ||
446 | index 6b9ff0a4ed..4a5027ad0f 100644 | ||
447 | --- a/src/libsystemd/sd-journal/sd-journal.c | ||
448 | +++ b/src/libsystemd/sd-journal/sd-journal.c | ||
449 | @@ -44,6 +44,7 @@ | ||
450 | #include "strv.h" | ||
451 | #include "syslog-util.h" | ||
452 | #include "uid-alloc-range.h" | ||
453 | +#include "missing_stdlib.h" | ||
454 | |||
455 | #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) | ||
456 | |||
457 | diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c | ||
458 | index b8da266e27..4bb8dd9496 100644 | ||
459 | --- a/src/login/pam_systemd.c | ||
460 | +++ b/src/login/pam_systemd.c | ||
461 | @@ -35,6 +35,7 @@ | ||
462 | #include "login-util.h" | ||
463 | #include "macro.h" | ||
464 | #include "missing_syscall.h" | ||
465 | +#include "missing_stdlib.h" | ||
466 | #include "pam-util.h" | ||
467 | #include "parse-util.h" | ||
468 | #include "path-util.h" | ||
469 | diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c | ||
470 | index 48527a2c73..9777fe0561 100644 | ||
471 | --- a/src/network/generator/network-generator.c | ||
472 | +++ b/src/network/generator/network-generator.c | ||
473 | @@ -14,6 +14,7 @@ | ||
474 | #include "string-table.h" | ||
475 | #include "string-util.h" | ||
476 | #include "strv.h" | ||
477 | +#include "missing_stdlib.h" | ||
478 | |||
479 | /* | ||
480 | # .network | ||
481 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c | ||
482 | index 161b1c1c70..ba1c459f78 100644 | ||
483 | --- a/src/nspawn/nspawn-settings.c | ||
484 | +++ b/src/nspawn/nspawn-settings.c | ||
485 | @@ -16,6 +16,7 @@ | ||
486 | #include "string-util.h" | ||
487 | #include "strv.h" | ||
488 | #include "user-util.h" | ||
489 | +#include "missing_stdlib.h" | ||
490 | |||
491 | Settings *settings_new(void) { | ||
492 | Settings *s; | ||
493 | diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c | ||
494 | index c64e79bdff..eda26b0b9a 100644 | ||
495 | --- a/src/nss-mymachines/nss-mymachines.c | ||
496 | +++ b/src/nss-mymachines/nss-mymachines.c | ||
497 | @@ -21,6 +21,7 @@ | ||
498 | #include "nss-util.h" | ||
499 | #include "signal-util.h" | ||
500 | #include "string-util.h" | ||
501 | +#include "missing_stdlib.h" | ||
502 | |||
503 | static void setup_logging_once(void) { | ||
504 | static pthread_once_t once = PTHREAD_ONCE_INIT; | ||
505 | diff --git a/src/portable/portable.c b/src/portable/portable.c | ||
506 | index d4b448a627..bb26623565 100644 | ||
507 | --- a/src/portable/portable.c | ||
508 | +++ b/src/portable/portable.c | ||
509 | @@ -40,6 +40,7 @@ | ||
510 | #include "strv.h" | ||
511 | #include "tmpfile-util.h" | ||
512 | #include "user-util.h" | ||
513 | +#include "missing_stdlib.h" | ||
514 | |||
515 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was | ||
516 | * dropped there by the portable service logic and b) for which image it was dropped there. */ | ||
517 | diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c | ||
518 | index afa537f160..32ccee4ae5 100644 | ||
519 | --- a/src/resolve/resolvectl.c | ||
520 | +++ b/src/resolve/resolvectl.c | ||
521 | @@ -48,6 +48,7 @@ | ||
522 | #include "varlink.h" | ||
523 | #include "verb-log-control.h" | ||
524 | #include "verbs.h" | ||
525 | +#include "missing_stdlib.h" | ||
526 | |||
527 | static int arg_family = AF_UNSPEC; | ||
528 | static int arg_ifindex = 0; | ||
529 | diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c | ||
530 | index 53e5d6b99f..851ecd5644 100644 | ||
531 | --- a/src/shared/bus-get-properties.c | ||
532 | +++ b/src/shared/bus-get-properties.c | ||
533 | @@ -4,6 +4,7 @@ | ||
534 | #include "rlimit-util.h" | ||
535 | #include "stdio-util.h" | ||
536 | #include "string-util.h" | ||
537 | +#include "missing_stdlib.h" | ||
538 | |||
539 | int bus_property_get_bool( | ||
540 | sd_bus *bus, | ||
541 | diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c | ||
542 | index 8b462b5627..183ce1c18e 100644 | ||
543 | --- a/src/shared/bus-unit-procs.c | ||
544 | +++ b/src/shared/bus-unit-procs.c | ||
545 | @@ -11,6 +11,7 @@ | ||
546 | #include "sort-util.h" | ||
547 | #include "string-util.h" | ||
548 | #include "terminal-util.h" | ||
549 | +#include "missing_stdlib.h" | ||
550 | |||
551 | struct CGroupInfo { | ||
552 | char *cgroup_path; | ||
553 | diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c | ||
554 | index 4ee9706847..30c8084847 100644 | ||
555 | --- a/src/shared/bus-unit-util.c | ||
556 | +++ b/src/shared/bus-unit-util.c | ||
557 | @@ -50,6 +50,7 @@ | ||
558 | #include "unit-def.h" | ||
559 | #include "user-util.h" | ||
560 | #include "utf8.h" | ||
561 | +#include "missing_stdlib.h" | ||
562 | |||
563 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { | ||
564 | assert(message); | ||
565 | diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c | ||
566 | index 4123152d93..74f148c8b4 100644 | ||
567 | --- a/src/shared/bus-util.c | ||
568 | +++ b/src/shared/bus-util.c | ||
569 | @@ -24,6 +24,7 @@ | ||
570 | #include "path-util.h" | ||
571 | #include "socket-util.h" | ||
572 | #include "stdio-util.h" | ||
573 | +#include "missing_stdlib.h" | ||
574 | |||
575 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | ||
576 | sd_event *e = ASSERT_PTR(userdata); | ||
577 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c | ||
578 | index b41c9b06ca..e69050a507 100644 | ||
579 | --- a/src/shared/dns-domain.c | ||
580 | +++ b/src/shared/dns-domain.c | ||
581 | @@ -18,6 +18,7 @@ | ||
582 | #include "string-util.h" | ||
583 | #include "strv.h" | ||
584 | #include "utf8.h" | ||
585 | +#include "missing_stdlib.h" | ||
586 | |||
587 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { | ||
588 | const char *n; | ||
589 | diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c | ||
590 | index 83e9834bbf..74eaae6f5e 100644 | ||
591 | --- a/src/shared/journal-importer.c | ||
592 | +++ b/src/shared/journal-importer.c | ||
593 | @@ -16,6 +16,7 @@ | ||
594 | #include "string-util.h" | ||
595 | #include "strv.h" | ||
596 | #include "unaligned.h" | ||
597 | +#include "missing_stdlib.h" | ||
598 | |||
599 | enum { | ||
600 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ | ||
601 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c | ||
602 | index a5d04003bd..10392c132d 100644 | ||
603 | --- a/src/shared/logs-show.c | ||
604 | +++ b/src/shared/logs-show.c | ||
605 | @@ -41,6 +41,7 @@ | ||
606 | #include "time-util.h" | ||
607 | #include "utf8.h" | ||
608 | #include "web-util.h" | ||
609 | +#include "missing_stdlib.h" | ||
610 | |||
611 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ | ||
612 | #define PRINT_LINE_THRESHOLD 3 | ||
613 | diff --git a/src/shared/pager.c b/src/shared/pager.c | ||
614 | index 19deefab56..6b6d0af1a0 100644 | ||
615 | --- a/src/shared/pager.c | ||
616 | +++ b/src/shared/pager.c | ||
617 | @@ -25,6 +25,7 @@ | ||
618 | #include "string-util.h" | ||
619 | #include "strv.h" | ||
620 | #include "terminal-util.h" | ||
621 | +#include "missing_stdlib.h" | ||
622 | |||
623 | static pid_t pager_pid = 0; | ||
624 | |||
625 | diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c | ||
626 | index 287fd6c181..8f8d5493da 100644 | ||
627 | --- a/src/socket-proxy/socket-proxyd.c | ||
628 | +++ b/src/socket-proxy/socket-proxyd.c | ||
629 | @@ -27,6 +27,7 @@ | ||
630 | #include "set.h" | ||
631 | #include "socket-util.h" | ||
632 | #include "string-util.h" | ||
633 | +#include "missing_stdlib.h" | ||
634 | |||
635 | #define BUFFER_SIZE (256 * 1024) | ||
636 | |||
637 | diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c | ||
638 | index f884008660..987e180697 100644 | ||
639 | --- a/src/test/test-hexdecoct.c | ||
640 | +++ b/src/test/test-hexdecoct.c | ||
641 | @@ -7,6 +7,7 @@ | ||
642 | #include "macro.h" | ||
643 | #include "random-util.h" | ||
644 | #include "string-util.h" | ||
645 | +#include "missing_stdlib.h" | ||
646 | #include "tests.h" | ||
647 | |||
648 | TEST(hexchar) { | ||
649 | diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c | ||
650 | index 91b40088f4..f528a46b8e 100644 | ||
651 | --- a/src/udev/udev-builtin-net_id.c | ||
652 | +++ b/src/udev/udev-builtin-net_id.c | ||
653 | @@ -39,6 +39,7 @@ | ||
654 | #include "strv.h" | ||
655 | #include "strxcpyx.h" | ||
656 | #include "udev-builtin.h" | ||
657 | +#include "missing_stdlib.h" | ||
658 | |||
659 | #define ONBOARD_14BIT_INDEX_MAX ((1U << 14) - 1) | ||
660 | #define ONBOARD_16BIT_INDEX_MAX ((1U << 16) - 1) | ||
661 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c | ||
662 | index 467c9a6ad3..f74dae60af 100644 | ||
663 | --- a/src/udev/udev-builtin-path_id.c | ||
664 | +++ b/src/udev/udev-builtin-path_id.c | ||
665 | @@ -24,6 +24,7 @@ | ||
666 | #include "sysexits.h" | ||
667 | #include "udev-builtin.h" | ||
668 | #include "udev-util.h" | ||
669 | +#include "missing_stdlib.h" | ||
670 | |||
671 | _printf_(2,3) | ||
672 | static void path_prepend(char **path, const char *fmt, ...) { | ||
673 | diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c | ||
674 | index ed22c8b679..19ebe20237 100644 | ||
675 | --- a/src/udev/udev-event.c | ||
676 | +++ b/src/udev/udev-event.c | ||
677 | @@ -16,6 +16,7 @@ | ||
678 | #include "udev-util.h" | ||
679 | #include "udev-watch.h" | ||
680 | #include "user-util.h" | ||
681 | +#include "missing_stdlib.h" | ||
682 | |||
683 | UdevEvent *udev_event_new(sd_device *dev, usec_t exec_delay_usec, sd_netlink *rtnl, int log_level) { | ||
684 | UdevEvent *event; | ||
685 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
686 | index 5f12002394..febe345b4c 100644 | ||
687 | --- a/src/udev/udev-rules.c | ||
688 | +++ b/src/udev/udev-rules.c | ||
689 | @@ -41,6 +41,7 @@ | ||
690 | #include "udev-util.h" | ||
691 | #include "user-util.h" | ||
692 | #include "virt.h" | ||
693 | +#include "missing_stdlib.h" | ||
694 | |||
695 | #define RULES_DIRS ((const char* const*) CONF_PATHS_STRV("udev/rules.d")) | ||
696 | |||
697 | -- | ||
698 | 2.34.1 | ||
699 | |||
diff --git a/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index 900a931632..47b8583e7a 100644 --- a/meta/recipes-core/systemd/systemd/0002-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 @@ | |||
1 | From 872b72739e62123867ce6c4f82aa37de24cc3f75 Mon Sep 17 00:00:00 2001 | 1 | From 34fe809cf686c1a81db5f3f027e33fece350ba0b Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Sat, 22 May 2021 20:26:24 +0200 | 3 | Date: Sat, 22 May 2021 20:26:24 +0200 |
4 | Subject: [PATCH 02/22] add fallback parse_printf_format implementation | 4 | Subject: [PATCH 04/26] add fallback parse_printf_format implementation |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [musl specific] | 6 | Upstream-Status: Inappropriate [musl specific] |
7 | 7 | ||
@@ -22,22 +22,22 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
22 | create mode 100644 src/basic/parse-printf-format.h | 22 | create mode 100644 src/basic/parse-printf-format.h |
23 | 23 | ||
24 | diff --git a/meson.build b/meson.build | 24 | diff --git a/meson.build b/meson.build |
25 | index 7419e2b0b0..01fd3ffc19 100644 | 25 | index bffda86845..4146f4beef 100644 |
26 | --- a/meson.build | 26 | --- a/meson.build |
27 | +++ b/meson.build | 27 | +++ b/meson.build |
28 | @@ -725,6 +725,7 @@ endif | 28 | @@ -770,6 +770,7 @@ foreach header : ['crypt.h', |
29 | foreach header : ['crypt.h', | 29 | 'linux/ioprio.h', |
30 | 'linux/memfd.h', | 30 | 'linux/memfd.h', |
31 | 'linux/vm_sockets.h', | 31 | 'linux/time_types.h', |
32 | + 'printf.h', | 32 | + 'printf.h', |
33 | 'sys/auxv.h', | 33 | 'sys/auxv.h', |
34 | 'sys/sdt.h', | ||
34 | 'threads.h', | 35 | 'threads.h', |
35 | 'valgrind/memcheck.h', | ||
36 | diff --git a/src/basic/meson.build b/src/basic/meson.build | 36 | diff --git a/src/basic/meson.build b/src/basic/meson.build |
37 | index d7450d8b44..c3e3daf4bd 100644 | 37 | index e02f787c75..9435df895d 100644 |
38 | --- a/src/basic/meson.build | 38 | --- a/src/basic/meson.build |
39 | +++ b/src/basic/meson.build | 39 | +++ b/src/basic/meson.build |
40 | @@ -183,6 +183,11 @@ endforeach | 40 | @@ -188,6 +188,11 @@ endforeach |
41 | 41 | ||
42 | basic_sources += generated_gperf_headers | 42 | basic_sources += generated_gperf_headers |
43 | 43 | ||
@@ -392,7 +392,7 @@ index 0000000000..47be7522d7 | |||
392 | + | 392 | + |
393 | +#endif /* HAVE_PRINTF_H */ | 393 | +#endif /* HAVE_PRINTF_H */ |
394 | diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h | 394 | diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h |
395 | index 4e93ac90c9..f9deb6f662 100644 | 395 | index 0a2239d022..43a765dacd 100644 |
396 | --- a/src/basic/stdio-util.h | 396 | --- a/src/basic/stdio-util.h |
397 | +++ b/src/basic/stdio-util.h | 397 | +++ b/src/basic/stdio-util.h |
398 | @@ -1,12 +1,12 @@ | 398 | @@ -1,12 +1,12 @@ |
@@ -408,9 +408,9 @@ index 4e93ac90c9..f9deb6f662 100644 | |||
408 | +#include "parse-printf-format.h" | 408 | +#include "parse-printf-format.h" |
409 | 409 | ||
410 | _printf_(3, 4) | 410 | _printf_(3, 4) |
411 | static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) { | 411 | static inline char* snprintf_ok(char *buf, size_t len, const char *format, ...) { |
412 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c | 412 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c |
413 | index be23b2fe75..69a2eb6404 100644 | 413 | index 7d02b57d7b..75e8e08add 100644 |
414 | --- a/src/libsystemd/sd-journal/journal-send.c | 414 | --- a/src/libsystemd/sd-journal/journal-send.c |
415 | +++ b/src/libsystemd/sd-journal/journal-send.c | 415 | +++ b/src/libsystemd/sd-journal/journal-send.c |
416 | @@ -2,7 +2,6 @@ | 416 | @@ -2,7 +2,6 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 15877bea88..1b5e0d54c4 100644 --- a/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/meta/recipes-core/systemd/systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 5325ab5813617f35f03806ec420829dde7104387 Mon Sep 17 00:00:00 2001 | 1 | From d368a0317c747961f69a455a09a3de3fd13410a2 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 | 3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 |
4 | Subject: [PATCH 04/22] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not | 4 | Subject: [PATCH 05/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not |
5 | defined | 5 | defined |
6 | 6 | ||
7 | If the standard library doesn't provide brace | 7 | If the standard library doesn't provide brace |
@@ -64,11 +64,11 @@ index 802ca8c655..23818a67c6 100644 | |||
64 | return -ENOENT; | 64 | return -ENOENT; |
65 | if (k == GLOB_NOSPACE) | 65 | if (k == GLOB_NOSPACE) |
66 | diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c | 66 | diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c |
67 | index 9b3e73cce0..3790ba3be5 100644 | 67 | index 49d71f15c7..0a49ebcc17 100644 |
68 | --- a/src/test/test-glob-util.c | 68 | --- a/src/test/test-glob-util.c |
69 | +++ b/src/test/test-glob-util.c | 69 | +++ b/src/test/test-glob-util.c |
70 | @@ -34,6 +34,12 @@ TEST(glob_first) { | 70 | @@ -34,6 +34,12 @@ TEST(glob_first) { |
71 | assert_se(first == NULL); | 71 | ASSERT_NULL(first); |
72 | } | 72 | } |
73 | 73 | ||
74 | +/* Don't fail if the standard library | 74 | +/* Don't fail if the standard library |
@@ -115,7 +115,7 @@ index 9b3e73cce0..3790ba3be5 100644 | |||
115 | 115 | ||
116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); | 116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); |
117 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c | 117 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c |
118 | index 230ec09b97..2cc5f391d7 100644 | 118 | index 86bf16356d..da552dbaab 100644 |
119 | --- a/src/tmpfiles/tmpfiles.c | 119 | --- a/src/tmpfiles/tmpfiles.c |
120 | +++ b/src/tmpfiles/tmpfiles.c | 120 | +++ b/src/tmpfiles/tmpfiles.c |
121 | @@ -73,6 +73,12 @@ | 121 | @@ -73,6 +73,12 @@ |
@@ -131,7 +131,7 @@ index 230ec09b97..2cc5f391d7 100644 | |||
131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates | 131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates |
132 | * them in the file system. This is intended to be used to create | 132 | * them in the file system. This is intended to be used to create |
133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are | 133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are |
134 | @@ -2434,7 +2440,9 @@ finish: | 134 | @@ -2573,7 +2579,9 @@ finish: |
135 | 135 | ||
136 | static int glob_item(Context *c, Item *i, action_t action) { | 136 | static int glob_item(Context *c, Item *i, action_t action) { |
137 | _cleanup_globfree_ glob_t g = { | 137 | _cleanup_globfree_ glob_t g = { |
@@ -139,9 +139,9 @@ index 230ec09b97..2cc5f391d7 100644 | |||
139 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, | 139 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, |
140 | +#endif | 140 | +#endif |
141 | }; | 141 | }; |
142 | int r = 0, k; | 142 | int r; |
143 | 143 | ||
144 | @@ -2461,7 +2469,9 @@ static int glob_item_recursively( | 144 | @@ -2601,7 +2609,9 @@ static int glob_item_recursively( |
145 | fdaction_t action) { | 145 | fdaction_t action) { |
146 | 146 | ||
147 | _cleanup_globfree_ glob_t g = { | 147 | _cleanup_globfree_ glob_t g = { |
@@ -149,7 +149,7 @@ index 230ec09b97..2cc5f391d7 100644 | |||
149 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, | 149 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, |
150 | +#endif | 150 | +#endif |
151 | }; | 151 | }; |
152 | int r = 0, k; | 152 | int r; |
153 | 153 | ||
154 | -- | 154 | -- |
155 | 2.34.1 | 155 | 2.34.1 |
diff --git a/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0006-add-missing-FTW_-macros-for-musl.patch index a1dfca22cd..578411c4cf 100644 --- a/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0006-add-missing-FTW_-macros-for-musl.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From dad7f897c0de654fa5592fda3e90f874639849f9 Mon Sep 17 00:00:00 2001 | 1 | From 54b6e10aea2b0fb52782c3a71f06654a89b46bff Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 | 3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 |
4 | Subject: [PATCH 05/22] add missing FTW_ macros for musl | 4 | Subject: [PATCH 06/26] add missing FTW_ macros for musl |
5 | 5 | ||
6 | This is to avoid build failures like below for musl. | 6 | This is to avoid build failures like below for musl. |
7 | 7 | ||
@@ -16,7 +16,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
16 | 2 files changed, 5 insertions(+) | 16 | 2 files changed, 5 insertions(+) |
17 | 17 | ||
18 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | 18 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h |
19 | index 6c0456349d..73a5b90e3c 100644 | 19 | index fc33b76ec1..34a36d83f0 100644 |
20 | --- a/src/basic/missing_type.h | 20 | --- a/src/basic/missing_type.h |
21 | +++ b/src/basic/missing_type.h | 21 | +++ b/src/basic/missing_type.h |
22 | @@ -14,3 +14,7 @@ | 22 | @@ -14,3 +14,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch index 4be14b72ec..b4a570e1f5 100644 --- a/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta/recipes-core/systemd/systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 96e975a2412a20e5f80bd3ab144057d275eb8597 Mon Sep 17 00:00:00 2001 | 1 | From 85d8c4c27e855d54c1740902a836c8f2aea9bebc Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 | 3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 |
4 | Subject: [PATCH 06/22] Use uintmax_t for handling rlim_t | 4 | Subject: [PATCH 07/26] Use uintmax_t for handling rlim_t |
5 | 5 | ||
6 | PRIu{32,64} is not right format to represent rlim_t type | 6 | PRIu{32,64} is not right format to represent rlim_t type |
7 | therefore use %ju and typecast the rlim_t variables to | 7 | therefore use %ju and typecast the rlim_t variables to |
@@ -27,10 +27,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
27 | 3 files changed, 9 insertions(+), 15 deletions(-) | 27 | 3 files changed, 9 insertions(+), 15 deletions(-) |
28 | 28 | ||
29 | diff --git a/src/basic/format-util.h b/src/basic/format-util.h | 29 | diff --git a/src/basic/format-util.h b/src/basic/format-util.h |
30 | index 8719df3e29..9becc96066 100644 | 30 | index b528c005ca..41c4c095be 100644 |
31 | --- a/src/basic/format-util.h | 31 | --- a/src/basic/format-util.h |
32 | +++ b/src/basic/format-util.h | 32 | +++ b/src/basic/format-util.h |
33 | @@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); | 33 | @@ -41,13 +41,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); |
34 | # error Unknown timex member size | 34 | # error Unknown timex member size |
35 | #endif | 35 | #endif |
36 | 36 | ||
@@ -46,10 +46,10 @@ index 8719df3e29..9becc96066 100644 | |||
46 | #if SIZEOF_DEV_T == 8 | 46 | #if SIZEOF_DEV_T == 8 |
47 | # define DEV_FMT "%" PRIu64 | 47 | # define DEV_FMT "%" PRIu64 |
48 | diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c | 48 | diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c |
49 | index c1f0b2b974..61c5412582 100644 | 49 | index a9f7b87f28..059c67731d 100644 |
50 | --- a/src/basic/rlimit-util.c | 50 | --- a/src/basic/rlimit-util.c |
51 | +++ b/src/basic/rlimit-util.c | 51 | +++ b/src/basic/rlimit-util.c |
52 | @@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { | 52 | @@ -47,7 +47,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { |
53 | fixed.rlim_max == highest.rlim_max) | 53 | fixed.rlim_max == highest.rlim_max) |
54 | return 0; | 54 | return 0; |
55 | 55 | ||
@@ -58,7 +58,7 @@ index c1f0b2b974..61c5412582 100644 | |||
58 | 58 | ||
59 | return RET_NERRNO(setrlimit(resource, &fixed)); | 59 | return RET_NERRNO(setrlimit(resource, &fixed)); |
60 | } | 60 | } |
61 | @@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { | 61 | @@ -310,13 +310,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { |
62 | if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) | 62 | if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) |
63 | r = free_and_strdup(&s, "infinity"); | 63 | r = free_and_strdup(&s, "infinity"); |
64 | else if (rl->rlim_cur >= RLIM_INFINITY) | 64 | else if (rl->rlim_cur >= RLIM_INFINITY) |
@@ -76,7 +76,7 @@ index c1f0b2b974..61c5412582 100644 | |||
76 | if (r < 0) | 76 | if (r < 0) |
77 | return -ENOMEM; | 77 | return -ENOMEM; |
78 | 78 | ||
79 | @@ -422,7 +422,7 @@ int rlimit_nofile_safe(void) { | 79 | @@ -425,7 +425,7 @@ int rlimit_nofile_safe(void) { |
80 | rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open()); | 80 | rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open()); |
81 | rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max); | 81 | rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max); |
82 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) | 82 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) |
@@ -86,10 +86,10 @@ index c1f0b2b974..61c5412582 100644 | |||
86 | return 1; | 86 | return 1; |
87 | } | 87 | } |
88 | diff --git a/src/core/execute.c b/src/core/execute.c | 88 | diff --git a/src/core/execute.c b/src/core/execute.c |
89 | index bd3da0c401..df1870fd2f 100644 | 89 | index 3d55b0b772..4824ff159e 100644 |
90 | --- a/src/core/execute.c | 90 | --- a/src/core/execute.c |
91 | +++ b/src/core/execute.c | 91 | +++ b/src/core/execute.c |
92 | @@ -1045,9 +1045,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { | 92 | @@ -1162,9 +1162,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { |
93 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) | 93 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) |
94 | if (c->rlimit[i]) { | 94 | if (c->rlimit[i]) { |
95 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", | 95 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", |
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch deleted file mode 100644 index 8d6084239e..0000000000 --- a/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From 4842cff4f1329f0b5034b529d56f8ad1f234ac4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
3 | Date: Tue, 10 Oct 2017 14:33:30 -0700 | ||
4 | Subject: [PATCH 07/22] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() | ||
5 | |||
6 | Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right | ||
7 | thing to do and it's not portable (not supported by musl). See: | ||
8 | |||
9 | http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html | ||
10 | http://www.openwall.com/lists/musl/2015/02/05/2 | ||
11 | |||
12 | Note that laccess() is never passing AT_EACCESS so a lot of the | ||
13 | discussion in the links above doesn't apply. Note also that | ||
14 | (currently) all systemd callers of laccess() pass mode as F_OK, so | ||
15 | only check for existence of a file, not access permissions. | ||
16 | Therefore, in this case, the only distiction between faccessat() | ||
17 | with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour | ||
18 | for broken symlinks; laccess() on a broken symlink will succeed with | ||
19 | (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). | ||
20 | |||
21 | The laccess() macros was added to systemd some time ago and it's not | ||
22 | clear if or why it needs to return success for broken symlinks. Maybe | ||
23 | just historical and not actually necessary or desired behaviour? | ||
24 | |||
25 | Upstream-Status: Inappropriate [musl specific] | ||
26 | |||
27 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
28 | --- | ||
29 | src/basic/fs-util.h | 21 ++++++++++++++++++++- | ||
30 | src/shared/base-filesystem.c | 6 +++--- | ||
31 | 2 files changed, 23 insertions(+), 4 deletions(-) | ||
32 | |||
33 | diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h | ||
34 | index 1023ab73ca..c78ff6f27f 100644 | ||
35 | --- a/src/basic/fs-util.h | ||
36 | +++ b/src/basic/fs-util.h | ||
37 | @@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); | ||
38 | int fd_warn_permissions(const char *path, int fd); | ||
39 | int stat_warn_permissions(const char *path, const struct stat *st); | ||
40 | |||
41 | +/* | ||
42 | + Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to | ||
43 | + do and it's not portable (not supported by musl). See: | ||
44 | + | ||
45 | + http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html | ||
46 | + http://www.openwall.com/lists/musl/2015/02/05/2 | ||
47 | + | ||
48 | + Note that laccess() is never passing AT_EACCESS so a lot of the discussion in | ||
49 | + the links above doesn't apply. Note also that (currently) all systemd callers | ||
50 | + of laccess() pass mode as F_OK, so only check for existence of a file, not | ||
51 | + access permissions. Therefore, in this case, the only distiction between | ||
52 | + faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the | ||
53 | + behaviour for broken symlinks; laccess() on a broken symlink will succeed | ||
54 | + with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0). | ||
55 | + | ||
56 | + The laccess() macros was added to systemd some time ago and it's not clear if | ||
57 | + or why it needs to return success for broken symlinks. Maybe just historical | ||
58 | + and not actually necessary or desired behaviour? | ||
59 | +*/ | ||
60 | #define laccess(path, mode) \ | ||
61 | - RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) | ||
62 | + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) | ||
63 | |||
64 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); | ||
65 | |||
66 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | ||
67 | index 569ef466c3..7ae921a113 100644 | ||
68 | --- a/src/shared/base-filesystem.c | ||
69 | +++ b/src/shared/base-filesystem.c | ||
70 | @@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { | ||
71 | /* The "root" parameter is decoration only – it's only used as part of log messages */ | ||
72 | |||
73 | for (size_t i = 0; i < ELEMENTSOF(table); i++) { | ||
74 | - if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) | ||
75 | + if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) | ||
76 | continue; | ||
77 | |||
78 | if (table[i].target) { /* Create as symlink? */ | ||
79 | @@ -153,7 +153,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { | ||
80 | |||
81 | /* check if one of the targets exists */ | ||
82 | NULSTR_FOREACH(s, table[i].target) { | ||
83 | - if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0) | ||
84 | + if (faccessat(fd, s, F_OK, 0) < 0) | ||
85 | continue; | ||
86 | |||
87 | /* check if a specific file exists at the target path */ | ||
88 | @@ -164,7 +164,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { | ||
89 | if (!p) | ||
90 | return log_oom(); | ||
91 | |||
92 | - if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0) | ||
93 | + if (faccessat(fd, p, F_OK, 0) < 0) | ||
94 | continue; | ||
95 | } | ||
96 | |||
97 | -- | ||
98 | 2.34.1 | ||
99 | |||
diff --git a/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch index c1a8bb19fe..22e2ceadcc 100644 --- a/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From bab07e779ff23d5593bb118efaaa31b60a6dce87 Mon Sep 17 00:00:00 2001 | 1 | From f4cd939c7cc1ce0a59bab2693768f2c95d9ced00 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 27 May 2018 08:36:44 -0700 | 3 | Date: Sun, 27 May 2018 08:36:44 -0700 |
4 | Subject: [PATCH 08/22] Define glibc compatible basename() for non-glibc | 4 | Subject: [PATCH 08/26] Define glibc compatible basename() for non-glibc |
5 | systems | 5 | systems |
6 | 6 | ||
7 | Fixes builds with musl, even though systemd is adamant about | 7 | Fixes builds with musl, even though systemd is adamant about |
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | 1 file changed, 4 insertions(+) | 15 | 1 file changed, 4 insertions(+) |
16 | 16 | ||
17 | diff --git a/src/basic/string-util.h b/src/basic/string-util.h | 17 | diff --git a/src/basic/string-util.h b/src/basic/string-util.h |
18 | index b6d8be3083..0a29036c4c 100644 | 18 | index cc6aa183c0..0b035125cd 100644 |
19 | --- a/src/basic/string-util.h | 19 | --- a/src/basic/string-util.h |
20 | +++ b/src/basic/string-util.h | 20 | +++ b/src/basic/string-util.h |
21 | @@ -26,6 +26,10 @@ | 21 | @@ -27,6 +27,10 @@ |
22 | #define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ | 22 | #define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ |
23 | #define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ | 23 | #define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ |
24 | 24 | ||
diff --git a/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index 3ff0177ae3..8e3eb15b54 100644 --- a/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 25093c5017725b8577c444dfea0f42ad85b43522 Mon Sep 17 00:00:00 2001 | 1 | From 6959db351fdd551d46e22667deec6032552b2662 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 | 3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 |
4 | Subject: [PATCH 09/22] Do not disable buffering when writing to oom_score_adj | 4 | Subject: [PATCH 09/26] Do not disable buffering when writing to oom_score_adj |
5 | 5 | ||
6 | On musl, disabling buffering when writing to oom_score_adj will | 6 | On musl, disabling buffering when writing to oom_score_adj will |
7 | cause the following error. | 7 | cause the following error. |
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
25 | 25 | ||
26 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | 26 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c |
27 | index 201c5596ae..ea51595b6c 100644 | 27 | index 3253a9c3fb..772c4082a1 100644 |
28 | --- a/src/basic/process-util.c | 28 | --- a/src/basic/process-util.c |
29 | +++ b/src/basic/process-util.c | 29 | +++ b/src/basic/process-util.c |
30 | @@ -1716,7 +1716,7 @@ int set_oom_score_adjust(int value) { | 30 | @@ -1848,7 +1848,7 @@ int set_oom_score_adjust(int value) { |
31 | xsprintf(t, "%i", value); | 31 | xsprintf(t, "%i", value); |
32 | 32 | ||
33 | return write_string_file("/proc/self/oom_score_adj", t, | 33 | return write_string_file("/proc/self/oom_score_adj", t, |
diff --git a/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index cf59ac7d06..0dfb77890e 100644 --- a/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 2adbe9773cd65c48eec9df96868d4a738927c8d9 Mon Sep 17 00:00:00 2001 | 1 | From b7f6c245b4ae72999f23eecc2bbb6d6fb8db667c Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 | 3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 |
4 | Subject: [PATCH 10/22] distinguish XSI-compliant strerror_r from GNU-specifi | 4 | Subject: [PATCH 10/26] distinguish XSI-compliant strerror_r from GNU-specifi |
5 | strerror_r | 5 | strerror_r |
6 | 6 | ||
7 | XSI-compliant strerror_r and GNU-specifi strerror_r are different. | 7 | XSI-compliant strerror_r and GNU-specifi strerror_r are different. |
@@ -24,10 +24,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
24 | 2 files changed, 15 insertions(+), 1 deletion(-) | 24 | 2 files changed, 15 insertions(+), 1 deletion(-) |
25 | 25 | ||
26 | diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c | 26 | diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c |
27 | index 77b2e1a0fd..fdba0e0142 100644 | 27 | index 58c24d25c0..69a0d09d42 100644 |
28 | --- a/src/libsystemd/sd-bus/bus-error.c | 28 | --- a/src/libsystemd/sd-bus/bus-error.c |
29 | +++ b/src/libsystemd/sd-bus/bus-error.c | 29 | +++ b/src/libsystemd/sd-bus/bus-error.c |
30 | @@ -408,7 +408,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { | 30 | @@ -405,7 +405,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { |
31 | return; | 31 | return; |
32 | 32 | ||
33 | errno = 0; | 33 | errno = 0; |
@@ -40,7 +40,7 @@ index 77b2e1a0fd..fdba0e0142 100644 | |||
40 | if (errno == ERANGE || strlen(x) >= k - 1) { | 40 | if (errno == ERANGE || strlen(x) >= k - 1) { |
41 | free(m); | 41 | free(m); |
42 | k *= 2; | 42 | k *= 2; |
43 | @@ -593,8 +598,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static | 43 | @@ -590,8 +595,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static |
44 | 44 | ||
45 | if (e && e->message) | 45 | if (e && e->message) |
46 | return e->message; | 46 | return e->message; |
@@ -55,7 +55,7 @@ index 77b2e1a0fd..fdba0e0142 100644 | |||
55 | 55 | ||
56 | static bool map_ok(const sd_bus_error_map *map) { | 56 | static bool map_ok(const sd_bus_error_map *map) { |
57 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c | 57 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c |
58 | index 69a2eb6404..1561859650 100644 | 58 | index 75e8e08add..41e5c7c2b8 100644 |
59 | --- a/src/libsystemd/sd-journal/journal-send.c | 59 | --- a/src/libsystemd/sd-journal/journal-send.c |
60 | +++ b/src/libsystemd/sd-journal/journal-send.c | 60 | +++ b/src/libsystemd/sd-journal/journal-send.c |
61 | @@ -361,7 +361,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove | 61 | @@ -361,7 +361,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove |
diff --git a/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch index e481b2e2e4..16d741cf87 100644 --- a/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 49c446cfb78cf74a909bed8c3798b77a5469866a Mon Sep 17 00:00:00 2001 | 1 | From 43b0269e850a2fbcb6ca615258aa8f8a9b4f6a9d Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 | 3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 |
4 | Subject: [PATCH 11/22] avoid redefinition of prctl_mm_map structure | 4 | Subject: [PATCH 11/26] avoid redefinition of prctl_mm_map structure |
5 | 5 | ||
6 | Fix the following compile failure: | 6 | Fix the following compile failure: |
7 | error: redefinition of 'struct prctl_mm_map' | 7 | error: redefinition of 'struct prctl_mm_map' |
@@ -14,7 +14,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
14 | 1 file changed, 2 insertions(+) | 14 | 1 file changed, 2 insertions(+) |
15 | 15 | ||
16 | diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h | 16 | diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h |
17 | index 7d9e395c92..88c2d7dfac 100644 | 17 | index 2c9f9f6c50..65a984b564 100644 |
18 | --- a/src/basic/missing_prctl.h | 18 | --- a/src/basic/missing_prctl.h |
19 | +++ b/src/basic/missing_prctl.h | 19 | +++ b/src/basic/missing_prctl.h |
20 | @@ -1,7 +1,9 @@ | 20 | @@ -1,7 +1,9 @@ |
@@ -25,8 +25,8 @@ index 7d9e395c92..88c2d7dfac 100644 | |||
25 | #include <linux/prctl.h> | 25 | #include <linux/prctl.h> |
26 | +#endif | 26 | +#endif |
27 | 27 | ||
28 | /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ | 28 | #include "macro.h" |
29 | #ifndef PR_CAP_AMBIENT | 29 | |
30 | -- | 30 | -- |
31 | 2.34.1 | 31 | 2.34.1 |
32 | 32 | ||
diff --git a/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch index 66be79077e..0bbc6bbac7 100644 --- a/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch +++ b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From e4885a8e60f883d9217e26e1db3754c2906aca31 Mon Sep 17 00:00:00 2001 | 1 | From eaf26fdad00448b8cd336eb5db51e0baa8d8e588 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Fri, 1 Mar 2019 15:22:15 +0800 | 3 | Date: Mon, 16 Dec 2024 14:37:25 +0800 |
4 | Subject: [PATCH 12/22] do not disable buffer in writing files | 4 | Subject: [PATCH 12/26] do not disable buffer in writing files |
5 | 5 | ||
6 | Do not disable buffer in writing files, otherwise we get | 6 | Do not disable buffer in writing files, otherwise we get |
7 | failure at boot for musl like below. | 7 | failure at boot for musl like below. |
@@ -22,80 +22,43 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
23 | [rebased for systemd 255.1] | 23 | [rebased for systemd 255.1] |
24 | --- | 24 | --- |
25 | src/basic/cgroup-util.c | 12 ++++++------ | 25 | src/basic/cgroup-util.c | 4 ++-- |
26 | src/basic/namespace-util.c | 4 ++-- | 26 | src/basic/namespace-util.c | 4 ++-- |
27 | src/basic/procfs-util.c | 4 ++-- | 27 | src/basic/procfs-util.c | 4 ++-- |
28 | src/basic/sysctl-util.c | 2 +- | 28 | src/basic/sysctl-util.c | 2 +- |
29 | src/binfmt/binfmt.c | 6 +++--- | 29 | src/binfmt/binfmt.c | 6 +++--- |
30 | src/core/cgroup.c | 2 +- | 30 | src/core/cgroup.c | 2 +- |
31 | src/core/ipe-setup.c | 2 +- | ||
31 | src/core/main.c | 2 +- | 32 | src/core/main.c | 2 +- |
32 | src/core/smack-setup.c | 8 ++++---- | 33 | src/core/smack-setup.c | 6 +++--- |
33 | src/home/homework.c | 2 +- | 34 | src/home/homework.c | 2 +- |
34 | src/libsystemd/sd-device/sd-device.c | 2 +- | 35 | src/libsystemd/sd-device/sd-device.c | 2 +- |
35 | src/nspawn/nspawn-cgroup.c | 2 +- | 36 | src/nspawn/nspawn-cgroup.c | 2 +- |
36 | src/nspawn/nspawn.c | 6 +++--- | 37 | src/nspawn/nspawn.c | 6 +++--- |
37 | src/shared/binfmt-util.c | 2 +- | 38 | src/shared/binfmt-util.c | 2 +- |
38 | src/shared/cgroup-setup.c | 4 ++-- | 39 | src/shared/cgroup-setup.c | 12 ++++++------ |
39 | src/shared/coredump-util.c | 4 ++-- | 40 | src/shared/coredump-util.c | 2 +- |
40 | src/shared/hibernate-util.c | 4 ++-- | 41 | src/shared/hibernate-util.c | 4 ++-- |
41 | src/shared/smack-util.c | 2 +- | 42 | src/shared/smack-util.c | 2 +- |
42 | src/shared/watchdog.c | 2 +- | 43 | src/sleep/sleep.c | 2 +- |
43 | src/sleep/sleep.c | 4 ++-- | ||
44 | src/storagetm/storagetm.c | 24 ++++++++++++------------ | 44 | src/storagetm/storagetm.c | 24 ++++++++++++------------ |
45 | src/udev/udev-rules.c | 1 - | ||
46 | src/vconsole/vconsole-setup.c | 2 +- | 45 | src/vconsole/vconsole-setup.c | 2 +- |
47 | 22 files changed, 50 insertions(+), 51 deletions(-) | 46 | 21 files changed, 47 insertions(+), 47 deletions(-) |
48 | 47 | ||
49 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | 48 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c |
50 | index d2be79622f..e65fecb68d 100644 | 49 | index 309dccb45a..7aec5072a0 100644 |
51 | --- a/src/basic/cgroup-util.c | 50 | --- a/src/basic/cgroup-util.c |
52 | +++ b/src/basic/cgroup-util.c | 51 | +++ b/src/basic/cgroup-util.c |
53 | @@ -417,7 +417,7 @@ int cg_kill_kernel_sigkill(const char *path) { | 52 | @@ -495,7 +495,7 @@ int cg_kill_kernel_sigkill(const char *path) { |
54 | if (r < 0) | 53 | if (r < 0) |
55 | return r; | 54 | return r; |
56 | 55 | ||
57 | - r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER); | 56 | - r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER); |
58 | + r = write_string_file(killfile, "1", 0); | 57 | + r = write_string_file(killfile, "1", 0); |
59 | if (r < 0) | 58 | if (r < 0) |
60 | return r; | 59 | return log_debug_errno(r, "Failed to write to cgroup.kill for cgroup '%s': %m", path); |
61 | |||
62 | @@ -843,7 +843,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | ||
63 | |||
64 | sc = strstrip(contents); | ||
65 | if (isempty(sc)) { | ||
66 | - r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
67 | + r = write_string_file(fs, agent, 0); | ||
68 | if (r < 0) | ||
69 | return r; | ||
70 | } else if (!path_equal(sc, agent)) | ||
71 | @@ -861,7 +861,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | ||
72 | 60 | ||
73 | sc = strstrip(contents); | 61 | @@ -1721,7 +1721,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri |
74 | if (streq(sc, "0")) { | ||
75 | - r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
76 | + r = write_string_file(fs, "1", 0); | ||
77 | if (r < 0) | ||
78 | return r; | ||
79 | |||
80 | @@ -888,7 +888,7 @@ int cg_uninstall_release_agent(const char *controller) { | ||
81 | if (r < 0) | ||
82 | return r; | ||
83 | |||
84 | - r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
85 | + r = write_string_file(fs, "0", 0); | ||
86 | if (r < 0) | ||
87 | return r; | ||
88 | |||
89 | @@ -898,7 +898,7 @@ int cg_uninstall_release_agent(const char *controller) { | ||
90 | if (r < 0) | ||
91 | return r; | ||
92 | |||
93 | - r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
94 | + r = write_string_file(fs, "", 0); | ||
95 | if (r < 0) | ||
96 | return r; | ||
97 | |||
98 | @@ -1814,7 +1814,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri | ||
99 | if (r < 0) | 62 | if (r < 0) |
100 | return r; | 63 | return r; |
101 | 64 | ||
@@ -105,29 +68,29 @@ index d2be79622f..e65fecb68d 100644 | |||
105 | 68 | ||
106 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { | 69 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { |
107 | diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c | 70 | diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c |
108 | index 2101f617ad..63817bae17 100644 | 71 | index 332e8cdfd5..804498127d 100644 |
109 | --- a/src/basic/namespace-util.c | 72 | --- a/src/basic/namespace-util.c |
110 | +++ b/src/basic/namespace-util.c | 73 | +++ b/src/basic/namespace-util.c |
111 | @@ -227,12 +227,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { | 74 | @@ -359,12 +359,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { |
112 | freeze(); | 75 | freeze(); |
113 | 76 | ||
114 | xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); | 77 | xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); |
115 | - r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | 78 | - r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); |
116 | + r = write_string_file(path, uid_map, 0); | 79 | + r = write_string_file(path, uid_map, 0); |
117 | if (r < 0) | 80 | if (r < 0) |
118 | return log_error_errno(r, "Failed to write UID map: %m"); | 81 | return log_debug_errno(r, "Failed to write UID map: %m"); |
119 | 82 | ||
120 | xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); | 83 | xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); |
121 | - r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | 84 | - r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); |
122 | + r = write_string_file(path, gid_map, 0); | 85 | + r = write_string_file(path, gid_map, 0); |
123 | if (r < 0) | 86 | if (r < 0) |
124 | return log_error_errno(r, "Failed to write GID map: %m"); | 87 | return log_debug_errno(r, "Failed to write GID map: %m"); |
125 | 88 | ||
126 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | 89 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c |
127 | index 6cb0ddf575..247cf9e1d1 100644 | 90 | index d7cfcd9105..58fb5918a3 100644 |
128 | --- a/src/basic/procfs-util.c | 91 | --- a/src/basic/procfs-util.c |
129 | +++ b/src/basic/procfs-util.c | 92 | +++ b/src/basic/procfs-util.c |
130 | @@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limit) { | 93 | @@ -63,13 +63,13 @@ int procfs_tasks_set_limit(uint64_t limit) { |
131 | * decrease it, as threads-max is the much more relevant sysctl. */ | 94 | * decrease it, as threads-max is the much more relevant sysctl. */ |
132 | if (limit > pid_max-1) { | 95 | if (limit > pid_max-1) { |
133 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ | 96 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ |
@@ -144,15 +107,15 @@ index 6cb0ddf575..247cf9e1d1 100644 | |||
144 | uint64_t threads_max; | 107 | uint64_t threads_max; |
145 | 108 | ||
146 | diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c | 109 | diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c |
147 | index b66a6622ae..8d1c93008a 100644 | 110 | index 2feb4917d7..4c74620a00 100644 |
148 | --- a/src/basic/sysctl-util.c | 111 | --- a/src/basic/sysctl-util.c |
149 | +++ b/src/basic/sysctl-util.c | 112 | +++ b/src/basic/sysctl-util.c |
150 | @@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) { | 113 | @@ -97,7 +97,7 @@ int sysctl_write_full(const char *property, const char *value, Hashmap **shadow) |
151 | 114 | if (r < 0) | |
152 | log_debug("Setting '%s' to '%s'", p, value); | 115 | return r; |
153 | 116 | ||
154 | - return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); | 117 | - return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); |
155 | + return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); | 118 | + return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0 | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); |
156 | } | 119 | } |
157 | 120 | ||
158 | int sysctl_writef(const char *property, const char *format, ...) { | 121 | int sysctl_writef(const char *property, const char *format, ...) { |
@@ -188,23 +151,36 @@ index d21f3f79ff..258607cc7e 100644 | |||
188 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); | 151 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); |
189 | else | 152 | else |
190 | diff --git a/src/core/cgroup.c b/src/core/cgroup.c | 153 | diff --git a/src/core/cgroup.c b/src/core/cgroup.c |
191 | index 61ac4df1a6..ea18970196 100644 | 154 | index 6933aae54d..ab6fccc0e4 100644 |
192 | --- a/src/core/cgroup.c | 155 | --- a/src/core/cgroup.c |
193 | +++ b/src/core/cgroup.c | 156 | +++ b/src/core/cgroup.c |
194 | @@ -4578,7 +4578,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { | 157 | @@ -5175,7 +5175,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { |
195 | u->freezer_state = FREEZER_THAWING; | 158 | if (r < 0) |
196 | } | 159 | return r; |
197 | 160 | ||
198 | - r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); | 161 | - r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), WRITE_STRING_FILE_DISABLE_BUFFER); |
199 | + r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); | 162 | + r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), 0); |
200 | if (r < 0) | 163 | if (r < 0) |
201 | return r; | 164 | return r; |
202 | 165 | ||
166 | diff --git a/src/core/ipe-setup.c b/src/core/ipe-setup.c | ||
167 | index 4648d43829..80d03d87d4 100644 | ||
168 | --- a/src/core/ipe-setup.c | ||
169 | +++ b/src/core/ipe-setup.c | ||
170 | @@ -94,7 +94,7 @@ int ipe_setup(void) { | ||
171 | if (!activate_path) | ||
172 | return log_oom(); | ||
173 | |||
174 | - r = write_string_file(activate_path, "1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
175 | + r = write_string_file(activate_path, "1", 0); | ||
176 | if (r == -ESTALE) { | ||
177 | log_debug_errno(r, | ||
178 | "IPE policy %s is already loaded with a version that is equal or higher, skipping.", | ||
203 | diff --git a/src/core/main.c b/src/core/main.c | 179 | diff --git a/src/core/main.c b/src/core/main.c |
204 | index 3f71cc0947..0e5aec3e9e 100644 | 180 | index 172742c769..e68ce2a6d8 100644 |
205 | --- a/src/core/main.c | 181 | --- a/src/core/main.c |
206 | +++ b/src/core/main.c | 182 | +++ b/src/core/main.c |
207 | @@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { | 183 | @@ -1826,7 +1826,7 @@ static void initialize_core_pattern(bool skip_setup) { |
208 | if (getpid_cached() != 1) | 184 | if (getpid_cached() != 1) |
209 | return; | 185 | return; |
210 | 186 | ||
@@ -214,7 +190,7 @@ index 3f71cc0947..0e5aec3e9e 100644 | |||
214 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", | 190 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", |
215 | arg_early_core_pattern); | 191 | arg_early_core_pattern); |
216 | diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c | 192 | diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c |
217 | index 7ea902b6f9..1aef2988d0 100644 | 193 | index 7ea902b6f9..ee4cd56023 100644 |
218 | --- a/src/core/smack-setup.c | 194 | --- a/src/core/smack-setup.c |
219 | +++ b/src/core/smack-setup.c | 195 | +++ b/src/core/smack-setup.c |
220 | @@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) { | 196 | @@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) { |
@@ -230,8 +206,7 @@ index 7ea902b6f9..1aef2988d0 100644 | |||
230 | if (r < 0) | 206 | if (r < 0) |
231 | log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); | 207 | log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); |
232 | r = write_string_file("/sys/fs/smackfs/netlabel", | 208 | r = write_string_file("/sys/fs/smackfs/netlabel", |
233 | - "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); | 209 | "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); |
234 | + "0.0.0.0/0 " SMACK_RUN_LABEL, 0); | ||
235 | if (r < 0) | 210 | if (r < 0) |
236 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); | 211 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); |
237 | - r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); | 212 | - r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); |
@@ -240,23 +215,23 @@ index 7ea902b6f9..1aef2988d0 100644 | |||
240 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); | 215 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); |
241 | #endif | 216 | #endif |
242 | diff --git a/src/home/homework.c b/src/home/homework.c | 217 | diff --git a/src/home/homework.c b/src/home/homework.c |
243 | index 066483e342..5f92dd7064 100644 | 218 | index 00e74894b3..7457113efe 100644 |
244 | --- a/src/home/homework.c | 219 | --- a/src/home/homework.c |
245 | +++ b/src/home/homework.c | 220 | +++ b/src/home/homework.c |
246 | @@ -278,7 +278,7 @@ static void drop_caches_now(void) { | 221 | @@ -304,7 +304,7 @@ static void drop_caches_now(void) { |
247 | * for details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but | 222 | * for details. We write "3" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but |
248 | * not more. */ | 223 | * not more. */ |
249 | 224 | ||
250 | - r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); | 225 | - r = write_string_file("/proc/sys/vm/drop_caches", "3\n", WRITE_STRING_FILE_DISABLE_BUFFER); |
251 | + r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); | 226 | + r = write_string_file("/proc/sys/vm/drop_caches", "3\n", 0); |
252 | if (r < 0) | 227 | if (r < 0) |
253 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); | 228 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); |
254 | else | 229 | else |
255 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c | 230 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c |
256 | index 2fbc619a34..09d9591e37 100644 | 231 | index 01fa90b1ff..83ab655bf4 100644 |
257 | --- a/src/libsystemd/sd-device/sd-device.c | 232 | --- a/src/libsystemd/sd-device/sd-device.c |
258 | +++ b/src/libsystemd/sd-device/sd-device.c | 233 | +++ b/src/libsystemd/sd-device/sd-device.c |
259 | @@ -2516,7 +2516,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, | 234 | @@ -2564,7 +2564,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, |
260 | if (!value) | 235 | if (!value) |
261 | return -ENOMEM; | 236 | return -ENOMEM; |
262 | 237 | ||
@@ -266,23 +241,23 @@ index 2fbc619a34..09d9591e37 100644 | |||
266 | /* On failure, clear cache entry, as we do not know how it fails. */ | 241 | /* On failure, clear cache entry, as we do not know how it fails. */ |
267 | device_remove_cached_sysattr_value(device, sysattr); | 242 | device_remove_cached_sysattr_value(device, sysattr); |
268 | diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c | 243 | diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c |
269 | index a5002437c6..b12e6cd9c9 100644 | 244 | index 4f28b4a225..c899c218b2 100644 |
270 | --- a/src/nspawn/nspawn-cgroup.c | 245 | --- a/src/nspawn/nspawn-cgroup.c |
271 | +++ b/src/nspawn/nspawn-cgroup.c | 246 | +++ b/src/nspawn/nspawn-cgroup.c |
272 | @@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { | 247 | @@ -93,7 +93,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { |
273 | fn = strjoina(tree, cgroup, "/cgroup.procs"); | 248 | fn = strjoina(tree, cgroup, "/cgroup.procs"); |
274 | 249 | ||
275 | sprintf(pid_string, PID_FMT, pid); | 250 | sprintf(pid_string, PID_FMT, pid); |
276 | - r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); | 251 | - r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); |
277 | + r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); | 252 | + r = write_string_file(fn, pid_string, 0|WRITE_STRING_FILE_MKDIR_0755); |
278 | if (r < 0) { | 253 | if (r < 0) { |
279 | log_error_errno(r, "Failed to move process: %m"); | 254 | log_error_errno(r, "Failed to move process: %m"); |
280 | goto finish; | 255 | goto finish; |
281 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | 256 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c |
282 | index 6ab604d3dc..bbec6b686c 100644 | 257 | index 500725d35f..745b6815db 100644 |
283 | --- a/src/nspawn/nspawn.c | 258 | --- a/src/nspawn/nspawn.c |
284 | +++ b/src/nspawn/nspawn.c | 259 | +++ b/src/nspawn/nspawn.c |
285 | @@ -2688,7 +2688,7 @@ static int reset_audit_loginuid(void) { | 260 | @@ -2857,7 +2857,7 @@ static int reset_audit_loginuid(void) { |
286 | if (streq(p, "4294967295")) | 261 | if (streq(p, "4294967295")) |
287 | return 0; | 262 | return 0; |
288 | 263 | ||
@@ -291,7 +266,7 @@ index 6ab604d3dc..bbec6b686c 100644 | |||
291 | if (r < 0) { | 266 | if (r < 0) { |
292 | log_error_errno(r, | 267 | log_error_errno(r, |
293 | "Failed to reset audit login UID. This probably means that your kernel is too\n" | 268 | "Failed to reset audit login UID. This probably means that your kernel is too\n" |
294 | @@ -4141,7 +4141,7 @@ static int setup_uid_map( | 269 | @@ -4588,7 +4588,7 @@ static int setup_uid_map( |
295 | return log_oom(); | 270 | return log_oom(); |
296 | 271 | ||
297 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | 272 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); |
@@ -300,7 +275,7 @@ index 6ab604d3dc..bbec6b686c 100644 | |||
300 | if (r < 0) | 275 | if (r < 0) |
301 | return log_error_errno(r, "Failed to write UID map: %m"); | 276 | return log_error_errno(r, "Failed to write UID map: %m"); |
302 | 277 | ||
303 | @@ -4151,7 +4151,7 @@ static int setup_uid_map( | 278 | @@ -4598,7 +4598,7 @@ static int setup_uid_map( |
304 | return log_oom(); | 279 | return log_oom(); |
305 | 280 | ||
306 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); | 281 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); |
@@ -323,10 +298,10 @@ index a26175474b..1413a9c72c 100644 | |||
323 | return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); | 298 | return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); |
324 | 299 | ||
325 | diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c | 300 | diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c |
326 | index 934a16eaf3..c921ced861 100644 | 301 | index 49d40f60d8..0f4aa8512a 100644 |
327 | --- a/src/shared/cgroup-setup.c | 302 | --- a/src/shared/cgroup-setup.c |
328 | +++ b/src/shared/cgroup-setup.c | 303 | +++ b/src/shared/cgroup-setup.c |
329 | @@ -351,7 +351,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { | 304 | @@ -369,7 +369,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { |
330 | 305 | ||
331 | xsprintf(c, PID_FMT "\n", pid); | 306 | xsprintf(c, PID_FMT "\n", pid); |
332 | 307 | ||
@@ -335,29 +310,56 @@ index 934a16eaf3..c921ced861 100644 | |||
335 | if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0) | 310 | if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0) |
336 | /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ | 311 | /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ |
337 | return -EUCLEAN; | 312 | return -EUCLEAN; |
338 | @@ -966,7 +966,7 @@ int cg_enable_everywhere( | 313 | @@ -399,7 +399,7 @@ int cg_fd_attach(int fd, pid_t pid) { |
339 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); | 314 | |
340 | } | 315 | xsprintf(c, PID_FMT "\n", pid); |
341 | |||
342 | - r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
343 | + r = write_string_stream(f, s, 0); | ||
344 | if (r < 0) { | ||
345 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", | ||
346 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); | ||
347 | diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c | ||
348 | index 805503f366..01a7ccb291 100644 | ||
349 | --- a/src/shared/coredump-util.c | ||
350 | +++ b/src/shared/coredump-util.c | ||
351 | @@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) { | ||
352 | xsprintf(t, "0x%"PRIx64, value); | ||
353 | 316 | ||
354 | return write_string_file("/proc/self/coredump_filter", t, | 317 | - return write_string_file_at(fd, "cgroup.procs", c, WRITE_STRING_FILE_DISABLE_BUFFER); |
355 | - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); | 318 | + return write_string_file_at(fd, "cgroup.procs", c, 0); |
356 | + 0); | ||
357 | } | 319 | } |
358 | 320 | ||
359 | /* Turn off core dumps but only if we're running outside of a container. */ | 321 | int cg_attach_fallback(const char *controller, const char *path, pid_t pid) { |
360 | @@ -173,7 +173,7 @@ void disable_coredumps(void) { | 322 | @@ -1049,7 +1049,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { |
323 | |||
324 | sc = strstrip(contents); | ||
325 | if (isempty(sc)) { | ||
326 | - r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
327 | + r = write_string_file(fs, agent, 0); | ||
328 | if (r < 0) | ||
329 | return r; | ||
330 | } else if (!path_equal(sc, agent)) | ||
331 | @@ -1067,7 +1067,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | ||
332 | |||
333 | sc = strstrip(contents); | ||
334 | if (streq(sc, "0")) { | ||
335 | - r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
336 | + r = write_string_file(fs, "1", 0); | ||
337 | if (r < 0) | ||
338 | return r; | ||
339 | |||
340 | @@ -1094,7 +1094,7 @@ int cg_uninstall_release_agent(const char *controller) { | ||
341 | if (r < 0) | ||
342 | return r; | ||
343 | |||
344 | - r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
345 | + r = write_string_file(fs, "0", 0); | ||
346 | if (r < 0) | ||
347 | return r; | ||
348 | |||
349 | @@ -1104,7 +1104,7 @@ int cg_uninstall_release_agent(const char *controller) { | ||
350 | if (r < 0) | ||
351 | return r; | ||
352 | |||
353 | - r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
354 | + r = write_string_file(fs, "", 0); | ||
355 | if (r < 0) | ||
356 | return r; | ||
357 | |||
358 | diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c | ||
359 | index 805503f366..3234a1d76e 100644 | ||
360 | --- a/src/shared/coredump-util.c | ||
361 | +++ b/src/shared/coredump-util.c | ||
362 | @@ -180,7 +180,7 @@ void disable_coredumps(void) { | ||
361 | if (detect_container() > 0) | 363 | if (detect_container() > 0) |
362 | return; | 364 | return; |
363 | 365 | ||
@@ -367,10 +369,10 @@ index 805503f366..01a7ccb291 100644 | |||
367 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); | 369 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); |
368 | } | 370 | } |
369 | diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c | 371 | diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c |
370 | index 3eb13d48f6..d09b901be1 100644 | 372 | index 1213fdc2c7..4c26e6a4ee 100644 |
371 | --- a/src/shared/hibernate-util.c | 373 | --- a/src/shared/hibernate-util.c |
372 | +++ b/src/shared/hibernate-util.c | 374 | +++ b/src/shared/hibernate-util.c |
373 | @@ -481,7 +481,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { | 375 | @@ -498,7 +498,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { |
374 | 376 | ||
375 | /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so | 377 | /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so |
376 | * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ | 378 | * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ |
@@ -379,7 +381,7 @@ index 3eb13d48f6..d09b901be1 100644 | |||
379 | if (r == -ENOENT) { | 381 | if (r == -ENOENT) { |
380 | if (offset != 0) | 382 | if (offset != 0) |
381 | return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), | 383 | return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), |
382 | @@ -497,7 +497,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { | 384 | @@ -514,7 +514,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { |
383 | log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", | 385 | log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", |
384 | offset_str, device); | 386 | offset_str, device); |
385 | 387 | ||
@@ -389,7 +391,7 @@ index 3eb13d48f6..d09b901be1 100644 | |||
389 | return log_error_errno(r, | 391 | return log_error_errno(r, |
390 | "Failed to write device '%s' (%s) to /sys/power/resume: %m", | 392 | "Failed to write device '%s' (%s) to /sys/power/resume: %m", |
391 | diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c | 393 | diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c |
392 | index 1f88e724d0..feb18b320a 100644 | 394 | index d0a79b2635..0c82d9943a 100644 |
393 | --- a/src/shared/smack-util.c | 395 | --- a/src/shared/smack-util.c |
394 | +++ b/src/shared/smack-util.c | 396 | +++ b/src/shared/smack-util.c |
395 | @@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { | 397 | @@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { |
@@ -401,46 +403,24 @@ index 1f88e724d0..feb18b320a 100644 | |||
401 | if (r < 0) | 403 | if (r < 0) |
402 | return r; | 404 | return r; |
403 | 405 | ||
404 | diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c | ||
405 | index 4c1a968718..6faf6806a5 100644 | ||
406 | --- a/src/shared/watchdog.c | ||
407 | +++ b/src/shared/watchdog.c | ||
408 | @@ -93,7 +93,7 @@ static int set_pretimeout_governor(const char *governor) { | ||
409 | |||
410 | r = write_string_file(sys_fn, | ||
411 | governor, | ||
412 | - WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); | ||
413 | + WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); | ||
414 | if (r < 0) | ||
415 | return log_error_errno(r, "Failed to set pretimeout_governor to '%s': %m", governor); | ||
416 | |||
417 | diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c | 406 | diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c |
418 | index 21af3e9e52..6d4b84b5d5 100644 | 407 | index 181bb4ccef..2dbb3f4bc6 100644 |
419 | --- a/src/sleep/sleep.c | 408 | --- a/src/sleep/sleep.c |
420 | +++ b/src/sleep/sleep.c | 409 | +++ b/src/sleep/sleep.c |
421 | @@ -137,7 +137,7 @@ static int write_state(int fd, char * const *states) { | 410 | @@ -158,7 +158,7 @@ static int write_mode(const char *path, char * const *modes) { |
422 | if (k < 0) | 411 | assert(path); |
423 | return RET_GATHER(r, k); | ||
424 | |||
425 | - k = write_string_stream(f, *state, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
426 | + k = write_string_stream(f, *state, 0); | ||
427 | if (k >= 0) { | ||
428 | log_debug("Using sleep state '%s'.", *state); | ||
429 | return 0; | ||
430 | @@ -155,7 +155,7 @@ static int write_mode(char * const *modes) { | ||
431 | STRV_FOREACH(mode, modes) { | ||
432 | int k; | ||
433 | 412 | ||
434 | - k = write_string_file("/sys/power/disk", *mode, WRITE_STRING_FILE_DISABLE_BUFFER); | 413 | STRV_FOREACH(mode, modes) { |
435 | + k = write_string_file("/sys/power/disk", *mode, 0); | 414 | - r = write_string_file(path, *mode, WRITE_STRING_FILE_DISABLE_BUFFER); |
436 | if (k >= 0) { | 415 | + r = write_string_file(path, *mode, 0); |
437 | log_debug("Using sleep disk mode '%s'.", *mode); | 416 | if (r >= 0) { |
417 | log_debug("Using sleep mode '%s' for %s.", *mode, path); | ||
438 | return 0; | 418 | return 0; |
439 | diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c | 419 | diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c |
440 | index ae63baaf79..82eeca479a 100644 | 420 | index ca8e886d37..5c27c54f09 100644 |
441 | --- a/src/storagetm/storagetm.c | 421 | --- a/src/storagetm/storagetm.c |
442 | +++ b/src/storagetm/storagetm.c | 422 | +++ b/src/storagetm/storagetm.c |
443 | @@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) { | 423 | @@ -197,7 +197,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) { |
444 | if (!enable_fn) | 424 | if (!enable_fn) |
445 | return log_oom(); | 425 | return log_oom(); |
446 | 426 | ||
@@ -449,7 +429,7 @@ index ae63baaf79..82eeca479a 100644 | |||
449 | if (r < 0) | 429 | if (r < 0) |
450 | log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name); | 430 | log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name); |
451 | 431 | ||
452 | @@ -254,7 +254,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { | 432 | @@ -265,7 +265,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { |
453 | _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */ | 433 | _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */ |
454 | 434 | ||
455 | /* The default string stored in 'attr_model' is "Linux" btw. */ | 435 | /* The default string stored in 'attr_model' is "Linux" btw. */ |
@@ -458,7 +438,7 @@ index ae63baaf79..82eeca479a 100644 | |||
458 | if (r < 0) | 438 | if (r < 0) |
459 | log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w); | 439 | log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w); |
460 | } | 440 | } |
461 | @@ -268,7 +268,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { | 441 | @@ -279,7 +279,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { |
462 | return log_oom(); | 442 | return log_oom(); |
463 | 443 | ||
464 | /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */ | 444 | /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */ |
@@ -467,7 +447,7 @@ index ae63baaf79..82eeca479a 100644 | |||
467 | if (r < 0) | 447 | if (r < 0) |
468 | log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated); | 448 | log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated); |
469 | } | 449 | } |
470 | @@ -295,7 +295,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { | 450 | @@ -306,7 +306,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { |
471 | if (!truncated) | 451 | if (!truncated) |
472 | return log_oom(); | 452 | return log_oom(); |
473 | 453 | ||
@@ -476,7 +456,7 @@ index ae63baaf79..82eeca479a 100644 | |||
476 | if (r < 0) | 456 | if (r < 0) |
477 | log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated); | 457 | log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated); |
478 | } | 458 | } |
479 | @@ -345,7 +345,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co | 459 | @@ -356,7 +356,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co |
480 | id = id128_digest(j, l); | 460 | id = id128_digest(j, l); |
481 | } | 461 | } |
482 | 462 | ||
@@ -485,7 +465,7 @@ index ae63baaf79..82eeca479a 100644 | |||
485 | if (r < 0) | 465 | if (r < 0) |
486 | log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id)); | 466 | log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id)); |
487 | 467 | ||
488 | @@ -408,7 +408,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi | 468 | @@ -419,7 +419,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi |
489 | if (subsystem_fd < 0) | 469 | if (subsystem_fd < 0) |
490 | return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j); | 470 | return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j); |
491 | 471 | ||
@@ -494,7 +474,7 @@ index ae63baaf79..82eeca479a 100644 | |||
494 | if (r < 0) | 474 | if (r < 0) |
495 | return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m"); | 475 | return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m"); |
496 | 476 | ||
497 | @@ -423,11 +423,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi | 477 | @@ -434,11 +434,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi |
498 | 478 | ||
499 | /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others | 479 | /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others |
500 | * via configfs, and by including the PID it's clear to who the stuff belongs. */ | 480 | * via configfs, and by including the PID it's clear to who the stuff belongs. */ |
@@ -508,7 +488,7 @@ index ae63baaf79..82eeca479a 100644 | |||
508 | if (r < 0) | 488 | if (r < 0) |
509 | return log_error_errno(r, "Failed to write 'enable' attribute: %m"); | 489 | return log_error_errno(r, "Failed to write 'enable' attribute: %m"); |
510 | 490 | ||
511 | @@ -557,19 +557,19 @@ static int nvme_port_add_portnr( | 491 | @@ -568,19 +568,19 @@ static int nvme_port_add_portnr( |
512 | return 0; | 492 | return 0; |
513 | } | 493 | } |
514 | 494 | ||
@@ -532,23 +512,11 @@ index ae63baaf79..82eeca479a 100644 | |||
532 | if (r < 0) | 512 | if (r < 0) |
533 | return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr); | 513 | return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr); |
534 | 514 | ||
535 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
536 | index febe345b4c..a90b610ba1 100644 | ||
537 | --- a/src/udev/udev-rules.c | ||
538 | +++ b/src/udev/udev-rules.c | ||
539 | @@ -2711,7 +2711,6 @@ static int udev_rule_apply_token_to_event( | ||
540 | log_event_debug(dev, token, "ATTR '%s' writing '%s'", buf, value); | ||
541 | r = write_string_file(buf, value, | ||
542 | WRITE_STRING_FILE_VERIFY_ON_FAILURE | | ||
543 | - WRITE_STRING_FILE_DISABLE_BUFFER | | ||
544 | WRITE_STRING_FILE_AVOID_NEWLINE | | ||
545 | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); | ||
546 | if (r < 0) | ||
547 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c | 515 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c |
548 | index 4d82c65f0a..3a3d861b83 100644 | 516 | index ba742dda69..6f20e81615 100644 |
549 | --- a/src/vconsole/vconsole-setup.c | 517 | --- a/src/vconsole/vconsole-setup.c |
550 | +++ b/src/vconsole/vconsole-setup.c | 518 | +++ b/src/vconsole/vconsole-setup.c |
551 | @@ -261,7 +261,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { | 519 | @@ -277,7 +277,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { |
552 | static int toggle_utf8_sysfs(bool utf8) { | 520 | static int toggle_utf8_sysfs(bool utf8) { |
553 | int r; | 521 | int r; |
554 | 522 | ||
diff --git a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch index 43f75373a6..35009cba42 100644 --- a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch +++ b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 2f90f8463423cfbb7e83fcef42f1071018c3b56e Mon Sep 17 00:00:00 2001 | 1 | From ab4fda874b26542de96720db58cb0e8704a40108 Mon Sep 17 00:00:00 2001 |
2 | From: Scott Murray <scott.murray@konsulko.com> | 2 | From: Scott Murray <scott.murray@konsulko.com> |
3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 | 3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 |
4 | Subject: [PATCH 13/22] Handle __cpu_mask usage | 4 | Subject: [PATCH 13/26] Handle __cpu_mask usage |
5 | 5 | ||
6 | Fixes errors: | 6 | Fixes errors: |
7 | 7 | ||
@@ -24,7 +24,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
24 | 2 files changed, 3 insertions(+), 1 deletion(-) | 24 | 2 files changed, 3 insertions(+), 1 deletion(-) |
25 | 25 | ||
26 | diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h | 26 | diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h |
27 | index 3c63a58826..4c2d4347fc 100644 | 27 | index 2c477d8a01..c026ce77a6 100644 |
28 | --- a/src/shared/cpu-set-util.h | 28 | --- a/src/shared/cpu-set-util.h |
29 | +++ b/src/shared/cpu-set-util.h | 29 | +++ b/src/shared/cpu-set-util.h |
30 | @@ -6,6 +6,8 @@ | 30 | @@ -6,6 +6,8 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch index a751e1ba6f..0aabae6d82 100644 --- a/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch +++ b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From b7c827bb44edbb6251c9fcdb80aa03982c0e7bf3 Mon Sep 17 00:00:00 2001 | 1 | From c5165f6adf8a9cfe8c0784c598b87d7d7e8b7d1a Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 | 3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 |
4 | Subject: [PATCH 14/22] Handle missing gshadow | 4 | Subject: [PATCH 14/26] Handle missing gshadow |
5 | 5 | ||
6 | gshadow usage is now present in the userdb code. Mask all uses of it to | 6 | gshadow usage is now present in the userdb code. Mask all uses of it to |
7 | allow compilation on musl | 7 | allow compilation on musl |
@@ -17,10 +17,10 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
17 | 3 files changed, 30 insertions(+), 1 deletion(-) | 17 | 3 files changed, 30 insertions(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c | 19 | diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c |
20 | index 414a49331b..1a4e1b628c 100644 | 20 | index 9223a2e6ca..f9eb1a5b64 100644 |
21 | --- a/src/shared/user-record-nss.c | 21 | --- a/src/shared/user-record-nss.c |
22 | +++ b/src/shared/user-record-nss.c | 22 | +++ b/src/shared/user-record-nss.c |
23 | @@ -329,8 +329,10 @@ int nss_group_to_group_record( | 23 | @@ -286,8 +286,10 @@ int nss_group_to_group_record( |
24 | if (isempty(grp->gr_name)) | 24 | if (isempty(grp->gr_name)) |
25 | return -EINVAL; | 25 | return -EINVAL; |
26 | 26 | ||
@@ -31,7 +31,7 @@ index 414a49331b..1a4e1b628c 100644 | |||
31 | 31 | ||
32 | g = group_record_new(); | 32 | g = group_record_new(); |
33 | if (!g) | 33 | if (!g) |
34 | @@ -346,6 +348,7 @@ int nss_group_to_group_record( | 34 | @@ -303,6 +305,7 @@ int nss_group_to_group_record( |
35 | 35 | ||
36 | g->gid = grp->gr_gid; | 36 | g->gid = grp->gr_gid; |
37 | 37 | ||
@@ -39,15 +39,15 @@ index 414a49331b..1a4e1b628c 100644 | |||
39 | if (sgrp) { | 39 | if (sgrp) { |
40 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { | 40 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { |
41 | g->hashed_password = strv_new(sgrp->sg_passwd); | 41 | g->hashed_password = strv_new(sgrp->sg_passwd); |
42 | @@ -361,6 +364,7 @@ int nss_group_to_group_record( | 42 | @@ -318,6 +321,7 @@ int nss_group_to_group_record( |
43 | if (r < 0) | 43 | if (r < 0) |
44 | return r; | 44 | return r; |
45 | } | 45 | } |
46 | +#endif | 46 | +#endif |
47 | 47 | ||
48 | r = json_build(&g->json, JSON_BUILD_OBJECT( | 48 | r = sd_json_buildo( |
49 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), | 49 | &g->json, |
50 | @@ -387,6 +391,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 50 | @@ -345,6 +349,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
51 | assert(ret_sgrp); | 51 | assert(ret_sgrp); |
52 | assert(ret_buffer); | 52 | assert(ret_buffer); |
53 | 53 | ||
@@ -55,7 +55,7 @@ index 414a49331b..1a4e1b628c 100644 | |||
55 | for (;;) { | 55 | for (;;) { |
56 | _cleanup_free_ char *buf = NULL; | 56 | _cleanup_free_ char *buf = NULL; |
57 | struct sgrp sgrp, *result; | 57 | struct sgrp sgrp, *result; |
58 | @@ -415,6 +420,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 58 | @@ -373,6 +378,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
59 | buflen *= 2; | 59 | buflen *= 2; |
60 | buf = mfree(buf); | 60 | buf = mfree(buf); |
61 | } | 61 | } |
@@ -65,25 +65,25 @@ index 414a49331b..1a4e1b628c 100644 | |||
65 | } | 65 | } |
66 | 66 | ||
67 | int nss_group_record_by_name( | 67 | int nss_group_record_by_name( |
68 | @@ -426,7 +434,9 @@ int nss_group_record_by_name( | 68 | @@ -383,7 +391,9 @@ int nss_group_record_by_name( |
69 | struct group grp, *result; | 69 | _cleanup_free_ char *sbuf = NULL; |
70 | _cleanup_free_ struct group *result = NULL; | ||
70 | bool incomplete = false; | 71 | bool incomplete = false; |
71 | size_t buflen = 4096; | ||
72 | +#if ENABLE_GSHADOW | 72 | +#if ENABLE_GSHADOW |
73 | struct sgrp sgrp, *sresult = NULL; | 73 | struct sgrp sgrp, *sresult = NULL; |
74 | +#endif | 74 | +#endif |
75 | int r; | 75 | int r; |
76 | 76 | ||
77 | assert(name); | 77 | assert(name); |
78 | @@ -455,6 +465,7 @@ int nss_group_record_by_name( | 78 | @@ -392,6 +402,7 @@ int nss_group_record_by_name( |
79 | buf = mfree(buf); | 79 | if (r < 0) |
80 | } | 80 | return r; |
81 | 81 | ||
82 | +#if ENABLE_GSHADOW | 82 | +#if ENABLE_GSHADOW |
83 | if (with_shadow) { | 83 | if (with_shadow) { |
84 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 84 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
85 | if (r < 0) { | 85 | if (r < 0) { |
86 | @@ -466,6 +477,9 @@ int nss_group_record_by_name( | 86 | @@ -403,6 +414,9 @@ int nss_group_record_by_name( |
87 | incomplete = true; | 87 | incomplete = true; |
88 | 88 | ||
89 | r = nss_group_to_group_record(result, sresult, ret); | 89 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -93,25 +93,24 @@ index 414a49331b..1a4e1b628c 100644 | |||
93 | if (r < 0) | 93 | if (r < 0) |
94 | return r; | 94 | return r; |
95 | 95 | ||
96 | @@ -483,7 +497,9 @@ int nss_group_record_by_gid( | 96 | @@ -419,13 +433,16 @@ int nss_group_record_by_gid( |
97 | struct group grp, *result; | 97 | _cleanup_free_ char *sbuf = NULL; |
98 | _cleanup_free_ struct group *result = NULL; | ||
98 | bool incomplete = false; | 99 | bool incomplete = false; |
99 | size_t buflen = 4096; | ||
100 | +#if ENABLE_GSHADOW | 100 | +#if ENABLE_GSHADOW |
101 | struct sgrp sgrp, *sresult = NULL; | 101 | struct sgrp sgrp, *sresult = NULL; |
102 | +#endif | 102 | +#endif |
103 | int r; | 103 | int r; |
104 | 104 | ||
105 | for (;;) { | 105 | r = getgrgid_malloc(gid, &result); |
106 | @@ -509,6 +525,7 @@ int nss_group_record_by_gid( | 106 | if (r < 0) |
107 | buf = mfree(buf); | 107 | return r; |
108 | } | ||
109 | 108 | ||
110 | +#if ENABLE_GSHADOW | 109 | +#if ENABLE_GSHADOW |
111 | if (with_shadow) { | 110 | if (with_shadow) { |
112 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 111 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
113 | if (r < 0) { | 112 | if (r < 0) { |
114 | @@ -520,6 +537,9 @@ int nss_group_record_by_gid( | 113 | @@ -437,6 +454,9 @@ int nss_group_record_by_gid( |
115 | incomplete = true; | 114 | incomplete = true; |
116 | 115 | ||
117 | r = nss_group_to_group_record(result, sresult, ret); | 116 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -138,10 +137,10 @@ index 22ab04d6ee..4e52e7a911 100644 | |||
138 | #include <shadow.h> | 137 | #include <shadow.h> |
139 | 138 | ||
140 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c | 139 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c |
141 | index f60d48ace4..e878199a28 100644 | 140 | index ff83d4bf90..54d36cc706 100644 |
142 | --- a/src/shared/userdb.c | 141 | --- a/src/shared/userdb.c |
143 | +++ b/src/shared/userdb.c | 142 | +++ b/src/shared/userdb.c |
144 | @@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 143 | @@ -1042,13 +1042,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
145 | if (gr) { | 144 | if (gr) { |
146 | _cleanup_free_ char *buffer = NULL; | 145 | _cleanup_free_ char *buffer = NULL; |
147 | bool incomplete = false; | 146 | bool incomplete = false; |
@@ -158,7 +157,7 @@ index f60d48ace4..e878199a28 100644 | |||
158 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { | 157 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { |
159 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); | 158 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); |
160 | if (r < 0) { | 159 | if (r < 0) { |
161 | @@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 160 | @@ -1061,6 +1063,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
162 | } | 161 | } |
163 | 162 | ||
164 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); | 163 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); |
diff --git a/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index e112766a9b..1443c5082b 100644 --- a/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 3dc9d9d410bcce54fddfd94f43f7f77f3aa8e281 Mon Sep 17 00:00:00 2001 | 1 | From ef9ad83759f78de983d2d7c4f95bc48b83bb8f66 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 | 3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 |
4 | Subject: [PATCH 15/22] missing_syscall.h: Define MIPS ABI defines for musl | 4 | Subject: [PATCH 15/26] missing_syscall.h: Define MIPS ABI defines for musl |
5 | 5 | ||
6 | musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 | 6 | musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 |
7 | unlike glibc where these are provided by libc headers, therefore define | 7 | unlike glibc where these are provided by libc headers, therefore define |
@@ -15,8 +15,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
15 | src/shared/base-filesystem.c | 1 + | 15 | src/shared/base-filesystem.c | 1 + |
16 | 2 files changed, 7 insertions(+) | 16 | 2 files changed, 7 insertions(+) |
17 | 17 | ||
18 | diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h | ||
19 | index d795efd8f2..d6729d3c1d 100644 | ||
20 | --- a/src/basic/missing_syscall.h | 18 | --- a/src/basic/missing_syscall.h |
21 | +++ b/src/basic/missing_syscall.h | 19 | +++ b/src/basic/missing_syscall.h |
22 | @@ -20,6 +20,12 @@ | 20 | @@ -20,6 +20,12 @@ |
@@ -31,9 +29,7 @@ index d795efd8f2..d6729d3c1d 100644 | |||
31 | + | 29 | + |
32 | #include "macro.h" | 30 | #include "macro.h" |
33 | #include "missing_keyctl.h" | 31 | #include "missing_keyctl.h" |
34 | #include "missing_stat.h" | 32 | #include "missing_sched.h" |
35 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | ||
36 | index 7ae921a113..0ef9d1fd39 100644 | ||
37 | --- a/src/shared/base-filesystem.c | 33 | --- a/src/shared/base-filesystem.c |
38 | +++ b/src/shared/base-filesystem.c | 34 | +++ b/src/shared/base-filesystem.c |
39 | @@ -20,6 +20,7 @@ | 35 | @@ -20,6 +20,7 @@ |
@@ -42,8 +38,5 @@ index 7ae921a113..0ef9d1fd39 100644 | |||
42 | #include "user-util.h" | 38 | #include "user-util.h" |
43 | +#include "missing_syscall.h" | 39 | +#include "missing_syscall.h" |
44 | 40 | ||
45 | typedef struct BaseFilesystem { | 41 | typedef enum BaseFilesystemFlags { |
46 | const char *dir; /* directory or symlink to create */ | 42 | BASE_FILESYSTEM_IGNORE_ON_FAILURE = 1 << 0, |
47 | -- | ||
48 | 2.34.1 | ||
49 | |||
diff --git a/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch index 0be817e62d..b802106155 100644 --- a/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch +++ b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 0994b59dba9f248ad31cb7087046dc00b72cb4ea Mon Sep 17 00:00:00 2001 | 1 | From 9079b158779a9c395c24f882f72a1c734795045d Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 21 Jan 2022 15:15:11 -0800 | 3 | Date: Fri, 21 Jan 2022 15:15:11 -0800 |
4 | Subject: [PATCH 16/22] pass correct parameters to getdents64 | 4 | Subject: [PATCH 16/26] pass correct parameters to getdents64 |
5 | 5 | ||
6 | Fixes | 6 | Fixes |
7 | ../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] | 7 | ../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] |
@@ -20,10 +20,10 @@ Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | |||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
21 | 21 | ||
22 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c | 22 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c |
23 | index 5e98b7a5d8..aef065047b 100644 | 23 | index 378fd92b06..5b567b457d 100644 |
24 | --- a/src/basic/recurse-dir.c | 24 | --- a/src/basic/recurse-dir.c |
25 | +++ b/src/basic/recurse-dir.c | 25 | +++ b/src/basic/recurse-dir.c |
26 | @@ -55,7 +55,7 @@ int readdir_all(int dir_fd, | 26 | @@ -56,7 +56,7 @@ int readdir_all(int dir_fd, |
27 | bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); | 27 | bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); |
28 | assert(bs > de->buffer_size); | 28 | assert(bs > de->buffer_size); |
29 | 29 | ||
diff --git a/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch index 4176522a1c..5a2bc3c552 100644 --- a/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch +++ b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 3c094d443ca30f19114392fd8ef274af6eabc12d Mon Sep 17 00:00:00 2001 | 1 | From be9d8f221ab9d31c0df8b2b3e66172bb9bc0f71f Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 | 3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 |
4 | Subject: [PATCH 17/22] Adjust for musl headers | 4 | Subject: [PATCH 17/26] Adjust for musl headers |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [musl specific] | 6 | Upstream-Status: Inappropriate [musl specific] |
7 | 7 | ||
@@ -10,11 +10,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
10 | [Rebased for v255.1] | 10 | [Rebased for v255.1] |
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
12 | --- | 12 | --- |
13 | src/basic/linux/ethtool.h | 3 ++- | ||
13 | src/libsystemd-network/sd-dhcp6-client.c | 2 +- | 14 | src/libsystemd-network/sd-dhcp6-client.c | 2 +- |
14 | src/network/netdev/bareudp.c | 2 +- | 15 | src/network/netdev/bareudp.c | 2 +- |
15 | src/network/netdev/batadv.c | 2 +- | 16 | src/network/netdev/batadv.c | 2 +- |
16 | src/network/netdev/bond.c | 2 +- | 17 | src/network/netdev/bond.c | 2 +- |
17 | src/network/netdev/bridge.c | 2 +- | 18 | src/network/netdev/bridge.c | 3 ++- |
18 | src/network/netdev/dummy.c | 2 +- | 19 | src/network/netdev/dummy.c | 2 +- |
19 | src/network/netdev/geneve.c | 2 +- | 20 | src/network/netdev/geneve.c | 2 +- |
20 | src/network/netdev/ifb.c | 2 +- | 21 | src/network/netdev/ifb.c | 2 +- |
@@ -34,7 +35,6 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
34 | src/network/netdev/vxlan.c | 2 +- | 35 | src/network/netdev/vxlan.c | 2 +- |
35 | src/network/netdev/wireguard.c | 2 +- | 36 | src/network/netdev/wireguard.c | 2 +- |
36 | src/network/netdev/xfrm.c | 2 +- | 37 | src/network/netdev/xfrm.c | 2 +- |
37 | src/network/networkd-bridge-mdb.c | 4 ++-- | ||
38 | src/network/networkd-dhcp-common.c | 3 ++- | 38 | src/network/networkd-dhcp-common.c | 3 ++- |
39 | src/network/networkd-dhcp-prefix-delegation.c | 3 ++- | 39 | src/network/networkd-dhcp-prefix-delegation.c | 3 ++- |
40 | src/network/networkd-dhcp-server.c | 2 +- | 40 | src/network/networkd-dhcp-server.c | 2 +- |
@@ -42,16 +42,28 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
42 | src/network/networkd-ipv6ll.c | 2 +- | 42 | src/network/networkd-ipv6ll.c | 2 +- |
43 | src/network/networkd-link.c | 2 +- | 43 | src/network/networkd-link.c | 2 +- |
44 | src/network/networkd-ndisc.c | 2 +- | 44 | src/network/networkd-ndisc.c | 2 +- |
45 | src/network/networkd-route.c | 8 ++++---- | ||
46 | src/network/networkd-setlink.c | 2 +- | 45 | src/network/networkd-setlink.c | 2 +- |
47 | src/network/networkd-sysctl.c | 2 +- | 46 | src/network/networkd-sysctl.c | 2 +- |
48 | src/shared/linux/ethtool.h | 3 ++- | ||
49 | src/shared/netif-util.c | 2 +- | 47 | src/shared/netif-util.c | 2 +- |
50 | src/udev/udev-builtin-net_id.c | 2 +- | 48 | src/udev/udev-builtin-net_id.c | 2 +- |
51 | 38 files changed, 45 insertions(+), 42 deletions(-) | 49 | 36 files changed, 40 insertions(+), 36 deletions(-) |
52 | 50 | ||
51 | diff --git a/src/basic/linux/ethtool.h b/src/basic/linux/ethtool.h | ||
52 | index a32293ba20..2aad67e9c0 100644 | ||
53 | --- a/src/basic/linux/ethtool.h | ||
54 | +++ b/src/basic/linux/ethtool.h | ||
55 | @@ -16,7 +16,8 @@ | ||
56 | |||
57 | #include <linux/const.h> | ||
58 | #include <linux/types.h> | ||
59 | -#include <linux/if_ether.h> | ||
60 | +#include <netinet/if_ether.h> | ||
61 | +//#include <linux/if_ether.h> | ||
62 | |||
63 | #include <limits.h> /* for INT_MAX */ | ||
64 | |||
53 | diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c | 65 | diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c |
54 | index c20367dfc9..b8d4cd8c2a 100644 | 66 | index 3e992d7cad..c7e1ff4dbf 100644 |
55 | --- a/src/libsystemd-network/sd-dhcp6-client.c | 67 | --- a/src/libsystemd-network/sd-dhcp6-client.c |
56 | +++ b/src/libsystemd-network/sd-dhcp6-client.c | 68 | +++ b/src/libsystemd-network/sd-dhcp6-client.c |
57 | @@ -5,7 +5,7 @@ | 69 | @@ -5,7 +5,7 @@ |
@@ -64,7 +76,7 @@ index c20367dfc9..b8d4cd8c2a 100644 | |||
64 | 76 | ||
65 | #include "sd-dhcp6-client.h" | 77 | #include "sd-dhcp6-client.h" |
66 | diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c | 78 | diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c |
67 | index 1df886573b..c8b6714726 100644 | 79 | index e122abd97f..c120c2969b 100644 |
68 | --- a/src/network/netdev/bareudp.c | 80 | --- a/src/network/netdev/bareudp.c |
69 | +++ b/src/network/netdev/bareudp.c | 81 | +++ b/src/network/netdev/bareudp.c |
70 | @@ -2,7 +2,7 @@ | 82 | @@ -2,7 +2,7 @@ |
@@ -77,7 +89,7 @@ index 1df886573b..c8b6714726 100644 | |||
77 | #include "bareudp.h" | 89 | #include "bareudp.h" |
78 | #include "netlink-util.h" | 90 | #include "netlink-util.h" |
79 | diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c | 91 | diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c |
80 | index 26da0231d4..2e8002af8c 100644 | 92 | index 9806d8eb7c..19c3d881c2 100644 |
81 | --- a/src/network/netdev/batadv.c | 93 | --- a/src/network/netdev/batadv.c |
82 | +++ b/src/network/netdev/batadv.c | 94 | +++ b/src/network/netdev/batadv.c |
83 | @@ -3,7 +3,7 @@ | 95 | @@ -3,7 +3,7 @@ |
@@ -90,7 +102,7 @@ index 26da0231d4..2e8002af8c 100644 | |||
90 | #include "batadv.h" | 102 | #include "batadv.h" |
91 | #include "fileio.h" | 103 | #include "fileio.h" |
92 | diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c | 104 | diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c |
93 | index 4d75a0d6bf..985b3197e0 100644 | 105 | index b866940b7a..a0eaf0a866 100644 |
94 | --- a/src/network/netdev/bond.c | 106 | --- a/src/network/netdev/bond.c |
95 | +++ b/src/network/netdev/bond.c | 107 | +++ b/src/network/netdev/bond.c |
96 | @@ -1,7 +1,7 @@ | 108 | @@ -1,7 +1,7 @@ |
@@ -103,20 +115,21 @@ index 4d75a0d6bf..985b3197e0 100644 | |||
103 | #include "alloc-util.h" | 115 | #include "alloc-util.h" |
104 | #include "bond.h" | 116 | #include "bond.h" |
105 | diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c | 117 | diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c |
106 | index 3e394edadf..f12f667687 100644 | 118 | index d3ba4989d9..4f7301c4f1 100644 |
107 | --- a/src/network/netdev/bridge.c | 119 | --- a/src/network/netdev/bridge.c |
108 | +++ b/src/network/netdev/bridge.c | 120 | +++ b/src/network/netdev/bridge.c |
109 | @@ -2,7 +2,7 @@ | 121 | @@ -2,7 +2,8 @@ |
110 | 122 | ||
123 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
111 | #include <net/if.h> | 124 | #include <net/if.h> |
112 | #include <netinet/in.h> | ||
113 | -#include <linux/if_arp.h> | 125 | -#include <linux/if_arp.h> |
126 | +#include <netinet/in.h> | ||
114 | +//#include <linux/if_arp.h> | 127 | +//#include <linux/if_arp.h> |
115 | #include <linux/if_bridge.h> | 128 | #include <linux/if_bridge.h> |
129 | #include <netinet/in.h> | ||
116 | 130 | ||
117 | #include "bridge.h" | ||
118 | diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c | 131 | diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c |
119 | index 00df1d2787..77b506b422 100644 | 132 | index 8b2893d5b4..412123f036 100644 |
120 | --- a/src/network/netdev/dummy.c | 133 | --- a/src/network/netdev/dummy.c |
121 | +++ b/src/network/netdev/dummy.c | 134 | +++ b/src/network/netdev/dummy.c |
122 | @@ -1,6 +1,6 @@ | 135 | @@ -1,6 +1,6 @@ |
@@ -128,18 +141,18 @@ index 00df1d2787..77b506b422 100644 | |||
128 | #include "dummy.h" | 141 | #include "dummy.h" |
129 | 142 | ||
130 | diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c | 143 | diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c |
131 | index bc655ec7ff..a77e8e17e4 100644 | 144 | index 1d68be9bc8..539151c49e 100644 |
132 | --- a/src/network/netdev/geneve.c | 145 | --- a/src/network/netdev/geneve.c |
133 | +++ b/src/network/netdev/geneve.c | 146 | +++ b/src/network/netdev/geneve.c |
134 | @@ -2,7 +2,7 @@ | 147 | @@ -2,7 +2,7 @@ |
135 | 148 | ||
149 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
136 | #include <net/if.h> | 150 | #include <net/if.h> |
137 | #include <netinet/in.h> | ||
138 | -#include <linux/if_arp.h> | 151 | -#include <linux/if_arp.h> |
139 | +//#include <linux/if_arp.h> | 152 | +//#include <linux/if_arp.h> |
153 | #include <netinet/in.h> | ||
140 | 154 | ||
141 | #include "alloc-util.h" | 155 | #include "alloc-util.h" |
142 | #include "conf-parser.h" | ||
143 | diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c | 156 | diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c |
144 | index d7ff44cb9e..e037629ae4 100644 | 157 | index d7ff44cb9e..e037629ae4 100644 |
145 | --- a/src/network/netdev/ifb.c | 158 | --- a/src/network/netdev/ifb.c |
@@ -154,7 +167,7 @@ index d7ff44cb9e..e037629ae4 100644 | |||
154 | #include "ifb.h" | 167 | #include "ifb.h" |
155 | 168 | ||
156 | diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c | 169 | diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c |
157 | index d5fe299b7b..c9c8002eac 100644 | 170 | index 6932c62e2a..fc458da9e8 100644 |
158 | --- a/src/network/netdev/ipoib.c | 171 | --- a/src/network/netdev/ipoib.c |
159 | +++ b/src/network/netdev/ipoib.c | 172 | +++ b/src/network/netdev/ipoib.c |
160 | @@ -1,6 +1,6 @@ | 173 | @@ -1,6 +1,6 @@ |
@@ -166,11 +179,11 @@ index d5fe299b7b..c9c8002eac 100644 | |||
166 | 179 | ||
167 | #include "ipoib.h" | 180 | #include "ipoib.h" |
168 | diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c | 181 | diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c |
169 | index 05d5d010f6..d440f49537 100644 | 182 | index 6e50f72aaa..49acfee25e 100644 |
170 | --- a/src/network/netdev/ipvlan.c | 183 | --- a/src/network/netdev/ipvlan.c |
171 | +++ b/src/network/netdev/ipvlan.c | 184 | +++ b/src/network/netdev/ipvlan.c |
172 | @@ -2,7 +2,7 @@ | 185 | @@ -3,7 +3,7 @@ |
173 | 186 | /* Make sure the net/if.h header is included before any linux/ one */ | |
174 | #include <net/if.h> | 187 | #include <net/if.h> |
175 | #include <netinet/in.h> | 188 | #include <netinet/in.h> |
176 | -#include <linux/if_arp.h> | 189 | -#include <linux/if_arp.h> |
@@ -179,7 +192,7 @@ index 05d5d010f6..d440f49537 100644 | |||
179 | #include "conf-parser.h" | 192 | #include "conf-parser.h" |
180 | #include "ipvlan.h" | 193 | #include "ipvlan.h" |
181 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c | 194 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c |
182 | index 17d6acefb6..679d0984f9 100644 | 195 | index 6dd434f803..f9fbe9f51a 100644 |
183 | --- a/src/network/netdev/macsec.c | 196 | --- a/src/network/netdev/macsec.c |
184 | +++ b/src/network/netdev/macsec.c | 197 | +++ b/src/network/netdev/macsec.c |
185 | @@ -1,7 +1,7 @@ | 198 | @@ -1,7 +1,7 @@ |
@@ -192,11 +205,11 @@ index 17d6acefb6..679d0984f9 100644 | |||
192 | #include <linux/if_macsec.h> | 205 | #include <linux/if_macsec.h> |
193 | #include <linux/genetlink.h> | 206 | #include <linux/genetlink.h> |
194 | diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c | 207 | diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c |
195 | index 203807e3a5..8ab09a387e 100644 | 208 | index fd112b58e1..b038740bda 100644 |
196 | --- a/src/network/netdev/macvlan.c | 209 | --- a/src/network/netdev/macvlan.c |
197 | +++ b/src/network/netdev/macvlan.c | 210 | +++ b/src/network/netdev/macvlan.c |
198 | @@ -2,7 +2,7 @@ | 211 | @@ -3,7 +3,7 @@ |
199 | 212 | /* Make sure the net/if.h header is included before any linux/ one */ | |
200 | #include <net/if.h> | 213 | #include <net/if.h> |
201 | #include <netinet/in.h> | 214 | #include <netinet/in.h> |
202 | -#include <linux/if_arp.h> | 215 | -#include <linux/if_arp.h> |
@@ -205,11 +218,11 @@ index 203807e3a5..8ab09a387e 100644 | |||
205 | #include "conf-parser.h" | 218 | #include "conf-parser.h" |
206 | #include "macvlan.h" | 219 | #include "macvlan.h" |
207 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c | 220 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c |
208 | index 57127a861a..7f787d0b9f 100644 | 221 | index c2986aafb5..147f1c95d0 100644 |
209 | --- a/src/network/netdev/netdev.c | 222 | --- a/src/network/netdev/netdev.c |
210 | +++ b/src/network/netdev/netdev.c | 223 | +++ b/src/network/netdev/netdev.c |
211 | @@ -2,7 +2,7 @@ | 224 | @@ -3,7 +3,7 @@ |
212 | 225 | /* Make sure the net/if.h header is included before any linux/ one */ | |
213 | #include <net/if.h> | 226 | #include <net/if.h> |
214 | #include <netinet/in.h> | 227 | #include <netinet/in.h> |
215 | -#include <linux/if_arp.h> | 228 | -#include <linux/if_arp.h> |
@@ -218,7 +231,7 @@ index 57127a861a..7f787d0b9f 100644 | |||
218 | 231 | ||
219 | #include "alloc-util.h" | 232 | #include "alloc-util.h" |
220 | diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c | 233 | diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c |
221 | index 15d5c132f9..a3ffa48b15 100644 | 234 | index 59958c3bbe..61169016b0 100644 |
222 | --- a/src/network/netdev/netdevsim.c | 235 | --- a/src/network/netdev/netdevsim.c |
223 | +++ b/src/network/netdev/netdevsim.c | 236 | +++ b/src/network/netdev/netdevsim.c |
224 | @@ -1,6 +1,6 @@ | 237 | @@ -1,6 +1,6 @@ |
@@ -242,7 +255,7 @@ index ff372092e6..eef66811f4 100644 | |||
242 | #include "nlmon.h" | 255 | #include "nlmon.h" |
243 | 256 | ||
244 | diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c | 257 | diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c |
245 | index db84e7cf6e..93d5642962 100644 | 258 | index af05cfda81..f659bed3a6 100644 |
246 | --- a/src/network/netdev/tunnel.c | 259 | --- a/src/network/netdev/tunnel.c |
247 | +++ b/src/network/netdev/tunnel.c | 260 | +++ b/src/network/netdev/tunnel.c |
248 | @@ -2,7 +2,7 @@ | 261 | @@ -2,7 +2,7 @@ |
@@ -267,46 +280,47 @@ index 380547ee1e..137c1adf8a 100644 | |||
267 | #include "vcan.h" | 280 | #include "vcan.h" |
268 | 281 | ||
269 | diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c | 282 | diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c |
270 | index e0f5b4ebb1..8a424ed03d 100644 | 283 | index 54d3b59734..f3f75e22b5 100644 |
271 | --- a/src/network/netdev/veth.c | 284 | --- a/src/network/netdev/veth.c |
272 | +++ b/src/network/netdev/veth.c | 285 | +++ b/src/network/netdev/veth.c |
273 | @@ -3,7 +3,7 @@ | 286 | @@ -3,7 +3,7 @@ |
274 | #include <errno.h> | 287 | /* Make sure the net/if.h header is included before any linux/ one */ |
275 | #include <net/if.h> | 288 | #include <net/if.h> |
276 | #include <netinet/in.h> | 289 | #include <errno.h> |
277 | -#include <linux/if_arp.h> | 290 | -#include <linux/if_arp.h> |
278 | +//#include <linux/if_arp.h> | 291 | +//#include <linux/if_arp.h> |
279 | #include <linux/veth.h> | 292 | #include <linux/veth.h> |
293 | #include <netinet/in.h> | ||
280 | 294 | ||
281 | #include "netlink-util.h" | ||
282 | diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c | 295 | diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c |
283 | index 2390206993..efec630e30 100644 | 296 | index 60e49a5b8a..266fd58813 100644 |
284 | --- a/src/network/netdev/vlan.c | 297 | --- a/src/network/netdev/vlan.c |
285 | +++ b/src/network/netdev/vlan.c | 298 | +++ b/src/network/netdev/vlan.c |
286 | @@ -2,7 +2,7 @@ | 299 | @@ -3,7 +3,7 @@ |
287 | 300 | /* Make sure the net/if.h header is included before any linux/ one */ | |
288 | #include <errno.h> | ||
289 | #include <net/if.h> | 301 | #include <net/if.h> |
302 | #include <errno.h> | ||
290 | -#include <linux/if_arp.h> | 303 | -#include <linux/if_arp.h> |
291 | +//#include <linux/if_arp.h> | 304 | +//#include <linux/if_arp.h> |
292 | #include <linux/if_vlan.h> | 305 | #include <linux/if_vlan.h> |
293 | 306 | ||
294 | #include "parse-util.h" | 307 | #include "parse-util.h" |
295 | diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c | 308 | diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c |
296 | index b75ec2bcc6..6aeeea640b 100644 | 309 | index c35419f859..4d1d3ef141 100644 |
297 | --- a/src/network/netdev/vrf.c | 310 | --- a/src/network/netdev/vrf.c |
298 | +++ b/src/network/netdev/vrf.c | 311 | +++ b/src/network/netdev/vrf.c |
299 | @@ -2,7 +2,7 @@ | 312 | @@ -2,8 +2,8 @@ |
300 | 313 | ||
314 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
301 | #include <net/if.h> | 315 | #include <net/if.h> |
302 | #include <netinet/in.h> | ||
303 | -#include <linux/if_arp.h> | 316 | -#include <linux/if_arp.h> |
317 | #include <netinet/in.h> | ||
304 | +//#include <linux/if_arp.h> | 318 | +//#include <linux/if_arp.h> |
305 | 319 | ||
306 | #include "vrf.h" | 320 | #include "vrf.h" |
307 | 321 | ||
308 | diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c | 322 | diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c |
309 | index c0343f45b6..f9e718f40b 100644 | 323 | index 2de89b8e24..ce1b8f9b69 100644 |
310 | --- a/src/network/netdev/vxcan.c | 324 | --- a/src/network/netdev/vxcan.c |
311 | +++ b/src/network/netdev/vxcan.c | 325 | +++ b/src/network/netdev/vxcan.c |
312 | @@ -1,7 +1,7 @@ | 326 | @@ -1,7 +1,7 @@ |
@@ -319,11 +333,11 @@ index c0343f45b6..f9e718f40b 100644 | |||
319 | #include "vxcan.h" | 333 | #include "vxcan.h" |
320 | 334 | ||
321 | diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c | 335 | diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c |
322 | index b11fdbbd0d..a971a917f0 100644 | 336 | index d8a066370d..8f94eeb763 100644 |
323 | --- a/src/network/netdev/vxlan.c | 337 | --- a/src/network/netdev/vxlan.c |
324 | +++ b/src/network/netdev/vxlan.c | 338 | +++ b/src/network/netdev/vxlan.c |
325 | @@ -2,7 +2,7 @@ | 339 | @@ -3,7 +3,7 @@ |
326 | 340 | /* Make sure the net/if.h header is included before any linux/ one */ | |
327 | #include <net/if.h> | 341 | #include <net/if.h> |
328 | #include <netinet/in.h> | 342 | #include <netinet/in.h> |
329 | -#include <linux/if_arp.h> | 343 | -#include <linux/if_arp.h> |
@@ -332,18 +346,18 @@ index b11fdbbd0d..a971a917f0 100644 | |||
332 | #include "conf-parser.h" | 346 | #include "conf-parser.h" |
333 | #include "alloc-util.h" | 347 | #include "alloc-util.h" |
334 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c | 348 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c |
335 | index 4c7d837c41..6df6dfb816 100644 | 349 | index 8d1dddf828..5182783f45 100644 |
336 | --- a/src/network/netdev/wireguard.c | 350 | --- a/src/network/netdev/wireguard.c |
337 | +++ b/src/network/netdev/wireguard.c | 351 | +++ b/src/network/netdev/wireguard.c |
338 | @@ -6,7 +6,7 @@ | 352 | @@ -5,7 +5,7 @@ |
339 | #include <sys/ioctl.h> | 353 | |
354 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
340 | #include <net/if.h> | 355 | #include <net/if.h> |
341 | #include <netinet/in.h> | ||
342 | -#include <linux/if_arp.h> | 356 | -#include <linux/if_arp.h> |
343 | +//#include <linux/if_arp.h> | 357 | +//#include <linux/if_arp.h> |
344 | #include <linux/ipv6_route.h> | 358 | #include <linux/ipv6_route.h> |
345 | 359 | #include <netinet/in.h> | |
346 | #include "sd-resolve.h" | 360 | #include <sys/ioctl.h> |
347 | diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c | 361 | diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c |
348 | index 905bfc0bdf..39e34dbb3b 100644 | 362 | index 905bfc0bdf..39e34dbb3b 100644 |
349 | --- a/src/network/netdev/xfrm.c | 363 | --- a/src/network/netdev/xfrm.c |
@@ -356,29 +370,8 @@ index 905bfc0bdf..39e34dbb3b 100644 | |||
356 | 370 | ||
357 | #include "missing_network.h" | 371 | #include "missing_network.h" |
358 | #include "xfrm.h" | 372 | #include "xfrm.h" |
359 | diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c | ||
360 | index bd1a9745dc..949d3da029 100644 | ||
361 | --- a/src/network/networkd-bridge-mdb.c | ||
362 | +++ b/src/network/networkd-bridge-mdb.c | ||
363 | @@ -1,7 +1,5 @@ | ||
364 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
365 | |||
366 | -#include <net/if.h> | ||
367 | -#include <linux/if_bridge.h> | ||
368 | |||
369 | #include "netlink-util.h" | ||
370 | #include "networkd-bridge-mdb.h" | ||
371 | @@ -11,6 +9,8 @@ | ||
372 | #include "networkd-queue.h" | ||
373 | #include "string-util.h" | ||
374 | #include "vlan-util.h" | ||
375 | +#include <net/if.h> | ||
376 | +#include <linux/if_bridge.h> | ||
377 | |||
378 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U | ||
379 | |||
380 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c | 373 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c |
381 | index 080b15387c..efe8283957 100644 | 374 | index 8b64dfe8f0..caa2885728 100644 |
382 | --- a/src/network/networkd-dhcp-common.c | 375 | --- a/src/network/networkd-dhcp-common.c |
383 | +++ b/src/network/networkd-dhcp-common.c | 376 | +++ b/src/network/networkd-dhcp-common.c |
384 | @@ -1,7 +1,8 @@ | 377 | @@ -1,7 +1,8 @@ |
@@ -392,7 +385,7 @@ index 080b15387c..efe8283957 100644 | |||
392 | #include "bus-error.h" | 385 | #include "bus-error.h" |
393 | #include "bus-locator.h" | 386 | #include "bus-locator.h" |
394 | diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c | 387 | diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c |
395 | index af2fe9efcd..511565700f 100644 | 388 | index 16426de981..3d8efc05f1 100644 |
396 | --- a/src/network/networkd-dhcp-prefix-delegation.c | 389 | --- a/src/network/networkd-dhcp-prefix-delegation.c |
397 | +++ b/src/network/networkd-dhcp-prefix-delegation.c | 390 | +++ b/src/network/networkd-dhcp-prefix-delegation.c |
398 | @@ -1,6 +1,5 @@ | 391 | @@ -1,6 +1,5 @@ |
@@ -402,7 +395,7 @@ index af2fe9efcd..511565700f 100644 | |||
402 | 395 | ||
403 | #include "dhcp6-lease-internal.h" | 396 | #include "dhcp6-lease-internal.h" |
404 | #include "hashmap.h" | 397 | #include "hashmap.h" |
405 | @@ -20,6 +19,8 @@ | 398 | @@ -21,6 +20,8 @@ |
406 | #include "strv.h" | 399 | #include "strv.h" |
407 | #include "tunnel.h" | 400 | #include "tunnel.h" |
408 | 401 | ||
@@ -412,7 +405,7 @@ index af2fe9efcd..511565700f 100644 | |||
412 | assert(link); | 405 | assert(link); |
413 | 406 | ||
414 | diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c | 407 | diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c |
415 | index 607fe0053c..9ce4005874 100644 | 408 | index c35102af74..3be469ae16 100644 |
416 | --- a/src/network/networkd-dhcp-server.c | 409 | --- a/src/network/networkd-dhcp-server.c |
417 | +++ b/src/network/networkd-dhcp-server.c | 410 | +++ b/src/network/networkd-dhcp-server.c |
418 | @@ -1,7 +1,7 @@ | 411 | @@ -1,7 +1,7 @@ |
@@ -425,7 +418,7 @@ index 607fe0053c..9ce4005874 100644 | |||
425 | 418 | ||
426 | #include "sd-dhcp-server.h" | 419 | #include "sd-dhcp-server.h" |
427 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c | 420 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c |
428 | index efbae6d868..1ea2151d50 100644 | 421 | index d94ac1a213..b8fe82cb6a 100644 |
429 | --- a/src/network/networkd-dhcp4.c | 422 | --- a/src/network/networkd-dhcp4.c |
430 | +++ b/src/network/networkd-dhcp4.c | 423 | +++ b/src/network/networkd-dhcp4.c |
431 | @@ -3,7 +3,7 @@ | 424 | @@ -3,7 +3,7 @@ |
@@ -436,9 +429,9 @@ index efbae6d868..1ea2151d50 100644 | |||
436 | +//#include <linux/if_arp.h> | 429 | +//#include <linux/if_arp.h> |
437 | 430 | ||
438 | #include "alloc-util.h" | 431 | #include "alloc-util.h" |
439 | #include "dhcp-client-internal.h" | 432 | #include "device-private.h" |
440 | diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c | 433 | diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c |
441 | index 32229a3fc7..662a345d6e 100644 | 434 | index 04f51ab530..c4580754f7 100644 |
442 | --- a/src/network/networkd-ipv6ll.c | 435 | --- a/src/network/networkd-ipv6ll.c |
443 | +++ b/src/network/networkd-ipv6ll.c | 436 | +++ b/src/network/networkd-ipv6ll.c |
444 | @@ -1,7 +1,7 @@ | 437 | @@ -1,7 +1,7 @@ |
@@ -451,10 +444,10 @@ index 32229a3fc7..662a345d6e 100644 | |||
451 | #include "in-addr-util.h" | 444 | #include "in-addr-util.h" |
452 | #include "networkd-address.h" | 445 | #include "networkd-address.h" |
453 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c | 446 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
454 | index ee5f0f2c0a..ea5269a2de 100644 | 447 | index 3c042e6c18..05fe2cb900 100644 |
455 | --- a/src/network/networkd-link.c | 448 | --- a/src/network/networkd-link.c |
456 | +++ b/src/network/networkd-link.c | 449 | +++ b/src/network/networkd-link.c |
457 | @@ -3,7 +3,7 @@ | 450 | @@ -4,7 +4,7 @@ |
458 | #include <net/if.h> | 451 | #include <net/if.h> |
459 | #include <netinet/in.h> | 452 | #include <netinet/in.h> |
460 | #include <linux/if.h> | 453 | #include <linux/if.h> |
@@ -464,7 +457,7 @@ index ee5f0f2c0a..ea5269a2de 100644 | |||
464 | #include <linux/netdevice.h> | 457 | #include <linux/netdevice.h> |
465 | #include <sys/socket.h> | 458 | #include <sys/socket.h> |
466 | diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c | 459 | diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c |
467 | index ab9eeb13a5..dd96fe7483 100644 | 460 | index 33e86fb04e..51292871fc 100644 |
468 | --- a/src/network/networkd-ndisc.c | 461 | --- a/src/network/networkd-ndisc.c |
469 | +++ b/src/network/networkd-ndisc.c | 462 | +++ b/src/network/networkd-ndisc.c |
470 | @@ -6,7 +6,7 @@ | 463 | @@ -6,7 +6,7 @@ |
@@ -476,33 +469,8 @@ index ab9eeb13a5..dd96fe7483 100644 | |||
476 | 469 | ||
477 | #include "sd-ndisc.h" | 470 | #include "sd-ndisc.h" |
478 | 471 | ||
479 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c | ||
480 | index 7218d799fc..30d5574eae 100644 | ||
481 | --- a/src/network/networkd-route.c | ||
482 | +++ b/src/network/networkd-route.c | ||
483 | @@ -1,9 +1,5 @@ | ||
484 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
485 | |||
486 | -#include <linux/icmpv6.h> | ||
487 | -#include <linux/ipv6_route.h> | ||
488 | -#include <linux/nexthop.h> | ||
489 | - | ||
490 | #include "alloc-util.h" | ||
491 | #include "event-util.h" | ||
492 | #include "netlink-util.h" | ||
493 | @@ -21,6 +17,10 @@ | ||
494 | #include "vrf.h" | ||
495 | #include "wireguard.h" | ||
496 | |||
497 | +#include <linux/icmpv6.h> | ||
498 | +#include <linux/ipv6_route.h> | ||
499 | +#include <linux/nexthop.h> | ||
500 | + | ||
501 | int route_new(Route **ret) { | ||
502 | _cleanup_(route_freep) Route *route = NULL; | ||
503 | |||
504 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c | 472 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c |
505 | index 2298f9ea3a..7d5f87de53 100644 | 473 | index 8519e6e7a0..7aca2bbecc 100644 |
506 | --- a/src/network/networkd-setlink.c | 474 | --- a/src/network/networkd-setlink.c |
507 | +++ b/src/network/networkd-setlink.c | 475 | +++ b/src/network/networkd-setlink.c |
508 | @@ -2,7 +2,7 @@ | 476 | @@ -2,7 +2,7 @@ |
@@ -512,10 +480,10 @@ index 2298f9ea3a..7d5f87de53 100644 | |||
512 | -#include <linux/if_arp.h> | 480 | -#include <linux/if_arp.h> |
513 | +//#include <linux/if_arp.h> | 481 | +//#include <linux/if_arp.h> |
514 | #include <linux/if_bridge.h> | 482 | #include <linux/if_bridge.h> |
483 | #include <linux/ipv6.h> | ||
515 | 484 | ||
516 | #include "missing_network.h" | ||
517 | diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c | 485 | diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c |
518 | index 2b226b2e2a..f12a474e2f 100644 | 486 | index 10a35bc44b..84c6b68ee4 100644 |
519 | --- a/src/network/networkd-sysctl.c | 487 | --- a/src/network/networkd-sysctl.c |
520 | +++ b/src/network/networkd-sysctl.c | 488 | +++ b/src/network/networkd-sysctl.c |
521 | @@ -2,7 +2,7 @@ | 489 | @@ -2,7 +2,7 @@ |
@@ -525,24 +493,10 @@ index 2b226b2e2a..f12a474e2f 100644 | |||
525 | -#include <linux/if_arp.h> | 493 | -#include <linux/if_arp.h> |
526 | +//#include <linux/if_arp.h> | 494 | +//#include <linux/if_arp.h> |
527 | 495 | ||
528 | #include "missing_network.h" | 496 | #include "sd-messages.h" |
529 | #include "networkd-link.h" | ||
530 | diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h | ||
531 | index 3d1da515c0..3fca9a4faf 100644 | ||
532 | --- a/src/shared/linux/ethtool.h | ||
533 | +++ b/src/shared/linux/ethtool.h | ||
534 | @@ -16,7 +16,8 @@ | ||
535 | |||
536 | #include <linux/const.h> | ||
537 | #include <linux/types.h> | ||
538 | -#include <linux/if_ether.h> | ||
539 | +#include <netinet/if_ether.h> | ||
540 | +//#include <linux/if_ether.h> | ||
541 | |||
542 | #include <limits.h> /* for INT_MAX */ | ||
543 | 497 | ||
544 | diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c | 498 | diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c |
545 | index f56c5646c1..5af28ff119 100644 | 499 | index 978ce42341..899b5f613f 100644 |
546 | --- a/src/shared/netif-util.c | 500 | --- a/src/shared/netif-util.c |
547 | +++ b/src/shared/netif-util.c | 501 | +++ b/src/shared/netif-util.c |
548 | @@ -1,7 +1,7 @@ | 502 | @@ -1,7 +1,7 @@ |
@@ -555,10 +509,10 @@ index f56c5646c1..5af28ff119 100644 | |||
555 | #include "arphrd-util.h" | 509 | #include "arphrd-util.h" |
556 | #include "device-util.h" | 510 | #include "device-util.h" |
557 | diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c | 511 | diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c |
558 | index f528a46b8e..830318cda5 100644 | 512 | index 09c04b9a7f..4686897dbf 100644 |
559 | --- a/src/udev/udev-builtin-net_id.c | 513 | --- a/src/udev/udev-builtin-net_id.c |
560 | +++ b/src/udev/udev-builtin-net_id.c | 514 | +++ b/src/udev/udev-builtin-net_id.c |
561 | @@ -18,7 +18,7 @@ | 515 | @@ -19,7 +19,7 @@ |
562 | #include <stdarg.h> | 516 | #include <stdarg.h> |
563 | #include <unistd.h> | 517 | #include <unistd.h> |
564 | #include <linux/if.h> | 518 | #include <linux/if.h> |
diff --git a/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch index 75f6b9094a..a92b8cc80f 100644 --- a/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch +++ b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From be02bd0876a061728661535a709d313e39fe1ac3 Mon Sep 17 00:00:00 2001 | 1 | From 349f9a0f9ecfc6575a3d9eeaffe89536e6a43914 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 8 Nov 2022 13:31:34 -0800 | 3 | Date: Tue, 8 Nov 2022 13:31:34 -0800 |
4 | Subject: [PATCH 18/22] test-bus-error: strerror() is assumed to be GNU | 4 | Subject: [PATCH 18/26] test-bus-error: strerror() is assumed to be GNU |
5 | specific version mark it so | 5 | specific version mark it so |
6 | 6 | ||
7 | Upstream-Status: Inappropriate [Upstream systemd only supports glibc] | 7 | Upstream-Status: Inappropriate [Upstream systemd only supports glibc] |
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | 2 files changed, 4 insertions(+), 1 deletion(-) | 13 | 2 files changed, 4 insertions(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c | 15 | diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c |
16 | index a55f3f9856..4123bf3da0 100644 | 16 | index 91045c06c2..a06b9bac0c 100644 |
17 | --- a/src/libsystemd/sd-bus/test-bus-error.c | 17 | --- a/src/libsystemd/sd-bus/test-bus-error.c |
18 | +++ b/src/libsystemd/sd-bus/test-bus-error.c | 18 | +++ b/src/libsystemd/sd-bus/test-bus-error.c |
19 | @@ -99,7 +99,9 @@ TEST(error) { | 19 | @@ -99,7 +99,9 @@ TEST(error) { |
@@ -27,7 +27,7 @@ index a55f3f9856..4123bf3da0 100644 | |||
27 | assert_se(sd_bus_error_get_errno(&error) == EBUSY); | 27 | assert_se(sd_bus_error_get_errno(&error) == EBUSY); |
28 | assert_se(sd_bus_error_is_set(&error)); | 28 | assert_se(sd_bus_error_is_set(&error)); |
29 | diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c | 29 | diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c |
30 | index 376d532281..967cfd4d67 100644 | 30 | index ab463bd1b3..e2ebcaaf33 100644 |
31 | --- a/src/test/test-errno-util.c | 31 | --- a/src/test/test-errno-util.c |
32 | +++ b/src/test/test-errno-util.c | 32 | +++ b/src/test/test-errno-util.c |
33 | @@ -4,7 +4,7 @@ | 33 | @@ -4,7 +4,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch index e038b73678..56083cc7b3 100644 --- a/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 46d80840bfe37e67d4f18c37a77751ea1fe63a07 Mon Sep 17 00:00:00 2001 | 1 | From 28fa1d5f56c6ddee9e336e6f2051c55e9f2f98b4 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 23 Jan 2023 23:39:46 -0800 | 3 | Date: Mon, 23 Jan 2023 23:39:46 -0800 |
4 | Subject: [PATCH 19/22] errno-util: Make STRERROR portable for musl | 4 | Subject: [PATCH 19/26] errno-util: Make STRERROR portable for musl |
5 | 5 | ||
6 | Sadly, systemd has decided to use yet another GNU extention in a macro | 6 | Sadly, systemd has decided to use yet another GNU extention in a macro |
7 | lets make this such that we can use XSI compliant strerror_r() for | 7 | lets make this such that we can use XSI compliant strerror_r() for |
@@ -11,11 +11,11 @@ Upstream-Status: Inappropriate [musl specific] | |||
11 | 11 | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | --- | 13 | --- |
14 | src/basic/errno-util.h | 12 ++++++++++-- | 14 | src/basic/errno-util.h | 10 +++++++++- |
15 | 1 file changed, 10 insertions(+), 2 deletions(-) | 15 | 1 file changed, 9 insertions(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h | 17 | diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h |
18 | index 27804e6382..274c1c6ef1 100644 | 18 | index 48b76e4bf7..6e7653e2d9 100644 |
19 | --- a/src/basic/errno-util.h | 19 | --- a/src/basic/errno-util.h |
20 | +++ b/src/basic/errno-util.h | 20 | +++ b/src/basic/errno-util.h |
21 | @@ -15,8 +15,16 @@ | 21 | @@ -15,8 +15,16 @@ |
@@ -23,9 +23,8 @@ index 27804e6382..274c1c6ef1 100644 | |||
23 | * | 23 | * |
24 | * Note that we use the GNU variant of strerror_r() here. */ | 24 | * Note that we use the GNU variant of strerror_r() here. */ |
25 | -#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) | 25 | -#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) |
26 | - | ||
27 | +static inline const char * STRERROR(int errnum); | 26 | +static inline const char * STRERROR(int errnum); |
28 | + | 27 | |
29 | +static inline const char * STRERROR(int errnum) { | 28 | +static inline const char * STRERROR(int errnum) { |
30 | +#ifdef __GLIBC__ | 29 | +#ifdef __GLIBC__ |
31 | + return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN); | 30 | + return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN); |
diff --git a/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch index b83fffe793..16df44cd86 100644 --- a/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch +++ b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 9eb4867b4e2dbdb2484ae854022aff97e2f0feb3 Mon Sep 17 00:00:00 2001 | 1 | From 66de8a53849f76f5596327c38ae5f002b9f534cd Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 2 Aug 2023 12:06:27 -0700 | 3 | Date: Wed, 2 Aug 2023 12:06:27 -0700 |
4 | Subject: [PATCH 20/22] sd-event: Make malloc_trim() conditional on glibc | 4 | Subject: [PATCH 20/26] sd-event: Make malloc_trim() conditional on glibc |
5 | 5 | ||
6 | musl does not have this API | 6 | musl does not have this API |
7 | 7 | ||
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
12 | 1 file changed, 3 insertions(+), 1 deletion(-) | 12 | 1 file changed, 3 insertions(+), 1 deletion(-) |
13 | 13 | ||
14 | diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c | 14 | diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c |
15 | index 288798a0dc..6419a7f216 100644 | 15 | index 7aea7d2581..d3f4001f53 100644 |
16 | --- a/src/libsystemd/sd-event/sd-event.c | 16 | --- a/src/libsystemd/sd-event/sd-event.c |
17 | +++ b/src/libsystemd/sd-event/sd-event.c | 17 | +++ b/src/libsystemd/sd-event/sd-event.c |
18 | @@ -1874,7 +1874,7 @@ _public_ int sd_event_add_exit( | 18 | @@ -1881,7 +1881,7 @@ _public_ int sd_event_add_exit( |
19 | } | 19 | } |
20 | 20 | ||
21 | _public_ int sd_event_trim_memory(void) { | 21 | _public_ int sd_event_trim_memory(void) { |
@@ -24,7 +24,7 @@ index 288798a0dc..6419a7f216 100644 | |||
24 | 24 | ||
25 | /* A default implementation of a memory pressure callback. Simply releases our own allocation caches | 25 | /* A default implementation of a memory pressure callback. Simply releases our own allocation caches |
26 | * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a | 26 | * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a |
27 | @@ -1888,7 +1888,9 @@ _public_ int sd_event_trim_memory(void) { | 27 | @@ -1895,7 +1895,9 @@ _public_ int sd_event_trim_memory(void) { |
28 | 28 | ||
29 | usec_t before_timestamp = now(CLOCK_MONOTONIC); | 29 | usec_t before_timestamp = now(CLOCK_MONOTONIC); |
30 | hashmap_trim_pools(); | 30 | hashmap_trim_pools(); |
diff --git a/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch index 7eff069bb7..7ab56ef8fb 100644 --- a/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch +++ b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 502597b9ddd6b145541b23fadca0b1d3ca9f6367 Mon Sep 17 00:00:00 2001 | 1 | From 93d13363c605fb2de484f38f3726f8fbad1c3540 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 2 Aug 2023 12:20:40 -0700 | 3 | Date: Wed, 2 Aug 2023 12:20:40 -0700 |
4 | Subject: [PATCH 21/22] shared: Do not use malloc_info on musl | 4 | Subject: [PATCH 21/26] shared: Do not use malloc_info on musl |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [musl-specific] | 6 | Upstream-Status: Inappropriate [musl-specific] |
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
@@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
11 | 2 files changed, 5 insertions(+), 4 deletions(-) | 11 | 2 files changed, 5 insertions(+), 4 deletions(-) |
12 | 12 | ||
13 | diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c | 13 | diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c |
14 | index 74f148c8b4..2d862a123d 100644 | 14 | index ff80e580fc..a628a29d0c 100644 |
15 | --- a/src/shared/bus-util.c | 15 | --- a/src/shared/bus-util.c |
16 | +++ b/src/shared/bus-util.c | 16 | +++ b/src/shared/bus-util.c |
17 | @@ -611,15 +611,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat | 17 | @@ -787,15 +787,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat |
18 | _cleanup_close_ int fd = -EBADF; | 18 | _cleanup_close_ int fd = -EBADF; |
19 | size_t dump_size; | 19 | size_t dump_size; |
20 | FILE *f; | 20 | FILE *f; |
diff --git a/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch index 24f3bf74a0..d06967f8d5 100644 --- a/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch +++ b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From fd52f1764647e03a35e8f0ed0ef952049073ccbd Mon Sep 17 00:00:00 2001 | 1 | From 5b8df64993b68a5a4af0f214d8cae77f4e716593 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Tue, 2 Jan 2024 11:03:27 +0800 | 3 | Date: Tue, 2 Jan 2024 11:03:27 +0800 |
4 | Subject: [PATCH 22/22] avoid missing LOCK_EX declaration | 4 | Subject: [PATCH 22/26] avoid missing LOCK_EX declaration |
5 | 5 | ||
6 | This only happens on MUSL. Include sys/file.h to avoid compilation | 6 | This only happens on MUSL. Include sys/file.h to avoid compilation |
7 | error about missing LOCK_EX declaration. | 7 | error about missing LOCK_EX declaration. |
@@ -10,15 +10,28 @@ Upstream-Status: Inappropriate [musl specific] | |||
10 | 10 | ||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
12 | --- | 12 | --- |
13 | src/basic/fd-util.h | 1 + | ||
13 | src/core/exec-invoke.c | 1 + | 14 | src/core/exec-invoke.c | 1 + |
14 | src/shared/dev-setup.h | 1 + | 15 | src/shared/dev-setup.h | 1 + |
15 | 2 files changed, 2 insertions(+) | 16 | 3 files changed, 3 insertions(+) |
16 | 17 | ||
18 | diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h | ||
19 | index 93b254c680..5f0b1a816d 100644 | ||
20 | --- a/src/basic/fd-util.h | ||
21 | +++ b/src/basic/fd-util.h | ||
22 | @@ -6,6 +6,7 @@ | ||
23 | #include <stdbool.h> | ||
24 | #include <stdio.h> | ||
25 | #include <sys/socket.h> | ||
26 | +#include <sys/file.h> | ||
27 | |||
28 | #include "macro.h" | ||
29 | #include "missing_fcntl.h" | ||
17 | diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c | 30 | diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c |
18 | index 70d963e269..7084811439 100644 | 31 | index 9d636f5529..6be43caa57 100644 |
19 | --- a/src/core/exec-invoke.c | 32 | --- a/src/core/exec-invoke.c |
20 | +++ b/src/core/exec-invoke.c | 33 | +++ b/src/core/exec-invoke.c |
21 | @@ -4,6 +4,7 @@ | 34 | @@ -5,6 +5,7 @@ |
22 | #include <sys/ioctl.h> | 35 | #include <sys/ioctl.h> |
23 | #include <sys/mount.h> | 36 | #include <sys/mount.h> |
24 | #include <sys/prctl.h> | 37 | #include <sys/prctl.h> |
@@ -27,7 +40,7 @@ index 70d963e269..7084811439 100644 | |||
27 | #if HAVE_PAM | 40 | #if HAVE_PAM |
28 | #include <security/pam_appl.h> | 41 | #include <security/pam_appl.h> |
29 | diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h | 42 | diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h |
30 | index 5339bc4e5e..0697495f23 100644 | 43 | index 92ba6cf764..ba01a0ae55 100644 |
31 | --- a/src/shared/dev-setup.h | 44 | --- a/src/shared/dev-setup.h |
32 | +++ b/src/shared/dev-setup.h | 45 | +++ b/src/shared/dev-setup.h |
33 | @@ -2,6 +2,7 @@ | 46 | @@ -2,6 +2,7 @@ |
@@ -36,7 +49,7 @@ index 5339bc4e5e..0697495f23 100644 | |||
36 | #include <sys/types.h> | 49 | #include <sys/types.h> |
37 | +#include <sys/file.h> | 50 | +#include <sys/file.h> |
38 | 51 | ||
39 | int lock_dev_console(void); | 52 | int dev_setup(const char *prefix, uid_t uid, gid_t gid); |
40 | 53 | ||
41 | -- | 54 | -- |
42 | 2.34.1 | 55 | 2.34.1 |
diff --git a/meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch b/meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch new file mode 100644 index 0000000000..c8bcd9e355 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From e39afec7e5a2f3a9de7202affab4d0340ba879d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 2 Jul 2024 22:18:47 -0700 | ||
4 | Subject: [PATCH 23/26] include signal.h to avoid the 'undeclared' error | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/basic/pidref.h | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/src/basic/pidref.h b/src/basic/pidref.h | ||
14 | index 42ddf4e50b..b9cf53680f 100644 | ||
15 | --- a/src/basic/pidref.h | ||
16 | +++ b/src/basic/pidref.h | ||
17 | @@ -3,6 +3,7 @@ | ||
18 | |||
19 | typedef struct PidRef PidRef; | ||
20 | |||
21 | +#include <signal.h> | ||
22 | #include "macro.h" | ||
23 | #include "process-util.h" | ||
24 | |||
25 | -- | ||
26 | 2.34.1 | ||
27 | |||
diff --git a/meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch b/meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch new file mode 100644 index 0000000000..9532e6b9af --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 5a4334fde21b896cd75b2d1a56e06a4f365e9c4d Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 2 Jul 2024 22:44:31 -0700 | ||
4 | Subject: [PATCH 24/26] undef stdin for references using stdin as a struct | ||
5 | member | ||
6 | |||
7 | In musl stdio.h, we have: | ||
8 | include/stdio.h:#define stdin (stdin) | ||
9 | |||
10 | This causes error when a struct member is also named stdin. undef it. | ||
11 | |||
12 | Upstream-Status: Inappropriate [musl specific] | ||
13 | |||
14 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
15 | --- | ||
16 | src/shared/edit-util.c | 2 ++ | ||
17 | src/systemctl/systemctl-edit.c | 2 ++ | ||
18 | 2 files changed, 4 insertions(+) | ||
19 | |||
20 | diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c | ||
21 | index e37609c2e1..1b212ae7b4 100644 | ||
22 | --- a/src/shared/edit-util.c | ||
23 | +++ b/src/shared/edit-util.c | ||
24 | @@ -3,6 +3,8 @@ | ||
25 | #include <errno.h> | ||
26 | #include <stdio.h> | ||
27 | |||
28 | +#undef stdin | ||
29 | + | ||
30 | #include "alloc-util.h" | ||
31 | #include "copy.h" | ||
32 | #include "edit-util.h" | ||
33 | diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c | ||
34 | index c42a31153d..7695ceeead 100644 | ||
35 | --- a/src/systemctl/systemctl-edit.c | ||
36 | +++ b/src/systemctl/systemctl-edit.c | ||
37 | @@ -13,6 +13,8 @@ | ||
38 | #include "systemctl.h" | ||
39 | #include "terminal-util.h" | ||
40 | |||
41 | +#undef stdin | ||
42 | + | ||
43 | int verb_cat(int argc, char *argv[], void *userdata) { | ||
44 | _cleanup_hashmap_free_ Hashmap *cached_id_map = NULL, *cached_name_map = NULL; | ||
45 | _cleanup_(lookup_paths_done) LookupPaths lp = {}; | ||
46 | -- | ||
47 | 2.34.1 | ||
48 | |||
diff --git a/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch b/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch new file mode 100644 index 0000000000..d791ad2da1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch | |||
@@ -0,0 +1,288 @@ | |||
1 | From a90044320eecda424ed678d283ef60806c70fcda Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 2 Jul 2024 23:23:57 -0700 | ||
4 | Subject: [PATCH 25/26] adjust header inclusion order to avoid redeclaration | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/basic/parse-util.c | 3 ++- | ||
11 | src/libsystemd-network/ndisc-option.c | 6 +++--- | ||
12 | src/libsystemd-network/sd-radv.c | 5 +++-- | ||
13 | src/network/netdev/l2tp-tunnel.c | 9 ++++----- | ||
14 | src/network/netdev/l2tp-tunnel.h | 6 +++--- | ||
15 | src/network/netdev/wireguard.c | 2 +- | ||
16 | src/network/networkctl-link-info.c | 4 ++-- | ||
17 | src/network/networkd-bridge-mdb.c | 3 ++- | ||
18 | src/network/networkd-route.c | 8 ++++---- | ||
19 | src/resolve/resolved-dns-stream.c | 5 +++-- | ||
20 | src/resolve/resolved-manager.c | 5 +++-- | ||
21 | src/shared/conf-parser.c | 3 ++- | ||
22 | 12 files changed, 32 insertions(+), 27 deletions(-) | ||
23 | |||
24 | diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c | ||
25 | index faa5344921..0fc9d12c89 100644 | ||
26 | --- a/src/basic/parse-util.c | ||
27 | +++ b/src/basic/parse-util.c | ||
28 | @@ -2,7 +2,6 @@ | ||
29 | |||
30 | #include <errno.h> | ||
31 | #include <inttypes.h> | ||
32 | -#include <linux/ipv6.h> | ||
33 | #include <net/if.h> | ||
34 | #include <stdio.h> | ||
35 | #include <stdlib.h> | ||
36 | @@ -20,6 +19,8 @@ | ||
37 | #include "string-util.h" | ||
38 | #include "strv.h" | ||
39 | |||
40 | +#include <linux/ipv6.h> | ||
41 | + | ||
42 | int parse_boolean(const char *v) { | ||
43 | if (!v) | ||
44 | return -EINVAL; | ||
45 | diff --git a/src/libsystemd-network/ndisc-option.c b/src/libsystemd-network/ndisc-option.c | ||
46 | index 3aab51f51b..feeb4c78e5 100644 | ||
47 | --- a/src/libsystemd-network/ndisc-option.c | ||
48 | +++ b/src/libsystemd-network/ndisc-option.c | ||
49 | @@ -1,8 +1,5 @@ | ||
50 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
51 | |||
52 | -#include <linux/ipv6.h> | ||
53 | -#include <netinet/icmp6.h> | ||
54 | - | ||
55 | #include "dns-resolver-internal.h" | ||
56 | #include "dns-domain.h" | ||
57 | #include "ether-addr-util.h" | ||
58 | @@ -16,6 +13,9 @@ | ||
59 | #include "strv.h" | ||
60 | #include "unaligned.h" | ||
61 | |||
62 | +#include <linux/ipv6.h> | ||
63 | +#include <netinet/icmp6.h> | ||
64 | + | ||
65 | /* RFC does not say anything about the maximum number of options, but let's limit the number of options for | ||
66 | * safety. Typically, the number of options in an ICMPv6 message should be only a few. */ | ||
67 | #define MAX_OPTIONS 128 | ||
68 | diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c | ||
69 | index f241929ad5..7cef3c3f71 100644 | ||
70 | --- a/src/libsystemd-network/sd-radv.c | ||
71 | +++ b/src/libsystemd-network/sd-radv.c | ||
72 | @@ -3,8 +3,6 @@ | ||
73 | Copyright © 2017 Intel Corporation. All rights reserved. | ||
74 | ***/ | ||
75 | |||
76 | -#include <linux/ipv6.h> | ||
77 | -#include <netinet/icmp6.h> | ||
78 | #include <netinet/in.h> | ||
79 | #include <arpa/inet.h> | ||
80 | |||
81 | @@ -29,6 +27,9 @@ | ||
82 | #include "strv.h" | ||
83 | #include "unaligned.h" | ||
84 | |||
85 | +#include <linux/ipv6.h> | ||
86 | +#include <netinet/icmp6.h> | ||
87 | + | ||
88 | int sd_radv_new(sd_radv **ret) { | ||
89 | _cleanup_(sd_radv_unrefp) sd_radv *ra = NULL; | ||
90 | |||
91 | diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c | ||
92 | index c87e44797b..437b40c114 100644 | ||
93 | --- a/src/network/netdev/l2tp-tunnel.c | ||
94 | +++ b/src/network/netdev/l2tp-tunnel.c | ||
95 | @@ -1,10 +1,5 @@ | ||
96 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
97 | |||
98 | -#include <netinet/in.h> | ||
99 | -#include <linux/if_arp.h> | ||
100 | -#include <linux/l2tp.h> | ||
101 | -#include <linux/genetlink.h> | ||
102 | - | ||
103 | #include "conf-parser.h" | ||
104 | #include "hashmap.h" | ||
105 | #include "l2tp-tunnel.h" | ||
106 | @@ -17,6 +12,10 @@ | ||
107 | #include "string-table.h" | ||
108 | #include "string-util.h" | ||
109 | |||
110 | +#include <netinet/in.h> | ||
111 | +#include <linux/l2tp.h> | ||
112 | +#include <linux/genetlink.h> | ||
113 | + | ||
114 | static const char* const l2tp_l2spec_type_table[_NETDEV_L2TP_L2SPECTYPE_MAX] = { | ||
115 | [NETDEV_L2TP_L2SPECTYPE_NONE] = "none", | ||
116 | [NETDEV_L2TP_L2SPECTYPE_DEFAULT] = "default", | ||
117 | diff --git a/src/network/netdev/l2tp-tunnel.h b/src/network/netdev/l2tp-tunnel.h | ||
118 | index c558ed49de..8419ef34c5 100644 | ||
119 | --- a/src/network/netdev/l2tp-tunnel.h | ||
120 | +++ b/src/network/netdev/l2tp-tunnel.h | ||
121 | @@ -1,13 +1,13 @@ | ||
122 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
123 | #pragma once | ||
124 | |||
125 | -#include <netinet/in.h> | ||
126 | -#include <linux/l2tp.h> | ||
127 | - | ||
128 | #include "in-addr-util.h" | ||
129 | #include "netdev.h" | ||
130 | #include "networkd-util.h" | ||
131 | |||
132 | +#include <netinet/in.h> | ||
133 | +#include <linux/l2tp.h> | ||
134 | + | ||
135 | typedef enum L2tpL2specType { | ||
136 | NETDEV_L2TP_L2SPECTYPE_NONE = L2TP_L2SPECTYPE_NONE, | ||
137 | NETDEV_L2TP_L2SPECTYPE_DEFAULT = L2TP_L2SPECTYPE_DEFAULT, | ||
138 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c | ||
139 | index 5182783f45..79b21cb4ba 100644 | ||
140 | --- a/src/network/netdev/wireguard.c | ||
141 | +++ b/src/network/netdev/wireguard.c | ||
142 | @@ -5,9 +5,9 @@ | ||
143 | |||
144 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
145 | #include <net/if.h> | ||
146 | +#include <netinet/in.h> | ||
147 | //#include <linux/if_arp.h> | ||
148 | #include <linux/ipv6_route.h> | ||
149 | -#include <netinet/in.h> | ||
150 | #include <sys/ioctl.h> | ||
151 | |||
152 | #include "sd-resolve.h" | ||
153 | diff --git a/src/network/networkctl-link-info.c b/src/network/networkctl-link-info.c | ||
154 | index f356d3c231..216c442de1 100644 | ||
155 | --- a/src/network/networkctl-link-info.c | ||
156 | +++ b/src/network/networkctl-link-info.c | ||
157 | @@ -1,7 +1,5 @@ | ||
158 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
159 | |||
160 | -#include <linux/if_tunnel.h> | ||
161 | - | ||
162 | #include "bus-common-errors.h" | ||
163 | #include "bus-error.h" | ||
164 | #include "bus-util.h" | ||
165 | @@ -16,6 +14,8 @@ | ||
166 | #include "strxcpyx.h" | ||
167 | #include "wifi-util.h" | ||
168 | |||
169 | +#include <linux/if_tunnel.h> | ||
170 | + | ||
171 | /* use 128 kB for receive socket kernel queue, we shouldn't need more here */ | ||
172 | #define RCVBUF_SIZE (128*1024) | ||
173 | |||
174 | diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c | ||
175 | index 358ca4d294..fe87f7c093 100644 | ||
176 | --- a/src/network/networkd-bridge-mdb.c | ||
177 | +++ b/src/network/networkd-bridge-mdb.c | ||
178 | @@ -2,7 +2,6 @@ | ||
179 | |||
180 | /* Make sure the net/if.h header is included before any linux/ one */ | ||
181 | #include <net/if.h> | ||
182 | -#include <linux/if_bridge.h> | ||
183 | |||
184 | #include "netlink-util.h" | ||
185 | #include "networkd-bridge-mdb.h" | ||
186 | @@ -13,6 +12,8 @@ | ||
187 | #include "string-util.h" | ||
188 | #include "vlan-util.h" | ||
189 | |||
190 | +#include <linux/if_bridge.h> | ||
191 | + | ||
192 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U | ||
193 | |||
194 | /* remove MDB entry. */ | ||
195 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c | ||
196 | index 0f3f79ec4f..325743bebf 100644 | ||
197 | --- a/src/network/networkd-route.c | ||
198 | +++ b/src/network/networkd-route.c | ||
199 | @@ -1,9 +1,5 @@ | ||
200 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
201 | |||
202 | -#include <linux/if.h> | ||
203 | -#include <linux/ipv6_route.h> | ||
204 | -#include <linux/nexthop.h> | ||
205 | - | ||
206 | #include "alloc-util.h" | ||
207 | #include "event-util.h" | ||
208 | #include "netlink-util.h" | ||
209 | @@ -21,6 +17,10 @@ | ||
210 | #include "vrf.h" | ||
211 | #include "wireguard.h" | ||
212 | |||
213 | +#include <linux/if.h> | ||
214 | +#include <linux/ipv6_route.h> | ||
215 | +#include <linux/nexthop.h> | ||
216 | + | ||
217 | static Route* route_detach_impl(Route *route) { | ||
218 | assert(route); | ||
219 | assert(!!route->network + !!route->manager + !!route->wireguard <= 1); | ||
220 | diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c | ||
221 | index e57af66221..f66d8f0606 100644 | ||
222 | --- a/src/resolve/resolved-dns-stream.c | ||
223 | +++ b/src/resolve/resolved-dns-stream.c | ||
224 | @@ -1,7 +1,5 @@ | ||
225 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
226 | |||
227 | -#include <linux/if_arp.h> | ||
228 | -#include <netinet/tcp.h> | ||
229 | #include <unistd.h> | ||
230 | |||
231 | #include "alloc-util.h" | ||
232 | @@ -12,6 +10,9 @@ | ||
233 | #include "resolved-dns-stream.h" | ||
234 | #include "resolved-manager.h" | ||
235 | |||
236 | +//#include <linux/if_arp.h> | ||
237 | +#include <netinet/tcp.h> | ||
238 | + | ||
239 | #define DNS_STREAMS_MAX 128 | ||
240 | |||
241 | #define DNS_QUERIES_PER_STREAM 32 | ||
242 | diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c | ||
243 | index dbaad81734..b988e75851 100644 | ||
244 | --- a/src/resolve/resolved-manager.c | ||
245 | +++ b/src/resolve/resolved-manager.c | ||
246 | @@ -1,8 +1,6 @@ | ||
247 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
248 | |||
249 | #include <fcntl.h> | ||
250 | -#include <linux/ipv6.h> | ||
251 | -#include <netinet/in.h> | ||
252 | #include <poll.h> | ||
253 | #include <sys/ioctl.h> | ||
254 | #include <sys/stat.h> | ||
255 | @@ -46,6 +44,9 @@ | ||
256 | #include "utf8.h" | ||
257 | #include "varlink-util.h" | ||
258 | |||
259 | +#include <linux/ipv6.h> | ||
260 | +#include <netinet/in.h> | ||
261 | + | ||
262 | #define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC) | ||
263 | |||
264 | static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) { | ||
265 | diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c | ||
266 | index eaa8a5f11c..03379e7474 100644 | ||
267 | --- a/src/shared/conf-parser.c | ||
268 | +++ b/src/shared/conf-parser.c | ||
269 | @@ -2,7 +2,6 @@ | ||
270 | |||
271 | #include <errno.h> | ||
272 | #include <limits.h> | ||
273 | -#include <linux/ipv6.h> | ||
274 | #include <stdint.h> | ||
275 | #include <stdio.h> | ||
276 | #include <stdlib.h> | ||
277 | @@ -47,6 +46,8 @@ | ||
278 | #include "time-util.h" | ||
279 | #include "utf8.h" | ||
280 | |||
281 | +#include <linux/ipv6.h> | ||
282 | + | ||
283 | DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(config_file_hash_ops_fclose, | ||
284 | char, path_hash_func, path_compare, | ||
285 | FILE, safe_fclose); | ||
286 | -- | ||
287 | 2.34.1 | ||
288 | |||
diff --git a/meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch b/meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch new file mode 100644 index 0000000000..a7549ee151 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From f2a7cf1d2a2bc2516a180809efd85c828cd9c7f4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 3 Jul 2024 07:18:42 -0700 | ||
4 | Subject: [PATCH 26/26] build-path.c: avoid boot time segfault for musl | ||
5 | |||
6 | This function, at runtime, should return -ENOEXEC. For musl, it | ||
7 | somehow segfaults. I think it's related to getauxval, but it's | ||
8 | really does not matter, just return -ENOEXEC. | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl specific] | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | src/basic/build-path.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/src/basic/build-path.c b/src/basic/build-path.c | ||
18 | index b5972658df..4ef551034e 100644 | ||
19 | --- a/src/basic/build-path.c | ||
20 | +++ b/src/basic/build-path.c | ||
21 | @@ -151,6 +151,7 @@ int get_build_exec_dir(char **ret) { | ||
22 | */ | ||
23 | |||
24 | static int runpath_cached = -ERRNO_MAX-1; | ||
25 | + return -ENOEXEC; | ||
26 | if (runpath_cached == -ERRNO_MAX-1) { | ||
27 | const char *runpath = NULL; | ||
28 | |||
29 | -- | ||
30 | 2.34.1 | ||
31 | |||
diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_257.6.bb index e7498c802d..5f7f20c434 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_257.6.bb | |||
@@ -4,11 +4,11 @@ PROVIDES = "udev" | |||
4 | 4 | ||
5 | PE = "1" | 5 | PE = "1" |
6 | 6 | ||
7 | DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native" | 7 | DEPENDS = "gperf-native libcap util-linux python3-jinja2-native" |
8 | 8 | ||
9 | SECTION = "base/shell" | 9 | SECTION = "base/shell" |
10 | 10 | ||
11 | inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check | 11 | inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives systemd gettext bash-completion manpages features_check mime |
12 | 12 | ||
13 | # unmerged-usr support is deprecated upstream, taints the system and will be | 13 | # unmerged-usr support is deprecated upstream, taints the system and will be |
14 | # removed in the near future. Fail the build if it is not enabled. | 14 | # removed in the near future. Fail the build if it is not enabled. |
@@ -26,20 +26,19 @@ SRC_URI += " \ | |||
26 | file://init \ | 26 | file://init \ |
27 | file://99-default.preset \ | 27 | file://99-default.preset \ |
28 | file://systemd-pager.sh \ | 28 | file://systemd-pager.sh \ |
29 | file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 29 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
30 | file://0008-implment-systemd-sysv-install-for-OE.patch \ | 30 | file://0002-implment-systemd-sysv-install-for-OE.patch \ |
31 | file://0001-Do-not-create-var-log-README.patch \ | ||
31 | " | 32 | " |
32 | 33 | ||
33 | # patches needed by musl | 34 | # patches needed by musl |
34 | SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" | 35 | SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" |
35 | SRC_URI_MUSL = "\ | 36 | SRC_URI_MUSL = "\ |
36 | file://0001-missing_type.h-add-comparison_fn_t.patch \ | 37 | file://0003-missing_type.h-add-comparison_fn_t.patch \ |
37 | file://0002-add-fallback-parse_printf_format-implementation.patch \ | 38 | file://0004-add-fallback-parse_printf_format-implementation.patch \ |
38 | file://0003-src-basic-missing.h-check-for-missing-strndupa.patch \ | 39 | file://0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ |
39 | file://0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ | 40 | file://0006-add-missing-FTW_-macros-for-musl.patch \ |
40 | file://0005-add-missing-FTW_-macros-for-musl.patch \ | 41 | file://0007-Use-uintmax_t-for-handling-rlim_t.patch \ |
41 | file://0006-Use-uintmax_t-for-handling-rlim_t.patch \ | ||
42 | file://0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ | ||
43 | file://0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ | 42 | file://0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ |
44 | file://0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ | 43 | file://0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ |
45 | file://0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ | 44 | file://0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ |
@@ -55,6 +54,10 @@ SRC_URI_MUSL = "\ | |||
55 | file://0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ | 54 | file://0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ |
56 | file://0021-shared-Do-not-use-malloc_info-on-musl.patch \ | 55 | file://0021-shared-Do-not-use-malloc_info-on-musl.patch \ |
57 | file://0022-avoid-missing-LOCK_EX-declaration.patch \ | 56 | file://0022-avoid-missing-LOCK_EX-declaration.patch \ |
57 | file://0023-include-signal.h-to-avoid-the-undeclared-error.patch \ | ||
58 | file://0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch \ | ||
59 | file://0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch \ | ||
60 | file://0026-build-path.c-avoid-boot-time-segfault-for-musl.patch \ | ||
58 | " | 61 | " |
59 | 62 | ||
60 | PAM_PLUGINS = " \ | 63 | PAM_PLUGINS = " \ |
@@ -65,14 +68,13 @@ PAM_PLUGINS = " \ | |||
65 | " | 68 | " |
66 | 69 | ||
67 | PACKAGECONFIG ??= " \ | 70 | PACKAGECONFIG ??= " \ |
68 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack usrmerge polkit seccomp', d)} \ | 71 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit apparmor efi ldconfig pam pni-names selinux smack polkit seccomp', d)} \ |
69 | ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \ | 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \ |
70 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ | 73 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ |
71 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ | 74 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ |
72 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \ | 75 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit', 'link-udev-shared', d)} \ |
73 | backlight \ | 76 | backlight \ |
74 | binfmt \ | 77 | binfmt \ |
75 | cgroupv2 \ | ||
76 | gshadow \ | 78 | gshadow \ |
77 | hibernate \ | 79 | hibernate \ |
78 | hostnamed \ | 80 | hostnamed \ |
@@ -90,9 +92,9 @@ PACKAGECONFIG ??= " \ | |||
90 | quotacheck \ | 92 | quotacheck \ |
91 | randomseed \ | 93 | randomseed \ |
92 | resolved \ | 94 | resolved \ |
95 | serial-getty-generator \ | ||
93 | set-time-epoch \ | 96 | set-time-epoch \ |
94 | sysusers \ | 97 | sysusers \ |
95 | sysvinit \ | ||
96 | timedated \ | 98 | timedated \ |
97 | timesyncd \ | 99 | timesyncd \ |
98 | userdb \ | 100 | userdb \ |
@@ -128,68 +130,72 @@ TARGET_CC_ARCH:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 -D_LARGEFILE64_SOURCE" | |||
128 | # systemd-serialgetty.bb - not enabled by default. | 130 | # systemd-serialgetty.bb - not enabled by default. |
129 | PACKAGECONFIG[serial-getty-generator] = "" | 131 | PACKAGECONFIG[serial-getty-generator] = "" |
130 | 132 | ||
131 | PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" | 133 | PACKAGECONFIG[acl] = "-Dacl=enabled,-Dacl=disabled,acl" |
132 | PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" | 134 | PACKAGECONFIG[audit] = "-Daudit=enabled,-Daudit=disabled,audit" |
135 | PACKAGECONFIG[apparmor] = "-Dapparmor=enabled,-Dapparmor=disabled,apparmor" | ||
133 | PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" | 136 | PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" |
134 | PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" | 137 | PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" |
135 | PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" | 138 | PACKAGECONFIG[bpf-framework] = "-Dbpf-framework=enabled,-Dbpf-framework=disabled,clang-native bpftool-native libbpf,libbpf" |
136 | PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" | 139 | PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" |
137 | PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" | 140 | PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" |
138 | PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup" | 141 | PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=enabled,-Dlibcryptsetup=disabled,cryptsetup,,cryptsetup" |
139 | PACKAGECONFIG[cryptsetup-plugins] = "-Dlibcryptsetup-plugins=true,-Dlibcryptsetup-plugins=false,cryptsetup,,cryptsetup" | 142 | PACKAGECONFIG[cryptsetup-plugins] = "-Dlibcryptsetup-plugins=enabled,-Dlibcryptsetup-plugins=disabled,cryptsetup,,cryptsetup" |
140 | PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device" | 143 | PACKAGECONFIG[tpm2] = "-Dtpm2=enabled,-Dtpm2=disabled,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device" |
141 | # If multiple compression libraries are enabled, the format to use for compression is chosen implicitly, | 144 | # If multiple compression libraries are enabled, the format to use for compression is chosen implicitly, |
142 | # so if you want to compress with e.g. lz4 you cannot enable zstd, so you cannot read zstd-compressed journal files. | 145 | # so if you want to compress with e.g. lz4 you cannot enable zstd, so you cannot read zstd-compressed journal files. |
143 | # This option allows to enable all compression formats for reading, but choosing a specific one for writing. | 146 | # This option allows to enable all compression formats for reading, but choosing a specific one for writing. |
144 | PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true -Ddefault-compression=lz4,,lz4" | 147 | PACKAGECONFIG[default-compression-lz4] = "-Dlz4=true -Ddefault-compression=lz4,,lz4" |
145 | PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz" | 148 | PACKAGECONFIG[default-compression-xz] = "-Dxz=true -Ddefault-compression=xz,,xz" |
146 | PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd" | 149 | PACKAGECONFIG[default-compression-zstd] = "-Dzstd=true -Ddefault-compression=zstd,,zstd" |
147 | PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" | 150 | PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus" |
148 | PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=true,-Defi=false -Dbootloader=false,python3-pyelftools-native" | 151 | PACKAGECONFIG[efi] = "-Defi=true -Dbootloader=enabled,-Defi=false -Dbootloader=disabled,python3-pyelftools-native" |
149 | PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils,,libelf libdw" | 152 | PACKAGECONFIG[elfutils] = "-Delfutils=enabled,-Delfutils=disabled,elfutils,,libelf libdw" |
153 | PACKAGECONFIG[fido] = "-Dlibfido2=enabled,-Dlibfido2=disabled,libfido2" | ||
150 | PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" | 154 | PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" |
151 | PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false" | 155 | PACKAGECONFIG[repart] = "-Drepart=enabled,-Drepart=disabled" |
152 | PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false" | 156 | PACKAGECONFIG[homed] = "-Dhomed=enabled,-Dhomed=disabled" |
153 | # Sign the journal for anti-tampering | 157 | # Sign the journal for anti-tampering |
154 | PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" | 158 | PACKAGECONFIG[gcrypt] = "-Dgcrypt=enabled,-Dgcrypt=disabled,libgcrypt" |
155 | PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" | 159 | PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" |
156 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" | 160 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" |
157 | PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" | 161 | PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" |
158 | PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" | 162 | PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" |
159 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" | 163 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" |
160 | PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" | 164 | PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" |
161 | # importd requires journal-upload/xz/zlib/bzip2/gcrypt | 165 | # importd requires journal-upload/xz/zlib/bzip2/gcrypt |
162 | PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false,glib-2.0" | 166 | PACKAGECONFIG[importd] = "-Dimportd=enabled,-Dimportd=disabled,glib-2.0" |
163 | # Update NAT firewall rules | 167 | # Update NAT firewall rules |
164 | PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" | 168 | PACKAGECONFIG[iptc] = "-Dlibiptc=enabled,-Dlibiptc=disabled,iptables" |
165 | PACKAGECONFIG[journal-color] = ",,,less" | 169 | PACKAGECONFIG[journal-color] = ",,,less" |
166 | PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" | 170 | PACKAGECONFIG[journal-upload] = "-Dlibcurl=enabled,-Dlibcurl=disabled,curl" |
167 | PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" | 171 | PACKAGECONFIG[kmod] = "-Dkmod=enabled,-Dkmod=disabled,kmod,libkmod" |
168 | PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" | 172 | PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" |
169 | PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn" | 173 | PACKAGECONFIG[libidn] = "-Dlibidn=enabled,-Dlibidn=disabled,libidn,,libidn" |
170 | PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2" | 174 | PACKAGECONFIG[libidn2] = "-Dlibidn2=enabled,-Dlibidn2=disabled,libidn2,,libidn2" |
171 | # Link udev shared with systemd helper library. | 175 | # Link udev shared with systemd helper library. |
172 | # If enabled the udev package depends on the systemd package (which has the needed shared library). | 176 | # If enabled the udev package depends on the systemd package (which has the needed shared library). |
173 | PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false" | 177 | PACKAGECONFIG[link-udev-shared] = "-Dlink-udev-shared=true,-Dlink-udev-shared=false" |
174 | PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" | 178 | PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" |
175 | PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" | 179 | PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" |
176 | PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" | 180 | PACKAGECONFIG[lz4] = "-Dlz4=enabled,-Dlz4=disabled,lz4" |
177 | PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" | 181 | PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" |
178 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | 182 | PACKAGECONFIG[manpages] = "-Dman=enabled,-Dman=disabled,python3-lxml-native libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
179 | PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" | 183 | PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=enabled,-Dmicrohttpd=disabled,libmicrohttpd" |
184 | PACKAGECONFIG[mountfsd] = "-Dmountfsd=true,-Dmountfsd=false" | ||
180 | PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" | 185 | PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" |
186 | PACKAGECONFIG[nsresourced] = "-Dnsresourced=true,-Dnsresourced=false" | ||
181 | PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" | 187 | PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" |
182 | PACKAGECONFIG[no-dns-fallback] = "-Ddns-servers=" | 188 | PACKAGECONFIG[no-dns-fallback] = "-Ddns-servers=" |
183 | PACKAGECONFIG[no-ntp-fallback] = "-Dntp-servers=" | 189 | PACKAGECONFIG[no-ntp-fallback] = "-Dntp-servers=" |
184 | PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false,,libnss-systemd" | 190 | PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false,,libnss-systemd" |
185 | PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" | 191 | PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=enabled,-Dnss-mymachines=disabled" |
186 | PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" | 192 | PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=enabled,-Dnss-resolve=disabled" |
187 | PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false" | 193 | PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false" |
188 | PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" | 194 | PACKAGECONFIG[openssl] = "-Dopenssl=enabled,-Dopenssl=disabled,openssl" |
189 | PACKAGECONFIG[p11kit] = "-Dp11kit=true,-Dp11kit=false,p11-kit" | 195 | PACKAGECONFIG[p11kit] = "-Dp11kit=enabled,-Dp11kit=disabled,p11-kit" |
190 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" | 196 | PACKAGECONFIG[pam] = "-Dpam=enabled,-Dpam=disabled,libpam,${PAM_PLUGINS}" |
191 | PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" | 197 | PACKAGECONFIG[pcre2] = "-Dpcre2=enabled,-Dpcre2=disabled,libpcre2" |
192 | PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" | 198 | PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled" |
193 | # If polkit is disabled and networkd+hostnamed are in use, enabling this option and | 199 | # If polkit is disabled and networkd+hostnamed are in use, enabling this option and |
194 | # using dbus-broker will allow networkd to be authorized to change the | 200 | # using dbus-broker will allow networkd to be authorized to change the |
195 | # hostname without acquiring additional privileges | 201 | # hostname without acquiring additional privileges |
@@ -197,13 +203,13 @@ PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit" | |||
197 | PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" | 203 | PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" |
198 | PACKAGECONFIG[pstore] = "-Dpstore=true,-Dpstore=false" | 204 | PACKAGECONFIG[pstore] = "-Dpstore=true,-Dpstore=false" |
199 | PACKAGECONFIG[pni-names] = ",,," | 205 | PACKAGECONFIG[pni-names] = ",,," |
200 | PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode" | 206 | PACKAGECONFIG[qrencode] = "-Dqrencode=enabled,-Dqrencode=disabled,qrencode,,qrencode" |
201 | PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" | 207 | PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" |
202 | PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" | 208 | PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" |
203 | PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" | 209 | PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" |
204 | PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" | 210 | PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" |
205 | PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" | 211 | PACKAGECONFIG[seccomp] = "-Dseccomp=enabled,-Dseccomp=disabled,libseccomp" |
206 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" | 212 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,initscripts-sushell" |
207 | PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" | 213 | PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" |
208 | PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" | 214 | PACKAGECONFIG[sysext] = "-Dsysext=true, -Dsysext=false" |
209 | PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" | 215 | PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" |
@@ -216,7 +222,6 @@ def build_epoch(d): | |||
216 | PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" | 222 | PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" |
217 | PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" | 223 | PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" |
218 | PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" | 224 | PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" |
219 | PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" | ||
220 | PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" | 225 | PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" |
221 | PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" | 226 | PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" |
222 | PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" | 227 | PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" |
@@ -225,30 +230,26 @@ PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setu | |||
225 | PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" | 230 | PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" |
226 | PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" | 231 | PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" |
227 | # Verify keymaps on locale change | 232 | # Verify keymaps on locale change |
228 | PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" | 233 | PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=enabled,-Dxkbcommon=disabled,libxkbcommon" |
229 | PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" | 234 | PACKAGECONFIG[xz] = "-Dxz=enabled,-Dxz=disabled,xz" |
230 | PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" | 235 | PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" |
231 | PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd" | 236 | PACKAGECONFIG[zstd] = "-Dzstd=enabled,-Dzstd=disabled,zstd" |
232 | 237 | ||
233 | RESOLV_CONF ??= "" | 238 | RESOLV_CONF ??= "" |
234 | 239 | ||
235 | # Helper variables to clarify locations. This mirrors the logic in systemd's | 240 | # bpf-framework: pass the recipe-sysroot to the compiler used to build |
236 | # build system. | 241 | # the eBPFs, so that it can find needed system includes in there. |
237 | rootprefix ?= "${root_prefix}" | 242 | CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}" |
238 | rootlibdir ?= "${base_libdir}" | 243 | LDFLAGS:append:aarch64 = " ${@bb.utils.contains('PACKAGECONFIG', 'openssl', '-Wl,-z,gcs-report-dynamic=none', '', d)}" |
239 | rootlibexecdir = "${rootprefix}/lib" | ||
240 | 244 | ||
241 | EXTRA_OEMESON += "-Dnobody-user=nobody \ | 245 | EXTRA_OEMESON += "-Dnobody-user=nobody \ |
242 | -Dnobody-group=nogroup \ | 246 | -Dnobody-group=nogroup \ |
243 | -Drootlibdir=${rootlibdir} \ | ||
244 | -Drootprefix=${rootprefix} \ | ||
245 | -Ddefault-locale=C \ | 247 | -Ddefault-locale=C \ |
246 | -Dmode=release \ | 248 | -Dmode=release \ |
247 | -Dsystem-alloc-uid-min=101 \ | 249 | -Dsystem-alloc-uid-min=101 \ |
248 | -Dsystem-uid-max=999 \ | 250 | -Dsystem-uid-max=999 \ |
249 | -Dsystem-alloc-gid-min=101 \ | 251 | -Dsystem-alloc-gid-min=101 \ |
250 | -Dsystem-gid-max=999 \ | 252 | -Dsystem-gid-max=999 \ |
251 | -Dcreate-log-dirs=false \ | ||
252 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ | 253 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ |
253 | " | 254 | " |
254 | 255 | ||
@@ -269,45 +270,56 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | |||
269 | # The 60 seconds is watchdog's default vaule. | 270 | # The 60 seconds is watchdog's default vaule. |
270 | WATCHDOG_TIMEOUT ??= "60" | 271 | WATCHDOG_TIMEOUT ??= "60" |
271 | 272 | ||
273 | # To make use of the hardware watchdog it is sufficient to set WATCHDOG_RUNTIME_SEC | ||
274 | # (RuntimeWatchdogSec= option in /etc/systemd/system.conf) to a value like 20s | ||
275 | # and the watchdog is enabled. (defaults is no hardware watchdog use) | ||
276 | WATCHDOG_RUNTIME_SEC ??= "" | ||
277 | |||
272 | do_install() { | 278 | do_install() { |
273 | meson_do_install | 279 | meson_do_install |
274 | # Change the root user's home directory in /lib/sysusers.d/basic.conf. | 280 | |
275 | # This is done merely for backward compatibility with previous systemd recipes. | 281 | if ${@bb.utils.contains('PACKAGECONFIG', 'sysusers', 'true', 'false', d)}; then |
276 | # systemd hardcodes root user's HOME to be "/root". Changing to use other values | 282 | # Change the root user's home directory in /lib/sysusers.d/basic.conf. |
277 | # may have unexpected runtime behaviors. | 283 | # This is done merely for backward compatibility with previous systemd recipes. |
278 | if [ "${ROOT_HOME}" != "/root" ]; then | 284 | # systemd hardcodes root user's HOME to be "/root". Changing to use other values |
279 | bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" | 285 | # may have unexpected runtime behaviors. |
280 | sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf | 286 | if [ "${ROOT_HOME}" != "/root" ]; then |
287 | bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" | ||
288 | sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf | ||
289 | fi | ||
281 | fi | 290 | fi |
282 | install -d ${D}/${base_sbindir} | 291 | install -d ${D}/${base_sbindir} |
283 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then | 292 | |
284 | # Provided by a separate recipe | 293 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then |
285 | rm ${D}${systemd_system_unitdir}/serial-getty* -f | 294 | # Remove the serial-getty generator and instead use explicit services |
295 | # created by the systemd-serialgetty recipe | ||
296 | find ${D} -name \*getty-generator\* -delete | ||
286 | fi | 297 | fi |
287 | 298 | ||
288 | # Provide support for initramfs | 299 | # Provide support for initramfs |
289 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | 300 | [ ! -e ${D}/init ] && ln -s ${nonarch_libdir}/systemd/systemd ${D}/init |
290 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | 301 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${nonarch_libdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd |
291 | 302 | ||
292 | install -d ${D}${sysconfdir}/udev/rules.d/ | 303 | install -d ${D}${sysconfdir}/udev/rules.d/ |
293 | install -d ${D}${nonarch_libdir}/tmpfiles.d | 304 | install -d ${D}${nonarch_libdir}/tmpfiles.d |
294 | for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do | 305 | for rule in $(find ${UNPACKDIR} -maxdepth 1 -type f -name "*.rules"); do |
295 | install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ | 306 | install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ |
296 | done | 307 | done |
297 | 308 | ||
298 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/ | 309 | install -m 0644 ${UNPACKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/ |
299 | 310 | ||
300 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 311 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
301 | install -d ${D}${sysconfdir}/init.d | 312 | install -d ${D}${sysconfdir}/init.d |
302 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | 313 | install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd |
303 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | 314 | sed -i s%@UDEVD@%${nonarch_libdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd |
304 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install | 315 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install |
305 | fi | 316 | fi |
306 | 317 | ||
307 | if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then | 318 | if ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'true', 'false', d)}; then |
308 | # /var/log is typically a symbolic link to inside /var/volatile, | 319 | # base-files recipe provides /var/log which is a symlink to /var/volatile/log |
309 | # which is expected to be empty. | ||
310 | rm -rf ${D}${localstatedir}/log | 320 | rm -rf ${D}${localstatedir}/log |
321 | printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "${localstatedir}" \ | ||
322 | "${localstatedir}" >>${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf | ||
311 | elif [ -e ${D}${localstatedir}/log/journal ]; then | 323 | elif [ -e ${D}${localstatedir}/log/journal ]; then |
312 | chown root:systemd-journal ${D}${localstatedir}/log/journal | 324 | chown root:systemd-journal ${D}${localstatedir}/log/journal |
313 | 325 | ||
@@ -317,9 +329,9 @@ do_install() { | |||
317 | 329 | ||
318 | # if the user requests /tmp be on persistent storage (i.e. not volatile) | 330 | # if the user requests /tmp be on persistent storage (i.e. not volatile) |
319 | # then don't use a tmpfs for /tmp | 331 | # then don't use a tmpfs for /tmp |
320 | if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then | 332 | if ! ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-tmp.txt', 'true', 'false', d)}; then |
321 | rm -f ${D}${rootlibdir}/systemd/system/tmp.mount | 333 | rm -f ${D}${nonarch_libdir}/systemd/system/tmp.mount |
322 | rm -f ${D}${rootlibdir}/systemd/system/local-fs.target.wants/tmp.mount | 334 | rm -f ${D}${nonarch_libdir}/systemd/system/local-fs.target.wants/tmp.mount |
323 | fi | 335 | fi |
324 | 336 | ||
325 | install -d ${D}${systemd_system_unitdir}/graphical.target.wants | 337 | install -d ${D}${systemd_system_unitdir}/graphical.target.wants |
@@ -329,7 +341,7 @@ do_install() { | |||
329 | install -d ${D}${systemd_system_unitdir}/rescue.target.wants | 341 | install -d ${D}${systemd_system_unitdir}/rescue.target.wants |
330 | 342 | ||
331 | # Create symlinks for systemd-update-utmp-runlevel.service | 343 | # Create symlinks for systemd-update-utmp-runlevel.service |
332 | if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then | 344 | if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)} && ${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'true', 'false', d)}; then |
333 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service | 345 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service |
334 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service | 346 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service |
335 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service | 347 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service |
@@ -350,7 +362,7 @@ do_install() { | |||
350 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd | 362 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd |
351 | else | 363 | else |
352 | resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}" | 364 | resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}" |
353 | sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf | 365 | sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/systemd-resolve.conf |
354 | ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd | 366 | ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd |
355 | fi | 367 | fi |
356 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then | 368 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then |
@@ -358,21 +370,13 @@ do_install() { | |||
358 | rm -r ${D}${sysconfdir}/X11 | 370 | rm -r ${D}${sysconfdir}/X11 |
359 | fi | 371 | fi |
360 | 372 | ||
361 | # If polkit is setup fixup permissions and ownership | ||
362 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
363 | if [ -d ${D}${datadir}/polkit-1/rules.d ]; then | ||
364 | chmod 700 ${D}${datadir}/polkit-1/rules.d | ||
365 | chown polkitd:root ${D}${datadir}/polkit-1/rules.d | ||
366 | fi | ||
367 | fi | ||
368 | |||
369 | # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to | 373 | # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to |
370 | # request hostname changes via DBUS without elevating its privileges | 374 | # request hostname changes via DBUS without elevating its privileges |
371 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then | 375 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then |
372 | install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ | 376 | install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ |
373 | install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ | 377 | install -m 0644 ${UNPACKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ |
374 | install -d ${D}${datadir}/dbus-1/system.d/ | 378 | install -d ${D}${datadir}/dbus-1/system.d/ |
375 | install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/ | 379 | install -m 0644 ${UNPACKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/ |
376 | fi | 380 | fi |
377 | 381 | ||
378 | # create link for existing udev rules | 382 | # create link for existing udev rules |
@@ -380,28 +384,36 @@ do_install() { | |||
380 | 384 | ||
381 | # install default policy for presets | 385 | # install default policy for presets |
382 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto | 386 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto |
383 | install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset | 387 | install -Dm 0644 ${UNPACKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset |
384 | 388 | ||
385 | # add a profile fragment to disable systemd pager with busybox less | 389 | # add a profile fragment to disable systemd pager with busybox less |
386 | install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh | 390 | install -Dm 0644 ${UNPACKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh |
387 | 391 | ||
388 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then | 392 | if [ -n "${WATCHDOG_TIMEOUT}" ]; then |
389 | sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \ | 393 | sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \ |
390 | ${D}/${sysconfdir}/systemd/system.conf | 394 | ${D}/${sysconfdir}/systemd/system.conf |
391 | fi | 395 | fi |
396 | |||
397 | if [ -n "${WATCHDOG_RUNTIME_SEC}" ]; then | ||
398 | sed -i -e 's/#RuntimeWatchdogSec=off/RuntimeWatchdogSec=${WATCHDOG_RUNTIME_SEC}/' \ | ||
399 | ${D}/${sysconfdir}/systemd/system.conf | ||
400 | fi | ||
392 | 401 | ||
393 | if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then | 402 | if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then |
394 | if ! grep -q '^NamePolicy=.*mac' ${D}${rootlibexecdir}/systemd/network/99-default.link; then | 403 | if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then |
395 | sed -i '/^NamePolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link | 404 | sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
396 | fi | 405 | fi |
397 | if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${rootlibexecdir}/systemd/network/99-default.link; then | 406 | if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then |
398 | sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link | 407 | sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
399 | fi | 408 | fi |
409 | else | ||
410 | # Actively disable Predictable Network Interface Names | ||
411 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link | ||
400 | fi | 412 | fi |
401 | } | 413 | } |
402 | 414 | ||
403 | python populate_packages:prepend (){ | 415 | python populate_packages:prepend (){ |
404 | systemdlibdir = d.getVar("rootlibdir") | 416 | systemdlibdir = d.getVar("libdir") |
405 | do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | 417 | do_split_packages(d, systemdlibdir, r'^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) |
406 | } | 418 | } |
407 | PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" | 419 | PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" |
@@ -418,6 +430,8 @@ PACKAGE_BEFORE_PN = "\ | |||
418 | ${PN}-journal-upload \ | 430 | ${PN}-journal-upload \ |
419 | ${PN}-journal-remote \ | 431 | ${PN}-journal-remote \ |
420 | ${PN}-kernel-install \ | 432 | ${PN}-kernel-install \ |
433 | ${PN}-mime \ | ||
434 | ${PN}-networkd \ | ||
421 | ${PN}-rpm-macros \ | 435 | ${PN}-rpm-macros \ |
422 | ${PN}-udev-rules \ | 436 | ${PN}-udev-rules \ |
423 | ${PN}-vconsole-setup \ | 437 | ${PN}-vconsole-setup \ |
@@ -446,6 +460,7 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm | |||
446 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ | 460 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ |
447 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ | 461 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ |
448 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ | 462 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ |
463 | ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ | ||
449 | " | 464 | " |
450 | SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" | 465 | SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" |
451 | 466 | ||
@@ -454,13 +469,14 @@ USERADD_PACKAGES = "${PN} \ | |||
454 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ | 469 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ |
455 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ | 470 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ |
456 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ | 471 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ |
472 | ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ | ||
457 | " | 473 | " |
458 | GROUPADD_PARAM:${PN} = "-r systemd-journal;" | 474 | GROUPADD_PARAM:${PN} = "-r systemd-journal;" |
459 | GROUPADD_PARAM:udev = "-r render" | 475 | GROUPADD_PARAM:udev = "-r render" |
460 | GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" | 476 | GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" |
461 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" | 477 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" |
462 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" | 478 | USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin systemd-network" |
463 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" | 479 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 polkitd;', '', d)}" |
464 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" | 480 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" |
465 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" | 481 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" |
466 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'oomd', '--system -d / -M --shell /sbin/nologin systemd-oom;', '', d)}" | 482 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'oomd', '--system -d / -M --shell /sbin/nologin systemd-oom;', '', d)}" |
@@ -480,7 +496,7 @@ RDEPENDS:${PN}-initramfs = "${PN}" | |||
480 | 496 | ||
481 | FILES:${PN}-gui = "${bindir}/systemadm" | 497 | FILES:${PN}-gui = "${bindir}/systemadm" |
482 | 498 | ||
483 | FILES:${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | 499 | FILES:${PN}-vconsole-setup = "${nonarch_libdir}/systemd/systemd-vconsole-setup \ |
484 | ${systemd_system_unitdir}/systemd-vconsole-setup.service \ | 500 | ${systemd_system_unitdir}/systemd-vconsole-setup.service \ |
485 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-vconsole-setup.service" | 501 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-vconsole-setup.service" |
486 | 502 | ||
@@ -496,15 +512,14 @@ FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" | |||
496 | 512 | ||
497 | FILES:${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | 513 | FILES:${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ |
498 | ${exec_prefix}/lib/binfmt.d \ | 514 | ${exec_prefix}/lib/binfmt.d \ |
499 | ${rootlibexecdir}/systemd/systemd-binfmt \ | 515 | ${nonarch_libdir}/systemd/systemd-binfmt \ |
500 | ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \ | 516 | ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \ |
501 | ${systemd_system_unitdir}/systemd-binfmt.service" | 517 | ${systemd_system_unitdir}/systemd-binfmt.service" |
502 | RRECOMMENDS:${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'kernel-module-binfmt-misc', '', d)}" | 518 | RRECOMMENDS:${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'kernel-module-binfmt-misc', '', d)}" |
503 | 519 | ||
504 | RDEPENDS:${PN}-vconsole-setup = "${@bb.utils.contains('PACKAGECONFIG', 'vconsole', 'kbd kbd-consolefonts kbd-keymaps', '', d)}" | 520 | RDEPENDS:${PN}-vconsole-setup = "${@bb.utils.contains('PACKAGECONFIG', 'vconsole', 'kbd kbd-consolefonts kbd-keymaps', '', d)}" |
505 | 521 | ||
506 | 522 | FILES:${PN}-journal-gatewayd = "${nonarch_libdir}/systemd/systemd-journal-gatewayd \ | |
507 | FILES:${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ | ||
508 | ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ | 523 | ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ |
509 | ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ | 524 | ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ |
510 | ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ | 525 | ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ |
@@ -512,20 +527,20 @@ FILES:${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewa | |||
512 | " | 527 | " |
513 | SYSTEMD_SERVICE:${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" | 528 | SYSTEMD_SERVICE:${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" |
514 | 529 | ||
515 | FILES:${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ | 530 | FILES:${PN}-journal-upload = "${nonarch_libdir}/systemd/systemd-journal-upload \ |
516 | ${systemd_system_unitdir}/systemd-journal-upload.service \ | 531 | ${systemd_system_unitdir}/systemd-journal-upload.service \ |
517 | ${sysconfdir}/systemd/journal-upload.conf \ | 532 | ${sysconfdir}/systemd/journal-upload.conf \ |
518 | " | 533 | " |
519 | SYSTEMD_SERVICE:${PN}-journal-upload = "systemd-journal-upload.service" | 534 | SYSTEMD_SERVICE:${PN}-journal-upload = "systemd-journal-upload.service" |
520 | 535 | ||
521 | FILES:${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ | 536 | FILES:${PN}-journal-remote = "${nonarch_libdir}/systemd/systemd-journal-remote \ |
537 | ${nonarch_libdir}/sysusers.d/systemd-remote.conf \ | ||
522 | ${sysconfdir}/systemd/journal-remote.conf \ | 538 | ${sysconfdir}/systemd/journal-remote.conf \ |
523 | ${systemd_system_unitdir}/systemd-journal-remote.service \ | 539 | ${systemd_system_unitdir}/systemd-journal-remote.service \ |
524 | ${systemd_system_unitdir}/systemd-journal-remote.socket \ | 540 | ${systemd_system_unitdir}/systemd-journal-remote.socket \ |
525 | " | 541 | " |
526 | SYSTEMD_SERVICE:${PN}-journal-remote = "systemd-journal-remote.socket" | 542 | SYSTEMD_SERVICE:${PN}-journal-remote = "systemd-journal-remote.socket" |
527 | 543 | ||
528 | |||
529 | FILES:${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ | 544 | FILES:${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ |
530 | ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ | 545 | ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ |
531 | ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ | 546 | ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ |
@@ -545,10 +560,10 @@ FILES:${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c | |||
545 | ${systemd_system_unitdir}/systemd-machined.service \ | 560 | ${systemd_system_unitdir}/systemd-machined.service \ |
546 | ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ | 561 | ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ |
547 | ${systemd_system_unitdir}/var-lib-machines.mount \ | 562 | ${systemd_system_unitdir}/var-lib-machines.mount \ |
548 | ${rootlibexecdir}/systemd/systemd-import \ | 563 | ${nonarch_libdir}/systemd/systemd-import \ |
549 | ${rootlibexecdir}/systemd/systemd-importd \ | 564 | ${nonarch_libdir}/systemd/systemd-importd \ |
550 | ${rootlibexecdir}/systemd/systemd-machined \ | 565 | ${nonarch_libdir}/systemd/systemd-machined \ |
551 | ${rootlibexecdir}/systemd/systemd-pull \ | 566 | ${nonarch_libdir}/systemd/systemd-pull \ |
552 | ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ | 567 | ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ |
553 | ${exec_prefix}/lib/tmpfiles.d/README \ | 568 | ${exec_prefix}/lib/tmpfiles.d/README \ |
554 | ${systemd_system_unitdir}/systemd-nspawn@.service \ | 569 | ${systemd_system_unitdir}/systemd-nspawn@.service \ |
@@ -586,28 +601,18 @@ FILES:${PN}-extra-utils = "\ | |||
586 | ${bindir}/systemd-cgls \ | 601 | ${bindir}/systemd-cgls \ |
587 | ${bindir}/systemd-cgtop \ | 602 | ${bindir}/systemd-cgtop \ |
588 | ${bindir}/systemd-stdio-bridge \ | 603 | ${bindir}/systemd-stdio-bridge \ |
589 | ${base_bindir}/systemd-ask-password \ | ||
590 | ${base_bindir}/systemd-tty-ask-password-agent \ | ||
591 | ${base_sbindir}/mount.ddi \ | 604 | ${base_sbindir}/mount.ddi \ |
592 | ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path \ | 605 | ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path \ |
593 | ${systemd_system_unitdir}/systemd-ask-password-console.path \ | ||
594 | ${systemd_system_unitdir}/systemd-ask-password-console.service \ | ||
595 | ${systemd_system_unitdir}/systemd-ask-password-wall.path \ | ||
596 | ${systemd_system_unitdir}/systemd-ask-password-wall.service \ | ||
597 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \ | ||
598 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \ | ||
599 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \ | 606 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \ |
600 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path \ | 607 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path \ |
601 | ${systemd_system_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path \ | 608 | ${nonarch_libdir}/systemd/systemd-resolve-host \ |
602 | ${rootlibexecdir}/systemd/systemd-resolve-host \ | 609 | ${nonarch_libdir}/systemd/systemd-ac-power \ |
603 | ${rootlibexecdir}/systemd/systemd-ac-power \ | 610 | ${nonarch_libdir}/systemd/systemd-activate \ |
604 | ${rootlibexecdir}/systemd/systemd-activate \ | 611 | ${nonarch_libdir}/systemd/systemd-measure \ |
605 | ${rootlibexecdir}/systemd/systemd-measure \ | 612 | ${nonarch_libdir}/systemd/systemd-pcrphase \ |
606 | ${rootlibexecdir}/systemd/systemd-pcrphase \ | 613 | ${nonarch_libdir}/systemd/systemd-socket-proxyd \ |
607 | ${rootlibexecdir}/systemd/systemd-socket-proxyd \ | 614 | ${nonarch_libdir}/systemd/systemd-sleep \ |
608 | ${rootlibexecdir}/systemd/systemd-reply-password \ | 615 | ${nonarch_libdir}/systemd/system-sleep \ |
609 | ${rootlibexecdir}/systemd/systemd-sleep \ | ||
610 | ${rootlibexecdir}/systemd/system-sleep \ | ||
611 | ${systemd_system_unitdir}/systemd-hibernate.service \ | 616 | ${systemd_system_unitdir}/systemd-hibernate.service \ |
612 | ${systemd_system_unitdir}/systemd-hybrid-sleep.service \ | 617 | ${systemd_system_unitdir}/systemd-hybrid-sleep.service \ |
613 | ${systemd_system_unitdir}/systemd-pcrphase-initrd.service \ | 618 | ${systemd_system_unitdir}/systemd-pcrphase-initrd.service \ |
@@ -615,25 +620,48 @@ FILES:${PN}-extra-utils = "\ | |||
615 | ${systemd_system_unitdir}/systemd-pcrphase-sysinit.service \ | 620 | ${systemd_system_unitdir}/systemd-pcrphase-sysinit.service \ |
616 | ${systemd_system_unitdir}/systemd-suspend.service \ | 621 | ${systemd_system_unitdir}/systemd-suspend.service \ |
617 | ${systemd_system_unitdir}/sleep.target \ | 622 | ${systemd_system_unitdir}/sleep.target \ |
618 | ${rootlibexecdir}/systemd/systemd-initctl \ | 623 | ${nonarch_libdir}/systemd/systemd-initctl \ |
619 | ${systemd_system_unitdir}/systemd-initctl.service \ | 624 | ${systemd_system_unitdir}/systemd-initctl.service \ |
620 | ${systemd_system_unitdir}/systemd-initctl.socket \ | 625 | ${systemd_system_unitdir}/systemd-initctl.socket \ |
621 | ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \ | 626 | ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \ |
622 | ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ | 627 | ${nonarch_libdir}/systemd/system-generators/systemd-gpt-auto-generator \ |
623 | ${rootlibexecdir}/systemd/systemd-cgroups-agent \ | 628 | ${nonarch_libdir}/systemd/systemd-cgroups-agent \ |
629 | " | ||
630 | |||
631 | FILES:${PN}-mime = "${MIMEDIR}" | ||
632 | RRECOMMENDS:${PN} += "${PN}-mime" | ||
633 | |||
634 | FILES:${PN}-networkd = "\ | ||
635 | ${bindir}/networkctl \ | ||
636 | ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ | ||
637 | ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ | ||
638 | ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ | ||
639 | ${nonarch_libdir}/sysusers.d/systemd-network.conf \ | ||
640 | ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ | ||
641 | ${sysconfdir}/systemd/networkd.conf \ | ||
642 | ${systemd_system_unitdir}/systemd-networkd* \ | ||
643 | ${systemd_unitdir}/network/*.network \ | ||
644 | ${systemd_unitdir}/network/*.network.example \ | ||
645 | ${systemd_unitdir}/networkd.conf \ | ||
646 | ${systemd_unitdir}/systemd-networkd* \ | ||
624 | " | 647 | " |
648 | # systemd-networkd-persistent-storage.service BindsTo=systemd-networkd.service | ||
649 | # systemd-networkd.service has Also=systemd-networkd-wait-online.service | ||
650 | SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" | ||
651 | CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" | ||
652 | RDEPENDS:${PN}-networkd += "${PN}" | ||
653 | RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)}" | ||
625 | 654 | ||
626 | FILES:${PN}-udev-rules = "\ | 655 | FILES:${PN}-udev-rules = "\ |
627 | ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \ | 656 | ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ |
628 | ${rootlibexecdir}/udev/rules.d/71-seat.rules \ | 657 | ${nonarch_libdir}/udev/rules.d/71-seat.rules \ |
629 | ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \ | 658 | ${nonarch_libdir}/udev/rules.d/73-seat-late.rules \ |
630 | ${rootlibexecdir}/udev/rules.d/99-systemd.rules \ | 659 | ${nonarch_libdir}/udev/rules.d/99-systemd.rules \ |
631 | " | 660 | " |
632 | 661 | ||
633 | CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ | 662 | CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ |
634 | ${sysconfdir}/systemd/journald.conf \ | 663 | ${sysconfdir}/systemd/journald.conf \ |
635 | ${sysconfdir}/systemd/logind.conf \ | 664 | ${sysconfdir}/systemd/logind.conf \ |
636 | ${sysconfdir}/systemd/networkd.conf \ | ||
637 | ${sysconfdir}/systemd/pstore.conf \ | 665 | ${sysconfdir}/systemd/pstore.conf \ |
638 | ${sysconfdir}/systemd/resolved.conf \ | 666 | ${sysconfdir}/systemd/resolved.conf \ |
639 | ${sysconfdir}/systemd/sleep.conf \ | 667 | ${sysconfdir}/systemd/sleep.conf \ |
@@ -669,8 +697,10 @@ FILES:${PN} = " ${base_bindir}/* \ | |||
669 | ${sysconfdir}/init.d/README \ | 697 | ${sysconfdir}/init.d/README \ |
670 | ${sysconfdir}/resolv-conf.systemd \ | 698 | ${sysconfdir}/resolv-conf.systemd \ |
671 | ${sysconfdir}/X11/xinit/xinitrc.d/* \ | 699 | ${sysconfdir}/X11/xinit/xinitrc.d/* \ |
672 | ${rootlibexecdir}/systemd/* \ | 700 | ${sysconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf \ |
673 | ${rootlibdir}/systemd/libsystemd-core* \ | 701 | ${sysconfdir}/ssh/sshd_config.d/20-systemd-userdb.conf \ |
702 | ${nonarch_libdir}/systemd/* \ | ||
703 | ${libdir}/systemd/libsystemd-core* \ | ||
674 | ${libdir}/pam.d \ | 704 | ${libdir}/pam.d \ |
675 | ${nonarch_libdir}/pam.d \ | 705 | ${nonarch_libdir}/pam.d \ |
676 | ${systemd_unitdir}/* \ | 706 | ${systemd_unitdir}/* \ |
@@ -695,11 +725,10 @@ FILES:${PN} = " ${base_bindir}/* \ | |||
695 | ${exec_prefix}/lib/environment.d \ | 725 | ${exec_prefix}/lib/environment.d \ |
696 | ${exec_prefix}/lib/pcrlock.d \ | 726 | ${exec_prefix}/lib/pcrlock.d \ |
697 | ${localstatedir} \ | 727 | ${localstatedir} \ |
698 | ${rootlibexecdir}/modprobe.d/systemd.conf \ | 728 | ${nonarch_libdir}/modprobe.d/systemd.conf \ |
699 | ${rootlibexecdir}/modprobe.d/README \ | 729 | ${nonarch_libdir}/modprobe.d/README \ |
700 | ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ | 730 | ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ |
701 | ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ | 731 | ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ |
702 | ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ | ||
703 | ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ | 732 | ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ |
704 | ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ | 733 | ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ |
705 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \ | 734 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \ |
@@ -713,11 +742,11 @@ FILES:${PN} = " ${base_bindir}/* \ | |||
713 | 742 | ||
714 | FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | 743 | FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" |
715 | 744 | ||
716 | RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff" | 745 | RDEPENDS:${PN} += "kmod ${VIRTUAL-RUNTIME_dbus} util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff util-linux-mkswap" |
717 | RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" | 746 | RDEPENDS:${PN} += "systemd-serialgetty" |
718 | RDEPENDS:${PN} += "volatile-binds" | 747 | RDEPENDS:${PN} += "volatile-binds" |
719 | 748 | ||
720 | RRECOMMENDS:${PN} += "systemd-extra-utils \ | 749 | RRECOMMENDS:${PN} += "${PN}-extra-utils \ |
721 | udev-hwdb \ | 750 | udev-hwdb \ |
722 | e2fsprogs-e2fsck \ | 751 | e2fsprogs-e2fsck \ |
723 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ | 752 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ |
@@ -731,7 +760,7 @@ INSANE_SKIP:${PN}-dbg += "libdir" | |||
731 | INSANE_SKIP:${PN}-doc += " libdir" | 760 | INSANE_SKIP:${PN}-doc += " libdir" |
732 | INSANE_SKIP:libsystemd-shared += "libdir" | 761 | INSANE_SKIP:libsystemd-shared += "libdir" |
733 | 762 | ||
734 | FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so" | 763 | FILES:libsystemd-shared = "${libdir}/systemd/libsystemd-shared*.so" |
735 | 764 | ||
736 | RPROVIDES:udev = "hotplug" | 765 | RPROVIDES:udev = "hotplug" |
737 | 766 | ||
@@ -739,58 +768,58 @@ RDEPENDS:udev-bash-completion += "bash-completion" | |||
739 | RDEPENDS:udev-hwdb += "udev" | 768 | RDEPENDS:udev-hwdb += "udev" |
740 | 769 | ||
741 | FILES:udev += "${base_sbindir}/udevd \ | 770 | FILES:udev += "${base_sbindir}/udevd \ |
742 | ${rootlibexecdir}/systemd/network/99-default.link \ | 771 | ${nonarch_libdir}/systemd/network/99-default.link \ |
743 | ${rootlibexecdir}/systemd/systemd-udevd \ | 772 | ${nonarch_libdir}/systemd/systemd-udevd \ |
744 | ${rootlibexecdir}/udev/accelerometer \ | 773 | ${nonarch_libdir}/udev/accelerometer \ |
745 | ${rootlibexecdir}/udev/ata_id \ | 774 | ${nonarch_libdir}/udev/ata_id \ |
746 | ${rootlibexecdir}/udev/cdrom_id \ | 775 | ${nonarch_libdir}/udev/cdrom_id \ |
747 | ${rootlibexecdir}/udev/collect \ | 776 | ${nonarch_libdir}/udev/collect \ |
748 | ${rootlibexecdir}/udev/dmi_memory_id \ | 777 | ${nonarch_libdir}/udev/dmi_memory_id \ |
749 | ${rootlibexecdir}/udev/fido_id \ | 778 | ${nonarch_libdir}/udev/fido_id \ |
750 | ${rootlibexecdir}/udev/findkeyboards \ | 779 | ${nonarch_libdir}/udev/findkeyboards \ |
751 | ${rootlibexecdir}/udev/iocost \ | 780 | ${nonarch_libdir}/udev/iocost \ |
752 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | 781 | ${nonarch_libdir}/udev/keyboard-force-release.sh \ |
753 | ${rootlibexecdir}/udev/keymap \ | 782 | ${nonarch_libdir}/udev/keymap \ |
754 | ${rootlibexecdir}/udev/mtd_probe \ | 783 | ${nonarch_libdir}/udev/mtd_probe \ |
755 | ${rootlibexecdir}/udev/scsi_id \ | 784 | ${nonarch_libdir}/udev/scsi_id \ |
756 | ${rootlibexecdir}/udev/v4l_id \ | 785 | ${nonarch_libdir}/udev/v4l_id \ |
757 | ${rootlibexecdir}/udev/keymaps \ | 786 | ${nonarch_libdir}/udev/keymaps \ |
758 | ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \ | 787 | ${nonarch_libdir}/udev/rules.d/50-udev-default.rules \ |
759 | ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \ | 788 | ${nonarch_libdir}/udev/rules.d/60-autosuspend.rules \ |
760 | ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ | 789 | ${nonarch_libdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ |
761 | ${rootlibexecdir}/udev/rules.d/60-block.rules \ | 790 | ${nonarch_libdir}/udev/rules.d/60-block.rules \ |
762 | ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \ | 791 | ${nonarch_libdir}/udev/rules.d/60-cdrom_id.rules \ |
763 | ${rootlibexecdir}/udev/rules.d/60-dmi-id.rules \ | 792 | ${nonarch_libdir}/udev/rules.d/60-dmi-id.rules \ |
764 | ${rootlibexecdir}/udev/rules.d/60-drm.rules \ | 793 | ${nonarch_libdir}/udev/rules.d/60-drm.rules \ |
765 | ${rootlibexecdir}/udev/rules.d/60-evdev.rules \ | 794 | ${nonarch_libdir}/udev/rules.d/60-evdev.rules \ |
766 | ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \ | 795 | ${nonarch_libdir}/udev/rules.d/60-fido-id.rules \ |
767 | ${rootlibexecdir}/udev/rules.d/60-infiniband.rules \ | 796 | ${nonarch_libdir}/udev/rules.d/60-infiniband.rules \ |
768 | ${rootlibexecdir}/udev/rules.d/60-input-id.rules \ | 797 | ${nonarch_libdir}/udev/rules.d/60-input-id.rules \ |
769 | ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ | 798 | ${nonarch_libdir}/udev/rules.d/60-persistent-alsa.rules \ |
770 | ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ | 799 | ${nonarch_libdir}/udev/rules.d/60-persistent-input.rules \ |
771 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ | 800 | ${nonarch_libdir}/udev/rules.d/60-persistent-storage.rules \ |
772 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-mtd.rules \ | 801 | ${nonarch_libdir}/udev/rules.d/60-persistent-storage-mtd.rules \ |
773 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ | 802 | ${nonarch_libdir}/udev/rules.d/60-persistent-storage-tape.rules \ |
774 | ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ | 803 | ${nonarch_libdir}/udev/rules.d/60-persistent-v4l.rules \ |
775 | ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ | 804 | ${nonarch_libdir}/udev/rules.d/60-sensor.rules \ |
776 | ${rootlibexecdir}/udev/rules.d/60-serial.rules \ | 805 | ${nonarch_libdir}/udev/rules.d/60-serial.rules \ |
777 | ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ | 806 | ${nonarch_libdir}/udev/rules.d/61-autosuspend-manual.rules \ |
778 | ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ | 807 | ${nonarch_libdir}/udev/rules.d/64-btrfs.rules \ |
779 | ${rootlibexecdir}/udev/rules.d/70-camera.rules \ | 808 | ${nonarch_libdir}/udev/rules.d/70-camera.rules \ |
780 | ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ | 809 | ${nonarch_libdir}/udev/rules.d/70-joystick.rules \ |
781 | ${rootlibexecdir}/udev/rules.d/70-memory.rules \ | 810 | ${nonarch_libdir}/udev/rules.d/70-memory.rules \ |
782 | ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ | 811 | ${nonarch_libdir}/udev/rules.d/70-mouse.rules \ |
783 | ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ | 812 | ${nonarch_libdir}/udev/rules.d/70-power-switch.rules \ |
784 | ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ | 813 | ${nonarch_libdir}/udev/rules.d/70-touchpad.rules \ |
785 | ${rootlibexecdir}/udev/rules.d/75-net-description.rules \ | 814 | ${nonarch_libdir}/udev/rules.d/75-net-description.rules \ |
786 | ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \ | 815 | ${nonarch_libdir}/udev/rules.d/75-probe_mtd.rules \ |
787 | ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \ | 816 | ${nonarch_libdir}/udev/rules.d/78-sound-card.rules \ |
788 | ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ | 817 | ${nonarch_libdir}/udev/rules.d/80-drivers.rules \ |
789 | ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ | 818 | ${nonarch_libdir}/udev/rules.d/80-net-setup-link.rules \ |
790 | ${rootlibexecdir}/udev/rules.d/81-net-dhcp.rules \ | 819 | ${nonarch_libdir}/udev/rules.d/81-net-dhcp.rules \ |
791 | ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ | 820 | ${nonarch_libdir}/udev/rules.d/90-vconsole.rules \ |
792 | ${rootlibexecdir}/udev/rules.d/90-iocost.rules \ | 821 | ${nonarch_libdir}/udev/rules.d/90-iocost.rules \ |
793 | ${rootlibexecdir}/udev/rules.d/README \ | 822 | ${nonarch_libdir}/udev/rules.d/README \ |
794 | ${sysconfdir}/udev \ | 823 | ${sysconfdir}/udev \ |
795 | ${sysconfdir}/init.d/systemd-udevd \ | 824 | ${sysconfdir}/init.d/systemd-udevd \ |
796 | ${systemd_system_unitdir}/*udev* \ | 825 | ${systemd_system_unitdir}/*udev* \ |
@@ -802,7 +831,7 @@ FILES:udev += "${base_sbindir}/udevd \ | |||
802 | " | 831 | " |
803 | 832 | ||
804 | FILES:udev-bash-completion = "${datadir}/bash-completion/completions/udevadm" | 833 | FILES:udev-bash-completion = "${datadir}/bash-completion/completions/udevadm" |
805 | FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ | 834 | FILES:udev-hwdb = "${nonarch_libdir}/udev/hwdb.d \ |
806 | " | 835 | " |
807 | 836 | ||
808 | RCONFLICTS:${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" | 837 | RCONFLICTS:${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" |
@@ -831,7 +860,9 @@ python do_warn_musl() { | |||
831 | } | 860 | } |
832 | addtask warn_musl before do_configure | 861 | addtask warn_musl before do_configure |
833 | 862 | ||
834 | ALTERNATIVE:${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" | 863 | ALTERNATIVE:${PN} = "halt reboot shutdown poweroff \ |
864 | ${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'runlevel', '', d)} \ | ||
865 | ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" | ||
835 | 866 | ||
836 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" | 867 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" |
837 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" | 868 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" |
@@ -857,6 +888,12 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | |||
857 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | 888 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" |
858 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | 889 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" |
859 | 890 | ||
891 | pkg_postinst:${PN}:append () { | ||
892 | if ${@bb.utils.contains('PACKAGECONFIG', 'set-time-epoch', 'true', 'false', d)}; then | ||
893 | touch $D${nonarch_libdir}/clock-epoch | ||
894 | fi | ||
895 | } | ||
896 | |||
860 | pkg_postinst:${PN}:libc-glibc () { | 897 | pkg_postinst:${PN}:libc-glibc () { |
861 | if ${@bb.utils.contains('PACKAGECONFIG', 'myhostname', 'true', 'false', d)}; then | 898 | if ${@bb.utils.contains('PACKAGECONFIG', 'myhostname', 'true', 'false', d)}; then |
862 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | 899 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ |
@@ -885,15 +922,19 @@ pkg_prerm:${PN}:libc-glibc () { | |||
885 | fi | 922 | fi |
886 | } | 923 | } |
887 | 924 | ||
888 | PACKAGE_WRITE_DEPS += "qemu-native" | 925 | PACKAGE_WRITE_DEPS += "qemuwrapper-cross" |
926 | |||
889 | pkg_postinst:udev-hwdb () { | 927 | pkg_postinst:udev-hwdb () { |
890 | if test -n "$D"; then | 928 | if test -n "$D"; then |
891 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" base_bindir="${base_bindir}" | 929 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} \ |
930 | rootlibexecdir="${nonarch_libdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" base_bindir="${base_bindir}" | ||
892 | else | 931 | else |
893 | udevadm hwdb --update | 932 | systemd-hwdb update |
894 | fi | 933 | fi |
895 | } | 934 | } |
896 | 935 | ||
897 | pkg_prerm:udev-hwdb () { | 936 | pkg_prerm:udev-hwdb () { |
898 | rm -f $D${sysconfdir}/udev/hwdb.bin | 937 | rm -f $D${sysconfdir}/udev/hwdb.bin |
899 | } | 938 | } |
939 | |||
940 | require dlopen-deps.inc | ||