[focal] UBUNTU: Add wireguard dkms build
diff mbox series

Message ID 20200127162622.23525-1-Jason@zx2c4.com
State New
Headers show
Series
  • [focal] UBUNTU: Add wireguard dkms build
Related show

Commit Message

Jason A. Donenfeld Jan. 27, 2020, 4:26 p.m. UTC
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
This is untested but might be of some help in getting things wired up.

 debian.master/abi/5.4.0-8.11/amd64/generic.modules      | 1 +
 debian.master/abi/5.4.0-8.11/amd64/lowlatency.modules   | 1 +
 debian.master/abi/5.4.0-8.11/arm64/generic.modules      | 1 +
 debian.master/abi/5.4.0-8.11/arm64/snapdragon.modules   | 1 +
 debian.master/abi/5.4.0-8.11/armhf/generic-lpae.modules | 1 +
 debian.master/abi/5.4.0-8.11/armhf/generic.modules      | 1 +
 debian.master/abi/5.4.0-8.11/ppc64el/generic.modules    | 1 +
 debian.master/abi/5.4.0-8.11/s390x/generic.modules      | 1 +
 debian.master/changelog                                 | 2 ++
 debian.master/control.d/generic.inclusion-list          | 1 +
 debian.master/d-i/modules/nic-modules                   | 1 +
 debian.master/rules.d/amd64.mk                          | 1 +
 debian.master/rules.d/arm64.mk                          | 1 +
 debian.master/rules.d/armhf.mk                          | 1 +
 debian.master/rules.d/i386.mk                           | 1 +
 debian.master/rules.d/ppc64el.mk                        | 1 +
 debian.master/rules.d/s390x.mk                          | 1 +
 debian.master/rules.d/x32.mk                            | 1 +
 debian/dkms-versions                                    | 1 +
 debian/rules                                            | 4 ++++
 debian/rules.d/2-binary-arch.mk                         | 5 +++++
 21 files changed, 29 insertions(+)

Comments

Seth Forshee Jan. 30, 2020, 3:06 p.m. UTC | #1
On Mon, Jan 27, 2020 at 05:26:22PM +0100, Jason A. Donenfeld wrote:
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> This is untested but might be of some help in getting things wired up.

Thanks for the proof of concept. Andy sent tested patches yesterday,
which have been applied. Nacking this patch for the record.
Jason A. Donenfeld Jan. 30, 2020, 3:24 p.m. UTC | #2
On Thu, Jan 30, 2020, 16:06 Seth Forshee <seth.forshee@canonical.com> wrote:

> On Mon, Jan 27, 2020 at 05:26:22PM +0100, Jason A. Donenfeld wrote:
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> > ---
> > This is untested but might be of some help in getting things wired up.
>
> Thanks for the proof of concept. Andy sent tested patches yesterday,
> which have been applied. Nacking this patch for the record.
>

Excellent. I saw indeed Andy's work in master-next. So, a happy NACK. :)

>

Patch
diff mbox series

diff --git a/debian.master/abi/5.4.0-8.11/amd64/generic.modules b/debian.master/abi/5.4.0-8.11/amd64/generic.modules
index c33df068a4ff..98851a3cd8d4 100644
--- a/debian.master/abi/5.4.0-8.11/amd64/generic.modules
+++ b/debian.master/abi/5.4.0-8.11/amd64/generic.modules
@@ -5294,6 +5294,7 @@  wimax
 winbond-840
 winbond-cir
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/amd64/lowlatency.modules b/debian.master/abi/5.4.0-8.11/amd64/lowlatency.modules
index 738e272de534..753c15f17096 100644
--- a/debian.master/abi/5.4.0-8.11/amd64/lowlatency.modules
+++ b/debian.master/abi/5.4.0-8.11/amd64/lowlatency.modules
@@ -5295,6 +5295,7 @@  wimax
 winbond-840
 winbond-cir
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/arm64/generic.modules b/debian.master/abi/5.4.0-8.11/arm64/generic.modules
index aae14017c2c9..72a72bbe1d6f 100644
--- a/debian.master/abi/5.4.0-8.11/arm64/generic.modules
+++ b/debian.master/abi/5.4.0-8.11/arm64/generic.modules
@@ -5788,6 +5788,7 @@  wilc1000-spi
 wimax
 winbond-840
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/arm64/snapdragon.modules b/debian.master/abi/5.4.0-8.11/arm64/snapdragon.modules
index 6b1106154e76..b4ed5de18aa5 100644
--- a/debian.master/abi/5.4.0-8.11/arm64/snapdragon.modules
+++ b/debian.master/abi/5.4.0-8.11/arm64/snapdragon.modules
@@ -5702,6 +5702,7 @@  wilc1000-spi
 wimax
 winbond-840
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/armhf/generic-lpae.modules b/debian.master/abi/5.4.0-8.11/armhf/generic-lpae.modules
index 28d5c25a0792..7505715ee1d5 100644
--- a/debian.master/abi/5.4.0-8.11/armhf/generic-lpae.modules
+++ b/debian.master/abi/5.4.0-8.11/armhf/generic-lpae.modules
@@ -5643,6 +5643,7 @@  wilc1000-spi
 wimax
 winbond-840
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/armhf/generic.modules b/debian.master/abi/5.4.0-8.11/armhf/generic.modules
index c0f897af435c..2428ab6a8ef4 100644
--- a/debian.master/abi/5.4.0-8.11/armhf/generic.modules
+++ b/debian.master/abi/5.4.0-8.11/armhf/generic.modules
@@ -5770,6 +5770,7 @@  wilc1000-spi
 wimax
 winbond-840
 wire
