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
This commit is contained in:
Todd Zullinger 2017-12-01 21:16:54 -05:00
parent 2e7d4595e5
commit 53fdd5334a

View File

@ -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 <tmz@pobox.com> - 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 <tmz@pobox.com> - 2.15.1-2
- Fix debuginfo for gnome-keyring and libsecret credential helpers