Skip to content

fix(nix): Make sure bssl is in the PATH; workaround nix build failure… #2431

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

dougch
Copy link
Contributor

@dougch dougch commented May 21, 2025

Issues:

none

Description of changes:

In some CI environments (in docker containers), the build is trying to write to $HOME, which nix intentionally unsets. This causes build failures with this error:

FAILED: crypto/err_data.c /tmp/nix-build-aws-lc.drv-0/source/build/crypto/err_data.c
cd /tmp/nix-build-aws-lc.drv-0/source/crypto/err && /nix/store/2xc5jh4nxvm68c67ila9p2rj3qrjgz0x-go-1.23.5/bin/go run err_data_generate.go > /tmp/nix-build-aws->
failed to initialize build cache at /homeless-shelter/.cache/go-build: mkdir /homeless-shelter: permission denied

By setting $HOME in preBuild, we can eliminate this failure.

Also, the bssl utility is not available in a devShell, because we're not properly importing aws-lc.

Call-outs:

The build failure is blocking s2n-tls from using the upstream flake.

Reformatting both nix files with nix fmt.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? locally.

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.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.87%. Comparing base (724a640) to head (00b80f6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2431      +/-   ##
==========================================
- Coverage   78.88%   78.87%   -0.01%     
==========================================
  Files         621      621              
  Lines      108597   108597              
  Branches    15413    15412       -1     
==========================================
- Hits        85665    85661       -4     
- Misses      22261    22266       +5     
+ Partials      671      670       -1     

☔ View full report in Codecov by Sentry.
📢 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.

@dougch dougch marked this pull request as ready for review May 21, 2025 16:46
@dougch dougch requested a review from a team as a code owner May 21, 2025 16:46
@skmcgrail skmcgrail merged commit c142a82 into aws:main May 27, 2025
114 of 116 checks passed
@justsmth justsmth mentioned this pull request May 29, 2025
justsmth added a commit that referenced this pull request May 29, 2025
## What's Changed
* Increase default salt from 8 to 16 bytes for PKCS#8 & PKCS#12 by @xnox
in #2409
* fix(nix): Make sure bssl is in the PATH; workaround nix build failure…
by @dougch in #2431
* Fix path-has-spaces test by @justsmth in
#2436
* Create pre-production stage for CI pipeline by @nhatnghiho in
#2282
* Fix CI cross-mingw by @justsmth in
#2437
* Display X509 fingerprint after hash by @justsmth in
#2444

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.
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.

4 participants