]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commitdiff
UBUNTU: [Debian] use stamps for flavour install targets
authorSeth Forshee <seth.forshee@canonical.com>
Thu, 20 May 2021 20:32:25 +0000 (15:32 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 28 Jun 2021 06:04:04 +0000 (08:04 +0200)
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 install-*
targets to use stamps.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
debian/rules.d/2-binary-arch.mk
debian/rules.d/3-binary-indep.mk
debian/rules.d/4-checks.mk

index bd7fb7169b5caa567394ddf6ca4f3b43babd3ddf..27e7f807f29e3053fcda3134ec04a773820670ba 100644 (file)
@@ -106,29 +106,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
@@ -517,6 +517,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
index 6a44129678b2093ef4e84772c48d827ff644c90e..b718e00babaae7f699f0f741a14008bf7522482f 100644 (file)
@@ -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)
 
@@ -93,7 +94,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)
@@ -171,16 +172,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)
index b99a1023fe5bd38c9b2e03ea5beea347755499ad..d513bc7aa481c50607d52de3066eac39b4896fb5 100644 (file)
@@ -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-$*"