diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/krb5/krb5_1.22.2.bb')
| -rw-r--r-- | meta-oe/recipes-connectivity/krb5/krb5_1.22.2.bb | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.22.2.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.22.2.bb new file mode 100644 index 0000000000..89e5502847 --- /dev/null +++ b/meta-oe/recipes-connectivity/krb5/krb5_1.22.2.bb | |||
| @@ -0,0 +1,203 @@ | |||
| 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=c1deab93872560046ba4411e77050d24" | ||
| 18 | |||
| 19 | inherit autotools-brokensep binconfig perlnative systemd update-rc.d pkgconfig | ||
| 20 | |||
| 21 | SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
| 22 | SRC_URI = "http://web.mit.edu/kerberos/dist/${BPN}/${SHRT_VER}/${BP}.tar.gz \ | ||
| 23 | file://debian-suppress-usr-lib-in-krb5-config.patch;striplevel=2 \ | ||
| 24 | file://fix-strchr-conformance-to-C23.patch;striplevel=2 \ | ||
| 25 | file://crosscompile_nm.patch \ | ||
| 26 | file://0001-configure.ac-replace-K5_AC_INIT-with-explicit-AC_INI.patch;striplevel=2 \ | ||
| 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 | " | ||
| 34 | |||
| 35 | SRC_URI[sha256sum] = "3243ffbc8ea4d4ac22ddc7dd2a1dc54c57874c40648b60ff97009763554eaf13" | ||
| 36 | |||
| 37 | CVE_PRODUCT = "kerberos" | ||
| 38 | CVE_VERSION = "5-${PV}" | ||
| 39 | |||
| 40 | S = "${UNPACKDIR}/${BP}/src" | ||
| 41 | |||
| 42 | DEPENDS = "bison-native ncurses util-linux e2fsprogs e2fsprogs-native openssl" | ||
| 43 | |||
| 44 | PACKAGECONFIG ??= "pkinit" | ||
| 45 | PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" | ||
| 46 | PACKAGECONFIG[openssl] = "--with-crypto-impl=openssl,,openssl" | ||
| 47 | PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils" | ||
| 48 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" | ||
| 49 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" | ||
| 50 | PACKAGECONFIG[pkinit] = "--enable-pkinit, --disable-pkinit" | ||
| 51 | |||
| 52 | EXTRA_OECONF += "--with-system-et --disable-rpath" | ||
| 53 | CACHED_CONFIGUREVARS += "krb5_cv_attr_constructor_destructor=yes ac_cv_func_regcomp=yes \ | ||
| 54 | ac_cv_printf_positional=yes ac_cv_file__etc_environment=yes \ | ||
| 55 | ac_cv_file__etc_TIMEZONE=no" | ||
| 56 | |||
| 57 | CFLAGS:append = " -fPIC -DDESTRUCTOR_ATTR_WORKS=1 -I${STAGING_INCDIR}/et" | ||
| 58 | CFLAGS:append:riscv64 = " -D_REENTRANT -pthread" | ||
| 59 | LDFLAGS:append = " -pthread" | ||
| 60 | |||
| 61 | do_configure() { | ||
| 62 | gnu-configize --force | ||
| 63 | autoreconf | ||
| 64 | oe_runconf | ||
| 65 | } | ||
| 66 | |||
| 67 | do_install:append() { | ||
| 68 | rm -rf ${D}/${localstatedir}/run | ||
| 69 | rm -f ${D}${bindir}/sclient | ||
| 70 | rm -f ${D}${bindir}/sim_client | ||
| 71 | rm -f ${D}${bindir}/uuclient | ||
| 72 | rm -f ${D}${sbindir}/krb5-send-pr | ||
| 73 | rm -f ${D}${sbindir}/sim_server | ||
| 74 | rm -f ${D}${sbindir}/sserver | ||
| 75 | rm -f ${D}${sbindir}/uuserver | ||
| 76 | |||
| 77 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 78 | mkdir -p ${D}/${sysconfdir}/init.d ${D}/${sysconfdir}/default | ||
| 79 | install -m 0755 ${UNPACKDIR}/etc/init.d/* ${D}/${sysconfdir}/init.d | ||
| 80 | install -m 0644 ${UNPACKDIR}/etc/default/* ${D}/${sysconfdir}/default | ||
| 81 | |||
| 82 | mkdir -p ${D}/${sysconfdir}/default/volatiles | ||
| 83 | echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \ | ||
| 84 | > ${D}${sysconfdir}/default/volatiles/87_krb5 | ||
| 85 | |||
| 86 | echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server | ||
| 87 | fi | ||
| 88 | |||
| 89 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 90 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 91 | echo "d /run/krb5kdc - - - -" \ | ||
| 92 | > ${D}${sysconfdir}/tmpfiles.d/krb5.conf | ||
| 93 | |||
| 94 | mkdir -p ${D}/${sysconfdir}/default | ||
| 95 | install -m 0644 ${UNPACKDIR}/etc/default/* ${D}/${sysconfdir}/default | ||
| 96 | |||
| 97 | install -d ${D}${systemd_system_unitdir} | ||
| 98 | install -m 0644 ${UNPACKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir} | ||
| 99 | install -m 0644 ${UNPACKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir} | ||
| 100 | fi | ||
| 101 | |||
| 102 | sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ | ||
| 103 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ | ||
| 104 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ | ||
| 105 | -i ${D}${bindir}/krb5-config | ||
| 106 | } | ||
| 107 | |||
| 108 | PACKAGE_BEFORE_PN =+ "${PN}-admin-server \ | ||
| 109 | ${PN}-gss-samples \ | ||
| 110 | ${PN}-k5tls \ | ||
| 111 | ${PN}-kdc \ | ||
| 112 | ${PN}-kdc-ldap \ | ||
| 113 | ${PN}-kpropd \ | ||
| 114 | ${PN}-otp \ | ||
| 115 | ${PN}-pkinit \ | ||
| 116 | ${PN}-spake \ | ||
| 117 | ${PN}-user \ | ||
| 118 | libgssapi-krb5 \ | ||
| 119 | libgssrpc \ | ||
| 120 | libk5crypto \ | ||
| 121 | libkadm5clnt-mit \ | ||
| 122 | libkadm5srv-mit \ | ||
| 123 | libkdb5 \ | ||
| 124 | libkrad \ | ||
| 125 | libkrb5 \ | ||
| 126 | libkrb5support \ | ||
| 127 | libverto" | ||
| 128 | |||
| 129 | FILES:${PN} = "${libdir}/krb5/plugins/preauth/test.so" | ||
| 130 | FILES:${PN}-doc += "${datadir}/examples" | ||
| 131 | FILES:${PN}-dbg += "${libdir}/krb5/plugins/*/.debug" | ||
| 132 | |||
| 133 | FILES:${PN}-admin-server = "${sbindir}/kadmin.local \ | ||
| 134 | ${sbindir}/kadmind \ | ||
| 135 | ${sbindir}/kprop \ | ||
| 136 | ${sysconfdir}/default/krb5-admin-server \ | ||
| 137 | ${sysconfdir}/init.d/krb5-admin-server \ | ||
| 138 | ${systemd_system_unitdir}/krb5-admin-server.service" | ||
| 139 | |||
| 140 | FILES:${PN}-gss-samples = "${bindir}/gss-client \ | ||
| 141 | ${sbindir}/gss-server" | ||
| 142 | |||
| 143 | FILES:${PN}-k5tls = "${libdir}/krb5/plugins/tls/k5tls.so" | ||
| 144 | |||
| 145 | FILES:${PN}-kdc = "${libdir}/krb5/plugins/kdb/db2.so \ | ||
| 146 | ${localstatedir}/krb5kdc \ | ||
| 147 | ${sbindir}/kdb5_util \ | ||
| 148 | ${sbindir}/kproplog \ | ||
| 149 | ${sbindir}/krb5kdc \ | ||
| 150 | ${sysconfdir}/default/krb5-kdc \ | ||
| 151 | ${sysconfdir}/default/volatiles/87_krb5 \ | ||
| 152 | ${sysconfdir}/init.d/krb5-kdc \ | ||
| 153 | ${sysconfdir}/tmpfiles.d/krb5.conf \ | ||
| 154 | ${systemd_system_unitdir}/krb5-kdc.service" | ||
| 155 | |||
| 156 | FILES:${PN}-kdc-ldap = "${libdir}/libkdb_ldap${SOLIBS} \ | ||
| 157 | ${libdir}/krb5/plugins/kdb/kldap.so \ | ||
| 158 | ${sbindir}/kdb5_ldap_util" | ||
| 159 | |||
| 160 | FILES:${PN}-kpropd = "${sbindir}/kpropd" | ||
| 161 | FILES:${PN}-otp = "${libdir}/krb5/plugins/preauth/otp.so" | ||
| 162 | FILES:${PN}-pkinit = "${libdir}/krb5/plugins/preauth/pkinit.so" | ||
| 163 | FILES:${PN}-spake = "${libdir}/krb5/plugins/preauth/spake.so" | ||
| 164 | FILES:${PN}-user = "${bindir}/k*" | ||
| 165 | |||
| 166 | FILES:libgssapi-krb5 = "${libdir}/libgssapi_krb5${SOLIBS}" | ||
| 167 | FILES:libgssrpc = "${libdir}/libgssrpc${SOLIBS}" | ||
| 168 | FILES:libk5crypto = "${libdir}/libk5crypto${SOLIBS}" | ||
| 169 | FILES:libkadm5clnt-mit = "${libdir}/libkadm5clnt_mit${SOLIBS}" | ||
| 170 | FILES:libkadm5srv-mit = "${libdir}/libkadm5srv_mit${SOLIBS}" | ||
| 171 | FILES:libkdb5 = "${libdir}/libkdb5${SOLIBS}" | ||
| 172 | FILES:libkrad = "${libdir}/libkrad${SOLIBS}" | ||
| 173 | FILES:libkrb5 = "${libdir}/libkrb5${SOLIBS} \ | ||
| 174 | ${libdir}/krb5/plugins/authdata \ | ||
| 175 | ${libdir}/krb5/plugins/libkrb5" | ||
| 176 | FILES:libkrb5support = "${libdir}/libkrb5support${SOLIBS}" | ||
| 177 | FILES:libverto = "${libdir}/libverto${SOLIBS}" | ||
| 178 | |||
| 179 | RDEPENDS:${PN}-kadmin-server = "${PN}-kdc" | ||
| 180 | RDEPENDS:${PN}-kpropd = "${PN}-kdc" | ||
| 181 | |||
| 182 | INITSCRIPT_PACKAGES = "${PN}-admin-server ${PN}-kdc" | ||
| 183 | INITSCRIPT_NAME:${PN}-admin-server = "krb5-admin-server" | ||
| 184 | INITSCRIPT_NAME:${PN}-kdc = "krb5-kdc" | ||
| 185 | |||
| 186 | SYSTEMD_PACKAGES = "${PN}-admin-server ${PN}-kdc" | ||
| 187 | SYSTEMD_SERVICE:${PN}-admin-server = "krb5-admin-server.service" | ||
| 188 | SYSTEMD_SERVICE:${PN}-kdc = "krb5-kdc.service" | ||
| 189 | |||
| 190 | pkg_postinst:${PN}-kdc () { | ||
| 191 | if [ -z "$D" ]; then | ||
| 192 | if command -v systemd-tmpfiles >/dev/null; then | ||
| 193 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf | ||
| 194 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | ||
| 195 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
| 196 | fi | ||
| 197 | fi | ||
| 198 | } | ||
| 199 | |||
| 200 | BBCLASSEXTEND = "native nativesdk" | ||
| 201 | |||
| 202 | inherit multilib_script | ||
| 203 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/krb5-config" | ||
