diff --git a/.gitignore b/.gitignore index 30ae534..6e73480 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,12 @@ /python-gssapi-1.1.3.tar.gz /python-gssapi-1.1.4.tar.gz /python-gssapi-1.2.0.tar.gz +/python-gssapi-1.3.0.tar.gz +/python-gssapi-1.4.1.tar.gz +/python-gssapi-1.5.0.tar.gz +/python-gssapi-1.5.1.tar.gz +/python-gssapi-1.6.1.tar.gz +/python-gssapi-1.6.2.tar.gz +/python-gssapi-1.6.4.tar.gz +/python-gssapi-1.6.5.tar.gz +/python-gssapi-1.6.9.tar.gz diff --git a/Prevent-GSSError-_display_status-infinite-recursion.patch b/Prevent-GSSError-_display_status-infinite-recursion.patch deleted file mode 100644 index 79780da..0000000 --- a/Prevent-GSSError-_display_status-infinite-recursion.patch +++ /dev/null @@ -1,69 +0,0 @@ -From d7793765e75e2c0db31565903b50bb90bced18ff Mon Sep 17 00:00:00 2001 -From: Robbie Harwood -Date: Mon, 27 Mar 2017 13:24:37 -0400 -Subject: [PATCH] Prevent GSSError/_display_status() infinite recursion - -I was unable to reproduce the problem, but this should prevent the issue. - -Resolves: #111 -(cherry picked from commit b7e6c6c5451590f18df965a2a84550a63461d76e) ---- - gssapi/raw/misc.pyx | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/gssapi/raw/misc.pyx b/gssapi/raw/misc.pyx -index e278c4b..4ea0c55 100644 ---- a/gssapi/raw/misc.pyx -+++ b/gssapi/raw/misc.pyx -@@ -139,7 +139,7 @@ def _display_status(unsigned int error_code, bint is_major_code, - whether or not to call again for further messages - - Raises: -- GSSError -+ ValueError - """ - - cdef int status_type -@@ -165,13 +165,16 @@ def _display_status(unsigned int error_code, bint is_major_code, - - if maj_stat == GSS_S_COMPLETE: - call_again = bool(msg_ctx_out) -- - msg_out = msg_buff.value[:msg_buff.length] - gss_release_buffer(&min_stat, &msg_buff) - return (msg_out, msg_ctx_out, call_again) - else: -- # NB(directxman12): this is highly unlikely to cause a recursive loop -- raise GSSError(maj_stat, min_stat) -+ # This hides whatever error gss_display_status is complaining about, -+ # but obviates infinite recursion into stack exhaustion. The -+ # exception raised here is handled by get_all_statuses(), which prints -+ # the code. -+ raise ValueError("gss_display_status call returned failure " -+ "(major {0}, minor {1}).".format(maj_stat, min_stat)) - - - class GSSErrorRegistry(type): -@@ -294,8 +297,8 @@ class GSSError(Exception, metaclass=GSSErrorRegistry): - try: - msg, ctx, cont = _display_status(code, is_maj) - res.append(msg.decode(msg_encoding)) -- except GSSError: -- res.append(u'issue decoding code: {0}'.format(code)) -+ except ValueError as e: -+ res.append(u'{0} Decoding code: {1}'.format(e, code)) - cont = False - - while cont: -@@ -303,9 +306,8 @@ class GSSError(Exception, metaclass=GSSErrorRegistry): - msg, ctx, cont = _display_status(code, is_maj, - message_context=ctx) - res.append(msg.decode(msg_encoding)) -- except GSSError: -- res.append(u'issue decoding ' -- u'code: {0}'.format(code)) -+ except ValueError: -+ res.append(u'{0} Decoding code: {1}'.format(e, code)) - cont = False - - return res diff --git a/python-gssapi.spec b/python-gssapi.spec index 5ac1c47..0b089b6 100644 --- a/python-gssapi.spec +++ b/python-gssapi.spec @@ -1,11 +1,8 @@ # NOTE: tests are disabled since should_be has not yet been packaged. -# To re-enable, uncomment the 'check' section and lines marked 'for tests' -%global run_tests 0 -%global with_python3 1 Name: python-gssapi -Version: 1.2.0 -Release: 5%{?dist} +Version: 1.6.9 +Release: 1%{?dist} Summary: Python Bindings for GSSAPI (RFC 2743/2744 and extensions) License: ISC @@ -13,48 +10,25 @@ URL: https://github.com/pythongssapi/python-gssapi Source0: https://github.com/pythongssapi/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz # Patches -Patch0: Prevent-GSSError-_display_status-infinite-recursion.patch -BuildRequires: python2-devel BuildRequires: krb5-devel >= 1.10 BuildRequires: krb5-libs >= 1.10 -BuildRequires: Cython >= 0.21 -BuildRequires: python-setuptools -BuildRequires: python-tox -Requires: krb5-libs >= 1.10 -Requires: python-six -Requires: python-enum34 -Requires: python-decorator - -# For autosetup -BuildRequires: git - -%if 0%{?run_tests} -BuildRequires: python-nose -BuildRequires: python-nose-parameterized -BuildRequires: python-shouldbe -BuildRequires: krb5-server >= 1.10 -%endif - -%if 0%{?with_python3} +BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-Cython -%if 0%{?run_tests} -BuildRequires: python3-nose -BuildRequires: python3-nose-parameterized -BuildRequires: python3-should-be -%endif -%endif - -%description -A set of Python bindings to the GSSAPI C library providing both -a high-level pythonic interfaces and a low-level interfaces -which more closely matches RFC 2743. Includes support for +# For autosetup +BuildRequires: git + +%global _description\ +A set of Python bindings to the GSSAPI C library providing both\ +a high-level pythonic interfaces and a low-level interfaces\ +which more closely matches RFC 2743. Includes support for\ RFC 2743, as well as multiple extensions. -%if 0%{?with_python3} +%description %_description + %package -n python3-gssapi Summary: Python 3 Bindings for GSSAPI (RFC 2743/2744 and extensions) @@ -62,78 +36,112 @@ Requires: krb5-libs >= 1.10 Requires: python3-six Requires: python3-decorator -%description -n python3-gssapi -A set of Python 3 bindings to the GSSAPI C library providing both -a high-level pythonic interfaces and a low-level interfaces -which more closely matches RFC 2743. Includes support for -RFC 2743, as well as multiple extensions. -%endif +%description -n python3-gssapi %_description + +%{?python_provide:%python_provide python3-gssapi} %prep %autosetup -S git -n %{name}-%{version} -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - - %build -CFLAGS="%{optflags}" %{__python2} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -CFLAGS="%{optflags}" %{__python3} setup.py build -popd -%endif - +%py3_build %install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} +%py3_install # fix permissions on shared objects (mock seems to set them # to 0775, whereas a normal build gives 0755) find %{buildroot}%{python3_sitearch}/gssapi -name '*.so' \ -exec chmod 0755 {} \; -popd -%endif +%files -n python3-gssapi +%doc README.txt +%license LICENSE.txt +%{python3_sitearch}/* -%{__python2} setup.py install --skip-build --root %{buildroot} +%changelog +* Tue Jul 07 2020 Robbie Harwood - 1.6.9-1 +- New upstream release (1.6.9) -# fix permissions on shared objects (mock seems to set them -# to 0775, whereas a normal build gives 0755) -find %{buildroot}%{python2_sitearch}/gssapi -name '*.so' \ - -exec chmod 0755 {} \; +* Tue May 26 2020 Miro Hrončok - 1.6.5-2 +- Rebuilt for Python 3.9 -%check -%if 0%{?run_tests} -%{__python2} setup.py nosetests +* Wed Apr 08 2020 Robbie Harwood - 1.6.5-1 +- New upstream release (1.6.5) -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py nosetests -popd -%endif -%endif +* Tue Apr 07 2020 Robbie Harwood - 1.6.4-1 +- New upstream release (1.6.4) +- Resolves: #1821889 +* Tue Feb 25 2020 Robbie Harwood - 1.6.2-1 +- New upstream release (1.6.2) -%files -%doc README.txt -%license LICENSE.txt -%{python2_sitearch}/* +* Thu Jan 30 2020 Fedora Release Engineering - 1.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild -%if 0%{?with_python3} -%files -n python3-gssapi -%doc README.txt -%license LICENSE.txt -%{python3_sitearch}/* -%endif +* Thu Oct 03 2019 Miro Hrončok - 1.6.1-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) +* Mon Aug 19 2019 Miro Hrončok - 1.6.1-3 +- Rebuilt for Python 3.8 + +* Wed Aug 14 2019 Robbie Harwood - 1.6.1-2 +- Drop python2 subpackage for fc32+ + +* Fri Aug 09 2019 Robbie Harwood - 1.6.1-1 +- New upstream version: 1.6.1 + +* Thu Jul 25 2019 Robbie Harwood - 1.5.1-4 +- Restore python2 subpackage for fc31 by request of offlineimap + +* Thu May 30 2019 Robbie Harwood - 1.5.1-3 +- Drop python2 subpackage + +* Sat Feb 02 2019 Fedora Release Engineering - 1.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jul 18 2018 Robbie Harwood - 1.5.1-1 +- Remove warning about collections ABCs on python3.7 +- Resolves: #1594834 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.5.0-3 +- Rebuilt for Python 3.7 + +* Tue May 08 2018 Robbie Harwood - 1.5.0-2 +- Fix tox dependency + +* Fri Apr 06 2018 Robbie Harwood - 1.5.0-1 +- Prepare for release 1.5.0 + +* Wed Mar 07 2018 Robbie Harwood - 1.4.1-2 +- Add gcc to build-deps + +* Fri Feb 16 2018 Robbie Harwood - 1.4.1-1 +- Prepare for release 1.4.1 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 19 2018 Iryna Shcherbina - 1.3.0-2 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Dec 01 2017 Robbie Harwood - 1.3.0-1 +- New upstream release v1.3.0 + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.2.0-8 +- Python 2 binary package renamed to python2-gssapi + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Aug 03 2017 Fedora Release Engineering - 1.2.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild -%changelog * Tue Apr 04 2017 Robbie Harwood 1.2.0-5 - Fix problem where gss_display_status can infinite loop - Move to autosetup and rpm-git-tree diff --git a/sources b/sources index f997ccf..92ceb6a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -056f4e802a46b516bb5fb027b5f0358e python-gssapi-1.2.0.tar.gz +SHA512 (python-gssapi-1.6.9.tar.gz) = 15f3ec12fbe08d90b326bd15133d25aaffa621b1a840563aa829dd7dd60b9aeb2d5308176fc29746463b1dd16a2f267b210f775da17eeebe32bff8ff47df2e91