[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#695243: linux: Add stage1 build-profile support for bootstrapping



Package: linux
Version: linux-3.6.4-1~experimental.1
Severity: wishlist
Tags: experimental patch

In order to bootstrap a new architecture, a cross-toolchain must be
built. A suitable linux-libc-dev_$arch package is needed for this. In
order to make this (and cross-toolchain builds in general)
automatable, the packaging needs to be able to build just this package.

The attached patch provides this functionality.

It also includes notation for the corresponding reduction in needed
build-dependencies which is an important part of the automation.
However this part of the patch cannot be applied until dpkg build-dep
parsing is updated to not choke on this. Action on this is pending
further discussion of #661538

In the meantime the packaging changes in the rules file are worth
having on their own as they allow the staged build functionality (just
using dpkg-buildpackage -d to ignore the missing build-deps)

-- System Information:
Debian Release: 6.0.6
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.33-kvm-i386-20111128-dirty (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
\ No newline at end of file
--- linux-3.6.4/debian/control	2012-11-15 11:56:31.000000000 +0000
+++ linux-3.6.4/debian/control	2012-12-04 02:23:27.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
 Uploaders: Bastian Blank <waldi@debian.org>, Frederik Schüler <fs@debian.org>, maximilian attems <maks@debian.org>, Ben Hutchings <ben@decadent.org.uk>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>> 7), cpio, kmod | module-init-tools, python (>= 2.6.6-3~), lzma [armel], kernel-wedge (>= 2.84), quilt, patchutils, gcc-4.6 [alpha amd64 armel armhf i386 ia64 m68k mips mipsel powerpc ppc64 s390 s390x sh4 sparc sparc64], gcc-4.4 [hppa], binutils-hppa64 [hppa], gcc-4.4-hppa64 [hppa]
+Build-Depends: debhelper (>> 7), cpio <!stage1>, kmod <!stage1> | module-init-tools <!stage1>, python (>= 2.6.6-3~), lzma [armel], kernel-wedge (>= 2.84) <!stage1>, quilt, patchutils, gcc-4.7 [arm64] <!stage1>, gcc-4.6 [alpha amd64 armel armhf i386 ia64 m68k mips mipsel powerpc ppc64 s390 s390x sh4 sparc sparc64], gcc-4.4 [hppa], binutils-hppa64 [hppa], gcc-4.4-hppa64 [hppa]
 Build-Depends-Indep: bzip2, xmlto
 Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux/
 Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/
--- linux-3.6.4/debian/rules	2012-11-15 11:56:30.000000000 +0000
+++ linux-3.6.4/debian/rules	2012-12-04 02:13:41.000000000 +0000
@@ -34,18 +34,30 @@
 
 build: build-arch build-indep
 
+#for stage1 don't try to do base setup - just build the libc-headers 
+ifneq (,$(filter stage1,$(DEB_BUILD_PROFILE)))
+
+build-arch: debian/control
+
+build-indep: debian/control
+
+else
+
 build-arch: debian/control $(STAMPS_DIR)/build-arch-base
-$(STAMPS_DIR)/build-arch-base: $(STAMPS_DIR)/setup-base
+$(STAMPS_DIR)/build-arch-base: $(STAMPS_DIR)/setup-base 
 	dh_testdir
 	$(MAKE) -f debian/rules.gen build-arch_$(DEB_HOST_ARCH)
 	@$(stamp)
 
+
 build-indep: debian/control $(STAMPS_DIR)/build-indep-base
 $(STAMPS_DIR)/build-indep-base: $(STAMPS_DIR)/setup-base
 	dh_testdir
 	$(MAKE) -f debian/rules.gen build-indep
 	@$(stamp)
 
+endif
+
 DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM)
 TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.xz
 TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
@@ -75,10 +87,20 @@
 	dh_testdir
 	$(MAKE) -f debian/rules.gen binary-indep
 
+#for stage1 don't try to do base setup - just build the libc-headers 
+ifneq (,$(filter stage1,$(DEB_BUILD_PROFILE)))
+binary-arch:
+	dh_testdir
+	$(MAKE) -f debian/rules.gen binary-libc-dev_$(DEB_HOST_ARCH)
+
+else
+
 binary-arch: $(STAMPS_DIR)/build-arch-base
 	dh_testdir
 	$(MAKE) -f debian/rules.gen binary-arch_$(DEB_HOST_ARCH)
 
+endif
+
 binary:	binary-indep binary-arch
 
 CONTROL_FILES = debian/changelog $(wildcard debian/templates/*.in)

Reply to: