Skip to content

Make the jansson library mandatory#793

Merged
arogge merged 5 commits intomasterfrom
dev/joergs/master/jansson-mandatory
Apr 22, 2021
Merged

Make the jansson library mandatory#793
arogge merged 5 commits intomasterfrom
dev/joergs/master/jansson-mandatory

Conversation

@joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented Apr 13, 2021

The jansson library is required to be able to execute Bareos console commands in API 2 (json) mode.
This change gurantees that it is available when building.

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)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • 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
  • check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing

@joergsteffens joergsteffens force-pushed the dev/joergs/master/jansson-mandatory branch from b2cd696 to 9a293bc Compare April 14, 2021 13:40
@joergsteffens joergsteffens force-pushed the dev/joergs/master/jansson-mandatory branch from 9a293bc to 824603e Compare April 14, 2021 14:22
@joergsteffens joergsteffens force-pushed the dev/joergs/master/jansson-mandatory branch from 824603e to e5f32c4 Compare April 20, 2021 20:37
@joergsteffens joergsteffens force-pushed the dev/joergs/master/jansson-mandatory branch from e5f32c4 to bc2153d Compare April 21, 2021 09:21
@joergsteffens
Copy link
Member Author

I've been asked to implement the cmake Jansson dependencies with find_module, instead of ugly workaround for Solaris. I implemented this and also did some cleanup in the cmake files.

When someone is reviewing this PR, please have a close look on following item, where I'm unsure:

  • manually settings HAVE_JANSSON in cmake/FindJansson.cmake
    • before this have been set automatically.
  • There have been lots of special treatment for FreeBSD, which does not seem required, so I removed it and it still compiles as expected.
  • When is the Build Target Threads::Threads required? Or to put it in another question: are there cases, when the Build Target Threads::Threads must not been set? E.g. on Windows?

@joergsteffens joergsteffens marked this pull request as ready for review April 21, 2021 09:53
@joergsteffens joergsteffens marked this pull request as draft April 21, 2021 09:54
@joergsteffens joergsteffens force-pushed the dev/joergs/master/jansson-mandatory branch from bc2153d to 6081ca1 Compare April 21, 2021 10:01
@joergsteffens joergsteffens marked this pull request as ready for review April 21, 2021 11:26
@joergsteffens joergsteffens requested a review from arogge April 21, 2021 11:27
@sduehr sduehr assigned joergsteffens and arogge and unassigned joergsteffens and arogge Apr 22, 2021
Without the library, the API 2 commands are not available.
Implement find_package for Jansson,
as otherwise Solaris would require special treatment.
jansson is a requirement when compiling the Director, so HAVE_JANSSON is no longer required.
This files have been used to initialize jansson with a custom memory management.
While this have been useful in the past, the memory management have now be identical to the default.
Therefore, these initialization is no longer required.
The message mode parameter is case-sensitiv and must be written upper-case.
@arogge arogge force-pushed the dev/joergs/master/jansson-mandatory branch from 6081ca1 to 3c2e57b Compare April 22, 2021 13:36
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

Tremendous work. Thank you!

@arogge arogge merged commit 3bc9255 into master Apr 22, 2021
@arogge arogge deleted the dev/joergs/master/jansson-mandatory branch April 22, 2021 13:40
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.

2 participants