summaryrefslogtreecommitdiffstats
path: root/scripts/crossbuild/docker
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/crossbuild/docker/centos7/Dockerfile35
-rw-r--r--scripts/crossbuild/docker/debian10/Dockerfile44
-rw-r--r--scripts/crossbuild/docker/debian11/Dockerfile (renamed from scripts/crossbuild/docker/ubuntu16/Dockerfile)44
-rw-r--r--scripts/crossbuild/docker/debian12/Dockerfile74
-rw-r--r--scripts/crossbuild/docker/debian8/Dockerfile84
-rw-r--r--scripts/crossbuild/docker/debian9/README15
-rw-r--r--scripts/crossbuild/docker/rocky8/Dockerfile (renamed from scripts/crossbuild/docker/centos8/Dockerfile)35
-rw-r--r--scripts/crossbuild/docker/rocky9/Dockerfile91
-rw-r--r--scripts/crossbuild/docker/ubuntu18/Dockerfile27
-rw-r--r--scripts/crossbuild/docker/ubuntu20/Dockerfile27
-rw-r--r--scripts/crossbuild/docker/ubuntu22/Dockerfile74
-rw-r--r--scripts/crossbuild/docker/ubuntu24/Dockerfile74
-rw-r--r--scripts/crossbuild/m4/Dockerfile.deb.m4 (renamed from scripts/crossbuild/docker/debian9/Dockerfile)53
13 files changed, 470 insertions, 207 deletions
diff --git a/scripts/crossbuild/docker/centos7/Dockerfile b/scripts/crossbuild/docker/centos7/Dockerfile
index 2f9e4ac..91f25b3 100644
--- a/scripts/crossbuild/docker/centos7/Dockerfile
+++ b/scripts/crossbuild/docker/centos7/Dockerfile
@@ -1,16 +1,32 @@
-FROM centos:centos7
+# Auto generated for centos7
+# from scripts/crossbuild/m4/Dockerfile.rpm.m4
+#
+# Rebuild this file with `make crossbuild.centos7.regen`
+#
+ARG from=centos:7
+FROM ${from} as build
+
+#
+# CentOS 7 is now EOL, so we need to fix up the repo source
+#
+RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-*
+RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
+
#
# Install devtools like make and git and the EPEL
# repository for freetds and hiredis
#
RUN yum update -y
-RUN yum install -y rpmdevtools openssl epel-release git yum-utils rsync
+RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \
+ rsync
#
# Install GCC that has the requisite support for C11 keywords and atomics
#
RUN yum install -y centos-release-scl
+RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-*
+RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
@@ -21,6 +37,8 @@ ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
RUN rm /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
RUN rm /etc/yum.repos.d/CentOS-SCLo-scl.repo
+
+
#
# Documentation build dependecies
#
@@ -28,12 +46,11 @@ RUN rm /etc/yum.repos.d/CentOS-SCLo-scl.repo
# - doxygen & JSON.pm
RUN yum install -y doxygen graphviz perl-JSON
# - antora (npm needed)
-RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash -
RUN yum install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/
-# "
RUN mv /tmp/pandoc-*/bin/* /usr/local/bin
# - asciidoctor
RUN yum install -y rubygems-devel
@@ -67,6 +84,7 @@ RUN git clone --depth 1 --no-single-branch ${source}
#
# Install build dependencies for all branches from v3 onwards
# Nodesource has issues (no SRPMS in some repos) and is not needed here
+# CentOS/RHEL 7 do not support "-D" for yum-builddep so do that separately below if needed
#
WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
@@ -75,6 +93,11 @@ RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin
[ -e redhat/freeradius.spec ] && yum-builddep --disablerepo="nodesource*" -y redhat/freeradius.spec; \
done
+# Yubikey deps for CentOS/RHEL 7
+RUN yum install -y ykclient-devel ykclient
+
+RUN yum install -y libyubikey-devel
+
#
# Which is required by fixture setup utilities
#
@@ -85,8 +108,8 @@ RUN yum install -y which
#
RUN yum install -y libnl3-devel
+
#
# Create the RPM build tree
#
-ENV BUILDDIR=/root/rpmbuild
RUN rpmdev-setuptree
diff --git a/scripts/crossbuild/docker/debian10/Dockerfile b/scripts/crossbuild/docker/debian10/Dockerfile
index 3eb13a7..03a9ce5 100644
--- a/scripts/crossbuild/docker/debian10/Dockerfile
+++ b/scripts/crossbuild/docker/debian10/Dockerfile
@@ -1,8 +1,10 @@
-FROM debian:buster
-
-ARG gccver=8
-ARG clangver=8
-ARG osname=buster
+# Auto generated for debian10
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.debian10.regen`
+#
+ARG from=debian:buster
+FROM ${from} as build
ARG DEBIAN_FRONTEND=noninteractive
@@ -15,14 +17,14 @@ RUN apt-get update && \
rm -r /var/lib/apt/lists/*
# For clang
-RUN add-apt-repository -y "deb http://apt.llvm.org/${osname}/ llvm-toolchain-${osname}-${clangver} main" && \
+RUN add-apt-repository -y "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" && \
apt-key adv --fetch-keys http://apt.llvm.org/llvm-snapshot.gpg.key
RUN apt-get update && \
# Development utilities
apt-get install -y devscripts equivs git quilt rsync && \
# Compilers
- apt-get install -y g++-${gccver} llvm-${clangver} clang-${clangver} lldb-${clangver} && \
+ apt-get install -y g++ llvm-8 clang-8 lldb-8 && \
# eapol_test dependencies
apt-get install -y libnl-3-dev libnl-genl-3-dev
@@ -33,9 +35,9 @@ RUN apt-get update && \
# - doxygen & JSON.pm
RUN apt-get install -y doxygen graphviz libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
WORKDIR /tmp
RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
@@ -44,15 +46,13 @@ RUN apt-get install -y ./pandoc-*.deb
RUN apt-get install -y ruby-dev
RUN gem install asciidoctor
-# set default things
-RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gccver} 50 \
- --slave /usr/bin/g++ g++ /usr/bin/g++-${gccver} && \
- update-alternatives --config gcc
-
-RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clangver} 60 && \
+#
+# Set defaults
+#
+RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 60 && \
update-alternatives --config clang
-RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${clangver} 60 && \
+RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-8 60 && \
update-alternatives --config lldb
@@ -70,20 +70,16 @@ WORKDIR /usr/local/src/repositories
ARG source=https://github.com/FreeRADIUS/freeradius-server.git
RUN git clone --depth 1 --no-single-branch ${source}
-
#
-# Install build dependencies for all v3 branches
+# Install build dependencies for all branches from v3 onwards
#
WORKDIR freeradius-server
-RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v3\..*\.x");\
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
if [ -e ./debian/control.in ] ; then \
debian/rules debian/control ; \
fi ; \
- echo Installing dependencies for $i ; \
- mk-build-deps debian/control ; \
- apt-get --no-install-recommends -y -V install ./freeradius-build-deps*.deb || true ; \
- apt-get -y -f remove freeradius-build-deps libiodbc2-dev || true ; \
- rm ./freeradius-build-deps*.deb ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
done
diff --git a/scripts/crossbuild/docker/ubuntu16/Dockerfile b/scripts/crossbuild/docker/debian11/Dockerfile
index dbec6f9..0a77893 100644
--- a/scripts/crossbuild/docker/ubuntu16/Dockerfile
+++ b/scripts/crossbuild/docker/debian11/Dockerfile
@@ -1,8 +1,10 @@
-FROM ubuntu:16.04
-
-ARG gccver=4.9
-ARG clangver=5.0
-ARG osname=xenial
+# Auto generated for debian11
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.debian11.regen`
+#
+ARG from=debian:bullseye
+FROM ${from} as build
ARG DEBIAN_FRONTEND=noninteractive
@@ -10,24 +12,16 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install add-apt-repository
#
RUN apt-get update && \
- apt-get install -y software-properties-common python-software-properties apt-transport-https curl && \
+ apt-get install -y software-properties-common gnupg2 procps && \
apt-get clean && \
rm -r /var/lib/apt/lists/*
-# Requires GCC-4.9 as it has support for C11 keywords and atomics
-
-# For clang
-RUN add-apt-repository -y "deb http://apt.llvm.org/${osname}/ llvm-toolchain-${osname}-${clangver} main" && \
- curl -o /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key && \
- apt-key add /tmp/llvm-snapshot.gpg.key && \
-# For GCC
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN apt-get update && \
# Development utilities
apt-get install -y devscripts equivs git quilt rsync && \
# Compilers
- apt-get install -y g++-${gccver} llvm-${clangver} clang-${clangver} lldb-${clangver} && \
+ apt-get install -y g++ llvm clang lldb && \
# eapol_test dependencies
apt-get install -y libnl-3-dev libnl-genl-3-dev
@@ -38,9 +32,9 @@ RUN apt-get update && \
# - doxygen & JSON.pm
RUN apt-get install -y doxygen graphviz libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
WORKDIR /tmp
RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
@@ -49,16 +43,6 @@ RUN apt-get install -y ./pandoc-*.deb
RUN apt-get install -y ruby-dev
RUN gem install asciidoctor
-# set default things
-RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gccver} 50 \
- --slave /usr/bin/g++ g++ /usr/bin/g++-${gccver} && \
- update-alternatives --config gcc
-
-RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clangver} 60 && \
- update-alternatives --config clang
-
-RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${clangver} 60 && \
- update-alternatives --config lldb
#
@@ -82,5 +66,9 @@ WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
- if [ -e ./debian/control.in ] ; then debian/rules debian/control ; fi ; echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control ; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
done
diff --git a/scripts/crossbuild/docker/debian12/Dockerfile b/scripts/crossbuild/docker/debian12/Dockerfile
new file mode 100644
index 0000000..78eb501
--- /dev/null
+++ b/scripts/crossbuild/docker/debian12/Dockerfile
@@ -0,0 +1,74 @@
+# Auto generated for debian12
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.debian12.regen`
+#
+ARG from=debian:bookworm
+FROM ${from} as build
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+#
+# Install add-apt-repository
+#
+RUN apt-get update && \
+ apt-get install -y software-properties-common gnupg2 procps && \
+ apt-get clean && \
+ rm -r /var/lib/apt/lists/*
+
+
+RUN apt-get update && \
+# Development utilities
+ apt-get install -y devscripts equivs git quilt rsync && \
+# Compilers
+ apt-get install -y g++ llvm clang lldb && \
+# eapol_test dependencies
+ apt-get install -y libnl-3-dev libnl-genl-3-dev
+
+#
+# Documentation build dependecies
+#
+
+# - doxygen & JSON.pm
+RUN apt-get install -y doxygen graphviz libjson-perl
+# - antora (npm needed)
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
+RUN apt-get install -y nodejs
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
+# - pandoc
+WORKDIR /tmp
+RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
+RUN apt-get install -y ./pandoc-*.deb
+# - asciidoctor
+RUN apt-get install -y ruby-dev
+RUN gem install asciidoctor
+
+
+
+#
+# Setup a src dir in /usr/local
+#
+RUN mkdir -p /usr/local/src/repositories
+WORKDIR /usr/local/src/repositories
+
+
+#
+# Shallow clone the FreeRADIUS source
+#
+WORKDIR /usr/local/src/repositories
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
+
+#
+# Install build dependencies for all branches from v3 onwards
+#
+WORKDIR freeradius-server
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
+ do \
+ git checkout $i; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
+ done
diff --git a/scripts/crossbuild/docker/debian8/Dockerfile b/scripts/crossbuild/docker/debian8/Dockerfile
deleted file mode 100644
index 094faa3..0000000
--- a/scripts/crossbuild/docker/debian8/Dockerfile
+++ /dev/null
@@ -1,84 +0,0 @@
-FROM debian:jessie
-
-ARG gccver=4.9
-ARG clangver=5.0
-ARG osname=jessie
-
-ARG DEBIAN_FRONTEND=noninteractive
-
-#
-# Install add-apt-repository
-#
-RUN apt-get update && \
- apt-get install -y software-properties-common python-software-properties apt-transport-https curl && \
- apt-get clean && \
- rm -r /var/lib/apt/lists/*
-
-# Requires GCC-4.9 as it has support for C11 keywords and atomics
-
-# For clang
-RUN add-apt-repository -y "deb http://apt.llvm.org/${osname}/ llvm-toolchain-${osname}-${clangver} main" && \
- curl -o /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key && \
- apt-key add /tmp/llvm-snapshot.gpg.key
-
-RUN apt-get update && \
-# Development utilities
- apt-get install -y devscripts equivs git quilt rsync && \
-# Compilers
- apt-get install -y g++-${gccver} llvm-${clangver} clang-${clangver} lldb-${clangver} && \
-# eapol_test dependencies
- apt-get install -y libnl-3-dev libnl-genl-3-dev
-
-#
-# Documentation build dependecies
-#
-
-# - doxygen & JSON.pm
-RUN apt-get install -y doxygen graphviz libjson-perl
-# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
-RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
-# - pandoc
-WORKDIR /tmp
-RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
-RUN dpkg -i ./pandoc-*.deb
-RUN apt-get install -fy
-# - asciidoctor
-RUN apt-get install -y ruby
-RUN gem install asciidoctor
-
-# set default things
-RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gccver} 50 \
- --slave /usr/bin/g++ g++ /usr/bin/g++-${gccver} && \
- update-alternatives --config gcc
-
-RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clangver} 60 && \
- update-alternatives --config clang
-
-RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${clangver} 60 && \
- update-alternatives --config lldb
-
-
-#
-# Setup a src dir in /usr/local
-#
-RUN mkdir -p /usr/local/src/repositories
-WORKDIR /usr/local/src/repositories
-
-
-#
-# Shallow clone the FreeRADIUS source
-#
-ARG source=https://github.com/FreeRADIUS/freeradius-server.git
-RUN git clone --depth 1 --no-single-branch ${source}
-
-#
-# Install build dependencies for all branches from v3 onwards
-#
-WORKDIR freeradius-server
-RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
- do \
- git checkout $i; \
- if [ -e ./debian/control.in ] ; then debian/rules debian/control ; fi ; echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control ; \
- done
diff --git a/scripts/crossbuild/docker/debian9/README b/scripts/crossbuild/docker/debian9/README
deleted file mode 100644
index f7a6135..0000000
--- a/scripts/crossbuild/docker/debian9/README
+++ /dev/null
@@ -1,15 +0,0 @@
-
-Build source image
-
- docker build . -f Dockerfile.source -t freeradius:debian9-source
-
-Then either build and run jenkins image
-
- docker build . -f Dockerfile.jenkins -t freeradius:debian9-jenkins
- docker run -d -p 2222:22 freeradius:debian9-jenkins
-
-or build and run the server
-
- docker build . -t freeradius:debian9
- docker run -d -p 1812:1812/udp -p 1813:1813/udp freeradius:debian9
-
diff --git a/scripts/crossbuild/docker/centos8/Dockerfile b/scripts/crossbuild/docker/rocky8/Dockerfile
index bd856af..ba7fc56 100644
--- a/scripts/crossbuild/docker/centos8/Dockerfile
+++ b/scripts/crossbuild/docker/rocky8/Dockerfile
@@ -1,27 +1,38 @@
-FROM centos:centos8
+# Auto generated for rocky8
+# from scripts/crossbuild/m4/Dockerfile.rpm.m4
+#
+# Rebuild this file with `make crossbuild.rocky8.regen`
+#
+ARG from=rockylinux/rockylinux:8
+FROM ${from} as build
#
# Install devtools like make and git and the EPEL
# repository for freetds and hiredis
#
RUN yum update -y
-RUN yum install -y rpmdevtools openssl epel-release git yum-utils rsync dnf-plugins-core
-RUN dnf config-manager --set-enabled powertools
+RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \
+ rsync dnf-plugins-core
+
+
+RUN yum config-manager --set-enabled powertools
#
# Install GCC that has the requisite support for C11 keywords and atomics
#
RUN yum install -y gcc-toolset-9
+
#
# Documentation build dependecies
#
+
# - doxygen & JSON.pm
RUN yum install -y doxygen graphviz perl-JSON
# - antora (npm needed)
-RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash -
RUN yum install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/
RUN mv /tmp/pandoc-*/bin/* /usr/local/bin
@@ -56,14 +67,19 @@ RUN git clone --depth 1 --no-single-branch ${source}
#
# Install build dependencies for all branches from v3 onwards
+# Nodesource has issues (no SRPMS in some repos) and is not needed here
+# CentOS/RHEL 7 do not support "-D" for yum-builddep so do that separately below if needed
#
WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
- [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \
+ [ -e redhat/freeradius.spec ] && yum-builddep -D "_with_rlm_yubikey 1" -y redhat/freeradius.spec; \
done
+
+RUN yum install -y libyubikey-devel
+
#
# Which is required by fixture setup utilities
#
@@ -75,7 +91,12 @@ RUN yum install -y which
RUN yum install -y libnl3-devel
#
+# We test with TLS1.1, but that is disabled by default on some
+# newer systems.
+#
+RUN update-crypto-policies --set LEGACY
+
+#
# Create the RPM build tree
#
-ENV BUILDDIR=/root/rpmbuild
RUN rpmdev-setuptree
diff --git a/scripts/crossbuild/docker/rocky9/Dockerfile b/scripts/crossbuild/docker/rocky9/Dockerfile
new file mode 100644
index 0000000..9936fe4
--- /dev/null
+++ b/scripts/crossbuild/docker/rocky9/Dockerfile
@@ -0,0 +1,91 @@
+# Auto generated for rocky9
+# from scripts/crossbuild/m4/Dockerfile.rpm.m4
+#
+# Rebuild this file with `make crossbuild.rocky9.regen`
+#
+ARG from=rockylinux/rockylinux:9
+FROM ${from} as build
+
+#
+# Install yum
+#
+RUN dnf install -y yum
+
+#
+# Install devtools like make and git and the EPEL
+# repository for freetds and hiredis
+#
+RUN yum update -y
+RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \
+ rsync dnf-plugins-core
+
+
+
+RUN yum config-manager --set-enabled crb
+
+#
+# Documentation build dependecies
+#
+
+# - doxygen & JSON.pm
+RUN yum install -y doxygen graphviz perl-JSON
+# - antora (npm needed)
+RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash -
+RUN yum install -y nodejs
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
+# - pandoc
+RUN curl -o - -L $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*tar.gz" | cut -d '"' -f 4) | tar xzvf - -C /tmp/
+RUN mv /tmp/pandoc-*/bin/* /usr/local/bin
+# - asciidoctor
+RUN yum install -y rubygems-devel
+RUN gem install asciidoctor
+
+#
+# Setup a src dir in /usr/local
+#
+RUN mkdir -p /usr/local/src/repositories
+WORKDIR /usr/local/src/repositories
+
+
+#
+# Shallow clone the FreeRADIUS source
+#
+WORKDIR /usr/local/src/repositories
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
+
+#
+# Install build dependencies for all branches from v3 onwards
+# Nodesource has issues (no SRPMS in some repos) and is not needed here
+# CentOS/RHEL 7 do not support "-D" for yum-builddep so do that separately below if needed
+#
+WORKDIR freeradius-server
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
+ do \
+ git checkout $i; \
+ [ -e redhat/freeradius.spec ] && yum-builddep -D "_with_rlm_yubikey 1" -y redhat/freeradius.spec; \
+ done
+
+
+RUN yum install -y libyubikey-devel
+
+#
+# Which is required by fixture setup utilities
+#
+RUN yum install -y which
+
+#
+# Explicitly install libnl3-devel which is required for the EAP tests
+#
+RUN yum install -y libnl3-devel
+
+#
+# We test with TLS1.1, but that is disabled by default on some
+# newer systems.
+#
+RUN update-crypto-policies --set LEGACY
+
+#
+# Create the RPM build tree
+#
+RUN rpmdev-setuptree
diff --git a/scripts/crossbuild/docker/ubuntu18/Dockerfile b/scripts/crossbuild/docker/ubuntu18/Dockerfile
index 874e3ec..1bea0bf 100644
--- a/scripts/crossbuild/docker/ubuntu18/Dockerfile
+++ b/scripts/crossbuild/docker/ubuntu18/Dockerfile
@@ -1,8 +1,10 @@
-FROM ubuntu:18.04
-
-ARG gccver=4.9
-ARG clangver=5.0
-ARG osname=bionic
+# Auto generated for ubuntu18
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.ubuntu18.regen`
+#
+ARG from=ubuntu:18.04
+FROM ${from} as build
ARG DEBIAN_FRONTEND=noninteractive
@@ -10,10 +12,11 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install add-apt-repository
#
RUN apt-get update && \
- apt-get install -y software-properties-common && \
+ apt-get install -y software-properties-common gnupg2 procps && \
apt-get clean && \
rm -r /var/lib/apt/lists/*
+
RUN apt-get update && \
# Development utilities
apt-get install -y devscripts equivs git quilt rsync && \
@@ -29,9 +32,9 @@ RUN apt-get update && \
# - doxygen & JSON.pm
RUN apt-get install -y doxygen graphviz libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
WORKDIR /tmp
RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
@@ -40,6 +43,8 @@ RUN apt-get install -y ./pandoc-*.deb
RUN apt-get install -y ruby-dev
RUN gem install asciidoctor
+
+
#
# Setup a src dir in /usr/local
#
@@ -61,5 +66,9 @@ WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
- if [ -e ./debian/control.in ] ; then debian/rules debian/control ; fi ; echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control ; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
done
diff --git a/scripts/crossbuild/docker/ubuntu20/Dockerfile b/scripts/crossbuild/docker/ubuntu20/Dockerfile
index c813b2f..a58e634 100644
--- a/scripts/crossbuild/docker/ubuntu20/Dockerfile
+++ b/scripts/crossbuild/docker/ubuntu20/Dockerfile
@@ -1,8 +1,10 @@
-FROM ubuntu:20.04
-
-ARG gccver=4.9
-ARG clangver=5.0
-ARG osname=bionic
+# Auto generated for ubuntu20
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.ubuntu20.regen`
+#
+ARG from=ubuntu:20.04
+FROM ${from} as build
ARG DEBIAN_FRONTEND=noninteractive
@@ -10,10 +12,11 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install add-apt-repository
#
RUN apt-get update && \
- apt-get install -y software-properties-common && \
+ apt-get install -y software-properties-common gnupg2 procps && \
apt-get clean && \
rm -r /var/lib/apt/lists/*
+
RUN apt-get update && \
# Development utilities
apt-get install -y devscripts equivs git quilt rsync && \
@@ -29,9 +32,9 @@ RUN apt-get update && \
# - doxygen & JSON.pm
RUN apt-get install -y doxygen graphviz libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
WORKDIR /tmp
RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
@@ -40,6 +43,8 @@ RUN apt-get install -y ./pandoc-*.deb
RUN apt-get install -y ruby-dev
RUN gem install asciidoctor
+
+
#
# Setup a src dir in /usr/local
#
@@ -61,5 +66,9 @@ WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
- if [ -e ./debian/control.in ] ; then debian/rules debian/control ; fi ; echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control ; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
done
diff --git a/scripts/crossbuild/docker/ubuntu22/Dockerfile b/scripts/crossbuild/docker/ubuntu22/Dockerfile
new file mode 100644
index 0000000..677c912
--- /dev/null
+++ b/scripts/crossbuild/docker/ubuntu22/Dockerfile
@@ -0,0 +1,74 @@
+# Auto generated for ubuntu22
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.ubuntu22.regen`
+#
+ARG from=ubuntu:22.04
+FROM ${from} as build
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+#
+# Install add-apt-repository
+#
+RUN apt-get update && \
+ apt-get install -y software-properties-common gnupg2 procps && \
+ apt-get clean && \
+ rm -r /var/lib/apt/lists/*
+
+
+RUN apt-get update && \
+# Development utilities
+ apt-get install -y devscripts equivs git quilt rsync && \
+# Compilers
+ apt-get install -y g++ llvm clang lldb && \
+# eapol_test dependencies
+ apt-get install -y libnl-3-dev libnl-genl-3-dev
+
+#
+# Documentation build dependecies
+#
+
+# - doxygen & JSON.pm
+RUN apt-get install -y doxygen graphviz libjson-perl
+# - antora (npm needed)
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
+RUN apt-get install -y nodejs
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
+# - pandoc
+WORKDIR /tmp
+RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
+RUN apt-get install -y ./pandoc-*.deb
+# - asciidoctor
+RUN apt-get install -y ruby-dev
+RUN gem install asciidoctor
+
+
+
+#
+# Setup a src dir in /usr/local
+#
+RUN mkdir -p /usr/local/src/repositories
+WORKDIR /usr/local/src/repositories
+
+
+#
+# Shallow clone the FreeRADIUS source
+#
+WORKDIR /usr/local/src/repositories
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
+
+#
+# Install build dependencies for all branches from v3 onwards
+#
+WORKDIR freeradius-server
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
+ do \
+ git checkout $i; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
+ done
diff --git a/scripts/crossbuild/docker/ubuntu24/Dockerfile b/scripts/crossbuild/docker/ubuntu24/Dockerfile
new file mode 100644
index 0000000..966faf0
--- /dev/null
+++ b/scripts/crossbuild/docker/ubuntu24/Dockerfile
@@ -0,0 +1,74 @@
+# Auto generated for ubuntu24
+# from scripts/crossbuild/m4/Dockerfile.deb.m4
+#
+# Rebuild this file with `make crossbuild.ubuntu24.regen`
+#
+ARG from=ubuntu:24.04
+FROM ${from} as build
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+#
+# Install add-apt-repository
+#
+RUN apt-get update && \
+ apt-get install -y software-properties-common gnupg2 procps && \
+ apt-get clean && \
+ rm -r /var/lib/apt/lists/*
+
+
+RUN apt-get update && \
+# Development utilities
+ apt-get install -y devscripts equivs git quilt rsync fakeroot && \
+# Compilers
+ apt-get install -y g++ llvm clang lldb && \
+# eapol_test dependencies
+ apt-get install -y libnl-3-dev libnl-genl-3-dev
+
+#
+# Documentation build dependecies
+#
+
+# - doxygen & JSON.pm
+RUN apt-get install -y doxygen graphviz libjson-perl
+# - antora (npm needed)
+RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
+RUN apt-get install -y nodejs
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
+# - pandoc
+WORKDIR /tmp
+RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
+RUN apt-get install -y ./pandoc-*.deb
+# - asciidoctor
+RUN apt-get install -y ruby-dev
+RUN gem install asciidoctor
+
+
+
+#
+# Setup a src dir in /usr/local
+#
+RUN mkdir -p /usr/local/src/repositories
+WORKDIR /usr/local/src/repositories
+
+
+#
+# Shallow clone the FreeRADIUS source
+#
+WORKDIR /usr/local/src/repositories
+ARG source=https://github.com/FreeRADIUS/freeradius-server.git
+RUN git clone --depth 1 --no-single-branch ${source}
+
+#
+# Install build dependencies for all branches from v3 onwards
+#
+WORKDIR freeradius-server
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
+ do \
+ git checkout $i; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
+ done
diff --git a/scripts/crossbuild/docker/debian9/Dockerfile b/scripts/crossbuild/m4/Dockerfile.deb.m4
index 9b47832..a1bfca8 100644
--- a/scripts/crossbuild/docker/debian9/Dockerfile
+++ b/scripts/crossbuild/m4/Dockerfile.deb.m4
@@ -1,8 +1,5 @@
-FROM debian:stretch
-
-ARG gccver=6
-ARG clangver=5.0
-ARG osname=stretch
+ARG from=DOCKER_IMAGE
+FROM ${from} as build
ARG DEBIAN_FRONTEND=noninteractive
@@ -10,35 +7,38 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install add-apt-repository
#
RUN apt-get update && \
- apt-get install -y software-properties-common gnupg2 apt-transport-https curl && \
+ apt-get install -y software-properties-common gnupg2 procps && \
apt-get clean && \
rm -r /var/lib/apt/lists/*
-# Stretch uses GCC-6.3 by default, so it doesn't need to be updated to get C11 functionality.
-
+define(`CLANG_PKGS', `llvm clang lldb')dnl
+ifelse(D_NAME, `debian10', `dnl
+define(`CLANG_VER', `8')dnl
+define(`CLANG_PKGS', `llvm-CLANG_VER clang-CLANG_VER lldb-CLANG_VER')dnl
# For clang
-RUN add-apt-repository -y "deb http://apt.llvm.org/${osname}/ llvm-toolchain-${osname}-${clangver} main" && \
- curl -o /tmp/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key && \
- apt-key add /tmp/llvm-snapshot.gpg.key
+RUN add-apt-repository -y "deb http://apt.llvm.org/OS_CODENAME/ llvm-toolchain-OS_CODENAME-CLANG_VER main" && \
+ apt-key adv --fetch-keys http://apt.llvm.org/llvm-snapshot.gpg.key
+')dnl
RUN apt-get update && \
# Development utilities
- apt-get install -y devscripts equivs git quilt rsync && \
+ apt-get install -y devscripts equivs git quilt rsync fakeroot && \
# Compilers
- apt-get install -y g++-${gccver} llvm-${clangver} clang-${clangver} lldb-${clangver} && \
+ apt-get install -y g++ CLANG_PKGS && \
# eapol_test dependencies
apt-get install -y libnl-3-dev libnl-genl-3-dev
#
# Documentation build dependecies
#
+define(`NODE_VER', ifelse(D_NAME, `ubuntu18', `16', `20'))dnl
# - doxygen & JSON.pm
RUN apt-get install -y doxygen graphviz libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
-RUN apt-get install -y npm
-RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+RUN curl -sL https://deb.nodesource.com/setup_`'NODE_VER.x | bash -
+RUN apt-get install -y nodejs
+RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
# - pandoc
WORKDIR /tmp
RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
@@ -47,17 +47,16 @@ RUN apt-get install -y ./pandoc-*.deb
RUN apt-get install -y ruby-dev
RUN gem install asciidoctor
-# set default things
-RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gccver} 50 \
- --slave /usr/bin/g++ g++ /usr/bin/g++-${gccver} && \
- update-alternatives --config gcc
-
-RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clangver} 60 && \
+ifelse(D_NAME, `debian10', `dnl
+#
+# Set defaults
+#
+RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-CLANG_VER 60 && \
update-alternatives --config clang
-RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-${clangver} 60 && \
+RUN update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-CLANG_VER 60 && \
update-alternatives --config lldb
-
+')
#
# Setup a src dir in /usr/local
@@ -80,5 +79,9 @@ WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
do \
git checkout $i; \
- if [ -e ./debian/control.in ] ; then debian/rules debian/control ; fi ; echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control ; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ echo 'y' | \
+ mk-build-deps -irt'apt-get -yV' debian/control ; \
done