Skip to content

Commit b4ad474

Browse files
authored
Merge pull request #2275 from input-output-hk/djo/2216/update-linux-requirements
Add warning for linux requirements upgrade
2 parents 0163127 + 8b6b925 commit b4ad474

File tree

5 files changed

+108
-6
lines changed

5 files changed

+108
-6
lines changed

.github/workflows/actions/prepare-distribution/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ runs:
101101
## Linux Requirements
102102
The Linux binaries target \`glibc\`: to run them or install the \`.deb\` packages you must have \`glibc\` version \`2.31+\` installed.
103103
Compatible systems include, but are not limited to, \`Ubuntu 20.04+\` or \`Debian 11+\` (Bullseye)).
104+
105+
> [!WARNING]
106+
> From March 2025 onwards, released Linux binaries will have their minimum required \`glibc\` version raised to \`2.35\`.
107+
> Compatible systems include, but are not limited to, \`Ubuntu 22.04+\` or \`Debian 12+\` (Bookworm)).
108+
>
109+
> If you are using a system with an older version of \`glibc\`, you will need to compile the binaries from source.
104110
EOF
105111
106112
- name: Fetch the latest version of the unstable tag
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Minimum required glibc version bump
3+
authors:
4+
- name: Mithril Team
5+
tags: [ci, glibc, breaking-change]
6+
---
7+
8+
# Upcoming Change: Minimum required glibc version bump
9+
10+
:::info
11+
This only affects users who rely on the **precompiled Linux binaries** provided by the Mithril team.
12+
13+
If you compile the binaries from source or use a different operating system, you are not affected by this change.
14+
:::
15+
16+
Following [the deprecation of `Ubuntu 20.04` in GitHub Actions](https://github.com/actions/runner-images/issues/11101),
17+
we are updating the minimum required glibc version for our Linux binaries from `2.31` to `2.35`.
18+
19+
## Current Situation
20+
21+
Our Continuous Integration (CI) uses GitHub Actions to build and test the Mithril binaries for different platforms.
22+
23+
Currently, our CI builders target `Ubuntu 20.04` to build Linux binaries, leading to a minimum required glibc version of
24+
`2.31`.
25+
This version is compatible with systems such as `Ubuntu 20.04` and `Debian 11 (Bullseye)`.
26+
27+
However, with the release of `Ubuntu 24.04`, GitHub Actions is dropping support for `Ubuntu 20.04` as they only support
28+
the last two LTS versions.
29+
30+
As a result, we need to update our CI environment to use a more recent version of Ubuntu.
31+
32+
## Upcoming change
33+
34+
Distribution `2506` will be the last distribution with a minimum required glibc version of `2.31`.
35+
36+
After the release of distribution `2506`, our CI builders will be updated to use `Ubuntu 22.04`. Raising the minimum
37+
required glibc version for our Linux binaries to `2.35`.
38+
39+
## Impact for users
40+
41+
The new glibc version `2.35` is compatible with systems such as `Ubuntu 22.04` and `Debian 12 (Bookworm)`.
42+
43+
If you are using a system with an older version of glibc, you can either:
44+
45+
- Upgrade your system to a newer version that supports glibc `2.35` to keep using our compiled binaries.
46+
- Compile the binaries from source to avoid upgrading your system.
47+
48+
## Summary
49+
50+
- **Current minimum glibc version**: `2.31`
51+
- Examples of compatible systems: `Ubuntu 20.04`, `Debian 11 (Bullseye)`
52+
- **New minimum glibc version**: `2.35` (effective for distributions released from **March 2025** )
53+
- Examples of compatible systems: `Ubuntu 22.04`, `Debian 12 (Bookworm)`
54+
55+
For any inquiries or assistance, don't hesitate to contact the team on the [Discord channel](https://discord.gg/5kaErDKDRq).

docs/website/root/compiled-binaries.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.31
2929
or `Debian Bullseye`).
3030

3131
:::
32+
33+
:::warning
34+
35+
From March 2025 onwards, released Linux binaries will have their minimum required `glibc` version raised to `2.35`
36+
(compatible with `Ubuntu 22.04` or `Debian 12 - Bookworm`).
37+
38+
If you are using a system with an older version of `glibc`, you will need to compile the binaries from source.
39+
40+
:::

docs/website/versioned_docs/version-maintained/compiled-binaries.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ The Linux binaries target `glibc`, and have a minimum requirement of `glibc 2.31
2929
or `Debian Bullseye`).
3030

3131
:::
32+
33+
:::warning
34+
35+
From March 2025 onwards, released Linux binaries will have their minimum required `glibc` version raised to `2.35`
36+
(compatible with `Ubuntu 22.04` or `Debian 12 - Bookworm`).
37+
38+
If you are using a system with an older version of `glibc`, you will need to compile the binaries from source.
39+
40+
:::

mithril-install.sh

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,46 @@ set -e
55
# Function to display usage
66
usage() {
77
echo "Install or upgrade a Mithril node"
8-
echo "Usage: $0 [-n node] [-v version] [-d distribution] [-p path]"
8+
echo "Usage: $0 [-c node] [-v version] [-d distribution] [-p path]"
99
echo " -c node : Mithril node to install or upgrade (mithril-signer, mithril-aggregator, mithril-client)"
1010
echo " -d distribution : Distribution to upgrade to (latest, unstable or distribution version e.g '2445.0')"
1111
echo " -p path : Path to install the component"
1212
exit 1
1313
}
1414

15-
# Default values
16-
DISTRIBUTION="latest"
17-
GITHUB_ORGANIZATION="input-output-hk"
18-
GITHUB_REPOSITORY="mithril"
19-
2015
# Function to display an error message and exit
2116
error_exit() {
2217
echo "$1" 1>&2
2318
exit 1
2419
}
2520

21+
# Function to check that required tools are installed
22+
check_requirements() {
23+
which curl >/dev/null ||
24+
error_exit "It seems 'curl' is not installed or not in the path.";
25+
which jq >/dev/null ||
26+
error_exit "It seems 'jq' is not installed or not in the path.";
27+
}
28+
29+
check_glibc_min_version() {
30+
glibc_version=$(ldd --version | awk 'NR==1{print $NF}')
31+
32+
if [ "$(echo "$glibc_version" | grep -cE "2\.3[1-4]")" -gt 0 ]; then
33+
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."
34+
elif [ "$(echo "$glibc_version" | grep -cE -e "2\.[0-2][0-9]" -e "2\.30")" -gt 0 ]; then
35+
error_exit "Error: Your GLIBC version is $glibc_version, but the minimum required version is 2.31."
36+
fi
37+
}
38+
39+
# --- MAIN execution ---
40+
41+
# Default values
42+
DISTRIBUTION="latest"
43+
GITHUB_ORGANIZATION="input-output-hk"
44+
GITHUB_REPOSITORY="mithril"
45+
46+
check_requirements
47+
2648
# Parse command line arguments
2749
while getopts "c:v:d:p:" opt; do
2850
case ${opt} in
@@ -47,6 +69,7 @@ OS_CODE=$(echo "$OS" | awk '{print tolower($0)}')
4769

4870
case "$OS" in
4971
Linux)
72+
check_glibc_min_version
5073
;;
5174
Darwin)
5275
OS_CODE="macos"

0 commit comments

Comments
 (0)