Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "A network authentication protocol" |
| 2 | DESCRIPTION = "Kerberos is a system for authenticating users and services on a network. \ |
| 3 | Kerberos is a trusted third-party service. That means that there is a \ |
| 4 | third party (the Kerberos server) that is trusted by all the entities on \ |
| 5 | the network (users and services, usually called "principals"). \ |
| 6 | . \ |
| 7 | This is the MIT reference implementation of Kerberos V5. \ |
| 8 | . \ |
| 9 | This package contains the Kerberos key server (KDC). The KDC manages all \ |
| 10 | authentication credentials for a Kerberos realm, holds the master keys \ |
| 11 | for the realm, and responds to authentication requests. This package \ |
| 12 | should be installed on both master and slave KDCs." |
| 13 | |
| 14 | HOMEPAGE = "http://web.mit.edu/Kerberos/" |
| 15 | SECTION = "console/network" |
| 16 | LICENSE = "MIT" |
| 17 | LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=aff541e7261f1926ac6a2a9a7bbab839" |
| 18 | DEPENDS = "bison-native ncurses util-linux e2fsprogs e2fsprogs-native openssl" |
| 19 | |
| 20 | inherit autotools-brokensep binconfig perlnative systemd update-rc.d |
| 21 | |
| 22 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" |
| 23 | SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ |
| 24 | file://0001-aclocal-Add-parameter-to-disable-keyutils-detection.patch \ |
| 25 | file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ |
| 26 | file://crosscompile_nm.patch \ |
| 27 | file://etc/init.d/krb5-kdc \ |
| 28 | file://etc/init.d/krb5-admin-server \ |
| 29 | file://etc/default/krb5-kdc \ |
| 30 | file://etc/default/krb5-admin-server \ |
| 31 | file://krb5-kdc.service \ |
| 32 | file://krb5-admin-server.service \ |
| 33 | " |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 34 | SRC_URI[md5sum] = "417d654c72526ac51466e7fe84608878" |
| 35 | SRC_URI[sha256sum] = "3706d7ec2eaa773e0e32d3a87bf742ebaecae7d064e190443a3acddfd8afb181" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 36 | |
| 37 | CVE_PRODUCT = "kerberos" |
| 38 | CVE_VERSION = "5-${PV}" |
| 39 | |
| 40 | S = "${WORKDIR}/${BP}/src" |
| 41 | |
| 42 | PACKAGECONFIG ??= "pkinit" |
| 43 | PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" |
| 44 | PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl" |
| 45 | PACKAGECONFIG[keyutils] = "--enable-keyutils,--disable-keyutils,keyutils" |
| 46 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" |
| 47 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" |
| 48 | PACKAGECONFIG[pkinit] = "--enable-pkinit, --disable-pkinit" |
| 49 | |
| 50 | EXTRA_OECONF += " --without-tcl --with-system-et --disable-rpath" |
| 51 | CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \ |
| 52 | ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ |
| 53 | ac_cv_file__etc_TIMEZONE=no" |
| 54 | |
| 55 | CFLAGS_append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" |
| 56 | CFLAGS_append_riscv64 = " -D_REENTRANT -pthread" |
| 57 | LDFLAGS_append = " -pthread" |
| 58 | |
| 59 | do_configure() { |
| 60 | gnu-configize --force |
| 61 | autoreconf |
| 62 | oe_runconf |
| 63 | } |
| 64 | |
| 65 | do_install_append() { |
| 66 | rm -rf ${D}/${localstatedir}/run |
| 67 | rm -f ${D}${bindir}/sclient |
| 68 | rm -f ${D}${bindir}/sim_client |
| 69 | rm -f ${D}${bindir}/uuclient |
| 70 | rm -f ${D}${sbindir}/krb5-send-pr |
| 71 | rm -f ${D}${sbindir}/sim_server |
| 72 | rm -f ${D}${sbindir}/sserver |
| 73 | rm -f ${D}${sbindir}/uuserver |
| 74 | |
| 75 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 76 | mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default |
| 77 | install -m 0755 ${WORKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d |
| 78 | install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default |
| 79 | |
| 80 | mkdir -p ${D}/${sysconfdir}/default/volatiles |
| 81 | echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ |
| 82 | > ${D}${sysconfdir}/default/volatiles/87_krb5 |
| 83 | |
| 84 | echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server |
| 85 | fi |
| 86 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 87 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 88 | echo "d /run/krb5kdc - - - -" \ |
| 89 | > ${D}${sysconfdir}/tmpfiles.d/krb5.conf |
| 90 | |
| 91 | mkdir -p ${D}/${sysconfdir}/default |
| 92 | install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default |
| 93 | |
| 94 | install -d ${D}${systemd_system_unitdir} |
| 95 | install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} |
| 96 | install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} |
| 97 | fi |
| 98 | } |
| 99 | |
| 100 | PACKAGES =+ "${PN}-admin-server \ |
| 101 | ${PN}-gss-samples \ |
| 102 | ${PN}-k5tls \ |
| 103 | ${PN}-kdc \ |
| 104 | ${PN}-kdc-ldap \ |
| 105 | ${PN}-kpropd \ |
| 106 | ${PN}-otp \ |
| 107 | ${PN}-pkinit \ |
| 108 | ${PN}-spake \ |
| 109 | ${PN}-user \ |
| 110 | libgssapi-krb5 \ |
| 111 | libgssrpc \ |
| 112 | libk5crypto \ |
| 113 | libkadm5clnt-mit \ |
| 114 | libkadm5srv-mit \ |
| 115 | libkdb5 \ |
| 116 | libkrad \ |
| 117 | libkrb5 \ |
| 118 | libkrb5support \ |
| 119 | libverto" |
| 120 | |
| 121 | FILES_${PN} = "${libdir}/krb5/plugins/preauth/test.so" |
| 122 | FILES_${PN}-doc += "${datadir}/examples" |
| 123 | FILES_${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" |
| 124 | |
| 125 | FILES_${PN}-admin-server = "${sbindir}/kadmin.local \ |
| 126 | ${sbindir}/kadmind \ |
| 127 | ${sbindir}/kprop \ |
| 128 | ${sysconfdir}/default/krb5-admin-server \ |
| 129 | ${sysconfdir}/init.d/krb5-admin-server \ |
| 130 | ${systemd_system_unitdir}/krb5-admin-server.service" |
| 131 | |
| 132 | FILES_${PN}-gss-samples = "${bindir}/gss-client \ |
| 133 | ${sbindir}/gss-server" |
| 134 | |
| 135 | FILES_${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" |
| 136 | |
| 137 | FILES_${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ |
| 138 | ${localstatedir}/krb5kdc \ |
| 139 | ${sbindir}/kdb5_util \ |
| 140 | ${sbindir}/kproplog \ |
| 141 | ${sbindir}/krb5kdc \ |
| 142 | ${sysconfdir}/default/krb5-kdc \ |
| 143 | ${sysconfdir}/default/volatiles/87_krb5 \ |
| 144 | ${sysconfdir}/init.d/krb5-kdc \ |
| 145 | ${sysconfdir}/tmpfiles.d/krb5.conf \ |
| 146 | ${systemd_system_unitdir}/krb5-kdc.service" |
| 147 | |
| 148 | FILES_${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \ |
| 149 | ${libdir}/krb5/plugins/kdb/kldap.so \ |
| 150 | ${sbindir}/kdb5_ldap_util" |
| 151 | |
| 152 | FILES_${PN}-kpropd = "${sbindir}/kpropd" |
| 153 | FILES_${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" |
| 154 | FILES_${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" |
| 155 | FILES_${PN}-spake = "${libdir}/krb5/plugins/preauth/spake.so" |
| 156 | FILES_${PN}-user = "${bindir}/k*" |
| 157 | |
| 158 | FILES_libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" |
| 159 | FILES_libgssrpc = "${libdir}/libgssrpc${SOLIBS}" |
| 160 | FILES_libk5crypto = "${libdir}/libk5crypto${SOLIBS}" |
| 161 | FILES_libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" |
| 162 | FILES_libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" |
| 163 | FILES_libkdb5 = "${libdir}/libkdb5${SOLIBS}" |
| 164 | FILES_libkrad = "${libdir}/libkrad${SOLIBS}" |
| 165 | FILES_libkrb5 = "${libdir}/libkrb5${SOLIBS} \ |
| 166 | ${libdir}/krb5/plugins/authdata \ |
| 167 | ${libdir}/krb5/plugins/libkrb5" |
| 168 | FILES_libkrb5support = "${libdir}/libkrb5support${SOLIBS}" |
| 169 | FILES_libverto = "${libdir}/libverto${SOLIBS}" |
| 170 | |
| 171 | RDEPENDS_${PN}-kadmin-server = "${PN}-kdc" |
| 172 | RDEPENDS_${PN}-kpropd = "${PN}-kdc" |
| 173 | |
| 174 | INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" |
| 175 | INITSCRIPT_NAME_${PN}-admin-server = "krb5-admin-server" |
| 176 | INITSCRIPT_NAME_${PN}-kdc = "krb5-kdc" |
| 177 | |
| 178 | SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" |
| 179 | SYSTEMD_SERVICE_${PN}-admin-server = "krb5-admin-server.service" |
| 180 | SYSTEMD_SERVICE_${PN}-kdc = "krb5-kdc.service" |
| 181 | |
| 182 | pkg_postinst_${PN}-kdc () { |
| 183 | if [ -z "$D" ]; then |
| 184 | if command -v systemd-tmpfiles >/dev/null; then |
| 185 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf |
| 186 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then |
| 187 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 188 | fi |
| 189 | fi |
| 190 | } |
| 191 | |
| 192 | BBCLASSEXTEND = "native nativesdk" |