From 4baae60fc97380644a325d7851d4ed76192d6e7b Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Oct 26 2023 10:13:55 +0000 Subject: Sync from RDO bobcat release from python-oslo-log-5.3.0-1.el9s --- diff --git a/.gitignore b/.gitignore index 04711f5..3aba41b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ /oslo.log-5.0.0.tar.gz /0xa63ea142678138d1bb15f2e303bdfd64dd164087.txt /oslo.log-5.0.0.tar.gz.asc +/oslo.log-5.3.0.tar.gz +/0x815afec729392386480e076dcc0dfe2d21c023c9.txt +/oslo.log-5.3.0.tar.gz.asc diff --git a/python-oslo-log.spec b/python-oslo-log.spec index 7244d59..fbaaa5d 100644 --- a/python-oslo-log.spec +++ b/python-oslo-log.spec @@ -1,7 +1,13 @@ %{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} } -%global sources_gpg_sign 0xa63ea142678138d1bb15f2e303bdfd64dd164087 +%global sources_gpg_sign 0x815afec729392386480e076dcc0dfe2d21c023c9 %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +# we are excluding some BRs from automatic generator +%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order +# Exclude sphinx from BRs if docs are disabled +%if ! 0%{?with_doc} +%global excluded_brs %{excluded_brs} sphinx openstackdocstheme +%endif %global with_doc 1 %global pypi_name oslo.log @@ -16,20 +22,16 @@ support for context specific logging (like resource id’s etc). Tests for the Oslo Log handling library. Name: python-oslo-log -Version: 5.0.0 -Release: 4%{?dist} +Version: 5.3.0 +Release: 1%{?dist} Summary: OpenStack Oslo Log library -License: ASL 2.0 +License: Apache-2.0 URL: http://launchpad.net/oslo Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz -%if "%{version}" == "4.6.1" -# TODO(jcapitao): patch to be removed once https://review.opendev.org/c/openstack/oslo.log/+/828017 -# is available in uc tag. -Patch0001: 0001-Use-project-when-logging-the-user-identity.patch -%endif # Fixed required for python 3.12 https://review.opendev.org/c/openstack/oslo.log/+/890917 Patch0002: 0001-Catch-RuntimeError-when-loading-log-config-file.patch + # Required for tarball sources verification %if 0%{?sources_gpg} == 1 Source101: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc @@ -44,38 +46,10 @@ BuildRequires: /usr/bin/gpgv2 %package -n python3-%{pkg_name} Summary: OpenStack Oslo Log library -%{?python_provide:%python_provide python3-%{pkg_name}} -Obsoletes: python2-%{pkg_name} < %{version}-%{release} BuildRequires: python3-devel -BuildRequires: python3-pbr +BuildRequires: pyproject-rpm-macros BuildRequires: git-core -# Required for tests -BuildRequires: python3-dateutil -BuildRequires: python3-mock -BuildRequires: python3-oslotest -BuildRequires: python3-oslo-context -BuildRequires: python3-oslo-config -BuildRequires: python3-oslo-serialization -BuildRequires: python3-subunit -BuildRequires: python3-testtools -BuildRequires: python3-testrepository -BuildRequires: python3-testscenarios -# Required to compile translation files -BuildRequires: python3-babel -BuildRequires: python3-inotify -BuildRequires: python3-eventlet - -Requires: python3-pbr -Requires: python3-dateutil -Requires: python3-oslo-config >= 2:5.2.0 -Requires: python3-oslo-context >= 2.21.0 -Requires: python3-oslo-i18n >= 3.20.0 -Requires: python3-oslo-utils >= 3.36.0 -Requires: python3-oslo-serialization >= 2.25.0 -Requires: python3-debtcollector >= 1.19.0 -Requires: python3-inotify - Requires: python-%{pkg_name}-lang = %{version}-%{release} %description -n python3-%{pkg_name} @@ -85,11 +59,6 @@ Requires: python-%{pkg_name}-lang = %{version}-%{release} %package -n python-%{pkg_name}-doc Summary: Documentation for the Oslo Log handling library -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-oslo-config -BuildRequires: python3-oslo-utils - %description -n python-%{pkg_name}-doc Documentation for the Oslo Log handling library. %endif @@ -103,7 +72,6 @@ Requires: python3-oslotest Requires: python3-oslo-config >= 2:5.2.0 Requires: python3-subunit Requires: python3-testtools -Requires: python3-testrepository Requires: python3-testscenarios %description -n python3-%{pkg_name}-tests @@ -124,23 +92,46 @@ Translation files for Oslo log library %{gpgverify} --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0} %endif %autosetup -n %{pypi_name}-%{upstream_version} -S git -# Let RPM handle the dependencies -rm -rf {test-,}requirements.txt + +sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini +sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini +sed -i /^minversion.*/d tox.ini +sed -i /^requires.*virtualenv.*/d tox.ini + +# Exclude some bad-known BRs +for pkg in %{excluded_brs}; do + for reqfile in doc/requirements.txt test-requirements.txt; do + if [ -f $reqfile ]; then + sed -i /^${pkg}.*/d $reqfile + fi + done +done + +# Automatic BR generation +%generate_buildrequires +%if 0%{?with_doc} + %pyproject_buildrequires -t -e %{default_toxenv},docs +%else + %pyproject_buildrequires -t -e %{default_toxenv} +%endif %build -%{py3_build} +%pyproject_wheel + +%install +%pyproject_install %if 0%{?with_doc} # generate html docs -PYTHONPATH=. sphinx-build-3 -W -b html doc/source doc/build/html +PYTHONPATH="%{buildroot}/%{python3_sitelib}" +%tox -e docs # remove the sphinx-build-3 leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif + # Generate i18n files -python3 setup.py compile_catalog -d build/lib/oslo_log/locale --domain oslo_log +python3 setup.py compile_catalog -d %{buildroot}%{python3_sitelib}/oslo_log/locale --domain oslo_log -%install -%{py3_install} ln -s ./convert-json %{buildroot}%{_bindir}/convert-json-3 # Install i18n .mo files (.po and .pot are not required) @@ -153,13 +144,13 @@ mv %{buildroot}%{python3_sitelib}/oslo_log/locale %{buildroot}%{_datadir}/locale %find_lang oslo_log --all-name %check -python3 setup.py test +%tox -e %{default_toxenv} %files -n python3-%{pkg_name} %doc README.rst ChangeLog AUTHORS %license LICENSE %{python3_sitelib}/oslo_log -%{python3_sitelib}/*.egg-info +%{python3_sitelib}/*.dist-info %{_bindir}/convert-json %{_bindir}/convert-json-3 %exclude %{python3_sitelib}/oslo_log/tests @@ -177,6 +168,9 @@ python3 setup.py test %license LICENSE %changelog +* Thu Oct 26 2023 Alfredo Moralejo 5.3.0-1 +- Update to upstream version 5.3.0 + * Fri Jul 21 2023 Fedora Release Engineering - 5.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 4635550..2a4a5e1 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (oslo.log-5.0.0.tar.gz) = fd5cc985a6ba8fecbe052d1036620ae3fd5b6d7a2bbabbdc677fc7db399c6ad806ec032cb595f005ceda74b5477b120df65839cb7904049cab8c2e57a82e8d82 -SHA512 (0xa63ea142678138d1bb15f2e303bdfd64dd164087.txt) = 2701e33e10913b01b0537b7a8f7ace21c2aa40fa8e9ea3f88d0ba7d1543d97bbcca3c8301fa04f1376a46fabbbc4a9d2da5b667ca2bbf1874a3de8d49b4322c7 -SHA512 (oslo.log-5.0.0.tar.gz.asc) = 0ba5f5e3114f8d66f951acd1c19b8674f7a3227a9a4f25d4c3b528e37c166e4d2986e7a35350e3ff7efc5ac5157e17dce24ad24fb9d2c00e424f286adda87b80 +SHA512 (oslo.log-5.3.0.tar.gz) = 7db802c9c753562351c34feb63ebdff1306911ef392e4742fb08cfda08d8b09a81cb0e3ff85162ecd54a164a9c38a3a6f5a4d7cfc26bbd9ee84fefd172ca2fbd +SHA512 (0x815afec729392386480e076dcc0dfe2d21c023c9.txt) = be660eacaae93572475d0ae4e9cc29fc90897ec8a2ca8f4d0c5c7dcf682de9933e71a811f82b067fe5cb92de90165099ad7b49be98a6082c733a7f6b5b5f5a77 +SHA512 (oslo.log-5.3.0.tar.gz.asc) = 1531269a11016b96c662ca40ef78c00c19b9b44939f50f3cb3f1ce09637f45161898d718ba83c7497499a31bf003daa48f894b6e6b5f780644afcc889a5ac337