Commit 010981d3 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded systemd to 248

parent d54b9796
target all: LC_ALL=$(SYSTEM_LOCALE)
all: systemd-user-sessions network-config
tar xf systemd-245.tar.gz
patch -Np1 -d systemd-245 < systemd-245-return_the_correct_wd_from_inotify_helpers.patch
patch -Np1 -d systemd-245 < systemd-245-gcc_10-fixes-2.patch
patch -Np1 -d systemd-245 < systemd-245-fix_timesyncd.patch
patch -Np1 -d systemd-245 < systemd-245-fix_test-execute_with_new_libcap.patch
patch -Np1 -d systemd-245 < systemd-245-fix_test-udev.patch
patch -Np1 -d systemd-245 < systemd-245-increase_test_timeouts.patch
tar xf systemd-248.tar.gz
patch -Np1 -d systemd-248 < systemd-248-fix_rfkill.patch
patch -Np1 -d systemd-248 < systemd-248-fix_timesyncd.patch
patch -Np1 -d systemd-248 < systemd-248-fix_test-udev.patch
patch -Np1 -d systemd-248 < systemd-248-fix_test-path-util.patch
patch -Np1 -d systemd-248 < systemd-248-increase_test_timeouts.patch
ln -s /tools/bin/true /usr/bin/xsltproc
cd systemd-245 && tar xf ../systemd-man-pages-245.tar.xz
cd systemd-245 && sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in
cd systemd-245 && mkdir -p build
cd systemd-245/build && meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no -Dhomed=false -Duserdb=false -Dman=true ..
cd systemd-245/build && ninja
cd systemd-245/build && ninja install
cd systemd-248 && sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in
cd systemd-248 && mkdir -p build
cd systemd-248/build && meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dblkid=true -Dbuildtype=release -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dkmod-path=/bin/kmod -Dldconfig=false -Dmount-path=/bin/mount -Drootprefix= -Drootlibdir=/lib -Dsplit-usr=true -Dsulogin-path=/sbin/sulogin -Dsysusers=false -Dumount-path=/bin/umount -Db_lto=false -Drpmmacrosdir=no -Dhomed=false -Duserdb=false -Dman=false ..
cd systemd-248/build && ninja
cd systemd-248/build && ninja install
cd systemd-248 && tar xf ../systemd-man-pages-248.tar.xz --strip-components=1 -C /usr/share/man
rm -rf /usr/lib/pam.d
rm -rfv /usr/lib/rpm
for tool in runlevel reboot shutdown poweroff halt telinit; do \
ln -sfv /bin/systemctl /sbin/$$tool ; \
......@@ -30,15 +30,11 @@ all: systemd-user-sessions network-config
tests:
if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
cd systemd-245/build ; \
cd systemd-248/build ; \
ninja test ; \
fi
$(MAKE) -C .. success
rm -rf /var/lib/private/quux
rm -rf /var/lib/private/waldo
rm -rf /var/lib/quux
rm -rf /var/lib/waldo
rm -rf system-245
rm -rf system-248
systemd-user-sessions:
define SYSTEMD_USER_SESSIONS
......
From e9cdcbed77971da3cb0b98b3eb91081142c91eb7 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Mon, 9 Mar 2020 11:00:58 +0100
Subject: [PATCH] test: ignore IAB capabilities in `test-execute`
libcap v2.33 introduces a new capability set called IAB[0] which is shown
in the output of `capsh --print` and interferes with the test checks. Let's
drop the IAB set from the output, for now, to mitigate this.
This could be (and probably should be) replaced in the future by the
newly introduced testing options[1][2] in libcap v2.32, namely:
--has-p=xxx
--has-i=xxx
--has-a=xxx
but this needs to wait until the respective libcap version gets a wider
adoption. Until then, let's stick with the relatively ugly sed.
Fixes: #15046
[0] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=943b011b5e53624eb9cab4e96c1985326e077cdd
[1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=588d0439cb6495b03f0ab9f213f0b6b339e7d4b7
[2] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=e7709bbc1c4712f2ddfc6e6f42892928a8a03782
---
test/test-execute/exec-capabilityboundingset-invert.service | 4 ++--
.../exec-privatedevices-no-capability-mknod.service | 4 ++--
.../exec-privatedevices-no-capability-sys-rawio.service | 4 ++--
.../exec-privatedevices-yes-capability-mknod.service | 4 ++--
.../exec-privatedevices-yes-capability-sys-rawio.service | 4 ++--
.../exec-protectkernellogs-no-capabilities.service | 4 ++--
.../exec-protectkernellogs-yes-capabilities.service | 4 ++--
.../exec-protectkernelmodules-no-capabilities.service | 4 ++--
.../exec-protectkernelmodules-yes-capabilities.service | 4 ++--
9 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/test/test-execute/exec-capabilityboundingset-invert.service b/test/test-execute/exec-capabilityboundingset-invert.service
index 5f374276034d..4486f6c25d87 100644
--- a/test/test-execute/exec-capabilityboundingset-invert.service
+++ b/test/test-execute/exec-capabilityboundingset-invert.service
@@ -2,7 +2,7 @@
Description=Test for CapabilityBoundingSet
[Service]
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep "^Bounding set .*cap_chown"'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep "^Bounding set .*cap_chown"'
Type=oneshot
CapabilityBoundingSet=~CAP_CHOWN
diff --git a/test/test-execute/exec-privatedevices-no-capability-mknod.service b/test/test-execute/exec-privatedevices-no-capability-mknod.service
index 4d61d9ffaa9b..8f135be0b5e9 100644
--- a/test/test-execute/exec-privatedevices-no-capability-mknod.service
+++ b/test/test-execute/exec-privatedevices-no-capability-mknod.service
@@ -3,6 +3,6 @@ Description=Test CAP_MKNOD capability for PrivateDevices=no
[Service]
PrivateDevices=no
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c 'capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_mknod'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
Type=oneshot
diff --git a/test/test-execute/exec-privatedevices-no-capability-sys-rawio.service b/test/test-execute/exec-privatedevices-no-capability-sys-rawio.service
index f7f7a16736d9..30ce5492546f 100644
--- a/test/test-execute/exec-privatedevices-no-capability-sys-rawio.service
+++ b/test/test-execute/exec-privatedevices-no-capability-sys-rawio.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYS_RAWIO capability for PrivateDevices=no
[Service]
PrivateDevices=no
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c 'capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_sys_rawio'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
Type=oneshot
diff --git a/test/test-execute/exec-privatedevices-yes-capability-mknod.service b/test/test-execute/exec-privatedevices-yes-capability-mknod.service
index 5bcace08455b..b98cfb5c7eac 100644
--- a/test/test-execute/exec-privatedevices-yes-capability-mknod.service
+++ b/test/test-execute/exec-privatedevices-yes-capability-mknod.service
@@ -3,6 +3,6 @@ Description=Test CAP_MKNOD capability for PrivateDevices=yes
[Service]
PrivateDevices=yes
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_mknod'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
Type=oneshot
diff --git a/test/test-execute/exec-privatedevices-yes-capability-sys-rawio.service b/test/test-execute/exec-privatedevices-yes-capability-sys-rawio.service
index a246f950c116..5b0c0700f2c8 100644
--- a/test/test-execute/exec-privatedevices-yes-capability-sys-rawio.service
+++ b/test/test-execute/exec-privatedevices-yes-capability-sys-rawio.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYS_RAWIO capability for PrivateDevices=yes
[Service]
PrivateDevices=yes
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_sys_rawio'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
Type=oneshot
diff --git a/test/test-execute/exec-protectkernellogs-no-capabilities.service b/test/test-execute/exec-protectkernellogs-no-capabilities.service
index 47d88534a9b8..36aae7caf1a4 100644
--- a/test/test-execute/exec-protectkernellogs-no-capabilities.service
+++ b/test/test-execute/exec-protectkernellogs-no-capabilities.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYSLOG for ProtectKernelLogs=no
[Service]
ProtectKernelLogs=no
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c 'capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_syslog'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
Type=oneshot
diff --git a/test/test-execute/exec-protectkernellogs-yes-capabilities.service b/test/test-execute/exec-protectkernellogs-yes-capabilities.service
index 11350f288a57..4a5f1a08e902 100644
--- a/test/test-execute/exec-protectkernellogs-yes-capabilities.service
+++ b/test/test-execute/exec-protectkernellogs-yes-capabilities.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYSLOG for ProtectKernelLogs=yes
[Service]
ProtectKernelLogs=yes
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_syslog'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
Type=oneshot
diff --git a/test/test-execute/exec-protectkernelmodules-no-capabilities.service b/test/test-execute/exec-protectkernelmodules-no-capabilities.service
index 8d7e2b52d444..1b73656305e4 100644
--- a/test/test-execute/exec-protectkernelmodules-no-capabilities.service
+++ b/test/test-execute/exec-protectkernelmodules-no-capabilities.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYS_MODULE ProtectKernelModules=no
[Service]
ProtectKernelModules=no
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c 'capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_sys_module'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
Type=oneshot
diff --git a/test/test-execute/exec-protectkernelmodules-yes-capabilities.service b/test/test-execute/exec-protectkernelmodules-yes-capabilities.service
index fe2ae208dd20..e43e72733c93 100644
--- a/test/test-execute/exec-protectkernelmodules-yes-capabilities.service
+++ b/test/test-execute/exec-protectkernelmodules-yes-capabilities.service
@@ -3,6 +3,6 @@ Description=Test CAP_SYS_MODULE for ProtectKernelModules=yes
[Service]
ProtectKernelModules=yes
-# sed: remove dropped capabilities (cap_xxx-[epi]) from the output
-ExecStart=/bin/sh -x -c '! capsh --print | sed -r "s/[^ ]+?\-[epi]+//g" | grep cap_sys_module'
+# sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
+ExecStart=/bin/sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
Type=oneshot
diff -uNr systemd-245/units/systemd-timesyncd.service.in systemd-245-fix_timesyncd/units/systemd-timesyncd.service.in
--- systemd-245/units/systemd-timesyncd.service.in 2020-03-06 23:08:52.000000000 +1030
+++ systemd-245-fix_timesyncd/units/systemd-timesyncd.service.in 2022-02-02 19:18:56.587448597 +1030
@@ -13,7 +13,7 @@
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
-After=systemd-remount-fs.service systemd-sysusers.service
+After=systemd-remount-fs.service systemd-sysusers.service systemd-networkd-wait-online.service
Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-set.target time-sync.target
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
Date: 2020-06-03
Updated Date: 2020-06-22
Initial Package Version: 245
Origin: Upstream
Upstream Status: Applied
Description: Fixes the build of systemd to work with gcc-10.
Also fixes a segfault in bringing up systemd-udevd on
i686 (might apply to ARM too).
diff -Naurp systemd-245.orig/meson.build systemd-245/meson.build
--- systemd-245.orig/meson.build 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/meson.build 2020-06-22 15:03:52.429129206 -0500
@@ -423,6 +423,9 @@ add_project_arguments(cc.get_supported_a
add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
+have = cc.has_argument('-Wzero-length-bounds')
+conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have)
+
if cc.compiles('''
#include <time.h>
#include <inttypes.h>
diff -Naurp systemd-245.orig/src/core/path.c systemd-245/src/core/path.c
--- systemd-245.orig/src/core/path.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/core/path.c 2020-06-22 15:03:52.429129206 -0500
@@ -223,11 +223,10 @@ static void path_spec_mkdir(PathSpec *s,
}
static void path_spec_dump(PathSpec *s, FILE *f, const char *prefix) {
- fprintf(f,
- "%s%s: %s\n",
- prefix,
- path_type_to_string(s->type),
- s->path);
+ const char *type;
+
+ assert_se(type = path_type_to_string(s->type));
+ fprintf(f, "%s%s: %s\n", prefix, type, s->path);
}
void path_spec_done(PathSpec *s) {
@@ -607,14 +606,16 @@ static int path_serialize(Unit *u, FILE
(void) serialize_item(f, "result", path_result_to_string(p->result));
LIST_FOREACH(spec, s, p->specs) {
+ const char *type;
_cleanup_free_ char *escaped = NULL;
escaped = cescape(s->path);
if (!escaped)
return log_oom();
+ assert_se(type = path_type_to_string(s->type));
(void) serialize_item_format(f, "path-spec", "%s %i %s",
- path_type_to_string(s->type),
+ type,
s->previous_exists,
s->path);
}
diff -Naurp systemd-245.orig/src/shared/ethtool-util.c systemd-245/src/shared/ethtool-util.c
--- systemd-245.orig/src/shared/ethtool-util.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/shared/ethtool-util.c 2020-06-22 15:03:52.429129206 -0500
@@ -256,8 +256,13 @@ int ethtool_get_permanent_macaddr(int *e
if (epaddr.addr.size != 6)
return -EOPNOTSUPP;
+#pragma GCC diagnostic push
+#if HAVE_ZERO_LENGTH_BOUNDS
+#pragma GCC diagnostic ignored "-Wzero-length-bounds"
+#endif
for (size_t i = 0; i < epaddr.addr.size; i++)
ret->ether_addr_octet[i] = epaddr.addr.data[i];
+#pragma GCC diagnostic pop
return 0;
}
@@ -479,7 +484,12 @@ static int get_stringset(int ethtool_fd,
if (!buffer.info.sset_mask)
return -EINVAL;
+#pragma GCC diagnostic push
+#if HAVE_ZERO_LENGTH_BOUNDS
+#pragma GCC diagnostic ignored "-Wzero-length-bounds"
+#endif
len = buffer.info.data[0];
+#pragma GCC diagnostic pop
strings = malloc0(sizeof(struct ethtool_gstrings) + len * ETH_GSTRING_LEN);
if (!strings)
diff -Naurp systemd-245.orig/src/udev/net/link-config.c systemd-245/src/udev/net/link-config.c
--- systemd-245.orig/src/udev/net/link-config.c 2020-03-06 06:38:52.000000000 -0600
+++ systemd-245/src/udev/net/link-config.c 2020-06-22 15:04:13.951128446 -0500
@@ -490,7 +490,7 @@ int link_config_apply(link_config_ctx *c
if (config->alternative_names_policy)
for (NamePolicy *p = config->alternative_names_policy; *p != _NAMEPOLICY_INVALID; p++) {
- const char *n;
+ const char *n = NULL;
switch (*p) {
case NAMEPOLICY_DATABASE:
From f6f4f5fe5395a57f10dd446c7266c53f0673eaac Mon Sep 17 00:00:00 2001
From: Balaji Punnuru <balaji_punnuru@cable.comcast.com>
Date: Thu, 9 Apr 2020 12:21:49 -0400
Subject: [PATCH] util: return the correct correct wd from inotify helpers
We need to propagate the acquired watch descriptors because our callers
are counting on them.
[Lennart: this is split out of #15381 and simplified]
---
src/basic/fs-util.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index 558cafbcaf53..ef3b5a51842f 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -692,28 +692,30 @@ int unlink_or_warn(const char *filename) {
int inotify_add_watch_fd(int fd, int what, uint32_t mask) {
char path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1];
- int r;
+ int wd;
/* This is like inotify_add_watch(), except that the file to watch is not referenced by a path, but by an fd */
xsprintf(path, "/proc/self/fd/%i", what);
- r = inotify_add_watch(fd, path, mask);
- if (r < 0)
+ wd = inotify_add_watch(fd, path, mask);
+ if (wd < 0)
return -errno;
- return r;
+ return wd;
}
int inotify_add_watch_and_warn(int fd, const char *pathname, uint32_t mask) {
+ int wd;
- if (inotify_add_watch(fd, pathname, mask) < 0) {
+ wd = inotify_add_watch(fd, pathname, mask);
+ if (wd < 0) {
if (errno == ENOSPC)
return log_error_errno(errno, "Failed to add a watch for %s: inotify watch limit reached", pathname);
return log_error_errno(errno, "Failed to add a watch for %s: %m", pathname);
}
- return 0;
+ return wd;
}
static bool unsafe_transition(const struct stat *a, const struct stat *b) {
From ab1aa6368a883bce88e3162fee2bea14aacedf23 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Tue, 13 Apr 2021 13:17:53 +0100
Subject: [PATCH] rfkill: add some casts to silence -Werror=sign-compare
---
src/rfkill/rfkill.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c
index e2d1a1be5fae..bff1a2886be3 100644
--- a/src/rfkill/rfkill.c
+++ b/src/rfkill/rfkill.c
@@ -177,7 +177,7 @@ static int load_state(Context *c, const struct rfkill_event *event) {
ssize_t l = write(c->rfkill_fd, &we, sizeof we);
if (l < 0)
return log_error_errno(errno, "Failed to restore rfkill state for %i: %m", event->idx);
- if (l < RFKILL_EVENT_SIZE_V1)
+ if ((size_t)l < RFKILL_EVENT_SIZE_V1) /* l cannot be < 0 here. Cast to fix -Werror=sign-compare */
return log_error_errno(SYNTHETIC_ERRNO(EIO),
"Couldn't write rfkill event structure, too short (wrote %zd of %zu bytes).",
l, sizeof we);
@@ -335,9 +335,9 @@ static int run(int argc, char *argv[]) {
break;
}
- if (l < RFKILL_EVENT_SIZE_V1)
- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)",
- l, RFKILL_EVENT_SIZE_V1);
+ if ((size_t)l < RFKILL_EVENT_SIZE_V1) /* l cannot be < 0 here. Cast to fix -Werror=sign-compare */
+ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %zu)",
+ l, (size_t) RFKILL_EVENT_SIZE_V1); /* Casting necessary to make compiling with different kernel versions happy */
log_debug("Reading struct rfkill_event: got %zd bytes.", l);
/* The event structure has more fields. We only care about the first few, so it's OK if we
diff -uNr systemd-248/man/systemd-run.xml systemd-248-fix_test-path-util/man/systemd-run.xml
--- systemd-248/man/systemd-run.xml 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-fix_test-path-util/man/systemd-run.xml 2022-11-06 21:13:00.722281179 +1030
@@ -458,18 +458,18 @@
<para>The following command will touch a file after 30 seconds.</para>
- <programlisting># date; systemd-run --on-active=30 --timer-property=AccuracySec=100ms /bin/touch /tmp/foo
+ <programlisting># date; systemd-run --on-active=30 --timer-property=AccuracySec=100ms /usr/bin/touch /tmp/foo
Mon Dec 8 20:44:24 KST 2014
Running as unit: run-71.timer
Will run service as unit: run-71.service
# journalctl -b -u run-71.timer
-- Journal begins at Fri 2014-12-05 19:09:21 KST, ends at Mon 2014-12-08 20:44:54 KST. --
-Dec 08 20:44:38 container systemd[1]: Starting /bin/touch /tmp/foo.
-Dec 08 20:44:38 container systemd[1]: Started /bin/touch /tmp/foo.
+Dec 08 20:44:38 container systemd[1]: Starting /usr/bin/touch /tmp/foo.
+Dec 08 20:44:38 container systemd[1]: Started /usr/bin/touch /tmp/foo.
# journalctl -b -u run-71.service
-- Journal begins at Fri 2014-12-05 19:09:21 KST, ends at Mon 2014-12-08 20:44:54 KST. --
-Dec 08 20:44:48 container systemd[1]: Starting /bin/touch /tmp/foo...
-Dec 08 20:44:48 container systemd[1]: Started /bin/touch /tmp/foo.</programlisting>
+Dec 08 20:44:48 container systemd[1]: Starting /usr/bin/touch /tmp/foo...
+Dec 08 20:44:48 container systemd[1]: Started /usr/bin/touch /tmp/foo.</programlisting>
</example>
<example>
diff -uNr systemd-248/src/test/test-path-util.c systemd-248-fix_test-path-util/src/test/test-path-util.c
--- systemd-248/src/test/test-path-util.c 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-fix_test-path-util/src/test/test-path-util.c 2022-11-06 21:12:06.435113029 +1030
@@ -217,8 +217,8 @@
assert_se(path_is_absolute(p));
free(p);
- assert_se(find_executable("/bin/touch", &p) == 0);
- assert_se(streq(p, "/bin/touch"));
+ assert_se(find_executable("/usr/bin/touch", &p) == 0);
+ assert_se(streq(p, "/usr/bin/touch"));
free(p);
assert_se(find_executable("touch", &p) == 0);
@@ -261,7 +261,7 @@
log_info("/* %s */", __func__);
test_find_executable_exec_one("touch");
- test_find_executable_exec_one("/bin/touch");
+ test_find_executable_exec_one("/usr/bin/touch");
_cleanup_free_ char *script = NULL;
assert_se(get_testdata_dir("test-path-util/script.sh", &script) >= 0);
diff -uNr systemd-248/test/units/testsuite-42.sh systemd-248-fix_test-path-util/test/units/testsuite-42.sh
--- systemd-248/test/units/testsuite-42.sh 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-fix_test-path-util/test/units/testsuite-42.sh 2022-11-06 21:13:33.431382493 +1030
@@ -3,16 +3,16 @@
systemd-analyze log-level debug
-systemd-run --unit=simple1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=simple -p ExecStopPost='/bin/touch /run/simple1' true
+systemd-run --unit=simple1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=simple -p ExecStopPost='/usr/bin/touch /run/simple1' true
test -f /run/simple1
-! systemd-run --unit=simple2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=simple -p ExecStopPost='/bin/touch /run/simple2' false
+! systemd-run --unit=simple2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=simple -p ExecStopPost='/usr/bin/touch /run/simple2' false
test -f /run/simple2
-systemd-run --unit=exec1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=exec -p ExecStopPost='/bin/touch /run/exec1' sleep 1
+systemd-run --unit=exec1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=exec -p ExecStopPost='/usr/bin/touch /run/exec1' sleep 1
test -f /run/exec1
-! systemd-run --unit=exec2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=exec -p ExecStopPost='/bin/touch /run/exec2' sh -c 'sleep 1; false'
+! systemd-run --unit=exec2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=exec -p ExecStopPost='/usr/bin/touch /run/exec2' sh -c 'sleep 1; false'
test -f /run/exec2
cat > /tmp/forking1.sh <<EOF
@@ -28,7 +28,7 @@
EOF
chmod +x /tmp/forking1.sh
-systemd-run --unit=forking1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=forking -p NotifyAccess=exec -p ExecStopPost='/bin/touch /run/forking1' /tmp/forking1.sh
+systemd-run --unit=forking1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=forking -p NotifyAccess=exec -p ExecStopPost='/usr/bin/touch /run/forking1' /tmp/forking1.sh
test -f /run/forking1
cat > /tmp/forking2.sh <<EOF
@@ -44,21 +44,21 @@
EOF
chmod +x /tmp/forking2.sh
-! systemd-run --unit=forking2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=forking -p NotifyAccess=exec -p ExecStopPost='/bin/touch /run/forking2' /tmp/forking2.sh
+! systemd-run --unit=forking2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=forking -p NotifyAccess=exec -p ExecStopPost='/usr/bin/touch /run/forking2' /tmp/forking2.sh
test -f /run/forking2
-systemd-run --unit=oneshot1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=oneshot -p ExecStopPost='/bin/touch /run/oneshot1' true
+systemd-run --unit=oneshot1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=oneshot -p ExecStopPost='/usr/bin/touch /run/oneshot1' true
test -f /run/oneshot1
-! systemd-run --unit=oneshot2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=oneshot -p ExecStopPost='/bin/touch /run/oneshot2' false
+! systemd-run --unit=oneshot2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=oneshot -p ExecStopPost='/usr/bin/touch /run/oneshot2' false
test -f /run/oneshot2
-systemd-run --unit=dbus1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/bin/touch /run/dbus1' \
+systemd-run --unit=dbus1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/usr/bin/touch /run/dbus1' \
busctl call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus RequestName su systemd.test.ExecStopPost 4 \
|| :
test -f /run/dbus1
-! systemd-run --unit=dbus2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/bin/touch /run/dbus2' true
+! systemd-run --unit=dbus2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=dbus -p BusName=systemd.test.ExecStopPost -p ExecStopPost='/usr/bin/touch /run/dbus2' true
test -f /run/dbus2
cat > /tmp/notify1.sh <<EOF
@@ -70,16 +70,16 @@
EOF
chmod +x /tmp/notify1.sh
-systemd-run --unit=notify1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=notify -p ExecStopPost='/bin/touch /run/notify1' /tmp/notify1.sh
+systemd-run --unit=notify1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=notify -p ExecStopPost='/usr/bin/touch /run/notify1' /tmp/notify1.sh
test -f /run/notify1
-! systemd-run --unit=notify2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=notify -p ExecStopPost='/bin/touch /run/notify2' true
+! systemd-run --unit=notify2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=notify -p ExecStopPost='/usr/bin/touch /run/notify2' true
test -f /run/notify2
-systemd-run --unit=idle1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=idle -p ExecStopPost='/bin/touch /run/idle1' true
+systemd-run --unit=idle1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=idle -p ExecStopPost='/usr/bin/touch /run/idle1' true
test -f /run/idle1
-! systemd-run --unit=idle2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=idle -p ExecStopPost='/bin/touch /run/idle2' false
+! systemd-run --unit=idle2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=idle -p ExecStopPost='/usr/bin/touch /run/idle2' false
test -f /run/idle2
systemd-analyze log-level info
diff -uNr systemd-245/test/udev-test.pl systemd-245-fix_test-udev/test/udev-test.pl
--- systemd-245/test/udev-test.pl 2020-03-06 23:08:52.000000000 +1030
+++ systemd-245-fix_test-udev/test/udev-test.pl 2022-04-11 09:52:21.302283539 +0930
@@ -998,7 +998,7 @@
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_name => "node",
diff -uNr --no-dereference systemd-248/test/udev-test.pl systemd-248-fix_test-udev/test/udev-test.pl
--- systemd-248/test/udev-test.pl 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-fix_test-udev/test/udev-test.pl 2022-10-16 13:33:01.570619577 +1030
@@ -1374,7 +1374,7 @@
exp_links => ["node"],
}],
rules => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/usr/bin/test -b %N" SYMLINK+="node"
+SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/bin/test -b %N" SYMLINK+="node"
......
diff -uNr --no-dereference systemd-248/units/systemd-timesyncd.service.in systemd-248-fix_timesyncd/units/systemd-timesyncd.service.in
--- systemd-248/units/systemd-timesyncd.service.in 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-fix_timesyncd/units/systemd-timesyncd.service.in 2022-10-16 13:36:36.384245496 +1030
@@ -13,7 +13,7 @@
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
-After=systemd-sysusers.service
+After=systemd-sysusers.service systemd-networkd-wait-online.service
Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
Wants=time-set.target
diff -uNr systemd-245/test/meson.build systemd-245-increase_test_timeouts/test/meson.build
--- systemd-245/test/meson.build 2020-03-06 23:08:52.000000000 +1030
+++ systemd-245-increase_test_timeouts/test/meson.build 2022-05-03 12:55:21.669973151 +0930
@@ -274,7 +274,7 @@
diff -uNr --no-dereference systemd-248/test/meson.build systemd-248-increase_test_timeouts/test/meson.build
--- systemd-248/test/meson.build 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-increase_test_timeouts/test/meson.build 2022-10-16 13:37:52.629467658 +1030
@@ -120,7 +120,7 @@
if want_tests != 'false'
test('udev-test',
udev_test_pl,
......@@ -10,7 +10,7 @@ diff -uNr systemd-245/test/meson.build systemd-245-increase_test_timeouts/test/m
endif
else
message('Skipping udev-test because perl is not available')
@@ -285,7 +285,7 @@
@@ -133,7 +133,7 @@
if want_tests != 'false'
test('hwdb-test',
hwdb_test_sh,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment