|
| 1 | +# Auto generated for ubuntu24-prof |
| 2 | +# from scripts/docker/m4/crossbuild.deb.m4 |
| 3 | +# |
| 4 | +# Rebuild this file with `make crossbuild.ubuntu24-prof.regen` |
| 5 | +# |
| 6 | +ARG from=ubuntu:24.04 |
| 7 | +FROM ${from} AS build |
| 8 | + |
| 9 | +SHELL ["/usr/bin/nice", "-n", "5", "/usr/bin/ionice", "-c", "3", "/bin/sh", "-x", "-c"] |
| 10 | + |
| 11 | +ARG APT_OPTS="-y --option=Dpkg::options::=--force-unsafe-io --no-install-recommends" |
| 12 | + |
| 13 | +ARG DEBIAN_FRONTEND=noninteractive |
| 14 | + |
| 15 | + |
| 16 | +# |
| 17 | +# Install add-apt-repository (may be needed for clang) and |
| 18 | +# package development utilities |
| 19 | +# |
| 20 | +RUN apt-get update && \ |
| 21 | + apt-get install $APT_OPTS \ |
| 22 | + devscripts \ |
| 23 | + equivs \ |
| 24 | + git \ |
| 25 | + gnupg2 \ |
| 26 | + lsb-release \ |
| 27 | + procps \ |
| 28 | + quilt \ |
| 29 | + rsync \ |
| 30 | + wget && \ |
| 31 | + apt-get clean && \ |
| 32 | + rm -r /var/lib/apt/lists/* |
| 33 | + |
| 34 | + |
| 35 | +# |
| 36 | +# Set up NetworkRADIUS extras repository |
| 37 | +# |
| 38 | +RUN install -d -o root -g root -m 0755 /etc/apt/keyrings && \ |
| 39 | + wget -O /etc/apt/keyrings/packages.networkradius.com.asc "https://packages.networkradius.com/pgp/packages%40networkradius.com" && \ |
| 40 | + echo "deb [signed-by=/etc/apt/keyrings/packages.networkradius.com.asc] http://packages.networkradius.com/extras/ubuntu/noble noble main" > /etc/apt/sources.list.d/networkradius-extras.list && \ |
| 41 | + apt-get update |
| 42 | + |
| 43 | + |
| 44 | +# |
| 45 | +# Install compilers |
| 46 | +# |
| 47 | +RUN apt-get install $APT_OPTS \ |
| 48 | + g++ \ |
| 49 | + llvm clang lldb |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +# |
| 56 | +# Install some extra packages |
| 57 | +# |
| 58 | +RUN apt-get install $APT_OPTS \ |
| 59 | + libnl-3-dev \ |
| 60 | + libnl-genl-3-dev \ |
| 61 | + gdb \ |
| 62 | + less \ |
| 63 | + lldb \ |
| 64 | + vim \ |
| 65 | + oathtool |
| 66 | + |
| 67 | + |
| 68 | +# |
| 69 | +# Setup a src dir in /usr/local |
| 70 | +# |
| 71 | +RUN mkdir -p /usr/local/src/repositories |
| 72 | +WORKDIR /usr/local/src/repositories |
| 73 | + |
| 74 | + |
| 75 | +# |
| 76 | +# Shallow clone the FreeRADIUS source |
| 77 | +# |
| 78 | +WORKDIR /usr/local/src/repositories |
| 79 | +ARG source=https://github.com/FreeRADIUS/freeradius-server.git |
| 80 | +RUN git clone --depth 1 --no-single-branch ${source} |
| 81 | + |
| 82 | +# |
| 83 | +# Install build dependencies for all branches from v4 onwards |
| 84 | +# Debian sid fails if debian/control doesn't exist due to an issue |
| 85 | +# in one of the included make files, so we create a blank file. |
| 86 | +# |
| 87 | +WORKDIR freeradius-server |
| 88 | +RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[4-9]*\.[0-9x]*\.x|master|${branch})$" | sort -u); \ |
| 89 | + do \ |
| 90 | + git checkout $i; \ |
| 91 | + if [ -e ./debian/control.in ] ; then \ |
| 92 | + touch -t 202001010000 debian/control; \ |
| 93 | + debian/rules debian/control ; \ |
| 94 | + fi ; \ |
| 95 | + mk-build-deps -irt"apt-get -o Debug::pkgProblemResolver=yes $APT_OPTS" debian/control ; \ |
| 96 | + apt-get -y remove libiodbc2-dev ; \ |
| 97 | + done |
0 commit comments