6d5e91
%global realname kdcproxy
6d5e91
6d5e91
%if 0%{?fedora} || 0%{?rhel} > 7
6d5e91
%global with_python3 1
6d5e91
%else
6d5e91
%global with_python3 0
6d5e91
%endif
6d5e91
6d5e91
%if 0%{?fedora} || 0%{?rhel} <= 7
6d5e91
%global with_python2 1
6d5e91
%else
6d5e91
%global with_python2 0
6d5e91
%endif
6d5e91
6d5e91
Name:           python-%{realname}
6d5e91
Version:        0.4
0b7e04
Release:        5%{?dist}
6d5e91
Summary:        MS-KKDCP (kerberos proxy) WSGI module
6d5e91
6d5e91
License:        MIT
6d5e91
URL:            https://github.com/npmccallum/%{realname}
6d5e91
Source0:        https://github.com/npmccallum/%{realname}/archive/%{realname}-%{version}.tar.gz
6d5e91
0b7e04
Patch0: Make-webtest-an-optional-dependency.patch
0b7e04
Patch1: Correct-addrs-sorting-to-be-by-TCP-UDP.patch
0b7e04
Patch2: Always-buffer-TCP-data-in-__handle_recv.patch
6d5e91
6d5e91
BuildArch:      noarch
6d5e91
BuildRequires:  git
6d5e91
6d5e91
%if 0%{?with_python2} > 0
6d5e91
BuildRequires:  python2-devel
6d5e91
BuildRequires:  python2-pytest
6d5e91
BuildRequires:  python2-coverage
6d5e91
BuildRequires:  python2-asn1crypto
6d5e91
BuildRequires:  python2-dns
6d5e91
BuildRequires:  python2-mock
6d5e91
%endif
6d5e91
6d5e91
%if 0%{?with_python3} > 0
6d5e91
BuildRequires:  python3-devel
6d5e91
BuildRequires:  python3-pytest
6d5e91
BuildRequires:  python3-coverage
6d5e91
BuildRequires:  python3-asn1crypto
6d5e91
BuildRequires:  python3-dns
6d5e91
BuildRequires:  python3-mock
6d5e91
%endif
6d5e91
6d5e91
6d5e91
%description
6d5e91
This package contains a Python WSGI module for proxying KDC requests over
6d5e91
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
6d5e91
minimal configuration.
6d5e91
6d5e91
%if 0%{?with_python2} > 0
6d5e91
%package -n python2-%{realname}
6d5e91
Summary:        MS-KKDCP (kerberos proxy) WSGI module
6d5e91
Requires:       python2-dns
6d5e91
Requires:       python2-asn1crypto
6d5e91
6d5e91
%{?python_provide:%python_provide python2-%{realname}}
6d5e91
6d5e91
%description -n python2-%{realname}
6d5e91
This package contains a Python 2.x WSGI module for proxying KDC requests over
6d5e91
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
6d5e91
minimal configuration.
6d5e91
%endif
6d5e91
6d5e91
%if 0%{?with_python3} > 0
6d5e91
%package -n python3-%{realname}
6d5e91
Summary:        MS-KKDCP (kerberos proxy) WSGI module
6d5e91
Requires:       python3-dns
6d5e91
Requires:       python3-asn1crypto
6d5e91
6d5e91
%{?python_provide:%python_provide python3-%{realname}}
6d5e91
6d5e91
%description -n python3-%{realname}
6d5e91
This package contains a Python 3.x WSGI module for proxying KDC requests over
6d5e91
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
6d5e91
minimal configuration.
6d5e91
%endif
6d5e91
6d5e91
%prep
6d5e91
%autosetup -S git -n %{realname}-%{version}
6d5e91
6d5e91
6d5e91
%build
6d5e91
%if 0%{?with_python2} > 0
6d5e91
%py2_build
6d5e91
%endif
6d5e91
%if 0%{?with_python3} > 0
6d5e91
%py3_build
6d5e91
%endif
6d5e91
6d5e91
%install
6d5e91
%if 0%{?with_python2} > 0
6d5e91
%py2_install
6d5e91
%endif
6d5e91
%if 0%{?with_python3} > 0
6d5e91
%py3_install
6d5e91
%endif
6d5e91
6d5e91
%check
6d5e91
%if 0%{?with_python2} > 0
6d5e91
KDCPROXY_ASN1MOD=asn1crypto %{__python2} -m pytest
6d5e91
%endif
6d5e91
%if 0%{?with_python3} > 0
6d5e91
KDCPROXY_ASN1MOD=asn1crypto %{__python3} -m pytest
6d5e91
%endif
6d5e91
6d5e91
%if 0%{?with_python2} > 0
6d5e91
%files -n python2-%{realname}
6d5e91
%doc README
6d5e91
%license COPYING
6d5e91
%{python2_sitelib}/%{realname}/
6d5e91
%{python2_sitelib}/%{realname}-%{version}-*.egg-info
6d5e91
%endif
6d5e91
6d5e91
%if 0%{?with_python3} > 0
6d5e91
%files -n python3-%{realname}
6d5e91
%doc README
6d5e91
%license COPYING
6d5e91
%{python3_sitelib}/%{realname}/
6d5e91
%{python3_sitelib}/%{realname}-%{version}-*.egg-info
6d5e91
%endif
6d5e91
6d5e91
%changelog
0b7e04
* Fri Oct 25 2019 Robbie Harwood <rharwood@redhat.com> - 0.4-5
0b7e04
- Always buffer TCP data in __handle_recv()
0b7e04
- Resolves: #1747144
0b7e04
0b7e04
* Fri Oct 25 2019 Robbie Harwood <rharwood@redhat.com> - 0.4-4
0b7e04
- Correct addrs sorting to be by TCP/UDP
0b7e04
- Resolves: #1732898
0b7e04
6d5e91
* Mon Nov 19 2018 Thomas Woerner <twoerner@redhat.com> - 0.4-3
6d5e91
- Bump release to be able to add python-kdcpoxy to the idm module
6d5e91
  Resolves: RHBZ#1639332
