Skip to content

Commit

Permalink
security/py-krb5: Update to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Aug 31, 2022
1 parent 6236917 commit ee178e4
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 47 deletions.
6 changes: 4 additions & 2 deletions security/py-krb5/Makefile
@@ -1,5 +1,5 @@
PORTNAME= krb5
PORTVERSION= 0.3.0
PORTVERSION= 0.4.0
CATEGORIES= security python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -10,7 +10,9 @@ COMMENT= Kerberos API bindings for Python
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= python:3.6+
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython>=0.29.29<3.0.0:lang/cython@${PY_FLAVOR}

USES= python:3.7+
USE_PYTHON= autoplist concurrent cython distutils

MAKE_ENV= KRB5_KRB5CONFIG=${KRB5CONFIG}
Expand Down
6 changes: 3 additions & 3 deletions security/py-krb5/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1646058122
SHA256 (krb5-0.3.0.tar.gz) = 1d97da68aa8e563bedbbd5ac5fd02d3d84023b3526fd4df20dcbf7a89ee65d58
SIZE (krb5-0.3.0.tar.gz) = 1707212
TIMESTAMP = 1661599323
SHA256 (krb5-0.4.0.tar.gz) = 6eb0e91e044d37cb34c84b831310f4a48951f2902d4ebb65b97cbac5ff1b2264
SIZE (krb5-0.4.0.tar.gz) = 218774
@@ -1,14 +1,10 @@
--- build_helpers/heimdal/include/krb5.h.orig 2022-02-16 07:12:32 UTC
--- build_helpers/heimdal/include/krb5.h.orig 2022-08-08 21:14:44 UTC
+++ build_helpers/heimdal/include/krb5.h
@@ -847,7 +847,11 @@ enum {
@@ -847,7 +847,6 @@ enum {
KRB5_PRINCIPAL_PARSE_NO_REALM = 1, /**< Require that there are no realm */
KRB5_PRINCIPAL_PARSE_REQUIRE_REALM = 2, /**< Require a realm present */
KRB5_PRINCIPAL_PARSE_ENTERPRISE = 4, /**< Parse as a NT-ENTERPRISE name */
+#if defined(KRB5_PRINCIPAL_PARSE_IGNORE_REALM)
KRB5_PRINCIPAL_PARSE_IGNORE_REALM = 8, /**< Ignore realm if present */
+#elif defined(KRB5_PRINCIPAL_PARSE_NO_REALM)
+ KRB5_PRINCIPAL_PARSE_NO_REALM = 8, /**< Ignore realm if present */
+#endif
- KRB5_PRINCIPAL_PARSE_IGNORE_REALM = 8, /**< Ignore realm if present */
KRB5_PRINCIPAL_PARSE_NO_DEF_REALM = 16 /**< Don't default the realm */
};

17 changes: 9 additions & 8 deletions security/py-krb5/files/patch-setup.py
@@ -1,10 +1,11 @@
--- setup.py.orig 2021-09-13 20:29:11 UTC
--- setup.py.orig 2022-08-08 21:14:44 UTC
+++ setup.py
@@ -189,7 +189,6 @@ if compile_args is None:
else:
compile_args = shlex.split(run_command(f"{kc} --cflags krb5"))
@@ -174,8 +174,6 @@ if not SKIP_EXTENSIONS:
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.
- 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.
if sys.platform == "darwin" and sys.version_info[:2] == (3, 8):
14 changes: 0 additions & 14 deletions security/py-krb5/files/patch-src-krb5-_principal.c

This file was deleted.

10 changes: 10 additions & 0 deletions security/py-krb5/files/patch-src-krb5-_principal.pyi
@@ -0,0 +1,10 @@
--- src/krb5/_principal.pyi.orig 2022-08-08 21:14:44 UTC
+++ src/krb5/_principal.pyi
@@ -13,7 +13,6 @@ class PrincipalParseFlags(enum.IntEnum):
no_realm: PrincipalParseFlags = ... #: Error if realm is present
require_realm: PrincipalParseFlags = ... #: Error if realm is not present
enterprise: PrincipalParseFlags = ... #: Create single-component enterprise principal
- ignore_realm: PrincipalParseFlags = ... #: Ignore realm if present

class PrincipalUnparseFlags(enum.IntEnum):
"""Flags used to control :meth:`unparse_name_flags`."""
18 changes: 5 additions & 13 deletions security/py-krb5/files/patch-src-krb5-_principal.pyx
@@ -1,26 +1,18 @@
--- src/krb5/_principal.pyx.orig 2022-02-16 07:12:32 UTC
--- src/krb5/_principal.pyx.orig 2022-08-08 21:14:44 UTC
+++ src/krb5/_principal.pyx
@@ -59,7 +59,11 @@ cdef extern from "python_krb5.h":
@@ -59,7 +59,6 @@ cdef extern from "python_krb5.h":
int32_t KRB5_PRINCIPAL_PARSE_NO_REALM
int32_t KRB5_PRINCIPAL_PARSE_REQUIRE_REALM
int32_t KRB5_PRINCIPAL_PARSE_ENTERPRISE
+#if defined(KRB5_PRINCIPAL_PARSE_IGNORE_REALM)
int32_t KRB5_PRINCIPAL_PARSE_IGNORE_REALM
+#elif defined(KRB5_PRINCIPAL_PARSE_NO_REALM)
+ int32_t KRB5_PRINCIPAL_PARSE_NO_REALM
+#endif
- int32_t KRB5_PRINCIPAL_PARSE_IGNORE_REALM

int32_t KRB5_PRINCIPAL_UNPARSE_SHORT
int32_t KRB5_PRINCIPAL_UNPARSE_NO_REALM
@@ -71,7 +75,11 @@ class PrincipalParseFlags(enum.IntEnum):
@@ -71,7 +70,6 @@ class PrincipalParseFlags(enum.IntEnum):
no_realm = KRB5_PRINCIPAL_PARSE_NO_REALM
require_realm = KRB5_PRINCIPAL_PARSE_REQUIRE_REALM
enterprise = KRB5_PRINCIPAL_PARSE_ENTERPRISE
+#if defined(KRB5_PRINCIPAL_PARSE_IGNORE_REALM)
ignore_realm = KRB5_PRINCIPAL_PARSE_IGNORE_REALM
+#elif defined(KRB5_PRINCIPAL_PARSE_NO_REALM)
+ ignore_realm = KRB5_PRINCIPAL_PARSE_NO_REALM
+#endif
- ignore_realm = KRB5_PRINCIPAL_PARSE_IGNORE_REALM


class PrincipalUnparseFlags(enum.IntEnum):

0 comments on commit ee178e4

Please sign in to comment.