# 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 \
+ epel-release \
+ git \
+ openssl \
+ rpmdevtools \
+ rsync \
+ wget \
+ yum-utils \
+# which is required by fixture setup utilities
+ which \
+# libnl3-devel is required for the EAP tests
+ libnl3-devel
+
#
# 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++ devtoolset-8-make
+RUN yum install -y \
+ centos-release-scl
+RUN yum install -y \
+ devtoolset-8-gcc \
+ devtoolset-8-gcc-c++ \
+ devtoolset-8-make
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
#
# - doxygen & JSON.pm
-RUN yum install -y doxygen graphviz perl-JSON
+RUN yum install -y \
+ doxygen \
+ graphviz \
+ perl-JSON
# - antora (npm needed)
-RUN curl -sL https://rpm.nodesource.com/setup_8.x | bash -
-RUN yum install -y nodejs
+RUN bash -c "$(wget -O - https://rpm.nodesource.com/setup_14.x)" && \
+ 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.*amd64.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 yum install -y \
+ rubygems-devel
RUN gem install asciidoctor
+
+#
+# Completely remove the defunct nodesource-source repo
+# as it breaks yum-builddep
+# https://github.com/nodesource/distributions/issues/998
+# https://github.com/nodesource/distributions/issues/576
+#
+RUN awk '/nodesource-source/{T=1}//{if (!T){print}}' /etc/yum.repos.d/nodesource-el7.repo > \
+ /etc/yum.repos.d/nodesource-el7.repo.new && \
+ mv /etc/yum.repos.d/nodesource-el7.repo.new /etc/yum.repos.d/nodesource-el7.repo
+
#
# Setup a src dir in /usr/local
#
RUN mkdir -p /usr/local/src/repositories
WORKDIR /usr/local/src/repositories
-#
-# Get a modern version of cmake. We need 3.8.2 or later to build libkqueue rpms
-#
-RUN curl -f -o cmake.sh https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
-RUN [ "$(cat cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
-RUN sh cmake.sh --skip-license --prefix=/usr/local
#
-# Grab libkqueue and build
+# Set up NetworkRADIUS repositories for libkqueue and json-c
#
-WORKDIR /usr/local/src/repositories
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
+RUN echo $'[nr-libkqueue]\n\
+name=NetworkRADIUS-libkqueue-$releasever\n\
+baseurl=http://packages.networkradius.com/libkqueue/centos/$releasever/\n\
+enabled=1\n\
+gpgcheck=1\n\
+gpgkey=https://packages.networkradius.com/pgp/packages@networkradius.com\n\
+\n\
+[nr-json-c]\n\
+name=NetworkRADIUS-json-c-$releasever\n\
+baseurl=http://packages.networkradius.com/json-c/centos/$releasever/\n\
+enabled=1\n\
+gpgcheck=1\n\
+gpgkey=https://packages.networkradius.com/pgp/packages@networkradius.com'\
+> /etc/yum.repos.d/networkradius.repo
+RUN rpm --import https://packages.networkradius.com/pgp/packages@networkradius.com
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G RPM && \
- yum localinstall -y *.rpm
#
# Use LTB's openldap packages intead of the distribution version to avoid linking against NSS
#
WORKDIR /usr/local/src/repositories
ARG source=https://github.com/FreeRADIUS/freeradius-server.git
-RUN git clone --depth 1 --no-single-branch ${source}
+ARG branch=master
+RUN git clone --depth 1 --no-single-branch -b ${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; \
- [ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \
- done
+ do \
+ echo "BRANCH $i"; \
+ git checkout $i; \
+ [ -e redhat/freeradius.spec ] && yum-builddep -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
-ARG osname=buster
-
-FROM debian:${osname}-slim
+FROM debian:10-slim
SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"]
git \
gnupg2 \
lsb-release \
+ procps \
quilt \
rsync \
software-properties-common \
- wget && \
-# Compilers
- apt-get install $APT_OPTS \
- g++ && \
- bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" && \
+ wget \
# eapol_test dependencies
- apt-get install $APT_OPTS \
libnl-3-dev \
- libnl-genl-3-dev && \
-# cmake to build libkqueue
- apt-get install $APT_OPTS \
- cmake
+ libnl-genl-3-dev \
+# Compilers
+ clang \
+ g++ \
+ lldb \
+ llvm
+
#
# Documentation build dependecies
graphviz \
libjson-perl
# - antora (npm needed)
-RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_10.x)" && \
+RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_14.x)" && \
apt-get install $APT_OPTS \
nodejs
RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -delete
# - asciidoctor
RUN apt-get install $APT_OPTS \
- ruby
+ ruby
RUN gem install asciidoctor
#
-# Grab libkqueue and build
+# Set up NetworkRADIUS repositories for libkqueue and json-c
#
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
-
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G DEB && \
- dpkg -i --force-all ./libkqueue*.deb
+RUN wget -O - "https://packages.networkradius.com/pgp/packages%40networkradius.com" | apt-key add && \
+ echo "deb http://packages.networkradius.com/libkqueue/debian/buster buster main" > /etc/apt/sources.list.d/networkradius.list && \
+ echo "deb http://packages.networkradius.com/json-c/debian/buster buster main" >> /etc/apt/sources.list.d/networkradius.list && \
+ apt-get update
#
-ARG osname=stretch
-
-FROM debian:${osname}-slim
+FROM debian:9-slim
SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"]
git \
gnupg2 \
lsb-release \
+ procps \
quilt \
rsync \
software-properties-common \
- wget && \
-# Compilers
- apt-get install $APT_OPTS \
- g++ && \
- bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" && \
+ wget \
# eapol_test dependencies
- apt-get install $APT_OPTS \
libnl-3-dev \
- libnl-genl-3-dev
+ libnl-genl-3-dev \
+# Compilers
+ g++ && \
+ bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
+
#
# Documentation build dependecies
graphviz \
libjson-perl
# - antora (npm needed)
-RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_10.x)" && \
+RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_14.x)" && \
apt-get install $APT_OPTS \
nodejs
RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -delete
# - asciidoctor
RUN apt-get install $APT_OPTS \
- ruby
+ ruby
RUN gem install asciidoctor
RUN mkdir -p /usr/local/src/repositories
WORKDIR /usr/local/src/repositories
-#
-# Get a modern version of cmake. We need 3.8.2 or later to build libkqueue
-#
-RUN wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh && \
- /bin/sh cmake-3.8.2-Linux-x86_64.sh --skip-license --prefix=/usr/local
#
-# Grab libkqueue and build
+# Set up NetworkRADIUS repositories for libkqueue and json-c
#
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
-
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G DEB && \
- dpkg -i --force-all ./libkqueue*.deb
+RUN wget -O - "https://packages.networkradius.com/pgp/packages%40networkradius.com" | apt-key add && \
+ echo "deb http://packages.networkradius.com/libkqueue/debian/stretch stretch main" > /etc/apt/sources.list.d/networkradius.list && \
+ echo "deb http://packages.networkradius.com/json-c/debian/stretch stretch main" >> /etc/apt/sources.list.d/networkradius.list && \
+ apt-get update
#
-ARG osname=sid
-
-FROM debian:${osname}-slim
+FROM debian:sid-slim
SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"]
git \
gnupg2 \
lsb-release \
+ procps \
quilt \
rsync \
software-properties-common \
- wget && \
-# Compilers
- apt-get install $APT_OPTS \
- g++ && \
- bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" && \
+ wget \
# eapol_test dependencies
- apt-get install $APT_OPTS \
libnl-3-dev \
- libnl-genl-3-dev && \
-# cmake to build libkqueue
- apt-get install $APT_OPTS \
- cmake
+ libnl-genl-3-dev \
+# Compilers
+ clang \
+ g++ \
+ lldb \
+ llvm
+
#
# Documentation build dependecies
graphviz \
libjson-perl
# - antora (npm needed)
-RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_10.x)" && \
+RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_14.x)" && \
apt-get install $APT_OPTS \
nodejs
RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -delete
# - asciidoctor
RUN apt-get install $APT_OPTS \
- ruby
+ ruby
RUN gem install asciidoctor
WORKDIR /usr/local/src/repositories
-#
-# Grab libkqueue and build
-#
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
-
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G DEB && \
- dpkg -i --force-all ./libkqueue*.deb
-
-
#
# Shallow clone the FreeRADIUS source
#
FROM ubuntu:18.04
-ARG gccver=4.9
-ARG clangver=5.0
+SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"]
+
ARG osname=bionic
+ONBUILD ARG osname=${osname}
-ARG DEBIAN_FRONTEND=noninteractive
+ARG APT_OPTS="-y --option=Dpkg::options::=--force-unsafe-io --no-install-recommends"
-#
-# Install add-apt-repository
-#
-RUN apt-get update && \
- apt-get install -y software-properties-common && \
- apt-get clean && \
- rm -r /var/lib/apt/lists/*
+ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
# Development utilities
- apt-get install -y devscripts equivs git quilt rsync && \
-# Compilers
- apt-get install -y g++ llvm clang lldb && \
+ apt-get install $APT_OPTS \
+ devscripts \
+ equivs \
+ git \
+ gnupg2 \
+ lsb-release \
+ procps \
+ quilt \
+ rsync \
+ software-properties-common \
+ wget \
# eapol_test dependencies
- apt-get install -y libnl-3-dev libnl-genl-3-dev
+ libnl-3-dev \
+ libnl-genl-3-dev \
+# Compilers
+ clang \
+ g++ \
+ lldb \
+ llvm
+
#
# Documentation build dependecies
#
# - doxygen & JSON.pm
-RUN apt-get install -y doxygen graphviz libjson-perl
+RUN apt-get install $APT_OPTS \
+ doxygen \
+ graphviz \
+ libjson-perl
# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
-RUN apt-get install -y nodejs
+RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_14.x)" && \
+ apt-get install $APT_OPTS \
+ nodejs
RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
# - pandoc
-WORKDIR /tmp
-RUN curl -L --remote-name-all $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*amd64\.deb" | cut -d '"' -f 4)
-RUN apt-get install -y ./pandoc-*.deb
+RUN wget $(wget -qO - https://api.github.com/repos/jgm/pandoc/releases/latest | sed -ne 's/.*"browser_download_url".*"\(.*amd64\.deb\)"/\1/ p') && \
+ find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -print0 | \
+ xargs -0 -r apt-get install $APT_OPTS && \
+ find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -delete
# - asciidoctor
-RUN apt-get install -y ruby-dev
+RUN apt-get install $APT_OPTS \
+ ruby
RUN gem install asciidoctor
+
#
# Setup a src dir in /usr/local
#
RUN mkdir -p /usr/local/src/repositories
WORKDIR /usr/local/src/repositories
-#
-# Get a modern version of cmake. We need 3.8.2 or later to build libkqueue rpms
-#
-RUN curl -f -o cmake.sh https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
-RUN [ "$(cat cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
-RUN sh cmake.sh --skip-license --prefix=/usr/local
#
-# Grab libkqueue and build
+# Set up NetworkRADIUS repositories for libkqueue and json-c
#
-WORKDIR /usr/local/src/repositories
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
-
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G DEB && \
- dpkg -i --force-all ./libkqueue*.deb
+RUN wget -O - "https://packages.networkradius.com/pgp/packages%40networkradius.com" | apt-key add && \
+ echo "deb http://packages.networkradius.com/libkqueue/ubuntu/bionic bionic main" > /etc/apt/sources.list.d/networkradius.list && \
+ echo "deb http://packages.networkradius.com/json-c/ubuntu/bionic bionic main" >> /etc/apt/sources.list.d/networkradius.list && \
+ apt-get update
#
#
WORKDIR /usr/local/src/repositories
ARG source=https://github.com/FreeRADIUS/freeradius-server.git
-RUN git clone --depth 1 --no-single-branch ${source}
+ARG branch=master
+RUN git clone --depth 1 --no-single-branch -b ${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
+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|${branch})$" | sort -u); \
+ do \
+ git checkout $i; \
+ if [ -e ./debian/control.in ] ; then \
+ debian/rules debian/control ; \
+ fi ; \
+ mk-build-deps -irt"apt-get -o Debug::pkgProblemResolver=yes $APT_OPTS" debian/control ; \
+ apt-get -y remove libiodbc2-dev ; \
+ done
-ARG from=ubuntu:20.04
-FROM ${from}
-
-ARG osname=focal
+FROM ubuntu:20.04
SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"]
+ARG osname=focal
ONBUILD ARG osname=${osname}
ARG APT_OPTS="-y --option=Dpkg::options::=--force-unsafe-io --no-install-recommends"
devscripts \
equivs \
git \
+ gnupg2 \
+ lsb-release \
+ procps \
quilt \
rsync \
software-properties-common \
- wget && \
-# Compilers
- apt-get install $APT_OPTS \
- g++ && \
- bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" && \
+ wget \
# eapol_test dependencies
- apt-get install $APT_OPTS \
libnl-3-dev \
- libnl-genl-3-dev && \
-# cmake to build libkqueue
- apt-get install $APT_OPTS \
- cmake
+ libnl-genl-3-dev \
+# Compilers
+ clang \
+ g++ \
+ lldb \
+ llvm
+
#
# Documentation build dependecies
graphviz \
libjson-perl
# - antora (npm needed)
-RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_10.x)" && \
+RUN bash -c "$(wget -O - https://deb.nodesource.com/setup_14.x)" && \
apt-get install $APT_OPTS \
nodejs
RUN npm i -g @antora/cli@2.1 @antora/site-generator-default@2.1
find . -mindepth 1 -maxdepth 1 -type f -name 'pandoc-*.deb' -delete
# - asciidoctor
RUN apt-get install $APT_OPTS \
- ruby-dev
+ ruby
RUN gem install asciidoctor
#
-# Grab libkqueue and build
+# Set up NetworkRADIUS repositories for libkqueue
#
-RUN git clone --branch master --depth=1 https://github.com/mheily/libkqueue.git
-
-WORKDIR libkqueue
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
- make && \
- cpack -G DEB && \
- dpkg -i --force-all ./libkqueue*.deb
+RUN wget -O - "https://packages.networkradius.com/pgp/packages%40networkradius.com" | apt-key add && \
+ echo "deb http://packages.networkradius.com/libkqueue/ubuntu/bionic bionic main" > /etc/apt/sources.list.d/networkradius.list && \
+ apt-get update
#