[PATCH 1/1 F][SRU] UBUNTU: [packaging] add signed modules for the 418-server and the 440-server flavours

Alberto Milone alberto.milone at canonical.com
Wed Jul 1 13:27:07 UTC 2020


We pass it "nvidia-440srv" and "nvidia-418srv", so the regex works. Of
course I also tested this.

Thanks,

On Wed, 1 Jul 2020 at 14:02, Stefan Bader <stefan.bader at canonical.com>
wrote:

> On 01.07.20 12:23, Alberto Milone wrote:
> > Enable building only on amd64 using the do_dkms_nvidia_server flag.
> >
> > Also, modify the regular expression in 2-binary-arch.mk, so that
> > names such as nvidia-440srv are allowed.
> >
> > BugLink: https://bugs.launchpad.net/bugs/1881137
> >
> > Signed-off-by: Alberto Milone <alberto.milone at canonical.com>
> > ---
> >  debian.master/rules.d/amd64.mk  |  1 +
> >  debian/dkms-versions            |  2 ++
> >  debian/rules                    | 11 ++++++++---
> >  debian/rules.d/2-binary-arch.mk |  5 +++++
> >  debian/scripts/dkms-build       |  2 +-
> >  5 files changed, 17 insertions(+), 4 deletions(-)
> >
> > diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/
> amd64.mk
> > index b1f62a796c22..d253402ae066 100644
> > --- a/debian.master/rules.d/amd64.mk
> > +++ b/debian.master/rules.d/amd64.mk
> > @@ -23,5 +23,6 @@ do_tools_common = true
> >  do_tools_acpidbg = true
> >  do_zfs               = true
> >  do_dkms_nvidia  = true
> > +do_dkms_nvidia_server = true
> >  do_dkms_vbox    = true
> >  do_dkms_wireguard = true
> > diff --git a/debian/dkms-versions b/debian/dkms-versions
> > index 479f2b1769a3..bbe5fce1a98c 100644
> > --- a/debian/dkms-versions
> > +++ b/debian/dkms-versions
> > @@ -2,5 +2,7 @@ zfs-linux 0.8.3-1ubuntu12
> >  nvidia-graphics-drivers-390 390.138-0ubuntu0.20.04.1
> >  nvidia-graphics-drivers-435 435.21-0ubuntu7
> >  nvidia-graphics-drivers-440 440.100-0ubuntu0.20.04.1
> > +nvidia-graphics-drivers-418-server 0
> > +nvidia-graphics-drivers-440-server 0
> >  virtualbox 6.1.6-dfsg-1
> >  wireguard-linux-compat 1.0.20200413-1
> > diff --git a/debian/rules b/debian/rules
> > index 8585c1c95086..b2fde1f08b3b 100755
> > --- a/debian/rules
> > +++ b/debian/rules
> > @@ -45,6 +45,7 @@ ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
> >       disable_d_i=true
> >       do_zfs=false
> >       do_dkms_nvidia=false
> > +     do_dkms_nvidia_server=false
> >       do_dkms_vbox=false
> >       do_dkms_wireguard=false
> >  endif
> > @@ -80,6 +81,7 @@ ifneq ($(filter autopkgtest,$(DEB_BUILD_PROFILES)),)
> >       disable_d_i=true
> >       do_zfs=false
> >       do_dkms_nvidia=false
> > +     do_dkms_nvidia_server=false
> >       do_dkms_vbox=false
> >  endif
> >
> > @@ -90,6 +92,7 @@ ifeq ($(do_mainline_build),true)
> >       no_dumpfile=1
> >       do_zfs=false
> >       do_dkms_nvidia=false
> > +     do_dkms_nvidia_server=false
> >       do_dkms_vbox=false
> >       skipabi=true
> >       skipmodule=true
> > @@ -121,9 +124,11 @@ do_any_tools=$(sort $(filter-out
> false,$(do_linux_tools) $(do_cloud_tools)))
> >
> >  # Versions of dkms packages.
> >  dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }'
> debian/dkms-versions)
> > -dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ {
> print $$2; }' debian/dkms-versions)
> > -dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435/ {
> print $$2; }' debian/dkms-versions)
> > -dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ {
> print $$2; }' debian/dkms-versions)
> > +dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390 / {
> print $$2; }' debian/dkms-versions)
> > +dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435 / {
> print $$2; }' debian/dkms-versions)
> > +dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440 / {
> print $$2; }' debian/dkms-versions)
> > +dkms_nvidia_418_server_version=$(shell gawk
> '/^nvidia-graphics-drivers-418-server / { print $$2; }'
> debian/dkms-versions)
> > +dkms_nvidia_440_server_version=$(shell gawk
> '/^nvidia-graphics-drivers-440-server / { print $$2; }'
> debian/dkms-versions)
> >  dkms_vbox_guest_version=$(shell gawk '/^virtualbox/ { print $$2; }'
> debian/dkms-versions)
> >  dkms_wireguard_version=$(shell gawk '/^wireguard-linux-compat / { print
> $$2; }' debian/dkms-versions)
> >
> > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/
> 2-binary-arch.mk
> > index 2c82bb738afe..9dbb9d2e2fe4 100644
> > --- a/debian/rules.d/2-binary-arch.mk
> > +++ b/debian/rules.d/2-binary-arch.mk
> > @@ -408,6 +408,11 @@ 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_nvidia_server),true)
> > +     $(call build_dkms, $(bldinfo_pkg_name)-$*,
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, "",
> nvidia-418srv,
> pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb
> pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-dkms-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb)
> > +     $(call build_dkms, $(bldinfo_pkg_name)-$*,
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/signatures, "",
> nvidia-440srv,
> pool/restricted/n/nvidia-graphics-drivers-440-server/nvidia-kernel-source-440-server_$(dkms_nvidia_440_server_version)_$(arch).deb
> pool/restricted/n/nvidia-graphics-drivers-440-server/nvidia-dkms-440-server_$(dkms_nvidia_440_server_version)_$(arch).deb)
> > +endif
> > +
> >  ifeq ($(do_extras_package),true)
> >       $(if $(filter true,$(do_dkms_vbox)),$(call build_dkms,
> $(mods_pkg_name)-$*, $(pkgdir)/lib/modules/$(abi_release)-$*/kernel, "",
> virtualbox-guest,
> pool/multiverse/v/virtualbox/virtualbox-guest-dkms_$(dkms_vbox_guest_version)_all.deb))
> >  endif
> > diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build
> > index 638b3122a05d..c1751ffaa016 100755
> > --- a/debian/scripts/dkms-build
> > +++ b/debian/scripts/dkms-build
> > @@ -234,7 +234,7 @@ done
> >  # as squirreled away, and the log in case it is useful.  Finally pass a
> formed
> >  # signing command line in case we need to do that.
> >  dkms_build_specific="$srcdir/$0--$package"
> > -dkms_build_generic=$(echo "$dkms_build_specific" | sed -n -e
> 's/-[0-9][0-9]*$/-N/p')
> > +dkms_build_generic=$(echo "$dkms_build_specific" | sed -n -e
> 's/-[0-9][0-9]*[a-z]*$/-N/p')
>
> Hm, is this matching correctly? Assuming $dkms_build_specific" contains
> something like nvidia-graphics-driver-440-server, the above pattern would
> not
> apply to anything that has a - in it.
>
> >  for dkms_build in "$dkms_build_specific" "$dkms_build_generic"
> >  do
> >       if [ -z "$dkms_build" -o ! -e "$dkms_build" ]; then
> >
>
>
>

-- 
Alberto Milone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20200701/f8c2eca8/attachment.html>


More information about the kernel-team mailing list