Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/
Date: Fri, 08 Apr 2022 23:18:10
Message-Id: 1649459835.aa6a892c022128dfe993ac2b0e0ef23600304a8b.floppym@gentoo
1 commit: aa6a892c022128dfe993ac2b0e0ef23600304a8b
2 Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru>
3 AuthorDate: Sat Mar 12 17:36:37 2022 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 8 23:17:15 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa6a892c
7
8 sys-apps/systemd: warn when dbus-broker is needed.
9
10 Warn if hostnamed-fallback workaround is used, but dbus-broker.service
11 is not enabled. This should give users a strong hint of what needs to be
12 done.
13
14 Closes: https://bugs.gentoo.org/835068
15 Closes: https://github.com/gentoo/gentoo/pull/24514
16 Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru>
17 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
18
19 sys-apps/systemd/systemd-250.4-r1.ebuild | 8 ++++++++
20 sys-apps/systemd/systemd-9999.ebuild | 8 ++++++++
21 2 files changed, 16 insertions(+)
22
23 diff --git a/sys-apps/systemd/systemd-250.4-r1.ebuild b/sys-apps/systemd/systemd-250.4-r1.ebuild
24 index 444d748cfd2b..6bb599321728 100644
25 --- a/sys-apps/systemd/systemd-250.4-r1.ebuild
26 +++ b/sys-apps/systemd/systemd-250.4-r1.ebuild
27 @@ -511,6 +511,14 @@ pkg_postinst() {
28 eerror "systemd again."
29 eerror
30 fi
31 +
32 + if use hostnamed-fallback; then
33 + if ! systemctl --root="${ROOT:-/}" is-enabled --quiet dbus-broker.service 2>/dev/null; then
34 + ewarn "dbus-broker.service is not enabled, systemd-hostnamed will fail to run."
35 + ewarn "To enable dbus-broker.service run the next command as root:"
36 + ewarn "systemctl enable dbus-broker.service"
37 + fi
38 + fi
39 }
40
41 pkg_prerm() {
42
43 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
44 index 0d675fb07803..82859b1c535d 100644
45 --- a/sys-apps/systemd/systemd-9999.ebuild
46 +++ b/sys-apps/systemd/systemd-9999.ebuild
47 @@ -510,6 +510,14 @@ pkg_postinst() {
48 eerror "systemd again."
49 eerror
50 fi
51 +
52 + if use hostnamed-fallback; then
53 + if ! systemctl --root="${ROOT:-/}" is-enabled --quiet dbus-broker.service 2>/dev/null; then
54 + ewarn "dbus-broker.service is not enabled, systemd-hostnamed will fail to run."
55 + ewarn "To enable dbus-broker.service run the next command as root:"
56 + ewarn "systemctl enable dbus-broker.service"
57 + fi
58 + fi
59 }
60
61 pkg_prerm() {