nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch
Дамјан Георгиевски 575fddf25b systemd: 252.5 -> 253
systemd v253 changelog/NEWS:
https://github.com/systemd/systemd/blob/v253/NEWS

NixOS changes:
0007-hostnamed-localed-timedated-disable-methods-that-cha.patch was
dropped, because systemd gained support to handle read-only /etc.

*-add-rootprefix-to-lookup-dir-paths.patch required some updates too,
as src/basic/def.h moved to src/basic/constants.h.

systemd/systemd#25771 switched p11kit to become
dlopen()'ed, so we need to patch that path.

added a note to the 23.05 release notes to recommend `nixos-rebuild boot`

Co-authored-by: Florian Klink <flokli@flokli.de>
2023-03-05 04:35:34 +01:00

34 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: oxalica <oxalicc@pm.me>
Date: Tue, 4 Oct 2022 09:18:07 +0800
Subject: [PATCH] core: don't taint on unmerged /usr
NixOS has very different approach towards /bin and /sbin - they don't
really exist (except for /bin/sh and /usr/bin/env, because these are used
heavily in shebangs around the world). The concept of merged or unmerged
usr doesn't really apply here at all, it's neither of the two.
Users don't execute things from /bin or /sbin, there's nothing else in
there. In all cases, systemd doesn't look things up from /usr/bin or /bin,
so showing the taint isn't really helpful.
See also: https://github.com/systemd/systemd/issues/24191
---
src/core/manager.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 898f9ed2f1..5040d5b105 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4543,10 +4543,6 @@ char* manager_taint_string(const Manager *m) {
if (m->taint_usr)
stage[n++] = "split-usr";
- _cleanup_free_ char *usrbin = NULL;
- if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin"))
- stage[n++] = "unmerged-usr";
-
if (access("/proc/cgroups", F_OK) < 0)
stage[n++] = "cgroups-missing";