Source: linux
Severity: wishlist
Tags: patch
Dear Maintainers,
Building linux-source-X.Y takes about ~10 minutes, and in the context
of a continuous integration build where the result is tested and then
discarded it is only a waste of time.
It would be nice if it where possible to add [packages] source: false to
disable it like for linux-docs, linux-tools etc.
Patch to implement this behaviour is attached. Default is still to build
linux-
source-$version.
Thank you!
Kind regards,
Luca Boccassi
-- System Information:
Debian Release: 8.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500,
'stable'), (104, 'testing'), (103, 'unstable'), (102, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
From 683726c35af4bf289a05b2caa1aa27d4d362e983 Mon Sep 17 00:00:00 2001
From: Luca Boccassi
Date: Thu, 29 Sep 2016 17:49:06 +0100
Subject: [PATCH] Allow to disable source package build via define
Building linux-source-X.Y takes about ~10 minutes, and in the context
of a continous integration build where the result is tested and then
discarded it is only a waste of time.
Allow to add [packages] source: false to disable it like for
linux-docs, linux-tools etc.
---
debian/bin/gencontrol.py | 5 +
debian/rules.real| 2 ++
debian/templates/control.linux-source.in | 15 +++
debian/templates/control.main.in | 15 ---
4 files changed, 22 insertions(+), 15 deletions(-)
create mode 100644 debian/templates/control.linux-source.in
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index 76a1790..9aee13f 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -48,6 +48,7 @@ class Gencontrol(Base):
'installer': config.SchemaItemBoolean(),
'libc-dev': config.SchemaItemBoolean(),
'tools': config.SchemaItemBoolean(),
+'source': config.SchemaItemBoolean(),
}
}
@@ -109,6 +110,8 @@ class Gencontrol(Base):
makeflags['DO_DOCS'] = False
if not self.config.merge('packages').get('tools', True):
makeflags['DO_TOOLS'] = False
+if not self.config.merge('packages').get('source', True):
+makeflags['DO_SOURCE'] = False
super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra)
# linux-source-$UPSTREAMVERSION will contain all kconfig files
@@ -120,6 +123,8 @@ class Gencontrol(Base):
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('source', True):
+
packages.extend(self.process_packages(self.templates["control.linux-source"],
self.vars))
self._substitute_file('lintian-overrides.perf', self.vars,
'debian/linux-perf-%s.lintian-overrides' %
diff --git a/debian/rules.real b/debian/rules.real
index 96411e4..7b83921 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -70,7 +70,9 @@ ifneq ($(DO_DOCS),False)
binary-indep: install-manual
build-indep: $(STAMPS_DIR)/build-doc
endif
+ifneq ($(DO_SOURCE),False)
binary-indep: install-source
+endif
binary-indep: install-support
ifneq ($(DO_TOOLS),False)
diff --git a/debian/templates/control.linux-source.in
b/debian/templates/control.linux-source.in
new file mode 100644
index 000..7ed709d
--- /dev/null
+++ b/debian/templates/control.linux-source.in
@@ -0,0 +1,15 @@
+Package: @source_package@-source-@version@
+Build-Profiles:
+Architecture: all
+Section: kernel
+Depends: binutils, xz-utils, ${misc:Depends}
+Recommends: libc6-dev | libc-dev, gcc, make, bc
+Suggests: libncurses-dev | ncurses-dev, libqt4-dev, pkg-config
+Multi-Arch: foreign
+Description: Linux kernel source for version @version@ with Debian patches
+ This package provides source code for the Linux kernel version @version@.
+ This source closely tracks official Linux kernel releases. Debian's
+ modifications to that source consist of security fixes, bug fixes, and
+ features that have already been (or are believed to be) accepted by the
+ upstream maintainers.
+
diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in
index 80794db..22824b9 100644
--- a/debian/templates/control.main.in
+++ b/debian/templates/control.main.in
@@ -1,18 +1,3 @@
-Package: @source_package@-source-@version@
-Build-Profiles:
-Architecture: all
-Section: kernel
-Depends: binutils, xz-utils, ${misc:Depends}
-Recommends: libc6-dev | libc-dev, gcc, make, bc
-Suggests: libncurses-dev |