I have a series of RPM spec files and no debuginfo directive set in them. When I run rpmbuild, some packages generate a debuginfo rpm, some do not. What is the criteria used by rpm to decide if a debuginfo is generated? It seems to me that:
- only arch packages generate debuginfo (noarch packages do not)
- only main package in spec generates debuginfo (subpackages do not)
Someone can confirm if these rules are valid and if there are any others?
I have redhat-rpm-config installed, what is a prerequisite to generate debuginfo packages, according to https://fedoraproject.org/wiki/Packaging:Debuginfo?rd=Packaging/Debuginfo.
Best Answer
%debug_package
has to be included in.spec
file. I used to write it before%prep
stage. Also,__debug_package
macro has to be 1.