Skip to content

Commit

Permalink
hooks: always write the FIPS preference for FIPS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Nov 20, 2024
1 parent a47db13 commit 19e83e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hooks/001-extra-packages.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ FSbrQ9ACQFlqN49Ogbl47J6TZ7BrjDpROote55ixmrU=
EOF

# write FIPS PPA files if the current build is a local FIPS build
# for private builds a conf file is neccessary, setup for PPA access if provided
# for private builds a conf file is necessary, setup for PPA access if provided
if [ -e etc/apt/auth.conf.d/01-fips.conf ]; then
echo "deb https://private-ppa.launchpadcontent.net/fips-cc-stig/fips-under-certification/ubuntu $CODENAME main" > /etc/apt/sources.list.d/fips.list
cat >etc/apt/trusted.gpg.d/fips-cc-stig.asc <<'EOF'
Expand Down Expand Up @@ -153,7 +153,11 @@ UNuHk+m6RrdnU0GhZFiccabKzM11OElMcupvOQeIRA==
=MKdQ
-----END PGP PUBLIC KEY BLOCK-----
EOF

fi

# always install the preference though, both for LP and
# local
if [[ ${SNAP_FIPS_BUILD+x} ]]; then
mkdir -p etc/apt/preferences.d/
cat >etc/apt/preferences.d/fips.pref <<'EOF'
Package: *
Expand Down

0 comments on commit 19e83e8

Please sign in to comment.