From 53fdd5334a2afc8e7c63790e667bbf64cd8049c9 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Dec 21 2017 23:36:31 +0000 Subject: Use %autosetup macro to unpack and patch source Using %autosetup frees us from having to manage %patch entries. It does require that all patches use the same strip level (-p1 in our case). There is also a mildly annoying bug in EL-6¹ which chokes on the patch invocation if a blank line doesn't follow %autosetup. A comment should prevent any problems. The %autosetup -S option is deliberately avoided, to prevent needless bootstrapping problems. ¹ https://bugzilla.redhat.com/1310704 --- diff --git a/git.spec b/git.spec index f072ebc..c1a41a7 100644 --- a/git.spec +++ b/git.spec @@ -388,10 +388,9 @@ xz -dc $src > $tar gpgv2 --homedir "$gpghome" --quiet --keyring $key.gpg $tar.sign $tar rm -rf "$tar" "$gpghome" # Cleanup tar files and tmp gpg home dir -%setup -q -n %{name}-%{version}%{?rcrev} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +# Ensure a blank line follows autosetup, el6 chokes otherwise +# https://bugzilla.redhat.com/1310704 +%autosetup -p1 -n %{name}-%{version}%{?rcrev} # Install print-failed-test-output script install -p -m 755 %{SOURCE99} print-failed-test-output @@ -803,6 +802,7 @@ rm -rf %{buildroot} %changelog * Thu Nov 30 2017 Todd Zullinger - 2.15.1-3 - Include verbose logs in build output for 'make test' failures +- Use %%autosetup macro to unpack and patch source * Wed Nov 29 2017 Todd Zullinger - 2.15.1-2 - Fix debuginfo for gnome-keyring and libsecret credential helpers