Skip to content

Commit 6012fc1

Browse files
committed
UBUNTU: [Packaging] nvidia-6.2: dkms-versions standalone provides support
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: Ian May <ian.may@canonical.com>
1 parent 52566ec commit 6012fc1

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

debian/control.d/flavour-module.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Build-Profiles: <!stage1>
44
Architecture: ARCH
55
Section: kernel
66
Priority: optional
7+
Provides: ${MODULE:rprovides}
78
Depends:
89
${misc:Depends},
910
linux-image-PKGVER-ABINUM-FLAVOUR | linux-image-unsigned-PKGVER-ABINUM-FLAVOUR,

debian/rules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs.
153153
rm -f $(DROOT)/control.stub $(DEBIAN)/control.stub
154154
rm -f $(DROOT)/scripts/fix-filenames
155155

156+
# SUBSTVARS: rprovides for all DKMS packages
157+
echo "linux:rprovides=$(foreach dkms,$(all_built-in_dkms_modules),$(foreach provides,$(dkms_$(dkms)_rprovides),$(provides)$(comma)))" >"debian/substvars"
158+
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"
159+
156160
.PHONY: distclean
157161
distclean: clean
158162
rm -rf $(DROOT)/control debian/changelog \

debian/rules.d/2-binary-arch.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ define dh_all
606606
dh_shlibdeps -p$(1) $(shlibdeps_opts)
607607
dh_installdeb -p$(1)
608608
dh_installdebconf -p$(1)
609-
$(lockme) dh_gencontrol -p$(1) -- -Vlinux:rprovides='$(rprovides)' $(2)
609+
$(lockme) dh_gencontrol -p$(1) -- -Tdebian/substvars $(2)
610610
dh_md5sums -p$(1)
611611
dh_builddeb -p$(1)
612612
endef
@@ -646,7 +646,6 @@ binary-%: pkgcloud = $(cloud_flavour_pkg_name)-$*
646646
$(foreach _m,$(all_dkms_modules), \
647647
$(eval binary-%: enable_$(_m) = $$(filter true,$$(call custom_override,do_$(_m),$$*))) \
648648
)
649-
binary-%: rprovides = $(foreach _m,$(all_built-in_dkms_modules),$(if $(enable_$(_m)),$(foreach _r,$(dkms_$(_m)_rprovides),$(_r)$(comma) )))
650649
binary-%: target_flavour = $*
651650
binary-%: checks-%
652651
@echo Debug: $@

0 commit comments

Comments
 (0)