I have a very straightforward arrangement -- one source tarball, one patch:
Source: http://...../foo-%{version}.tar.gz
Patch: my-patch-for-foo.diff
...
%prep
%autosetup -v -n bar-%{version}
However, when I attempt to use the %autosetup
in the %prep
step, rpmbuild
attempts to patch first -- before extracting:
/bin/cat ..../SOURCES/my-patch-for-foo.diff |
/usr/bin/patch
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8PV0PY
+ umask 022
+ cd /....
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /....
+ rm -rf bar-0.12.18
+ /bin/tar -xvvf -
+ /usr/bin/gzip -dc ..../SOURCES/foo-0.12.18.tgz
For some reason, there is no error reported by patch
-- but the extracted code ends up unpatched and my build fails later.
Using the ordinary %setup
followed by %patch0
works fine, but what's wrong with %autosetup
?
I'm on CentOS-6.8, if it matters, where RPM is of version 4.8.0. Thank you!
Update, splitting the %autosetup
into %setup
and %autopatch
does not work either -- %autopatch
does not do anything useful. Because my patches are all in default format, I'm going to use my reimplementation of %autopatch
:
%prep
%setup -n bar-%{version}
%{lua:
for i, p in ipairs(patches) do
print("%patch"..i)
end
}
Have I really found a bug, or am I doing something grotesquely wrong?