|
|
@ -1,149 +1,165 @@
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
## (rpmautospec version 0.3.1)
|
|
|
|
## (rpmautospec version 0.3.5)
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
release_number = 1;
|
|
|
|
release_number = 2;
|
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
|
print(release_number + base_release_number - 1);
|
|
|
|
print(release_number + base_release_number - 1);
|
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
|
## END: Set by rpmautospec
|
|
|
|
## END: Set by rpmautospec
|
|
|
|
|
|
|
|
|
|
|
|
# when bootstrapping Python, pytest-xdist is not yet available
|
|
|
|
# when bootstrapping Python, pytest-xdist is not yet available
|
|
|
|
%bcond_without xdist
|
|
|
|
%bcond xdist %{undefined rhel}
|
|
|
|
|
|
|
|
|
|
|
|
%global srcname rpmautospec
|
|
|
|
# Package the placeholder rpm-macros (moved to redhat-rpm-config in F40)
|
|
|
|
|
|
|
|
%if ! (0%{?fedora} >= 40 || 0%{?rhel} >= 10)
|
|
|
|
Name: python-rpmautospec
|
|
|
|
%bcond rpmmacropkg 1
|
|
|
|
Version: 0.3.5
|
|
|
|
%else
|
|
|
|
Release: %autorelease
|
|
|
|
%bcond rpmmacropkg 0
|
|
|
|
Summary: Package and CLI tool to generate release fields and changelogs
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
# Appease old Poetry versions (<1.2.0a2)
|
|
|
|
URL: https://pagure.io/fedora-infra/rpmautospec
|
|
|
|
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 38 || 0%{?rhel} >= 10
|
|
|
|
Source0: https://releases.pagure.org/fedora-infra/rpmautospec/rpmautospec-%{version}.tar.gz
|
|
|
|
%bcond oldpoetry 0
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%bcond oldpoetry 1
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
%global srcname rpmautospec
|
|
|
|
BuildRequires: git
|
|
|
|
%global canonicalname %{py_dist_name %{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-%{canonicalname}
|
|
|
|
|
|
|
|
Version: 0.4.1
|
|
|
|
|
|
|
|
Release: %autorelease
|
|
|
|
|
|
|
|
Summary: Package and CLI tool to generate release fields and changelogs
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
|
|
|
URL: https://github.com/fedora-infra/%{canonicalname}
|
|
|
|
|
|
|
|
Source0: https://github.com/fedora-infra/%{canonicalname}/releases/download/%{version}/%{canonicalname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
Patch100: rpmautospec-0.4.1-old-poetry.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
BuildRequires: git
|
|
|
|
# the langpacks are needed for tests
|
|
|
|
# the langpacks are needed for tests
|
|
|
|
BuildRequires: glibc-langpack-de
|
|
|
|
BuildRequires: glibc-langpack-de
|
|
|
|
BuildRequires: glibc-langpack-en
|
|
|
|
BuildRequires: glibc-langpack-en
|
|
|
|
BuildRequires: python3-devel >= 3.6.0
|
|
|
|
BuildRequires: python3-devel >= 3.9.0
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
# The dependencies needed for testing don’t get auto-generated.
|
|
|
|
BuildRequires: koji
|
|
|
|
BuildRequires: python3dist(pytest)
|
|
|
|
BuildRequires: python%{python3_pkgversion}-babel
|
|
|
|
|
|
|
|
BuildRequires: python3-koji
|
|
|
|
|
|
|
|
BuildRequires: python3-pygit2
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-cov
|
|
|
|
|
|
|
|
%if %{with xdist}
|
|
|
|
%if %{with xdist}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-xdist
|
|
|
|
BuildRequires: python3dist(pytest-xdist)
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pyyaml
|
|
|
|
BuildRequires: python3dist(pyyaml)
|
|
|
|
|
|
|
|
BuildRequires: sed
|
|
|
|
Obsoletes: koji-hub-plugin-rpmautospec < 0.1.5-2
|
|
|
|
|
|
|
|
Conflicts: koji-hub-plugin-rpmautospec < 0.1.5-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
%global _description %{expand:
|
|
|
|
A package and CLI tool to generate RPM release fields and changelogs.}
|
|
|
|
A package and CLI tool to generate RPM release fields and changelogs.}
|
|
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
|
|
# package the library
|
|
|
|
%package -n python3-%{canonicalname}
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
Requires: koji
|
|
|
|
%description -n python3-%{canonicalname} %_description
|
|
|
|
Requires: python3-babel
|
|
|
|
|
|
|
|
Requires: python3-koji
|
|
|
|
|
|
|
|
Requires: python3-pygit2
|
|
|
|
|
|
|
|
Requires: rpm
|
|
|
|
|
|
|
|
# for "rpm --specfile"
|
|
|
|
|
|
|
|
Requires: rpm-build >= 4.9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname} %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Note that there is no %%files section for the unversioned python module
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%doc README.rst
|
|
|
|
|
|
|
|
%{python3_sitelib}/%{srcname}-*.egg-info
|
|
|
|
|
|
|
|
%{python3_sitelib}/%{srcname}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# package the cli tool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n %{srcname}
|
|
|
|
%package -n %{canonicalname}
|
|
|
|
Summary: CLI tool for generating RPM releases and changelogs
|
|
|
|
Summary: CLI tool for generating RPM releases and changelogs
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
Requires: python3-%{canonicalname} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n %{srcname}
|
|
|
|
%description -n %{canonicalname}
|
|
|
|
CLI tool for generating RPM releases and changelogs
|
|
|
|
CLI tool for generating RPM releases and changelogs
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{srcname}
|
|
|
|
%if %{with rpmmacropkg}
|
|
|
|
%{_bindir}/rpmautospec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# package the Koji plugins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n koji-builder-plugin-rpmautospec
|
|
|
|
|
|
|
|
Summary: Koji plugin for generating RPM releases and changelogs
|
|
|
|
|
|
|
|
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
|
|
|
|
|
Requires: python3-koji
|
|
|
|
|
|
|
|
Requires: koji-builder-plugins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n koji-builder-plugin-rpmautospec
|
|
|
|
|
|
|
|
A Koji plugin for generating RPM releases and changelogs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n koji-builder-plugin-rpmautospec
|
|
|
|
|
|
|
|
%{_prefix}/lib/koji-builder-plugins/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Package the placeholder rpm-macros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n rpmautospec-rpm-macros
|
|
|
|
%package -n rpmautospec-rpm-macros
|
|
|
|
Summary: Rpmautospec RPM macros for local rpmbuild
|
|
|
|
Summary: Rpmautospec RPM macros for local rpmbuild
|
|
|
|
Requires: rpm
|
|
|
|
Requires: rpm
|
|
|
|
|
|
|
|
|
|
|
|
%description -n rpmautospec-rpm-macros
|
|
|
|
%description -n rpmautospec-rpm-macros
|
|
|
|
RPM macros with placeholders for building rpmautospec enabled packages localy
|
|
|
|
This package contains RPM macros with placeholders for building rpmautospec
|
|
|
|
|
|
|
|
enabled packages locally.
|
|
|
|
%files -n rpmautospec-rpm-macros
|
|
|
|
%endif
|
|
|
|
%{rpmmacrodir}/macros.rpmautospec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#--------------------------------------------------------
|
|
|
|
%generate_buildrequires
|
|
|
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{srcname}-%{version}
|
|
|
|
%autosetup -n %{srcname}-%{version} -N
|
|
|
|
# The python3-koji package doesn't declare itself properly, so we may not depend on it when
|
|
|
|
%autopatch -M 99
|
|
|
|
# installed as an RPM.
|
|
|
|
%if %{with oldpoetry}
|
|
|
|
sed -i /koji/d requirements.txt
|
|
|
|
%autopatch 100
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
|
|
|
|
|
|
|
sed -i -e '/pytest-cov/d' pyproject.toml
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%py3_build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%py3_install
|
|
|
|
%pyproject_install
|
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib/koji-builder-plugins/
|
|
|
|
%pyproject_save_files %{srcname}
|
|
|
|
install -m 0644 koji_plugins/rpmautospec_builder.py \
|
|
|
|
# Work around poetry not listing license files as such in package metadata.
|
|
|
|
%{buildroot}%{_prefix}/lib/koji-builder-plugins/
|
|
|
|
sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files}
|
|
|
|
|
|
|
|
|
|
|
|
%py_byte_compile %{python3} %{buildroot}%{_prefix}/lib/koji-builder-plugins/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RPM macros
|
|
|
|
%if %{with rpmmacropkg}
|
|
|
|
mkdir -p %{buildroot}%{rpmmacrodir}
|
|
|
|
mkdir -p %{buildroot}%{rpmmacrodir}
|
|
|
|
install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/
|
|
|
|
install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
PYTHONPATH="%{buildroot}%{python3_sitelib}" \
|
|
|
|
%pytest -v \
|
|
|
|
%{__python3} -m pytest \
|
|
|
|
|
|
|
|
%if %{with xdist}
|
|
|
|
%if %{with xdist}
|
|
|
|
--numprocesses=auto
|
|
|
|
--numprocesses=auto
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{canonicalname} -f %{pyproject_files}
|
|
|
|
|
|
|
|
%doc README.rst
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{canonicalname}
|
|
|
|
|
|
|
|
%{_bindir}/rpmautospec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with rpmmacropkg}
|
|
|
|
|
|
|
|
%files -n rpmautospec-rpm-macros
|
|
|
|
|
|
|
|
%{rpmmacrodir}/macros.rpmautospec
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Sat Nov 18 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.3.5-1
|
|
|
|
* Mon Jan 08 2024 Nils Philippsen <nils@redhat.com> - 0.4.1-2
|
|
|
|
|
|
|
|
- Update patch for old poetry versions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Dec 15 2023 Nils Philippsen <nils@redhat.com> - 0.4.1-1
|
|
|
|
|
|
|
|
- Update to 0.4.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sun Dec 03 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.4.0-2
|
|
|
|
|
|
|
|
- Drop unwanted python-pytest-cov dependency
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Nov 30 2023 Nils Philippsen <nils@redhat.com> - 0.4.0-1
|
|
|
|
|
|
|
|
- Update to 0.4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Nov 18 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.3.8-1
|
|
|
|
- Rebuilt for MSVSphere 9.2
|
|
|
|
- Rebuilt for MSVSphere 9.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.8-1
|
|
|
|
|
|
|
|
- Update to 0.3.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.7-1
|
|
|
|
|
|
|
|
- Update to 0.3.7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Nov 14 2023 Nils Philippsen <nils@redhat.com> - 0.3.6-1
|
|
|
|
|
|
|
|
- Update to 0.3.6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Aug 22 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.3.5-5
|
|
|
|
|
|
|
|
- Disable the macros subpackage in F40+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.3.5-3
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed May 24 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.3.5-2
|
|
|
|
|
|
|
|
- Avoid pytest-cov, disable xdist in RHEL builds
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Feb 08 2023 Nils Philippsen <nils@redhat.com> - 0.3.5-1
|
|
|
|
* Wed Feb 08 2023 Nils Philippsen <nils@redhat.com> - 0.3.5-1
|
|
|
|
- Update to 0.3.5
|
|
|
|
- Update to 0.3.5
|
|
|
|
|
|
|
|
|
|
|
|