Extracting contents of tarball in rpmbuild
RHEL 9. I've used rpm-setuptree and rpm-newspec If I create a very simple spec file that doesn't do anything, and then copy a tar.gz into SOURCES, when I run rpmbuild the very first thing it does is extract that tarball to BUILD. However, the very next thing it does is try to cd to %{name}-%{version} But, the tarball in question extracts to a directory called just %{name} So, my rpmbuild always fails with "No such file or directory".
I've tried using symlinks, tar options, overwriting $BUILDROOT, all to no avail. rpmbuild absolutely ignores everything I try and falls back to this behavior which will never work. And every example I can find on the net is either way too simplistic (a single hello-world file) or far too complex.
How can I get rpmbuild to accept where the tarball extracts to and move forward without being certain it knows better?
Responses