[PATCH V2 2/6][SRU][Jammy/OEM-5.17] UBUNTU: [Packaging] add debpath= in dkms-versions

Dimitri John Ledkov dimitri.ledkov at canonical.com
Tue Apr 26 10:51:26 UTC 2022


Hi,

On Fri, 22 Apr 2022 at 18:11, You-Sheng Yang <vicamo.yang at canonical.com> wrote:
>
> From: "You-Sheng Yang (vicamo)" <vicamo.yang at canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1969434
>
> Signed-off-by: You-Sheng Yang (vicamo) <vicamo.yang at canonical.com>
> ---
>  debian/dkms-versions            | 4 ++--
>  debian/rules.d/0-common-vars.mk | 5 +++++
>  debian/rules.d/2-binary-arch.mk | 7 +++++--
>  3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/debian/dkms-versions b/debian/dkms-versions
> index 4b1e7a794514..2a7648084e1a 100644
> --- a/debian/dkms-versions
> +++ b/debian/dkms-versions
> @@ -1,2 +1,2 @@
> -v4l2loopback 0.12.5-1ubuntu3 modulename=v4l2loopback
> -zfs-linux 2.1.2-1ubuntu3 modulename=zfs
> +v4l2loopback 0.12.5-1ubuntu3 modulename=v4l2loopback debpath=pool/universe/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1ubuntu3_all.deb
> +zfs-linux 2.1.2-1ubuntu3 modulename=zfs debpath=pool/universe/z/zfs-linux/zfs-dkms_2.1.2-1ubuntu3_all.deb

Thank you for splitting the patches and grouping changes to
dkms-versions in the same patch as starts using the new key-val pairs.
It makes these patches easy to review.

When landing this, obviously we will simply update the origin copy of
the dkms-versions at
https://git.launchpad.net/~canonical-kernel/+git/kernel-versions/tree/dkms-versions/jammy:main
which are fetched by update-dkms-versions script when cranking
kernels.

All key-value pairs so far were declarative, but introduction of
debpath requires adjustment to the
https://git.launchpad.net/~canonical-kernel/+git/kernel-versions/tree/update-dkms-versions
as it would need to update version in both column 2 and inside debpath
setting. Also note that the previous implementation inside the the
debian/rules was not epoch aware.

When epoch are used in the version numbers, the package version would
be for example 2:21.1.2-0ubuntu1.1 yet the debpath would be
_21.1.2-0ubuntu1.1_all.deb without the "2:" epoch prefix. Hopefully we
can account for that too. Such that when cycle owner runs
https://git.launchpad.net/~canonical-kernel/+git/kernel-versions/tree/update-dkms-versions
the version & debpath are both updated correctly.

--
okurrr,

Dimitri


> diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
> index c617317fb54d..7cd84e4540bd 100644
> --- a/debian/rules.d/0-common-vars.mk
> +++ b/debian/rules.d/0-common-vars.mk
> @@ -300,4 +300,9 @@ $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' $(DROOT)/dkms-ver
>    ) \
>    $(eval all_dkms_modules += $(_m)) \
>    $(eval dkms_$(_m)_version = $(_deb_version)) \
> +  $(if $(filter debpath=%,$(_params)), \
> +    $(eval dkms_$(_m)_debpath = $(patsubst debpath=%,%,$(filter debpath=%,$(_params)))) \
> +    , \
> +    $(error debpath for $(_deb_pkgname) not specified.) \
> +  ) \
>  )
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 3bfc6abcdf35..5fe6f2a84169 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -413,8 +413,11 @@ endif
>         install -d $(dkms_dir) $(dkms_dir)/headers $(dkms_dir)/build $(dkms_dir)/source
>         cp -rp "$(hdrdir)" "$(indep_hdrdir)" "$(dkms_dir)/headers"
>
> -       $(if $(enable_zfs),$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir)/lib/modules/$(abi_release)-$*/kernel, $(dbgpkgdir_dkms), zfs, pool/universe/z/zfs-linux/zfs-dkms_$(dkms_zfs_version)_all.deb))
> -       $(if $(enable_v4l2loopback),$(call build_dkms, $(mods_pkg_name)-$*, $(pkgdir)/lib/modules/$(abi_release)-$*/kernel, $(dbgpkgdir_dkms), v4l2loopback, pool/universe/v/v4l2loopback/v4l2loopback-dkms_$(dkms_v4l2loopback_version)_all.deb))
> +       $(foreach _m,$(all_dkms_modules), \
> +         $(if $(enable_$(_m)), \
> +           $(call build_dkms,$(mods_pkg_name)-$*,$(pkgdir)/lib/modules/$(abi_release)-$*/kernel,$(dbgpkgdir_dkms),$(_m),$(dkms_$(_m)_debpath)); \
> +         ) \
> +       )
>
>
>  ifneq ($(skipdbg),true)
> --
> 2.34.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list