diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-07-20 14:57:38 +0200 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-07-20 14:57:38 +0200 |
commit | db7f1f090c5a8215c51f8cc3b3ea7a397d3f5e00 (patch) | |
tree | 648e26b5ce4c5c6be6256d09274a169f7252b77d | |
parent | 9b569f7e01f8e7fff1e0f9366583be2eceb6bab2 (diff) | |
parent | e712dd425baf34331b6e16d2434311c1007b379d (diff) | |
download | debianrt-kbuild-db7f1f090c5a8215c51f8cc3b3ea7a397d3f5e00.tar.gz debianrt-kbuild-db7f1f090c5a8215c51f8cc3b3ea7a397d3f5e00.tar.xz |
Merge branch 'origin' into debian-pristine-kbuild-2.6.33-rc8-rt1
Conflicts:
debian/changelog
debian/templates/control.source.in
-rwxr-xr-x | debian/bin/gencontrol.py | 2 | ||||
-rwxr-xr-x | debian/bin/genorig.py | 67 | ||||
-rw-r--r-- | debian/changelog | 33 | ||||
-rwxr-xr-x | debian/rules | 10 | ||||
-rw-r--r-- | debian/rules.real | 3 | ||||
-rw-r--r-- | scripts/Makefile | 4 |
6 files changed, 88 insertions, 31 deletions
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 2fdcdfd..c1a8a60 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys sys.path.append("debian/lib/python") diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index e01ca97..8c836bf 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -3,15 +3,19 @@ import sys sys.path.append("debian/lib/python") -import os, os.path, re, shutil +import os +import os.path +import re +import shutil +import subprocess + from debian_linux.debian import Changelog, VersionLinux class Main(object): - def __init__(self, input_tar, input_patch, override_version): + def __init__(self, input_files, override_version): self.log = sys.stdout.write - self.input_tar = input_tar - self.input_patch = input_patch + self.input_files = input_files changelog = Changelog(version = VersionLinux)[0] source = changelog.source @@ -24,37 +28,56 @@ class Main(object): self.orig = '%s-%s' % (source, version.upstream) self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream) + self.tag = 'v' + version.upstream.replace('~', '-') def __call__(self): import tempfile self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian') try: - self.upstream_extract() - self.upstream_patch() + if os.path.isdir(self.input_files[0]): + self.upstream_export(self.input_files[0]) + else: + self.upstream_extract(self.input_files[0]) + if len(self.input_files) > 1: + self.upstream_patch(self.input_files[1]) self.generate() self.tar() finally: shutil.rmtree(self.dir) - def upstream_extract(self): - self.log("Extracting tarball %s\n" % self.input_tar) - match = re.match(r'(^|.*/)(?P<dir>linux-[\d.]+(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', self.input_tar) + def upstream_export(self, input_repo): + self.log("Exporting %s from %s\n" % (self.tag, input_repo)) + + archive_proc = subprocess.Popen(['git', 'archive', '--format=tar', + '--prefix=temp/', self.tag], + cwd=input_repo, + stdout=subprocess.PIPE) + extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir, + stdin=archive_proc.stdout) + + if extract_proc.wait(): + raise RuntimeError("Can't extract tarball") + + def upstream_extract(self, input_tar): + self.log("Extracting tarball %s\n" % input_tar) + match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar) if not match: raise RuntimeError("Can't identify name of tarball") - cmdline = ['tar -xf', self.input_tar, '-C', self.dir] + + cmdline = ['tar', '-xf', input_tar, '-C', self.dir] if match.group('extension') == 'bz2': cmdline.append('-j') elif match.group('extension') == 'gz': cmdline.append('-z') - if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): + + if subprocess.Popen(cmdline).wait(): raise RuntimeError("Can't extract tarball") + os.rename(os.path.join(self.dir, match.group('dir')), os.path.join(self.dir, 'temp')) - def upstream_patch(self): - if self.input_patch is None: - return - self.log("Patching source with %s\n" % self.input_patch) - match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', self.input_patch) + def upstream_patch(self, input_patch): + self.log("Patching source with %s\n" % input_patch) + match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', input_patch) if not match: raise RuntimeError("Can't identify name of patch") cmdline = [] @@ -64,7 +87,7 @@ class Main(object): cmdline.append('zcat') else: cmdline.append('cat') - cmdline.append(self.input_patch) + cmdline.append(input_patch) cmdline.append('| (cd %s; patch -p1 -f -s -t --no-backup-if-mismatch)' % os.path.join(self.dir, 'temp')) if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): raise RuntimeError("Can't patch source") @@ -104,13 +127,9 @@ class Main(object): if __name__ == '__main__': from optparse import OptionParser - parser = OptionParser(usage = "%prog [OPTION]... TAR [PATCH]") + parser = OptionParser(usage = "%prog [OPTION]... {TAR [PATCH] | REPO}") parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") options, args = parser.parse_args() - input_tar = args[0] - input_patch = None - if len(args) > 1: - input_patch = args[1] - - Main(input_tar, input_patch, options.override_version)() + assert 1 <= len(args) <= 2 + Main(args, options.override_version)() diff --git a/debian/changelog b/debian/changelog index 481101f..caec412 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.34-1~experimental.1) experimental; urgency=low + + * New upstream version + + -- Ben Hutchings <ben@decadent.org.uk> Thu, 20 May 2010 01:19:43 +0100 + linux-kbuild-2.6 (2.6.31.12-rt21-1) unstable; urgency=low * New upstream version @@ -112,11 +118,34 @@ linux-kbuild-2.6 (2.6.31~rc4-rt1-1) unstable; urgency=low -- Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Fri, 04 Sep 2009 11:00:58 +0200 -linux-kbuild-2.6 (2.6.31~rc4-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low + + [ Ben Hutchings ] + * New upstream version. (closes: #560090) + * Include new script module-common.lds, thanks to Zoran Dzelajlija. + + [ Bastian Blank ] + * Move contents of linux-kbuild package to /usr/lib. + -- Bastian Blank <waldi@debian.org> Fri, 11 Dec 2009 16:16:12 +0100 + +linux-kbuild-2.6 (2.6.31.2-1) unstable; urgency=low + + * Upload to unstable. + + -- Ben Hutchings <ben@decadent.org.uk> Sun, 25 Oct 2009 18:38:44 +0000 + +linux-kbuild-2.6 (2.6.31.2-1~experimental.1) experimental; urgency=low + + [ Bastian Blank ] * New upstream version. - -- Bastian Blank <waldi@debian.org> Sat, 25 Jul 2009 11:46:23 +0200 + [ Ben Hutchings ] + * Include new script gcc-x86_32-has-stack-protector.sh. + * Add myself to Uploaders. + * New upstream version (2.6.31.2). + + -- Ben Hutchings <ben@decadent.org.uk> Sat, 17 Oct 2009 23:05:27 +0100 linux-kbuild-2.6 (2.6.30-1) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 25d147c..2ca960d 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.* include debian/rules.defs build: debian/control $(STAMPS_DIR)/build-base -$(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) +$(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) kbuild/include/generated/autoconf.h dh_testdir $(MAKE) -f debian/rules.gen build touch $@ @@ -19,6 +19,12 @@ $(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) $(BUILD_DIR) $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ +# modpost needs CONFIG_SYMBOL_PREFIX from autoconf.h, but this is undefined +# for all Debian architectures. +kbuild/include/generated/autoconf.h: + @mkdir -p $(@D) + @[ -f $@ ] || touch $@ + DIR_ORIG = ../orig/$(SOURCE)-$(VERSION) TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) @@ -40,7 +46,7 @@ maintainerclean: clean: debian/control dh_testdir - rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc + rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc kbuild/include/generated dh_clean binary-indep: diff --git a/debian/rules.real b/debian/rules.real index 9fdcc23..053ac80 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -17,7 +17,7 @@ $(STAMPS_DIR)/build: install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME) -install-kbuild: BASE_DIR = /usr/src/$(PACKAGE_NAME) +install-kbuild: BASE_DIR = /usr/lib/$(PACKAGE_NAME) install-kbuild: SOURCE_DIR = $(BUILD_DIR)/build install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)/$(BASE_DIR) install-kbuild: $(STAMPS_DIR)/build @@ -25,6 +25,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testroot dh_clean -k -d $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs dh_strip diff --git a/scripts/Makefile b/scripts/Makefile index 7359e5e..e6d0ec5 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -12,13 +12,15 @@ DATA = \ Makefile.lib \ Makefile.modinst \ Makefile.modpost \ - mkversion + mkversion \ + module-common.lds SCRIPTS = \ checkincludes.pl \ checkstack.pl \ checkversion.pl \ gcc-version.sh \ + gcc-x86_32-has-stack-protector.sh \ gcc-x86_64-has-stack-protector.sh \ gen_initramfs_list.sh \ kernel-doc \ |