Hello, I'm attaching a patch which has only been compile-tested as I don't use slapd myself. It would be great if someone who uses slapd could pick it up, test it and finish the remaining work.
TODO: For unknown reason configure seems to want to use /usr/lib/systemd/system (rather than /lib/systemd/system) despite the precense of systemd.pc ... the configure script has hard-coded fallback paths... This can possibly cause problems with debhelper integration picking it up properly. Feel free to investigate! :) Regards, Andreas Henriksson
>From 2ccd6781e2bb10dda99be0c4d0ad3c599fd96a20 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson <andr...@fatal.se> Date: Wed, 28 Jun 2023 18:13:45 +0200 Subject: [PATCH] Enable systemd integration Build-dep on: - libsystemd-dev for systemd/sd-daemon.h - systemd-dev for systemd.pc Use configure flag --with-systemd when building services (slapd). --- debian/control | 2 ++ debian/rules | 2 ++ debian/slapd.install | 2 ++ 3 files changed, 6 insertions(+) diff --git a/debian/control b/debian/control index 9b27cf69f..7c0baabb1 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,8 @@ Build-Depends: debhelper-compat (= 12), libltdl-dev <!pkg.openldap.noslapd>, libperl-dev (>= 5.8.0) <!pkg.openldap.noslapd>, libsasl2-dev, + libsystemd-dev <!pkg.openldap.noslapd>, + systemd-dev <!pkg.openldap.noslapd>, libwrap0-dev <!pkg.openldap.noslapd>, nettle-dev <!pkg.openldap.noslapd>, openssl <!nocheck>, diff --git a/debian/rules b/debian/rules index 7992a133d..94599e108 100755 --- a/debian/rules +++ b/debian/rules @@ -25,6 +25,8 @@ ifeq ($(DEB_HOST_ARCH_OS),hurd) endif ifneq ($(filter pkg.openldap.noslapd,$(DEB_BUILD_PROFILES)),) CONFIG += --disable-slapd +else + CONFIG += --with-systemd endif CONTRIB_MODULES = autogroup lastbind passwd passwd/pbkdf2 passwd/sha2 smbk5pwd diff --git a/debian/slapd.install b/debian/slapd.install index c5f7946cd..e4cde1359 100644 --- a/debian/slapd.install +++ b/debian/slapd.install @@ -1,3 +1,5 @@ +usr/lib/systemd/system/slapd.service + etc/ldap/schema usr/lib/slapd usr/sbin usr/lib/*/libslapi-*.so.* -- 2.39.2