nixpkgs/pkgs/os-specific/linux/systemd/0017-core-don-t-taint-on-unmerged-usr.patch
Artturin 40eff710af Revert "Systemd package rewrite"
Reverts NixOS/nixpkgs#269620

- eab0837b68 caused a mass-rebuild on master

- self-merge on a critical package without review and not waiting for the active owner team

Below are the reverts of the commits from that PR

Revert "systemd: migrate to by-name"

This reverts commit 33d2a40d67.

Revert "systemd: add meta.longDescription"

This reverts commit 7c588d141d.

Revert "systemd: cosmetic rewording of code"

This reverts commit d91b8d9fcb.

Revert "systemd: cosmetic rewording of comments"

This reverts commit bc563998c0.

Revert "systemd: remove some redundancy on mesonFlags"

This reverts commit eab0837b68.

Revert "systemd: use  lib.meson* functions"

This reverts commit 1129756b1a.
2023-11-26 03:12:04 +02: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 acf3ead8d7..bdbab16829 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4754,10 +4754,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";