summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2016-11-30 12:59:04 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2016-12-09 12:02:14 +0100
commitcfde74c9dbe8eed65f430334b071aeba6620882d (patch)
treebe197cbb36ed3036f8114ee43ef48a6a6e24f896
parent4fc06fd23709e77a5ee05b1f0fde57d410fcaba6 (diff)
downloadmeta-openembedded-cfde74c9dbe8eed65f430334b071aeba6620882d.tar.gz
krb5: create Debian-like package structure
Split libraries and plugins into their own packages. Create packages for admin-server, kdc, user and examples. Remove some unneeded binaries. Enable daemons on boot. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb101
1 files changed, 89 insertions, 12 deletions
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb
index 06f7f90bd..656a02f17 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.6.bb
@@ -17,7 +17,7 @@ LICENSE = "MIT"
17LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=c6f37efad53b098e420f45e7ab6807dc" 17LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=c6f37efad53b098e420f45e7ab6807dc"
18DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native" 18DEPENDS = "ncurses util-linux e2fsprogs e2fsprogs-native"
19 19
20inherit autotools-brokensep binconfig perlnative systemd 20inherit autotools-brokensep binconfig perlnative systemd update-rc.d
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}.tar.gz \ 23SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \
@@ -36,9 +36,6 @@ SRC_URI[sha256sum] = "9c0a46b8918237a53916370d2e02298c2b294f55f0351f9404e18930bc
36 36
37S = "${WORKDIR}/${BP}/src" 37S = "${WORKDIR}/${BP}/src"
38 38
39SYSTEMD_SERVICE_${PN} = "krb5-admin-server.service krb5-kdc.service"
40SYSTEMD_AUTO_ENABLE = "disable"
41
42PACKAGECONFIG ??= "openssl" 39PACKAGECONFIG ??= "openssl"
43PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" 40PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
44PACKAGECONFIG[openssl] = "--with-pkinit-crypto-impl=openssl,,openssl" 41PACKAGECONFIG[openssl] = "--with-pkinit-crypto-impl=openssl,,openssl"
@@ -54,13 +51,6 @@ CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regc
54CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" 51CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et"
55LDFLAGS_append = " -pthread" 52LDFLAGS_append = " -pthread"
56 53
57FILES_${PN} += "${datadir}/gnats"
58FILES_${PN}-doc += "${datadir}/examples"
59FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug"
60
61# As this recipe doesn't inherit update-rc.d, we need to add this dependency here
62RDEPENDS_${PN}_class-target += "initscripts-functions"
63
64do_configure() { 54do_configure() {
65 gnu-configize --force 55 gnu-configize --force
66 autoreconf 56 autoreconf
@@ -69,6 +59,13 @@ do_configure() {
69 59
70do_install_append() { 60do_install_append() {
71 rm -rf ${D}/${localstatedir}/run 61 rm -rf ${D}/${localstatedir}/run
62 rm -f ${D}${bindir}/sclient
63 rm -f ${D}${bindir}/sim_client
64 rm -f ${D}${bindir}/uuclient
65 rm -f ${D}${sbindir}/krb5-send-pr
66 rm -f ${D}${sbindir}/sim_server
67 rm -f ${D}${sbindir}/sserver
68 rm -f ${D}${sbindir}/uuserver
72 69
73 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 70 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
74 mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default 71 mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default
@@ -90,7 +87,87 @@ do_install_append() {
90 fi 87 fi
91} 88}
92 89
93pkg_postinst_${PN} () { 90PACKAGES =+ "${PN}-admin-server \
91 ${PN}-gss-samples \
92 ${PN}-k5tls \
93 ${PN}-kdc \
94 ${PN}-kdc-ldap \
95 ${PN}-kpropd \
96 ${PN}-otp \
97 ${PN}-pkinit \
98 ${PN}-user \
99 libgssapi-krb5 \
100 libgssrpc \
101 libk5crypto \
102 libkadm5clnt-mit \
103 libkadm5srv-mit \
104 libkdb5 \
105 libkrad \
106 libkrb5 \
107 libkrb5support \
108 libverto"
109
110FILES_${PN} = ""
111FILES_${PN}-doc += "${datadir}/examples"
112FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug"
113
114FILES_${PN}-admin-server = "${sbindir}/kadmin.local \
115 ${sbindir}/kadmind \
116 ${sbindir}/kprop \
117 ${sysconfdir}/default/krb5-admin-server \
118 ${sysconfdir}/init.d/krb5-admin-server \
119 ${systemd_system_unitdir}/krb5-admin-server.service"
120
121FILES_${PN}-gss-samples = "${bindir}/gss-client \
122 ${sbindir}/gss-server"
123
124FILES_${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so"
125
126FILES_${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \
127 ${localstatedir}/krb5kdc \
128 ${sbindir}/kdb5_util \
129 ${sbindir}/kproplog \
130 ${sbindir}/krb5kdc \
131 ${sysconfdir}/default/krb5-kdc \
132 ${sysconfdir}/default/volatiles/87_krb5 \
133 ${sysconfdir}/init.d/krb5-kdc \
134 ${sysconfdir}/tmpfiles.d/krb5.conf \
135 ${systemd_system_unitdir}/krb5-kdc.service"
136
137FILES_${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \
138 ${libdir}/krb5/plugins/kdb/kldap.so \
139 ${sbindir}/kdb5_ldap_util"
140
141FILES_${PN}-kpropd = "${sbindir}/kpropd"
142FILES_${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so"
143FILES_${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so"
144FILES_${PN}-user = "${bindir}/k*"
145
146FILES_libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}"
147FILES_libgssrpc = "${libdir}/libgssrpc${SOLIBS}"
148FILES_libk5crypto = "${libdir}/libk5crypto${SOLIBS}"
149FILES_libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}"
150FILES_libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}"
151FILES_libkdb5 = "${libdir}/libkdb5${SOLIBS}"
152FILES_libkrad = "${libdir}/libkrad${SOLIBS}"
153FILES_libkrb5 = "${libdir}/libkrb5${SOLIBS} \
154 ${libdir}/krb5/plugins/authdata \
155 ${libdir}/krb5/plugins/libkrb5"
156FILES_libkrb5support = "${libdir}/libkrb5support${SOLIBS}"
157FILES_libverto = "${libdir}/libverto${SOLIBS}"
158
159RDEPENDS_${PN}-kadmin-server = "${PN}-kdc"
160RDEPENDS_${PN}-kpropd = "${PN}-kdc"
161
162INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc"
163INITSCRIPT_NAME_${PN}-admin-server = "krb5-admin-server"
164INITSCRIPT_NAME_${PN}-kdc = "krb5-kdc"
165
166SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc"
167SYSTEMD_SERVICE_${PN}-admin-server = "krb5-admin-server.service"
168SYSTEMD_SERVICE_${PN}-kdc = "krb5-kdc.service"
169
170pkg_postinst_${PN}-kdc () {
94 if [ -z "$D" ]; then 171 if [ -z "$D" ]; then
95 if command -v systemd-tmpfiles >/dev/null; then 172 if command -v systemd-tmpfiles >/dev/null; then
96 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf 173 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf