Compare commits

...

No commits in common. "c10s" and "c8s" have entirely different histories.
c10s ... c8s

10 changed files with 116 additions and 258 deletions

View File

@ -1 +0,0 @@
1

10
.gitignore vendored
View File

@ -1,10 +1,2 @@
/oauthlib-0.6.0.tar.gz
/oauthlib-514cad74bde4cd7781b496155058a79507245798.tar.gz
/oauthlib-1.0.3.tar.gz
/oauthlib-2.0.1.tar.gz
SOURCES/v2.1.0.tar.gz
/v2.1.0.tar.gz
/oauthlib-3.0.2.tar.gz
/oauthlib-3.1.0.tar.gz
/python-oauthlib-3.2.0.tar.gz
/python-oauthlib-3.2.1.tar.gz
/python-oauthlib-3.2.2.tar.gz

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,8 +0,0 @@
summary: Run gating tests
discover:
how: fmf
dist-git-source: true
dist-git-type: centos
execute:
how: tmt

View File

@ -1,15 +1,32 @@
# RHEL does not include pyjwt, blinker needed for extras
%bcond extras %{undefined rhel}
%if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
%bcond_without python2
%bcond_without python3
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_with python2
%bcond_without python3
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py2_build: %global py2_build %{__python2} setup.py build --executable="%{__python2} -s" %{?*}}
%{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot} %{?*}}
%endif
%global modname oauthlib
Name: python-oauthlib
Version: 3.2.2
Release: 6%{?dist}
Version: 2.1.0
Release: 1%{?dist}
Summary: An implementation of the OAuth request-signing logic
License: BSD-3-Clause
Group: Development/Libraries
License: BSD
URL: https://github.com/oauthlib/oauthlib
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}.tar.gz
BuildArch: noarch
@ -21,11 +38,53 @@ onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%if %{with python2}
%package -n python2-oauthlib
Summary: An implementation of the OAuth request-signing logic
Group: Development/Libraries
%{?python_provide:%python_provide python2-oauthlib}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-nose
BuildRequires: python2-mock
BuildRequires: python2-blinker
BuildRequires: python2-jwt
BuildRequires: python2-cryptography
Requires: python2-jwt
Requires: python2-cryptography >= 0.8.1
%description -n python2-oauthlib
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft
OAuth client support onto your favorite HTTP library, or provider support
onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%endif # with python2
%if %{with python3}
%package -n python3-oauthlib
Summary: %{summary}
Summary: An implementation of the OAuth request-signing logic
Group: Development/Libraries
%{?python_provide:%python_provide python3-oauthlib}
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-setuptools
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-blinker
BuildRequires: python3-jwt
BuildRequires: python3-cryptography
Requires: python3-jwt
Requires: python3-cryptography >= 0.8.1
%description -n python3-oauthlib
OAuthLib is a generic utility which implements the logic of OAuth without
@ -35,161 +94,71 @@ onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%if %{with extras}
%pyproject_extras_subpkg -n python3-oauthlib rsa,signedtoken,signals
%endif
%endif # with python3
%prep
%autosetup -n oauthlib-%{version} -p1
%setup -q -n %{modname}-%{version}
%generate_buildrequires
%pyproject_buildrequires %{?with_extras:-x rsa,signedtoken,signals}
# python-unittest2 is now provided by "python" package and python-unittest is retired
# adapt setup.py to reflect this fact downstream
sed -i "s/'unittest2', //" setup.py
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%build
%pyproject_wheel
%if %{with python2}
%py2_build
%endif # with python2
%if %{with python3}
%py3_build
%endif # with python3
%install
%pyproject_install
%pyproject_save_files oauthlib
%if %{with python2}
%py2_install
%endif # with python2
%if %{with python3}
%py3_install
%endif # with python3
%check
# enable SHA-1 signatures for RSA tests
# also see https://github.com/pyca/cryptography/pull/6931 and rhbz#2060343
export OPENSSL_ENABLE_SHA1_SIGNATURES=yes
%if %{without extras}
echo 'import pytest; __getattr__ = lambda _: pytest.skip("this test needs jwt")' > jwt.py
%endif
%{pytest} \
%if %{without extras}
--ignore tests/oauth2/rfc6749/clients/test_service_application.py \
--ignore tests/oauth2/rfc6749/clients/test_web_application.py \
--ignore tests/oauth2/rfc6749/clients/test_mobile_application.py \
--ignore tests/oauth2/rfc6749/clients/test_legacy_application.py \
--ignore tests/oauth2/rfc6749/clients/test_backend_application.py \
--ignore tests/oauth2/rfc6749/test_parameters.py \
%endif
%{nil}
%if %{with python2}
%{__python2} setup.py test
%endif # with python2
%if %{with python3}
%{__python3} setup.py test
%endif # with python3
%files -n python3-oauthlib -f %{pyproject_files}
%if %{with python2}
%files -n python2-oauthlib
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*
%endif # with python2
%if %{with python3}
%files -n python3-oauthlib
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*
%endif # with python3
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-6
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Wed Jul 3 2024 Tomas Halman <thalman@redhat.com> - 3.2.2-5
- Add gating tests
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-4
- Bump release for June 2024 mass rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Sep 19 2023 Michel Lind <salimma@fedoraproject.org> - 3.2.2-1
- Update to 3.2.2 for CVE-2022-36087
- Fix FTBFS with Python 3.12 (rhbz#2192914)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 3.2.1-5
- Rebuilt for Python 3.12
* Mon May 08 2023 Major Hayden <major@redhat.com> - 3.2.1-4
- Migrated to SPDX license
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 13 2022 Major Hayden <major@redhat.com> - 3.2.1-2
- Add SHA1 signature fix for ELN from yselkowitz. 👏
* Mon Sep 12 2022 Dariusz Smigiel <dsmigiel@redhat.com) - 3.2.1-1
- Update spec file and sources for 3.2.1
- Fixes CVE-2022-36087
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 3.2.0-2
- Rebuilt for Python 3.11
* Thu Mar 24 2022 Michael Kelly <mkelly@arista.com> - 3.2.0-1
- Remove python-mock patches (not required in 3.2.0)
- Update spec file and sources for 3.2.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 3.0.2-10
- Rebuilt for Python 3.10
* Mon May 10 2021 Jakub Hrozek <jhrozek@redhat.com> - 3.1.0-2
- Don't use python-mock
- Use an actual URL as Source0 (thanks, churchyard)
* Mon Feb 8 2021 Jakub Hrozek <jhrozek@redhat.com> - 3.1.0-1
- Update to upstream 3.1.0
- Gets rid of obsolete python-nose dependency
- Nuke the python2/python3 conditionals, let's only support python3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-7
- Add oauthlib[signedtoken] subpackage
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-6
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 15 2019 <jdennis@redhat.com> - 3.0.2-1
- Update to upstream 3.0.2
- Resolves: rhbz#1730033
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Aug 3 2018 <jdennis@redhat.com> - 2.1.0-1
- upgrade to latest upstream 2.1.0
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-10
- Restore use of bcond for python conditionals
- Resolves: rhbz#1612380
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-9
- Restore use of bcond for python conditionals
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-8
- Unify spec file between Fedora and RHEL
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-8
- Rebuilt for Python 3.7
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.1-7
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed May 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.0.1-7
- Conditionalize the python2 subpackage
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (python-oauthlib-3.2.2.tar.gz) = c776cf6132d2155cd31c34e677984d9f5b2d113cf80232e6a28c92f43bbbfb9f1e4dc6fff4e94208438d65a4d182907cc4f2bef968d6c6c5c74f55323c3decc4
SHA512 (v2.1.0.tar.gz) = 7935933d4c5be1eacf8688d6f0243dac8a43de35d19179839f72ee9fe9b02d4897d62a310475e741f0ed9a1c7e407bd846d51eb9884d8dd48b4624783cef0284

View File

@ -1,6 +0,0 @@
summary: Run python-oauthlib upstream tests
require:
- httpd
- python-oauthlib
test: ./oauthtests.sh
duration: 30m

View File

@ -1,63 +0,0 @@
#!/bin/bash -x
PKG="python-oauthlib"
die () {
echo "$1" >&2
exit 1
}
SITEDIR=`python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`
if [ "$SITEDIR" == "" ]; then
die "Can't locate python site dir"
fi
#
# install dependencies (pytest & blinker)
#
rm -rf venv
python3 -m venv --system-site-packages --symlinks venv
. venv/bin/activate
pip install -r requirements-tests.txt
# If source not found, download it with dnf
if [ ! -d ./source ]; then
# Extract source from srpm
echo "## source directory not found. attempting to download via rpm"
dnf download --source ${PKG} && \
rpm2cpio ${PKG}*.rpm|cpio -id && \
mkdir source && \
tar -zxf ${PKG}-*.tar.gz -C source --strip-components=1
if [ $? != 0 ]; then
echo "Failed to download upstream tests"
exit 1
fi
fi
# rename source code directory to be sure that we are
# testing files from our rpm
cd source || die "Missing source directory!"
if [ -d oauthlib ] ; then
mv oauthlib oauthlib.backup || die "Can't rename/hide source code directory!"
fi
# ln -s $SITEDIR/oauthlib || die "Can't locate installed library"
#
# run upstream tests, skip jwt tests
#
echo 'import pytest; __getattr__ = lambda _: pytest.skip("this test needs jwt")' > jwt.py
pytest tests -p no:warnings --ignore tests/oauth2/rfc6749/clients/test_service_application.py | tee oauthlib.log
RESULT=${PIPESTATUS[0]}
#
# cleanup
#
rm jwt.py
if [ -L oauthlib ] ; then
rm oauthlib
fi
if [ -d oauthlib.backup ] ; then
mv oauthlib.backup oauthlib
fi
exit $RESULT

View File

@ -1,2 +0,0 @@
blinker==1.5
pytest==7.2

View File

@ -1,17 +0,0 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- classic
required_packages:
- python3-oauthlib
tests:
- oauthtests:
dir: .
run: ./oauthtests.sh
save-files: ["source/*.log"]