Compare commits

..

28 Commits
master ... f33

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 1bcc94fae9 Version 246.15 2021-07-20 18:41:32 +02:00
Zbigniew Jędrzejewski-Szmek 823c295af0 Version 246.14 2021-05-15 22:28:21 +02:00
Zbigniew Jędrzejewski-Szmek f5c76bb664 Make sure not to lose systemd-networkd enablement when upgrading from F32 2021-05-15 21:34:00 +02:00
Zbigniew Jędrzejewski-Szmek 2299ee202a Version 246.13 2021-03-24 12:05:22 +01:00
Zbigniew Jędrzejewski-Szmek 6aa7553053 Add forgotten entry in changelog 2021-03-24 08:51:01 +01:00
Zbigniew Jędrzejewski-Szmek 90382542b5 Version 246.12 2021-03-23 10:19:26 +01:00
Zbigniew Jędrzejewski-Szmek e6a21d2052 Upload sources 2021-03-12 19:46:39 +01:00
Zbigniew Jędrzejewski-Szmek c546bbbc2d Version 246.11 2021-03-12 18:42:39 +01:00
Zbigniew Jędrzejewski-Szmek 30c6162c54 Version 246.10 2021-02-02 18:37:21 +01:00
Owen W. Taylor 779685bf4b Fix nss-resolve to properly fallback in a Flatpak sandbox
For unknown reasons, sd-bus has trouble connecting to the filtered
D-Bus system proxy exported by Flatpak and the connection to the
bus is closed during authentication. Don't mistake this for a remote
error - that was causing a hard failure rather than a fallback.
2021-01-05 00:24:40 -05:00
Zbigniew Jędrzejewski-Szmek b24ba6cad7 Fix bfq patch again
https://bugzilla.redhat.com/show_bug.cgi?id=1813219#c3
2021-01-02 15:10:58 +01:00
Zbigniew Jędrzejewski-Szmek b0eed6b094 Version 246.8 2020-12-16 16:30:12 +01:00
Zbigniew Jędrzejewski-Szmek 8d0eb549df Revert the fallback hostname revert
Sadly, this does not work.

It seems NM queries resolved for the local IP address and gets "linux"
and sets that as the transient hostname. Resolved has a "fallback hostname"
(that will now again be "fedora"), but it also has a fallback fallback hostname
that is "linux" that it used in reverse dns queries and such. NM gets
the "linux" name and tells hostnamed to use that as the transient hostname.
I don't think this is an improvement, since "linux" is a problematic
as "fedora". So let's revert this for now to avoid pointless churn,
until we figure out a real solution.
2020-12-08 20:13:08 +01:00
Zbigniew Jędrzejewski-Szmek 0734f6bacd Restore "localhost" as the fallback hostname 2020-12-08 18:54:58 +01:00
Zbigniew Jędrzejewski-Szmek 0c781e3fb3 Version 246.7 2020-12-08 18:47:55 +01:00
Zbigniew Jędrzejewski-Szmek bb07b579b9 Move container networkd config to -networkd subpackage
-container subpackage is for container *management*. Those files are
used *in* the container.

(cherry picked from commit 9bf9a317b6)
2020-12-08 18:30:19 +01:00
Zbigniew Jędrzejewski-Szmek 22dd111420 Pull in perl for tests
(cherry picked from commit 39bdda8d19)
2020-12-08 18:30:05 +01:00
Zbigniew Jędrzejewski-Szmek 0e4b90f113 Stop creating resolv.conf symlink in more circumstances
(cherry picked from commit 5bf2aac8b4)
2020-12-08 18:29:58 +01:00
Zbigniew Jędrzejewski-Szmek ede219f77b Use normal scriptlets for systemd-networkd
(cherry picked from commit b6a8363c43)
2020-12-08 18:29:24 +01:00
Robert Scheck 3dbcab83bf Harmonize networkd description/summary with other sub-packages
(cherry picked from commit 5acb5c4c08)
2020-12-08 18:29:14 +01:00
Zbigniew Jędrzejewski-Szmek 12233f3769 Do not touch resolv.conf if it is a mountpoint
https://bugzilla.redhat.com/show_bug.cgi?id=1885101
(cherry picked from commit 96b7895b99)
2020-12-08 18:29:08 +01:00
Zbigniew Jędrzejewski-Szmek ed795fb1fc resolve: remove the fallback dns server list
DNS questions (which necessarilly include IP addresses) are personally
indentifying information in the sense of GDPR
(https://gdpr.eu/eu-gdpr-personal-data/ explicitly lists IP address as
PII). Sending those packets to Google or Cloudflare is "forwarding"
this PII to them. GDPR says that information which is not enough to
identify individuals still needs to be protected because it may be
combined with other information or processed with improved technology
later. So even though the information in DNS alone it not very big, it
may be interpreted as protected information in various scenarios.

