git: e6cc56f31627 - main - security/py-krb5: Add py-krb5 0.1.1

Po-Chuan Hsieh sunpoet at FreeBSD.org
Mon Sep 27 15:58:31 UTC 2021


The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e6cc56f31627da94c78976d0d6dd16b9ec401b48

commit e6cc56f31627da94c78976d0d6dd16b9ec401b48
Author:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-09-27 15:28:17 +0000
Commit:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-09-27 15:55:49 +0000

    security/py-krb5: Add py-krb5 0.1.1
    
    This library provides Python functions that wraps the Kerberos 5 C API. Due to
    the complex nature of this API it is highly recommended to use something like
    python-gssapi which exposes the Kerberos authentication details through GSSAPI.
    
    WWW: https://github.com/jborean93/pykrb5
---
 security/Makefile                                  |  1 +
 security/py-krb5/Makefile                          | 31 ++++++++++++++++++++++
 security/py-krb5/distinfo                          |  3 +++
 security/py-krb5/files/patch-setup.py              | 10 +++++++
 security/py-krb5/files/patch-src-krb5-_principal.c | 14 ++++++++++
 security/py-krb5/pkg-descr                         |  5 ++++
 6 files changed, 64 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 0944fb9343fc..61d75e88a893 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -923,6 +923,7 @@
     SUBDIR += py-kerberos
     SUBDIR += py-keyring
     SUBDIR += py-keyrings.alt
+    SUBDIR += py-krb5
     SUBDIR += py-libnacl
     SUBDIR += py-m2crypto
     SUBDIR += py-maec
diff --git a/security/py-krb5/Makefile b/security/py-krb5/Makefile
new file mode 100644
index 000000000000..797ef9d7d49f
--- /dev/null
+++ b/security/py-krb5/Makefile
@@ -0,0 +1,31 @@
+# Created by: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
+
+PORTNAME=	krb5
+PORTVERSION=	0.1.1
+CATEGORIES=	security python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet at FreeBSD.org
+COMMENT=	Kerberos API bindings for Python
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent cython distutils
+
+MAKE_ENV=	KRB5_KRB5CONFIG=${KRB5CONFIG}
+
+OPTIONS_SINGLE=	GSSAPI
+OPTIONS_SINGLE_GSSAPI=	GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT
+OPTIONS_DEFAULT=GSSAPI_BASE
+
+GSSAPI_BASE_USES=	gssapi
+GSSAPI_HEIMDAL_USES=	gssapi:heimdal
+GSSAPI_MIT_USES=	gssapi:mit
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/security/py-krb5/distinfo b/security/py-krb5/distinfo
new file mode 100644
index 000000000000..3d9ab060c02c
--- /dev/null
+++ b/security/py-krb5/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1632664288
+SHA256 (krb5-0.1.1.tar.gz) = 0228e07b16da996e638bb088594642662ac560eede53e67af4f6bea00186c0c2
+SIZE (krb5-0.1.1.tar.gz) = 1083721
diff --git a/security/py-krb5/files/patch-setup.py b/security/py-krb5/files/patch-setup.py
new file mode 100644
index 000000000000..c97047808a99
--- /dev/null
+++ b/security/py-krb5/files/patch-setup.py
@@ -0,0 +1,10 @@
+--- setup.py.orig	2021-09-13 20:29:11 UTC
++++ setup.py
+@@ -189,7 +189,6 @@ if compile_args is None:
+     else:
+         compile_args = shlex.split(run_command(f"{kc} --cflags krb5"))
+ 
+-    compile_args.append("-Werror")
+ 
+     # Python 3.8 on macOS errors on these deprecation warnings. We ignore them as things are fixed on 3.9 but the
+     # code still needs to compile on 3.8.
diff --git a/security/py-krb5/files/patch-src-krb5-_principal.c b/security/py-krb5/files/patch-src-krb5-_principal.c
new file mode 100644
index 000000000000..bd1158b9c18c
--- /dev/null
+++ b/security/py-krb5/files/patch-src-krb5-_principal.c
@@ -0,0 +1,14 @@
+--- src/krb5/_principal.c.orig	2021-09-13 20:29:39 UTC
++++ src/krb5/_principal.c
+@@ -18669,7 +18669,11 @@ if (!__Pyx_RefNanny) {
+  * 
+  * 
+  */
++#if defined(KRB5_PRINCIPAL_PARSE_IGNORE_REALM)
+   __pyx_t_4 = __Pyx_PyInt_From_int32_t(KRB5_PRINCIPAL_PARSE_IGNORE_REALM); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 68, __pyx_L1_error)
++#elif defined(KRB5_PRINCIPAL_PARSE_NO_REALM)
++  __pyx_t_4 = __Pyx_PyInt_From_int32_t(KRB5_PRINCIPAL_PARSE_NO_REALM); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 68, __pyx_L1_error)
++#endif
+   __Pyx_GOTREF(__pyx_t_4);
+   if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ignore_realm, __pyx_t_4) < 0) __PYX_ERR(1, 68, __pyx_L1_error)
+   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
diff --git a/security/py-krb5/pkg-descr b/security/py-krb5/pkg-descr
new file mode 100644
index 000000000000..3c374ee7c3a2
--- /dev/null
+++ b/security/py-krb5/pkg-descr
@@ -0,0 +1,5 @@
+This library provides Python functions that wraps the Kerberos 5 C API. Due to
+the complex nature of this API it is highly recommended to use something like
+python-gssapi which exposes the Kerberos authentication details through GSSAPI.
+
+WWW: https://github.com/jborean93/pykrb5


More information about the dev-commits-ports-main mailing list