6d5e91
6d5e91
* Thu Aug 09 2018 Robbie Harwood <rharwood@redhat.com> - 0.4-2
6d5e91
- Update dependencies in test suite
6d5e91
6d5e91
* Thu Aug 09 2018 Robbie Harwood <rharwood@redhat.com> - 0.4-1
6d5e91
- New upstream release - 0.4
6d5e91
- Port to autosetup
6d5e91
6d5e91
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-14
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6d5e91
6d5e91
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-13
6d5e91
- Rebuilt for Python 3.7
6d5e91
6d5e91
* Thu Mar 22 2018 Troy Dawson <tdawson@redhat.com> - 0.3.2-12
6d5e91
- Update conditionals.
6d5e91
- Make preperations for non-python2 builds
6d5e91
6d5e91
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.2-11
6d5e91
- Update Python 2 dependency declarations to new packaging standards
6d5e91
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
6d5e91
6d5e91
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-10
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6d5e91
6d5e91
* Tue Sep 05 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.3.2-9
6d5e91
- Ignore test results
6d5e91
6d5e91
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-8
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6d5e91
6d5e91
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-7
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6d5e91
6d5e91
* Mon Jan 16 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.3.2-6
6d5e91
- Fix failing tests
6d5e91
- Modernize the SPEC file
6d5e91
6d5e91
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-5
6d5e91
- Rebuild for Python 3.6
6d5e91
- BR /usr/bin/tox instead of python-tox
6d5e91
- Use %%{python3_version_nodots} instead of hardcoded 35
6d5e91
6d5e91
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-4
6d5e91
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
6d5e91
6d5e91
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-3
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6d5e91
6d5e91
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-2
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
6d5e91
6d5e91
* Mon Aug 03 2015 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.3.2-1
6d5e91
- Update to 0.3.2
6d5e91
- Fixes CVE-2015-5159
6d5e91
6d5e91
* Wed Jul 22 2015 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.3.1-1
6d5e91
- Update to 0.3.1
6d5e91
6d5e91
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
6d5e91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6d5e91
6d5e91
* Wed Jun 10 2015 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.3-1
6d5e91
- Update to 0.3
6d5e91
- Run tests in Fedora (not RHEL due to python-tox)
6d5e91
6d5e91
* Fri Oct 24 2014 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.2.1-1
6d5e91
- Update to 0.2.1
6d5e91
6d5e91
* Thu Oct 23 2014 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.2-1
6d5e91
- Update to 0.2
6d5e91
- Fix EPEL7 build
6d5e91
6d5e91
* Tue Jan 21 2014 Nathaniel McCallum <npmccallum@fedoraproject.org> - 0.1.1-1
6d5e91
- Initial package