Add build profile and config/defines for disabling linux-source

Add a new "pkg.linux.nosource" to let users disable building the
linux-source-* package, and allow to set "source: false" to modify
the default behaviour when no rofile is used.
When doing development builds this can save up to 15 minutes of build
time, especially on IO-strapped build workers.
This commit is contained in:
Luca Boccassi 2018-05-08 18:34:58 +01:00
parent 923552dcc8
commit b3be450737
4 changed files with 12 additions and 2 deletions

View File

@ -48,6 +48,7 @@ class Gencontrol(Base):
'libc-dev': config.SchemaItemBoolean(),
'tools-unversioned': config.SchemaItemBoolean(),
'tools-versioned': config.SchemaItemBoolean(),
'source': config.SchemaItemBoolean(),
}
}
@ -111,6 +112,8 @@ 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('source', True):
makeflags['DO_SOURCE'] = False
super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra)
# linux-source-$UPSTREAMVERSION will contain all kconfig files

3
debian/changelog vendored
View File

@ -3,6 +3,9 @@ linux (4.17~rc3-1~exp2) UNRELEASED; urgency=medium
[ Luca Boccassi ]
* Disable building linux-doc-* and tools documentation when the "nodoc"
build profile is used.
* Add new "pkg.linux.nosource" build profile that disables building the
linux-source-* package, and a "[packages] source" option for the
debian/config/defines file that defines the default behaviour.
[ John Paul Adrian Glaubitz ]
* [m68k] Enable CONFIG_PATA_GAYLE as module.

6
debian/rules.real vendored
View File

@ -71,7 +71,11 @@ ifneq ($(DO_DOCS),False)
build-indep: $(STAMPS_DIR)/build-doc
endif
endif
binary-indep: install-source
ifeq (,$(filter pkg.linux.nosource,$(DEB_BUILD_PROFILES)))
ifneq ($(DO_SOURCE),False)
binary-indep: install-source
endif
endif
binary-indep: install-support
ifneq ($(DO_TOOLS_VERSIONED),False)

View File

@ -1,5 +1,5 @@
Package: @source_basename@-source-@version@
Build-Profiles: <!stage1>
Build-Profiles: <!stage1 !pkg.linux.nosource>
Architecture: all
Section: kernel
Depends: binutils, xz-utils, ${misc:Depends}