1 |
commit: 3a18977dfe87fa97e472701a98a7e1640c5176f7 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 30 16:43:19 2023 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 30 16:44:29 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a18977d |
7 |
|
8 |
net-nds/openldap: adjust systemd unit install logic |
9 |
|
10 |
Only install slapd.service when USE=systemd; it has Type=notify and is |
11 |
therefore uselesss without sd_notify. |
12 |
|
13 |
Also remove the upstream unit file to prevent weirdness with split-usr. |
14 |
|
15 |
Closes: https://bugs.gentoo.org/892627 |
16 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
17 |
|
18 |
net-nds/openldap/openldap-2.6.3-r6.ebuild | 24 ++++++++++++------------ |
19 |
1 file changed, 12 insertions(+), 12 deletions(-) |
20 |
|
21 |
diff --git a/net-nds/openldap/openldap-2.6.3-r6.ebuild b/net-nds/openldap/openldap-2.6.3-r6.ebuild |
22 |
index 96d3a30492af..2645e95da094 100644 |
23 |
--- a/net-nds/openldap/openldap-2.6.3-r6.ebuild |
24 |
+++ b/net-nds/openldap/openldap-2.6.3-r6.ebuild |
25 |
@@ -326,12 +326,6 @@ src_prepare() { |
26 |
-e "s:\$(localstatedir)/run:${EPREFIX}/run:" \ |
27 |
servers/slapd/Makefile.in || die 'adjusting slapd Makefile.in failed' |
28 |
|
29 |
- # Hack for bug #885457 |
30 |
- sed -i \ |
31 |
- -e "s:systemdsystemunitdir=/usr/lib/systemd/system:systemdsystemunitdir=$(systemd_get_systemunitdir):" \ |
32 |
- -e "s:systemdsystemunitdir=/lib/systemd/system:systemdsystemunitdir=$(systemd_get_systemunitdir):" \ |
33 |
- configure.ac || die |
34 |
- |
35 |
pushd build &>/dev/null || die "pushd build" |
36 |
einfo "Making sure upstream build strip does not do stripping too early" |
37 |
sed -i.orig \ |
38 |
@@ -669,11 +663,15 @@ multilib_src_install() { |
39 |
doinitd "${T}"/slapd |
40 |
newconfd "${FILESDIR}"/slapd-confd-2.6.1 slapd |
41 |
|
42 |
- einfo "Install systemd service" |
43 |
- sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die |
44 |
- systemd_dounit "${T}"/slapd.service |
45 |
- systemd_install_serviced "${FILESDIR}"/slapd.service.conf |
46 |
- newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf |
47 |
+ if use systemd; then |
48 |
+ # The systemd unit uses Type=notify, so it is useless without USE=systemd |
49 |
+ einfo "Install systemd service" |
50 |
+ rm -rf "${ED}"/{,usr/}lib/systemd |
51 |
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die |
52 |
+ systemd_dounit "${T}"/slapd.service |
53 |
+ systemd_install_serviced "${FILESDIR}"/slapd.service.conf |
54 |
+ newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf |
55 |
+ fi |
56 |
|
57 |
# if built without SLP, we don't need to be before avahi |
58 |
sed -i \ |
59 |
@@ -763,7 +761,9 @@ pkg_preinst() { |
60 |
|
61 |
pkg_postinst() { |
62 |
if ! use minimal ; then |
63 |
- tmpfiles_process slapd.conf |
64 |
+ if use systemd; then |
65 |
+ tmpfiles_process slapd.conf |
66 |
+ fi |
67 |
|
68 |
# You cannot build SSL certificates during src_install that will make |
69 |
# binary packages containing your SSL key, which is both a security risk |