Skip to content

Commit

Permalink
install-from-source: update libssl for alpine
Browse files Browse the repository at this point in the history
The `validate-install-from-source` workflow is currently failing [1]. According
to [2] and [3], the solution is to upgrade the libssl version from 1.1 to 3, as
version 1.1 is out of support. Since this version is only supported on Alpine
3.15 and later, we fail if a user attempts to run the `install-from-source.sh`
script on an incompatible version.

1: https://github.com/git-ecosystem/git-credential-manager/actions/runs/8604126129
2: https://stackoverflow.com/questions/77640298/dockerfile-unable-to-select-packages-linux-alpine
3: https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine
  • Loading branch information
ldennington committed Apr 15, 2024
1 parent fd05865 commit 4407b77
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/validate-install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
fail-fast: false
matrix:
vector:
- image: ubuntu
- image: debian:bullseye
- image: fedora
# Centos no longer officially maintains images on Docker Hub. However,
# tgagor is a contributor who pushes updated images weekly, which should
# be sufficient for our validation needs.
- image: tgagor/centos
- image: tgagor/centos-stream
- image: redhat/ubi8
- image: alpine
- image: opensuse/leap
- image: opensuse/tumbleweed
- image: registry.suse.com/suse/sle15:15.4.27.11.31
- image: ubuntu:latest
- image: debian:bullseye
- image: fedora
# Centos no longer officially maintains images on Docker Hub. However,
# tgagor is a contributor who pushes updated images weekly, which should
# be sufficient for our validation needs.
- image: tgagor/centos
- image: tgagor/centos-stream
- image: redhat/ubi8
- image: alpine
- image: opensuse/leap
- image: opensuse/tumbleweed
- image: registry.suse.com/suse/sle15:15.4.27.11.31
container: ${{matrix.vector.image}}
steps:
- run: |
Expand Down
8 changes: 7 additions & 1 deletion src/linux/Packaging.Linux/install-from-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,16 @@ case "$distribution" in
ensure_dotnet_installed
;;
alpine)
# Check that the version is at least 3.15
if [[ $(echo "$version 3.15" | awk '{print ($1 < $2)}') -ne 0 ]]; then
echo "You are running Alpine $version. This script requires at least Alpine 3.15."
exit 1
fi

$sudo_cmd apk update

# Install dotnet/GCM dependencies.
install_packages apk add "curl git icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib which bash coreutils gcompat"
install_packages apk add "curl git icu-libs krb5-libs libgcc libintl libssl3 libstdc++ zlib which bash coreutils gcompat"

ensure_dotnet_installed
;;
Expand Down

0 comments on commit 4407b77

Please sign in to comment.