diff mbox series

[Unstable:meta] UBUNTU: [Packaging] Hard-code wireguard module version

Message ID 20231027075202.19323-1-juerg.haefliger@canonical.com
State New
Headers show
Series [Unstable:meta] UBUNTU: [Packaging] Hard-code wireguard module version | expand

Commit Message

Juerg Haefliger Oct. 27, 2023, 7:52 a.m. UTC
The wireguard module is now part of the kernel and its version is
bogus and likely to never change so hard-code it and drop the relevant
build dependencies.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 debian/control.common | 3 +--
 debian/rules          | 6 +-----
 2 files changed, 2 insertions(+), 7 deletions(-)

Comments

Andrea Righi Oct. 27, 2023, 8:09 a.m. UTC | #1
On Fri, Oct 27, 2023 at 09:52:02AM +0200, Juerg Haefliger wrote:
> The wireguard module is now part of the kernel and its version is
> bogus and likely to never change so hard-code it and drop the relevant
> build dependencies.
> 
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>

wireguard version is unlikely to change and the logic that we have to
extract the version from the module is very bug prone, therefore:

Acked-by: Andrea Righi <andrea.righi@canonical.com>

> ---
>  debian/control.common | 3 +--
>  debian/rules          | 6 +-----
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/debian/control.common b/debian/control.common
> index 26236cbe8955..8be96bf2478b 100644
> --- a/debian/control.common
> +++ b/debian/control.common
> @@ -3,9 +3,8 @@ Section: devel
>  Priority: optional
>  Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
>  Standards-Version: 3.9.8
> -Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk, kmod
> +Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk
>  Build-Depends-Arch:
>   @KERNEL_SOURCE@-headers-@KERNEL_ABI_VERSION@,
>   linux-headers-@KERNEL_ABI_VERSION@-generic,
> - linux-modules-@KERNEL_ABI_VERSION@-generic,
>  Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/@SERIES@
> diff --git a/debian/rules b/debian/rules
> index 77d52afa9265..5386255b6a21 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -70,11 +70,7 @@ $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' debian/dkms-versi
>    ) \
>  )
>  dkms_virtualbox_version=$(KERNEL_ABI_VERSION)
> -ifeq ($(wildcard /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst),)
> -	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko)
> -else
> -	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst)
> -endif
> +dkms_wireguard_version := 1.0.0
>  
>  debian/control.d/dkms-%: module = $(patsubst debian/control.d/dkms-%,%,$@)
>  debian/control.d/dkms-%: module_archs = $(dkms_$(patsubst debian/control.d/dkms-%,%,$@)_archs)
> -- 
> 2.39.2
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Emil Renner Berthing Nov. 7, 2023, 10:14 a.m. UTC | #2
Juerg Haefliger wrote:
> The wireguard module is now part of the kernel and its version is
> bogus and likely to never change so hard-code it and drop the relevant
> build dependencies.
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>

Acked-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

> ---
>  debian/control.common | 3 +--
>  debian/rules          | 6 +-----
>  2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/debian/control.common b/debian/control.common
> index 26236cbe8955..8be96bf2478b 100644
> --- a/debian/control.common
> +++ b/debian/control.common
> @@ -3,9 +3,8 @@ Section: devel
>  Priority: optional
>  Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
>  Standards-Version: 3.9.8
> -Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk, kmod
> +Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk
>  Build-Depends-Arch:
>   @KERNEL_SOURCE@-headers-@KERNEL_ABI_VERSION@,
>   linux-headers-@KERNEL_ABI_VERSION@-generic,
> - linux-modules-@KERNEL_ABI_VERSION@-generic,
>  Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/@SERIES@
> diff --git a/debian/rules b/debian/rules
> index 77d52afa9265..5386255b6a21 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -70,11 +70,7 @@ $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' debian/dkms-versi
>    ) \
>  )
>  dkms_virtualbox_version=$(KERNEL_ABI_VERSION)
> -ifeq ($(wildcard /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst),)
> -	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko)
> -else
> -	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst)
> -endif
> +dkms_wireguard_version := 1.0.0
>
>  debian/control.d/dkms-%: module = $(patsubst debian/control.d/dkms-%,%,$@)
>  debian/control.d/dkms-%: module_archs = $(dkms_$(patsubst debian/control.d/dkms-%,%,$@)_archs)
> --
> 2.39.2
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Paolo Pisati Nov. 8, 2023, 7:21 a.m. UTC | #3
On Fri, Oct 27, 2023 at 09:52:02AM +0200, Juerg Haefliger wrote:
> The wireguard module is now part of the kernel and its version is
> bogus and likely to never change so hard-code it and drop the relevant
> build dependencies.
diff mbox series

Patch

diff --git a/debian/control.common b/debian/control.common
index 26236cbe8955..8be96bf2478b 100644
--- a/debian/control.common
+++ b/debian/control.common
@@ -3,9 +3,8 @@  Section: devel
 Priority: optional
 Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
 Standards-Version: 3.9.8
-Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk, kmod
+Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk
 Build-Depends-Arch:
  @KERNEL_SOURCE@-headers-@KERNEL_ABI_VERSION@,
  linux-headers-@KERNEL_ABI_VERSION@-generic,
- linux-modules-@KERNEL_ABI_VERSION@-generic,
 Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/@SERIES@
diff --git a/debian/rules b/debian/rules
index 77d52afa9265..5386255b6a21 100755
--- a/debian/rules
+++ b/debian/rules
@@ -70,11 +70,7 @@  $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' debian/dkms-versi
   ) \
 )
 dkms_virtualbox_version=$(KERNEL_ABI_VERSION)
-ifeq ($(wildcard /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst),)
-	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko)
-else
-	dkms_wireguard_version := $(shell /sbin/modinfo -F version /lib/modules/$(KERNEL_ABI_VERSION)-generic/kernel/drivers/net/wireguard/wireguard.ko.zst)
-endif
+dkms_wireguard_version := 1.0.0
 
 debian/control.d/dkms-%: module = $(patsubst debian/control.d/dkms-%,%,$@)
 debian/control.d/dkms-%: module_archs = $(dkms_$(patsubst debian/control.d/dkms-%,%,$@)_archs)