From a2e24f00c12d97d53f4674b44caf51e7483206fc Mon Sep 17 00:00:00 2001 From: Juerg Haefliger Date: Wed, 7 Feb 2024 12:15:14 +0100 Subject: [PATCH] UBUNTU: [Packaging] Move indep tools package stubs to debian/control.d BugLink: https://bugs.launchpad.net/bugs/2048183 The following packages may only be built for the main linux source package. Similar to linux-libc-dev, move the packaging stubs to debian/control.d and only include them if the source package name is indeed 'linux': - linux-tools-common - linux-cloud-tools-common - linux-host-tools Also change the package names in the rules to linux-* to further make sure that we don't accidentially build linux--* packages should a derivative's control file contain incorrect package stanzas. Signed-off-by: Juerg Haefliger Signed-off-by: Paolo Pisati --- debian.master/control.stub.in | 35 ------------------- .../control.d/linux-cloud-tools-common.stub | 10 ++++++ debian/control.d/linux-tools-common.stub | 12 +++++++ debian/control.d/linux-tools-host.stub | 9 +++++ debian/rules | 3 ++ debian/rules.d/0-common-vars.mk | 6 ++-- 6 files changed, 37 insertions(+), 38 deletions(-) create mode 100644 debian/control.d/linux-cloud-tools-common.stub create mode 100644 debian/control.d/linux-tools-common.stub create mode 100644 debian/control.d/linux-tools-host.stub diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index 196246b3bc3f..712031ae9116 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -93,19 +93,6 @@ Description: Header files related to Linux kernel version PKGVER that want the latest kernel headers. Please read /usr/share/doc/SRCPKGNAME-headers-PKGVER-ABINUM/debian.README.gz for details -Package: SRCPKGNAME-tools-common -Build-Profiles: -Architecture: all -Multi-Arch: foreign -Section: kernel -Priority: optional -Provides: bpftool -Depends: ${misc:Depends}, lsb-release, hwdata -Description: Linux kernel version specific tools for version PKGVER - This package provides the architecture independent parts for kernel - version locked tools (such as perf and x86_energy_perf_policy) for - version PKGVER. - Package: SRCPKGNAME-tools-PKGVER-ABINUM Build-Profiles: Architecture: amd64 armhf arm64 ppc64el s390x @@ -119,17 +106,6 @@ Description: Linux kernel version specific tools for version PKGVER-ABINUM =HUMAN=. You probably want to install linux-tools-PKGVER-ABINUM-. -Package: SRCPKGNAME-cloud-tools-common -Build-Profiles: -Architecture: all -Multi-Arch: foreign -Section: kernel -Priority: optional -Depends: ${misc:Depends} -Description: Linux kernel version specific cloud tools for version PKGVER - This package provides the architecture independent parts for kernel - version locked tools for cloud tools for version PKGVER. - Package: SRCPKGNAME-cloud-tools-PKGVER-ABINUM Build-Profiles: Architecture: amd64 armhf @@ -141,14 +117,3 @@ Description: Linux kernel version specific cloud tools for version PKGVER-ABINUM version locked tools for cloud tools for version PKGVER-ABINUM on =HUMAN=. You probably want to install linux-cloud-tools-PKGVER-ABINUM-. - -Package: SRCPKGNAME-tools-host -Build-Profiles: -Architecture: all -Multi-Arch: foreign -Section: kernel -Priority: optional -Depends: ${misc:Depends}, python3 -Description: Linux kernel VM host tools - This package provides kernel tools useful for VM hosts. - diff --git a/debian/control.d/linux-cloud-tools-common.stub b/debian/control.d/linux-cloud-tools-common.stub new file mode 100644 index 000000000000..724dab9bef00 --- /dev/null +++ b/debian/control.d/linux-cloud-tools-common.stub @@ -0,0 +1,10 @@ +Package: linux-cloud-tools-common +Build-Profiles: +Architecture: all +Multi-Arch: foreign +Section: kernel +Priority: optional +Depends: ${misc:Depends} +Description: Linux kernel version specific cloud tools for version PKGVER + This package provides the architecture independent parts for kernel + version locked tools for cloud tools for version PKGVER. diff --git a/debian/control.d/linux-tools-common.stub b/debian/control.d/linux-tools-common.stub new file mode 100644 index 000000000000..575897a6bf59 --- /dev/null +++ b/debian/control.d/linux-tools-common.stub @@ -0,0 +1,12 @@ +Package: linux-tools-common +Build-Profiles: +Architecture: all +Multi-Arch: foreign +Section: kernel +Priority: optional +Provides: bpftool +Depends: ${misc:Depends}, lsb-release, hwdata +Description: Linux kernel version specific tools for version PKGVER + This package provides the architecture independent parts for kernel + version locked tools (such as perf and x86_energy_perf_policy) for + version PKGVER. diff --git a/debian/control.d/linux-tools-host.stub b/debian/control.d/linux-tools-host.stub new file mode 100644 index 000000000000..f2ea6a9f7fff --- /dev/null +++ b/debian/control.d/linux-tools-host.stub @@ -0,0 +1,9 @@ +Package: linux-tools-host +Build-Profiles: +Architecture: all +Multi-Arch: foreign +Section: kernel +Priority: optional +Depends: ${misc:Depends}, python3 +Description: Linux kernel VM host tools + This package provides kernel tools useful for VM hosts. diff --git a/debian/rules b/debian/rules index f7d3c10a0bad..a3bab395fb49 100755 --- a/debian/rules +++ b/debian/rules @@ -160,6 +160,9 @@ include $(DROOT)/rules.d/4-checks.mk control_files := $(DEBIAN)/control.stub.in ifeq ($(src_pkg_name),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 + control_files += debian/control.d/linux-tools-host.stub endif # Calculate Ubuntu Compatible Signing levels diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 8186268746ea..46eca410341c 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -138,12 +138,12 @@ else do_tools?=false endif tools_pkg_name=$(src_pkg_name)-tools-$(abi_release) -tools_common_pkg_name=$(src_pkg_name)-tools-common +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_common_pkg_name=$(src_pkg_name)-cloud-tools-common +cloud_common_pkg_name=linux-cloud-tools-common cloud_flavour_pkg_name=linux-cloud-tools-$(abi_release) -hosttools_pkg_name=$(src_pkg_name)-tools-host +hosttools_pkg_name=linux-tools-host # The general flavour specific image package. do_flavour_image_package=true