From patchwork Mon Oct 7 11:21:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Agathe Porte X-Patchwork-Id: 1993565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XMcmc5J5kz1xvJ for ; Mon, 7 Oct 2024 22:46:07 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sxmBV-0002UQ-Mk; Mon, 07 Oct 2024 11:45:53 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sxmBS-0002U5-Ha for kernel-team@lists.ubuntu.com; Mon, 07 Oct 2024 11:45:50 +0000 Received: from localhost (2.general.gagath.uk.vpn [10.172.197.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 3E4AD40214 for ; Mon, 7 Oct 2024 11:45:50 +0000 (UTC) From: Agathe Porte To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: [Packaging] use DEB_ prefix for some variables Date: Mon, 7 Oct 2024 13:21:34 +0200 Message-ID: <20241007114549.618267-2-agathe.porte@canonical.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241007114549.618267-1-agathe.porte@canonical.com> References: <20241007114549.618267-1-agathe.porte@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" To use the same naming scheme as the Debian packages that include /usr/share/dpkg/pkg-info.mk, rename variables to use the DEB_ prefix. Some variables already exist and have been reused (DEB_SOURCE, DEB_VERSION, DEB_VERSION_UPSTREAM, DEB_DISTRIBUTION) and some other variables have been introduced by following the naming scheme while not being defined in pkg-info.mk (DEB_VERSION_PREV, DEB_REVISION, DEB_REVISION_PREV). Signed-off-by: Agathe Porte --- debian/rules | 18 ++++---- debian/rules.d/0-common-vars.mk | 39 ++++++++-------- debian/rules.d/1-maintainer.mk | 12 ++--- debian/rules.d/2-binary-arch.mk | 76 ++++++++++++++++---------------- debian/rules.d/3-binary-indep.mk | 2 +- 5 files changed, 75 insertions(+), 72 deletions(-) diff --git a/debian/rules b/debian/rules index 5fd39b2b0bcc..b9909ac9c071 100755 --- a/debian/rules +++ b/debian/rules @@ -51,7 +51,7 @@ do_tools_perf_jvmti?=false do_tools_perf_python?=false # Indep tools packages may only be built for the main linux source package -ifeq ($(src_pkg_name),linux) +ifeq ($(DEB_SOURCE),linux) do_tools_common = true do_tools_host = true endif @@ -59,7 +59,7 @@ endif # The linux-source package may only be built for the linux source package # We need to explicitly turn this off here to override any (incorrect) # statement in any of the above included makefile snippets -ifneq ($(src_pkg_name),linux) +ifneq ($(DEB_SOURCE),linux) do_source_package = false endif @@ -168,7 +168,7 @@ include $(DROOT)/rules.d/3-binary-indep.mk include $(DROOT)/rules.d/4-checks.mk control_files := $(DEBIAN)/control.stub.in -ifeq ($(src_pkg_name),linux) +ifeq ($(DEB_SOURCE),linux) control_files += debian/control.d/linux-libc-dev.stub control_files += debian/control.d/linux-tools-common.stub control_files += debian/control.d/linux-cloud-tools-common.stub @@ -193,22 +193,22 @@ $(DEBIAN)/control.stub: \ for i in $(control_files); do \ cat $$i; \ echo ""; \ - done | sed -e 's/PKGVER/$(release)/g' \ + done | sed -e 's/PKGVER/$(DEB_VERSION_UPSTREAM)/g' \ -e 's/ABINUM/$(abinum)/g' \ - -e 's/SRCPKGNAME/$(src_pkg_name)/g' \ + -e 's/SRCPKGNAME/$(DEB_SOURCE)/g' \ -e 's/=HUMAN=/$(human_arch)/g' \ - -e 's/=SERIES=/$(series)/g' \ + -e 's/=SERIES=/$(DEB_DISTRIBUTION)/g' \ -e 's|\(^Maintainer:.*\)|\1\nXSC-Ubuntu-Compatible-Signing: $(UBUNTU_COMPATIBLE_SIGNING)|g' \ -e 's/\(^Build-Depends:$$\)/\1\n$(GCC_BUILD_DEPENDS)/g' \ > $(DEBIAN)/control.stub; flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\ for i in $$flavours; do \ $(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" | \ - sed -e 's/PKGVER/$(release)/g' \ + sed -e 's/PKGVER/$(DEB_VERSION_UPSTREAM)/g' \ -e 's/ABINUM/$(abinum)/g' \ - -e 's/SRCPKGNAME/$(src_pkg_name)/g' \ + -e 's/SRCPKGNAME/$(DEB_SOURCE)/g' \ -e 's/=HUMAN=/$(human_arch)/g' \ - -e 's/=SERIES=/$(series)/g' \ + -e 's/=SERIES=/$(DEB_DISTRIBUTION)/g' \ >> $(DEBIAN)/control.stub; \ done diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 93f90c7198c1..4d0a52b73e7f 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -3,21 +3,24 @@ comma = , empty := space := $(empty) $(empty) -# +# We cannot include /usr/share/dpkg/pkg-info.mk because the variables defined +# here depend on the $(DEBIAN) directory, which can vary between kernels. +# Instead, this file will define the same variables but using the $(DEBIAN) +# variable to use the correct files. + # The source package name will be the first token from $(DEBIAN)/changelog -# -src_pkg_name := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S source) +DEB_SOURCE := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S source) # Get the series -series := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S distribution | sed -e 's/-\(security\|updates\|proposed\)$$//') +DEB_DISTRIBUTION := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S distribution | sed -e 's/-\(security\|updates\|proposed\)$$//') # Get some version info -version := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S version) -revision ?= $(lastword $(subst -,$(space),$(version))) -release := $(patsubst %-$(revision),%,$(version)) +DEB_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S version) +DEB_REVISION ?= $(lastword $(subst -,$(space),$(DEB_VERSION))) +DEB_VERSION_UPSTREAM := $(patsubst %-$(DEB_REVISION),%,$(DEB_VERSION)) -prev_fullver ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 -S version) -prev_revision := $(lastword 0.0 $(subst -,$(space),$(prev_fullver))) +DEB_VERSION_PREV ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 -S version) +DEB_REVISION_PREV := $(lastword 0.0 $(subst -,$(space),$(DEB_VERSION_PREV))) # Get upstream version info upstream_version := $(shell sed -n 's/^VERSION = \(.*\)$$/\1/p' Makefile) @@ -58,11 +61,11 @@ ifeq ($(filter $(DEB_BUILD_OPTIONS),noautodbgsym),noautodbgsym) do_dbgsym_package = false endif -abinum := $(firstword $(subst .,$(space),$(revision))) +abinum := $(firstword $(subst .,$(space),$(DEB_REVISION))) prev_abinum := $(firstword $(subst .,$(space),$(prev_revision))) -abi_release := $(release)-$(abinum) +abi_release := $(DEB_VERSION_UPSTREAM)-$(abinum) -uploadnum := $(patsubst $(abinum).%,%,$(revision)) +uploadnum := $(patsubst $(abinum).%,%,$(DEB_REVISION)) ifneq ($(do_full_build),false) uploadnum := $(uploadnum)-Ubuntu endif @@ -107,9 +110,9 @@ mods_pkg_name=linux-modules-$(abi_release) mods_extra_pkg_name=linux-modules-extra-$(abi_release) bldinfo_pkg_name=linux-buildinfo-$(abi_release) hdrs_pkg_name=linux-headers-$(abi_release) -rust_pkg_name=$(src_pkg_name)-lib-rust-$(abi_release) -indep_hdrs_pkg_name=$(src_pkg_name)-headers-$(abi_release) -indep_lib_rust_pkg_name=$(src_pkg_name)-lib-rust-$(abi_release) +rust_pkg_name=$(DEB_SOURCE)-lib-rust-$(abi_release) +indep_hdrs_pkg_name=$(DEB_SOURCE)-headers-$(abi_release) +indep_lib_rust_pkg_name=$(DEB_SOURCE)-lib-rust-$(abi_release) # # Similarly with the linux-source package, you need not build it as a developer. Its @@ -135,10 +138,10 @@ ifneq ($(wildcard $(CURDIR)/tools),) else do_tools?=false endif -tools_pkg_name=$(src_pkg_name)-tools-$(abi_release) +tools_pkg_name=$(DEB_SOURCE)-tools-$(abi_release) tools_common_pkg_name=linux-tools-common tools_flavour_pkg_name=linux-tools-$(abi_release) -cloud_pkg_name=$(src_pkg_name)-cloud-tools-$(abi_release) +cloud_pkg_name=$(DEB_SOURCE)-cloud-tools-$(abi_release) cloud_common_pkg_name=linux-cloud-tools-common cloud_flavour_pkg_name=linux-cloud-tools-$(abi_release) hosttools_pkg_name=linux-tools-host @@ -154,7 +157,7 @@ do_dtbs=false # ZSTD compressed kernel modules do_zstd_ko=true -ifeq ($(series),jammy) +ifeq ($(DEB_DISTRIBUTION),jammy) do_zstd_ko= endif diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 82b035b625fe..84e86ea8c08c 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -34,10 +34,10 @@ $(configs-targets): .PHONY: printenv printenv: @dh_testdir - @echo "src_pkg_name = $(src_pkg_name)" - @echo "series = $(series)" - @echo "release = $(release)" - @echo "revision = $(revision)" + @echo "DEB_SOURCE = $(DEB_SOURCE)" + @echo "DEB_DISTRIBUTION = $(DEB_DISTRIBUTION)" + @echo "DEB_VERSION_UPSTREAM = $(DEB_VERSION_UPSTREAM)" + @echo "DEB_REVISION = $(DEB_REVISION)" @echo "uploadnum = $(uploadnum)" @echo "prev_revision = $(prev_revision)" @echo "abinum = $(abinum)" @@ -96,7 +96,7 @@ printenv: .PHONY: printchanges printchanges: @baseCommit=$$(git log --pretty=format:'%H %s' | \ - gawk '/UBUNTU: '".*Ubuntu-.*`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \ + gawk '/UBUNTU: '".*Ubuntu-.*`echo $(DEB_VERSION_PREV) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \ if [ -z "$$baseCommit" ]; then \ echo "WARNING: couldn't find a commit for the previous version. Using the lastest one." >&2; \ baseCommit=$$(git log --pretty=format:'%H %s' | \ @@ -121,7 +121,7 @@ autoreconstruct: .PHONY: finalchecks finalchecks: debian/control - $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks) + $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(DEB_VERSION_PREV)" $(do_skip_checks) .PHONY: compileselftests compileselftests: diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 137d975f0424..d825644602f7 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -17,7 +17,7 @@ $(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames install -d $(builddir)/build-$* touch $(builddir)/build-$*/ubuntu-build python3 debian/scripts/misc/annotations --export --arch $(arch) --flavour $(target_flavour) > $(builddir)/build-$*/.config - sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' $(builddir)/build-$*/.config + sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)-$* $(raw_kernelversion)"/' $(builddir)/build-$*/.config find $(builddir)/build-$* -name "*.ko" | xargs rm -f $(kmake) O=$(builddir)/build-$* $(conc_level) rustavailable || true $(kmake) O=$(builddir)/build-$* $(conc_level) olddefconfig @@ -87,7 +87,7 @@ $(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-%: signingv = $(CURDIR)/debian/$(bin_pkg_name)-signing/$(DEB_VERSION_UPSTREAM)-$(DEB_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) @@ -164,21 +164,21 @@ endif # - blacklist all watchdog drivers (LP:1432837) # install -d $(pkgdir)/lib/modprobe.d - echo "# Kernel supplied blacklist for $(src_pkg_name) $(abi_release)-$* $(arch)" \ - >$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf + echo "# Kernel supplied blacklist for $(DEB_SOURCE) $(abi_release)-$* $(arch)" \ + >$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf for conf in $(arch)-$* $(arch) common.conf; do \ if [ -f $(DEBIAN)/modprobe.d/$$conf ]; then \ echo "# modprobe.d/$$conf"; \ cat $(DEBIAN)/modprobe.d/$$conf; \ fi; \ - done >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf + done >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf echo "# Autogenerated watchdog blacklist" \ - >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf + >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf ls -1 $(pkgdir)/lib/modules/$(abi_release)-$*/kernel/drivers/watchdog/ | \ grep -v '^bcm2835_wdt$$' | \ sed -e 's/^/blacklist /' -e 's/.ko$$//' | \ sort -u \ - >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf + >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf ifeq ($(do_extras_package),true) # @@ -309,7 +309,7 @@ endif # At the end of the package prep, call the tests DPKG_ARCH="$(arch)" KERN_ARCH="$(build_arch)" FLAVOUR="$*" \ - VERSION="$(abi_release)" REVISION="$(revision)" \ + VERSION="$(abi_release)" REVISION="$(DEB_REVISION)" \ PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)" \ PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \ INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \ @@ -341,42 +341,42 @@ ifeq ($(do_linux_tools),true) # Create the linux-tools tool links install -d $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* ifeq ($(do_tools_usbip),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbip $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbipd $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/usbip $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/usbipd $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif ifeq ($(do_tools_acpidbg),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/acpidbg $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/acpidbg $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif ifeq ($(do_tools_cpupower),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/cpupower $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/cpupower $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif ifeq ($(do_tools_rtla),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/rtla $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/rtla $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif ifeq ($(do_tools_perf),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/perf $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/perf $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* ifeq ($(do_tools_perf_jvmti),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif endif ifeq ($(do_tools_bpftool),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif ifeq ($(do_tools_x86),true) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/x86_energy_perf_policy $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/turbostat $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/x86_energy_perf_policy $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/turbostat $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif endif ifeq ($(do_cloud_tools),true) ifeq ($(do_tools_hyperv),true) # Create the linux-hyperv tool links install -d $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_kvp_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_vss_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_kvp_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_vss_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* ifneq ($(build_arch),arm64) - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_fcopy_uio_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_fcopy_uio_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif - $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/lsvmbus $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* + $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/lsvmbus $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif endif @@ -602,8 +602,8 @@ ifeq ($(do_dbgsym_package),true) # package from being mirrored. It is instead, through some # archive admin hackery, copied to http://ddebs.ubuntu.com. # - mv ../$(dbgpkg)_$(release)-$(revision)_$(arch).deb \ - ../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb + mv ../$(dbgpkg)_$(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)_$(arch).deb \ + ../$(dbgpkg)_$(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)_$(arch).ddeb $(lockme) sed -i '/^$(dbgpkg)_/s/\.deb /.ddeb /' debian/files # Now, the package wont get into the archive, but it will get put # into the debug system. @@ -696,35 +696,35 @@ install-perarch: $(stampdir)/stamp-build-perarch # Add the tools. ifeq ($(do_linux_tools),true) install -d $(toolspkgdir)/usr/lib - install -d $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + install -d $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) ifeq ($(do_tools_usbip),true) install -m755 $(addprefix $(builddirpa)/tools/usb/usbip/bin/sbin/, usbip usbipd) \ - $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif ifeq ($(do_tools_acpidbg),true) install -m755 $(builddirpa)/tools/power/acpi/acpidbg \ - $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif ifeq ($(do_tools_cpupower),true) install -m755 $(builddirpa)/tools/power/cpupower/cpupower \ - $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif ifeq ($(do_tools_rtla),true) install -m755 $(builddirpa)/tools/tracing/rtla/rtla-static \ - $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)/rtla + $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)/rtla endif ifeq ($(do_tools_perf),true) - install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) ifeq ($(do_tools_perf_jvmti),true) - install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif ifeq ($(do_tools_perf_python),true) - install -d $(toolspkgdir)/usr/lib/python3/dist-packages/$(src_pkg_name)-tools-$(abi_release) - install -m755 $(builddirpa)/tools/perf/python/perf*.so $(toolspkgdir)/usr/lib/python3/dist-packages/$(src_pkg_name)-tools-$(abi_release) + install -d $(toolspkgdir)/usr/lib/python3/dist-packages/$(DEB_SOURCE)-tools-$(abi_release) + install -m755 $(builddirpa)/tools/perf/python/perf*.so $(toolspkgdir)/usr/lib/python3/dist-packages/$(DEB_SOURCE)-tools-$(abi_release) endif endif ifeq ($(do_tools_bpftool),true) - install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif ifeq ($(do_tools_bpftool),true) install -d -m755 $(CURDIR)/debian/linux-bpf-dev/usr/include/$(DEB_HOST_MULTIARCH)/linux/ @@ -733,18 +733,18 @@ endif ifeq ($(do_tools_x86),true) install -m755 \ $(addprefix $(builddirpa)/tools/power/x86/, x86_energy_perf_policy/x86_energy_perf_policy turbostat/turbostat) \ - $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif endif ifeq ($(do_cloud_tools),true) ifeq ($(do_tools_hyperv),true) install -d $(cloudpkgdir)/usr/lib - install -d $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + install -d $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) install -m755 $(addprefix $(builddirpa)/tools/hv/, hv_kvp_daemon hv_vss_daemon lsvmbus) \ - $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) ifneq ($(build_arch),arm64) install -m755 $(addprefix $(builddirpa)/tools/hv/, hv_fcopy_uio_daemon) \ - $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) + $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release) endif endif endif diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index d7baf92b2f08..cd48b475cee2 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -31,7 +31,7 @@ ifeq ($(do_flavour_header_package),true) endif $(stamp) -srcpkg = linux-source-$(release) +srcpkg = linux-source-$(DEB_VERSION_UPSTREAM) srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg) balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg) install-source: $(stampdir)/stamp-prepare-indep