Skip to content

Backport 2403 - #2435

Merged
jan-cerny merged 1 commit into
OpenSCAP:maint-1.3from
Mab879:2403_maint_1_3
Oct 5, 2026
Merged

jan-cerny merged 1 commit into
OpenSCAP:maint-1.3from
Mab879:2403_maint_1_3

Conversation

@Mab879

@Mab879 Mab879 commented Oct 5, 2026

Copy link
Copy Markdown
Member

Backport #2403

Commit d12d820 ("Fix build without crypto support") enabled
building the crapi library without a crypto backend, but left the
target_include_directories and target_compile_definitions calls
unguarded. When no crypto library is available, the GCrypt find module
leaves GCRYPT_INCLUDE_DIRS unset, so CMake fails at the generate step
with:

  CMake Error: The following variables are used in this project, but
  they are set to NOTFOUND: GCRYPT_INCLUDE_DIR

The test command provided at this time made the build successful because
it provided -DCMAKE_DISABLE_FIND_PACKAGE_GCrypt=TRUE, but if no crypto
backend is provided, it does not make sense to provide those cmake
configuration options preventing dependency search manually.

Guard both calls with a CRYPTO_FOUND check so they are only applied when
an actual digest backend is present, even without providing
-DCMAKE_DISABLE_FIND_PACKAGE_foo

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
@Mab879 Mab879 added this to the 1.3.15 milestone Oct 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@jan-cerny jan-cerny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have confirmed that the PR is the same as the linked PR and correctly backports the linked PR to the target branch.

@jan-cerny jan-cerny self-assigned this Oct 5, 2026
@jan-cerny
jan-cerny merged commit 8ee84e8 into OpenSCAP:maint-1.3 Oct 5, 2026
11 checks passed
@Mab879
Mab879 deleted the 2403_maint_1_3 branch October 5, 2026 15:49
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