1 |
commit: a31f6aab2671f7cea5d96ff7ca0410bc82df27f4 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 30 23:26:49 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 30 23:27:22 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a31f6aab |
7 |
|
8 |
app-admin/collectd: Fix pkg_postinst... |
9 |
|
10 |
...to support systemd's new rootprefix. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/596852 |
13 |
Package-Manager: Portage-2.3.26, Repoman-2.3.7 |
14 |
RepoMan-Options: --force |
15 |
|
16 |
.../{collectd-5.7.2-r1.ebuild => collectd-5.7.2-r2.ebuild} | 8 +++++++- |
17 |
1 file changed, 7 insertions(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/app-admin/collectd/collectd-5.7.2-r1.ebuild b/app-admin/collectd/collectd-5.7.2-r2.ebuild |
20 |
similarity index 98% |
21 |
rename from app-admin/collectd/collectd-5.7.2-r1.ebuild |
22 |
rename to app-admin/collectd/collectd-5.7.2-r2.ebuild |
23 |
index aa1d4469965..9adfa6322e1 100644 |
24 |
--- a/app-admin/collectd/collectd-5.7.2-r1.ebuild |
25 |
+++ b/app-admin/collectd/collectd-5.7.2-r2.ebuild |
26 |
@@ -500,7 +500,7 @@ pkg_postinst() { |
27 |
elog " ${caps_str}+EP" |
28 |
elog |
29 |
|
30 |
- local systemd_unit="${EROOT}usr/lib/systemd/system/collectd.service" |
31 |
+ local systemd_unit="$(systemd_get_systemunitdir)/collectd.service" |
32 |
if [[ -e "${systemd_unit}" ]]; then |
33 |
caps_str="${caps[*]}" |
34 |
sed -i -e "s:^CapabilityBoundingSet=.*:CapabilityBoundingSet=${caps_str}:" "${systemd_unit}" || \ |
35 |
@@ -509,6 +509,12 @@ pkg_postinst() { |
36 |
elog "CapabilityBoundingSet in '${systemd_unit}'" |
37 |
elog "updated to match capabilities set above." |
38 |
elog |
39 |
+ else |
40 |
+ if has_version "sys-apps/systemd"; then |
41 |
+ # Bug 596852 |
42 |
+ ewarn "Failed to update CapabilityBondingSet in '${systemd_unit}'" |
43 |
+ ewarn "because unit was not found. Please file a bug about this." |
44 |
+ fi |
45 |
fi |
46 |
fi |
47 |
fi |