nixpkgs/pkgs/os-specific/linux/systemd/0014-core-don-t-taint-on-unmerged-usr.patch
nikstur 748378a3ec systemd: 254.6 -> 255.2
Removed patches:

- 0007-Fix-hwdb-paths.patch

  The directory we want seems to already be included in the list. Is there
  a reason why we want to restrict it further?

- 0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch

  This patch has little to do with how the meson.build file looks now. The
  new patch 0017 is the successor to this one.

- 0015-pkg-config-derive-prefix-from-prefix.patch

  This is fixed upstream. We don't need this anymore.
2024-01-17 14:13:46 +01:00

32 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 | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 5dc7d4504f..6208c9aa31 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4800,9 +4800,6 @@ char* manager_taint_string(const Manager *m) {
const char* stage[12] = {};
size_t n = 0;
- _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";