Skip to content

[FIPS 4.0] Add COHABITANT_BINARIES option to install tool binaries with 'aws-lc-…#3317

Open
justsmth wants to merge 1 commit into
aws:fips-2025-09-12-ltsfrom
justsmth:cohabitate-binaries-fips-2025-09-12-lts
Open

[FIPS 4.0] Add COHABITANT_BINARIES option to install tool binaries with 'aws-lc-…#3317
justsmth wants to merge 1 commit into
aws:fips-2025-09-12-ltsfrom
justsmth:cohabitate-binaries-fips-2025-09-12-lts

Conversation

@justsmth

Copy link
Copy Markdown
Contributor

Issues:

Addresses P460497046

Description of changes:

Backports #3116 (COHABITANT_BINARIES support) to the FIPS 4.0 branch. When -DCOHABITANT_BINARIES=ON is passed to CMake, the installed tool binaries are renamed with an aws-lc- prefix (aws-lc-bssl, aws-lc-openssl, aws-lc-c_rehash) to avoid filename conflicts when AWS-LC-FIPS coexists with OpenSSL in the same install prefix.

Call-outs:

This is NOT strictly a cherry-pick of upstream commit 9651480. That commit depends on the ENABLE_DIST_PKG / COHABITANT_HEADERS infrastructure introduced in PR #3042, which is a larger refactor (10 files, 600+ insertions).

The option defaults to OFF so there is no behavioral change for existing consumers.

Testing:

Verified CMake configures cleanly with both -DCOHABITANT_BINARIES=ON and -DCOHABITANT_BINARIES=OFF. Confirmed via generated build rules that binaries are correctly prefixed (ON) or unchanged (OFF).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

…' prefix

Backport of the binary-renaming logic from upstream commit 9651480
("Fix: Apply COHABITANT_HEADERS logic to location of tool binaries aws#3116")
adapted as a standalone option for the FIPS 4.0 branch.

When -DCOHABITANT_BINARIES=ON is passed to CMake, the installed binaries
are renamed: bssl -> aws-lc-bssl, openssl -> aws-lc-openssl,
c_rehash -> aws-lc-c_rehash. This prevents file conflicts when AWS-LC-FIPS
coexists with OpenSSL in the same installation prefix.
@justsmth justsmth requested a review from a team as a code owner June 25, 2026 14:40
@justsmth justsmth requested a review from samuel40791765 June 25, 2026 14:40
@justsmth justsmth changed the title Add COHABITANT_BINARIES option to install tool binaries with 'aws-lc-… [FIPS 4.0] Add COHABITANT_BINARIES option to install tool binaries with 'aws-lc-… Jun 25, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.77%. Comparing base (a96bede) to head (1bca9d2).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           fips-2025-09-12-lts    #3317   +/-   ##
====================================================
  Coverage                78.76%   78.77%           
====================================================
  Files                      667      667           
  Lines                   113431   113431           
  Branches                 16078    16077    -1     
====================================================
+ Hits                     89343    89351    +8     
+ Misses                   23292    23285    -7     
+ Partials                   796      795    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@justsmth justsmth requested a review from crlorentzen June 26, 2026 14:27
Comment thread tool/CMakeLists.txt
endif()
endif()

if(COHABITANT_BINARIES)

@crlorentzen crlorentzen Jun 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Couldn't be do without this conditional check for setting the OUTPUT_NAME? reading the CMakeLists.txt we always define AWSLC_BIN_PREFIX as either "" (empty string), or "aws-lc-" based on COHABITANT off/on. Not recommending a change as I understand this just brings the existing design from mainline.

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