summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/cyrus-sasl
diff options
context:
space:
mode:
authorBian Naimeng <biannm@cn.fujitsu.com>2015-02-15 16:58:23 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-02-23 13:38:49 -0500
commitb740f2712f122712b541d1fc1b2db3c43a18c97c (patch)
treeec223f0dc1a7b5bb640fdb7b1c8eb18f12d89972 /meta-networking/recipes-daemons/cyrus-sasl
parent7b3d4803b42f1afcdceab0e29cf8eda14fcd4a87 (diff)
downloadmeta-openembedded-b740f2712f122712b541d1fc1b2db3c43a18c97c.tar.gz
cyrus-sasl: add systemd supported for saslauthd
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons/cyrus-sasl')
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf11
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service12
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb31
3 files changed, 52 insertions, 2 deletions
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
new file mode 100644
index 000000000..a91a9d334
--- /dev/null
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.conf
@@ -0,0 +1,11 @@
1# Directory in which to place saslauthd's listening socket, pid file, and so
2# on. This directory must already exist.
3SOCKETDIR=@LOCALSTATEDIR@/run/saslauthd
4
5# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
6# of which mechanism your installation was compiled with the ablity to use.
7MECH=pam
8
9# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
10# for the list of accepted flags.
11FLAGS=
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
new file mode 100644
index 000000000..96dbae378
--- /dev/null
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/saslauthd.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=SASL authentication daemon.
3After=syslog.target
4
5[Service]
6Type=forking
7PIDFile=@LOCALSTATEDIR@/run/saslauthd/saslauthd.pid
8EnvironmentFile=@SYSCONFDIR@/default/saslauthd
9ExecStart=@SBINDIR@/saslauthd -m $SOCKETDIR -a $MECH $FLAGS
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
index 491ecdb9a..c235a1b95 100644
--- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
@@ -10,9 +10,11 @@ SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
10 file://debian_patches_0009_sasldb_al.diff \ 10 file://debian_patches_0009_sasldb_al.diff \
11 file://debian_patches_0014_avoid_pic_overwrite.diff \ 11 file://debian_patches_0014_avoid_pic_overwrite.diff \
12 file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \ 12 file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \
13 file://saslauthd.service \
14 file://saslauthd.conf \
13 " 15 "
14 16
15inherit autotools-brokensep pkgconfig useradd 17inherit autotools-brokensep pkgconfig useradd systemd
16 18
17EXTRA_OECONF += "--with-dblib=berkeley \ 19EXTRA_OECONF += "--with-dblib=berkeley \
18 --with-bdb-libdir=${STAGING_LIBDIR} \ 20 --with-bdb-libdir=${STAGING_LIBDIR} \
@@ -51,17 +53,42 @@ do_compile_prepend () {
51 cd .. 53 cd ..
52} 54}
53 55
56do_install_append() {
57 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/saslauthd.service ${D}${systemd_unitdir}/system
60
61 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
62 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
63 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/saslauthd.service
64
65 install -d ${D}${sysconfdir}/tmpfiles.d
66 echo "d /run/saslauthd/ - - - -" > ${D}${sysconfdir}/tmpfiles.d/saslauthd.conf
67
68 install -d ${D}${sysconfdir}/default/
69 install -m 0644 ${WORKDIR}/saslauthd.conf ${D}${sysconfdir}/default/saslauthd
70 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/default/saslauthd
71 fi
72}
73
54USERADD_PACKAGES = "${PN}-bin" 74USERADD_PACKAGES = "${PN}-bin"
55GROUPADD_PARAM_${PN}-bin = "--system mail" 75GROUPADD_PARAM_${PN}-bin = "--system mail"
56USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus" 76USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus"
57 77
78SYSTEMD_PACKAGES = "${PN}"
79SYSTEMD_SERVICE_${PN} = "saslauthd.service"
80SYSTEMD_AUTO_ENABLE = "disable"
81
58SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425" 82SRC_URI[md5sum] = "a7f4e5e559a0e37b3ffc438c9456e425"
59SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3" 83SRC_URI[sha256sum] = "8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3"
60 84
61PACKAGES =+ "${PN}-bin" 85PACKAGES =+ "${PN}-bin"
62 86
63FILES_${PN} += "${libdir}/sasl2/*.so*" 87FILES_${PN} += "${libdir}/sasl2/*.so*"
64FILES_${PN}-bin += "${bindir}" 88FILES_${PN}-bin += "${bindir} \
89 ${sysconfdir}/default/saslauthd \
90 ${systemd_unitdir}/system/saslauthd.service \
91 ${sysconfdir}/tmpfiles.d/saslauthd.conf"
65FILES_${PN}-dev += "${libdir}/sasl2/*.la" 92FILES_${PN}-dev += "${libdir}/sasl2/*.la"
66FILES_${PN}-dbg += "${libdir}/sasl2/.debug" 93FILES_${PN}-dbg += "${libdir}/sasl2/.debug"
67FILES_${PN}-staticdev += "${libdir}/sasl2/*.a" 94FILES_${PN}-staticdev += "${libdir}/sasl2/*.a"