blob: 03a9ce53f8b1cd2f11467c8b25bb9e3be46c4a04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# 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
#
# 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/*
# For clang
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++ llvm-8 clang-8 lldb-8 && \
# 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
#
# 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-8 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
|