[PATCH 1/6][Unstable] UBUNTU: [Debian] use stamps for flavour install targets
Seth Forshee
seth.forshee at canonical.com
Thu Jun 3 13:05:11 UTC 2021
BugLink: https://bugs.launchpad.net/bugs/1930713
In preparation for moving installation of files from the flavour
build directories over to the build phase, convert relevant packaging
targets to use stamps.
Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 47 ++++++++++++++++----------------
debian/rules.d/3-binary-indep.mk | 16 ++++++-----
debian/rules.d/4-checks.mk | 6 ++--
3 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 0b008df5a853..71f30b72329c 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -99,29 +99,29 @@ $(shell echo $(1)/$(dkms_100c) | \
endef
# Install the finished build
-install-%: pkgdir_bin = $(CURDIR)/debian/$(bin_pkg_name)-$*
-install-%: pkgdir = $(CURDIR)/debian/$(mods_pkg_name)-$*
-install-%: pkgdir_ex = $(CURDIR)/debian/$(mods_extra_pkg_name)-$*
-install-%: pkgdir_bldinfo = $(CURDIR)/debian/$(bldinfo_pkg_name)-$*
-install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
-install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
-install-%: signingv = $(CURDIR)/debian/$(bin_pkg_name)-signing/$(release)-$(revision)
-install-%: toolspkgdir = $(CURDIR)/debian/$(tools_flavour_pkg_name)-$*
-install-%: cloudpkgdir = $(CURDIR)/debian/$(cloud_flavour_pkg_name)-$*
-install-%: basepkg = $(hdrs_pkg_name)
-install-%: indeppkg = $(indep_hdrs_pkg_name)
-install-%: kernfile = $(call custom_override,kernel_file,$*)
-install-%: instfile = $(call custom_override,install_file,$*)
-install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
-install-%: target_flavour = $*
-install-%: MODHASHALGO=sha512
-install-%: MODSECKEY=$(builddir)/build-$*/certs/signing_key.pem
-install-%: MODPUBKEY=$(builddir)/build-$*/certs/signing_key.x509
-install-%: build_dir=$(builddir)/build-$*
-install-%: dkms_dir=$(call dkms_dir_prefix,$(builddir)/build-$*)
-install-%: enable_zfs = $(call custom_override,do_zfs,$*)
-install-%: dbgpkgdir_zfs = $(if $(filter true,$(skipdbg)),"",$(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/kernel)
-install-%: $(stampdir)/stamp-build-% install-headers
+$(stampdir)/stamp-install-%: pkgdir_bin = $(CURDIR)/debian/$(bin_pkg_name)-$*
+$(stampdir)/stamp-install-%: pkgdir = $(CURDIR)/debian/$(mods_pkg_name)-$*
+$(stampdir)/stamp-install-%: pkgdir_ex = $(CURDIR)/debian/$(mods_extra_pkg_name)-$*
+$(stampdir)/stamp-install-%: pkgdir_bldinfo = $(CURDIR)/debian/$(bldinfo_pkg_name)-$*
+$(stampdir)/stamp-install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
+$(stampdir)/stamp-install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
+$(stampdir)/stamp-install-%: signingv = $(CURDIR)/debian/$(bin_pkg_name)-signing/$(release)-$(revision)
+$(stampdir)/stamp-install-%: toolspkgdir = $(CURDIR)/debian/$(tools_flavour_pkg_name)-$*
+$(stampdir)/stamp-install-%: cloudpkgdir = $(CURDIR)/debian/$(cloud_flavour_pkg_name)-$*
+$(stampdir)/stamp-install-%: basepkg = $(hdrs_pkg_name)
+$(stampdir)/stamp-install-%: indeppkg = $(indep_hdrs_pkg_name)
+$(stampdir)/stamp-install-%: kernfile = $(call custom_override,kernel_file,$*)
+$(stampdir)/stamp-install-%: instfile = $(call custom_override,install_file,$*)
+$(stampdir)/stamp-install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
+$(stampdir)/stamp-install-%: target_flavour = $*
+$(stampdir)/stamp-install-%: MODHASHALGO=sha512
+$(stampdir)/stamp-install-%: MODSECKEY=$(builddir)/build-$*/certs/signing_key.pem
+$(stampdir)/stamp-install-%: MODPUBKEY=$(builddir)/build-$*/certs/signing_key.x509
+$(stampdir)/stamp-install-%: build_dir=$(builddir)/build-$*
+$(stampdir)/stamp-install-%: dkms_dir=$(call dkms_dir_prefix,$(builddir)/build-$*)
+$(stampdir)/stamp-install-%: enable_zfs = $(call custom_override,do_zfs,$*)
+$(stampdir)/stamp-install-%: dbgpkgdir_zfs = $(if $(filter true,$(skipdbg)),"",$(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/kernel)
+$(stampdir)/stamp-install-%: $(stampdir)/stamp-build-% $(stampdir)/stamp-install-headers
@echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile)
dh_testdir
dh_testroot
@@ -504,6 +504,7 @@ ifneq ($(full_build),false)
# Clean out this flavours build directory.
rm -rf $(builddir)/build-$*
endif
+ @touch $@
headers_tmp := $(CURDIR)/debian/tmp-headers
headers_dir := $(CURDIR)/debian/linux-libc-dev
diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk
index 511a5eb39211..ba362a23fdaf 100644
--- a/debian/rules.d/3-binary-indep.mk
+++ b/debian/rules.d/3-binary-indep.mk
@@ -8,7 +8,7 @@ build-indep:
#
indep_hdrpkg = $(indep_hdrs_pkg_name)
indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
-install-headers: prepare-indep
+$(stampdir)/stamp-install-headers: $(stampdir)/stamp-prepare-indep
@echo Debug: $@
dh_testdir
dh_testroot
@@ -26,10 +26,11 @@ ifeq ($(do_flavour_header_package),true)
xargs -n1 -i: find : -type f) | \
cpio -pd --preserve-modification-time $(indep_hdrdir)
endif
+ @touch $@
docpkg = $(doc_pkg_name)
docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
-install-doc: prepare-indep
+install-doc: $(stampdir)/stamp-prepare-indep
@echo Debug: $@
ifeq ($(do_doc_package),true)
dh_testdir
@@ -55,7 +56,7 @@ endif
srcpkg = linux-source-$(release)
srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
-install-source: prepare-indep
+install-source: $(stampdir)/stamp-prepare-indep
@echo Debug: $@
ifeq ($(do_source_package),true)
@@ -92,7 +93,7 @@ install-tools: cloudpkg = $(cloud_common_pkg_name)
install-tools: cloudbin = $(CURDIR)/debian/$(cloudpkg)/usr/bin
install-tools: cloudsbin = $(CURDIR)/debian/$(cloudpkg)/usr/sbin
install-tools: cloudman = $(CURDIR)/debian/$(cloudpkg)/usr/share/man
-install-tools: prepare-indep $(stampdir)/stamp-build-perarch
+install-tools: $(stampdir)/stamp-prepare-indep $(stampdir)/stamp-build-perarch
@echo Debug: $@
ifeq ($(do_tools_common),true)
@@ -167,16 +168,17 @@ ifeq ($(do_tools_host),true)
$(hosttoolsman)/man1
endif
-prepare-indep:
+$(stampdir)/stamp-prepare-indep:
@echo Debug: $@
dh_prep -i
+ @touch $@
-install-indep: install-headers install-doc install-source install-tools
+install-indep: $(stampdir)/stamp-install-headers install-doc install-source install-tools
@echo Debug: $@
# This is just to make it easy to call manually. Normally done in
# binary-indep target during builds.
-binary-headers: prepare-indep install-headers
+binary-headers: $(stampdir)/stamp-prepare-indep $(stampdir)/stamp-install-headers
@echo Debug: $@
dh_installchangelogs -p$(indep_hdrpkg)
dh_installdocs -p$(indep_hdrpkg)
diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
index b99a1023fe5b..d513bc7aa481 100644
--- a/debian/rules.d/4-checks.mk
+++ b/debian/rules.d/4-checks.mk
@@ -1,17 +1,17 @@
# Check ABI for package against last release (if not same abinum)
-abi-check-%: install-%
+abi-check-%: $(stampdir)/stamp-install-%
@echo Debug: $@
@perl -f $(DROOT)/scripts/abi-check "$*" "$(prev_abinum)" "$(abinum)" \
"$(prev_abidir)" "$(abidir)" "$(skipabi)"
# Check the module list against the last release (always)
-module-check-%: install-%
+module-check-%: $(stampdir)/stamp-install-%
@echo Debug: $@
@perl -f $(DROOT)/scripts/module-check "$*" \
"$(prev_abidir)" "$(abidir)" $(skipmodule)
# Check the reptoline jmp/call functions against the last release.
-retpoline-check-%: install-%
+retpoline-check-%: $(stampdir)/stamp-install-%
@echo Debug: $@
$(SHELL) $(DROOT)/scripts/retpoline-check "$*" \
"$(prev_abidir)" "$(abidir)" "$(skipretpoline)" "$(builddir)/build-$*"
--
2.31.1
More information about the kernel-team
mailing list