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" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 17 | LIC_FILES_CHKSUM = "file://${S}/../NOTICE;md5=dd4d0ad4c5e98abb58aa0d312f276791" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 34 | SRC_URI[md5sum] = "aa4337fffa3b61f22dbd0167f708818f" |
| 35 | SRC_URI[sha256sum] = "1a4bba94df92f6d39a197a10687653e8bfbc9a2076e129f6eb92766974f86134" |
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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 55 | CFLAGS:append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" |
| 56 | CFLAGS:append:riscv64 = " -D_REENTRANT -pthread" |
| 57 | LDFLAGS:append = " -pthread" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 58 | |
| 59 | do_configure() { |
| 60 | gnu-configize --force |
| 61 | autoreconf |
| 62 | oe_runconf |
| 63 | } |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | do_install:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 98 | |
| 99 | sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ |
| 100 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ |
| 101 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ |
| 102 | -i ${D}${bindir}/krb5-config |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | PACKAGES =+ "${PN}-admin-server \ |
| 106 | ${PN}-gss-samples \ |
| 107 | ${PN}-k5tls \ |
| 108 | ${PN}-kdc \ |
| 109 | ${PN}-kdc-ldap \ |
| 110 | ${PN}-kpropd \ |
| 111 | ${PN}-otp \ |
| 112 | ${PN}-pkinit \ |
| 113 | ${PN}-spake \ |
| 114 | ${PN}-user \ |
| 115 | libgssapi-krb5 \ |
| 116 | libgssrpc \ |
| 117 | libk5crypto \ |
| 118 | libkadm5clnt-mit \ |
| 119 | libkadm5srv-mit \ |
| 120 | libkdb5 \ |
| 121 | libkrad \ |
| 122 | libkrb5 \ |
| 123 | libkrb5support \ |
| 124 | libverto" |
| 125 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 126 | FILES:${PN} = "${libdir}/krb5/plugins/preauth/test.so" |
| 127 | FILES:${PN}-doc += "${datadir}/examples" |
| 128 | FILES:${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 129 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 130 | FILES:${PN}-admin-server = "${sbindir}/kadmin.local \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 131 | ${sbindir}/kadmind \ |
| 132 | ${sbindir}/kprop \ |
| 133 | ${sysconfdir}/default/krb5-admin-server \ |
| 134 | ${sysconfdir}/init.d/krb5-admin-server \ |
| 135 | ${systemd_system_unitdir}/krb5-admin-server.service" |
| 136 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 137 | FILES:${PN}-gss-samples = "${bindir}/gss-client \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 138 | ${sbindir}/gss-server" |
| 139 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 140 | FILES:${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 141 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 142 | FILES:${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 143 | ${localstatedir}/krb5kdc \ |
| 144 | ${sbindir}/kdb5_util \ |
| 145 | ${sbindir}/kproplog \ |
| 146 | ${sbindir}/krb5kdc \ |
| 147 | ${sysconfdir}/default/krb5-kdc \ |
| 148 | ${sysconfdir}/default/volatiles/87_krb5 \ |
| 149 | ${sysconfdir}/init.d/krb5-kdc \ |
| 150 | ${sysconfdir}/tmpfiles.d/krb5.conf \ |
| 151 | ${systemd_system_unitdir}/krb5-kdc.service" |
| 152 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 153 | FILES:${PN}-kdc-ldap = "${libdir}/krb5/libkdb_ldap${SOLIBS} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 154 | ${libdir}/krb5/plugins/kdb/kldap.so \ |
| 155 | ${sbindir}/kdb5_ldap_util" |
| 156 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 157 | FILES:${PN}-kpropd = "${sbindir}/kpropd" |
| 158 | FILES:${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" |
| 159 | FILES:${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" |
| 160 | FILES:${PN}-spake = "${libdir}/krb5/plugins/preauth/spake.so" |
| 161 | FILES:${PN}-user = "${bindir}/k*" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 162 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 163 | FILES:libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" |
| 164 | FILES:libgssrpc = "${libdir}/libgssrpc${SOLIBS}" |
| 165 | FILES:libk5crypto = "${libdir}/libk5crypto${SOLIBS}" |
| 166 | FILES:libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" |
| 167 | FILES:libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" |
| 168 | FILES:libkdb5 = "${libdir}/libkdb5${SOLIBS}" |
| 169 | FILES:libkrad = "${libdir}/libkrad${SOLIBS}" |
| 170 | FILES:libkrb5 = "${libdir}/libkrb5${SOLIBS} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 171 | ${libdir}/krb5/plugins/authdata \ |
| 172 | ${libdir}/krb5/plugins/libkrb5" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 173 | FILES:libkrb5support = "${libdir}/libkrb5support${SOLIBS}" |
| 174 | FILES:libverto = "${libdir}/libverto${SOLIBS}" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 175 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 176 | RDEPENDS:${PN}-kadmin-server = "${PN}-kdc" |
| 177 | RDEPENDS:${PN}-kpropd = "${PN}-kdc" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 178 | |
| 179 | INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 180 | INITSCRIPT_NAME:${PN}-admin-server = "krb5-admin-server" |
| 181 | INITSCRIPT_NAME:${PN}-kdc = "krb5-kdc" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 182 | |
| 183 | SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 184 | SYSTEMD_SERVICE:${PN}-admin-server = "krb5-admin-server.service" |
| 185 | SYSTEMD_SERVICE:${PN}-kdc = "krb5-kdc.service" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 186 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 187 | pkg_postinst:${PN}-kdc () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 188 | if [ -z "$D" ]; then |
| 189 | if command -v systemd-tmpfiles >/dev/null; then |
| 190 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf |
| 191 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then |
| 192 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 193 | fi |
| 194 | fi |
| 195 | } |
| 196 | |
| 197 | BBCLASSEXTEND = "native nativesdk" |