-
Notifications
You must be signed in to change notification settings - Fork 381
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
debuginfo generation does not work with --build-in-place #3042
Comments
AFAIK for |
--build-in-place is a hack that doesn't fit well into rpm's view of the world, I doubt debuginfo is the only thing that doesn't work with that. Thanks for the report though. |
@pmatilai Is there by any chance a better way than |
Actually, this is probably not the right tracker for this bug. |
That %install definition is a bug in its own right: #2204 - yes, this is an upstream issue. As for build-in-place alternatives, not really, the very concept of building from whatever happens to be around is alien to rpm's design of pristine sources. |
@pmatilai We're using it as part of systemd's development workflow these days. Being able to incrementally build rpms from a locally checked out tree of the upstream repository allows us to incorporate package building in the development workflow itself. I can build an image with newly packaged systemd rpms from the latest upstream sources and boot it in a virtual machine in about 30s thanks to It also makes debugging production issues a joy because I can make a source code change, get new rpms in 30s, install them, get more feedback, and do the same thing. This would also be a lot harder without (This does not take away that any proper rpm build intended to be distributed widely should always be done from pristine sources) This is just some feedback on how this option makes my life a lot easier, so I'm hoping it won't get removed at some point because it conflicts with rpm's design. |
I totally get the testing use-case, we have -bb --short-circuit for similar reasons. Only with --short-circuit we "poison" the produced packages to prevent people from distributing them (accidentally or otherwise). Anyway, I agree there seems to be a bug - or more likely a few - in there. There are currently zero tests for --build-in-place, it basically just jumps off the cliff and hopes for the best. I'm more surprised it works at all as it is. |
It's not the prettiest thing in the world but if you're interested in how we use --build-in-place, the build script that builds the development rpms in systemd can be found here |
It is a misfeature. It means that the produced packages cannot be compared and tested properly. In particular, The whole idea of "prevent people from distributing them" doesn't make much sense. You cannot build a package with Instead of using Please drop this whole protection and let people use |
Instead of skipping everything in %setup, take advantage of it: we shouldn't unpack any sources but otherwise we can just let it fall through it, defining buildsubdir and everything, if we let rpm do its normal %mkbuilddir thing and just symlink to the in-place tree from rpm's %builddir. This way it's not such an ugly duckling interfering with how normal rpms are built, and even honors %setup flags to a degree. This fixes two regressions: one introduced when adding %mkbuilddir that nukes your current directory with no questions asked if --build-in-place is used before it even starts, and an earlier one from commit b34333f that would nuke your precious in-place directory afterwards. And as a side-effect, also fixes debuginfo generation. Fixes: rpm-software-management#3122 Fixes: rpm-software-management#3042
Instead of skipping everything in %setup, take advantage of it: we shouldn't unpack any sources but otherwise we can just let it fall through it, defining buildsubdir and everything, if we let rpm do its normal %mkbuilddir thing and just symlink to the in-place tree from rpm's %builddir. This way it's not such an ugly duckling interfering with how normal rpms are built, and even honors %setup flags to a degree. This fixes two regressions: one introduced when adding %mkbuilddir that nukes your current directory with no questions asked if --build-in-place is used before it even starts, and an earlier one from commit b34333f that would nuke your precious in-place directory afterwards. And as a side-effect of all this, debuginfo generation also now works with --build-in-place. Fixes: rpm-software-management#3122 Fixes: rpm-software-management#3042
Instead of skipping everything in %setup, take advantage of it: we shouldn't unpack any sources but otherwise we can just let it fall through it, defining buildsubdir and everything, if we let rpm do its normal %mkbuilddir thing and just symlink to the in-place tree from rpm's %builddir. This way it's not such an ugly duckling interfering with how normal rpms are built, and even honors %setup flags to a degree. This fixes two regressions: one introduced when adding %mkbuilddir that nukes your current directory with no questions asked if --build-in-place is used before it even starts, and an earlier one from commit b34333f that would nuke your precious in-place directory afterwards. And as a side-effect of all this, debuginfo generation also now works with --build-in-place. Fixes: #3122 Fixes: #3042
@pmatilai Thank you for working on this! |
FWIW, a closer look at --build-in-place is turning up a lot of ... stuff. Follow-up in #3131 |
Instead of skipping everything in %setup, take advantage of it: we shouldn't unpack any sources but otherwise we can just let it fall through it, defining buildsubdir and everything, if we let rpm do its normal %mkbuilddir thing and just symlink to the in-place tree from rpm's %builddir. This way it's not such an ugly duckling interfering with how normal rpms are built, and even honors %setup flags to a degree. This fixes two regressions: one introduced when adding %mkbuilddir that nukes your current directory with no questions asked if --build-in-place is used before it even starts, and an earlier one from commit b34333f that would nuke your precious in-place directory afterwards. And as a side-effect of all this, debuginfo generation also now works with --build-in-place. Fixes: rpm-software-management#3122 Fixes: rpm-software-management#3042 (cherry picked from commit d107510)
Instead of skipping everything in %setup, take advantage of it: we shouldn't unpack any sources but otherwise we can just let it fall through it, defining buildsubdir and everything, if we let rpm do its normal %mkbuilddir thing and just symlink to the in-place tree from rpm's %builddir. This way it's not such an ugly duckling interfering with how normal rpms are built, and even honors %setup flags to a degree. This fixes two regressions: one introduced when adding %mkbuilddir that nukes your current directory with no questions asked if --build-in-place is used before it even starts, and an earlier one from commit b34333f that would nuke your precious in-place directory afterwards. And as a side-effect of all this, debuginfo generation also now works with --build-in-place. Fixes: #3122 Fixes: #3042 (cherry picked from commit d107510)
Describe the bug
The %install to make debuginfo work is currently defined as follows on Fedora:
The
--build-in-place
documentation says:Something in the interaction between these two causes debuginfo to not get generated when
--build-in-place
is used, presumably becausebuildsubdir
is not defined when--build-in-place
is used.To Reproduce
Steps to reproduce the behavior:
--build-in-place
Please link or attach the packages or spec files involved.
Expected behavior
Debuginfo packages are generated
Environment
The text was updated successfully, but these errors were encountered: