Skip to content

Commit

Permalink
Upgrade Debian builds to version 12
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
klaren committed Apr 26, 2024
1 parent c9b4b6a commit 8f03067
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
50 changes: 24 additions & 26 deletions docker/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 \
Expand All @@ -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
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions docker/docker-compose.debian-12.18.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 0 additions & 28 deletions docker/docker-compose.debian-7.18.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions docker/docker-compose.debian.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:

runtime-setup:
Expand Down

0 comments on commit 8f03067

Please sign in to comment.