Skip to content

Commit

Permalink
Merge branch 'main' into feat/tpm
Browse files Browse the repository at this point in the history
  • Loading branch information
brdanin committed Feb 6, 2024
2 parents 4cb6b6a + 3ab2bb5 commit 898c0e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ LABEL org.opencontainers.image.description="Builder for Garden Linux"

COPY pkg.list /pkg.list
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $(cat /pkg.list) && rm /pkg.list
RUN cd /tmp \
&& curl -sSL "https://github.com/gardenlinux/package-openssl/releases/download/3.1.4-2gardenlinux0/openssl_3.1.4-2gardenlinux0_$(dpkg --print-architecture).deb" > openssl.deb \
&& dpkg -i openssl.deb \
&& rm openssl.deb
COPY --from=mv_data /usr/bin/mv_data /usr/bin/mv_data
COPY --from=aws-kms-pkcs11 /aws_kms_pkcs11.so /aws_kms_pkcs11.so
RUN mv /aws_kms_pkcs11.so "/usr/lib/$(uname -m)-linux-gnu/pkcs11/aws_kms_pkcs11.so"
Expand Down
9 changes: 6 additions & 3 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
set -euo pipefail
shopt -s nullglob

exec 3>&1
exec 1>&2

container_image=localhost/builder
container_engine=podman
target_dir=.build
Expand Down Expand Up @@ -43,7 +46,7 @@ while [ $# -gt 0 ]; do
shift
;;
--print-container-image)
printf '%s\n' "$container_image"
printf '%s\n' "$container_image" >&3
exit 0
;;
--resolve-cname)
Expand Down Expand Up @@ -95,7 +98,7 @@ if [ "$resolve_cname" = 1 ]; then
arch="$("$container_engine" run --rm "${container_run_opts[@]}" "${container_mount_opts[@]}" "$container_image" dpkg --print-architecture)"
cname="$("$container_engine" run --rm "${container_run_opts[@]}" "${container_mount_opts[@]}" "$container_image" /builder/parse_features --feature-dir /builder/features --default-arch "$arch" --default-version "$default_version" --cname "$1")"
short_commit="$(head -c 8 <<< "$commit")"
echo "$cname-$short_commit"
echo "$cname-$short_commit" >&3
exit 0
fi

Expand Down Expand Up @@ -127,4 +130,4 @@ if [ -d cert ]; then
container_mount_opts+=(-v "$PWD/cert:/builder/cert:ro")
fi

"$container_engine" run --rm "${container_run_opts[@]}" "${container_mount_opts[@]}" "$container_image" ${container_cmd[@]+"${container_cmd[@]}"} make --no-print-directory -C /builder "${make_opts[@]}" "$@"
"$container_engine" run --rm "${container_run_opts[@]}" "${container_mount_opts[@]}" "$container_image" ${container_cmd[@]+"${container_cmd[@]}"} make --no-print-directory -C /builder "${make_opts[@]}" "$@" >&3

0 comments on commit 898c0e0

Please sign in to comment.