[linux] 04/07: debian/control, debian/rules: Support a 'stage1' build profile (Closes: #695243)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Tue Nov 10 13:53:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit be6de683ed4160182465d35a1ab9b299ec996f47
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Tue Nov 10 13:25:18 2015 +0000

    debian/control,debian/rules: Support a 'stage1' build profile (Closes: #695243)
    
    This builds only linux-libc-dev, needed by native compilers.
---
 debian/bin/gencontrol.py                          | 11 ++++++++++-
 debian/changelog                                  |  2 ++
 debian/config/defines                             | 10 +++++-----
 debian/config/hppa/defines                        |  2 +-
 debian/rules                                      | 11 +++++++++++
 debian/templates/control.extra.in                 |  3 +++
 debian/templates/control.headers.arch.in          |  2 ++
 debian/templates/control.headers.featureset.in    |  1 +
 debian/templates/control.headers.in               |  1 +
 debian/templates/control.image-dbg.in             |  1 +
 debian/templates/control.image.type-plain.in      |  1 +
 debian/templates/control.image.type-standalone.in |  1 +
 debian/templates/control.main.in                  |  4 ++++
 debian/templates/control.source.in                |  5 +++--
 debian/templates/control.xen-linux-system.in      |  1 +
 15 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index a7dea7d..e1881d0 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -154,7 +154,7 @@ class Gencontrol(Base):
         cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-arch %s" % makeflags]
         makefile.add('binary-arch_%s_real' % arch, cmds=cmds_binary_arch)
 
-        # Shortcut to aid architecture bootstrapping
+        # For stage1 build profile
         makefile.add('binary-libc-dev_%s' % arch,
                      ['source_none_real'],
                      ["$(MAKE) -f debian/rules.real install-libc-dev_%s %s" %
@@ -187,6 +187,10 @@ class Gencontrol(Base):
                     raise RuntimeError('kernel-wedge exited with code %d' %
                                        kw_proc.returncode)
 
+                # kernel-wedge currently chokes on Build-Profiles so add it now
+                for package in udeb_packages:
+                    package['Build-Profiles'] = '<!stage1>'
+
                 self.merge_packages(packages, udeb_packages, arch)
 
                 # These packages must be built after the per-flavour/
@@ -265,9 +269,14 @@ class Gencontrol(Base):
 
         compiler = config_entry_base.get('compiler', 'gcc')
 
+        # Work out dependency from linux-headers to compiler.  Strip
+        # restrictions, as they don't apply to binary Depends.
         relations_compiler_headers = PackageRelation(
             config_entry_relations.get('headers%' + compiler) or
             config_entry_relations.get(compiler))
+        for group in relations_compiler_headers:
+            for entry in group:
+                entry.restrictions = []
 
         relations_compiler_build_dep = PackageRelation(config_entry_relations[compiler])
         for group in relations_compiler_build_dep:
diff --git a/debian/changelog b/debian/changelog
index 04cfc83..1ee1032 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ linux (4.3-1~exp2) UNRELEASED; urgency=medium
   * mv643xx_eth: Re-enable TSO, fixed upstream in 4.3
   * debian/control: Move patchutils from Build-Depends to Build-Depends-Indep,
     as we only use filterdiff when building linux-source-<version>
+  * debian/control,debian/rules: Support a 'stage1' build profile which
+    builds only linux-libc-dev (Closes: #695243)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sat, 07 Nov 2015 14:18:48 +0000
 
diff --git a/debian/config/defines b/debian/config/defines
index 9944def..d16b107 100644
--- a/debian/config/defines
+++ b/debian/config/defines
@@ -46,11 +46,11 @@ type: plain
 
 [relations]
 # compilers
-gcc-4.6: gcc-4.6
-gcc-4.7: gcc-4.7
-gcc-4.8: gcc-4.8
-gcc-4.9: gcc-4.9
-gcc-5: gcc-5
+gcc-4.6: gcc-4.6 <!stage1>
+gcc-4.7: gcc-4.7 <!stage1>
+gcc-4.8: gcc-4.8 <!stage1>
+gcc-4.9: gcc-4.9 <!stage1>
+gcc-5: gcc-5 <!stage1>
 
 # initramfs-generators
 initramfs-fallback: linux-initramfs-tool
diff --git a/debian/config/hppa/defines b/debian/config/hppa/defines
index 4899189..b857202 100644
--- a/debian/config/hppa/defines
+++ b/debian/config/hppa/defines
@@ -22,5 +22,5 @@ hardware: multiprocessor 64-bit PA-RISC
 hardware-long: HP PA-RISC 64-bit SMP systems with support for more than 4 GB RAM
 
 [relations]
-gcc-4.9: gcc-4.9, binutils-hppa64, gcc-4.9-hppa64
+gcc-4.9: gcc-4.9 <!stage1>, binutils-hppa64 <!stage1>, gcc-4.9-hppa64 <!stage1>
 
diff --git a/debian/rules b/debian/rules
index d0f9a0a..87713ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,7 @@ endif
 ifdef DEBIAN_KERNEL_JOBS
   MAKEFLAGS += -j$(DEBIAN_KERNEL_JOBS)
 endif
+BUILD_STAGE1 := $(filter stage1,$(DEB_BUILD_PROFILES))
 
 .NOTPARALLEL:
 
@@ -30,21 +31,31 @@ build: build-arch build-indep
 
 build-arch: debian/control
 	dh_testdir
+ifndef BUILD_STAGE1
 	$(MAKE) -f debian/rules.gen build-arch_$(DEB_HOST_ARCH)
+endif
 
 build-indep: debian/control
 	dh_testdir
+ifndef BUILD_STAGE1
 	$(MAKE) -f debian/rules.gen build-indep
+endif
 
 binary:	binary-indep binary-arch
 
 binary-arch:
 	dh_testdir
+ifdef BUILD_STAGE1
+	$(MAKE) -f debian/rules.gen binary-libc-dev_$(DEB_HOST_ARCH)
+else
 	$(MAKE) -f debian/rules.gen binary-arch_$(DEB_HOST_ARCH)
+endif
 
 binary-indep:
 	dh_testdir
+ifndef BUILD_STAGE1
 	$(MAKE) -f debian/rules.gen binary-indep
+endif
 
 DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM)
 TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.xz
diff --git a/debian/templates/control.extra.in b/debian/templates/control.extra.in
index 8841020..db857b4 100644
--- a/debian/templates/control.extra.in
+++ b/debian/templates/control.extra.in
@@ -1,4 +1,5 @@
 Package: linux-compiler-gcc-4.9-arm
+Build-Profiles: <!stage1>
 Depends: gcc-4.9, ${misc:Depends}
 Architecture: armel armhf
 Multi-Arch: foreign
@@ -7,6 +8,7 @@ Description: Compiler for Linux on ARM (meta-package)
  Linux on armel and armhf.
 
 Package: linux-compiler-gcc-4.8-s390
+Build-Profiles: <!stage1>
 Depends: gcc-4.8, ${misc:Depends}
 Architecture: s390 s390x
 Multi-Arch: foreign
@@ -15,6 +17,7 @@ Description: Compiler for Linux on IBM zSeries (meta-package)
  Linux on s390 and s390x.
 
 Package: linux-compiler-gcc-5-x86
+Build-Profiles: <!stage1>
 Depends: gcc-5, ${misc:Depends}
 Architecture: amd64 i386 x32
 Multi-Arch: foreign
diff --git a/debian/templates/control.headers.arch.in b/debian/templates/control.headers.arch.in
index d209d96..75bfd50 100644
--- a/debian/templates/control.headers.arch.in
+++ b/debian/templates/control.headers.arch.in
@@ -1,4 +1,5 @@
 Package: linux-headers- at abiname@-all
+Build-Profiles: <!stage1>
 Depends: linux-headers- at abiname@-all-${kernel:Arch} (= ${binary:Version}), ${misc:Depends}
 Description: All header files for Linux @version@ (meta-package)
  This package depends against all architecture-specific kernel header files
@@ -6,6 +7,7 @@ Description: All header files for Linux @version@ (meta-package)
  kernel modules.
 
 Package: linux-headers- at abiname@-all- at arch@
+Build-Profiles: <!stage1>
 Depends: ${misc:Depends}
 Description: All header files for Linux @version@ (meta-package)
  This package depends against all architecture-specific kernel header files
diff --git a/debian/templates/control.headers.featureset.in b/debian/templates/control.headers.featureset.in
index d3f9dfd..f185e77 100644
--- a/debian/templates/control.headers.featureset.in
+++ b/debian/templates/control.headers.featureset.in
@@ -1,4 +1,5 @@
 Package: linux-headers- at abiname@-common at localversion_headers@
+Build-Profiles: <!stage1>
 Depends: ${misc:Depends}
 Description: Common header files for Linux @abiname@@localversion_headers@
  This package provides the architecture-specific common kernel header files
diff --git a/debian/templates/control.headers.in b/debian/templates/control.headers.in
index 060faff..e399b8f 100644
--- a/debian/templates/control.headers.in
+++ b/debian/templates/control.headers.in
@@ -1,4 +1,5 @@
 Package: linux-headers- at abiname@@localversion@
+Build-Profiles: <!stage1>
 Depends: linux-headers- at abiname@-common at localversion_headers@ (= ${binary:Version}), linux-kbuild- at version@, ${misc:Depends}
 Description: Header files for Linux @abiname@@localversion@
  This package provides the architecture-specific kernel header files
diff --git a/debian/templates/control.image-dbg.in b/debian/templates/control.image-dbg.in
index 1c067f6..39cbe9c 100644
--- a/debian/templates/control.image-dbg.in
+++ b/debian/templates/control.image-dbg.in
@@ -1,4 +1,5 @@
 Package: linux-image- at abiname@@localversion at -dbg
+Build-Profiles: <!stage1>
 Depends: ${misc:Depends}
 Section: debug
 Priority: extra
diff --git a/debian/templates/control.image.type-plain.in b/debian/templates/control.image.type-plain.in
index d8213bf..38f5769 100644
--- a/debian/templates/control.image.type-plain.in
+++ b/debian/templates/control.image.type-plain.in
@@ -1,4 +1,5 @@
 Package: linux-image- at abiname@@localversion@
+Build-Profiles: <!stage1>
 Provides: linux-modules- at abiname@@localversion@
 Pre-Depends: debconf | debconf-2.0
 Depends: kmod, linux-base (>= 3~), ${misc:Depends}
diff --git a/debian/templates/control.image.type-standalone.in b/debian/templates/control.image.type-standalone.in
index 1c99d6e..8e132b6 100644
--- a/debian/templates/control.image.type-standalone.in
+++ b/debian/templates/control.image.type-standalone.in
@@ -1,4 +1,5 @@
 Package: linux-image- at abiname@@localversion@
+Build-Profiles: <!stage1>
 Provides: linux-image
 Suggests: linux-doc- at version@
 Depends: ${misc:Depends}
diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in
index 545617d..a2c28ba 100644
--- a/debian/templates/control.main.in
+++ b/debian/templates/control.main.in
@@ -1,4 +1,5 @@
 Package: linux-source- at version@
+Build-Profiles: <!stage1>
 Architecture: all
 Section: kernel
 Depends: binutils, xz-utils, ${misc:Depends}
@@ -13,6 +14,7 @@ Description: Linux kernel source for version @version@ with Debian patches
  upstream maintainers.
 
 Package: linux-doc- at version@
+Build-Profiles: <!stage1>
 Architecture: all
 Depends: ${misc:Depends}
 Section: doc
@@ -26,6 +28,7 @@ Description: Linux kernel specific documentation for version @version@
  for the detailed description of the contents.
 
 Package: linux-manual- at version@
+Build-Profiles: <!stage1>
 Architecture: all
 Depends: ${misc:Depends}
 Section: doc
@@ -44,6 +47,7 @@ Description: Linux kernel API manual pages for version @version@
  documentation in other formats is free from such restriction.
 
 Package: linux-support- at abiname@
+Build-Profiles: <!stage1>
 Architecture: all
 Section: devel
 Depends: ${python3:Depends}, ${misc:Depends}
diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in
index c791bb0..6152aed 100644
--- a/debian/templates/control.source.in
+++ b/debian/templates/control.source.in
@@ -3,8 +3,9 @@ Priority: optional
 Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
 Uploaders: Bastian Blank <waldi at debian.org>, maximilian attems <maks at debian.org>, Ben Hutchings <ben at decadent.org.uk>
 Standards-Version: 3.9.5
-Build-Depends: debhelper, cpio, kmod, python3, xz-utils, kernel-wedge, quilt, bc
-Build-Depends-Indep: patchutils, xmlto
+Build-Depends: debhelper, python3, quilt,
+ cpio <!stage1>, kmod <!stage1>, xz-utils <!stage1>, kernel-wedge <!stage1>, bc <!stage1>
+Build-Depends-Indep: patchutils <!stage1>, xmlto <!stage1>
 Vcs-Git: https://anonscm.debian.org/git/kernel/linux.git
 Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux.git
 Homepage: https://www.kernel.org/
diff --git a/debian/templates/control.xen-linux-system.in b/debian/templates/control.xen-linux-system.in
index d60a2ee..c30da13 100644
--- a/debian/templates/control.xen-linux-system.in
+++ b/debian/templates/control.xen-linux-system.in
@@ -1,4 +1,5 @@
 Package: xen-linux-system- at abiname@@localversion@
+Build-Profiles: <!stage1>
 Section: metapackages
 Depends: linux-image- at abiname@@localversion@ (= ${binary:Version}), ${misc:Depends}
 Description: Xen system with Linux @upstreamversion@ on @class@ (meta-package)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list