]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
crossbuild: generate Dockerfiles from m4 templates
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 15 Jun 2023 09:11:01 +0000 (10:11 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Thu, 15 Jun 2023 22:24:10 +0000 (23:24 +0100)
bump up from node v10 to v14

scripts/crossbuild/crossbuild.mk
scripts/crossbuild/docker/centos7/Dockerfile
scripts/crossbuild/docker/debian10/Dockerfile
scripts/crossbuild/docker/ubuntu18/Dockerfile
scripts/crossbuild/docker/ubuntu20/Dockerfile
scripts/crossbuild/m4/Dockerfile.deb.m4 [new file with mode: 0644]
scripts/crossbuild/m4/Dockerfile.m4 [new file with mode: 0644]
scripts/crossbuild/m4/Dockerfile.rpm.m4 [new file with mode: 0644]

index da965066f706d5d1fe7c707f8def218475c19bb5..7bbf568b711d92247d389d49c84497d51c924bea 100644 (file)
@@ -13,11 +13,14 @@ else
 #
 CB_COMMON:=centos7 debian10 ubuntu18
 
+# Where to put stamp files (subdirectory of where this makefile is)
+CB_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+
 # Where the docker directories are
-DT:=scripts/crossbuild/docker
+DT:=$(CB_DIR)/docker
 
 # Where to put stamp files (subdirectory of where this makefile is)
-DD:=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))/build
+DD:=$(CB_DIR)/build
 
 # List of all the docker images (sorted for "crossbuild.info")
 CB_IMAGES:=$(sort $(patsubst $(DT)/%,%,$(wildcard $(DT)/*)))
@@ -98,6 +101,11 @@ crossbuild.clean: $(foreach IMG,${CB_IMAGES},crossbuild.${IMG}.clean)
 #
 crossbuild.wipe: $(foreach IMG,${CB_IMAGES},crossbuild.${IMG}.wipe)
 
+#
+#  Regenerate all Dockerfiles from m4 templates
+#
+crossbuild.regen: $(foreach IMG,${CB_IMAGES},crossbuild.${IMG}.regen)
+
 #
 #  Define rules for building a particular image
 #
@@ -217,6 +225,16 @@ crossbuild.${1}.wipe:
 .PHONY: crossbuild.${1}.refresh
 crossbuild.${1}.refresh: $(DD)/docker.refresh.${1}
 
+#
+#  Regenerate the image Dockerfile from the m4 templates
+#
+.PHONY: crossbuild.${1}.regen
+crossbuild.${1}.regen: $(DT)/${1}/Dockerfile
+
+$(DT)/${1}/Dockerfile: $(CB_DIR)/m4/Dockerfile.m4 $(CB_DIR)/m4/Dockerfile.deb.m4 $(CB_DIR)/m4/Dockerfile.rpm.m4
+       ${Q}echo REGEN ${1}
+       ${Q}m4 -I $(CB_DIR)/m4 -D D_NAME=${1} $$< > $$@
+
 #
 #  Run the build test
 #
index 2f9e4acecf3f1fad582a2c05139299a3b2d79c14..88726283256c88af3e220f1299719417522228bf 100644 (file)
@@ -1,11 +1,18 @@
-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
 
 #
 #  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
@@ -21,6 +28,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 +37,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_14.x | bash -
 RUN yum install -y nodejs
 RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
 #  - 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
index 3eb13a76b7c91d6e1fe8416d8092e3af0f540936..d43908ef3152a686a0ae00e492642ae021c6175b 100644 (file)
@@ -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,7 +35,7 @@ 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_14.x | bash -
 RUN apt-get install -y nodejs
 RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
 #  - pandoc
@@ -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
index 874e3ece6a5997a38e6174625454b21a62c398cb..7870c139016781b02ca60421e6c9984ef6f2c125 100644 (file)
@@ -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,7 +32,7 @@ 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_14.x | bash -
 RUN apt-get install -y nodejs
 RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
 #  - pandoc
@@ -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
index c813b2f57fe5f35f0bc45afa1e5a4356c33fe540..dff6edab6ab49fc2ab81e60000583c6fbe2d521e 100644 (file)
@@ -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,7 +32,7 @@ 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_14.x | bash -
 RUN apt-get install -y nodejs
 RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
 #  - pandoc
@@ -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/m4/Dockerfile.deb.m4 b/scripts/crossbuild/m4/Dockerfile.deb.m4
new file mode 100644 (file)
index 0000000..878a134
--- /dev/null
@@ -0,0 +1,86 @@
+ARG from=DOCKER_IMAGE
+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/*
+
+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/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 && \
+#  Compilers
+    apt-get install -y g++ CLANG_PKGS && \
+#  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 apt-get install -y ./pandoc-*.deb
+#  - asciidoctor
+RUN apt-get install -y ruby-dev
+RUN gem install asciidoctor
+
+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-CLANG_VER 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
+#
+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/m4/Dockerfile.m4 b/scripts/crossbuild/m4/Dockerfile.m4
new file mode 100644 (file)
index 0000000..5b54f36
--- /dev/null
@@ -0,0 +1,36 @@
+dnl Look up the OS codename, docker base image etc before including
+dnl the main Dockerfile template.
+dnl
+divert(`-1')
+changequote(`[', `]')
+define([p_SET], [
+       define([PKG_TYPE],      [$1])
+       define([OS_NAME],       [$2])
+       define([OS_VER],        [$3])
+       define([OS_CODENAME],   [$4])
+       define([DOCKER_IMAGE],  [$5])
+])
+dnl            D_NAME          PKG_TYPE      OS_NAME   OS_VER  OS_CODENAME     DOCKER_IMAGE
+ifelse(
+       D_NAME, [debian10],     [p_SET([deb], [debian], [10],   [buster],       [debian:buster])],
+       D_NAME, [debian11],     [p_SET([deb], [debian], [11],   [bullseye],     [debian:bullseye])],
+       D_NAME, [debian12],     [p_SET([deb], [debian], [12],   [bookworm],     [debian:bookworm])],
+       D_NAME, [ubuntu18],     [p_SET([deb], [ubuntu], [18],   [bionic],       [ubuntu:18.04])],
+       D_NAME, [ubuntu20],     [p_SET([deb], [ubuntu], [20],   [focal],        [ubuntu:20.04])],
+       D_NAME, [ubuntu22],     [p_SET([deb], [ubuntu], [22],   [jammy],        [ubuntu:22.04])],
+       D_NAME, [centos7],      [p_SET([rpm], [centos], [7],    [7],            [centos:7])],
+       D_NAME, [centos8],      [p_SET([rpm], [centos], [8],    [8],            [centos:8])],
+       D_NAME, [rocky8],       [p_SET([rpm], [rocky],  [8],    [8],            [rockylinux/rockylinux:8])],
+       D_NAME, [rocky9],       [p_SET([rpm], [rocky],  [9],    [9],            [rockylinux/rockylinux:9])],
+       [errprint(error: OS 'D_NAME' not defined[,] see __file__
+)m4exit(1)]
+)
+undefine([p_SET])
+divert[]dnl
+[#] Auto generated for D_NAME
+[#] from scripts/crossbuild/m4/Dockerfile.PKG_TYPE.m4
+[#]
+[#] Rebuild this file with `make crossbuild.D_NAME.regen`
+[#]
+changequote([`], ['])dnl
+include(Dockerfile.PKG_TYPE.m4)dnl
diff --git a/scripts/crossbuild/m4/Dockerfile.rpm.m4 b/scripts/crossbuild/m4/Dockerfile.rpm.m4
new file mode 100644 (file)
index 0000000..b1912e7
--- /dev/null
@@ -0,0 +1,113 @@
+ARG from=DOCKER_IMAGE
+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 procps yum-utils \
+       rsync ifelse(OS_VER, `7',, `dnf-plugins-core')
+
+ifelse(OS_VER, `7', `dnl
+#
+#  Install GCC that has the requisite support for C11 keywords and atomics
+#
+RUN yum install -y centos-release-scl
+RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++
+ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc
+
+#
+#  Remove the CentOS-SCLo repo which is apparently not valid?
+#  See: https://bugs.centos.org/view.php?id=14773
+#
+RUN rm /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
+RUN rm /etc/yum.repos.d/CentOS-SCLo-scl.repo
+')dnl
+
+ifelse(OS_VER, `8', `dnl
+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
+')dnl
+
+ifelse(OS_VER, `9', `dnl
+RUN yum config-manager --set-enabled crb
+')dnl
+
+#
+#  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_14.x | bash -
+RUN yum install -y nodejs
+RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
+#  - 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
+
+changequote([{,}])dnl Only add LTB on centos7/rocky8
+ifelse(ifelse(OS_VER, 7, yes,   OS_VER, 8, yes,   no), yes, [{dnl
+#
+#  Use LTB's openldap packages intead of the distribution version to avoid linking against NSS
+#
+RUN echo $'[ltb-project]\n\
+name=LTB project packages\n\
+baseurl=https://ltb-project.org/rpm/$releasever/$basearch\n\
+enabled=1\n\
+gpgcheck=1\n\
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\
+> /etc/yum.repos.d/ltb-project.repo
+RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
+}])dnl
+changequote(`,')dnl
+
+#
+#  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
+#
+define(`EXTRA_DISABLE', ifelse(OS_VER, 7, `--disablerepo="nodesource*"', `'))dnl
+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 EXTRA_DISABLE -y redhat/freeradius.spec; \
+       done
+
+#
+#  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
+
+#
+#  Create the RPM build tree
+#
+ENV BUILDDIR=/root/rpmbuild
+RUN rpmdev-setuptree