Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224821 - app-arch/rpm-4.4.6-r3: rpmbuild -tb can't find the embedded specfile
Summary: app-arch/rpm-4.4.6-r3: rpmbuild -tb can't find the embedded specfile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Stanislav Ochotnicky (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-04 00:33 UTC by jlh
Modified: 2012-07-26 08:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlh 2008-06-04 00:33:55 UTC
"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.
Comment 1 jlh 2008-06-11 22:04:41 UTC
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.
Comment 2 jlh 2008-11-19 18:22:33 UTC
That other link doesn't work anymore.  Here's the patch:

http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=39defaa877956e0719451f37d1eee81350a163ca
Comment 3 Jeff Johnson 2010-09-09 16:18:02 UTC
tracked at https://bugs.launchpad.net/rpm/+bug/634189
Comment 4 Stanislav Ochotnicky (RETIRED) gentoo-dev 2012-02-22 22:47:59 UTC
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.
Comment 5 Stanislav Ochotnicky (RETIRED) gentoo-dev 2012-07-26 08:34:58 UTC
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.