]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
docker: build libkqueue from source on non-amd64 architectures
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 18 Mar 2026 02:14:45 +0000 (20:14 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 18 Mar 2026 17:23:42 +0000 (11:23 -0600)
The NetworkRADIUS extras repository only provides amd64 packages
for libkqueue. On other architectures (e.g. arm64), build libkqueue
from source and install the resulting .deb packages in both the
build and runtime stages.

scripts/docker/build/debian12/Dockerfile
scripts/docker/build/debian13/Dockerfile
scripts/docker/build/debiansid/Dockerfile
scripts/docker/build/ubuntu22/Dockerfile
scripts/docker/build/ubuntu24/Dockerfile
scripts/docker/m4/docker.deb.m4

index babacb86b55db5fbe20681be2781b0b92a3c110a..b3ee632fe307c30698a614bbaf8398f38618ead8 100644 (file)
@@ -40,6 +40,21 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake wget && \
+        VERSION=2.6.1 && \
+        wget https://github.com/mheily/libkqueue/archive/v${VERSION}.tar.gz && \
+        tar -xzf v${VERSION}.tar.gz && \
+        cd libkqueue-${VERSION} && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cd .. && rm -rf libkqueue-${VERSION} v${VERSION}.tar.gz; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue
index 043e4aef97e7210c0fc669ccd91b026b8fccf250..93517391fed2e53327fcd47b440db0336dab4cb2 100644 (file)
@@ -40,6 +40,21 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake wget && \
+        VERSION=2.6.1 && \
+        wget https://github.com/mheily/libkqueue/archive/v${VERSION}.tar.gz && \
+        tar -xzf v${VERSION}.tar.gz && \
+        cd libkqueue-${VERSION} && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cd .. && rm -rf libkqueue-${VERSION} v${VERSION}.tar.gz; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue
index 08de83efba78b332b1114aa617465068bded58e2..4b896839c1d28392efd112a05608ec09cc41a0c6 100644 (file)
@@ -40,6 +40,21 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake wget && \
+        VERSION=2.6.1 && \
+        wget https://github.com/mheily/libkqueue/archive/v${VERSION}.tar.gz && \
+        tar -xzf v${VERSION}.tar.gz && \
+        cd libkqueue-${VERSION} && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cd .. && rm -rf libkqueue-${VERSION} v${VERSION}.tar.gz; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue
index 53370719dcb189374849358b62021471b6574382..f858f28fe1220d32e5707fa3e1ae8154b30f0f86 100644 (file)
@@ -40,6 +40,21 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake wget && \
+        VERSION=2.6.1 && \
+        wget https://github.com/mheily/libkqueue/archive/v${VERSION}.tar.gz && \
+        tar -xzf v${VERSION}.tar.gz && \
+        cd libkqueue-${VERSION} && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cd .. && rm -rf libkqueue-${VERSION} v${VERSION}.tar.gz; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue
index 0491a7b3fc3a46e906f0620b29a28975cad8bd79..50d0c9bb13f393b81ab9406e30ad54782a5fbbf5 100644 (file)
@@ -40,6 +40,20 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake && \
+        git clone --depth 1 https://github.com/mheily/libkqueue.git && \
+        cd libkqueue && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cp *.deb /usr/local/src/repositories/ && \
+        cd .. && rm -rf libkqueue; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue
index 5e127c397d8b9ca9bc74bee50f5154fb240179c5..a6bb4b4eb76d7aa5b4d47e4c2f700e2f0731f053 100644 (file)
@@ -35,6 +35,20 @@ COPY . .
 RUN git clean -fdxx \
  && git reset --hard HEAD
 
+#
+#  Build libkqueue from source on non-amd64 architectures.
+#  The NetworkRADIUS extras repository only provides amd64 packages.
+#
+RUN if [ "$(dpkg --print-architecture)" != "amd64" ]; then \
+        apt-get install -y cmake && \
+        git clone --depth 1 https://github.com/mheily/libkqueue.git && \
+        cd libkqueue && \
+        cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib . && \
+        make && cpack -G DEB && dpkg -i *.deb && \
+        cp *.deb /usr/local/src/repositories/ && \
+        cd .. && rm -rf libkqueue; \
+    fi
+
 #
 #  Install build dependencies
 #  Debian sid fails if debian/control doesn't exist due to an issue