+wireguard
 wishbone-serial
 wkup_m3_rproc
 wl1251
diff --git a/debian.master/abi/5.4.0-8.11/ppc64el/generic.modules b/debian.master/abi/5.4.0-8.11/ppc64el/generic.modules
index a6d2cb52fc6f..a28a80531e80 100644
--- a/debian.master/abi/5.4.0-8.11/ppc64el/generic.modules
+++ b/debian.master/abi/5.4.0-8.11/ppc64el/generic.modules
@@ -5012,6 +5012,7 @@  wimax
 winbond-840
 windfarm_core
 wire
+wireguard
 wishbone-serial
 wl1251
 wl1251_sdio
diff --git a/debian.master/abi/5.4.0-8.11/s390x/generic.modules b/debian.master/abi/5.4.0-8.11/s390x/generic.modules
index 4242796c0e2c..cfb20ab7f1d4 100644
--- a/debian.master/abi/5.4.0-8.11/s390x/generic.modules
+++ b/debian.master/abi/5.4.0-8.11/s390x/generic.modules
@@ -855,6 +855,7 @@  vsock_diag
 vsockmon
 vx855
 vxlan
+wireguard
 wp512
 x_tables
 xcbc
diff --git a/debian.master/changelog b/debian.master/changelog
index a79f80085d69..82e212963086 100644
--- a/debian.master/changelog
+++ b/debian.master/changelog
@@ -1,3 +1,5 @@ 
+  * debian/rules: add wireguard via dkms
+
 linux (5.4.0-9.12) focal; urgency=medium
 
   * alsa/hda/realtek: the line-out jack doens't work on a dell AIO
