Skip to content

Commit c84f5e1

Browse files
Merge #6564: ci: update containers and CI to use Ubuntu 24.04 LTS (noble), merge bitcoin#29985
1599cc6 fix: suppress `float-cast-overflow` UBSan error from `qRound(double)` (Kittywhiskers Van Gogh) a57d128 ci: drop i386 conditional altogether, we don't need `wine32` anymore (Kittywhiskers Van Gogh) b862411 ci: drop conflicting `g++-multilib` package and related workaround (Kittywhiskers Van Gogh) 7b1caa9 fix: remove now-invalid package entry (Kittywhiskers Van Gogh) 9f9e965 fix: use default non-root user `ubuntu` introduced in Ubuntu 22.10 (Kittywhiskers Van Gogh) 9b4c95e ci: update containers and CI to use Ubuntu 24.04 LTS (`noble`) (Kittywhiskers Van Gogh) 8aec25b merge bitcoin#29985: Fix build of Qt for 32-bit platforms with recent glibc (Kittywhiskers Van Gogh) Pull request description: ## Motivation Since [dash#6389](#6389), the minimum supported version of GCC has been 11.1 or later. Our current base, Ubuntu 22.04 LTS (`jammy`) ships with GCC 11.2 ([source](https://packages.ubuntu.com/jammy/gcc)). The cross-compilation package for `arm-linux-gnueabihf` is GCC 11.2 as well ([source](https://packages.ubuntu.com/jammy/gcc-arm-linux-gnueabihf)). Unfortunately, this isn't the case for `mingw-w64-x86-64`, which ships with GCC 10.3 ([source](https://packages.ubuntu.com/jammy/gcc-mingw-w64-x86-64-posix)). So far, an workaround was utilized to allow GCC 10.3 to pass muster upstream through bitcoin#28379 ([source](bitcoin@fa67f09#diff-0baeabda402ee522682c25cef25a248ff6d9e2904f6d66f93f6babf55b576675L986)). Dash Core's enablement of C++20 experimental support in [dash#4600](#4600) was relatively even more permissive ([source](https://github.com/dashpay/dash/pull/4600/files#diff-0baeabda402ee522682c25cef25a248ff6d9e2904f6d66f93f6babf55b576675R168)). Though since then, enforcement of those newer minimum requirements through backports like [bitcoin#30228](bitcoin#30228) are frustrated by the version of GCC shipped for Windows cross-compilation. This can be resolved by bumping the image to the next available LTS release, Ubuntu 24.04 (`noble`), which ships with GCC 13.2 natively ([source](https://packages.ubuntu.com/noble/gcc)), for ARM Linux ([source](https://packages.ubuntu.com/noble/gcc-arm-linux-gnueabihf)) and AMD64 Windows ([source](https://packages.ubuntu.com/noble/gcc-mingw-w64-x86-64-posix)), moreover, it is acknowledged as a _de facto_ lowest supported distro needed for Windows cross compilation by [bitcoin#30580](bitcoin#30580 (comment)). Skipping the enforcement of newer minimum requirements is inadvisable, primarily because it will eventually conflict with upcoming code changes ([comment](bitcoin#30228 (comment))) like [dash#6378](#6378). ## Additional Information * Dependency for #6380 * A default unprivileged user named `ubuntu` was introduced in Ubuntu 22.10 ([source](https://bugs.launchpad.net/cloud-images/+bug/2005129)) with UID `1000` and GID `1000`. We allow specifying UID and GID to ensure they match with the ownership of directories expected to be mounted to avoid permissions issues (especially on platforms like macOS where the user can have a UID of `501` and GID of `20`). * To retain this behavior, the `ubuntu` user and the `ubuntu` group will have its UID and GID updated. This is a no-op if defaults are selected. * In some cases where it may be undesirable to have the username or home directory deviate from the present name (`dash`), it will be additionally renamed from `ubuntu`. * GitLab is unhappy if the container doesn't have a user named `dash` ([build](https://gitlab.com/dashpay/dash/-/jobs/9082688485#L24)) and it results in a runner failure. * Due to a conflict between `gcc-multilib` and `gcc-arm-linux-gnueabihf`, installation of the latter will result in the uninstallation of the former. This has been documented behavior for a while now ([source](https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211)) and continues till today (see below). <details> <summary>Error message:</summary> ``` ubuntu@ec46b76eeb2c:/src/dash$ sudo apt install gcc-multilib gcc-arm-linux-gnueabihf Reading package lists... Done Building dependency tree... Done Reading state information... Done gcc-arm-linux-gnueabihf is already the newest version (4:13.2.0-7ubuntu1). gcc-arm-linux-gnueabihf set to manually installed. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: gcc-arm-linux-gnueabihf : Depends: gcc-13-arm-linux-gnueabihf (>= 13.2.0-11~) but it is not installable E: Unable to correct problems, you have held broken packages. ``` </details> Since [dash#5372](#5372), we have stopped supporting i686 and dropped support for 32-bit Windows even earlier. There doesn't seem to be much reason to keep `gcc-multilib` around, especially since it _cannot_ be around and has been silently uninstalled for a while now, so the package has now been dropped. * Since Wine 7.0, WoW64 support has been included ([source](https://www.winehq.org/announce/7.0)), which allows for some applications to run without a corresponding `wine32` setup ([source](https://wiki.debian.org/Wine#Step_1:_Enable_multiarch)). Support has improved furthermore in Wine 9.0 ([source](https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0)), which is available in `noble` ([source](https://packages.ubuntu.com/noble/wine64)). This allows us to drop the i386 conditional altogether. * `libncurses5`, while a valid package on `jammy` ([source](https://packages.ubuntu.com/jammy/libncurses5)), is not in any future version, including `noble` ([source](https://packages.ubuntu.com/noble/libncurses5), error page) though `libncurses5-dev` continues to remain a valid package ([source](https://packages.ubuntu.com/noble/libncurses5-dev)) and remains used as a Python dependency ([source](https://github.com/dashpay/dash/blob/1930572b05c53d2d8335bcfc22270871d5b0bf2f/contrib/containers/ci/Dockerfile#L91)). As a result, `libncurses5` has been dropped. * A bump in distro base also causes a bump in glibc version, which causes zlib, a Qt dependency to fail a compile-time check ([build](https://github.com/dashpay/dash/actions/runs/13220255380/job/36904408129?pr=6564#step:6:8050)), this is avoided by backporting [bitcoin#29985](bitcoin#29985). * Due to [QTBUG-133261](https://bugreports.qt.io/browse/QTBUG-133261), UBSan will raise a `float-cast-overflow` originating from `qRound(double)` ([build](https://gitlab.com/dashpay/dash/-/jobs/9083558880#L3132)), as of this writing, a fix is currently underway ([source](https://codereview.qt-project.org/c/qt/qtbase/+/621931)) but it is unclear when it would be available in the next Qt 5.15 revision. As this doesn't seem to be a regression ([source](https://bugreports.qt.io/browse/QTBUG-133261?focusedId=860311&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-860311)) despite being undesirable behavior, we can suppress the alarm. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 1599cc6 UdjinM6: utACK 1599cc6 Tree-SHA512: 92f786e9da1440830057729a5d9cdf6448ef9da8c66e0d4c3b80da2e22dd599353f44a31dcbe0ed103febdf627d2a1a332d72de1c3ec312b6ceb665f4bbcb5d1
2 parents 7f647bb + 1599cc6 commit c84f5e1

File tree

14 files changed

+81
-66
lines changed

14 files changed

+81
-66
lines changed

.github/workflows/build-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
jobs:
1414
build:
1515
name: Build container
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1717
outputs:
1818
tag: ${{ steps.prepare.outputs.tag }}
1919
repo: ${{ steps.prepare.outputs.repo }}

.github/workflows/build-depends.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
build-depends:
2121
name: Build depends
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
outputs:
2424
key: ${{ steps.restore.outputs.cache-primary-key }}
2525
container:

.github/workflows/build-src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
build-src:
2121
name: Build source
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
container:
2424
image: ${{ inputs.container-path }}
2525
options: --user root

.github/workflows/release_docker_hub.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
release:
99
name: Release to Docker Hub
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: "ubuntu:jammy"
1+
image: "ubuntu:noble"
22

33
variables:
44
DOCKER_DRIVER: overlay2

contrib/containers/ci/Dockerfile

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:noble
22

33
# Needed to prevent tzdata hanging while expecting user input
44
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
@@ -7,16 +7,9 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
77
# (zlib1g-dev is needed for the Qt host binary builds, but should not be used by target binaries)
88
ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
99

10-
# Install packages for i386 on amd64 hosts, then install common packages
10+
# Install common packages
1111
RUN set -ex; \
1212
apt-get update && \
13-
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
14-
dpkg --add-architecture i386 && \
15-
apt-get update && \
16-
apt-get install $APT_ARGS \
17-
g++-multilib \
18-
wine32; \
19-
fi; \
2013
apt-get install $APT_ARGS \
2114
autotools-dev \
2215
automake \
@@ -138,12 +131,12 @@ RUN set -ex; \
138131
mkdir -p /opt/shellcheck && tar -xf /tmp/shellcheck.tar.xz -C /opt/shellcheck --strip-components=1 && rm /tmp/shellcheck.tar.xz
139132
ENV PATH="/opt/shellcheck:${PATH}"
140133

141-
# Add user with specified (or default) user/group ids and setup configuration files
142-
ARG USER_ID=1000
143-
ARG GROUP_ID=1000
134+
# Setup unprivileged user and configuration files
135+
ARG USER_ID=1000 \
136+
GROUP_ID=1000
144137
RUN set -ex; \
145-
groupadd -g ${GROUP_ID} dash; \
146-
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash; \
138+
groupmod -g ${GROUP_ID} -n dash ubuntu; \
139+
usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
147140
mkdir -p /home/dash/.config/gdb; \
148141
echo "add-auto-load-safe-path /usr/lib/llvm-${LLVM_VERSION}/lib" | tee /home/dash/.config/gdb/gdbinit; \
149142
chown ${USER_ID}:${GROUP_ID} -R /home/dash
@@ -156,7 +149,6 @@ RUN apt-get update && apt-get install $APT_ARGS \
156149
g++-mingw-w64-x86-64 \
157150
jq \
158151
libz-dev \
159-
libncurses5 \
160152
nsis \
161153
python3-zmq \
162154
parallel \
@@ -166,12 +158,6 @@ RUN apt-get update && apt-get install $APT_ARGS \
166158
zip \
167159
&& rm -rf /var/lib/apt/lists/*
168160

169-
# This is a hack. It is needed because gcc-multilib and g++-multilib are conflicting with g++-arm-linux-gnueabihf. This is
170-
# due to gcc-multilib installing the following symbolic link, which is needed for -m32 support. However, this causes
171-
# arm builds to also have the asm folder implicitly in the include search path. This is kind of ok, because the asm folder
172-
# for arm has precedence.
173-
RUN ln -s x86_64-linux-gnu/asm /usr/include/asm
174-
175161
# Make sure std::thread and friends is available
176162
RUN \
177163
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix; \

contrib/containers/deploy/Dockerfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
FROM phusion/baseimage:jammy-1.0.4
1+
FROM phusion/baseimage:noble-1.0.0
22
LABEL maintainer="Dash Developers <[email protected]>"
33
LABEL description="Dockerised DashCore, built from CI"
44

5-
ARG USER_ID
6-
ARG GROUP_ID
7-
8-
ENV HOME="/home/dash"
9-
10-
# add user with specified (or default) user/group ids
11-
ENV USER_ID="${USER_ID:-1000}"
12-
ENV GROUP_ID="${GROUP_ID:-1000}"
13-
RUN groupadd -g ${GROUP_ID} dash && \
14-
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
15-
mkdir /home/dash/.dashcore && \
5+
# Setup unprivileged user
6+
ARG USER_ID=1000 \
7+
GROUP_ID=1000
8+
RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
9+
usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
10+
mkdir -p /home/dash/.dashcore && \
1611
chown ${USER_ID}:${GROUP_ID} -R /home/dash
1712

1813
COPY bin/* /usr/local/bin/

contrib/containers/deploy/Dockerfile.GitHubActions.Dispatch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1.3
22

3-
FROM --platform=$BUILDPLATFORM ubuntu:jammy as builder
3+
FROM --platform=$BUILDPLATFORM ubuntu:noble as builder
44
RUN apt-get update && \
55
apt-get -y install --no-install-recommends \
66
automake \
@@ -42,7 +42,7 @@ RUN mkdir built-target && \
4242
"linux/amd64") cp depends/x86_64-pc-linux-gnu/bin/dash* /home/dash/built-target ;; \
4343
esac
4444

45-
FROM ubuntu:jammy
45+
FROM ubuntu:noble
4646
LABEL maintainer="Dash Developers <[email protected]>"
4747
LABEL description="Dockerised DashCore"
4848

@@ -52,12 +52,12 @@ ARG TAG
5252

5353
ENV HOME="/home/dash"
5454

55-
# add user with specified (or default) user/group ids
56-
ENV USER_ID="${USER_ID:-1000}"
57-
ENV GROUP_ID="${GROUP_ID:-1000}"
58-
RUN groupadd -g ${GROUP_ID} dash && \
59-
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
60-
mkdir /home/dash/.dashcore && \
55+
# Setup unprivileged user
56+
ARG USER_ID=1000 \
57+
GROUP_ID=1000
58+
RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
59+
usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
60+
mkdir -p /home/dash/.dashcore && \
6161
chown ${USER_ID}:${GROUP_ID} -R /home/dash
6262

6363
RUN apt-get update && \

contrib/containers/deploy/Dockerfile.GitHubActions.Release

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:noble
22
LABEL maintainer="Dash Developers <[email protected]>"
33
LABEL description="Dockerised DashCore"
44

@@ -9,12 +9,12 @@ ARG GITHUB_REPOSITORY
99

1010
ENV HOME /home/dash
1111

12-
# add user with specified (or default) user/group ids
13-
ENV USER_ID ${USER_ID:-1000}
14-
ENV GROUP_ID ${GROUP_ID:-1000}
15-
RUN groupadd -g ${GROUP_ID} dash && \
16-
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
17-
mkdir /home/dash/.dashcore && \
12+
# Setup unprivileged user
13+
ARG USER_ID=1000 \
14+
GROUP_ID=1000
15+
RUN groupmod -g ${GROUP_ID} -n dash ubuntu; \
16+
usermod -u ${USER_ID} -md /home/dash -l dash ubuntu; \
17+
mkdir -p /home/dash/.dashcore && \
1818
chown ${USER_ID}:${GROUP_ID} -R /home/dash
1919

2020
RUN apt-get update && \

contrib/containers/develop/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax = edrevo/dockerfile-plus
22

3-
FROM ubuntu:jammy
3+
FROM ubuntu:noble
44

55
INCLUDE+ ci/Dockerfile
66

0 commit comments

Comments
 (0)