[PATCH V2 4/6][SRU][OEM-5.14] UBUNTU: [Packaging] add arch= in dkms-versions
You-Sheng Yang
vicamo.yang at canonical.com
Fri Apr 22 17:10:14 UTC 2022
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.master/rules.d/amd64.mk | 1 -
debian.master/rules.d/arm64.mk | 1 -
debian.master/rules.d/ppc64el.mk | 1 -
debian.master/rules.d/s390x.mk | 2 --
debian.oem/rules.d/amd64.mk | 2 --
debian/dkms-versions | 4 ++--
debian/rules | 5 +++++
debian/rules.d/0-common-vars.mk | 5 +++++
8 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk
index 7654171a8637..81507877c4b0 100644
--- a/debian.master/rules.d/amd64.mk
+++ b/debian.master/rules.d/amd64.mk
@@ -20,5 +20,4 @@ do_tools_host = true
do_extras_package = true
do_tools_common = true
do_tools_acpidbg = true
-do_zfs = true
do_odm_drivers = true
diff --git a/debian.master/rules.d/arm64.mk b/debian.master/rules.d/arm64.mk
index e0415a4075ac..d215e1bda1fe 100644
--- a/debian.master/rules.d/arm64.mk
+++ b/debian.master/rules.d/arm64.mk
@@ -19,4 +19,3 @@ do_tools_perf_jvmti = true
do_tools_bpftool = true
do_dtbs = true
-do_zfs = true
diff --git a/debian.master/rules.d/ppc64el.mk b/debian.master/rules.d/ppc64el.mk
index ec8f7e914614..b205a5153b51 100644
--- a/debian.master/rules.d/ppc64el.mk
+++ b/debian.master/rules.d/ppc64el.mk
@@ -16,4 +16,3 @@ do_tools_perf_jvmti = true
do_tools_bpftool = true
#do_flavour_image_package = false
-do_zfs = true
diff --git a/debian.master/rules.d/s390x.mk b/debian.master/rules.d/s390x.mk
index 4b3698fc9c45..0620c638a724 100644
--- a/debian.master/rules.d/s390x.mk
+++ b/debian.master/rules.d/s390x.mk
@@ -17,5 +17,3 @@ do_tools_cpupower = true
do_tools_perf = true
do_tools_perf_jvmti = true
do_tools_bpftool = true
-
-do_zfs = true
diff --git a/debian.oem/rules.d/amd64.mk b/debian.oem/rules.d/amd64.mk
index c50031de75c2..127d28bb9372 100644
--- a/debian.oem/rules.d/amd64.mk
+++ b/debian.oem/rules.d/amd64.mk
@@ -20,8 +20,6 @@ do_tools_host = true
do_extras_package = true
do_tools_common = true
do_tools_acpidbg = true
-do_zfs = true
-do_v4l2loopback = true
do_odm_drivers = true
# OEM
diff --git a/debian/dkms-versions b/debian/dkms-versions
index 3c4bd967ffd6..ae6a3c2a1c69 100644
--- a/debian/dkms-versions
+++ b/debian/dkms-versions
@@ -1,2 +1,2 @@
-v4l2loopback 0.12.5-1ubuntu3 modulename=v4l2loopback debpath=pool/universe/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1ubuntu3_all.deb rprovides=v4l2loopback-modules rprovides=v4l2loopback-dkms
-zfs-linux 2.0.6-1ubuntu2.1 modulename=zfs debpath=pool/universe/z/zfs-linux/zfs-dkms_2.0.6-1ubuntu2.1_all.deb rprovides=spl-modules rprovides=spl-dkms rprovides=zfs-modules rprovides=zfs-dkms
+v4l2loopback 0.12.5-1ubuntu3 modulename=v4l2loopback debpath=pool/universe/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1ubuntu3_all.deb arch=amd64 rprovides=v4l2loopback-modules rprovides=v4l2loopback-dkms
+zfs-linux 2.0.6-1ubuntu2.1 modulename=zfs debpath=pool/universe/z/zfs-linux/zfs-dkms_2.0.6-1ubuntu2.1_all.deb arch=amd64 arch=arm64 arch=ppc64el arch=s390x rprovides=spl-modules rprovides=spl-dkms rprovides=zfs-modules rprovides=zfs-dkms
diff --git a/debian/rules b/debian/rules
index 96b8ce35fbce..1f057fc0633d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,6 +43,11 @@ ifneq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
disable_d_i=true
endif
+# Default settings for DKMS modules.
+$(foreach _m,$(all_dkms_modules), \
+ $(eval do_$(_m) ?= $(if $(filter $(arch),$(filter-out $(dkms_exclude),$(if $(filter __all__,$(dkms_$(_m)_archs)),$(arch),$(dkms_$(_m)_archs)) $(dkms_include))),true,false)) \
+)
+
# Don't build udebs if $(DEBIAN)/d-i/ doesn't exist
ifeq ($(wildcard $(DEBIAN)/d-i/.),)
disable_d_i=true
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 5500cabc48ed..10d0675c044b 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -302,5 +302,10 @@ $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' $(DROOT)/dkms-ver
, \
$(error debpath for $(_deb_pkgname) not specified.) \
) \
+ $(if $(filter arch=%,$(_params)), \
+ $(eval dkms_$(_m)_archs = $(patsubst arch=%,%,$(filter arch=%,$(_params)))) \
+ , \
+ $(eval dkms_$(_m)_archs = __all__) \
+ ) \
$(eval dkms_$(_m)_rprovides = $(patsubst rprovides=%,%,$(filter rprovides=%,$(_params)))) \
)
--
2.34.1
More information about the kernel-team
mailing list