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

Add warning for linux requirements upgrade #2275

Merged
merged 5 commits into from
Feb 4, 2025
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
6 changes: 6 additions & 0 deletions .github/workflows/actions/prepare-distribution/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ runs:
## Linux Requirements
The Linux binaries target \`glibc\`: to run them or install the \`.deb\` packages you must have \`glibc\` version \`2.31+\` installed.
Compatible systems include, but are not limited to, \`Ubuntu 20.04+\` or \`Debian 11+\` (Bullseye)).

> [!WARNING]
> From March 2025 onwards, released Linux binaries will have their minimum required \`glibc\` version raised to \`2.35\`.
> Compatible systems include, but are not limited to, \`Ubuntu 22.04+\` or \`Debian 12+\` (Bookworm)).
>
> If you are using a system with an older version of \`glibc\`, you will need to compile the binaries from source.
EOF

- name: Fetch the latest version of the unstable tag
Expand Down
55 changes: 55 additions & 0 deletions docs/website/blog/2025-02-04-glibc-minimum-requirement-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Minimum required glibc version bump
authors:
- name: Mithril Team
tags: [ci, glibc, breaking-change]
---

# Upcoming Change: Minimum required glibc version bump

:::info
This only affects users who rely on the **precompiled Linux binaries** provided by the Mithril team.

If you compile the binaries from source or use a different operating system, you are not affected by this change.
:::

Following [the deprecation of `Ubuntu 20.04` in GitHub Actions](https://github.com/actions/runner-images/issues/11101),
we are updating the minimum required glibc version for our Linux binaries from `2.31` to `2.35`.

## Current Situation

Our Continuous Integration (CI) uses GitHub Actions to build and test the Mithril binaries for different platforms.

Currently, our CI builders target `Ubuntu 20.04` to build Linux binaries, leading to a minimum required glibc version of
`2.31`.
This version is compatible with systems such as `Ubuntu 20.04` and `Debian 11 (Bullseye)`.

However, with the release of `Ubuntu 24.04`, GitHub Actions is dropping support for `Ubuntu 20.04` as they only support
the last two LTS versions.

As a result, we need to update our CI environment to use a more recent version of Ubuntu.

## Upcoming change

Distribution `2506` will be the last distribution with a minimum required glibc version of `2.31`.

After the release of distribution `2506`, our CI builders will be updated to use `Ubuntu 22.04`. Raising the minimum
required glibc version for our Linux binaries to `2.35`.

## Impact for users

The new glibc version `2.35` is compatible with systems such as `Ubuntu 22.04` and `Debian 12 (Bookworm)`.

If you are using a system with an older version of glibc, you can either:

- Upgrade your system to a newer version that supports glibc `2.35` to keep using our compiled binaries.
- Compile the binaries from source to avoid upgrading your system.

## Summary

- **Current minimum glibc version**: `2.31`
- Examples of compatible systems: `Ubuntu 20.04`, `Debian 11 (Bullseye)`
- **New minimum glibc version**: `2.35` (effective for distributions released from **March 2025** )
- Examples of compatible systems: `Ubuntu 22.04`, `Debian 12 (Bookworm)`

For any inquiries or assistance, don't hesitate to contact the team on the [Discord channel](https://discord.gg/5kaErDKDRq).
9 changes: 9 additions & 0 deletions docs/website/root/compiled-binaries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.31
or `Debian Bullseye`).

:::

:::warning

From March 2025 onwards, released Linux binaries will have their minimum required `glibc` version raised to `2.35`
(compatible with `Ubuntu 22.04` or `Debian 12 - Bookworm`).

If you are using a system with an older version of `glibc`, you will need to compile the binaries from source.

:::
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.31
or `Debian Bullseye`).

:::

:::warning

From March 2025 onwards, released Linux binaries will have their minimum required `glibc` version raised to `2.35`
(compatible with `Ubuntu 22.04` or `Debian 12 - Bookworm`).

If you are using a system with an older version of `glibc`, you will need to compile the binaries from source.

:::
35 changes: 29 additions & 6 deletions mithril-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,46 @@ set -e
# Function to display usage
usage() {
echo "Install or upgrade a Mithril node"
echo "Usage: $0 [-n node] [-v version] [-d distribution] [-p path]"
echo "Usage: $0 [-c node] [-v version] [-d distribution] [-p path]"
echo " -c node : Mithril node to install or upgrade (mithril-signer, mithril-aggregator, mithril-client)"
echo " -d distribution : Distribution to upgrade to (latest, unstable or distribution version e.g '2445.0')"
echo " -p path : Path to install the component"
exit 1
}

# Default values
DISTRIBUTION="latest"
GITHUB_ORGANIZATION="input-output-hk"
GITHUB_REPOSITORY="mithril"

# Function to display an error message and exit
error_exit() {
echo "$1" 1>&2
exit 1
}

# Function to check that required tools are installed
check_requirements() {
which curl >/dev/null ||
error_exit "It seems 'curl' is not installed or not in the path.";
which jq >/dev/null ||
error_exit "It seems 'jq' is not installed or not in the path.";
}

check_glibc_min_version() {
glibc_version=$(ldd --version | awk 'NR==1{print $NF}')

if [ "$(echo "$glibc_version" | grep -cE "2\.3[1-4]")" -gt 0 ]; then
echo "Warning: Mithril support for your GLIBC version $glibc_version is deprecated. The minimum required version will be bumped to 2.35 for distributions released from March 2025 onwards."
elif [ "$(echo "$glibc_version" | grep -cE -e "2\.[0-2][0-9]" -e "2\.30")" -gt 0 ]; then
error_exit "Error: Your GLIBC version is $glibc_version, but the minimum required version is 2.31."
fi
}

# --- MAIN execution ---

# Default values
DISTRIBUTION="latest"
GITHUB_ORGANIZATION="input-output-hk"
GITHUB_REPOSITORY="mithril"

check_requirements

# Parse command line arguments
while getopts "c:v:d:p:" opt; do
case ${opt} in
Expand All @@ -47,6 +69,7 @@ OS_CODE=$(echo "$OS" | awk '{print tolower($0)}')

case "$OS" in
Linux)
check_glibc_min_version
;;
Darwin)
OS_CODE="macos"
Expand Down