Use autosetup/autopatch, reorder few patches

Use autopatch, do not require mentioning each patch twice.
Patches below 300 are generic patches applied after unpacking.
Patches betwee 300 and 310 are PKCS11 specific, applied only when pkcs11
is enabled.

Substracted 100 from current patches.
This commit is contained in:
Petr Menšík 2021-01-12 11:39:58 +01:00
parent 6648a9230f
commit cc152b028f

View File

@ -99,25 +99,26 @@ Source48: setup-named-softhsm.sh
Source49: named-chroot.files Source49: named-chroot.files
# Common patches # Common patches
Patch10: bind-9.5-PIE.patch Patch01: bind-9.5-PIE.patch
Patch16: bind-9.16-redhat_doc.patch Patch02: bind-9.16-redhat_doc.patch
Patch72: bind-9.5-dlz-64bit.patch Patch03: bind-9.5-dlz-64bit.patch
Patch106:bind93-rh490837.patch Patch06: bind93-rh490837.patch
Patch112:bind97-rh645544.patch Patch12: bind97-rh645544.patch
Patch130:bind-9.9.1-P2-dlz-libdb.patch Patch30: bind-9.9.1-P2-dlz-libdb.patch
Patch133:bind99-rh640538.patch # https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/2688
# Make PKCS11 used only for pkcs11 parts Patch33: bind99-rh640538.patch
Patch135:bind-9.14-config-pkcs11.patch Patch40: bind-9.11-rh1410433.patch
# Fedora specific patch to distribute native-pkcs#11 functionality Patch57: bind-9.11-fips-tests.patch
Patch136:bind-9.10-dist-native-pkcs11.patch Patch64: bind-9.11-rh1666814.patch
# Do not use isc-pkcs11. Patch70: bind-9.11-feature-test-named.patch
Patch149:bind-9.11-kyua-pkcs11.patch Patch71: bind-9.11-tests-variants.patch
Patch140:bind-9.11-rh1410433.patch # Make PKCS11 used only for pkcs11 parts
Patch157:bind-9.11-fips-tests.patch Patch300: bind-9.14-config-pkcs11.patch
Patch164:bind-9.11-rh1666814.patch # Fedora specific patch to distribute native-pkcs#11 functionality
Patch170:bind-9.11-feature-test-named.patch Patch301: bind-9.10-dist-native-pkcs11.patch
Patch171:bind-9.11-tests-variants.patch # Do not use isc-pkcs11.
Patch302: bind-9.11-kyua-pkcs11.patch
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
@ -412,36 +413,23 @@ in HTML and PDF format.
%endif %endif
%prep %prep
%if 0%{?gpgverify:1} %if 0%{?fedora}
# RHEL does not yet support this verification
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE0}' %{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE0}'
%endif %endif
%setup -q -n %{name}-%{BINDVERSION} %autosetup -n %{name}-%{BINDVERSION} -N
# Common patches # Common patches
%patch10 -p1 -b .PIE %autopatch -M 299 -p1
%patch16 -p1 -b .redhat_doc
%patch72 -p1 -b .64bit
%patch106 -p1 -b .rh490837
%patch112 -p1 -b .rh645544
%patch130 -p1 -b .libdb
%patch140 -p1 -b .rh1410433
%patch157 -p1 -b .fips-tests
%patch164 -p1 -b .rh1666814
%patch170 -p1 -b .featuretest-named
%patch171 -p1 -b .test-variant
%if %{with PKCS11} %if %{with PKCS11}
%patch135 -p1 -b .config-pkcs11 %patch300 -p1 -b .config-pkcs11
cp -r bin/named{,-pkcs11} cp -r bin/named{,-pkcs11}
cp -r bin/dnssec{,-pkcs11} cp -r bin/dnssec{,-pkcs11}
cp -r lib/dns{,-pkcs11} cp -r lib/dns{,-pkcs11}
cp -r lib/ns{,-pkcs11} cp -r lib/ns{,-pkcs11}
%patch136 -p1 -b .dist_pkcs11 %autopatch -m 301 -M 309 -p1
%patch149 -p1 -b .kyua-pkcs11
%endif %endif
%patch133 -p1 -b .rh640538
# Sparc and s390 arches need to use -fPIE # Sparc and s390 arches need to use -fPIE
%ifarch sparcv9 sparc64 s390 s390x %ifarch sparcv9 sparc64 s390 s390x
@ -1157,6 +1145,7 @@ fi;
* Wed Jan 06 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.10-2 * Wed Jan 06 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.10-2
- Use make macros - Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
- Use autosetup/autopatch macros
* Tue Jan 05 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.10-1 * Tue Jan 05 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.10-1
- Update to 9.16.10 - Update to 9.16.10