diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-01-23 10:37:56 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-02-12 19:37:20 +0100 |
commit | 19e9164e1f3e129bbdb9837c68669be9a02782ca (patch) | |
tree | 701c0f4a0ae6df845af7b22446f70e2319dae7f9 /meta-oe/recipes-support | |
parent | f573e3424bd1dda7efe1bf83c0ae8708e5cbec5c (diff) | |
download | meta-openembedded-19e9164e1f3e129bbdb9837c68669be9a02782ca.tar.gz |
openldap: add systemd support
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/openldap/openldap-2.4.39/slapd.service | 10 | ||||
-rw-r--r-- | meta-oe/recipes-support/openldap/openldap_2.4.39.bb | 12 |
2 files changed, 20 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/slapd.service b/meta-oe/recipes-support/openldap/openldap-2.4.39/slapd.service new file mode 100644 index 0000000000..f5f83fdc37 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/slapd.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Standalone LDAP Daemon | ||
3 | After=syslog.target network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | ExecStart=@SBINDIR@/slapd | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.39.bb b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb index 5f5de5e8b3..e2c700f1d6 100644 --- a/meta-oe/recipes-support/openldap/openldap_2.4.39.bb +++ b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb | |||
@@ -24,6 +24,7 @@ SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \ | |||
24 | file://ITS-7723-fix-reference-counting.patch \ | 24 | file://ITS-7723-fix-reference-counting.patch \ |
25 | file://use-urandom.patch \ | 25 | file://use-urandom.patch \ |
26 | file://initscript \ | 26 | file://initscript \ |
27 | file://slapd.service \ | ||
27 | " | 28 | " |
28 | SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943" | 29 | SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943" |
29 | SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7" | 30 | SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7" |
@@ -35,7 +36,7 @@ DEPENDS = "util-linux groff-native" | |||
35 | # environments | 36 | # environments |
36 | SRC_URI += "file://install-strip.patch" | 37 | SRC_URI += "file://install-strip.patch" |
37 | 38 | ||
38 | inherit autotools-brokensep update-rc.d | 39 | inherit autotools-brokensep update-rc.d systemd |
39 | 40 | ||
40 | # CV SETTINGS | 41 | # CV SETTINGS |
41 | # Required to work round AC_FUNC_MEMCMP which gets the wrong answer | 42 | # Required to work round AC_FUNC_MEMCMP which gets the wrong answer |
@@ -167,7 +168,7 @@ PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" | |||
167 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" | 168 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" |
168 | FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ | 169 | FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ |
169 | ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ | 170 | ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ |
170 | ${sysconfdir}/openldap/DB_CONFIG.example" | 171 | ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*" |
171 | FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run ${localstatedir}/volatile/run" | 172 | FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run ${localstatedir}/volatile/run" |
172 | FILES_${PN}-bin = "${bindir}" | 173 | FILES_${PN}-bin = "${bindir}" |
173 | FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so" | 174 | FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so" |
@@ -189,11 +190,18 @@ do_install_append() { | |||
189 | 190 | ||
190 | rmdir "${D}${localstatedir}/run" | 191 | rmdir "${D}${localstatedir}/run" |
191 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | 192 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" |
193 | |||
194 | install -d ${D}${systemd_unitdir}/system/ | ||
195 | install -m 0644 ${WORKDIR}/slapd.service ${D}${systemd_unitdir}/system/ | ||
196 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/*.service | ||
192 | } | 197 | } |
193 | 198 | ||
194 | INITSCRIPT_PACKAGES = "${PN}-slapd" | 199 | INITSCRIPT_PACKAGES = "${PN}-slapd" |
195 | INITSCRIPT_NAME_${PN}-slapd = "openldap" | 200 | INITSCRIPT_NAME_${PN}-slapd = "openldap" |
196 | INITSCRIPT_PARAMS_${PN}-slapd = "defaults" | 201 | INITSCRIPT_PARAMS_${PN}-slapd = "defaults" |
202 | SYSTEMD_SERVICE_${PN}-slapd = "hostapd.service" | ||
203 | SYSTEMD_AUTO_ENABLE_${PN}-slapd ?= "disable" | ||
204 | |||
197 | 205 | ||
198 | PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" | 206 | PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" |
199 | 207 | ||