From e0e490d4c6211f9439b3a838ebf3e8eb637775d9 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Wed, 28 Feb 2018 14:39:47 +0000 Subject: [PATCH] tools/alpine: Build our own wireguard-tools package Currently, there is a conflict in musl versions between stable (used for tools/alpine) and edge (where wireguard-tools is). This cased the tools/alpine build to fail. With this commit we build our own wireguard-tools package, using the APKBUILD file from edge, against the libraries libraries from stable. We then add the wireguard-tools package to the mirror. Signed-off-by: Rolf Neugebauer --- tools/alpine/Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/alpine/Dockerfile b/tools/alpine/Dockerfile index e0eed32fd..6f27d36dc 100644 --- a/tools/alpine/Dockerfile +++ b/tools/alpine/Dockerfile @@ -12,8 +12,18 @@ RUN cat /tmp/packages.$(uname -m) >> /tmp/packages && \ mkdir -p /mirror/$(uname -m) && \ apk fetch --recursive -o /mirror/$(uname -m) $(apk info; cat /tmp/packages) -# add the tools for WireGuard, since the kernel module is now included, but from edge/testing -RUN apk fetch --recursive -o /mirror/$(uname -m) -X http://dl-cdn.alpinelinux.org/alpine/edge/testing -U wireguard-tools +# It's tricky to mix edge/testing packages which sometimes leads to dependency conflicts. +# wireguard-tools currently is only in edge, so here we build our own package using the +# APKBUILD file from edge. +RUN apk add alpine-sdk libmnl-dev curl && \ + adduser -D builder && \ + addgroup builder abuild && \ + mkdir -p /wireguard && \ + chmod 0777 /wireguard && \ + cd /wireguard && \ + curl -fsSLo APKBUILD https://git.alpinelinux.org/cgit/aports/plain/testing/wireguard-tools/APKBUILD && \ + su -c "abuild-keygen -a -n && abuild -r" builder && \ + cp /home/builder/packages/$(uname -m)/wireguard-tools-[0-9]*.apk /mirror/$(uname -m) # install abuild for signing RUN apk add --no-cache abuild