Skip to content
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

build: Fix debugsource RPM package generation #1713

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

arogge
Copy link
Member

@arogge arogge commented Feb 12, 2024

This PR reconfigures the build to

  • set a debug-prefix-map (and macro-prefix-map) of /usr/src/bareos
  • if debugedit program is available, debug-prefix-maps are undone POST_BUILD

While this may seem counter-intuitive, we need the canonical /usr/src/bareos path to be in ccache so it actually caches.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@arogge arogge force-pushed the dev/arogge/master/update-prefix-map branch 3 times, most recently from b46b667 to ac3926b Compare February 13, 2024 10:02
@pstorz pstorz self-requested a review February 13, 2024 10:57
@pstorz pstorz self-assigned this Feb 13, 2024
@pstorz pstorz changed the title Fix debugsource RPM package generation build: Fix debugsource RPM package generation Feb 27, 2024
by using the DebugEdit module we add a POST_BUILD command to each CMake
target that generates ELF binaries if we have debugedit available.
This command will basically undo the job of -fdebug-prefix-map.
The idea here is that we want to have all object files with canonical
paths in ccache, but the resulting binaries should have the
non-canonical path embedded so debuginfo/debugsource generation will
work correctly.
@arogge arogge force-pushed the dev/arogge/master/update-prefix-map branch from ac3926b to e5c3b2a Compare March 7, 2024 12:27
@BareosBot BareosBot merged commit 36e38f9 into bareos:master Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants