From 8f03067e880cf45fc12516eaca7f09b6ab6c6096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Klar=C3=A9n?= Date: Fri, 26 Apr 2024 10:18:42 +0200 Subject: [PATCH] Upgrade Debian builds to version 12 Motivation: Debian 7 went EOL in May 2018. This shipped with OpenSSL 1.1.1 which went EOL on 11th September 2023. Modification: Update the debian docker image to version 12 and minor cleanups of the docker files. Result: The dynamically linked `netty-tcnative-linux-x86_64` artifact now links with supported libraries. --- .github/workflows/ci-build.yml | 6 +-- .github/workflows/ci-deploy.yml | 16 ++++---- .github/workflows/ci-pr.yml | 6 +-- .github/workflows/ci-release.yml | 14 +++---- docker/Dockerfile.debian | 50 ++++++++++++------------- docker/README.md | 4 +- docker/docker-compose.debian-12.18.yaml | 26 +++++++++++++ docker/docker-compose.debian-7.18.yaml | 28 -------------- docker/docker-compose.debian.yaml | 2 - 9 files changed, 73 insertions(+), 79 deletions(-) create mode 100644 docker/docker-compose.debian-12.18.yaml delete mode 100644 docker/docker-compose.debian-7.18.yaml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index dc78cfea8..5cf361ed5 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -25,9 +25,9 @@ jobs: - setup: centos6-x86_64 docker-compose-build: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml build" docker-compose-run: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build" - - setup: debian7-x86_64 - docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml build" - docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run build-dynamic-only" + - setup: debian12-x86_64 + docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml build" + docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml run build-dynamic-only" - setup: centos7-aarch64 docker-compose-build: "-f docker/docker-compose.centos-7.yaml build" docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-build" diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml index f096c4266..4cb7df601 100644 --- a/.github/workflows/ci-deploy.yml +++ b/.github/workflows/ci-deploy.yml @@ -26,9 +26,9 @@ jobs: - setup: centos6-x86_64 docker-compose-build: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml build" docker-compose-run: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run stage-snapshot" - - setup: debian7-x86_64 - docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml build" - docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run stage-snapshot" + - setup: debian12-x86_64 + docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml build" + docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml run stage-snapshot" - setup: centos7-aarch64 docker-compose-build: "-f docker/docker-compose.centos-7.yaml build" docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-snapshot" @@ -142,11 +142,11 @@ jobs: name: centos7-aarch64-local-staging path: ~/centos7-aarch64-local-staging - - name: Download debian7-x86_64 staging directory + - name: Download debian12-x86_64 staging directory uses: actions/download-artifact@v4 with: - name: debian7-x86_64-local-staging - path: ~/debian7-x86_64-local-staging + name: debian12-x86_64-local-staging + path: ~/debian12-x86_64-local-staging - name: Download centos6-x86_64 staging directory uses: actions/download-artifact@v4 @@ -161,8 +161,8 @@ jobs: cp -r ~/windows-x86_64-local-staging/deferred/* ~/local-staging/deferred/ cat ~/centos7-aarch64-local-staging/deferred/.index >> ~/local-staging/deferred/.index cp -r ~/centos7-aarch64-local-staging/deferred/* ~/local-staging/deferred/ - cat ~/debian7-x86_64-local-staging/deferred/.index >> ~/local-staging/deferred/.index - cp -r ~/debian7-x86_64-local-staging/deferred/* ~/local-staging/deferred/ + cat ~/debian12-x86_64-local-staging/deferred/.index >> ~/local-staging/deferred/.index + cp -r ~/debian12-x86_64-local-staging/deferred/* ~/local-staging/deferred/ cat ~/centos6-x86_64-local-staging/deferred/.index >> ~/local-staging/deferred/.index cp -r ~/centos6-x86_64-local-staging/deferred/* ~/local-staging/deferred/ diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 18161ecda..47e288fca 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -23,9 +23,9 @@ jobs: - setup: centos6-x86_64 docker-compose-build: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml build" docker-compose-run: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build" - - setup: debian7-x86_64 - docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml build" - docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run build-dynamic-only" + - setup: debian12-x86_64 + docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml build" + docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml run build-dynamic-only" - setup: centos7-aarch64 docker-compose-build: "-f docker/docker-compose.centos-7.yaml build" docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-build" diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index dfd78f1df..4b272f168 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -72,9 +72,9 @@ jobs: - setup: centos6-x86_64 docker-compose-build: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml build" docker-compose-run: "-f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run stage-release" - - setup: debian7-x86_64 - docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml build" - docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run stage-release" + - setup: debian12-x86_64 + docker-compose-build: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml build" + docker-compose-run: "-f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml run stage-release" - setup: centos7-aarch64 docker-compose-build: "-f docker/docker-compose.centos-7.yaml build" docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-release" @@ -286,11 +286,11 @@ jobs: name: centos7-aarch64-local-staging path: ~/centos7-aarch64-local-staging - - name: Download debian7-x86_64 staging directory + - name: Download debian12-x86_64 staging directory uses: actions/download-artifact@v4 with: - name: debian7-x86_64-local-staging - path: ~/debian7-x86_64-local-staging + name: debian12-x86_64-local-staging + path: ~/debian12-x86_64-local-staging - name: Download centos6-x86_64 staging directory uses: actions/download-artifact@v4 @@ -302,7 +302,7 @@ jobs: # all together with one maven command. - name: Merge staging repositories working-directory: ./prepare-release-workspace/ - run: bash ./.github/scripts/merge_local_staging.sh /home/runner/local-staging/staging ~/windows-x86_64-local-staging/staging ~/centos7-aarch64-local-staging/staging ~/debian7-x86_64-local-staging/staging ~/centos6-x86_64-local-staging/staging + run: bash ./.github/scripts/merge_local_staging.sh /home/runner/local-staging/staging ~/windows-x86_64-local-staging/staging ~/centos7-aarch64-local-staging/staging ~/debian12-x86_64-local-staging/staging ~/centos6-x86_64-local-staging/staging # Cache .m2/repository - uses: actions/cache@v4 diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 141c8c160..339cf824c 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -1,19 +1,17 @@ -ARG debian_version=7 +ARG debian_version=12 FROM debian:$debian_version # needed to do again after FROM due to docker limitation ARG debian_version ENV SOURCE_DIR /root/source -ENV CMAKE_VERSION_BASE 3.8 -ENV CMAKE_VERSION $CMAKE_VERSION_BASE.2 -ENV NINJA_VERSION 1.7.2 +ENV CMAKE_VERSION 3.29.2 +ENV NINJA_VERSION 1.12.0 +ENV MAVEN_VERSION 3.9.6 ENV GO_VERSION 1.9.3 ENV GCC_VERSION 4.9.4 # install dependencies -RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \ - echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \ - apt-get -y update && apt-get --force-yes -y install \ +RUN apt -y update && apt --force-yes -y install \ autoconf \ automake \ bzip2 \ @@ -23,16 +21,15 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > gcc-multilib \ git \ gnupg \ + golang-go \ g++ \ libapr1-dev \ - libssl1.0.0=1.0.1e-2+deb7u20 \ libssl-dev \ libtool \ - libc-bin=2.13-38+deb7u10 \ - libc6=2.13-38+deb7u10 libc6-dev \ + libc-bin \ + libc6-dev \ make \ patch \ - perl-base=5.14.2-21+deb7u3 \ tar \ unzip \ wget \ @@ -42,39 +39,40 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > RUN mkdir $SOURCE_DIR WORKDIR $SOURCE_DIR -RUN curl -q -k https://cmake.org/files/v$CMAKE_VERSION_BASE/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz --output cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz && tar zxf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz && mv cmake-$CMAKE_VERSION-Linux-x86_64 /opt/ && echo 'PATH=/opt/cmake-$CMAKE_VERSION-Linux-x86_64/bin:$PATH' >> ~/.bashrc +# Install CMake +RUN curl -L -O https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.tar.gz && \ + tar -zxvf cmake-$CMAKE_VERSION-linux-x86_64.tar.gz && \ + mv cmake-$CMAKE_VERSION-linux-x86_64 /opt/ && \ + echo 'PATH=/opt/cmake-$CMAKE_VERSION-linux-x86_64/bin:$PATH' >> ~/.bashrc -RUN wget -q --no-check-certificate https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip && unzip ninja-linux.zip && mkdir -p /opt/ninja-$NINJA_VERSION/bin && mv ninja /opt/ninja-$NINJA_VERSION/bin && echo 'PATH=/opt/ninja-$NINJA_VERSION/bin:$PATH' >> ~/.bashrc - -RUN wget -q http://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz && tar zxf go$GO_VERSION.linux-amd64.tar.gz && mv go /opt/ && echo 'PATH=/opt/go/bin:$PATH' >> ~/.bashrc && echo 'export GOROOT=/opt/go/' >> ~/.bashrc - -RUN wget -q --no-check-certificate https://github.com/netty/netty-tcnative/releases/download/gcc-precompile/gcc-$GCC_VERSION.tar.gz && tar zxf gcc-$GCC_VERSION.tar.gz && mv gcc-$GCC_VERSION /opt/ && echo 'PATH=/opt/gcc-$GCC_VERSION/bin:$PATH' >> ~/.bashrc && echo 'export CC=/opt/gcc-$GCC_VERSION/bin/gcc' >> ~/.bashrc && echo 'export CXX=/opt/gcc-$GCC_VERSION/bin/g++' >> ~/.bashrc +# Install Ninja +RUN curl -L -O https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip && \ + unzip ninja-linux.zip && \ + mkdir -p /opt/ninja-$NINJA_VERSION/bin && \ + mv ninja /opt/ninja-$NINJA_VERSION/bin && \ + echo 'PATH=/opt/ninja-$NINJA_VERSION/bin:$PATH' >> ~/.bashrc RUN rm -rf $SOURCE_DIR - # Downloading and installing SDKMAN! -RUN echo '-k' > $HOME/.curlrc RUN curl -s "https://get.sdkman.io" | bash -RUN rm $HOME/.curlrc -# Don't check the certificates as our curl version is too old. -RUN echo 'sdkman_insecure_ssl=true' >> $HOME/.sdkman/etc/config +ARG java_version="8.0.412-zulu" +ENV JAVA_VERSION $java_version # Installing Java removing some unnecessary SDKMAN files RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && \ yes | sdk install java $JAVA_VERSION && \ + yes | sdk install maven $MAVEN_VERSION && \ rm -rf $HOME/.sdkman/archives/* && \ rm -rf $HOME/.sdkman/tmp/*" -ARG java_version="8.0.302-zulu" -ENV JAVA_VERSION $java_version - RUN echo 'export JAVA_HOME="/root/.sdkman/candidates/java/current"' >> ~/.bashrc RUN echo 'PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc # Prepare our own build +ENV PATH /root/.sdkman/candidates/maven/current:$PATH ENV JAVA_HOME /jdk/ ## Cleanup -RUN apt-get clean +RUN apt clean diff --git a/docker/README.md b/docker/README.md index bbbc9db1e..561275750 100644 --- a/docker/README.md +++ b/docker/README.md @@ -21,10 +21,10 @@ docker-compose -f docker/docker-compose.arch.yaml -f docker/docker-compose.arch- docker-compose -f docker/docker-compose.centos-6.yaml -f docker/docker-compose.centos-6.18.yaml run build ``` -## debian 7 with java 8 +## debian 12 with java 8 ``` -docker-compose -f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-7.18.yaml run build +docker-compose -f docker/docker-compose.debian.yaml -f docker/docker-compose.debian-12.18.yaml run build ``` ## openSUSE Leap 15.1 with java 8 diff --git a/docker/docker-compose.debian-12.18.yaml b/docker/docker-compose.debian-12.18.yaml new file mode 100644 index 000000000..1dccaca73 --- /dev/null +++ b/docker/docker-compose.debian-12.18.yaml @@ -0,0 +1,26 @@ +services: + + runtime-setup: + image: netty-tcnative-debian:debian-12-1.8 + build: + args: + debian_version : "12" + java_version : "8.0.412-zulu" + + deploy-dynamic-only: + image: netty-tcnative-debian:debian-12-1.8 + + stage-snapshot: + image: netty-tcnative-debian:debian-12-1.8 + + stage-release: + image: netty-tcnative-debian:debian-12-1.8 + + build-dynamic-only: + image: netty-tcnative-debian:debian-12-1.8 + + build: + image: netty-tcnative-debian:debian-12-1.8 + + shell: + image: netty-tcnative-debian:debian-12-1.8 diff --git a/docker/docker-compose.debian-7.18.yaml b/docker/docker-compose.debian-7.18.yaml deleted file mode 100644 index dad16a0dd..000000000 --- a/docker/docker-compose.debian-7.18.yaml +++ /dev/null @@ -1,28 +0,0 @@ -version: "3" - -services: - - runtime-setup: - image: netty-tcnative-debian:debian-7-1.8 - build: - args: - debian_version : "7" - java_version : "8.0.402-zulu" - - deploy-dynamic-only: - image: netty-tcnative-debian:debian-7-1.8 - - stage-snapshot: - image: netty-tcnative-debian:debian-7-1.8 - - stage-release: - image: netty-tcnative-debian:debian-7-1.8 - - build-dynamic-only: - image: netty-tcnative-debian:debian-7-1.8 - - build: - image: netty-tcnative-debian:debian-7-1.8 - - shell: - image: netty-tcnative-debian:debian-7-1.8 diff --git a/docker/docker-compose.debian.yaml b/docker/docker-compose.debian.yaml index 33ceb5c67..acab8894b 100644 --- a/docker/docker-compose.debian.yaml +++ b/docker/docker-compose.debian.yaml @@ -1,5 +1,3 @@ -version: "3" - services: runtime-setup: