From owner-dev-commits-ports-all@freebsd.org Mon Sep 27 15:58:31 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75DCF66853B; Mon, 27 Sep 2021 15:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HJ6kH1bS6z3lJD; Mon, 27 Sep 2021 15:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 035ED13E98; Mon, 27 Sep 2021 15:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18RFwUYt030255; Mon, 27 Sep 2021 15:58:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18RFwU2Y030254; Mon, 27 Sep 2021 15:58:30 GMT (envelope-from git) Date: Mon, 27 Sep 2021 15:58:30 GMT Message-Id: <202109271558.18RFwU2Y030254@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: e6cc56f31627 - main - security/py-krb5: Add py-krb5 0.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6cc56f31627da94c78976d0d6dd16b9ec401b48 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2021 15:58:31 -0000 The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e6cc56f31627da94c78976d0d6dd16b9ec401b48 commit e6cc56f31627da94c78976d0d6dd16b9ec401b48 Author: Po-Chuan Hsieh AuthorDate: 2021-09-27 15:28:17 +0000 Commit: Po-Chuan Hsieh 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 + +PORTNAME= krb5 +PORTVERSION= 0.1.1 +CATEGORIES= security python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@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 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