From 34c9abb44d0acc8ed559bc942a86630214d3fbb1 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Mar 15 2020 23:07:03 +0000 Subject: use %setup instead of %autosetup so we can apply patches conditionally That way the srpm contains all patches and the srpm can be rebuilt for all supported distributions. This is also useful to for COPR repos which build for multipe releases. --- diff --git a/python-acme.spec b/python-acme.spec index 3306bbc..4f6c811 100644 --- a/python-acme.spec +++ b/python-acme.spec @@ -30,9 +30,7 @@ Source2: gpg-A2CFB51FA275A7286234E7B24D17C995CD9775F2.gpg # When running tests argparse is not recognised as provided by core -%if 0%{?rhel} && 0%{?rhel} == 7 Patch0: epel7-setup.patch -%endif # https://github.com/certbot/certbot/issues/6604 # also: https://github.com/certbot/certbot/issues/6604 Patch1: python-acme-remove-mock-runtime-dependency.patch @@ -177,7 +175,11 @@ Documentation for the ACME python libraries %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup -p1 -n %{srcname}-%{version} +%setup -n %{srcname}-%{version} +%if 0%{?rhel} && 0%{?rhel} == 7 +%patch0 -p1 +%endif +%patch1 -p1 # Remove bundled egg-info rm -rf %{srcname}.egg-info