Skip to content
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

install-from-source.sh: fix libssl Alpine pkgs #1582

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/validate-install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- image: tgagor/centos-stream
- image: redhat/ubi8
- image: alpine
- image: alpine:3.14.10
mjcheetham marked this conversation as resolved.
Show resolved Hide resolved
- image: opensuse/leap
- image: opensuse/tumbleweed
- image: registry.suse.com/suse/sle15:15.4.27.11.31
Expand Down
13 changes: 12 additions & 1 deletion src/linux/Packaging.Linux/install-from-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ print_unsupported_distro() {
echo "See https://gh.io/gcm/linux for details."
}

version_at_least() {
[ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$1" ]
}

sudo_cmd=

# If the user isn't root, we need to use `sudo` for certain commands
Expand Down Expand Up @@ -189,7 +193,14 @@ case "$distribution" in
$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"
# Alpine 3.14 and earlier need libssl1.1, while later versions need libssl3.
if ( version_at_least "3.15" $version ) then
libssl_pkg="libssl3"
else
libssl_pkg="libssl1.1"
fi

install_packages apk add "curl git icu-libs krb5-libs libgcc libintl $libssl_pkg libstdc++ zlib which bash coreutils gcompat"

ensure_dotnet_installed
;;
Expand Down
Loading