When Fedora is installed by an end-user, they must have the reasonable
expectation that Fedora will contant Fedora servers for updates and
status checks and such. But the case of DNS packets is different,
because the dns servers are not under our control. While most of the
time the information leak through DNS is negligible, we can't rule out
scenarios where it could be considered more important.

Another thing to consider is that ISP and other local internet access
mechanisms are probably worse overall for privacy compared to google and
cloudflare dns servers. Nevertheless, they are more obvious to users and
fit better in the regulatory framework, because there are local laws
that govern them and implicitic or explicit agreements for their use.
Whereas US-based servers are foreign and are covered by different rules.

The fallback DNS servers don't matter most of the time because
NetworkManager will include the servers from a DHCP lease. So
hopefully users will not see any effect from the change done in this
patch. Right now I think it is better to avoid the legal and privacy
risk. If it turns out this change causes noticable problems, we might
want to reconsider. In particular we could use the fallback servers
only in containers and such which are not "personal" machines and there
is no particular person attached to them.

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3C4KESHIMZDB6XCFO4EOBEDV4Q2AVVQ5/

I think we could provide a default dns server list more reasonably if
there was some kind of privacy policy published by Fedora and users
could at least learn about those defaults. Sadly, we don't have any
relevant privacy policy (https://pagure.io/Fedora-Council/tickets/issue/53).

(cherry picked from commit 14b2fafb36)
2020-12-08 18:29:01 +01:00
Zbigniew Jędrzejewski-Szmek 6168715468 Merge branch 'master' into f33 2020-10-01 16:19:42 +02:00
Zbigniew Jędrzejewski-Szmek d3d43af8ad Only create resolv.conf symlink if sd-resolved.service is enabled
This way, if one wants to opt-out of resolved, installing a preset
that disables the service is enough. Previously that would only disable
the service, but a dangling symlink would be created.
2020-09-30 23:12:54 +02:00
Zbigniew Jędrzejewski-Szmek f3f602da25 Upgrades: only replace NM /etc/resolv.conf if NM is enabled 2020-09-29 18:32:09 +02:00
Zbigniew Jędrzejewski-Szmek 3417440344 New version of patch 2020-09-14 21:16:32 +02:00
Zbigniew Jędrzejewski-Szmek a896a747c3 Apply patches to make test-path pass 2020-09-14 17:59:27 +02:00
Zbigniew Jędrzejewski-Szmek b98737cec4 Force creation of /etc/resolv.conf symlink during installation
https://bugzilla.redhat.com/show_bug.cgi?id=1873856#c14
2020-09-13 11:04:30 +02:00
10 changed files with 522 additions and 150 deletions

View File

@ -0,0 +1,42 @@
From b177b0ef92d226a9f303aecbff0cf2e7293667b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 8 Aug 2020 09:21:37 +0200
Subject: [PATCH] Do not assert in test_add_acls_for_user()
This is failing on s390x with:
/* test_add_acls_for_user */
add_acls_for_user(3, 1000): Invalid argument
Assertion 'r >= 0' failed at src/test/test-acl-util.c:46, function test_add_acls_for_user(). Aborting.
---
src/test/test-acl-util.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c
index 9f0e594e67..a91d64ab0c 100644
--- a/src/test/test-acl-util.c
+++ b/src/test/test-acl-util.c
@@ -43,24 +43,20 @@ static void test_add_acls_for_user(void) {
r = add_acls_for_user(fd, uid);
log_info_errno(r, "add_acls_for_user(%d, "UID_FMT"): %m", fd, uid);
- assert_se(r >= 0);
cmd = strjoina("ls -l ", fn);
assert_se(system(cmd) == 0);
cmd = strjoina("getfacl -p ", fn);
- assert_se(system(cmd) == 0);
/* set the acls again */
r = add_acls_for_user(fd, uid);
- assert_se(r >= 0);
cmd = strjoina("ls -l ", fn);
assert_se(system(cmd) == 0);
cmd = strjoina("getfacl -p ", fn);
- assert_se(system(cmd) == 0);
unlink(fn);
}

View File

@ -0,0 +1,30 @@
From a73d30081a13eaeffce87f997726a179ec44d817 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 31 Jul 2020 10:50:37 +0200
Subject: [PATCH 1/4] Revert "test-path: increase timeout"
This partially reverts commit 500727c220354b81b68ed6667d9a6f0fafe3ba19.
I was confused by the error message: the test says it timed out, but that's
because it's waiting for a failed unit to come back to life. There is no actual
timeout.
So let's keep the minor refactoring that was done, but revert to the old short
timeout.
---
src/test/test-path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 1075f31bc6..63b709c8da 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -82,7 +82,7 @@ static void check_states(Manager *m, Path *path, Service *service, PathState pat
assert_se(m);
assert_se(service);
- usec_t end = now(CLOCK_MONOTONIC) + 30 * USEC_PER_SEC;
+ usec_t end = now(CLOCK_MONOTONIC) + 2 * USEC_PER_SEC;
while (path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS ||
path->state != path_state || service->state != service_state) {

View File

@ -0,0 +1,46 @@
From 8cad57ed62a642515670ba79dddb30193456e803 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 7 Aug 2020 18:54:37 +0200
Subject: [PATCH] test-acl-util: output more debug info
For some reason this failed in koji build on s390x:
--- command ---
16:12:46 PATH='/builddir/build/BUILD/systemd-stable-246.1/s390x-redhat-linux-gnu:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin' SYSTEMD_LANGUAGE_FALLBACK_MAP='/builddir/build/BUILD/systemd-stable-246.1/src/locale/language-fallback-map' SYSTEMD_KBD_MODEL_MAP='/builddir/build/BUILD/systemd-stable-246.1/src/locale/kbd-model-map' /builddir/build/BUILD/systemd-stable-246.1/s390x-redhat-linux-gnu/test-acl-util
--- stdout ---
-rw-r-----. 1 mockbuild mock 0 Aug 7 16:12 /tmp/test-empty.7RzmEc
other::---
--- stderr ---
Assertion 'r >= 0' failed at src/test/test-acl-util.c:42, function test_add_acls_for_user(). Aborting.
---
src/test/test-acl-util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c
index df879747f5..9f0e594e67 100644
--- a/src/test/test-acl-util.c
+++ b/src/test/test-acl-util.c
@@ -7,6 +7,7 @@
#include "acl-util.h"
#include "fd-util.h"
+#include "format-util.h"
#include "string-util.h"
#include "tmpfile-util.h"
#include "user-util.h"
@@ -18,6 +19,8 @@ static void test_add_acls_for_user(void) {
uid_t uid;
int r;
+ log_info("/* %s */", __func__);
+
fd = mkostemp_safe(fn);
assert_se(fd >= 0);
@@ -39,6 +42,7 @@ static void test_add_acls_for_user(void) {
uid = getuid();
r = add_acls_for_user(fd, uid);
+ log_info_errno(r, "add_acls_for_user(%d, "UID_FMT"): %m", fd, uid);
assert_se(r >= 0);
cmd = strjoina("ls -l ", fn);

View File

@ -1,70 +0,0 @@
From 2e9d763e7cbeb33954bbe3f96fd94de2cd62edf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 12 Nov 2020 14:28:24 +0100
Subject: [PATCH] test-path-util: do not fail if the fd_is_mount_point check
fails
This test fails on i686 and ppc64le in koji:
/* test_path */
Assertion 'fd_is_mount_point(fd, "/", 0) > 0' failed at src/test/test-path-util.c:85, function test_path(). Aborting.
I guess some permission error is the most likely.
---
src/test/test-path-util.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index f4f8d0550b..be428334f3 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -40,8 +40,6 @@ static void test_path_simplify(const char *in, const char *out, const char *out_
}
static void test_path(void) {
- _cleanup_close_ int fd = -1;
-
log_info("/* %s */", __func__);
test_path_compare("/goo", "/goo", 0);
@@ -80,10 +78,6 @@ static void test_path(void) {
assert_se(streq(basename("/aa///file..."), "file..."));
assert_se(streq(basename("file.../"), ""));
- fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
- assert_se(fd >= 0);
- assert_se(fd_is_mount_point(fd, "/", 0) > 0);
-
test_path_simplify("aaa/bbb////ccc", "aaa/bbb/ccc", "aaa/bbb/ccc");
test_path_simplify("//aaa/.////ccc", "/aaa/./ccc", "/aaa/ccc");
test_path_simplify("///", "/", "/");
@@ -120,6 +114,22 @@ static void test_path(void) {
assert_se(!path_equal_ptr(NULL, "/a"));
}
+static void test_path_is_mountpoint(void) {
+ _cleanup_close_ int fd = -1;
+ int r;
+
+ log_info("/* %s */", __func__);
+
+ fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
+ assert_se(fd >= 0);
+
+ r = fd_is_mount_point(fd, "/", 0);
+ if (r < 0)
+ log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
+ else
+ assert_se(r == 1);
+}
+
static void test_path_equal_root(void) {
/* Nail down the details of how path_equal("/", ...) works. */
@@ -714,6 +724,7 @@ int main(int argc, char **argv) {
test_print_paths();
test_path();
+ test_path_is_mountpoint();
test_path_equal_root();
test_find_executable_full();
test_find_executable(argv[0]);

View File

@ -1,33 +0,0 @@
From e8bca4ba55f855260eda684a16e8feb5f20b1deb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 12 Nov 2020 15:06:12 +0100
Subject: [PATCH] test-path-util: ignore test failure
---
src/test/test-path-util.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index be428334f3..207c659b8b 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -120,14 +120,17 @@ static void test_path_is_mountpoint(void) {
log_info("/* %s */", __func__);
+ (void) system("uname -a");
+ (void) system("mountpoint /");
+
fd = open("/", O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOCTTY);
assert_se(fd >= 0);
r = fd_is_mount_point(fd, "/", 0);
if (r < 0)
log_warning_errno(r, "Failed to check if / is a mount point, ignoring: %m");
- else
- assert_se(r == 1);
+ else if (r == 0)
+ log_warning("/ is not a mountpoint?");
}
static void test_path_equal_root(void) {

View File

@ -0,0 +1,78 @@
From 4c38dcdc8d8f22dddc521faedad6a4f45fa81d63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Mon, 14 Sep 2020 08:56:28 +0200
Subject: [PATCH 2/4] test-path: more debugging information
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Just to make it easier to grok what happens when test-path fails.
Change printf→log_info so that output is interleaved and not split in two
independent parts in log files.
---
src/test/test-path.c | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 63b709c8da..84dcf5e37d 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include <stdbool.h>
-#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -78,32 +77,38 @@ static Service *service_for_path(Manager *m, Path *path, const char *service_nam
return SERVICE(service_unit);
}
-static void check_states(Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
+static void _check_states(unsigned line,
+ Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
assert_se(m);
assert_se(service);
usec_t end = now(CLOCK_MONOTONIC) + 2 * USEC_PER_SEC;
- while (path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS ||
- path->state != path_state || service->state != service_state) {
+ while (path->state != path_state || service->state != service_state ||
+ path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS) {
assert_se(sd_event_run(m->event, 100 * USEC_PER_MSEC) >= 0);
- printf("%s: state = %s; result = %s \n",
- UNIT(path)->id,
- path_state_to_string(path->state),
- path_result_to_string(path->result));
- printf("%s: state = %s; result = %s \n",
- UNIT(service)->id,
- service_state_to_string(service->state),
- service_result_to_string(service->result));
+ usec_t n = now(CLOCK_MONOTONIC);
+ log_info("line %d: %s: state = %s; result = %s (left: %" PRIi64 ")",
+ line,
+ UNIT(path)->id,
+ path_state_to_string(path->state),
+ path_result_to_string(path->result),
+ end - n);
+ log_info("line %d: %s: state = %s; result = %s",
+ line,
+ UNIT(service)->id,
+ service_state_to_string(service->state),
+ service_result_to_string(service->result));
- if (now(CLOCK_MONOTONIC) >= end) {
+ if (n >= end) {
log_error("Test timeout when testing %s", UNIT(path)->id);
exit(EXIT_FAILURE);
}
}
}
+#define check_states(...) _check_states(__LINE__, __VA_ARGS__)
static void test_path_exists(Manager *m) {
const char *test_path = "/tmp/test-path_exists";

View File

@ -0,0 +1,245 @@
From 67c6ff720796bc97f262ba93c6ea87da93b04a1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 31 Jul 2020 10:36:57 +0200
Subject: [PATCH 3/4] test-path: do not fail the test if we fail to start some
service
The test was failing because it couldn't start the service:
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
path-modified.service: Failed to attach to cgroup /system.slice/kojid.service/path-modified.service: No such file or directory
path-modified.service: Failed at step CGROUP spawning /bin/true: No such file or directory
path-modified.service: Main process exited, code=exited, status=219/CGROUP
path-modified.service: Failed with result 'exit-code'.
Test timeout when testing path-modified.path
In fact any of the services that we try to start may fail, especially
considering that we're doing some rogue cgroup operations. See
https://github.com/systemd/systemd/pull/16603#issuecomment-679133641.
---
src/test/test-path.c | 88 ++++++++++++++++++++++++++++++--------------
1 file changed, 61 insertions(+), 27 deletions(-)
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 84dcf5e37d..d6c37b77e6 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -77,8 +77,8 @@ static Service *service_for_path(Manager *m, Path *path, const char *service_nam
return SERVICE(service_unit);
}
-static void _check_states(unsigned line,
- Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
+static int _check_states(unsigned line,
+ Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
assert_se(m);
assert_se(service);
@@ -102,11 +102,20 @@ static void _check_states(unsigned line,
service_state_to_string(service->state),
service_result_to_string(service->result));
+ if (service->state == SERVICE_FAILED)
+ return log_notice_errno(SYNTHETIC_ERRNO(ECANCELED),
+ "Failed to start service %s, aborting test: %s/%s",
+ UNIT(service)->id,
+ service_state_to_string(service->state),
+ service_result_to_string(service->result));
+
if (n >= end) {
log_error("Test timeout when testing %s", UNIT(path)->id);
exit(EXIT_FAILURE);
}
}
+
+ return 0;
}
#define check_states(...) _check_states(__LINE__, __VA_ARGS__)
@@ -124,18 +133,22 @@ static void test_path_exists(Manager *m) {
service = service_for_path(m, path, NULL);
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(touch(test_path) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
/* Service restarts if file still exists */
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(unit_stop(unit) >= 0);
}
@@ -154,18 +167,22 @@ static void test_path_existsglob(Manager *m) {
service = service_for_path(m, path, NULL);
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(touch(test_path) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
/* Service restarts if file still exists */
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(unit_stop(unit) >= 0);
}
@@ -185,23 +202,28 @@ static void test_path_changed(Manager *m) {
service = service_for_path(m, path, NULL);
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(touch(test_path) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
/* Service does not restart if file still exists */
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
f = fopen(test_path, "w");
assert_se(f);
fclose(f);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
(void) rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL);
assert_se(unit_stop(unit) >= 0);
@@ -222,23 +244,28 @@ static void test_path_modified(Manager *m) {
service = service_for_path(m, path, NULL);
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(touch(test_path) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
/* Service does not restart if file still exists */
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
f = fopen(test_path, "w");
assert_se(f);
fputs("test", f);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
(void) rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL);
assert_se(unit_stop(unit) >= 0);
@@ -258,14 +285,17 @@ static void test_path_unit(Manager *m) {
service = service_for_path(m, path, "path-mycustomunit.service");
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(touch(test_path) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(unit_stop(unit) >= 0);
}
@@ -286,22 +316,26 @@ static void test_path_directorynotempty(Manager *m) {
assert_se(access(test_path, F_OK) < 0);
assert_se(unit_start(unit) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
/* MakeDirectory default to no */
assert_se(access(test_path, F_OK) < 0);
assert_se(mkdir_p(test_path, 0755) >= 0);
assert_se(touch(strjoina(test_path, "test_file")) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
/* Service restarts if directory is still not empty */
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+ if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+ return;
assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
assert_se(unit_stop(UNIT(service)) >= 0);
- check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+ if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+ return;
assert_se(unit_stop(unit) >= 0);
}

View File

@ -1 +1 @@
SHA512 (systemd-247.1.tar.gz) = 2a737afcee4409c2be073d8cb650c3465a25c101b3c3072ea6e6a0614d06e3ed7ae55c84f9ae60555915ad1480b3a13aa72fef4b9210139afe6b0d7a7629385a
SHA512 (systemd-246.15.tar.gz) = 71c8afb9de149b9f4b2f63c7a84e2ce2d897e90570692eaa75d8c99c345ad6cfc9717f93844ff1f582f65b7bdbb1166de1d4574cf6f4329edda8920a6c6bf536

View File

@ -1,4 +1,4 @@
#global commit c4b843473a75fb38ed5bf54e9d3cfb1cb3719efa
#global commit 7f56c26d1041e686efa72b339250a98fb6ee8f00
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
%global stable 1
@ -20,7 +20,7 @@
Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd
Version: 247.1
Version: 246.15
Release: 1%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
@ -71,8 +71,12 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828
Patch0001: use-bfq-scheduler.patch
Patch0003: 0001-test-path-util-do-not-fail-if-the-fd_is_mount_point-.patch
Patch0004: 0001-test-path-util-ignore-test-failure.patch
Patch0002: 0001-Revert-test-path-increase-timeout.patch
Patch0003: 0002-test-path-more-debugging-information.patch
Patch0004: 0003-test-path-do-not-fail-the-test-if-we-fail-to-start-s.patch
Patch0006: 0001-test-acl-util-output-more-debug-info.patch
Patch0007: 0001-Do-not-assert-in-test_add_acls_for_user.patch
Patch0009: https://github.com/systemd/systemd/pull/17050/commits/f58b96d3e8d1cb0dd3666bc74fa673918b586612.patch
@ -179,16 +183,6 @@ Obsoletes: %{name}-standalone-tmpfiles < %{version}-%{release}^
Conflicts: %{name}-standalone-sysusers < %{version}-%{release}^
Obsoletes: %{name}-standalone-sysusers < %{version}-%{release}^
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
Recommends: libcryptsetup.so.12()(64bit)
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.0)(64bit)
Recommends: libidn2.so.0()(64bit)
Recommends: libidn2.so.0(IDN2_0.0.0)(64bit)
Recommends: libpcre2-8.so.0()(64bit)
Recommends: libpwquality.so.1()(64bit)
Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)(64bit)
Recommends: libqrencode.so.4()(64bit)
%description
systemd is a system and service manager that runs as PID 1 and starts
the rest of the system. It provides aggressive parallelization
@ -282,10 +276,6 @@ Requires: kbd
Provides: u2f-hidraw-policy = 1.0.2-40
Obsoletes: u2f-hidraw-policy < 1.0.2-40
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
Recommends: libcryptsetup.so.12()(64bit)
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.0)(64bit)
%description udev
This package contains systemd-udev and the rules and hardware database
needed to manage device nodes. This package is necessary on physical
@ -376,7 +366,6 @@ systemd package and is meant for use in non-systemd systems.
%{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1}
CONFIGURE_OPTS=(
-Dmode=release
-Dsysvinit-path=/etc/rc.d/init.d
-Drc-local=/etc/rc.d/rc.local
-Dntp-servers='0.%{ntpvendor}.pool.ntp.org 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 3.%{ntpvendor}.pool.ntp.org'
@ -433,7 +422,6 @@ CONFIGURE_OPTS=(
-Dusers-gid=100
-Dnobody-user=nobody
-Dnobody-group=nobody
-Dcompat-mutable-uid-boundaries=true
-Dsplit-usr=false
-Dsplit-bin=true
%if %{with lto}
@ -449,7 +437,6 @@ CONFIGURE_OPTS=(
# https://bugzilla.redhat.com/show_bug.cgi?id=1867830
-Ddefault-mdns=no
-Ddefault-llmnr=resolve
-Doomd=true
)
%meson "${CONFIGURE_OPTS[@]}"
@ -840,7 +827,20 @@ getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2
getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || :
%post networkd
%systemd_post systemd-networkd.service systemd-networkd-wait-online.service
# systemd-networkd was split out in systemd-246.6-2.
# Ideally, we would have a trigger scriptlet to record enablement
# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS,
# rpm doesn't allow us to trigger on another package, short of
# querying the rpm database ourselves, which seems risky. For rpm,
# systemd and systemd-networkd are completely unrelated. So let's use
# a hack to detect if an old systemd version is currently present in
# the file system.
# https://bugzilla.redhat.com/show_bug.cgi?id=1943263
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then
echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd."
else
%systemd_post systemd-networkd.service systemd-networkd-wait-online.service
fi
%preun networkd
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
@ -892,33 +892,64 @@ getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-net
%files standalone-sysusers -f .file-list-standalone-sysusers
%changelog
* Tue Dec 1 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 247.1-1
- Latest stable release
- Fixes #1902819.
- Files to configure networking with systemd-networkd in a VM or container are
moved to systemd-networkd subpackage. (They were previously in the -container
subpackage, which is for container/VM management.)
* Tue Jul 20 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.15-1
- Various correctness and potential crash fixes (systemd-journald,
udev, systemctl, systemd, systemd-tmpfiles, systemd-resolved)
- Better handling of very long sysfs paths
- Compilation fixes for updated glibc and kernel headers
- Addition of new syscalls to seccomp filters
- Latvian and Spanish/Dvorak keyboard mappings
- Shell completion fixes
- Ignore FORCERENEW DHCP messages in systemd-networkd (TALOS-2020-1142,
CVE-2020-13529, #1959398)
- by-uuid symlinks for ubifs volumes are now created
- CVE-2021-33910, #1984020: an unchecked stack allocation could be used to
crash systemd and cause the system to reboot by creating a very long
fuse mountpoint path.
* Thu Nov 26 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 247-1
- Update to the latest version
- #1900878 should be fixed
* Sat May 15 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.14-1
- Do not preset systemd-networkd.service and systemd-networkd-wait-online.service
on upgrades from before systemd-networkd was split out (#1943263)
- A bunch of patches for systemd-resolved (#1944171, #1949670)
- Fix for systemd-tmpfiles (#1944468)
- Various fixes for systemd, systemd-run, systemd-networkd, bootctl,
the shutdown sequence, documentation, logging, libsystemd, and shell
completions.
* Tue Oct 20 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 247~rc2
- New upstream pre-release. See
https://github.com/systemd/systemd/blob/v247-rc1/NEWS.
Many smaller and bigger improvements and features are introduced.
(#1885101, #1890632, #1879216)
* Wed Mar 24 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.13-1
- Revert patch that seems to cause problems with dns resolution
- A few minor fixes
A backwards-incompatible change affects PCI network devices which
are connected through a bridge which is itself associated with a
slot. When more than one device was associated with the same slot,
one of the devices would pseudo-randomly get named after the slot.
That name is now not generated at all. This changed behaviour is
causes the net naming scheme to be changed to "v247". To restore
previous behaviour, specify net.naming-scheme=v245.
* Tue Mar 23 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.12-1
- Latest bugfix release (#1941335, some documentation and
minor memory-access-correctness fixes).
- Fix hang when processing timers during DST switch in Europe/Dublin timezone (#1941335)
systemd-oomd is built, but should not be considered "production
ready" at this point. Testing and bug reports are welcome.
* Fri Mar 12 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.11-1
- Latest bugfix release (#1933137, #1935084).
* Tue Feb 2 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.10-1
- Latest bugfix release (#1903106, #1895937).
- Fixes #1813219.
* Mon Jan 4 2021 Owen Taylor <otaylor@redhat.com> - 246.9-3
- Fix nss-resolve to properly fallback in a Flatpak sandbox
* Sat Jan 2 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.9-2
- Fix bfq patch again (#1813219)
* Wed Dec 16 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.9-1
- Minor stable release
* Tue Dec 8 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.7-2
- Rebuild with fallback hostname change reverted.
* Tue Dec 8 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.7-1
- Update to latest stable release. Unfortunately this contains
a fairly large number of patches for a stable release (180+).
Fixes rhbz#1879216, rhbz#1890632, rhbz#1891847, rhbz#1885101.
- Unset fallback-hostname as plenty of applications expected localhost
to mean "default hostname" without ever standardising it (#1892235)
* Wed Sep 30 2020 Dusty Mabe <dusty@dustymabe.com> - 246.6-3
- Try to make files in subpackages (especially the networkd subpackage)
@ -941,6 +972,8 @@ getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-net
- Update to latest stable release (a bunch of small network-related
fixes in systemd-networkd and socket handling, documentation updates,
a bunch of fixes for error handling).
* Sun Sep 13 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 246.4-2
- Also remove existing file when creating /etc/resolv.conf symlink
upon installation (#1873856 again)

View File

@ -20,11 +20,12 @@ new file mode 100644
index 0000000000..480b941761
--- /dev/null
+++ b/rules.d/60-block-scheduler.rules
@@ -0,0 +1,5 @@
@@ -0,0 +1,6 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="add", SUBSYSTEM=="block", \
+ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
+ ENV{DEVTYPE}=="disk", \
+ ATTR{queue/scheduler}="bfq"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index ca4445d774..38d6aa6970 100644