Discussion:
rpmbuild internals
Philip Prindeville
2007-09-17 22:45:36 UTC
Permalink
Can someone give me a quick synopsis (without me groveling through
sources) of how rpmbuild -tb looks inside a tarball to find a .spec file?

Where does it look (in terms of sub-directories), and what names does it
look for? I.e. how is that name derived?

I got the impression that it looks for a file called "redhat.spec" on RH
or FC, or else generically looks for "<package-name>.spec" ...

-Philip
Jeff Johnson
2007-09-18 13:41:44 UTC
Permalink
Post by Philip Prindeville
Can someone give me a quick synopsis (without me groveling through
sources) of how rpmbuild -tb looks inside a tarball to find a .spec file?
rpmbuild -tb just runs tar with a "*.spec" wild card. Any file that
is extracted is then used as a spec file to drive the build.

There are many failure cases, including no and multiple *.spec files
in the tar ball. There are additional issues with the new fangled
--wildcards option.

Where does it look (in terms of sub-directories), and what names does it
Post by Philip Prindeville
look for? I.e. how is that name derived?
Pure WYSIWYG only the CLI argument is used.

I got the impression that it looks for a file called "redhat.spec" on RH
Post by Philip Prindeville
or FC, or else generically looks for "<package-name>.spec" ...
Nope. There is an ancient convention to extract "Specfile" if "*.spec"
failes, but let's not resurrect a convention that has never been widely
used 10 years later.

There is certainly no attempt to look for vendor peculier "redhat.spec",
nor is the behavior different with vendor implementations afaik.

There is no way to reliably know the package name before parsing
the spec file.

hth

73 de Jeff

-Philip
Post by Philip Prindeville
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Loading...