diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index d4ab808e8..597926c55 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -46,7 +46,8 @@ class Gencontrol(Base): 'headers-all': config.SchemaItemBoolean(), 'installer': config.SchemaItemBoolean(), 'libc-dev': config.SchemaItemBoolean(), - 'tools': config.SchemaItemBoolean(), + 'tools-unversioned': config.SchemaItemBoolean(), + 'tools-versioned': config.SchemaItemBoolean(), } } @@ -106,8 +107,10 @@ class Gencontrol(Base): makeflags['ALL_TRIPLETS'] = ' '.join(triplet_enabled) if not self.config.merge('packages').get('docs', True): makeflags['DO_DOCS'] = False - if not self.config.merge('packages').get('tools', True): - makeflags['DO_TOOLS'] = False + if not self.config.merge('packages').get('tools-unversioned', True): + makeflags['DO_TOOLS_UNVERSIONED'] = False + if not self.config.merge('packages').get('tools-versioned', True): + makeflags['DO_TOOLS_VERSIONED'] = False super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra) # linux-source-$UPSTREAMVERSION will contain all kconfig files @@ -117,8 +120,10 @@ class Gencontrol(Base): packages.extend(self.process_packages(self.templates["control.main"], self.vars)) if self.config.merge('packages').get('docs', True): packages.extend(self.process_packages(self.templates["control.docs"], self.vars)) - if self.config.merge('packages').get('tools', True): - packages.extend(self.process_packages(self.templates["control.tools"], self.vars)) + if self.config.merge('packages').get('tools-unversioned', True): + packages.extend(self.process_packages(self.templates["control.tools-unversioned"], self.vars)) + if self.config.merge('packages').get('tools-versioned', True): + packages.extend(self.process_packages(self.templates["control.tools-versioned"], self.vars)) self._substitute_file('perf.lintian-overrides', self.vars, 'debian/linux-perf-%s.lintian-overrides' % diff --git a/debian/changelog b/debian/changelog index 94e1ff2e5..eeb360bcd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ linux (4.17~rc2-1~exp1) UNRELEASED; urgency=medium * Documentation: Update references to drivers/base/firmware_class.c * [armhf] Enable MTD_NAND_MARVELL as module, replacing MTD_NAND_PXA3xx * linux-kbuild: Update genksyms makefile to run flex and bison + * Add support for building only versioned tools packages [ Luca Boccassi ] * Build-Dep on libelf-dev even for nopython/notools builds to fix FTBFS, diff --git a/debian/rules.real b/debian/rules.real index d0ca7843f..9596a945b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -74,18 +74,21 @@ endif binary-indep: install-source binary-indep: install-support -ifneq ($(DO_TOOLS),False) +ifneq ($(DO_TOOLS_VERSIONED),False) build-arch-arch: $(STAMPS_DIR)/build-tools - binary-arch-arch: install-kbuild install-usbip install-liblockdep install-cpupower + binary-arch-arch: install-kbuild install-liblockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_HOST_ARCH)),) ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),) binary-arch-arch: install-perf endif endif + binary-indep: install-lockdep +endif +ifneq ($(DO_TOOLS_UNVERSIONED),False) + binary-arch-arch: install-usbip install-cpupower ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) binary-arch-arch: install-hyperv-daemons endif - binary-indep: install-lockdep endif binary-indep-featureset: install-common-headers_$(FEATURESET) diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools-unversioned.in similarity index 53% rename from debian/templates/control.tools.in rename to debian/templates/control.tools-unversioned.in index c534607e6..72f97ff74 100644 --- a/debian/templates/control.tools.in +++ b/debian/templates/control.tools-unversioned.in @@ -1,11 +1,3 @@ -Package: linux-kbuild-@version@ -Build-Profiles: -Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends} -Multi-Arch: foreign -Description: Kbuild infrastructure for Linux @version@ - This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. - Package: linux-cpupower Build-Profiles: Section: admin @@ -37,23 +29,6 @@ Replaces: libcpufreq-dev Description: CPU frequency and voltage scaling tools for Linux (development files) This package contains the 'power/cpupower' headers and library shared objects. -Package: linux-perf-@version@ -Build-Profiles: -Section: devel -Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} -Recommends: linux-base -Provides: linux-tools-@version@ -Conflicts: linux-tools-@version@ -Replaces: linux-tools-@version@ -Suggests: linux-doc-@version@ -Description: Performance analysis tools for Linux @version@ - This package contains the 'perf' performance analysis tools for Linux - kernel version @version@. - . - The linux-base package contains a 'perf' command which will invoke the - appropriate version for the running kernel. - Package: usbip Build-Profiles: Architecture: linux-any @@ -95,34 +70,3 @@ Description: Support daemons for Linux running on Hyper-V . hv_vss_daemon provides the volume shadow copy service (VSS), allowing the host to freeze the guest filesystems while taking a snapshot. - -Package: lockdep -Build-Profiles: -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ -Recommends: liblockdep-dev -Section: devel -Multi-Arch: allowed -Description: Runtime locking correctness validator - lockdep is a wrapper for programs that use the pthreads API, which detects - actual and potential deadlocks and other locking bugs. - -Package: liblockdep@version@ -Build-Profiles: -Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends} -Section: libs -Multi-Arch: same -Description: Runtime locking correctness validator (shared library) - liblockdep is a library for programs that use the pthreads API, which can - be used to detect actual and potential deadlocks and other locking bugs. - -Package: liblockdep-dev -Build-Profiles: -Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ (= ${binary:Version}) -Section: libdevel -Multi-Arch: same -Description: Runtime locking correctness validator (development files) - liblockdep is a library for programs that use the pthreads API, which can - be used to detect actual and potential deadlocks and other locking bugs. diff --git a/debian/templates/control.tools-versioned.in b/debian/templates/control.tools-versioned.in new file mode 100644 index 000000000..fa2491a81 --- /dev/null +++ b/debian/templates/control.tools-versioned.in @@ -0,0 +1,55 @@ +Package: linux-kbuild-@version@ +Build-Profiles: +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: foreign +Description: Kbuild infrastructure for Linux @version@ + This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. + +Package: linux-perf-@version@ +Build-Profiles: +Section: devel +Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} +Recommends: linux-base +Provides: linux-tools-@version@ +Conflicts: linux-tools-@version@ +Replaces: linux-tools-@version@ +Suggests: linux-doc-@version@ +Description: Performance analysis tools for Linux @version@ + This package contains the 'perf' performance analysis tools for Linux + kernel version @version@. + . + The linux-base package contains a 'perf' command which will invoke the + appropriate version for the running kernel. + +Package: lockdep +Build-Profiles: +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ +Recommends: liblockdep-dev +Section: devel +Multi-Arch: allowed +Description: Runtime locking correctness validator + lockdep is a wrapper for programs that use the pthreads API, which detects + actual and potential deadlocks and other locking bugs. + +Package: liblockdep@version@ +Build-Profiles: +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: libs +Multi-Arch: same +Description: Runtime locking correctness validator (shared library) + liblockdep is a library for programs that use the pthreads API, which can + be used to detect actual and potential deadlocks and other locking bugs. + +Package: liblockdep-dev +Build-Profiles: +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ (= ${binary:Version}) +Section: libdevel +Multi-Arch: same +Description: Runtime locking correctness validator (development files) + liblockdep is a library for programs that use the pthreads API, which can + be used to detect actual and potential deadlocks and other locking bugs.