summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2016-06-21 02:01:31 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2016-06-23 15:21:26 +0200
commitc29c8e3a8f8746b2061e3c532f13ae99c55fb42a (patch)
treeb1f39c0c52f563bdbae6dc70fd1a76acf6363a15 /meta-oe/recipes-connectivity
parent016e7480a885b90a3ed2d336b54676d0237b3439 (diff)
downloadmeta-openembedded-c29c8e3a8f8746b2061e3c532f13ae99c55fb42a.tar.gz
krb5: add systemd support
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service14
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service13
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb29
3 files changed, 47 insertions, 9 deletions
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service b/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
new file mode 100644
index 000000000..1b4271643
--- /dev/null
+++ b/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=MIT Kerberos KDC administrative daemon
3After=syslog.target network.target
4ConditionPathExists=/etc/krb5.conf
5
6[Service]
7Type=forking
8ExecStartPre=/bin/sh -c "test ! -f /var/log/kadmind.log || test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log/kadmind.log"
9ExecStart=/usr/sbin/kadmind
10SuccessExitStatus=1 2 SIGKILL
11TimeoutStopSec=30
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service b/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
new file mode 100644
index 000000000..d5e5a9579
--- /dev/null
+++ b/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=MIT Kerberos KDC
3After=syslog.target network.target
4ConditionPathExists=/etc/krb5.conf
5
6[Service]
7Type=forking
8ExecStart=/usr/sbin/krb5kdc
9SuccessExitStatus=1 2 SIGKILL
10TimeoutStopSec=30
11
12[Install]
13WantedBy=multi-user.target
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
index 0c566cbc2..500e194d5 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
@@ -17,7 +17,7 @@ LICENSE = "MIT"
17LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=f64248328d2d9928e1f04158b5243e7f" 17LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=f64248328d2d9928e1f04158b5243e7f"
18DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native" 18DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native"
19 19
20inherit autotools-brokensep binconfig perlnative 20inherit autotools-brokensep binconfig perlnative systemd
21 21
22SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" 22SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
23SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}-signed.tar \ 23SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}-signed.tar \
@@ -32,6 +32,8 @@ SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}-signed.tar
32 file://etc/init.d/krb5-admin-server \ 32 file://etc/init.d/krb5-admin-server \
33 file://etc/default/krb5-kdc \ 33 file://etc/default/krb5-kdc \
34 file://etc/default/krb5-admin-server \ 34 file://etc/default/krb5-admin-server \
35 file://krb5-kdc.service \
36 file://krb5-admin-server.service \
35 file://krb5-CVE-2016-3119.patch;striplevel=2 \ 37 file://krb5-CVE-2016-3119.patch;striplevel=2 \
36 file://0001-Work-around-uninitialized-warning-in-cc_kcm.c.patch;striplevel=2 \ 38 file://0001-Work-around-uninitialized-warning-in-cc_kcm.c.patch;striplevel=2 \
37" 39"
@@ -40,6 +42,9 @@ SRC_URI[sha256sum] = "e528c30b0209c741f6f320cb83122ded92f291802b6a1a1dc1a01dcdb3
40 42
41S = "${WORKDIR}/${BP}/src" 43S = "${WORKDIR}/${BP}/src"
42 44
45SYSTEMD_SERVICE_${PN} = "krb5-admin-server.service krb5-kdc.service"
46SYSTEMD_AUTO_ENABLE = "disable"
47
43PACKAGECONFIG ??= "openssl" 48PACKAGECONFIG ??= "openssl"
44PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" 49PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
45PACKAGECONFIG[openssl] = "--with-pkinit-crypto-impl=openssl,,openssl" 50PACKAGECONFIG[openssl] = "--with-pkinit-crypto-impl=openssl,,openssl"
@@ -79,20 +84,26 @@ do_configure() {
79} 84}
80 85
81do_install_append() { 86do_install_append() {
82 mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default
83 install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d
84 install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
85
86 rm -rf ${D}/${localstatedir}/run 87 rm -rf ${D}/${localstatedir}/run
87 mkdir -p ${D}/${sysconfdir}/default/volatiles 88
88 echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ 89 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
89 > ${D}${sysconfdir}/default/volatiles/87_krb5 90 mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default
91 install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d
92 install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
93
94 mkdir -p ${D}/${sysconfdir}/default/volatiles
95 echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
96 > ${D}${sysconfdir}/default/volatiles/87_krb5
97 fi
90 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 98 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
91 install -d ${D}${sysconfdir}/tmpfiles.d 99 install -d ${D}${sysconfdir}/tmpfiles.d
92 echo "d /run/krb5kdc - - - -" \ 100 echo "d /run/krb5kdc - - - -" \
93 > ${D}${sysconfdir}/tmpfiles.d/krb5.conf 101 > ${D}${sysconfdir}/tmpfiles.d/krb5.conf
94 fi
95 102
103 install -d ${D}${systemd_system_unitdir}
104 install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir}
105 install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir}
106 fi
96} 107}
97 108
98pkg_postinst_${PN} () { 109pkg_postinst_${PN} () {