From d5fa98077e83448fe31eec2f457883928c399997 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 10 Jun 2012 02:14:51 +0000 Subject: [PATCH] linux-source: Add single patch for each featureset svn path=/dists/sid/linux/; revision=19114 --- debian/changelog | 1 + debian/lib/python/debian_linux/gencontrol.py | 2 ++ debian/rules.real | 33 ++++++++++++++------ debian/templates/control.source.in | 2 +- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index efad323ba..168e100ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,7 @@ linux (3.2.19-2) UNRELEASED; urgency=low * NFSv4: Reduce the footprint of the idmapper (Closes: #657078) * [i386] thp: avoid atomic64_read in pmd_read_atomic for 32bit PAE (Closes: #676360) + * linux-source: Add single patch for each featureset [ Bastian Blank ] * [s390/s390x,s390x/s390x] Build debugging symbols. diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index 389af7027..b10dfadba 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -114,6 +114,8 @@ class Gencontrol(object): pass def do_main_makefile(self, makefile, makeflags, extra): + makeflags = makeflags.copy() + makeflags['ALL_FEATURESETS'] = ' '.join(self.config['base', ]['featuresets']) makefile.add('binary-indep', cmds=["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags]) def do_main_packages(self, packages, vars, makeflags, extra): diff --git a/debian/rules.real b/debian/rules.real index d2915a890..ead7b8e8c 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -73,6 +73,16 @@ $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2: $(STAMPS_DIR)/source cd '$(BUILD_DIR)'; tar -cjf 'linux-source-$(UPSTREAMVERSION).tar.bz2' 'linux-source-$(UPSTREAMVERSION)' rm -rf '$(DIR)' +$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-%.patch.bz2: $(STAMPS_DIR)/source_none $(STAMPS_DIR)/source_% + set -o pipefail; \ + (cd '$(BUILD_DIR)'; \ + set +e; \ + diff -urN -p -x debian -x .pc -x .svk -x .svn source_none source_$*; \ + test $$? -eq 1) | \ + filterdiff --remove-timestamps --strip=1 --addoldprefix=a/ --addnewprefix=b/ | \ + bzip2 -c >$@ || \ + (rm -f $@; exit 1) + define patch_cmd cd '$(DIR)' && QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_SERIES=series-$(1) quilt push --quiltrc - -a -q --fuzz=0 endef @@ -82,17 +92,20 @@ $(STAMPS_DIR)/source: set +e; quilt unapplied --quiltrc - >/dev/null && echo 'Patch series not fully applied'; test $$? -eq 1 @$(stamp) -$(STAMPS_DIR)/source_$(FEATURESET): SOURCE_DIR=$(BUILD_DIR)/source -$(STAMPS_DIR)/source_$(FEATURESET): DIR=$(BUILD_DIR)/source_$(FEATURESET) -$(STAMPS_DIR)/source_$(FEATURESET): $(STAMPS_DIR)/source +$(STAMPS_DIR)/source_%: SOURCE_DIR=$(BUILD_DIR)/source +$(STAMPS_DIR)/source_%: DIR=$(BUILD_DIR)/source_$* +$(STAMPS_DIR)/source_%: $(STAMPS_DIR)/source mkdir -p '$(BUILD_DIR)' rm -rf '$(DIR)' -ifeq ($(FEATURESET),none) - ln -s '$(CURDIR)' '$(DIR)' -else $(call copy_source,$(DIR)) - $(call patch_cmd,$(FEATURESET)) -endif + $(call patch_cmd,$*) + @$(stamp) +.PRECIOUS: $(STAMPS_DIR)/source_% + +$(STAMPS_DIR)/source_none: DIR=$(BUILD_DIR)/source_none +$(STAMPS_DIR)/source_none: $(STAMPS_DIR)/source + rm -f '$(DIR)' + ln -s '$(CURDIR)' '$(DIR)' @$(stamp) $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): CONFIG=$(BUILD_DIR)/config.$(ARCH)_$(FEATURESET)_$(FLAVOUR) @@ -474,10 +487,10 @@ install-udeb_$(ARCH): dh_builddeb install-source: DH_OPTIONS = -plinux-source-$(VERSION) -install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2 +install-source: $(BUILD_DIR)/linux-source-$(UPSTREAMVERSION).tar.bz2 $(foreach FEATURESET,$(filter-out none,$(ALL_FEATURESETS)),$(BUILD_DIR)/linux-patch-$(UPSTREAMVERSION)-$(FEATURESET).patch.bz2) dh_testdir dh_testroot - dh_install '$<' /usr/src + dh_install '$^' /usr/src +$(MAKE_SELF) install-base # vim: filetype=make diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 8bc6b65e3..e1161eedf 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Frederik Schüler , maximilian attems , Ben Hutchings 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 +Build-Depends: debhelper (>> 7), cpio, kmod | module-init-tools, python (>= 2.6.6-3~), lzma [armel], kernel-wedge (>= 2.84), quilt, patchutils 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/