#48 Move all the BuildRequires higher in the spec and add the missing one on git
Merged 4 years ago by nphilipp. Opened 4 years ago by pingou.
fedora-infra/ pingou/rpmautospec fix_spec_file  into  master

file modified
+14 -4
@@ -10,6 +10,16 @@ 

  Source0:        https://releases.pagure.org/Fedora-Infra/rpmautospec/rpmautospec-%{version}.tar.gz

  

  BuildArch:      noarch

+ BuildRequires:  python3-devel >= 3.6.0

+ # EPEL7 does not have python3-koji and the other dependencies here are only

+ # needed in the buildroot for the tests, which can't run because of the lack of

+ # python3-koji

+ %if ! 0%{?rhel} || 0%{?rhel} > 7

+ BuildRequires:  koji

+ BuildRequires:  python3-koji

+ BuildRequires:  python%{python3_pkgversion}-pytest

+ BuildRequires:  git

+ %endif

  

  %global _description %{expand:

  A package and CLI tool to generate RPM release fields and changelogs.}
@@ -20,10 +30,6 @@ 

  

  %package -n python3-%{srcname}

  Summary:        %{summary}

- BuildRequires:  python3-devel >= 3.6.0

- BuildRequires:  koji

- BuildRequires:  python3-koji

- BuildRequires:  python%{python3_pkgversion}-pytest

  %{?python_provide:%python_provide python3-%{srcname}}

  

  Requires: koji
@@ -109,8 +115,12 @@ 

  mkdir -p %{buildroot}%{_sysconfdir}/koji-hub/plugins/

  install -m 0644 koji_plugins/rpmautospec_hub.conf %{buildroot}%{_sysconfdir}/koji-hub/plugins/rpmautospec_hub.conf

  

+ # EPEL7 does not have python3-koji which is needed to run the tests, so there

+ # is no point in running them

+ %if ! 0%{?rhel} || 0%{?rhel} > 7

  %check

  %{__python3} -m pytest

+ %endif

  

  %changelog

  * Wed Mar 18 2020  Adam Saleh <asaleh@redhat.com> - 0.0.1-1

BuildRequires are for the entire spec file they do not depend on sub-packages
so it does not make sense to tie them with one.

We also need to have git installed in the buildroot for the test to run
successully, so we're adding it to the list of BuildRequires while at it.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Build succeeded.

1 new commit added

  • Adjust the BR for epel7 where we can't run the tests
4 years ago

2 new commits added

  • Adjust the BR for epel7 where we can't run the tests
  • Move all the BuildRequires higher in the spec and add the missing one on git
4 years ago

This excludes Fedora. :wink:

--> %if ! 0%{?rhel} || 0%{?rhel} > 7

Build succeeded.

As above:

%if ! 0%{?rhel} || 0%{?rhel} > 7

2 new commits added

  • Adjust the BR for epel7 where we can't run the tests
  • Move all the BuildRequires higher in the spec and add the missing one on git
4 years ago

2 new commits added

  • Adjust the BR for epel7 where we can't run the tests
  • Move all the BuildRequires higher in the spec and add the missing one on git
4 years ago

2 new commits added

  • Adjust the BR for epel7 where we can't run the tests
  • Move all the BuildRequires higher in the spec and add the missing one on git
4 years ago

Pull-Request has been merged by nphilipp

4 years ago