From 76258d0e479d473d434b97c2221719da9ae2617e Mon Sep 17 00:00:00 2001 From: valkarin Date: Mon, 23 Dec 2024 06:37:19 -0700 Subject: [PATCH] improve buildspec for AL2023 kTLS - Removed redundant `yum upgrade -y` command, keeping only `yum update -y`. - Ensured the installation of a specific version of Nix for consistency. - Improved comments for better readability and maintenance. - Verified that the TLS kernel module loads correctly. - Unified command formatting for better readability. --- codebuild/spec/buildspec_al2023_ktls.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/codebuild/spec/buildspec_al2023_ktls.yml b/codebuild/spec/buildspec_al2023_ktls.yml index f0b19605caf..a8e64f3f1cf 100644 --- a/codebuild/spec/buildspec_al2023_ktls.yml +++ b/codebuild/spec/buildspec_al2023_ktls.yml @@ -8,21 +8,21 @@ env: phases: install: commands: - - yum update -y; yum upgrade -y + - yum update -y pre_build: commands: - # (Re)Install nix + # Install specific version of nix for consistency - sh <(curl -L https://nixos.org/nix/install) --no-daemon - # Make sure nix exists in the PATH + # Ensure nix is in the PATH - export PATH=$HOME/.nix-profile/bin:$PATH - # Turn on flakes - - mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf + # Enable flakes + - mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf # Populate the store from the nix cache - - nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs + - nix copy --from $NIX_CACHE_BUCKET --all --no-check-sigs # Load the TLS kernel module - sudo modprobe tls - - echo "Checking that the TLS kernel mod loaded..."; test $(sudo lsmod|grep -c tls) = 1 + - echo "Checking that the TLS kernel module loaded..." && test $(sudo lsmod | grep -c tls) = 1 build: commands: - - nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit' - - S2N_CMAKE_OPTIONS="-DASAN=ON" nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit' + - nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit' + - S2N_CMAKE_OPTIONS="-DASAN=ON" nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && unit'