-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The debuginfo machinery breaks if %install follows directly after %prep or preamble #1870
Comments
Slight tiny bump. |
Do you have a link to an example? |
@ffesti, you can look at https://src.fedoraproject.org/rpms/golang-x-net/blob/rawhide/f/golang-x-net.spec. It only has one noarch subpackage. ( |
Oh, this one's rather special. Debuginfo processing triggers when two conditions are met: the package is not a |
Ehm, scratch the above, the debuginfo stuff is hooked on %install, not %build. Sorry for the misleading comment. This seems one of those "spec specials", really. It's probably some interplay between how the spec parser works and expands macros and sections - if you move the %generate_buildrequires section before %prep in the golang-x-net.spec case, the phenomenon disappears. |
Yup. The reason I remembered debuginfo depending on %build section is easily demonstrated with the golang example too (after removing the line to disable debuginfo):
So the ugly hack of debuginfo enabling (see #2204) relies on some rather subtle spec parser quirks, and does not work after %prep because that's processed differently from other sections, ditto for preamble. And as noted, this is an arch-specific package so debuginfo should be generated for it, unless disabled. But I guess debug extraction still doesn't work for golang (?) so disabling it for this is the right thing to do, regardless of all the weird stuff that the spec parser is throwing at you. This is one weird ticket 😆 |
OK, I think I have an idea what's wrong here: If So, Two things are to fix here:
|
Golang library packages often don't ship any go binaries and thus no arched (sub)packages, but they're built on all arches to ensure that the tests pass everywhere and that the noarch |
I wonder if adding |
What does |
It closes a section. So it would end the |
Adding %end works for terminating %prep, but it doesn't help %install following the preamble. |
Well, |
Oh, I forgot that %buildsubdir dependency, which what explains not working before %prep. Tricksy 😄 And @gotmax23 - that Golang (and others) do not have debuginfo is yet another, separate matter. Like said, for now the right thing to do is to explicitly disable the debuginfo package in the spec for such cases. |
Go binaries do have debuginfo. Go libraries are just source code, i.e. text files. |
Well, those that do have no problem. Those that don't, should be "BuildArch: noarch" in the main package and no debuginfo will be attempted on them. Sub-package level noarch is a special case to allow shared noarch content in an otherwise arch dependent package. The golang package abuses that for it's own reasons (I'm sure there are some) at the cost of requiring packages to disable debuginfo manually. |
Fixed by #2730 And no, don't ask for backports (see the part about sacrifices in the PR). This will only be in rpm >= 4.20. |
Hi,
When building noarch subpackages, adding a section %generate_buildrequires will trigger the search for the debuginfo data. It should not.
Mail ref:
The text was updated successfully, but these errors were encountered: