Skip to content

Commit

Permalink
UBUNTU: [Packaging] dkms-versions standalone provides support
Browse files Browse the repository at this point in the history
Add support for exposing rprovides data for standalone modules
too. Switch to exposing provides as a shared debian/substvar file
and use that in the templates.

Ignore: yes
Signed-off-by: Brad Figg <[email protected]>
Signed-off-by: Ian May <[email protected]>
  • Loading branch information
nvidia-bfigg authored and jacobmartin0 committed Dec 9, 2024
1 parent efac783 commit 3a6a867
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions debian/control.d/flavour-module.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Build-Profiles: <!stage1>
Architecture: ARCH
Section: kernel
Priority: optional
Provides: ${MODULE:rprovides}
Depends:
${misc:Depends},
linux-image-PKGVER-ABINUM-FLAVOUR | linux-image-unsigned-PKGVER-ABINUM-FLAVOUR,
Expand Down
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs.
rm -f $(DROOT)/control.stub $(DEBIAN)/control.stub
rm -f $(DROOT)/scripts/fix-filenames

# SUBSTVARS: rprovides for all DKMS packages
echo "linux:rprovides=$(foreach dkms,$(all_built-in_dkms_modules),$(foreach provides,$(dkms_$(dkms)_rprovides),$(provides)$(comma)))" >"debian/substvars"
echo "$(foreach dkms,$(all_standalone_dkms_modules),$(dkms):rprovides=$(foreach provides,$(dkms_$(dkms)_rprovides),$(provides)$(comma))=NL=)" | sed -e "s/=NL= */\n/g" >>"debian/substvars"

.PHONY: distclean
distclean: clean
rm -rf $(DROOT)/control debian/changelog \
Expand Down
3 changes: 1 addition & 2 deletions debian/rules.d/2-binary-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ define dh_all
dh_shlibdeps -p$(1) $(shlibdeps_opts)
dh_installdeb -p$(1)
dh_installdebconf -p$(1)
$(lockme) dh_gencontrol -p$(1) -- -Vlinux:rprovides='$(rprovides)' $(2)
$(lockme) dh_gencontrol -p$(1) -- -Tdebian/substvars $(2)
dh_md5sums -p$(1)
dh_builddeb -p$(1)
endef
Expand Down Expand Up @@ -558,7 +558,6 @@ binary-%: pkgcloud = $(cloud_flavour_pkg_name)-$*
$(foreach _m,$(all_dkms_modules), \
$(eval binary-%: enable_$(_m) = $$(filter true,$$(call custom_override,do_$(_m),$$*))) \
)
binary-%: rprovides = $(foreach _m,$(all_built-in_dkms_modules),$(if $(enable_$(_m)),$(foreach _r,$(dkms_$(_m)_rprovides),$(_r)$(comma) )))
binary-%: target_flavour = $*
binary-%: checks-%
@echo Debug: $@
Expand Down

0 comments on commit 3a6a867

Please sign in to comment.