mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 09:26:58 +02:00
app-crypt/mit-krb5: move to coreos-overlay
To add a custom patch to mit-krb5, move it to coreos-overlay.
This commit is contained in:
parent
659f32a73b
commit
bfc8d0ef5f
@ -1,2 +0,0 @@
|
||||
DIST krb5-1.18.2.tar.gz 8713927 BLAKE2B f0eb34e67adcb86f347c59ec6ef74970a57530cc56336a84909f852cd6135079ea89828e77c906a272f54e0faf6a4a0497f2b648446eb9d048d1c51e4ec513af SHA512 7cbb1b28e677fea3e0794e93951f3caaa2c49bb1175dd187951e72a466cc69d96c3b833d838000fe911c1a437d96a558e550f27c53a8b332fb9dfc7cbb7ec44c
|
||||
DIST krb5-1.18.3.tar.gz 8715312 BLAKE2B 4f6ad4a529e7578e83d82b43c2cada33bce1dca5081ec826ee06a713f82520b783f72ec56d2ce289e10d1ddcfaa079491e43f21c035b214d244bb80e6b2a1c9f SHA512 cf0bf6cf8f622fa085954e6da998d952cf64dc7ccc319972ed81ea0542089cabf2d0e8243df84da01ad6f40584768ca2f02d108630c6741fa7b3d7d98c887c01
|
@ -1,71 +0,0 @@
|
||||
diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c
|
||||
index a160cf4fe8..cd6b879f77 100644
|
||||
--- a/lib/krb5/asn.1/asn1_encode.c
|
||||
+++ b/lib/krb5/asn.1/asn1_encode.c
|
||||
@@ -356,7 +356,7 @@ make_tag(asn1buf *buf, const taginfo *t, size_t len)
|
||||
static krb5_error_code
|
||||
get_tag(const uint8_t *asn1, size_t len, taginfo *tag_out,
|
||||
const uint8_t **contents_out, size_t *clen_out,
|
||||
- const uint8_t **remainder_out, size_t *rlen_out)
|
||||
+ const uint8_t **remainder_out, size_t *rlen_out, int recursion)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
uint8_t o;
|
||||
@@ -394,9 +394,11 @@ get_tag(const uint8_t *asn1, size_t len, taginfo *tag_out,
|
||||
/* Indefinite form (should not be present in DER, but we accept it). */
|
||||
if (tag_out->construction != CONSTRUCTED)
|
||||
return ASN1_MISMATCH_INDEF;
|
||||
+ if (recursion >= 32)
|
||||
+ return ASN1_OVERFLOW;
|
||||
p = asn1;
|
||||
while (!(len >= 2 && p[0] == 0 && p[1] == 0)) {
|
||||
- ret = get_tag(p, len, &t, &c, &clen, &p, &len);
|
||||
+ ret = get_tag(p, len, &t, &c, &clen, &p, &len, recursion + 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -613,7 +615,7 @@ split_der(asn1buf *buf, uint8_t *const *der, size_t len, taginfo *tag_out)
|
||||
const uint8_t *contents, *remainder;
|
||||
size_t clen, rlen;
|
||||
|
||||
- ret = get_tag(*der, len, tag_out, &contents, &clen, &remainder, &rlen);
|
||||
+ ret = get_tag(*der, len, tag_out, &contents, &clen, &remainder, &rlen, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (rlen != 0)
|
||||
@@ -1199,7 +1201,7 @@ decode_atype(const taginfo *t, const uint8_t *asn1, size_t len,
|
||||
const uint8_t *rem;
|
||||
size_t rlen;
|
||||
if (!tag->implicit) {
|
||||
- ret = get_tag(asn1, len, &inner_tag, &asn1, &len, &rem, &rlen);
|
||||
+ ret = get_tag(asn1, len, &inner_tag, &asn1, &len, &rem, &rlen, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Note: we don't check rlen (it should be 0). */
|
||||
@@ -1420,7 +1422,7 @@ decode_sequence(const uint8_t *asn1, size_t len, const struct seq_info *seq,
|
||||
for (i = 0; i < seq->n_fields; i++) {
|
||||
if (len == 0)
|
||||
break;
|
||||
- ret = get_tag(asn1, len, &t, &contents, &clen, &asn1, &len);
|
||||
+ ret = get_tag(asn1, len, &t, &contents, &clen, &asn1, &len, 0);
|
||||
if (ret)
|
||||
goto error;
|
||||
/*
|
||||
@@ -1478,7 +1480,7 @@ decode_sequence_of(const uint8_t *asn1, size_t len,
|
||||
*seq_out = NULL;
|
||||
*count_out = 0;
|
||||
while (len > 0) {
|
||||
- ret = get_tag(asn1, len, &t, &contents, &clen, &asn1, &len);
|
||||
+ ret = get_tag(asn1, len, &t, &contents, &clen, &asn1, &len, 0);
|
||||
if (ret)
|
||||
goto error;
|
||||
if (!check_atype_tag(elemtype, &t)) {
|
||||
@@ -1584,7 +1586,7 @@ k5_asn1_full_decode(const krb5_data *code, const struct atype_info *a,
|
||||
|
||||
*retrep = NULL;
|
||||
ret = get_tag((uint8_t *)code->data, code->length, &t, &contents,
|
||||
- &clen, &remainder, &rlen);
|
||||
+ &clen, &remainder, &rlen, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* rlen should be 0, but we don't check it (and due to padding in
|
@ -1,11 +0,0 @@
|
||||
service tell
|
||||
{
|
||||
disable = yes
|
||||
socket_type = stream
|
||||
user = root
|
||||
wait = no
|
||||
server = /usr/sbin/kpropd
|
||||
only_from = 0.0.0.0
|
||||
log_on_success = PID HOST EXIT DURATION
|
||||
log_on_failure = HOST
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
gentoo bug #498794
|
||||
--- src/aclocal.m4 2014-01-16 00:44:15.000000000 +0000
|
||||
+++ src/aclocal.m4 2014-03-26 10:20:54.000000000 +0000
|
||||
@@ -501,6 +501,7 @@
|
||||
fi
|
||||
if test "x$krb5_ac_warn_cflags_set" = xset ; then
|
||||
AC_MSG_NOTICE(not adding extra gcc warning flags because WARN_CFLAGS was set)
|
||||
+ WARN_CFLAGS=""
|
||||
else
|
||||
AC_MSG_NOTICE(adding extra warning flags for gcc)
|
||||
WARN_CFLAGS="$WARN_CFLAGS $extra_gcc_warn_opts -Wmissing-prototypes"
|
@ -1,101 +0,0 @@
|
||||
From 58263cbf3106f4c9c9a2252794093014a2f9c01f Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Strogin <stefan.strogin@gmail.com>
|
||||
Date: Thu, 25 Apr 2019 03:48:10 +0300
|
||||
Subject: [PATCH] Fix build for LibreSSL 2.9.x
|
||||
|
||||
asn1_mac.h is removed from LibreSSL 2.9.0, but static_ASN1_*() methods
|
||||
are not defined. Define them.
|
||||
|
||||
Upstream-Status: Pending
|
||||
[Needs to be amended if
|
||||
https://github.com/libressl-portable/openbsd/pull/109 is accepted]
|
||||
Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
|
||||
---
|
||||
.../preauth/pkinit/pkinit_crypto_openssl.c | 13 ++++++++----
|
||||
.../preauth/pkinit/pkinit_crypto_openssl.h | 20 ++++++++++++++++++-
|
||||
2 files changed, 28 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
|
||||
index 2064eb7bd..81d5d3cf2 100644
|
||||
--- a/plugins/preauth/pkinit/pkinit_crypto_openssl.c
|
||||
+++ b/plugins/preauth/pkinit/pkinit_crypto_openssl.c
|
||||
@@ -188,14 +188,16 @@ pkinit_pkcs11_code_to_text(int err);
|
||||
(*_x509_pp) = PKCS7_cert_from_signer_info(_p7,_si)
|
||||
#endif
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
-/* 1.1 standardizes constructor and destructor names, renaming
|
||||
- * EVP_MD_CTX_{create,destroy} and deprecating ASN1_STRING_data. */
|
||||
+/* 1.1 (and LibreSSL 2.7) standardizes constructor and destructor names,
|
||||
+ * renaming EVP_MD_CTX_{create,destroy} and deprecating ASN1_STRING_data. */
|
||||
|
||||
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
|
||||
#define EVP_MD_CTX_new EVP_MD_CTX_create
|
||||
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
|
||||
#define ASN1_STRING_get0_data ASN1_STRING_data
|
||||
+#endif
|
||||
|
||||
/* 1.1 makes many handle types opaque and adds accessors. Add compatibility
|
||||
* versions of the new accessors we use for pre-1.1. */
|
||||
@@ -203,6 +205,7 @@ pkinit_pkcs11_code_to_text(int err);
|
||||
#define OBJ_get0_data(o) ((o)->data)
|
||||
#define OBJ_length(o) ((o)->length)
|
||||
|
||||
+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL
|
||||
#define DH_set0_pqg compat_dh_set0_pqg
|
||||
static int compat_dh_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
|
||||
{
|
||||
@@ -235,6 +238,7 @@ static void compat_dh_get0_key(const DH *dh, const BIGNUM **pub,
|
||||
if (priv != NULL)
|
||||
*priv = dh->priv_key;
|
||||
}
|
||||
+#endif /* LIBRESSL_VERSION_NUMBER */
|
||||
|
||||
/* Return true if the cert c includes a key usage which doesn't include u.
|
||||
* Define using direct member access for pre-1.1. */
|
||||
@@ -3040,7 +3044,8 @@ cleanup:
|
||||
return retval;
|
||||
}
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || \
|
||||
+ LIBRESSL_VERSION_NUMBER >= 0x2090000fL
|
||||
|
||||
/*
|
||||
* We need to decode DomainParameters from RFC 3279 section 2.3.3. We would
|
||||
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.h b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.h
|
||||
index 7411348fa..ac91408c4 100644
|
||||
--- a/plugins/preauth/pkinit/pkinit_crypto_openssl.h
|
||||
+++ b/plugins/preauth/pkinit/pkinit_crypto_openssl.h
|
||||
@@ -46,7 +46,25 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || \
|
||||
+ LIBRESSL_VERSION_NUMBER >= 0x2090000fL
|
||||
+
|
||||
+#ifndef static_ASN1_SEQUENCE_END_name
|
||||
+#define static_ASN1_ITEM_start(itname) \
|
||||
+ static const ASN1_ITEM itname##_it = {
|
||||
+#define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
||||
+ ;\
|
||||
+ static_ASN1_ITEM_start(tname) \
|
||||
+ ASN1_ITYPE_SEQUENCE,\
|
||||
+ V_ASN1_SEQUENCE,\
|
||||
+ tname##_seq_tt,\
|
||||
+ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
||||
+ NULL,\
|
||||
+ sizeof(stname),\
|
||||
+ #stname \
|
||||
+ ASN1_ITEM_end(tname)
|
||||
+#endif /* !defined(static_ASN1_SEQUENCE_END_name) */
|
||||
+
|
||||
#include <openssl/asn1t.h>
|
||||
#else
|
||||
#include <openssl/asn1_mac.h>
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,42 +0,0 @@
|
||||
From e3e3bc2a20795becda6e130d511fe59f04635624 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Strogin <steils@gentoo.org>
|
||||
Date: Sat, 15 Feb 2020 10:27:20 +0200
|
||||
Subject: [PATCH] Fix compilation for LibreSSL 3.0.2
|
||||
|
||||
RSA_PKCS1_OpenSSL() is provided in LibreSSL the master branch,
|
||||
expected to be in the next release.
|
||||
See: https://github.com/libressl-portable/openbsd/commit/3a8c41f3a84868337fde01ec1122198ec60bdc8e
|
||||
|
||||
Bug: https://bugs.gentoo.org/709640
|
||||
Signed-off-by: Stefan Strogin <steils@gentoo.org>
|
||||
---
|
||||
tests/softpkcs11/main.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/softpkcs11/main.c b/tests/softpkcs11/main.c
|
||||
index 1cccdfb43..a5099fbe4 100644
|
||||
--- a/tests/softpkcs11/main.c
|
||||
+++ b/tests/softpkcs11/main.c
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#define EVP_PKEY_get0_RSA(key) ((key)->pkey.rsa)
|
||||
-#define RSA_PKCS1_OpenSSL RSA_PKCS1_SSLeay
|
||||
#define RSA_get0_key compat_rsa_get0_key
|
||||
static void
|
||||
compat_rsa_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e,
|
||||
@@ -62,6 +61,11 @@ compat_rsa_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e,
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
|
||||
+ defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER <= 0x3000200fL)
|
||||
+#define RSA_PKCS1_OpenSSL RSA_PKCS1_SSLeay
|
||||
+#endif
|
||||
+
|
||||
#define OPENSSL_ASN1_MALLOC_ENCODE(T, B, BL, S, R) \
|
||||
{ \
|
||||
unsigned char *p; \
|
||||
--
|
||||
2.25.0
|
||||
|
@ -1,12 +0,0 @@
|
||||
Bug #448778
|
||||
--- a/build-tools/krb5-config.in 2012-12-18 02:47:04.000000000 +0000
|
||||
+++ b/build-tools/krb5-config.in 2012-12-28 07:13:16.582693363 +0000
|
||||
@@ -217,7 +217,7 @@
|
||||
-e 's#\$(PROG_RPATH)#'$libdir'#' \
|
||||
-e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \
|
||||
-e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
|
||||
- -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
|
||||
+ -e 's#\$(LDFLAGS)##' \
|
||||
-e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
|
||||
-e 's#\$(CFLAGS)##'`
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- src/Makefile.in 2019-12-12 10:15:51.674552983 +0300
|
||||
+++ src/Makefile.in 2019-12-12 10:16:33.205543490 +0300
|
||||
@@ -71,7 +71,6 @@
|
||||
$(KRB5_AD_MODULE_DIR) \
|
||||
$(KRB5_LIBKRB5_MODULE_DIR) $(KRB5_TLS_MODULE_DIR) \
|
||||
@localstatedir@ @localstatedir@/krb5kdc \
|
||||
- @runstatedir@ @runstatedir@/krb5kdc \
|
||||
$(KRB5_INCSUBDIRS) $(datadir) $(EXAMPLEDIR) \
|
||||
$(PKGCONFIG_DIR)
|
||||
|
@ -1,2 +0,0 @@
|
||||
# Define startup options for Kerberos administration server
|
||||
KADMIND_OPTS=""
|
@ -1,25 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# This script starts/stops the MIT Kerberos 5 Admin daemon
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
daemon="MIT Kerberos 5 Admin daemon"
|
||||
exec="/usr/sbin/kadmind"
|
||||
|
||||
depend() {
|
||||
need mit-krb5kdc
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting $daemon"
|
||||
start-stop-daemon --start --quiet --exec ${exec} -- ${KADMIND_OPTS} 1>&2
|
||||
eend $? "Error starting $daemon"
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping $daemon"
|
||||
start-stop-daemon --stop --quiet --exec ${exec} 1>&2
|
||||
eend $? "Error stopping $daemon"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Kerberos 5 administration server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/kadmind -nofork
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,2 +0,0 @@
|
||||
# Define startup options for Kerberos KDC
|
||||
KDC_OPTS=""
|
@ -1,24 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# This script starts/stops the MIT Kerberos 5 KDC
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
daemon="MIT Kerberos 5 KDC"
|
||||
exec="/usr/sbin/krb5kdc"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting $daemon"
|
||||
start-stop-daemon --start --quiet --exec ${exec} -- ${KDC_OPTS} 1>&2
|
||||
eend $? "Error starting $daemon"
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping $daemon"
|
||||
start-stop-daemon --stop --quiet --exec ${exec} 1>&2
|
||||
eend $? "Error stopping $daemon"
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Kerberos 5 KDC
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/krb5kdc -n
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,2 +0,0 @@
|
||||
# Define startup options for Kerberos incremental propagation server
|
||||
KPROPD_OPTS=""
|
@ -1,24 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# This script starts/stops the MIT Kerberos 5 kpropd
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
daemon="MIT Kerberos 5 kpropd"
|
||||
exec="/usr/sbin/kpropd"
|
||||
|
||||
depend() {
|
||||
use net mit-krb5kdc mit-krb5kadmind
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting $daemon"
|
||||
start-stop-daemon --start --quiet --exec ${exec} -- ${KPROPD_OPTS} 1>&2
|
||||
eend $? "Error starting $daemon"
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping $daemon"
|
||||
start-stop-daemon --stop --quiet --exec ${exec} 1>&2
|
||||
eend $? "Error stopping $daemon"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Kerberos 5 propagation server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/kpropd -S
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Kerberos 5 propagation server
|
||||
|
||||
[Socket]
|
||||
ListenStream=754
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Kerberos 5 propagation server
|
||||
Conflicts=mit-krb5kpropd.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/kpropd
|
||||
StandardInput=socket
|
||||
StandardError=syslog
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>kerberos@gentoo.org</email>
|
||||
<name>Kerberos</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="doc">
|
||||
Creates and installs the API and implementation
|
||||
documentation. This is only useful if you want to develop software
|
||||
which depends on kerberos
|
||||
</flag>
|
||||
<flag name="keyutils">Enable for the keyring ccache using keyutils</flag>
|
||||
<flag name="lmdb">Add support for using dev-db/lmdb for lookup tables</flag>
|
||||
<flag name="pkinit">Enable pkinit support for the initial ticket</flag>
|
||||
<flag name="openldap">Enable support for ldap as a database backend</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:mit:kerberos</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,168 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
inherit autotools flag-o-matic multilib-minimal python-any-r1 systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/mit-}"
|
||||
P_DIR=$(ver_cut 1-2)
|
||||
DESCRIPTION="MIT Kerberos V"
|
||||
HOMEPAGE="https://web.mit.edu/kerberos/www/"
|
||||
SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
|
||||
IUSE="cpu_flags_x86_aes doc +keyutils libressl lmdb nls openldap +pkinit selinux +threads test xinetd"
|
||||
|
||||
# Test suite requires network access
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
!!app-crypt/heimdal
|
||||
>=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
|
||||
|| (
|
||||
>=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libverto-0.2.5[tevent,${MULTILIB_USEDEP}]
|
||||
)
|
||||
keyutils? ( >=sys-apps/keyutils-1.5.8:=[${MULTILIB_USEDEP}] )
|
||||
lmdb? ( dev-db/lmdb )
|
||||
nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
|
||||
openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
|
||||
pkinit? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
xinetd? ( sys-apps/xinetd )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
virtual/yacc
|
||||
cpu_flags_x86_aes? (
|
||||
amd64? ( dev-lang/yasm )
|
||||
x86? ( dev-lang/yasm )
|
||||
)
|
||||
doc? ( virtual/latex-base )
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
dev-lang/tcl:0
|
||||
dev-util/dejagnu
|
||||
dev-util/cmocka
|
||||
)"
|
||||
RDEPEND="${DEPEND}
|
||||
selinux? ( sec-policy/selinux-kerberos )"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.12_warn_cflags.patch"
|
||||
"${FILESDIR}/${PN}-config_LDFLAGS-r1.patch"
|
||||
"${FILESDIR}/${PN}-1.16.3-libressl-r1.patch"
|
||||
"${FILESDIR}/${PN}_dont_create_run.patch"
|
||||
"${FILESDIR}/${PN}-1.18-libressl.patch"
|
||||
"${FILESDIR}/CVE-2020-28196.patch"
|
||||
)
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/krb5-config
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Make sure we always use the system copies.
|
||||
rm -rf util/{et,ss,verto}
|
||||
sed -i 's:^[[:space:]]*util/verto$::' configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# QA
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags -fno-strict-overflow
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE=${S} \
|
||||
WARN_CFLAGS="set" \
|
||||
econf \
|
||||
$(use_with openldap ldap) \
|
||||
"$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
|
||||
$(use_enable nls) \
|
||||
$(use_enable pkinit) \
|
||||
$(use_enable threads thread-support) \
|
||||
$(use_with lmdb) \
|
||||
$(use_with keyutils) \
|
||||
--without-hesiod \
|
||||
--enable-shared \
|
||||
--with-system-et \
|
||||
--with-system-ss \
|
||||
--enable-dns-for-realm \
|
||||
--enable-kdc-lookaside-cache \
|
||||
--with-system-verto \
|
||||
--disable-rpath \
|
||||
\
|
||||
AR="$(tc-getAR)"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake -j1
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
multilib_is_native_abi && emake -j1 check
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
|
||||
install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# default database dir
|
||||
keepdir /var/lib/krb5kdc
|
||||
|
||||
cd ..
|
||||
dodoc README
|
||||
|
||||
if use doc; then
|
||||
dodoc -r doc/html
|
||||
docinto pdf
|
||||
dodoc doc/pdf/*.pdf
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind
|
||||
newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc
|
||||
newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd
|
||||
newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind
|
||||
newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc
|
||||
newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd
|
||||
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service"
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket
|
||||
|
||||
insinto /etc
|
||||
newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
|
||||
insinto /var/lib/krb5kdc
|
||||
newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
|
||||
|
||||
if use openldap ; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}/kpropd.xinetd" kpropd
|
||||
fi
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
inherit autotools flag-o-matic multilib-minimal python-any-r1 systemd toolchain-funcs
|
||||
|
||||
MY_P="${P/mit-}"
|
||||
P_DIR=$(ver_cut 1-2)
|
||||
DESCRIPTION="MIT Kerberos V"
|
||||
HOMEPAGE="https://web.mit.edu/kerberos/www/"
|
||||
SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
IUSE="cpu_flags_x86_aes doc +keyutils libressl lmdb nls openldap +pkinit selinux +threads test xinetd"
|
||||
|
||||
# Test suite requires network access
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="
|
||||
!!app-crypt/heimdal
|
||||
>=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
|
||||
|| (
|
||||
>=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
|
||||
>=dev-libs/libverto-0.2.5[tevent,${MULTILIB_USEDEP}]
|
||||
)
|
||||
keyutils? ( >=sys-apps/keyutils-1.5.8:=[${MULTILIB_USEDEP}] )
|
||||
lmdb? ( dev-db/lmdb )
|
||||
nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
|
||||
openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
|
||||
pkinit? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
xinetd? ( sys-apps/xinetd )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
virtual/yacc
|
||||
cpu_flags_x86_aes? (
|
||||
amd64? ( dev-lang/yasm )
|
||||
x86? ( dev-lang/yasm )
|
||||
)
|
||||
doc? ( virtual/latex-base )
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
dev-lang/tcl:0
|
||||
dev-util/dejagnu
|
||||
dev-util/cmocka
|
||||
)"
|
||||
RDEPEND="${DEPEND}
|
||||
selinux? ( sec-policy/selinux-kerberos )"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.12_warn_cflags.patch"
|
||||
"${FILESDIR}/${PN}-config_LDFLAGS-r1.patch"
|
||||
"${FILESDIR}/${PN}-1.16.3-libressl-r1.patch"
|
||||
"${FILESDIR}/${PN}_dont_create_run.patch"
|
||||
"${FILESDIR}/${PN}-1.18-libressl.patch"
|
||||
)
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/krb5-config
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Make sure we always use the system copies.
|
||||
rm -rf util/{et,ss,verto}
|
||||
sed -i 's:^[[:space:]]*util/verto$::' configure.ac || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# QA
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags -fno-strict-overflow
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
ECONF_SOURCE=${S} \
|
||||
WARN_CFLAGS="set" \
|
||||
econf \
|
||||
$(use_with openldap ldap) \
|
||||
"$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
|
||||
$(use_enable nls) \
|
||||
$(use_enable pkinit) \
|
||||
$(use_enable threads thread-support) \
|
||||
$(use_with lmdb) \
|
||||
$(use_with keyutils) \
|
||||
--without-hesiod \
|
||||
--enable-shared \
|
||||
--with-system-et \
|
||||
--with-system-ss \
|
||||
--enable-dns-for-realm \
|
||||
--enable-kdc-lookaside-cache \
|
||||
--with-system-verto \
|
||||
--disable-rpath \
|
||||
\
|
||||
AR="$(tc-getAR)"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake -j1
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
multilib_is_native_abi && emake -j1 check
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
|
||||
install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# default database dir
|
||||
keepdir /var/lib/krb5kdc
|
||||
|
||||
cd ..
|
||||
dodoc README
|
||||
|
||||
if use doc; then
|
||||
dodoc -r doc/html
|
||||
docinto pdf
|
||||
dodoc doc/pdf/*.pdf
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind
|
||||
newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc
|
||||
newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd
|
||||
newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind
|
||||
newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc
|
||||
newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd
|
||||
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service"
|
||||
systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket
|
||||
|
||||
insinto /etc
|
||||
newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
|
||||
insinto /var/lib/krb5kdc
|
||||
newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
|
||||
|
||||
if use openldap ; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
|
||||
fi
|
||||
|
||||
if use xinetd ; then
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}/kpropd.xinetd" kpropd
|
||||
fi
|
||||
}
|
Loading…
Reference in New Issue
Block a user