"rpmbuild -tb tarball.tar.gz" cannot find the embedded '*.spec' file because it's not passing --wildcards to tar who requires this to match wildcards. Tar then prints a message about this, which rpmbuild misinterprets as a real output and goes on to create a file called "%{_topdir}/SPECS/tar: Pattern matching characters used in file names. Please,", which is the first line of tar's message. Reproducible: Always Steps to Reproduce: Invoke "rpmbuild -tb tarball.tar.gz" on a tarball that includes a specfile that is supposed to work. Actual Results: rpmbuild emits the following output: error: Name field must be present in package: (main package) error: Version field must be present in package: (main package) error: Release field must be present in package: (main package) error: Summary field must be present in package: (main package) error: Group field must be present in package: (main package) error: License field must be present in package: (main package) That's rpmbuild's clever way of saying that it didn't find the spec file. Using strace you can see that the following gets invoked behind the scenes: "tar xOvf - '*.spec'". Manually running this command show tar's message about wildcards. Expected Results: Expected result is of course that rpmbuild finds the spec file. It should pass --wildcards before the *.spec argument to tar. app-arch/rpm-4.4.6-r6 behaves the same. I didn't test app-arch/rpm-4.4.7* as they are hard masked and said to be broken on x86 anyway. My tar is app-arch/tar-1.20.
Here's a link to the git commit that fixes this problem: http://devel.linux.duke.edu/gitweb/?p=rpm.git;a=commitdiff;h=39defaa877956e0719451f37d1eee81350a163ca Putting this commit's diff into files/rpm-4.4.6-tar-wildcards.patch and enabling it in the ebuild works fine.
That other link doesn't work anymore. Here's the patch: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=39defaa877956e0719451f37d1eee81350a163ca
tracked at https://bugs.launchpad.net/rpm/+bug/634189
Unlikely you are still experiencing the same problem, though the only stable rpm is basically the same. I will be trying to stabilize rpm 4.9.1.2 after some more testing in the tree and cleanup older releases. It would be nice if you could test it. A simple test I've done on rpmbuild -tb with one project seemed to work for me.
We did a cleanup of older app-arch/rpm versions. Oldest is now 4.9.1.3, please update and if you can still reproduce feel free to reopen.