summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/linux-kernel/.gitignore11
-rw-r--r--packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch59
2 files changed, 64 insertions, 6 deletions
diff --git a/packages/linux-kernel/.gitignore b/packages/linux-kernel/.gitignore
index addb6a6c..7e514b4e 100644
--- a/packages/linux-kernel/.gitignore
+++ b/packages/linux-kernel/.gitignore
@@ -1,7 +1,7 @@
-linux
-wireguard
-accel-ppp
-intel-qat
+/linux/
+/wireguard/
+/accel-ppp/
+/intel-qat/
*.deb
*.changes
*.buildinfo
@@ -13,5 +13,4 @@ igb-*/
ixgbe-*/
ixgbevf-*/
vyos-intel-*/
-
-kernel-vars
+/kernel-vars
diff --git a/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch b/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch
new file mode 100644
index 00000000..9da36b80
--- /dev/null
+++ b/packages/linux-kernel/patches/wireguard/0001-Debian-compile-in-VyOS-environment.patch
@@ -0,0 +1,59 @@
+From a0ec7855f632d6ea7d4134628fa53760ff73aada Mon Sep 17 00:00:00 2001
+From: Christian Poessinger <christian@poessinger.com>
+Date: Wed Sep 25 07:50:39 2019 +0200
+Subject: [PATCH] Debian: compile in VyOS environment
+
+----
+
+diff --git i/debian/control w/debian/control
+index dc1fd11..b7e5b51 100644
+--- i/debian/control
++++ w/debian/control
+@@ -17,7 +17,7 @@ Rules-Requires-Root: no
+ Package: wireguard
+ Architecture: all
+ Depends:
+- wireguard-dkms (= ${source:Version}) | wireguard-modules (= ${source:Upstream-Version}),
++ wireguard-modules (= ${source:Version}),
+ wireguard-tools (>= ${source:Version}),
+ ${misc:Depends},
+ Description: fast, modern, secure kernel VPN tunnel (metapackage)
+@@ -33,7 +33,7 @@ Description: fast, modern, secure kernel VPN tunnel (metapackage)
+ userspace tooling, and tries to load the new kernel module upon
+ installation, if wireguard is already in use on the system.
+
+-Package: wireguard-dkms
++Package: wireguard-modules
+ Architecture: all
+ Section: kernel
+ Depends:
+diff --git i/debian/rules w/debian/rules
+index af06b98..97df06a 100755
+--- i/debian/rules
++++ w/debian/rules
+@@ -6,21 +6,17 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+ export DEB_VERSION_UPSTREAM
+
+ WIREGUARD_ARGS = WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes WITH_SYSTEMDUNITS=yes V=1
++KERNEL_VERSION := $(shell cat "${KERNELDIR}"/include/config/kernel.release)
+
+ %:
+- dh $@ --with dkms
+-
+-override_dh_auto_install-indep:
+- $(MAKE) -C src DESTDIR=../debian/wireguard-dkms DKMSDIR=/usr/src/wireguard-$(DEB_VERSION_UPSTREAM) dkms-install
++ dh $@
+
+ override_dh_auto_build-arch:
+- dh_auto_build --sourcedirectory=src/tools -- $(WIREGUARD_ARGS)
++ dh_auto_build --sourcedirectory=src -- $(WIREGUARD_ARGS)
+
+ override_dh_auto_install-arch:
+ $(MAKE) -C src/tools DESTDIR=../../debian/wireguard-tools $(WIREGUARD_ARGS) install
+-
+-override_dh_dkms:
+- dh_dkms -p wireguard-dkms -- src/dkms.conf
++ echo "src/wireguard.ko /lib/modules/$(KERNEL_VERSION)/extra" > debian/wireguard-modules.install
+
+ override_dh_installchangelogs:
+ dh_installchangelogs debian/upstream.changelog