Get rid of all %patchN usage
Fixes https://pagure.io/packaging-committee/issue/1442
This commit is contained in:
parent
80b5cd13a8
commit
224d8554c5
4 changed files with 9 additions and 10 deletions
|
|
@ -123,10 +123,10 @@ Some things to watch out for:
|
|||
|
||||
....
|
||||
%prep
|
||||
%setup -qc
|
||||
%autosetup -N -c
|
||||
mv %{srcname}-%{version} python2
|
||||
pushd python2
|
||||
%patch0 -p1 -b .testfix
|
||||
%autopatch -p1
|
||||
|
||||
find -name '*.txt' | xargs chmod -x
|
||||
# copy common doc files to top dir
|
||||
|
|
|
|||
|
|
@ -283,11 +283,9 @@ A sample spec for building gems would look like this:
|
|||
|
||||
....
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version}
|
||||
%autosetup -p1 -n %{gem_name}-%{version}
|
||||
|
||||
# Modify the gemspec if necessary
|
||||
# Also apply patches to code if necessary
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# Create the gem as gem install only works on a gem file
|
||||
|
|
|
|||
|
|
@ -319,12 +319,13 @@ Patch1: oldpatch.patch
|
|||
Patch2: ngpatch.patch
|
||||
...
|
||||
%prep
|
||||
%autosetup -N
|
||||
...
|
||||
%if 0%{?fedora} < 35
|
||||
tar xf %{SOURCE1}
|
||||
%patch1 -p1
|
||||
%patch 1 -p1
|
||||
%else
|
||||
tar xf %{SOURCE2}
|
||||
%patch2 -p1
|
||||
%patch 2 -p1
|
||||
%endif
|
||||
```
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ from being used to apply patches
|
|||
when some of those patches apply only to certain architectures.
|
||||
The best solution is to write patches
|
||||
which simply work on all architectures.
|
||||
If that is not possible, then simply use `+%setup+`
|
||||
If that is not possible, then simply use `+%autosetup -N+`
|
||||
and to use the `+%patch+` macro to apply each patch
|
||||
using `+%ifarch+` or `+%ifnarch+` as appropriate.
|
||||
For example:
|
||||
|
|
@ -502,9 +502,9 @@ For example:
|
|||
[source, rpm-spec]
|
||||
----
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -N
|
||||
%ifarch s390x
|
||||
%patch0 -p1
|
||||
%patch 0 -p1
|
||||
%endif
|
||||
----
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue