Skip to content

debugedit: fix messing with mtime#2429

Merged
BareosBot merged 2 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-debugedit-mtime
Nov 24, 2025
Merged

debugedit: fix messing with mtime#2429
BareosBot merged 2 commits intobareos:masterfrom
sebsura:dev/ssura/master/fix-debugedit-mtime

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Nov 12, 2025

Changing the mtime of a library after the .so symlinks were created messes with cmakes internal logic. In those cases cmake will decide to relink the library itself, meaning that everytime you execute a build, all libraries (and all targets depending on them) will get relinked.

This is not a big issue on debug builds, but it takes a long time when building release builds with lto.

This commit fixes this by using a script that restores the mtime after debugedit messed with it.

Thank you for contributing to the Bareos Project!

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
  • Required backport PRs have been created
  • Correct milestone is set
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

@pstorz pstorz self-requested a review November 24, 2025 12:20
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

sebsura and others added 2 commits November 24, 2025 14:22
Changing the mtime of a library _after_ the .so symlinks were created
messes with cmakes internal logic. In those cases cmake will decide to
relink the library itself, meaning that everytime you execute a build,
all libraries (and all targets depending on them) will get relinked.

This is not a big issue on debug builds, but it takes a long time when
building release builds with lto.

This commit fixes this by using a script that restores the mtime after
debugedit messed with it.
@BareosBot BareosBot force-pushed the dev/ssura/master/fix-debugedit-mtime branch from 20c9323 to 134d40c Compare November 24, 2025 14:22
@BareosBot BareosBot merged commit df4f5bc into bareos:master Nov 24, 2025
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.

3 participants