When comparing different RPM files, I've noticed that not all of them expose the same header tags. So there must be some logic that activates/deactivates creation of some of them.
One example is the build time and host. I've stumbled upon two RPM specs. Neither mentions anything that looks at all like a specification or switch to provide the information. Still, one of them is generated with Build Time
and Build Host
fields, the other isn't (I am not permitted to post either one).
I am aware of the new _buildhost
macro. The RPM version used to generate both is insufficient to use it. Both packages get created from a list of Sources, as far as I can see. The one that doesn't display the build information gets built using CMake/CPack, the other uses rpmbuild
directly, that's the only information I have about serious difference.
Both are defined as Group: AddOn
. So far, I haven't found any remotely definite resources about what groups are valid, or their meanings. Only thing I found was the list of deprecated groups in Fedora. I'd be more interested in a list of supported ones, but wasn't successful so far.
Resources I've found until now (omitting the pointless ones):
Max RPM Package Building Page, RedHat blog-ish tutorial, The RPM build guide, The actual RPM tags documentation, The RPM packaging guide
Unfortunately, none of the above provide the information I'm looking for.
"Give a man a fish" question: How can I suppress creation of Build Time
or Build Host
in rpm
4.11, be it in spec syntax or in usage of rpmbuild
?
"Teach a man how to fish" question: Is there any documentation about what header tags get created with which settings?
question from:
https://stackoverflow.com/questions/65909759/how-does-rpmbuild-compute-which-fields-to-generate 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…