diff --git a/debian.master/control.d/generic.inclusion-list b/debian.master/control.d/generic.inclusion-list
index 64b06051f0dc..45e9e0d39b56 100644
--- a/debian.master/control.d/generic.inclusion-list
+++ b/debian.master/control.d/generic.inclusion-list
@@ -253,3 +253,4 @@  sound/soundcore.ko
 ubuntu/vbox/vboxguest/vboxguest.ko
 ubuntu/vbox/vboxsf/vboxsf.ko
 zfs/*
+net/wireguard/*
diff --git a/debian.master/d-i/modules/nic-modules b/debian.master/d-i/modules/nic-modules
index e3628396d110..6a034f2cf7e5 100644
--- a/debian.master/d-i/modules/nic-modules
+++ b/debian.master/d-i/modules/nic-modules
@@ -202,6 +202,7 @@  virtio_net ?
 wavelan ?
 wd ?
 winbond-840 ?
+wireguard ?
 yellowfin ?
 znet ?
 vmxnet3 ?
diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk
index 9ffa35ccb8df..b1f62a796c22 100644
--- a/debian.master/rules.d/amd64.mk
+++ b/debian.master/rules.d/amd64.mk
@@ -24,3 +24,4 @@  do_tools_acpidbg = true
 do_zfs		= true
 do_dkms_nvidia  = true
 do_dkms_vbox    = true
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/arm64.mk b/debian.master/rules.d/arm64.mk
index f0f90148177a..ca0505e97457 100644
--- a/debian.master/rules.d/arm64.mk
+++ b/debian.master/rules.d/arm64.mk
@@ -23,3 +23,4 @@  do_tools_bpftool = true
 
 do_dtbs		= true
 do_zfs		= true
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/armhf.mk b/debian.master/rules.d/armhf.mk
index 085e8acdc8aa..d0c2d7f29048 100644
--- a/debian.master/rules.d/armhf.mk
+++ b/debian.master/rules.d/armhf.mk
@@ -17,3 +17,4 @@  do_tools_perf_jvmti = true
 do_tools_bpftool = true
 
 do_dtbs		= true
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/i386.mk b/debian.master/rules.d/i386.mk
index a0c64b72864b..6be46fed598e 100644
--- a/debian.master/rules.d/i386.mk
+++ b/debian.master/rules.d/i386.mk
@@ -17,3 +17,4 @@  do_source_package = false
 do_doc_package	= false
 do_flavour_header_package = false
 do_common_headers_indep = false
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/ppc64el.mk b/debian.master/rules.d/ppc64el.mk
index 3934ef482a57..a0bc38892cd8 100644
--- a/debian.master/rules.d/ppc64el.mk
+++ b/debian.master/rules.d/ppc64el.mk
@@ -19,3 +19,4 @@  do_tools_bpftool  = true
 
 #do_flavour_image_package = false
 do_zfs		= true
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/s390x.mk b/debian.master/rules.d/s390x.mk
index 4b3698fc9c45..f852ca656559 100644
--- a/debian.master/rules.d/s390x.mk
+++ b/debian.master/rules.d/s390x.mk
@@ -19,3 +19,4 @@  do_tools_perf_jvmti = true
 do_tools_bpftool  = true
 
 do_zfs		= true
+do_dkms_wireguard = true
diff --git a/debian.master/rules.d/x32.mk b/debian.master/rules.d/x32.mk
index e0ccff961f02..83a1fc3dbbd1 100644
--- a/debian.master/rules.d/x32.mk
+++ b/debian.master/rules.d/x32.mk
@@ -12,3 +12,4 @@  no_dumpfile	= true
 uefi_signed     = true
 
 do_flavour_image_package = false
+do_dkms_wireguard = true
diff --git a/debian/dkms-versions b/debian/dkms-versions
index ccf4984968c8..2e94fd770a2d 100644
--- a/debian/dkms-versions
+++ b/debian/dkms-versions
@@ -2,3 +2,4 @@  zfs-linux 0.8.2-3ubuntu4
 nvidia-graphics-drivers-390 390.132-0ubuntu2
 nvidia-graphics-drivers-440 440.44-0ubuntu1
 virtualbox 6.1.0-dfsg-3
+wireguard 0.0.20200121-3ubuntu1
diff --git a/debian/rules b/debian/rules
index 78ffcfc8c273..29bcd2e92990 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,6 +46,7 @@  ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
 	do_zfs=false
 	do_dkms_nvidia=false
 	do_dkms_vbox=false
+	do_dkms_wireguard=false
 endif
 
 # Are any of the kernel signing options enabled.
@@ -80,6 +81,7 @@  ifneq ($(filter autopkgtest,$(DEB_BUILD_PROFILES)),)
 	do_zfs=false
 	do_dkms_nvidia=false
 	do_dkms_vbox=false
+	do_dkms=wireguard=false
 endif
 
 # Being used to build a mainline build -- turn off things which do not work.
@@ -88,6 +90,7 @@  ifeq ($(do_mainline_build),true)
 	do_tools=false
 	no_dumpfile=1
 	do_zfs=false
+	do_dkms_wireguard=false
 	do_dkms_nvidia=false
 	do_dkms_vbox=false
 	skipabi=true
@@ -119,6 +122,7 @@  dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }' debian/dkms-v
 dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ { print $$2; }' debian/dkms-versions)
 dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ { print $$2; }' debian/dkms-versions)
 dkms_vbox_guest_version=$(shell gawk '/^virtualbox/ { print $$2; }' debian/dkms-versions)
+dkms_wireguard_version=$(shell gawk '/^wireguard/ { print $$2; }' debian/dkms-versions)
 
 # Debian Build System targets
 binary: binary-indep binary-arch
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 3bc508717e9d..6acb3ddb837d 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -401,6 +401,10 @@  ifeq ($(do_dkms_nvidia),true)
 	$(call build_dkms, $(bldinfo_pkg_name)-$*, $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, "", nvidia-440, pool/restricted/n/nvidia-graphics-drivers-440/nvidia-kernel-source-440_$(dkms_nvidia_440_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-440/nvidia-dkms-440_$(dkms_nvidia_440_version)_$(arch).deb)
 endif
 
+ifeq ($(do_dkms_wireguard),true)
+	$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir_ex)/lib/modules/$(abi_release)-$*/net/wireguard, "", wireguard-dkms, pool/universe/w/wireguard-linux-compat/wireguard-dkms_$(dkms_wireguard_version)_all.deb))
+endif
+
 ifeq ($(do_extras_package),true)
 	$(if $(filter true,$(do_dkms_vbox)),$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel, "", virtualbox-guest, pool/multiverse/v/virtualbox/virtualbox-guest-dkms_$(dkms_vbox_guest_version)_all.deb))
 endif
@@ -561,6 +565,7 @@  binary-%: pkgtools = $(tools_flavour_pkg_name)-$*
 binary-%: pkgcloud = $(cloud_flavour_pkg_name)-$*
 binary-%: rprovides = $(if $(filter true,$(call custom_override,do_zfs,$*)),spl-modules$(comma) spl-dkms$(comma) zfs-modules$(comma) zfs-dkms$(comma))
 binary-%: rprovides += $(if $(filter true,$(call custom_override,do_dkms_vbox,$*)),virtualbox-guest-dkms$(comma))
+binary-%: rprovides += $(if $(filter true,$(call custom_override,do_dkms_wireguard,$*)),wireguard-dkms$(comma))
 binary-%: target_flavour = $*
 binary-%: checks-%
 	@echo Debug: $@