summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-01-30 11:43:19 -0500
committerMike Gilbert <floppym@gentoo.org>2023-01-30 11:44:29 -0500
commit3a18977dfe87fa97e472701a98a7e1640c5176f7 (patch)
treeb9cf7fe09c4fe285e66a1f1f3eebb469993909bf /net-nds
parentnet-nds/openldap: set NotifyAccess=all in slapd-2.6.1.service (diff)
downloadgentoo-3a18977dfe87fa97e472701a98a7e1640c5176f7.tar.gz
gentoo-3a18977dfe87fa97e472701a98a7e1640c5176f7.tar.bz2
gentoo-3a18977dfe87fa97e472701a98a7e1640c5176f7.zip
net-nds/openldap: adjust systemd unit install logic
Only install slapd.service when USE=systemd; it has Type=notify and is therefore uselesss without sd_notify. Also remove the upstream unit file to prevent weirdness with split-usr. Closes: https://bugs.gentoo.org/892627 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/openldap/openldap-2.6.3-r6.ebuild24
1 files changed, 12 insertions, 12 deletions
diff --git a/net-nds/openldap/openldap-2.6.3-r6.ebuild b/net-nds/openldap/openldap-2.6.3-r6.ebuild
index 96d3a30492af..2645e95da094 100644
--- a/net-nds/openldap/openldap-2.6.3-r6.ebuild
+++ b/net-nds/openldap/openldap-2.6.3-r6.ebuild
@@ -326,12 +326,6 @@ src_prepare() {
-e "s:\$(localstatedir)/run:${EPREFIX}/run:" \
servers/slapd/Makefile.in || die 'adjusting slapd Makefile.in failed'
- # Hack for bug #885457
- sed -i \
- -e "s:systemdsystemunitdir=/usr/lib/systemd/system:systemdsystemunitdir=$(systemd_get_systemunitdir):" \
- -e "s:systemdsystemunitdir=/lib/systemd/system:systemdsystemunitdir=$(systemd_get_systemunitdir):" \
- configure.ac || die
-
pushd build &>/dev/null || die "pushd build"
einfo "Making sure upstream build strip does not do stripping too early"
sed -i.orig \
@@ -669,11 +663,15 @@ multilib_src_install() {
doinitd "${T}"/slapd
newconfd "${FILESDIR}"/slapd-confd-2.6.1 slapd
- einfo "Install systemd service"
- sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die
- systemd_dounit "${T}"/slapd.service
- systemd_install_serviced "${FILESDIR}"/slapd.service.conf
- newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf
+ if use systemd; then
+ # The systemd unit uses Type=notify, so it is useless without USE=systemd
+ einfo "Install systemd service"
+ rm -rf "${ED}"/{,usr/}lib/systemd
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die
+ systemd_dounit "${T}"/slapd.service
+ systemd_install_serviced "${FILESDIR}"/slapd.service.conf
+ newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf
+ fi
# if built without SLP, we don't need to be before avahi
sed -i \
@@ -763,7 +761,9 @@ pkg_preinst() {
pkg_postinst() {
if ! use minimal ; then
- tmpfiles_process slapd.conf
+ if use systemd; then
+ tmpfiles_process slapd.conf
+ fi
# You cannot build SSL certificates during src_install that will make
# binary packages containing your SSL key, which is both a security risk