From 4b9ae46e44cd6426064cc64d48777aa1a7fff4ee Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 28 Mar 2006 21:46:39 +0000 Subject: [PATCH 001/487] /dists/trunk/linux-kbuild-2.6: Add. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6325 --- debian/bin/gencontrol.py | 153 +++++++ debian/changelog | 5 + debian/compat | 1 + debian/lib/python/debian_linux/__init__.py | 3 + debian/lib/python/debian_linux/debian.py | 231 ++++++++++ debian/lib/python/debian_linux/utils.py | 136 ++++++ debian/rules | 73 ++++ debian/rules.defs | 4 + debian/rules.real | 37 ++ debian/templates/control.main.in | 7 + debian/templates/control.source.in | 7 + src/Makefile | 56 +++ src/Makefile.inc | 17 + src/basic/Makefile | 17 + src/genksyms/Makefile | 25 ++ src/kconfig/Makefile | 25 ++ src/mod/Makefile | 17 + src/mod/elf.cpp | 243 +++++++++++ src/mod/elf.hpp | 219 ++++++++++ src/mod/endian.hpp | 138 ++++++ src/mod/modpost.cpp | 84 ++++ src/mod/module.cpp | 469 +++++++++++++++++++++ src/mod/module.hpp | 204 +++++++++ src/mod/module_devicetable.cpp | 54 +++ src/mod/module_devicetable.hpp | 126 ++++++ src/mod/module_devicetable.tpp | 60 +++ src/mod/module_devicetable_impl_2_6_16.cpp | 313 ++++++++++++++ src/mod/module_devicetable_impl_2_6_16.hpp | 391 +++++++++++++++++ 28 files changed, 3115 insertions(+) create mode 100755 debian/bin/gencontrol.py create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/lib/python/debian_linux/__init__.py create mode 100644 debian/lib/python/debian_linux/debian.py create mode 100644 debian/lib/python/debian_linux/utils.py create mode 100755 debian/rules create mode 100644 debian/rules.defs create mode 100644 debian/rules.real create mode 100644 debian/templates/control.main.in create mode 100644 debian/templates/control.source.in create mode 100644 src/Makefile create mode 100644 src/Makefile.inc create mode 100644 src/basic/Makefile create mode 100644 src/genksyms/Makefile create mode 100644 src/kconfig/Makefile create mode 100644 src/mod/Makefile create mode 100644 src/mod/elf.cpp create mode 100644 src/mod/elf.hpp create mode 100644 src/mod/endian.hpp create mode 100644 src/mod/modpost.cpp create mode 100644 src/mod/module.cpp create mode 100644 src/mod/module.hpp create mode 100644 src/mod/module_devicetable.cpp create mode 100644 src/mod/module_devicetable.hpp create mode 100644 src/mod/module_devicetable.tpp create mode 100644 src/mod/module_devicetable_impl_2_6_16.cpp create mode 100644 src/mod/module_devicetable_impl_2_6_16.hpp diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py new file mode 100755 index 000000000..9fcb535df --- /dev/null +++ b/debian/bin/gencontrol.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python2.4 +import sys +sys.path.append("debian/lib/python") +import warnings +from debian_linux.debian import * +from debian_linux.utils import * + +class packages_list(sorted_dict): + def append(self, package): + self[package['Package']] = package + + def extend(self, packages): + for package in packages: + self[package['Package']] = package + +class gencontrol(object): + makefile_targets = ('binary-arch', 'build') + + def __init__(self, underlay = None): + self.changelog = read_changelog() + self.templates = templates() + self.version, self.changelog_vars = self.process_changelog({}) + + def __call__(self): + packages = packages_list() + makefile = [] + + self.do_source(packages) + self.do_main(packages, makefile) + + self.write_control(packages.itervalues()) + self.write_makefile(makefile) + + def do_source(self, packages): + source = self.templates["control.source"] + packages['source'] = self.process_package(source[0], self.changelog_vars) + + def do_main(self, packages, makefile): + makeflags = { + 'VERSION': self.version['version'], + 'SOURCE_UPSTREAM': self.version['source_upstream'], + 'SOURCEVERSION': self.version['source'], + 'UPSTREAMVERSION': self.version['upstream'], + } + + vars = self.changelog_vars.copy() + + self.do_main_setup(vars, makeflags) + self.do_main_packages(packages) + self.do_main_makefile(makefile, makeflags) + + def do_main_setup(self, vars, makeflags): + pass + + def do_main_makefile(self, makefile, makeflags): + makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()]) + + for i in self.makefile_targets: + makefile.append(("%s:" % i, ("$(MAKE) -f debian/rules.real %s %s" % (i, makeflags_string)))) + + def do_main_packages(self, packages): + vars = self.changelog_vars + + main = self.templates["control.main"] + packages.extend(self.process_packages(main, vars)) + + def process_changelog(self, in_vars): + ret = [None, None] + ret[0] = version = self.changelog[0]['Version'] + vars = in_vars.copy() + vars['upstreamversion'] = version['upstream'] + vars['version'] = version['version'] + vars['source_upstream'] = version['source_upstream'] + vars['major'] = version['major'] + ret[1] = vars + return ret + + def process_relation(self, key, e, in_e, vars): + in_dep = in_e[key] + dep = package_relation_list() + for in_groups in in_dep: + groups = package_relation_group() + for in_item in in_groups: + item = package_relation() + item.name = self.substitute(in_item.name, vars) + if in_item.version is not None: + item.version = self.substitute(in_item.version, vars) + item.arches = in_item.arches + groups.append(item) + dep.append(groups) + e[key] = dep + + def process_description(self, e, in_e, vars): + in_desc = in_e['Description'] + desc = in_desc.__class__() + desc.short = self.substitute(in_desc.short, vars) + for i in in_desc.long: + desc.long.append(self.substitute(i, vars)) + e['Description'] = desc + + def process_package(self, in_entry, vars): + e = package() + for key, value in in_entry.iteritems(): + if isinstance(value, package_relation_list): + self.process_relation(key, e, in_entry, vars) + elif key == 'Description': + self.process_description(e, in_entry, vars) + elif key[:2] == 'X-': + pass + else: + e[key] = self.substitute(value, vars) + return e + + def process_packages(self, in_entries, vars): + entries = [] + for i in in_entries: + entries.append(self.process_package(i, vars)) + return entries + + def substitute(self, s, vars): + if isinstance(s, (list, tuple)): + for i in xrange(len(s)): + s[i] = self.substitute(s[i], vars) + return s + def subst(match): + return vars[match.group(1)] + return re.sub(r'@([a-z_]+)@', subst, s) + + def write_control(self, list): + self.write_rfc822(file("debian/control", 'w'), list) + + def write_makefile(self, out_list): + out = file("debian/rules.gen", 'w') + for item in out_list: + if isinstance(item, (list, tuple)): + out.write("%s\n" % item[0]) + cmd_list = item[1] + if isinstance(cmd_list, basestring): + cmd_list = cmd_list.split('\n') + for j in cmd_list: + out.write("\t%s\n" % j) + else: + out.write("%s\n" % item) + + def write_rfc822(self, f, list): + for entry in list: + for key, value in entry.iteritems(): + f.write("%s: %s\n" % (key, value)) + f.write('\n') + + +if __name__ == '__main__': + gencontrol()() diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..7bc4bc4f4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +linux-kbuild-2.6 (2.6.16-1) UNRELEASED; urgency=low + + * Initial release. + + -- Bastian Blank Mon, 27 Mar 2006 19:06:30 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/lib/python/debian_linux/__init__.py b/debian/lib/python/debian_linux/__init__.py new file mode 100644 index 000000000..b989d7d15 --- /dev/null +++ b/debian/lib/python/debian_linux/__init__.py @@ -0,0 +1,3 @@ +from debian import * +from utils import * + diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py new file mode 100644 index 000000000..2b83362c7 --- /dev/null +++ b/debian/lib/python/debian_linux/debian.py @@ -0,0 +1,231 @@ +import itertools, os.path, re, utils + +def read_changelog(dir = ''): + r = re.compile(r""" +^ +( +(?P
+ (?P + \w[-+0-9a-z.]+ + ) + \ + \( + (?P + [^\(\)\ \t]+ + ) + \) + \s+ + (?P + [-0-9a-zA-Z]+ + ) + \; +) +) +""", re.VERBOSE) + f = file(os.path.join(dir, "debian/changelog")) + entries = [] + act_upstream = None + while True: + line = f.readline() + if not line: + break + line = line.strip('\n') + match = r.match(line) + if not match: + continue + if match.group('header'): + e = {} + e['Distribution'] = match.group('header_distribution') + e['Source'] = match.group('header_source') + version = parse_version(match.group('header_version')) + e['Version'] = version + if act_upstream is None: + act_upstream = version['upstream'] + elif version['upstream'] != act_upstream: + break + entries.append(e) + return entries + +def parse_version(version): + version_re = ur""" +^ +(?P + (?P + \d+\.\d+\.\d+\+ + )? + (?P + (?P + (?P\d+\.\d+) + \. + \d+ + ) + (?: + - + (?P + .+? + ) + )? + ) + - + (?P[^-]+) +) +$ +""" + match = re.match(version_re, version, re.X) + if match is None: + raise ValueError + ret = match.groupdict() + if ret['parent'] is not None: + ret['source_upstream'] = ret['parent'] + ret['upstream'] + else: + ret['source_upstream'] = ret['upstream'] + return ret + +class package_description(object): + __slots__ = "short", "long" + + def __init__(self, value = None): + if value is not None: + self.short, long = value.split ("\n", 1) + self.long = long.split ("\n.\n") + else: + self.short = None + self.long = [] + + def __str__(self): + ret = self.short + '\n' + w = utils.wrap(width = 74, fix_sentence_endings = True) + pars = [] + for i in self.long: + pars.append('\n '.join(w.wrap(i))) + return self.short + '\n ' + '\n .\n '.join(pars) + +class package_relation(object): + __slots__ = "name", "version", "arches" + + _re = re.compile(r'^(\S+)(?: \(([^)]+)\))?(?: \[([^]]+)\])?$') + + def __init__(self, value = None): + if value is not None: + match = self._re.match(value) + if match is None: + raise RuntimeError, "Can't parse dependency %s" % value + match = match.groups() + self.name = match[0] + self.version = match[1] + if match[2] is not None: + self.arches = re.split('\s+', match[2]) + else: + self.arches = [] + else: + self.name = None + self.version = None + self.arches = [] + + def __str__(self): + ret = [self.name] + if self.version is not None: + ret.extend([' (', self.version, ')']) + if self.arches: + ret.extend([' [', ' '.join(self.arches), ']']) + return ''.join(ret) + +class package_relation_list(list): + def __init__(self, value = None): + if isinstance(value, (list, tuple)): + self.extend(value) + elif value is not None: + self.extend(value) + + def __str__(self): + return ', '.join([str(i) for i in self]) + + def _match(self, value): + for i in self: + if i._match(value): + return i + return None + + def extend(self, value): + if isinstance(value, basestring): + value = [package_relation_group(j.strip()) for j in re.split(',', value.strip())] + for i in value: + if isinstance(i, basestring): + i = package_relation_group(i) + j = self._match(i) + if j: + j._update_arches(i) + else: + self.append(i) + +class package_relation_group(list): + def __init__(self, value = None): + if isinstance(value, package_relation_list): + self.extend(value) + elif value is not None: + self._extend(value) + + def __str__(self): + return ' | '.join([str(i) for i in self]) + + def _extend(self, value): + self.extend([package_relation(j.strip()) for j in re.split('\|', value.strip())]) + + def _match(self, value): + for i, j in itertools.izip(self, value): + if i.name != j.name or i.version != j.version: + return None + return self + + def _update_arches(self, value): + for i, j in itertools.izip(self, value): + if i.arches: + for arch in j.arches: + if arch not in i.arches: + i.arches.append(arch) + +class package(dict): + _fields = utils.sorted_dict(( + ('Package', str), + ('Source', str), + ('Architecture', utils.field_list), + ('Section', str), + ('Priority', str), + ('Maintainer', str), + ('Uploaders', str), + ('Standards-Version', str), + ('Build-Depends', package_relation_list), + ('Build-Depends-Indep', package_relation_list), + ('Provides', package_relation_list), + ('Depends', package_relation_list), + ('Recommends', package_relation_list), + ('Suggests', package_relation_list), + ('Replaces', package_relation_list), + ('Conflicts', package_relation_list), + ('Reverse-Depends', package_relation_list), # Some sort of hack + ('Description', package_description), + )) + + def __setitem__(self, key, value): + try: + cls = self._fields[key] + if not isinstance(value, cls): + value = cls(value) + except KeyError: pass + super(package, self).__setitem__(key, value) + + def iterkeys(self): + for i in self._fields.iterkeys(): + if self.has_key(i) and self[i]: + yield i + + def iteritems(self): + for i in self._fields.iterkeys(): + if self.has_key(i) and self[i]: + yield (i, self[i]) + + def itervalues(self): + for i in self._fields.iterkeys(): + if self.has_key(i) and self[i]: + yield self[i] + diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py new file mode 100644 index 000000000..1519e4ebb --- /dev/null +++ b/debian/lib/python/debian_linux/utils.py @@ -0,0 +1,136 @@ +import debian, re, textwrap + +class sorted_dict(dict): + __slots__ = '_list', + + def __init__(self, entries = None): + super(sorted_dict, self).__init__() + self._list = [] + if entries is not None: + for key, value in entries: + self[key] = value + + def __delitem__(self, key): + super(sorted_dict, self).__delitem__(key) + self._list.remove(key) + + def __setitem__(self, key, value): + super(sorted_dict, self).__setitem__(key, value) + if key not in self._list: + self._list.append(key) + + def iterkeys(self): + for i in iter(self._list): + yield i + + def iteritems(self): + for i in iter(self._list): + yield (i, self[i]) + + def itervalues(self): + for i in iter(self._list): + yield self[i] + +class field_list(list): + TYPE_WHITESPACE = object() + TYPE_COMMATA = object() + + def __init__(self, value = None, type = TYPE_WHITESPACE): + self.type = type + if isinstance(value, field_list): + self.type = value.type + self.extend(value) + elif isinstance(value, (list, tuple)): + self.extend(value) + else: + self._extend(value) + + def __str__(self): + if self.type is self.TYPE_WHITESPACE: + type = ' ' + elif self.type is self.TYPE_COMMATA: + type = ', ' + return type.join(self) + + def _extend(self, value): + if self.type is self.TYPE_WHITESPACE: + type = '\s' + elif self.type is self.TYPE_COMMATA: + type = ',' + if value is not None: + self.extend([j.strip() for j in re.split(type, value.strip())]) + + def extend(self, value): + if isinstance(value, str): + self._extend(value) + else: + super(field_list, self).extend(value) + +class field_list_commata(field_list): + def __init__(self, value = None): + super(field_list_commata, self).__init__(value, field_list.TYPE_COMMATA) + +class field_string(str): + def __str__(self): + return '\n '.join(self.split('\n')) + +class templates(dict): + def __init__(self, dir = None): + if dir is None: + self.dir = "debian/templates" + else: + self.dir = dir + + def __getitem__(self, key): + try: + return dict.__getitem__(self, key) + except KeyError: pass + ret = self._read(key) + dict.__setitem__(self, key, ret) + return ret + + def __setitem__(self, key, value): + raise NotImplemented() + + def _read(self, filename): + entries = [] + + f = file("%s/%s.in" % (self.dir, filename)) + + while True: + e = debian.package() + last = None + lines = [] + while True: + line = f.readline() + if not line: + break + line = line.strip('\n') + if not line: + break + if line[0] in ' \t': + if not last: + raise ValueError('Continuation line seen before first header') + lines.append(line.lstrip()) + continue + if last: + e[last] = '\n'.join(lines) + i = line.find(':') + if i < 0: + raise ValueError("Not a header, not a continuation: ``%s''" % line) + last = line[:i] + lines = [line[i+1:].lstrip()] + if last: + e[last] = '\n'.join(lines) + if not e: + break + + entries.append(e) + + return entries + +class wrap(textwrap.TextWrapper): + wordsep_re = re.compile( + r'(\s+|' # any whitespace + r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash + diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..35f00e297 --- /dev/null +++ b/debian/rules @@ -0,0 +1,73 @@ +#!/usr/bin/make -f +SHELL := sh -e +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +srcver := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}') +VERSION := $(shell echo $(srcver) | sed -e 's,-[^-]*$$,,') +MAJOR := $(word 1,$(subst ., ,$(VERSION))).$(word 2,$(subst ., ,$(VERSION))) + +include debian/rules.defs + +build: debian/control $(STAMPS_DIR)/build-base +$(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) + dh_testdir + $(MAKE) -f debian/rules.gen build + touch $@ + +$(BUILD_DIR) $(STAMPS_DIR): + @[ -d $@ ] || mkdir $@ + +orig: ../orig/linux-kbuild-$(MAJOR)-$(VERSION) + rsync --delete --exclude debian --exclude .svn --link-dest=$^/ -av $^/ . + +../orig/linux-kbuild-$(MAJOR)-$(VERSION): + if [ -f "../linux-kbuild-$(MAJOR)_$(VERSION).orig.tar.gz" ]; then \ + mkdir -p ../orig; \ + tar -C ../orig -xzf ../linux-kbuild-$(MAJOR)_$(VERSION).orig.tar.gz; \ + else \ + echo "Can't find orig tarball." >&2; \ + exit 1; \ + fi + +maintainerclean: + -rm debian/control debian/control.md5sum debian/rules.gen + -rm -rf scripts + +clean: debian/control + dh_testdir + rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc + dh_clean + +binary-indep: + dh_testdir + $(MAKE) -f debian/rules.gen binary-indep + +binary-arch: + dh_testdir + $(MAKE) -f debian/rules.gen binary-arch + +binary: binary-indep binary-arch + +CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*) +debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES) + if [ -f debian/control.md5sum ]; then \ + if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \ + $(MAKE) -f debian/rules debian/control-real; \ + fi \ + else \ + $(MAKE) -f debian/rules debian/control-real; \ + fi + +debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES) + chmod +x $< + $< + md5sum $^ > debian/control.md5sum + @echo + @echo This target is made to fail intentionally, to make sure + @echo that it is NEVER run during the automated build. Please + @echo ignore the following error, the debian/control file has + @echo been generated SUCCESSFULLY. + @echo + exit 1 + +.PHONY: clean build setup binary-indep binary-arch binary diff --git a/debian/rules.defs b/debian/rules.defs new file mode 100644 index 000000000..06b3f3edb --- /dev/null +++ b/debian/rules.defs @@ -0,0 +1,4 @@ +BUILD_DIR = debian/build +STAMPS_DIR = debian/stamps +TEMPLATES_DIR = debian/templates + diff --git a/debian/rules.real b/debian/rules.real new file mode 100644 index 000000000..636cc6496 --- /dev/null +++ b/debian/rules.real @@ -0,0 +1,37 @@ +export DH_OPTIONS + +include debian/rules.defs + +binary-arch: install-kbuild + +build: $(STAMPS_DIR)/build + +$(STAMPS_DIR)/build: DIR=$(BUILD_DIR)/build +$(STAMPS_DIR)/build: + rm -rf '$(DIR)' + mkdir -p '$(DIR)' + cp -al src/* '$(DIR)' + make -C $(DIR) top_srcdir=$(CURDIR) + touch '$@' + +install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) +install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME) +install-kbuild: BASE_DIR = /usr/src/$(PACKAGE_NAME) +install-kbuild: SOURCE_DIR = $(BUILD_DIR)/build +install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)/$(BASE_DIR) +install-kbuild: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_clean -k -d + make -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in new file mode 100644 index 000000000..d22603e7a --- /dev/null +++ b/debian/templates/control.main.in @@ -0,0 +1,7 @@ +Package: linux-kbuild-@version@ +Architecture: any +Section: devel +Priority: optional +Provides: linux-kbuild, linux-kbuild-@major@ +Description: Linux kernel + Kbuild diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in new file mode 100644 index 000000000..d9c910587 --- /dev/null +++ b/debian/templates/control.source.in @@ -0,0 +1,7 @@ +Source: linux-kbuild-@major@ +Section: devel +Priority: optional +Maintainer: Debian Kernel Team +Uploaders: Bastian Blank +Standards-Version: 3.6.2.0 +Build-Depends: debhelper (>= 4.1.0) diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 000000000..59c897e78 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,56 @@ +include Makefile.inc + +PROGS = \ + bin2c \ + conmakehash \ + kallsyms \ + pnmtologo + +SCRIPTS = \ + checkconfig.pl \ + checkincludes.pl \ + checkstack.pl \ + checkversion.pl \ + gcc-version.sh \ + gen_initramfs_list.sh \ + Kbuild.include \ + kernel-doc \ + Lindent \ + Makefile.build \ + Makefile.clean \ + Makefile.host \ + Makefile.lib \ + Makefile.modinst \ + Makefile.modpost \ + makelst \ + mksysmap \ + mkuboot.sh \ + mkversion \ + namespace.pl \ + patch-kernel \ + reference_discarded.pl \ + reference_init.pl \ + setlocalversion \ + show_delta \ + ver_linux + +SUBDIRS = \ + basic \ + genksyms \ + kconfig \ + mod + +VPATH = $(top_srcdir)/scripts + +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/$$p'"; \ + install -D "$$p" "$(prefix)/scripts/$$p"; \ + done + @list='$(SCRIPTS)'; for p in $$list; do \ + echo " install -D '$(top_srcdir)/scripts/$$p' '$(prefix)/scripts/$$p'"; \ + install -D "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ + done + diff --git a/src/Makefile.inc b/src/Makefile.inc new file mode 100644 index 000000000..54694b90f --- /dev/null +++ b/src/Makefile.inc @@ -0,0 +1,17 @@ +CC = gcc +CXX = g++ +CFLAGS = -Wall -W -O2 +CXXFLAGS = $(CFLAGS) + +all: all-local all-recursive +install: install-local install-recursive + +all-recursive install-recursive: + @target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + $(MAKE) -C $$subdir $$target \ + || exit 1; \ + done + diff --git a/src/basic/Makefile b/src/basic/Makefile new file mode 100644 index 000000000..9e2eee865 --- /dev/null +++ b/src/basic/Makefile @@ -0,0 +1,17 @@ +include ../Makefile.inc + +PROGS = \ + docproc \ + fixdep \ + split-include + +VPATH = $(top_srcdir)/scripts/basic + +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/basic/$$p'"; \ + install -D "$$p" "$(prefix)/scripts/basic/$$p"; \ + done + diff --git a/src/genksyms/Makefile b/src/genksyms/Makefile new file mode 100644 index 000000000..e53e29239 --- /dev/null +++ b/src/genksyms/Makefile @@ -0,0 +1,25 @@ +include ../Makefile.inc + +PROGS = genksyms + +VPATH = $(top_srcdir)/scripts/genksyms + +CFLAGS += -I$(top_srcdir)/scripts/genksyms + +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/genksyms/$$p'"; \ + install -D "$$p" "$(prefix)/scripts/genksyms/$$p"; \ + done + +genksyms: genksyms.o parse.o lex.o + +lex.o: keywords.c parse.h + +%.c: %.c_shipped + ln -s $< $@ + +%.h: %.h_shipped + ln -s $< $@ diff --git a/src/kconfig/Makefile b/src/kconfig/Makefile new file mode 100644 index 000000000..b282b9c0a --- /dev/null +++ b/src/kconfig/Makefile @@ -0,0 +1,25 @@ +include ../Makefile.inc + +PROGS = conf + +VPATH = $(top_srcdir)/scripts/kconfig + +CFLAGS += -I$(top_srcdir)/scripts/kconfig + +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/kconfig/$$p'"; \ + install -D "$$p" "$(prefix)/scripts/kconfig/$$p"; \ + done + +conf: conf.o zconf.tab.o + +zconf.tab.c: zconf.hash.c lex.zconf.c + +%.c: %.c_shipped + ln -s $< $@ + +%.h: %.h_shipped + ln -s $< $@ diff --git a/src/mod/Makefile b/src/mod/Makefile new file mode 100644 index 000000000..7b842c788 --- /dev/null +++ b/src/mod/Makefile @@ -0,0 +1,17 @@ +include ../Makefile.inc + +PROGS = modpost + +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/mod/$$p'"; \ + install -D "$$p" "$(prefix)/scripts/mod/$$p"; \ + done + +modpost: elf.o modpost.o module.o module_devicetable.o module_devicetable_impl_2_6_16.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + +%.o: %.cpp %.hpp endian.hpp + diff --git a/src/mod/elf.cpp b/src/mod/elf.cpp new file mode 100644 index 000000000..bab5f9cb9 --- /dev/null +++ b/src/mod/elf.cpp @@ -0,0 +1,243 @@ +/* + * elf.cpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "elf.hpp" +#include "endian.hpp" + +#include + +#include +#include +#include +#include + +using namespace Elf; + +namespace +{ + template + struct _elfdef + { }; + + template <> + struct _elfdef + { + typedef Elf32_Ehdr Ehdr; + typedef Elf32_Shdr Shdr; + typedef Elf32_Sym Sym; + static inline uint8_t st_bind (uint8_t st_info) throw () { return ELF32_ST_BIND (st_info); } + static inline uint8_t st_type (uint8_t st_info) throw () { return ELF32_ST_TYPE (st_info); } + }; + + template <> + struct _elfdef + { + typedef Elf64_Ehdr Ehdr; + typedef Elf64_Shdr Shdr; + typedef Elf64_Sym Sym; + static inline uint8_t st_bind (uint8_t st_info) throw () { return ELF64_ST_BIND (st_info); } + static inline uint8_t st_type (uint8_t st_info) throw () { return ELF64_ST_TYPE (st_info); } + }; +} + +file::file (const char *filename, void *mem, size_t len) throw (std::bad_alloc) +: filename (std::string (filename)), mem (mem), len (len) +{ } + +file::~file () throw () +{ + ::munmap (mem, len); + for (std::vector
::iterator it = sections.begin (); it != sections.end (); ++it) + delete *it; +} + +file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error) +{ + struct stat buf; + int fd; + void *mem; + size_t len; + if ((fd = ::open (filename, O_RDONLY)) == -1) + throw std::runtime_error ("mapping failed"); + try + { + if (::fstat (fd, &buf) == -1) + throw std::runtime_error ("mapping failed"); + len = buf.st_size; + if ((mem = ::mmap (0, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) + throw std::runtime_error ("mapping failed"); + + const uint8_t *buf = static_cast (mem); + + switch (buf[EI_CLASS]) + { + case ELFCLASS32: + return open_class (filename, buf, mem, len); + case ELFCLASS64: + return open_class (filename, buf, mem, len); + default: + throw std::runtime_error ("Invalid file class"); + } + } + catch (...) + { + ::close (fd); + throw; + } +} + +template +file *file::open_class (const char *filename, const uint8_t *buf, void * mem, size_t len) throw (std::bad_alloc, std::runtime_error) +{ + switch (buf[EI_DATA]) + { + case ELFDATA2LSB: + return new file_data<_class, file_data_2LSB> (filename, mem, len); + case ELFDATA2MSB: + return new file_data<_class, file_data_2MSB> (filename, mem, len); + default: + throw std::runtime_error ("Invalid file data"); + } +} + +template +file_data<_class, _data>::file_data (const char *filename) throw (std::bad_alloc, std::runtime_error) +: file (filename) +{ + construct (); +} + +template +file_data<_class, _data>::file_data (const char *filename, void *mem, size_t len) throw (std::bad_alloc, std::runtime_error) +: file (filename, mem, len) +{ + construct (); +} + +template +void file_data<_class, _data>::construct () throw (std::bad_alloc, std::runtime_error) +{ + uint8_t *buf = static_cast (this->mem); + if (buf[EI_CLASS] != _class::id) + throw std::runtime_error ("Wrong file class"); + if (buf[EI_DATA] != _data::id) + throw std::runtime_error ("Wrong data encoding"); + + typedef typename _elfdef<_class>::Ehdr Ehdr; + Ehdr *ehdr = static_cast (this->mem); + this->type = convert<_data, typeof (ehdr->e_type )> () (ehdr->e_type ); + this->machine = convert<_data, typeof (ehdr->e_machine )> () (ehdr->e_machine ); + this->shoff = convert<_data, typeof (ehdr->e_shoff )> () (ehdr->e_shoff ); + this->shnum = convert<_data, typeof (ehdr->e_shnum )> () (ehdr->e_shnum ); + this->shstrndx = convert<_data, typeof (ehdr->e_shstrndx)> () (ehdr->e_shstrndx); + + typedef typename _elfdef<_class>::Shdr Shdr; + Shdr *shdrs = static_cast (static_cast (static_cast (this->mem) + this->shoff)); + + this->sections.reserve (this->shnum); + + for (unsigned int i = 0; i < this->shnum; i++) + { + section *temp; + switch (convert<_data, typeof (shdrs[i].sh_type)> () (shdrs[i].sh_type)) + { + case section_type_SYMTAB::id: + temp = new section_real<_class, _data, section_type_SYMTAB> (&shdrs[i], this->mem); + break; + default: + temp = new section_real<_class, _data, section_type_UNDEFINED> (&shdrs[i], this->mem); + break; + } + this->sections.push_back (temp); + } + + for (unsigned int i = 0; i < this->shnum; i++) + this->sections[i]->update_string_table (this); +} + +void section::update_string_table (file *file) throw (std::bad_alloc) +{ + const section *section = file->get_section (file->get_shstrndx ()); + this->name_string = std::string (static_cast (section->_mem ()) + this->name); +} + +template +section_data<_class, _data>::section_data (void *header, void *mem) throw () +{ + typedef typename _elfdef<_class>::Shdr Shdr; + Shdr *shdr = static_cast (header); + this->name = convert<_data, typeof (shdr->sh_name )> () (shdr->sh_name ); + this->type = convert<_data, typeof (shdr->sh_type )> () (shdr->sh_type ); + this->offset = convert<_data, typeof (shdr->sh_offset)> () (shdr->sh_offset); + this->size = convert<_data, typeof (shdr->sh_size )> () (shdr->sh_size ); + this->link = convert<_data, typeof (shdr->sh_link )> () (shdr->sh_link ); + this->mem = static_cast (static_cast (mem) + this->offset); +} + +section_type::~section_type () throw () +{ + for (std::vector::iterator it = symbols.begin (); it != symbols.end (); ++it) + delete *it; +} + +void section_type::update_string_table (file *file) throw (std::bad_alloc) +{ + section::update_string_table (file); + for (unsigned int i = 0; i < symbols.size (); i++) + this->symbols[i]->update_string_table (file, link); +} + +template +section_real<_class, _data, section_type_SYMTAB>::section_real (void *header, void *mem) throw (std::bad_alloc) +: section_data<_class, _data> (header, mem) +{ + if (this->type != SHT_SYMTAB) + throw std::logic_error ("Wrong section type"); + typedef typename _elfdef<_class>::Sym Sym; + Sym *syms = static_cast (this->mem); + unsigned int max = this->size / sizeof (Sym); + + this->symbols.reserve (max); + + for (unsigned int i = 0; i < max; i++) + this->symbols.push_back (new symbol_data<_class, _data> (&syms[i])); +} + +template +symbol_data<_class, _data>::symbol_data (void *mem) throw () +{ + typedef typename _elfdef<_class>::Sym Sym; + Sym *sym = static_cast (mem); + this->name = convert<_data, typeof (sym->st_name )> () (sym->st_name); + this->info = convert<_data, typeof (sym->st_info )> () (sym->st_info); + this->shndx = convert<_data, typeof (sym->st_shndx)> () (sym->st_shndx); + this->value = convert<_data, typeof (sym->st_value)> () (sym->st_value); + this->size = convert<_data, typeof (sym->st_size )> () (sym->st_size); + this->bind = _elfdef<_class>::st_bind (this->info); + this->type = _elfdef<_class>::st_type (this->info); +} + +template +void symbol_data<_class, _data>::update_string_table (file *file, uint16_t s) throw (std::bad_alloc) +{ + const section *section = file->get_section (s); + this->name_string = std::string (static_cast (section->_mem ()) + this->name); +} + diff --git a/src/mod/elf.hpp b/src/mod/elf.hpp new file mode 100644 index 000000000..ef9299780 --- /dev/null +++ b/src/mod/elf.hpp @@ -0,0 +1,219 @@ +/* + * elf.hpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef ELF_HPP +#define ELF_HPP + +#include "endian.hpp" + +#include +#include +#include + +#include + +namespace Elf +{ + class file_class_32 { public: static const unsigned int id = 1; }; + class file_class_64 { public: static const unsigned int id = 2; }; + class file_data_2LSB { public: static const unsigned int id = 1; }; + class file_data_2MSB { public: static const unsigned int id = 2; }; + class section_type_UNDEFINED { }; + class section_type_SYMTAB { public: static const unsigned int id = 2; }; + + class section; + + class file + { + public: + virtual ~file () throw (); + + virtual const uint8_t get_class () const throw () = 0; + virtual const uint8_t get_data () const throw () = 0; + const uint16_t get_type () const throw () { return type; } + const uint16_t get_machine () const throw () { return machine; } + const uint16_t get_shstrndx () const throw () { return shstrndx; } + + const std::vector
get_sections () const throw () { return sections; }; + const section *get_section (unsigned int i) const throw (std::out_of_range) { return sections.at(i); }; + + const void *const _mem () const throw () { return mem; } + + static file *open (const char *filename) throw (std::bad_alloc, std::runtime_error); + + protected: + file (const char *, void *, size_t len) throw (std::bad_alloc); + + template + static file *open_class (const char *, const uint8_t *, void *, size_t) throw (std::bad_alloc, std::runtime_error); + + uint16_t type; + uint16_t machine; + uint64_t shoff; + uint16_t shnum; + uint16_t shstrndx; + + std::vector
sections; + + const std::string filename; + void *mem; + size_t len; + }; + + template + class file_data : public file + { + public: + file_data (const char *) throw (std::bad_alloc, std::runtime_error); + file_data (const char *, void *, size_t len) throw (std::bad_alloc, std::runtime_error); + + const uint8_t get_class () const throw () { return _class::id; } + const uint8_t get_data () const throw () { return _data::id; } + + private: + void construct () throw (std::bad_alloc, std::runtime_error); + }; + + class section + { + public: + virtual ~section () throw () {} + + uint32_t get_type () const throw () { return type; } + uint64_t get_size () const throw () { return size; } + const std::string &get_name_string () const throw () { return name_string; } + + const void *const _mem () const throw () { return mem; } + + virtual void update_string_table (file *) throw (std::bad_alloc); + + protected: + uint32_t name; + uint32_t type; + uint64_t offset; + uint64_t size; + uint32_t link; + + std::string name_string; + + void *mem; + }; + + template + class section_data : public virtual section + { + public: + section_data (void *, void *) throw (); + }; + + template + class section_type : public virtual section + { + }; + + class symbol; + + template <> + class section_type : public virtual section + { + public: + ~section_type () throw (); + + const std::vector &get_symbols () throw () { return symbols; } + + void update_string_table (file *) throw (std::bad_alloc); + + protected: + std::vector symbols; + }; + + template + class section_real : public section_data<_class, _data>, public section_type<_type> + { + public: + section_real (void *, void *) throw (); + }; + + template + class section_real<_class, _data, section_type_UNDEFINED> : public section_data<_class, _data>, public section_type + { + public: + section_real (void *a, void *b) throw () : section_data<_class, _data> (a, b) { } + }; + + template + class section_real<_class, _data, section_type_SYMTAB> : public section_data<_class, _data>, public section_type + { + public: + section_real (void *, void *) throw (std::bad_alloc); + }; + + class symbol + { + public: + virtual ~symbol () throw () {} + + uint8_t get_info () const throw () { return info; } + uint16_t get_shndx () const throw () { return shndx; } + uint64_t get_value () const throw () { return value; } + uint64_t get_size () const throw () { return size; } + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string () const throw () { return name_string; } + + virtual void update_string_table (file *, uint16_t) throw (std::bad_alloc) = 0; + + protected: + uint32_t name; + uint8_t info; + uint16_t shndx; + uint64_t value; + uint64_t size; + uint8_t bind; + uint8_t type; + + std::string name_string; + }; + + template + class symbol_data : public symbol + { + public: + symbol_data (void *) throw (); + + void update_string_table (file *, uint16_t) throw (std::bad_alloc); + + protected: + }; + + template + struct convert + { }; + + template + struct convert : public endian::convert + { }; + + template + struct convert : public endian::convert + { }; +} + +#endif diff --git a/src/mod/endian.hpp b/src/mod/endian.hpp new file mode 100644 index 000000000..082bf44d7 --- /dev/null +++ b/src/mod/endian.hpp @@ -0,0 +1,138 @@ +/* + * endian.hpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef ENDIAN_HPP +#define ENDIAN_HPP + +#include +#include + +namespace endian +{ + class little_endian + { }; + + class big_endian + { }; + +#if __BYTE_ORDER == __LITTLE_ENDIAN + typedef little_endian host_endian; +#elif __BYTE_ORDER == __BIG_ENDIAN + typedef big_endian host_endian; +#endif + + template + struct convert_nop + { + inline type operator () (const type &in) const throw () { return in; } + }; + + template + struct convert_simple + { }; + + template <> + struct convert_simple : public convert_nop + { }; + + template <> + struct convert_simple + { + inline uint16_t operator () (const uint16_t &in) const throw () + { + return (in & 0x00ffU) << 8 | + (in & 0xff00U) >> 8; + } + }; + + template <> + struct convert_simple + { + inline uint32_t operator () (const uint32_t &in) const throw () + { + return (in & 0x000000ffU) << 24 | + (in & 0xff000000U) >> 24 | + (in & 0x0000ff00U) << 8 | + (in & 0x00ff0000U) >> 8; + } + }; + + template <> + struct convert_simple + { + inline uint64_t operator () (const uint64_t &in) const throw () + { + return (in & 0x00000000000000ffULL) << 56 | + (in & 0xff00000000000000ULL) >> 56 | + (in & 0x000000000000ff00ULL) << 40 | + (in & 0x00ff000000000000ULL) >> 40 | + (in & 0x0000000000ff0000ULL) << 24 | + (in & 0x0000ff0000000000ULL) >> 24 | + (in & 0x00000000ff000000ULL) << 8 | + (in & 0x000000ff00000000ULL) >> 8; + } + }; + + template <> + struct convert_simple : public convert_simple + { }; + + template <> + struct convert_simple : public convert_simple + { }; + + template <> + struct convert_simple : public convert_simple + { }; + + template + struct convert_complete + { }; + + template + struct convert_complete : public convert_nop + { }; + + template + struct convert_complete : public convert_simple + { }; + + template + struct convert_complete : public convert_nop + { }; + + template + struct convert_complete : public convert_simple + { }; + + template + struct convert + { }; + + template + struct convert : public convert_complete + { }; + + template + struct convert : public convert_complete + { }; +} + +#endif diff --git a/src/mod/modpost.cpp b/src/mod/modpost.cpp new file mode 100644 index 000000000..4e5a0c899 --- /dev/null +++ b/src/mod/modpost.cpp @@ -0,0 +1,84 @@ +/* + * modpost.cpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "elf.hpp" +#include "module.hpp" + +#include + +#include + +using namespace linuxkernel; + +modulelist modules; + +int main (int argc, char *const argv[]) +{ + int ret = EXIT_SUCCESS; + int opt; + const char *dump_read = 0, *dump_write = 0; + bool all_versions = false, modversions = false;; + + while ((opt = getopt (argc, argv, "ai:mo:")) != -1) + { + switch(opt) { + case 'a': + all_versions = true; + std::clog << "*** Warning: CONFIG_MODULE_SRCVERSION_ALL is not supported!" << std::endl; + return EXIT_FAILURE; + break; + case 'i': + dump_read = optarg; + break; + case 'm': + modversions = true; + break; + case 'o': + dump_write = optarg; + break; + default: + exit(1); + } + } + + if (dump_read) + modules.dump_read (dump_read); + + for (int i = optind; i < argc; i++) + { + std::string filename (argv[i]); + try + { + modules.insert (filename); + } + catch (std::runtime_error &e) + { + std::clog << "*** Warning: \"" << filename << "\" failed to load: " << e.what () << std::endl; + ret = EXIT_FAILURE; + continue; + } + } + modules.write (modversions); + + if (dump_write) + modules.dump_write (dump_write); + + return ret; +} diff --git a/src/mod/module.cpp b/src/mod/module.cpp new file mode 100644 index 000000000..78b00deca --- /dev/null +++ b/src/mod/module.cpp @@ -0,0 +1,469 @@ +/* + * module.cpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "module.hpp" + +#include +#include +#include +#include + +#include + +using namespace linuxkernel; + +const std::string module_real::symbol_name_cleanup ("cleanup_module"); +const std::string module_real::symbol_name_init ("init_module"); +const std::string module_real::symbol_prefix_crc ("__crc_"); +const std::string module_real::symbol_prefix_ksymtab ("__ksymtab_"); + +module::module (const std::string &name) throw () +: name (name) +{ + std::string::size_type t1 = name.find_last_of ('/'); + if (t1 == std::string::npos) + t1 = 0; + else + t1++; + name_short = name.substr (t1, std::string::npos); + + if (name == "vmlinux") + is_vmlinux = true; +} + +module::module (const std::string &filename, bool) throw () +{ + std::string::size_type t1 = filename.find_last_of ('/'); + std::string::size_type t2 = filename.find_last_of ('.'); + if (t1 == std::string::npos) + t1 = 0; + else + t1++; + name = filename.substr (0, t2); + if (t2 != std::string::npos) + t2 -= t1; + name_short = filename.substr (t1, t2); + + if (name == "vmlinux") + is_vmlinux = true; +} + +module_real::module_real (const std::string &filename, Elf::file *file) throw (std::runtime_error) +: module (filename, false), has_init (false), has_cleanup (false), file (file) +{ + const std::vector §ions = file->get_sections (); + Elf::section *modinfo = 0; + symtab = 0; + + for (std::vector ::const_iterator it = sections.begin (); it != sections.end (); ++it) + { + const std::string &name = (*it)->get_name_string (); + uint32_t type = (*it)->get_type (); + if (name == ".modinfo") + modinfo = *it; + if (type == Elf::section_type_SYMTAB::id) + symtab = dynamic_cast *> (*it); + } + + if (!is_vmlinux && !modinfo) + throw std::runtime_error ("Not a kernel module, lacks modinfo section"); + if (!symtab) + throw std::runtime_error ("Not a kernel module, lacks symbol table"); + + if (!is_vmlinux) + { + read_modinfo (modinfo); + symbols_undefined.insert (std::pair ("struct_module", symbol_undefined ("struct_module", 0))); + } + read_symtab (symtab); +} + +const Elf::symbol *module_real::_get_symbol (const std::string &name) const throw () +{ + for (std::vector::const_iterator it = symtab->get_symbols ().begin (); it != symtab->get_symbols ().end (); ++it) + { + Elf::symbol *symbol = *it; + std::string symname = symbol->get_name_string (); + if (symname == name) + return symbol; + } + return 0; +} + +void module_real::write (const modulelist &list, bool modversions) +{ + std::string filename = name + ".mod.c"; + std::ofstream out (filename.c_str ()); + write_header (out); + if (modversions) + write_versions (out, list); + write_depends (out, list); + write_moddevtable (out); +} + +module_real *module_real::open (const std::string &filename) throw (std::bad_alloc, std::runtime_error) +{ + Elf::file *file = Elf::file::open (filename.c_str ()); + switch (file->get_class ()) + { + case Elf::file_class_32::id: + return open_class (filename, file); + case Elf::file_class_64::id: + return open_class (filename, file); + default: + throw std::runtime_error ("Unsupported file class"); + } +} + +template +module_real *module_real::open_class (const std::string &filename, Elf::file *file) throw (std::bad_alloc, std::runtime_error) +{ + switch (file->get_data ()) + { + case Elf::file_data_2LSB::id: + return new module_data (filename, file); + case Elf::file_data_2MSB::id: + return new module_data (filename, file); + default: + throw std::runtime_error ("Unsupported data encoding"); + } +} + +void module_real::read_modinfo (Elf::section *section) throw (std::runtime_error) +{ + const char *act, *end, *temp1, *temp2; + act = static_cast (section->_mem ()); + end = act + section->get_size (); + while (act <= end) + { + temp1 = act; + for (; *act && *act != '=' && act <= end; act++); + if (act > end) + break; + temp2 = ++act; + for (; *act && act <= end; act++); + if (act > end) + break; + modinfo.insert (std::pair (std::string (temp1, temp2 - temp1 - 1), std::string (temp2, act - temp2))); + for (; !*act && act <= end; act++); + } +} + +void module_real::read_symtab (Elf::section_type *section) throw (std::runtime_error) +{ + for (std::vector::const_iterator it = section->get_symbols ().begin (); it != section->get_symbols ().end (); ++it) + { + Elf::symbol *symbol = *it; + std::string symname = symbol->get_name_string (); + + switch (symbol->get_shndx ()) + { + case SHN_COMMON: + std::clog << "*** Warning: \"" << symname << "\" [" << name << "] is COMMON symbol" << std::endl; + break; + case SHN_ABS: + if (symname.compare (0, symbol_prefix_crc.size (), symbol_prefix_crc) == 0) + { + std::string symname_real (symname.substr (symbol_prefix_crc.size ())); + std::map::iterator it = symbols_exported.find (symname_real); + if (it == symbols_exported.end ()) + symbols_exported.insert (std::pair (symname_real, symbol_exported (symname_real, symbol->get_value ()))); + else + it->second.set_crc (symbol->get_value ()); + } + break; + case SHN_UNDEF: + if (symbol->get_bind () != STB_GLOBAL && + symbol->get_bind () != STB_WEAK) + break; + //FIXME: if (symbol->get_type () == STT_REGISTER) + // break; + /* ignore global offset table */ + if (symname == "_GLOBAL_OFFSET_TABLE_") + break; + /* ignore __this_module, it will be resolved shortly */ + if (symname == "__this_module") + break; + symbols_undefined.insert (std::pair (symname, symbol_undefined (symname, symbol->get_bind () == STB_WEAK))); + break; + default: + if (symname.compare (0, symbol_prefix_ksymtab.size (), symbol_prefix_ksymtab) == 0) + { + std::string symname_real (symname.substr (symbol_prefix_ksymtab.size ())); + std::map::iterator it = symbols_exported.find (symname_real); + if (it == symbols_exported.end ()) + symbols_exported.insert (std::pair (symname_real, symbol_exported (symname_real))); + } + else if (symname == symbol_name_cleanup) + has_cleanup = true; + else if (symname == symbol_name_init) + has_init = true; + break; + }; + } +} + +void module_real::write_depends (std::ostream &out, const modulelist &list) +{ + std::set depends; + for (std::map::const_iterator it = symbols_undefined.begin (); it != symbols_undefined.end (); ++it) + { + try + { + const std::string &mod (list.get_module_name_short_for_symbol (it->first)); + if (mod != "vmlinux") + depends.insert (mod); + } + catch (std::out_of_range &) + { } + } + out << + "static const char __module_depends[]\n" + "__attribute_used__\n" + "__attribute__((section(\".modinfo\"))) =\n" + "\"depends="; + if (depends.begin () != depends.end ()) + { + std::set::const_iterator it = depends.begin (); + out << *it; + for (++it; it != depends.end (); ++it) + out << ',' << *it; + } + out << "\";\n\n"; +} + +void module_real::write_header (std::ostream &out) +{ + out << + "#include \n" + "#include \n" + "#include \n" + "\n" + "MODULE_INFO(vermagic, VERMAGIC_STRING);\n" + "\n" + "struct module __this_module\n" + "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n" + " .name = KBUILD_MODNAME,\n"; + if (has_init) + out << " .init = init_module,\n"; + if (has_cleanup) + out << + "#ifdef CONFIG_MODULE_UNLOAD\n" + " .exit = cleanup_module,\n" + "#endif\n"; + out << "};\n\n"; +} + +void module_real::write_moddevtable (std::ostream &out) +{ + for (std::list::iterator it = devicetables.begin (); it != devicetables.end (); ++it) + { + module_devicetable::table_base *ent = *it; + if (ent) + ent->write (out); + } +} + +void module_real::write_versions (std::ostream &out, const modulelist &list) +{ + out << + "static const struct modversion_info ____versions[]\n" + "__attribute_used__\n" + "__attribute__((section(\"__versions\"))) = {\n"; + + for (_symbols_undefined::const_iterator it = symbols_undefined.begin (); it != symbols_undefined.end (); ++it) + { + try + { + const symbol_exported &sym (list.get_symbol (it->first)); + if (sym.get_crc_valid ()) + out << "\t{ 0x" << std::hex << sym.get_crc () << std::dec << ", \"" << it->first << "\" },\n"; + else + std::clog << "*** Warning: \"" << sym.get_name () << "\" [" << name << "] has no CRC!" << std::endl; + } + catch (std::out_of_range &) + { + if (list.report_symbols_missing) + std::clog << "*** Warning: \"" << it->first << "\" is undefined!" << std::endl; + } + } + + out << "};\n\n"; +} + +template +module_data::module_data (const std::string &filename, Elf::file *file) throw (std::runtime_error) +: module_real (filename, file) +{ + module_devicetable::table_create (devicetables, this, file); +} + +modulelist::modulelist () throw () +: report_symbols_missing (false) +{ } + +modulelist::~modulelist () throw () +{ + for (_modules_real::iterator it = modules_real.begin (); it != modules_real.end (); ++it) + delete it->second; + for (_modules_shadow::iterator it = modules_shadow.begin (); it != modules_shadow.end (); ++it) + delete it->second; +} + +void modulelist::dump_read (const std::string &filename) throw (std::runtime_error) +{ + std::ifstream in (filename.c_str ()); + while (in.good ()) + { + char buf[512]; + in.getline (buf, sizeof (buf)); + std::stringstream str (buf); + uint32_t crc; + std::string symbol, module_name; + str >> std::hex >> crc >> std::dec >> symbol >> module_name; + _modules_shadow::const_iterator it = modules_shadow.find (module_name); + module *mod; + if (it == modules_shadow.end ()) + { + mod = new module (module_name); + modules_shadow.insert (_modules_shadow_pair (module_name, mod)); + } + else + mod = it->second; + mod->symbols_exported.insert (std::pair (symbol, symbol_exported (symbol, crc))); + symbols_exported.insert (std::pair (symbol, module_name)); + if (mod->get_is_vmlinux ()) + report_symbols_missing = true; + } +} + +void modulelist::dump_write (const std::string &filename) const throw (std::runtime_error) +{ + char buf[128]; + std::ofstream out (filename.c_str (), std::ios::trunc); + + for (_symbols::const_iterator it = symbols_exported.begin (); it != symbols_exported.end (); ++it) + { + const module *mod = get_module (it->second); + const symbol_exported &sym = get_symbol (it->first); + snprintf (buf, sizeof (buf), "0x%08x\t%s\t%s\n", sym.get_crc (), it->first.c_str (), mod->get_name ().c_str ()); + out << buf; + } +} + +const module *modulelist::get_module (const std::string &name) const throw (std::out_of_range) +{ + _modules_real::const_iterator it1 = modules_real.find (name); + if (it1 != modules_real.end ()) + return it1->second; + _modules_shadow::const_iterator it2 = modules_shadow.find (name); + if (it2 != modules_shadow.end ()) + return it2->second; + throw std::out_of_range ("Don't find module"); +} + +const module *modulelist::get_module_for_symbol (const symbolname &name) const throw (std::out_of_range) +{ + _symbols::const_iterator it = symbols_exported.find (name); + if (it == symbols_exported.end ()) + throw std::out_of_range ("symbol is undefined"); + return get_module (it->second); +} + +const std::string &modulelist::get_module_name_short_for_symbol (const symbolname &name) const throw (std::out_of_range) +{ + const module *mod = get_module_for_symbol (name); + return mod->get_name_short (); +} + +const symbol_exported &modulelist::get_symbol (const symbolname &name) const throw (std::out_of_range) +{ + const module *mod = get_module_for_symbol (name); + std::map::const_iterator it = mod->get_symbols_exported ().find (name); + if (it == mod->get_symbols_exported ().end ()) + throw std::logic_error ("Don't find symbol"); + return it->second; +} + +void modulelist::insert (module_real *mod) throw (std::runtime_error) +{ + bool overwrite = false; + + if (mod->get_is_vmlinux ()) + { + if (!modules_shadow.insert (_modules_shadow_pair (mod->get_name (), mod)).second) + overwrite = true; + report_symbols_missing = true; + } + else + { + if (!modules_real.insert (_modules_real_pair (mod->get_name (), mod)).second) + throw std::runtime_error ("Already know a module with this name"); + } + + for (std::map::const_iterator it = mod->get_symbols_exported ().begin (); + it != mod->get_symbols_exported ().end (); ++it) + if (!symbols_exported.insert (std::pair (it->second.get_name (), mod->get_name ())).second) + if (!overwrite) + std::clog << "*** Warning: \"" << it->second.get_name () << "\" [" << mod->get_name () << "] duplicated symbol!" << std::endl; +} + +void modulelist::insert (const std::string &filename) throw (std::runtime_error) +{ + module_real *mod = module_real::open (filename); + try + { + insert (mod); + } + catch (...) + { + delete mod; + throw; + } +} + +void modulelist::write (bool modversions) +{ + for (_modules_real::iterator it = modules_real.begin (); it != modules_real.end (); ++it) + it->second->write (*this, modversions); +} + +symbol::symbol (const symbolname &name) throw () +: name (name) +{ } + +symbol_exported::symbol_exported (const symbolname &name) throw () +: symbol (name), crc_valid (false) +{ } + +symbol_exported::symbol_exported (const symbolname &name, uint32_t crc) throw () +: symbol (name), crc (crc), crc_valid (true) +{ } + +void symbol_exported::set_crc (uint32_t _crc) throw () +{ + crc = _crc; + crc_valid = true; +} + +symbol_undefined::symbol_undefined (const symbolname &name, bool weak) throw () +: symbol (name), weak (weak) +{ } + diff --git a/src/mod/module.hpp b/src/mod/module.hpp new file mode 100644 index 000000000..a8f9292e6 --- /dev/null +++ b/src/mod/module.hpp @@ -0,0 +1,204 @@ +/* + * module.hpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef MODULE_HPP +#define MODULE_HPP + +#define DISABLE_TEMPLATES +#include "elf.hpp" +#include "module_devicetable.hpp" + +#include +#include +#include + +namespace linuxkernel +{ + class modulelist; + class symbolname; + class symbol_exported; + class symbol_undefined; + + class module + { + public: + typedef std::map _symbols_exported; + + module (const std::string &name) throw (); + + bool get_is_vmlinux () const throw () { return is_vmlinux; } + const std::string &get_name () const throw () { return name; } + const std::string &get_name_short () const throw () { return name_short; } + const _symbols_exported &get_symbols_exported () const throw () { return symbols_exported; } + + protected: + module (const std::string &filename, bool) throw (); + + std::string name, name_short; + bool is_vmlinux; + _symbols_exported symbols_exported; + + friend class modulelist; + }; + + class module_real : public module + { + public: + typedef std::map _symbols_undefined; + + module_real (const std::string &filename, Elf::file *file) throw (std::runtime_error); + + const Elf::symbol *_get_symbol (const std::string &name) const throw (); + + void write (const modulelist &, bool modversions); + + static module_real *open (const std::string &filename) throw (std::bad_alloc, std::runtime_error); + + const static std::string symbol_name_cleanup; + const static std::string symbol_name_init; + const static std::string symbol_prefix_crc; + const static std::string symbol_prefix_ksymtab; + + protected: + template + static module_real *open_class (const std::string &filename, Elf::file *) throw (std::bad_alloc, std::runtime_error); + + void read_modinfo (Elf::section *) throw (std::runtime_error); + void read_symtab (Elf::section_type *) throw (std::runtime_error); + + void write_depends (std::ostream &, const modulelist &); + void write_header (std::ostream &); + void write_moddevtable (std::ostream &); + void write_versions (std::ostream &, const modulelist &); + + std::map modinfo; + _symbols_undefined symbols_undefined; + bool has_init; + bool has_cleanup; + Elf::section_type *symtab; + std::list devicetables; + + Elf::file *file; + }; + + template + class module_data : public module_real + { + public: + module_data (const std::string &filename, Elf::file *file) throw (std::runtime_error); + }; + + class modulelist + { + public: + typedef std::map _modules_real; + typedef std::pair _modules_real_pair; + typedef std::map _modules_shadow; + typedef std::pair _modules_shadow_pair; + typedef std::map _symbols; + + modulelist () throw (); + ~modulelist () throw (); + + void dump_read (const std::string &filename) throw (std::runtime_error); + void dump_write (const std::string &filename) const throw (std::runtime_error); + + const _modules_real &get_modules_real () const throw () { return modules_real; } + const _modules_shadow &get_modules_shadow () const throw () { return modules_shadow; } + const module *get_module (const std::string &name) const throw (std::out_of_range); + const module *get_module_for_symbol (const symbolname &name) const throw (std::out_of_range); + const std::string &get_module_name_short_for_symbol (const symbolname &name) const throw (std::out_of_range); + const symbol_exported &get_symbol (const symbolname &name) const throw (std::out_of_range); + const _symbols &get_symbols_exported () const throw () { return symbols_exported; } + + void insert (module_real *) throw (std::runtime_error); + void insert (const std::string &filename) throw (std::runtime_error); + + void write (bool modversions); + + bool report_symbols_missing; + + protected: + _modules_real modules_real; + _modules_shadow modules_shadow; + _symbols symbols_exported; + }; + + class symbolname : public std::string + { + public: + symbolname () throw () {} + symbolname (const std::string &name) throw () + : std::string (name) + { + if (size () && at (0) == '.') + erase (0, 1); + } + symbolname (const char *name) throw () + : std::string (name) + { + if (size () && at (0) == '.') + erase (0, 1); + } + }; + + class symbol + { + public: + symbol () throw () {} + symbol (const symbolname &name) throw (); + + const symbolname &get_name () const throw () { return name; } + + protected: + symbolname name; + }; + + class symbol_exported : public symbol + { + public: + symbol_exported () throw () {} + symbol_exported (const symbolname &name) throw (); + symbol_exported (const symbolname &name, uint32_t) throw (); + + uint32_t get_crc () const throw () { return crc; } + bool get_crc_valid () const throw () { return crc_valid; } + void set_crc (uint32_t) throw (); + + protected: + uint32_t crc; + bool crc_valid; + }; + + class symbol_undefined : public symbol + { + public: + symbol_undefined () throw () {} + symbol_undefined (const symbolname &name, bool weak) throw (); + + protected: + bool weak; + }; +} + +#include "module_devicetable.tpp" + +#undef DISABLE_TEMPLATES +#endif diff --git a/src/mod/module_devicetable.cpp b/src/mod/module_devicetable.cpp new file mode 100644 index 000000000..08387fe5a --- /dev/null +++ b/src/mod/module_devicetable.cpp @@ -0,0 +1,54 @@ +/* + * module_devicetable.cpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "module.hpp" +#include "module_devicetable.hpp" + +namespace linuxkernel +{ + namespace module_devicetable + { + namespace internal + { + const std::string def::symbol = "__mod_ccw_device_table"; + const std::string def::symbol = "__mod_i2c_device_table"; + const std::string def::symbol = "__mod_ieee1394_device_table"; + const std::string def::symbol = "__mod_input_device_table"; + const std::string def::symbol = "__mod_of_device_table"; + const std::string def::symbol = "__mod_pci_device_table"; + const std::string def::symbol = "__mod_pcmcia_device_table"; + const std::string def::symbol = "__mod_pnp_device_table"; + const std::string def::symbol = "__mod_pnp_card_device_table"; + const std::string def::symbol = "__mod_serio_device_table"; + const std::string def::symbol = "__mod_usb_device_table"; + const std::string def::symbol = "__mod_vio_device_table"; + } + + void table_base::write (std::ostream &out) const throw (std::runtime_error) + { + for (std::list::const_iterator it = entries.begin (); it != entries.end (); ++it) + { + out << "MODULE_ALIAS(\""; + (*it)->write (out); + out << "\");\n"; + } + } + } +} diff --git a/src/mod/module_devicetable.hpp b/src/mod/module_devicetable.hpp new file mode 100644 index 000000000..088eed35d --- /dev/null +++ b/src/mod/module_devicetable.hpp @@ -0,0 +1,126 @@ +/* + * module_devicetable.hpp + * + * Copyright (C) 2005, 2006 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef MODULE_DEVICETABLE_HPP +#define MODULE_DEVICETABLE_HPP + +#include "elf.hpp" + +#include +#include +#include + +namespace linuxkernel +{ + class module_real; + + namespace module_devicetable + { + class device_ccw { }; + class device_i2c { }; + class device_ieee1394 { }; + class device_input { }; + class device_of { }; + class device_pci { }; + class device_pcmcia { }; + class device_pnp { }; + class device_pnp_card { }; + class device_serio { }; + class device_usb { }; + class device_vio { }; + + class version_2_6_16 { }; + + namespace internal + { + template + struct def {}; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + template<> struct def { static const std::string symbol; }; + } + + class table_entry + { + public: + virtual ~table_entry () {}; + virtual void write (std::ostream &) const throw (std::runtime_error) = 0; + }; + + template + class table_entry_version : public table_entry + { + }; + + template + class table_entry_data : public table_entry_version + { + }; + + class table_base + { + public: + virtual ~table_base () throw () {}; + + void write (std::ostream &out) const throw (std::runtime_error); + + + protected: + table_base () throw () {}; + + std::list entries; + }; + + template + void table_create (std::list &, const module_real *m, const Elf::file *f) throw (std::runtime_error); + + template + class table : public table_base + { + public: + static table_base *create (const module_real *m, const Elf::file *f) throw (std::runtime_error); + + protected: + table () {}; + }; + + template + class table_data : public table + { + public: + table_data (const void *, size_t) throw (std::runtime_error); + }; + } +} + +#ifndef DISABLE_TEMPLATES +#include "module_devicetable.tpp" +#endif + +#endif diff --git a/src/mod/module_devicetable.tpp b/src/mod/module_devicetable.tpp new file mode 100644 index 000000000..466ebaaa2 --- /dev/null +++ b/src/mod/module_devicetable.tpp @@ -0,0 +1,60 @@ +/* + * module_devicetable.tpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef MODULE_DEVICETABLE_TPP +#define MODULE_DEVICETABLE_TPP + +#include "module.hpp" + +namespace linuxkernel +{ + namespace module_devicetable + { + template + void table_create (std::list &list, const module_real *m, const Elf::file *file) throw (std::runtime_error) + { + list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); +// list.push_back (table::create (m, file)); + } + + template + table_base *table::create (const module_real *m, const Elf::file *f) throw (std::runtime_error) + { + const Elf::symbol *sym = m->_get_symbol (internal::def::symbol); + if (!sym) + return 0; + const Elf::section *sec = f->get_section (sym->get_shndx ()); + const char *mem = static_cast (sec->_mem ()); + return new table_data (mem + sym->get_value (), sym->get_size ()); + } + } +} + +#endif diff --git a/src/mod/module_devicetable_impl_2_6_16.cpp b/src/mod/module_devicetable_impl_2_6_16.cpp new file mode 100644 index 000000000..eea414f8c --- /dev/null +++ b/src/mod/module_devicetable_impl_2_6_16.cpp @@ -0,0 +1,313 @@ +/* + * module_devicetable_impl_2_6_16.cpp + * + * Copyright (C) 2005 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "module_devicetable_impl_2_6_16.hpp" + +#include +#include +#include + +using namespace linuxkernel::module_devicetable; + +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () +{ + char buf[4]; + snprintf (buf, sizeof (buf), "%02X", id.value); + out << buf; + return out; +} + +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () +{ + char buf[8]; + snprintf (buf, sizeof (buf), "%04X", id.value); + out << buf; + return out; +} + +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () +{ + char buf[12]; + snprintf (buf, sizeof (buf), "%08X", id.value); + out << buf; + return out; +} + +table_entry_version::table_entry_version () throw () : + cu_type ("t"), + dev_type ("m"), + cu_model ("dt"), + dev_model ("dm") +{ } + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + out << "ccw:"; + cu_type.write (out, match_flags & CCW_DEVICE_ID_MATCH_CU_TYPE); + cu_model.write (out, match_flags & CCW_DEVICE_ID_MATCH_CU_MODEL); + dev_type.write (out, match_flags & CCW_DEVICE_ID_MATCH_DEVICE_TYPE); + dev_model.write (out, match_flags & CCW_DEVICE_ID_MATCH_DEVICE_TYPE); +} + +table_entry_version::table_entry_version () throw () : + vendor_id ("ven"), + model_id ("mo"), + specifier_id ("sp"), + version ("ver") +{ } + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + out << "ieee1394:"; + vendor_id.write (out, match_flags & IEEE1394_MATCH_VENDOR_ID); + model_id.write (out, match_flags & IEEE1394_MATCH_MODEL_ID); + specifier_id.write (out, match_flags & IEEE1394_MATCH_SPECIFIER_ID); + version.write (out, match_flags & IEEE1394_MATCH_VERSION, true); +} + +table_entry_version::table_entry_version () throw () : + vendor ("v"), + device ("d"), + subvendor ("sv"), + subdevice ("sd") +{ } + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + out << "pci:"; + vendor.write (out, vendor != PCI_ANY_ID); + device.write (out, device != PCI_ANY_ID); + subvendor.write (out, subvendor != PCI_ANY_ID); + subdevice.write (out, subdevice != PCI_ANY_ID); + + identifier baseclass ("bc", class_id >> 16); + identifier_value baseclass_mask (class_mask >> 16); + identifier subclass ("sc", class_id >> 8); + identifier_value subclass_mask (class_mask >> 8); + identifier interface ("i", class_id); + identifier_value interface_mask (class_mask); + + if ((baseclass_mask != 0 && baseclass_mask != 0xFF) || + (subclass_mask != 0 && subclass_mask != 0xFF) || + (interface_mask != 0 && interface_mask != 0xFF)) + throw std::runtime_error ("Can't handle masks"); + + baseclass.write (out, baseclass_mask == 0xFF); + subclass.write (out, subclass_mask == 0xFF); + interface.write (out, interface_mask == 0xFF, true); +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + out << "pnp:" << str << '*'; +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + out << "pnp:" << str << '*'; +} + +table_entry_version::table_entry_version () throw () : + idVendor ("v"), + idProduct ("p"), + bDeviceClass ("dc"), + bDeviceSubClass ("dsc"), + bDeviceProtocol ("dp"), + bInterfaceClass ("ic"), + bInterfaceSubClass ("isc"), + bInterfaceProtocol ("ip") +{ } + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ + if (!idVendor && !bDeviceClass && !bInterfaceClass) + return; + + out << "usb:"; + idVendor.write (out, match_flags & USB_DEVICE_ID_MATCH_VENDOR); + idProduct.write (out, match_flags & USB_DEVICE_ID_MATCH_PRODUCT); + out << 'd'; + if (bcdDevice_initial_digits) + { + char buf[12]; + snprintf (buf, sizeof (buf), "%0*X", bcdDevice_initial_digits, bcdDevice_initial); + out << buf; + } + if (range_lo == range_hi) + out << static_cast (range_lo); + else if (range_lo > 0 || range_hi < 9) + out << '[' << static_cast (range_lo) << '-' << static_cast (range_hi) << ']'; + if (bcdDevice_initial_digits < 3) + out << '*'; + bDeviceClass.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS); + bDeviceSubClass.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS); + bDeviceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL); + bInterfaceClass.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_CLASS); + bInterfaceSubClass.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS); + bInterfaceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL, true); +} + +#define _do_convert(name) name = Elf::convert () (id.name) + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + _do_convert (match_flags); + _do_convert (cu_type); + _do_convert (dev_type); + _do_convert (cu_model); + _do_convert (dev_model); +} + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + _do_convert (match_flags); + _do_convert (vendor_id); + _do_convert (model_id); + _do_convert (specifier_id); + _do_convert (version); +} + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + _do_convert (vendor); + _do_convert (device); + _do_convert (subvendor); + _do_convert (subdevice); + _do_convert (class_id); + _do_convert (class_mask); +} + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + std::stringstream s; + s << 'd'; + s << static_cast (static_cast (id.id)); + str = s.str (); +} + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + std::stringstream s; + s << 'c'; + s << static_cast (static_cast (id.id)); + for (int i = 0; i < PNP_MAX_DEVICES; i++) + { + if (! *id.devs[i].id) + break; + s << 'd'; + s << static_cast (static_cast (id.devs[i].id)); + } + str = s.str (); +} + +template +table_entry_data::table_entry_data (const device_id &id, uint16_t _bcdDevice_initial, int _bcdDevice_initial_digits, unsigned char _range_lo, unsigned char _range_hi) throw () +{ + _do_convert (match_flags); + _do_convert (idVendor); + _do_convert (idProduct); + _do_convert (bDeviceClass); + _do_convert (bDeviceSubClass); + _do_convert (bDeviceProtocol); + _do_convert (bInterfaceClass); + _do_convert (bInterfaceSubClass); + _do_convert (bInterfaceProtocol); + bcdDevice_initial = _bcdDevice_initial; + bcdDevice_initial_digits = _bcdDevice_initial_digits; + range_lo = _range_lo; + range_hi = _range_hi; +} + +template +void table_entry_data::add (const device_id &id, std::list &table) throw () +{ + uint16_t match_flags; + uint16_t idVendor; + uint16_t bcdDevice_lo = 0; + uint16_t bcdDevice_hi = ~0; + uint8_t bDeviceClass; + uint8_t bInterfaceClass; + + _do_convert (match_flags); + _do_convert (idVendor); + if (match_flags & USB_DEVICE_ID_MATCH_DEV_LO) + _do_convert (bcdDevice_lo); + if (match_flags & USB_DEVICE_ID_MATCH_DEV_HI) + _do_convert (bcdDevice_hi); + _do_convert (bDeviceClass); + _do_convert (bInterfaceClass); + + if (!(idVendor | bDeviceClass | bInterfaceClass)) + return; + + for (int ndigits = 3; bcdDevice_lo <= bcdDevice_hi; ndigits--) + { + unsigned char clo = bcdDevice_lo & 0xf; + unsigned char chi = bcdDevice_hi & 0xf; + + if (chi > 9) /* it's bcd not hex */ + chi = 9; + + bcdDevice_lo >>= 4; + bcdDevice_hi >>= 4; + + if (bcdDevice_lo == bcdDevice_hi || !ndigits) + { + table.push_back (new table_entry_data (id, bcdDevice_lo, ndigits, clo, chi)); + return; + } + + if (clo > 0) + table.push_back (new table_entry_data (id, bcdDevice_lo++, ndigits, clo, 9)); + + if (chi < 9) + table.push_back (new table_entry_data (id, bcdDevice_hi--, ndigits, 0, chi)); + } +} + +template +table_data::table_data (const void *mem, size_t size) throw (std::runtime_error) +{ + if (size % sizeof (devin)) + throw std::runtime_error ("Bad size"); + size_t len = size / sizeof (devin); + // Remove the terminator. + len--; + const devin *e = static_cast (mem); + for (size_t i = 0; i < len; ++i) + table_entry_data::add (e[i], this->entries); +} + +#define make_templates(name) \ +template class table_data; \ +template class table_data; \ +template class table_data; \ +template class table_data +make_templates(device_ccw); +make_templates(device_ieee1394); +make_templates(device_pci); +make_templates(device_pnp); +make_templates(device_pnp_card); +make_templates(device_usb); diff --git a/src/mod/module_devicetable_impl_2_6_16.hpp b/src/mod/module_devicetable_impl_2_6_16.hpp new file mode 100644 index 000000000..950a2365a --- /dev/null +++ b/src/mod/module_devicetable_impl_2_6_16.hpp @@ -0,0 +1,391 @@ +/* + * module_devicetable_impl_2_6_16.hpp + * + * Copyright (C) 2005, 2006 Bastian Blank + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef MODULE_DEVICETABLE_IMPL_2_6_16_HPP +#define MODULE_DEVICETABLE_IMPL_2_6_16_HPP + +#include "module_devicetable.hpp" + +#include "elf.hpp" + +namespace +{ + using namespace linuxkernel::module_devicetable; + + template + struct _elfdef + { }; + + template<> + struct _elfdef + { + typedef uint32_t pointer; + }; + + template<> + struct _elfdef + { + typedef uint64_t pointer; + }; + + template + struct device_id + { }; + + template + struct device_id + { + uint16_t match_flags; + uint16_t cu_type; + uint16_t dev_type; + uint8_t cu_model; + uint8_t dev_model; + typename _elfdef::pointer driver_info; + }; + + enum + { + CCW_DEVICE_ID_MATCH_CU_TYPE = 0x01, + CCW_DEVICE_ID_MATCH_CU_MODEL = 0x02, + CCW_DEVICE_ID_MATCH_DEVICE_TYPE = 0x04, + CCW_DEVICE_ID_MATCH_DEVICE_MODEL = 0x08, + }; + + template + struct device_id + { + uint16_t id; + }; + + template + struct device_id + { + uint32_t match_flags; + uint32_t vendor_id; + uint32_t model_id; + uint32_t specifier_id; + uint32_t version; + typename _elfdef::pointer driver_info; + }; + + enum + { + IEEE1394_MATCH_VENDOR_ID = 0x0001, + IEEE1394_MATCH_MODEL_ID = 0x0002, + IEEE1394_MATCH_SPECIFIER_ID = 0x0004, + IEEE1394_MATCH_VERSION = 0x0008, + }; + + template + struct device_id + { + uint32_t vendor, device; + uint32_t subvendor, subdevice; + uint32_t class_id, class_mask; + typename _elfdef::pointer driver_info; + }; + + const unsigned int PCI_ANY_ID = ~0U; + const int PNP_ID_LEN = 8; + const int PNP_MAX_DEVICES = 8; + + template + struct device_id + { + uint8_t id[PNP_ID_LEN]; + typename _elfdef::pointer driver_info; + }; + + template + struct device_id + { + uint8_t id[PNP_ID_LEN]; + typename _elfdef::pointer driver_info; + struct + { + uint8_t id[PNP_ID_LEN]; + } + devs[PNP_MAX_DEVICES]; + }; + + template + struct device_id + { + uint8_t type; + uint8_t extra; + uint8_t id; + uint8_t proto; + }; + + enum + { + SERIO_DEVICE_ID_ANY = 0xff, + }; + + template + struct device_id + { + uint16_t match_flags; + uint16_t idVendor; + uint16_t idProduct; + uint16_t bcdDevice_lo; + uint16_t bcdDevice_hi; + uint8_t bDeviceClass; + uint8_t bDeviceSubClass; + uint8_t bDeviceProtocol; + uint8_t bInterfaceClass; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; + typename _elfdef::pointer driver_info; + }; + + enum + { + USB_DEVICE_ID_MATCH_VENDOR = 0x0001, + USB_DEVICE_ID_MATCH_PRODUCT = 0x0002, + USB_DEVICE_ID_MATCH_DEV_LO = 0x0004, + USB_DEVICE_ID_MATCH_DEV_HI = 0x0008, + USB_DEVICE_ID_MATCH_DEV_CLASS = 0x0010, + USB_DEVICE_ID_MATCH_DEV_SUBCLASS = 0x0020, + USB_DEVICE_ID_MATCH_DEV_PROTOCOL = 0x0040, + USB_DEVICE_ID_MATCH_INT_CLASS = 0x0080, + USB_DEVICE_ID_MATCH_INT_SUBCLASS = 0x0100, + USB_DEVICE_ID_MATCH_INT_PROTOCOL = 0x0200, + }; + + template + class identifier_value + { + public: + type value; + + identifier_value () : value (0) { } + identifier_value (const type &value) : value (value) { } + const type &operator = (const type &_value) { value = _value; return value; } + bool operator ! () const { return !value; } + operator type () const { return value; } + template + void set (const type _value) + { value = Elf::convert () (_value); } + }; + + template + class identifier + { + public: + identifier_value value; + std::string sep; + + identifier (const std::string &sep) : sep (sep) { } + identifier (const std::string &sep, const type &value) : value (value), sep (sep) { } + const type &operator = (const type &_value) { value = _value; return value.value; } + bool operator ! () const { return !value; } + operator type () const { return value; } + void write (std::ostream &out, bool enable, bool last = false) const + { + out << sep; + if (enable) + { + out << value; + if (last) + out << '*'; + } + else + out << '*'; + } + }; +} + +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); +std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); + +namespace linuxkernel +{ + namespace module_devicetable + { + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + + identifier_value match_flags; + identifier cu_type; + identifier dev_type; + identifier cu_model; + identifier dev_model; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + + identifier_value match_flags; + identifier vendor_id; + identifier model_id; + identifier specifier_id; + identifier version; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + + identifier vendor, device; + identifier subvendor, subdevice; + identifier_value class_id, class_mask; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + void write (std::ostream &) const throw (std::runtime_error); + + std::string str; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + void write (std::ostream &) const throw (std::runtime_error); + + std::string str; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + + identifier_value match_flags; + identifier idVendor; + identifier idProduct; + unsigned int bcdDevice_initial; + int bcdDevice_initial_digits; + unsigned char range_lo; + unsigned char range_hi; + identifier bDeviceClass; + identifier bDeviceSubClass; + identifier bDeviceProtocol; + identifier bInterfaceClass; + identifier bInterfaceSubClass; + identifier bInterfaceProtocol; + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &, uint16_t bcdDevice_initial, int bcdDevice_initial_digits, unsigned char range_lo, unsigned char range_hi) throw (); + + public: + static void add (const device_id &, std::list &table) throw (); + }; + + template + class table_data : public table + { + protected: + typedef device_id devin; + + public: + table_data (const void *mem, size_t size) throw (std::runtime_error); + }; + } +} + +#endif From 73c211949cc7b052753693e3c57d9aeab3530d4a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 30 Mar 2006 12:29:24 +0000 Subject: [PATCH 002/487] Merge /people/waldi/linux-kbuild-2.6. r6334: waldi | 2006-03-29 14:53:34 +0000 src/mod/module_devicetable.tpp, src/mod/module_devicetable_impl_2_6_16.cpp, src/mod/module_devicetable_impl_2_6_16.hpp: Add stubs for missing device types. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6349 --- src/mod/module_devicetable.tpp | 12 +- src/mod/module_devicetable_impl_2_6_16.cpp | 90 +++++++++++++++ src/mod/module_devicetable_impl_2_6_16.hpp | 126 +++++++++++++++++++++ 3 files changed, 222 insertions(+), 6 deletions(-) diff --git a/src/mod/module_devicetable.tpp b/src/mod/module_devicetable.tpp index 466ebaaa2..5df8f5e6d 100644 --- a/src/mod/module_devicetable.tpp +++ b/src/mod/module_devicetable.tpp @@ -31,17 +31,17 @@ namespace linuxkernel void table_create (std::list &list, const module_real *m, const Elf::file *file) throw (std::runtime_error) { list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); list.push_back (table::create (m, file)); list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); list.push_back (table::create (m, file)); -// list.push_back (table::create (m, file)); + list.push_back (table::create (m, file)); } template diff --git a/src/mod/module_devicetable_impl_2_6_16.cpp b/src/mod/module_devicetable_impl_2_6_16.cpp index eea414f8c..391b09350 100644 --- a/src/mod/module_devicetable_impl_2_6_16.cpp +++ b/src/mod/module_devicetable_impl_2_6_16.cpp @@ -66,6 +66,14 @@ void table_entry_version::write (std::ostream &out) dev_model.write (out, match_flags & CCW_DEVICE_ID_MATCH_DEVICE_TYPE); } +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + table_entry_version::table_entry_version () throw () : vendor_id ("ven"), model_id ("mo"), @@ -82,6 +90,22 @@ void table_entry_version::write (std::ostream & version.write (out, match_flags & IEEE1394_MATCH_VERSION, true); } +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + table_entry_version::table_entry_version () throw () : vendor ("v"), device ("d"), @@ -114,6 +138,14 @@ void table_entry_version::write (std::ostream &out) interface.write (out, interface_mask == 0xFF, true); } +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) { out << "pnp:" << str << '*'; @@ -124,6 +156,14 @@ void table_entry_version::write (std::ostream & out << "pnp:" << str << '*'; } +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + table_entry_version::table_entry_version () throw () : idVendor ("v"), idProduct ("p"), @@ -164,6 +204,14 @@ void table_entry_version::write (std::ostream &out) bInterfaceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL, true); } +table_entry_version::table_entry_version () throw () +{ +} + +void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +{ +} + #define _do_convert(name) name = Elf::convert () (id.name) template @@ -176,6 +224,12 @@ table_entry_data::table_entry_d _do_convert (dev_model); } +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: I2C"); +} + template table_entry_data::table_entry_data (const device_id &id) throw () { @@ -186,6 +240,18 @@ table_entry_data::table_en _do_convert (version); } +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: INPUT"); +} + +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: OF"); +} + template table_entry_data::table_entry_data (const device_id &id) throw () { @@ -197,6 +263,12 @@ table_entry_data::table_entry_d _do_convert (class_mask); } +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: PCMCIA"); +} + template table_entry_data::table_entry_data (const device_id &id) throw () { @@ -222,6 +294,12 @@ table_entry_data::table_en str = s.str (); } +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: SERIO"); +} + template table_entry_data::table_entry_data (const device_id &id, uint16_t _bcdDevice_initial, int _bcdDevice_initial_digits, unsigned char _range_lo, unsigned char _range_hi) throw () { @@ -287,6 +365,12 @@ void table_entry_data::add (con } } +template +table_entry_data::table_entry_data (const device_id &id) throw () +{ + throw std::runtime_error ("Not implemented: VIO"); +} + template table_data::table_data (const void *mem, size_t size) throw (std::runtime_error) { @@ -306,8 +390,14 @@ template class table_data; \ template class table_data make_templates(device_ccw); +make_templates(device_i2c); make_templates(device_ieee1394); +make_templates(device_input); +make_templates(device_of); make_templates(device_pci); +make_templates(device_pcmcia); make_templates(device_pnp); make_templates(device_pnp_card); +make_templates(device_serio); make_templates(device_usb); +make_templates(device_vio); diff --git a/src/mod/module_devicetable_impl_2_6_16.hpp b/src/mod/module_devicetable_impl_2_6_16.hpp index 950a2365a..3144055c1 100644 --- a/src/mod/module_devicetable_impl_2_6_16.hpp +++ b/src/mod/module_devicetable_impl_2_6_16.hpp @@ -248,6 +248,27 @@ namespace linuxkernel } }; + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + template<> class table_entry_version : public table_entry { @@ -275,6 +296,48 @@ namespace linuxkernel } }; + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + template<> class table_entry_version : public table_entry { @@ -300,6 +363,27 @@ namespace linuxkernel } }; + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + template<> class table_entry_version : public table_entry { @@ -344,6 +428,27 @@ namespace linuxkernel } }; + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + template<> class table_entry_version : public table_entry { @@ -376,6 +481,27 @@ namespace linuxkernel static void add (const device_id &, std::list &table) throw (); }; + template<> + class table_entry_version : public table_entry + { + public: + table_entry_version () throw (); + void write (std::ostream &) const throw (std::runtime_error); + }; + + template + class table_entry_data : public table_entry_version + { + protected: + table_entry_data (const device_id &) throw (); + + public: + static void add (const device_id &id, std::list &table) throw () + { + table.push_back (new table_entry_data (id)); + } + }; + template class table_data : public table { From 0ac73fb1e946d5bea532b9b8d8db73070b04af83 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 1 May 2006 21:24:59 +0000 Subject: [PATCH 003/487] debian/rules: Exclude src from orig. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6519 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 35f00e297..02746bcc3 100755 --- a/debian/rules +++ b/debian/rules @@ -18,7 +18,7 @@ $(BUILD_DIR) $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ orig: ../orig/linux-kbuild-$(MAJOR)-$(VERSION) - rsync --delete --exclude debian --exclude .svn --link-dest=$^/ -av $^/ . + rsync --delete --exclude debian --exclude src --exclude .svn --link-dest=$^/ -av $^/ . ../orig/linux-kbuild-$(MAJOR)-$(VERSION): if [ -f "../linux-kbuild-$(MAJOR)_$(VERSION).orig.tar.gz" ]; then \ From 758bb00fad6b4680c18a7d6bcecbcbe9415782ea Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 1 May 2006 21:25:38 +0000 Subject: [PATCH 004/487] debian/changelog: Update to 2.6.17-rc3. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6520 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7bc4bc4f4..152d24716 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.16-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.16+2.6.17-rc3-1) UNRELEASED; urgency=low * Initial release. From 2f04d5e020d63db0d7b4fcaad4be1862cefb3a32 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 1 May 2006 21:26:54 +0000 Subject: [PATCH 005/487] debian/rules: Fix. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6521 --- debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/rules b/debian/rules index 02746bcc3..6dfe2ce3e 100755 --- a/debian/rules +++ b/debian/rules @@ -40,7 +40,6 @@ clean: debian/control binary-indep: dh_testdir - $(MAKE) -f debian/rules.gen binary-indep binary-arch: dh_testdir From 7898c22d84db2349a5750f870ed73544a0e9d967 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 17 Jun 2006 20:03:48 +0000 Subject: [PATCH 006/487] src/mod/modpost.cpp: Add support for -I. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6813 --- src/mod/modpost.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/modpost.cpp b/src/mod/modpost.cpp index 4e5a0c899..61a84d265 100644 --- a/src/mod/modpost.cpp +++ b/src/mod/modpost.cpp @@ -36,7 +36,7 @@ int main (int argc, char *const argv[]) const char *dump_read = 0, *dump_write = 0; bool all_versions = false, modversions = false;; - while ((opt = getopt (argc, argv, "ai:mo:")) != -1) + while ((opt = getopt (argc, argv, "ai:I:mo:")) != -1) { switch(opt) { case 'a': @@ -47,6 +47,10 @@ int main (int argc, char *const argv[]) case 'i': dump_read = optarg; break; + case 'I': + // Lacks special casing. + dump_read = optarg; + break; case 'm': modversions = true; break; From 71e2e62bfe61bbf9de73bec6d9a91f4d1cf03be4 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 17 Jun 2006 20:37:54 +0000 Subject: [PATCH 007/487] src/mod/modpost.cpp, src/mod/module.cpp, src/mod/module.hpp: Add correct handling for out of tree symbol lists. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6814 --- src/mod/modpost.cpp | 15 ++++++++------- src/mod/module.cpp | 25 +++++++------------------ src/mod/module.hpp | 10 +++++----- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/mod/modpost.cpp b/src/mod/modpost.cpp index 61a84d265..9afd7719f 100644 --- a/src/mod/modpost.cpp +++ b/src/mod/modpost.cpp @@ -33,7 +33,7 @@ int main (int argc, char *const argv[]) { int ret = EXIT_SUCCESS; int opt; - const char *dump_read = 0, *dump_write = 0; + const char *dump_read_kernel = 0, *dump_read_module = 0, *dump_write = 0; bool all_versions = false, modversions = false;; while ((opt = getopt (argc, argv, "ai:I:mo:")) != -1) @@ -45,11 +45,10 @@ int main (int argc, char *const argv[]) return EXIT_FAILURE; break; case 'i': - dump_read = optarg; + dump_read_kernel = optarg; break; case 'I': - // Lacks special casing. - dump_read = optarg; + dump_read_module = optarg; break; case 'm': modversions = true; @@ -62,8 +61,10 @@ int main (int argc, char *const argv[]) } } - if (dump_read) - modules.dump_read (dump_read); + if (dump_read_kernel) + modules.dump_read (dump_read_kernel, true); + if (dump_read_module) + modules.dump_read (dump_read_module, false); for (int i = optind; i < argc; i++) { @@ -82,7 +83,7 @@ int main (int argc, char *const argv[]) modules.write (modversions); if (dump_write) - modules.dump_write (dump_write); + modules.dump_write (dump_write, dump_read_module ? false : true); return ret; } diff --git a/src/mod/module.cpp b/src/mod/module.cpp index 78b00deca..2546a6f44 100644 --- a/src/mod/module.cpp +++ b/src/mod/module.cpp @@ -34,21 +34,8 @@ const std::string module_real::symbol_name_init ("init_module"); const std::string module_real::symbol_prefix_crc ("__crc_"); const std::string module_real::symbol_prefix_ksymtab ("__ksymtab_"); -module::module (const std::string &name) throw () -: name (name) -{ - std::string::size_type t1 = name.find_last_of ('/'); - if (t1 == std::string::npos) - t1 = 0; - else - t1++; - name_short = name.substr (t1, std::string::npos); - - if (name == "vmlinux") - is_vmlinux = true; -} - -module::module (const std::string &filename, bool) throw () +module::module (const std::string &filename, bool kernel) throw () +: kernel (kernel) { std::string::size_type t1 = filename.find_last_of ('/'); std::string::size_type t2 = filename.find_last_of ('.'); @@ -327,7 +314,7 @@ modulelist::~modulelist () throw () delete it->second; } -void modulelist::dump_read (const std::string &filename) throw (std::runtime_error) +void modulelist::dump_read (const std::string &filename, bool kernel) throw (std::runtime_error) { std::ifstream in (filename.c_str ()); while (in.good ()) @@ -342,7 +329,7 @@ void modulelist::dump_read (const std::string &filename) throw (std::runtime_err module *mod; if (it == modules_shadow.end ()) { - mod = new module (module_name); + mod = new module (module_name, kernel); modules_shadow.insert (_modules_shadow_pair (module_name, mod)); } else @@ -354,7 +341,7 @@ void modulelist::dump_read (const std::string &filename) throw (std::runtime_err } } -void modulelist::dump_write (const std::string &filename) const throw (std::runtime_error) +void modulelist::dump_write (const std::string &filename, bool kernel) const throw (std::runtime_error) { char buf[128]; std::ofstream out (filename.c_str (), std::ios::trunc); @@ -363,6 +350,8 @@ void modulelist::dump_write (const std::string &filename) const throw (std::runt { const module *mod = get_module (it->second); const symbol_exported &sym = get_symbol (it->first); + if (!kernel && mod->get_kernel ()) + continue; snprintf (buf, sizeof (buf), "0x%08x\t%s\t%s\n", sym.get_crc (), it->first.c_str (), mod->get_name ().c_str ()); out << buf; } diff --git a/src/mod/module.hpp b/src/mod/module.hpp index a8f9292e6..2341f51ae 100644 --- a/src/mod/module.hpp +++ b/src/mod/module.hpp @@ -41,17 +41,17 @@ namespace linuxkernel public: typedef std::map _symbols_exported; - module (const std::string &name) throw (); + module (const std::string &name, bool kernel) throw (); + bool get_kernel () const throw () { return kernel; } bool get_is_vmlinux () const throw () { return is_vmlinux; } const std::string &get_name () const throw () { return name; } const std::string &get_name_short () const throw () { return name_short; } const _symbols_exported &get_symbols_exported () const throw () { return symbols_exported; } protected: - module (const std::string &filename, bool) throw (); - std::string name, name_short; + bool kernel; bool is_vmlinux; _symbols_exported symbols_exported; @@ -117,8 +117,8 @@ namespace linuxkernel modulelist () throw (); ~modulelist () throw (); - void dump_read (const std::string &filename) throw (std::runtime_error); - void dump_write (const std::string &filename) const throw (std::runtime_error); + void dump_read (const std::string &filename, bool kernel) throw (std::runtime_error); + void dump_write (const std::string &filename, bool kernel) const throw (std::runtime_error); const _modules_real &get_modules_real () const throw () { return modules_real; } const _modules_shadow &get_modules_shadow () const throw () { return modules_shadow; } From 8863baffd85ac5e545e5887ad1d84c8e15f8b1f1 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 20 Jun 2006 13:01:51 +0000 Subject: [PATCH 008/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6843 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 152d24716..c0290514f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -linux-kbuild-2.6 (2.6.16+2.6.17-rc3-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.17-1) UNRELEASED; urgency=low * Initial release. - -- Bastian Blank Mon, 27 Mar 2006 19:06:30 +0200 + -- Bastian Blank Tue, 20 Jun 2006 14:57:00 +0200 From a296ae87417cff83ba1501736c5f39880640fa8f Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 25 Jun 2006 12:46:43 +0000 Subject: [PATCH 009/487] src/mod/module_devicetable_impl_2_6_16.cpp, src/mod/module_devicetable_impl_2_6_16.hpp - Implement vio. - Mark variables as unused. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6894 --- src/mod/module_devicetable_impl_2_6_16.cpp | 30 +++++++++++----------- src/mod/module_devicetable_impl_2_6_16.hpp | 10 +++++++- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/mod/module_devicetable_impl_2_6_16.cpp b/src/mod/module_devicetable_impl_2_6_16.cpp index 391b09350..23e9d7bd1 100644 --- a/src/mod/module_devicetable_impl_2_6_16.cpp +++ b/src/mod/module_devicetable_impl_2_6_16.cpp @@ -70,7 +70,7 @@ table_entry_version::table_entry_version () throw () { } -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) { } @@ -94,7 +94,7 @@ table_entry_version::table_entry_version () throw { } -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) { } @@ -102,7 +102,7 @@ table_entry_version::table_entry_version () throw () { } -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) { } @@ -142,7 +142,7 @@ table_entry_version::table_entry_version () throw { } -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) { } @@ -160,7 +160,7 @@ table_entry_version::table_entry_version () throw { } -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) +void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) { } @@ -204,12 +204,9 @@ void table_entry_version::write (std::ostream &out) bInterfaceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL, true); } -table_entry_version::table_entry_version () throw () -{ -} - void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) { + out << "vio:" << str << '*'; } #define _do_convert(name) name = Elf::convert () (id.name) @@ -225,7 +222,7 @@ table_entry_data::table_entry_d } template -table_entry_data::table_entry_data (const device_id &id) throw () +table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () { throw std::runtime_error ("Not implemented: I2C"); } @@ -241,13 +238,13 @@ table_entry_data::table_en } template -table_entry_data::table_entry_data (const device_id &id) throw () +table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () { throw std::runtime_error ("Not implemented: INPUT"); } template -table_entry_data::table_entry_data (const device_id &id) throw () +table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () { throw std::runtime_error ("Not implemented: OF"); } @@ -264,7 +261,7 @@ table_entry_data::table_entry_d } template -table_entry_data::table_entry_data (const device_id &id) throw () +table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () { throw std::runtime_error ("Not implemented: PCMCIA"); } @@ -295,7 +292,7 @@ table_entry_data::table_en } template -table_entry_data::table_entry_data (const device_id &id) throw () +table_entry_data::table_entry_data (const device_id &id __attribute__((unused))) throw () { throw std::runtime_error ("Not implemented: SERIO"); } @@ -368,7 +365,10 @@ void table_entry_data::add (con template table_entry_data::table_entry_data (const device_id &id) throw () { - throw std::runtime_error ("Not implemented: VIO"); + std::stringstream s; + s << 'T' << (id.type[0] ? id.type : "*"); + s << 'S' << (id.compat[0] ? id.compat : "*"); + str = s.str (); } template diff --git a/src/mod/module_devicetable_impl_2_6_16.hpp b/src/mod/module_devicetable_impl_2_6_16.hpp index 3144055c1..a13f57953 100644 --- a/src/mod/module_devicetable_impl_2_6_16.hpp +++ b/src/mod/module_devicetable_impl_2_6_16.hpp @@ -170,6 +170,13 @@ namespace USB_DEVICE_ID_MATCH_INT_PROTOCOL = 0x0200, }; + template + struct device_id + { + char type[32]; + char compat[32]; + }; + template class identifier_value { @@ -485,8 +492,9 @@ namespace linuxkernel class table_entry_version : public table_entry { public: - table_entry_version () throw (); void write (std::ostream &) const throw (std::runtime_error); + + std::string str; }; template From 192c6b3aeceade6d10616719770c81035b90bec9 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Jun 2006 17:08:56 +0000 Subject: [PATCH 010/487] src/mod/Makefile: Implement clean target. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6897 --- src/mod/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/Makefile b/src/mod/Makefile index 7b842c788..d954f3f7f 100644 --- a/src/mod/Makefile +++ b/src/mod/Makefile @@ -15,3 +15,5 @@ modpost: elf.o modpost.o module.o module_devicetable.o module_devicetable_impl_2 %.o: %.cpp %.hpp endian.hpp +clean: + rm $(PROGS) *.o From c733e511f6fd66a66dc0f5ed50c4dfb383570bec Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Jun 2006 17:14:43 +0000 Subject: [PATCH 011/487] debian/changelog - Update. - Prepare to release (2.6.17-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=6898 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index c0290514f..52ff59fab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -linux-kbuild-2.6 (2.6.17-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.17-1) unstable; urgency=low - * Initial release. + * Initial release. (closes: #368544) - -- Bastian Blank Tue, 20 Jun 2006 14:57:00 +0200 + -- Bastian Blank Mon, 26 Jun 2006 19:14:15 +0200 From bb9dba2202677fbceb161caa7b4c8fed98aa46ac Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Jun 2006 17:56:44 +0000 Subject: [PATCH 012/487] debian/templates/control.main.in: Add proper description. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6899 --- debian/templates/control.main.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index d22603e7a..50ccaec02 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -3,5 +3,5 @@ Architecture: any Section: devel Priority: optional Provides: linux-kbuild, linux-kbuild-@major@ -Description: Linux kernel - Kbuild +Description: Kbuild infrastructure for Linux @version@ + This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From 4ba1e9a3f7b7e221e3e2c299b8c52e92dfe0b10b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Jun 2006 18:26:26 +0000 Subject: [PATCH 013/487] debian/copyright: Add. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6900 --- debian/copyright | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 debian/copyright diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..7cba3d457 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,45 @@ +This package was downloaded from http://kernel.org/pub/linux/kernel. + +Linux was written by Linus Torvalds +and others. + +Copyright: +1995-1997 H. Peter Anvin +1996,1997 Linux International +1997,1998 Andrew Tridgell +1998 Michael Zucchi +1999,2004 Matt Mackall +2000 MontaVista Software, Inc. +2000,2001 Tim Waugh +2001 Simon Huggins +2001-2003 Geert Uytterhoeven +2002 David S. Miller +2002 James Morris +2002,2003 Randy Dunlap +2002,2003 Kai Germaschewski +2002-2003 Romain Lievin +2002-2003 Rusty Russel +2002-2005 Roman Zippel +2002-2005 Sam Ravnborg +2005 Arnaldo Carvalho de Melo +2005,2006 Bastian Blank +2006 Sam Ravnborg + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. From ffb9b76d90c70547b57f8f1294aa7099c270b744 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 29 Jun 2006 20:20:38 +0000 Subject: [PATCH 014/487] debian/changelog: Unrelease. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6927 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 52ff59fab..6c253cf40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.17-1) unstable; urgency=low +linux-kbuild-2.6 (2.6.17-1) UNRELEASED; urgency=low * Initial release. (closes: #368544) From 6e614d08039aa849623732a33d23e28cb6717498 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 16:40:47 +0000 Subject: [PATCH 015/487] debian/templates/control.source.in: Update Standards-Version. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6933 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index d9c910587..16678b49f 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,5 +3,5 @@ Section: devel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank -Standards-Version: 3.6.2.0 +Standards-Version: 3.7.2 Build-Depends: debhelper (>= 4.1.0) From 51622b4b453b69154841e20eefd05a49c92a6d94 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 16:44:41 +0000 Subject: [PATCH 016/487] src/Makefile: Install a lot of files non executable. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6934 --- src/Makefile | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile index 59c897e78..a472e72b8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,6 +6,16 @@ PROGS = \ kallsyms \ pnmtologo +DATA = \ + Kbuild.include \ + Makefile.build \ + Makefile.clean \ + Makefile.host \ + Makefile.lib \ + Makefile.modinst \ + Makefile.modpost \ + mkversion + SCRIPTS = \ checkconfig.pl \ checkincludes.pl \ @@ -13,19 +23,11 @@ SCRIPTS = \ checkversion.pl \ gcc-version.sh \ gen_initramfs_list.sh \ - Kbuild.include \ kernel-doc \ Lindent \ - Makefile.build \ - Makefile.clean \ - Makefile.host \ - Makefile.lib \ - Makefile.modinst \ - Makefile.modpost \ makelst \ mksysmap \ mkuboot.sh \ - mkversion \ namespace.pl \ patch-kernel \ reference_discarded.pl \ @@ -47,10 +49,14 @@ all-local: $(PROGS) install-local: $(PROGS) @list='$(PROGS)'; for p in $$list; do \ echo " install -D '$$p' '$(prefix)/scripts/$$p'"; \ - install -D "$$p" "$(prefix)/scripts/$$p"; \ + install -D -m755 "$$p" "$(prefix)/scripts/$$p"; \ done @list='$(SCRIPTS)'; for p in $$list; do \ echo " install -D '$(top_srcdir)/scripts/$$p' '$(prefix)/scripts/$$p'"; \ - install -D "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ + install -D -m755 "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ + done + @list='$(DATA)'; for p in $$list; do \ + echo " install -D '$(top_srcdir)/scripts/$$p' '$(prefix)/scripts/$$p'"; \ + install -D -m644 "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ done From 741485d8b9045033579399ca2b5779cfcb4f75cb Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 16:46:15 +0000 Subject: [PATCH 017/487] debian/templates/control.main.in: Add forgotten Depends line. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6935 --- debian/templates/control.main.in | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 50ccaec02..62101acc3 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -2,6 +2,7 @@ Package: linux-kbuild-@version@ Architecture: any Section: devel Priority: optional +Depends: ${shlibs:Depends} Provides: linux-kbuild, linux-kbuild-@major@ Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From 9ab94e8ae6cb0b14af7f14385fa8d4e26df0e748 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 17:02:01 +0000 Subject: [PATCH 018/487] * src/Makefile, src/basic/Makefile, src/genksyms/Makefile, src/kconfig/Makefile, src/mod/Makefile - Remove generic targets. - Add directory informations. * src/Makefile.inc: Add generic targets. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6936 --- src/Makefile | 16 ---------------- src/Makefile.inc | 16 ++++++++++++++++ src/basic/Makefile | 9 +-------- src/genksyms/Makefile | 9 +-------- src/kconfig/Makefile | 9 +-------- src/mod/Makefile | 8 +------- 6 files changed, 20 insertions(+), 47 deletions(-) diff --git a/src/Makefile b/src/Makefile index a472e72b8..e8a9049ff 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,19 +44,3 @@ SUBDIRS = \ VPATH = $(top_srcdir)/scripts -all-local: $(PROGS) - -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/$$p'"; \ - install -D -m755 "$$p" "$(prefix)/scripts/$$p"; \ - done - @list='$(SCRIPTS)'; for p in $$list; do \ - echo " install -D '$(top_srcdir)/scripts/$$p' '$(prefix)/scripts/$$p'"; \ - install -D -m755 "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ - done - @list='$(DATA)'; for p in $$list; do \ - echo " install -D '$(top_srcdir)/scripts/$$p' '$(prefix)/scripts/$$p'"; \ - install -D -m644 "$(top_srcdir)/scripts/$$p" "$(prefix)/scripts/$$p"; \ - done - diff --git a/src/Makefile.inc b/src/Makefile.inc index 54694b90f..cbdf1f174 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -15,3 +15,19 @@ all-recursive install-recursive: || exit 1; \ done +all-local: $(PROGS) + +install-local: $(PROGS) + @list='$(PROGS)'; for p in $$list; do \ + echo " install -D '$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ + install -D -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ + done + @list='$(SCRIPTS)'; for p in $$list; do \ + echo " install -D '$(top_srcdir)/scripts/$(OUTDIR)/$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ + install -D -m755 "$(top_srcdir)/scripts/$(OUTDIR)/$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ + done + @list='$(DATA)'; for p in $$list; do \ + echo " install -D '$(top_srcdir)/scripts/$(OUTDIR)/$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ + install -D -m644 "$(top_srcdir)/scripts/$(OUTDIR)/$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ + done + diff --git a/src/basic/Makefile b/src/basic/Makefile index 9e2eee865..d8f86225c 100644 --- a/src/basic/Makefile +++ b/src/basic/Makefile @@ -5,13 +5,6 @@ PROGS = \ fixdep \ split-include +OUTDIR = basic VPATH = $(top_srcdir)/scripts/basic -all-local: $(PROGS) - -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/basic/$$p'"; \ - install -D "$$p" "$(prefix)/scripts/basic/$$p"; \ - done - diff --git a/src/genksyms/Makefile b/src/genksyms/Makefile index e53e29239..df07cf141 100644 --- a/src/genksyms/Makefile +++ b/src/genksyms/Makefile @@ -2,18 +2,11 @@ include ../Makefile.inc PROGS = genksyms +OUTDIR = genksyms VPATH = $(top_srcdir)/scripts/genksyms CFLAGS += -I$(top_srcdir)/scripts/genksyms -all-local: $(PROGS) - -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/genksyms/$$p'"; \ - install -D "$$p" "$(prefix)/scripts/genksyms/$$p"; \ - done - genksyms: genksyms.o parse.o lex.o lex.o: keywords.c parse.h diff --git a/src/kconfig/Makefile b/src/kconfig/Makefile index b282b9c0a..9e41f005b 100644 --- a/src/kconfig/Makefile +++ b/src/kconfig/Makefile @@ -2,18 +2,11 @@ include ../Makefile.inc PROGS = conf +OUTDIR = kconfig VPATH = $(top_srcdir)/scripts/kconfig CFLAGS += -I$(top_srcdir)/scripts/kconfig -all-local: $(PROGS) - -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/kconfig/$$p'"; \ - install -D "$$p" "$(prefix)/scripts/kconfig/$$p"; \ - done - conf: conf.o zconf.tab.o zconf.tab.c: zconf.hash.c lex.zconf.c diff --git a/src/mod/Makefile b/src/mod/Makefile index d954f3f7f..e966d0f60 100644 --- a/src/mod/Makefile +++ b/src/mod/Makefile @@ -2,13 +2,7 @@ include ../Makefile.inc PROGS = modpost -all-local: $(PROGS) - -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/mod/$$p'"; \ - install -D "$$p" "$(prefix)/scripts/mod/$$p"; \ - done +OUTDIR = mod modpost: elf.o modpost.o module.o module_devicetable.o module_devicetable_impl_2_6_16.o $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ From 67f39d7e52a41e20ba369e76d21c257dc8df6b4e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 17:05:01 +0000 Subject: [PATCH 019/487] src/Makefile.inc: Fix CFLAGS assignment. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6937 --- src/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.inc b/src/Makefile.inc index cbdf1f174..b274c1d4a 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -1,6 +1,6 @@ CC = gcc CXX = g++ -CFLAGS = -Wall -W -O2 +CFLAGS += -Wall -W -O2 CXXFLAGS = $(CFLAGS) all: all-local all-recursive From 914faa80e8b09891bbbaf60898005a4d5594f5ee Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 17:05:52 +0000 Subject: [PATCH 020/487] src/Makefile, src/basic/Makefile, src/genksyms/Makefile, src/kconfig/Makefile, src/mod/Makefile: Move include to the end. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6938 --- src/Makefile | 3 +-- src/basic/Makefile | 3 +-- src/genksyms/Makefile | 4 ++-- src/kconfig/Makefile | 4 ++-- src/mod/Makefile | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile index e8a9049ff..2a499d1aa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,3 @@ -include Makefile.inc - PROGS = \ bin2c \ conmakehash \ @@ -44,3 +42,4 @@ SUBDIRS = \ VPATH = $(top_srcdir)/scripts +include Makefile.inc diff --git a/src/basic/Makefile b/src/basic/Makefile index d8f86225c..9d6355a54 100644 --- a/src/basic/Makefile +++ b/src/basic/Makefile @@ -1,5 +1,3 @@ -include ../Makefile.inc - PROGS = \ docproc \ fixdep \ @@ -8,3 +6,4 @@ PROGS = \ OUTDIR = basic VPATH = $(top_srcdir)/scripts/basic +include ../Makefile.inc diff --git a/src/genksyms/Makefile b/src/genksyms/Makefile index df07cf141..22a232876 100644 --- a/src/genksyms/Makefile +++ b/src/genksyms/Makefile @@ -1,5 +1,3 @@ -include ../Makefile.inc - PROGS = genksyms OUTDIR = genksyms @@ -16,3 +14,5 @@ lex.o: keywords.c parse.h %.h: %.h_shipped ln -s $< $@ + +include ../Makefile.inc diff --git a/src/kconfig/Makefile b/src/kconfig/Makefile index 9e41f005b..c153f0705 100644 --- a/src/kconfig/Makefile +++ b/src/kconfig/Makefile @@ -1,5 +1,3 @@ -include ../Makefile.inc - PROGS = conf OUTDIR = kconfig @@ -16,3 +14,5 @@ zconf.tab.c: zconf.hash.c lex.zconf.c %.h: %.h_shipped ln -s $< $@ + +include ../Makefile.inc diff --git a/src/mod/Makefile b/src/mod/Makefile index e966d0f60..15ac079f7 100644 --- a/src/mod/Makefile +++ b/src/mod/Makefile @@ -1,5 +1,3 @@ -include ../Makefile.inc - PROGS = modpost OUTDIR = mod @@ -11,3 +9,5 @@ modpost: elf.o modpost.o module.o module_devicetable.o module_devicetable_impl_2 clean: rm $(PROGS) *.o + +include ../Makefile.inc From be09830ff462eb2245a3565303267fe10f961def Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 17:07:37 +0000 Subject: [PATCH 021/487] debian/rules: Make really clean. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6939 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 6dfe2ce3e..d3d868cda 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,7 @@ orig: ../orig/linux-kbuild-$(MAJOR)-$(VERSION) maintainerclean: -rm debian/control debian/control.md5sum debian/rules.gen - -rm -rf scripts + -rm -rf COPYING scripts clean: debian/control dh_testdir From 78b97ce7cff5a4dc85ac2cd20a5234dd36f04914 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 1 Jul 2006 17:10:32 +0000 Subject: [PATCH 022/487] debian/changelog: Prepare to release (2.6.17-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=6940 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6c253cf40..a506c6bad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -linux-kbuild-2.6 (2.6.17-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.17-1) unstable; urgency=low * Initial release. (closes: #368544) - -- Bastian Blank Mon, 26 Jun 2006 19:14:15 +0200 + -- Bastian Blank Sat, 1 Jul 2006 19:10:07 +0200 From 43ae2b6949bd63f875b5d4241ff8e5a4cc1b50db Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 11 Jul 2006 08:00:07 +0000 Subject: [PATCH 023/487] src/mod/module.cpp: Initialize variable correctly. svn path=/dists/trunk/linux-kbuild-2.6/; revision=6981 --- src/mod/module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/module.cpp b/src/mod/module.cpp index 2546a6f44..e5ca941cf 100644 --- a/src/mod/module.cpp +++ b/src/mod/module.cpp @@ -35,7 +35,7 @@ const std::string module_real::symbol_prefix_crc ("__crc_"); const std::string module_real::symbol_prefix_ksymtab ("__ksymtab_"); module::module (const std::string &filename, bool kernel) throw () -: kernel (kernel) +: kernel (kernel), is_vmlinux (false) { std::string::size_type t1 = filename.find_last_of ('/'); std::string::size_type t2 = filename.find_last_of ('.'); From afc50bdf4c6777addd7bd28aa584073e4a4aed56 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 11 Jul 2006 08:11:05 +0000 Subject: [PATCH 024/487] debian/changelog - Update. - Prepare to release (2.6.17-2). svn path=/dists/trunk/linux-kbuild-2.6/; revision=6982 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a506c6bad..eecab793b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.17-2) unstable; urgency=low + + * Fix uninitialied variable. (closes: #377656) + + -- Bastian Blank Tue, 11 Jul 2006 10:10:24 +0200 + linux-kbuild-2.6 (2.6.17-1) unstable; urgency=low * Initial release. (closes: #368544) From d525b055b2b98963a6342ddba75a680dd98b0f0b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 19 Jul 2006 21:38:36 +0000 Subject: [PATCH 025/487] src/mod/module.cpp: Remove error for missing modinfo section. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7044 --- src/mod/module.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mod/module.cpp b/src/mod/module.cpp index e5ca941cf..d829da68f 100644 --- a/src/mod/module.cpp +++ b/src/mod/module.cpp @@ -69,16 +69,13 @@ module_real::module_real (const std::string &filename, Elf::file *file) throw (s symtab = dynamic_cast *> (*it); } - if (!is_vmlinux && !modinfo) - throw std::runtime_error ("Not a kernel module, lacks modinfo section"); if (!symtab) throw std::runtime_error ("Not a kernel module, lacks symbol table"); - if (!is_vmlinux) - { + if (modinfo) read_modinfo (modinfo); - symbols_undefined.insert (std::pair ("struct_module", symbol_undefined ("struct_module", 0))); - } + symbols_undefined.insert (std::pair ("struct_module", symbol_undefined ("struct_module", 0))); + read_symtab (symtab); } From c3687a0f8ceaea58ded4ec439f46006c566de32b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 19 Jul 2006 22:56:40 +0000 Subject: [PATCH 026/487] Replace own modpost with a dispatcher and four version of the original one. * src/mod/Makefile: Build all modpost variants. * src/mod/Makefile.real, src/mod/elfconfig.h, src/mod/modpost.c, src/mod/real-lsb-32/elfconfig.h, src/mod/real-lsb-64/elfconfig.h, src/mod/real-msb-32/elfconfig.h, src/mod/real-msb-64/elfconfig.h: Add. * src/mod/real-lsb-32, src/mod/real-lsb-64, src/mod/real-msb-32, src/mod/real-msb-64: New directory. * src/mod/elf.cpp, src/mod/elf.hpp, src/mod/endian.hpp, src/mod/modpost.cpp, src/mod/module.cpp, src/mod/module.hpp, src/mod/module_devicetable.cpp, src/mod/module_devicetable.hpp, src/mod/module_devicetable.tpp, src/mod/module_devicetable_impl_2_6_16.cpp, src/mod/module_devicetable_impl_2_6_16.hpp: Remove. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7045 --- src/mod/Makefile | 17 +- src/mod/Makefile.real | 10 + src/mod/elf.cpp | 243 ---------- src/mod/elf.hpp | 219 --------- src/mod/elfconfig.h | 7 + src/mod/endian.hpp | 138 ------ src/mod/modpost.c | 69 +++ src/mod/modpost.cpp | 89 ---- src/mod/module.cpp | 455 ------------------ src/mod/module.hpp | 204 -------- src/mod/module_devicetable.cpp | 54 --- src/mod/module_devicetable.hpp | 126 ----- src/mod/module_devicetable.tpp | 60 --- src/mod/module_devicetable_impl_2_6_16.cpp | 403 ---------------- src/mod/module_devicetable_impl_2_6_16.hpp | 525 --------------------- src/mod/real-lsb-32/elfconfig.h | 4 + src/mod/real-lsb-64/elfconfig.h | 4 + src/mod/real-msb-32/elfconfig.h | 4 + src/mod/real-msb-64/elfconfig.h | 4 + 19 files changed, 114 insertions(+), 2521 deletions(-) create mode 100644 src/mod/Makefile.real delete mode 100644 src/mod/elf.cpp delete mode 100644 src/mod/elf.hpp create mode 100644 src/mod/elfconfig.h delete mode 100644 src/mod/endian.hpp create mode 100644 src/mod/modpost.c delete mode 100644 src/mod/modpost.cpp delete mode 100644 src/mod/module.cpp delete mode 100644 src/mod/module.hpp delete mode 100644 src/mod/module_devicetable.cpp delete mode 100644 src/mod/module_devicetable.hpp delete mode 100644 src/mod/module_devicetable.tpp delete mode 100644 src/mod/module_devicetable_impl_2_6_16.cpp delete mode 100644 src/mod/module_devicetable_impl_2_6_16.hpp create mode 100644 src/mod/real-lsb-32/elfconfig.h create mode 100644 src/mod/real-lsb-64/elfconfig.h create mode 100644 src/mod/real-msb-32/elfconfig.h create mode 100644 src/mod/real-msb-64/elfconfig.h diff --git a/src/mod/Makefile b/src/mod/Makefile index 15ac079f7..e61086ffc 100644 --- a/src/mod/Makefile +++ b/src/mod/Makefile @@ -1,13 +1,20 @@ -PROGS = modpost +PROGS = \ + modpost \ + modpost.real-lsb-32 \ + modpost.real-lsb-64 \ + modpost.real-msb-32 \ + modpost.real-msb-64 OUTDIR = mod -modpost: elf.o modpost.o module.o module_devicetable.o module_devicetable_impl_2_6_16.o - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ +modpost.real-%: + $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod -%.o: %.cpp %.hpp endian.hpp +%: %.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +include ../Makefile.inc clean: rm $(PROGS) *.o -include ../Makefile.inc diff --git a/src/mod/Makefile.real b/src/mod/Makefile.real new file mode 100644 index 000000000..12b35ef89 --- /dev/null +++ b/src/mod/Makefile.real @@ -0,0 +1,10 @@ +PROGS = modpost.real-$(TYPE) + +include ../Makefile.inc + +modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +%.real-$(TYPE).o: $(SOURCEDIR)/%.c + $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $^ + diff --git a/src/mod/elf.cpp b/src/mod/elf.cpp deleted file mode 100644 index bab5f9cb9..000000000 --- a/src/mod/elf.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* - * elf.cpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "elf.hpp" -#include "endian.hpp" - -#include - -#include -#include -#include -#include - -using namespace Elf; - -namespace -{ - template - struct _elfdef - { }; - - template <> - struct _elfdef - { - typedef Elf32_Ehdr Ehdr; - typedef Elf32_Shdr Shdr; - typedef Elf32_Sym Sym; - static inline uint8_t st_bind (uint8_t st_info) throw () { return ELF32_ST_BIND (st_info); } - static inline uint8_t st_type (uint8_t st_info) throw () { return ELF32_ST_TYPE (st_info); } - }; - - template <> - struct _elfdef - { - typedef Elf64_Ehdr Ehdr; - typedef Elf64_Shdr Shdr; - typedef Elf64_Sym Sym; - static inline uint8_t st_bind (uint8_t st_info) throw () { return ELF64_ST_BIND (st_info); } - static inline uint8_t st_type (uint8_t st_info) throw () { return ELF64_ST_TYPE (st_info); } - }; -} - -file::file (const char *filename, void *mem, size_t len) throw (std::bad_alloc) -: filename (std::string (filename)), mem (mem), len (len) -{ } - -file::~file () throw () -{ - ::munmap (mem, len); - for (std::vector
::iterator it = sections.begin (); it != sections.end (); ++it) - delete *it; -} - -file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error) -{ - struct stat buf; - int fd; - void *mem; - size_t len; - if ((fd = ::open (filename, O_RDONLY)) == -1) - throw std::runtime_error ("mapping failed"); - try - { - if (::fstat (fd, &buf) == -1) - throw std::runtime_error ("mapping failed"); - len = buf.st_size; - if ((mem = ::mmap (0, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0)) == MAP_FAILED) - throw std::runtime_error ("mapping failed"); - - const uint8_t *buf = static_cast (mem); - - switch (buf[EI_CLASS]) - { - case ELFCLASS32: - return open_class (filename, buf, mem, len); - case ELFCLASS64: - return open_class (filename, buf, mem, len); - default: - throw std::runtime_error ("Invalid file class"); - } - } - catch (...) - { - ::close (fd); - throw; - } -} - -template -file *file::open_class (const char *filename, const uint8_t *buf, void * mem, size_t len) throw (std::bad_alloc, std::runtime_error) -{ - switch (buf[EI_DATA]) - { - case ELFDATA2LSB: - return new file_data<_class, file_data_2LSB> (filename, mem, len); - case ELFDATA2MSB: - return new file_data<_class, file_data_2MSB> (filename, mem, len); - default: - throw std::runtime_error ("Invalid file data"); - } -} - -template -file_data<_class, _data>::file_data (const char *filename) throw (std::bad_alloc, std::runtime_error) -: file (filename) -{ - construct (); -} - -template -file_data<_class, _data>::file_data (const char *filename, void *mem, size_t len) throw (std::bad_alloc, std::runtime_error) -: file (filename, mem, len) -{ - construct (); -} - -template -void file_data<_class, _data>::construct () throw (std::bad_alloc, std::runtime_error) -{ - uint8_t *buf = static_cast (this->mem); - if (buf[EI_CLASS] != _class::id) - throw std::runtime_error ("Wrong file class"); - if (buf[EI_DATA] != _data::id) - throw std::runtime_error ("Wrong data encoding"); - - typedef typename _elfdef<_class>::Ehdr Ehdr; - Ehdr *ehdr = static_cast (this->mem); - this->type = convert<_data, typeof (ehdr->e_type )> () (ehdr->e_type ); - this->machine = convert<_data, typeof (ehdr->e_machine )> () (ehdr->e_machine ); - this->shoff = convert<_data, typeof (ehdr->e_shoff )> () (ehdr->e_shoff ); - this->shnum = convert<_data, typeof (ehdr->e_shnum )> () (ehdr->e_shnum ); - this->shstrndx = convert<_data, typeof (ehdr->e_shstrndx)> () (ehdr->e_shstrndx); - - typedef typename _elfdef<_class>::Shdr Shdr; - Shdr *shdrs = static_cast (static_cast (static_cast (this->mem) + this->shoff)); - - this->sections.reserve (this->shnum); - - for (unsigned int i = 0; i < this->shnum; i++) - { - section *temp; - switch (convert<_data, typeof (shdrs[i].sh_type)> () (shdrs[i].sh_type)) - { - case section_type_SYMTAB::id: - temp = new section_real<_class, _data, section_type_SYMTAB> (&shdrs[i], this->mem); - break; - default: - temp = new section_real<_class, _data, section_type_UNDEFINED> (&shdrs[i], this->mem); - break; - } - this->sections.push_back (temp); - } - - for (unsigned int i = 0; i < this->shnum; i++) - this->sections[i]->update_string_table (this); -} - -void section::update_string_table (file *file) throw (std::bad_alloc) -{ - const section *section = file->get_section (file->get_shstrndx ()); - this->name_string = std::string (static_cast (section->_mem ()) + this->name); -} - -template -section_data<_class, _data>::section_data (void *header, void *mem) throw () -{ - typedef typename _elfdef<_class>::Shdr Shdr; - Shdr *shdr = static_cast (header); - this->name = convert<_data, typeof (shdr->sh_name )> () (shdr->sh_name ); - this->type = convert<_data, typeof (shdr->sh_type )> () (shdr->sh_type ); - this->offset = convert<_data, typeof (shdr->sh_offset)> () (shdr->sh_offset); - this->size = convert<_data, typeof (shdr->sh_size )> () (shdr->sh_size ); - this->link = convert<_data, typeof (shdr->sh_link )> () (shdr->sh_link ); - this->mem = static_cast (static_cast (mem) + this->offset); -} - -section_type::~section_type () throw () -{ - for (std::vector::iterator it = symbols.begin (); it != symbols.end (); ++it) - delete *it; -} - -void section_type::update_string_table (file *file) throw (std::bad_alloc) -{ - section::update_string_table (file); - for (unsigned int i = 0; i < symbols.size (); i++) - this->symbols[i]->update_string_table (file, link); -} - -template -section_real<_class, _data, section_type_SYMTAB>::section_real (void *header, void *mem) throw (std::bad_alloc) -: section_data<_class, _data> (header, mem) -{ - if (this->type != SHT_SYMTAB) - throw std::logic_error ("Wrong section type"); - typedef typename _elfdef<_class>::Sym Sym; - Sym *syms = static_cast (this->mem); - unsigned int max = this->size / sizeof (Sym); - - this->symbols.reserve (max); - - for (unsigned int i = 0; i < max; i++) - this->symbols.push_back (new symbol_data<_class, _data> (&syms[i])); -} - -template -symbol_data<_class, _data>::symbol_data (void *mem) throw () -{ - typedef typename _elfdef<_class>::Sym Sym; - Sym *sym = static_cast (mem); - this->name = convert<_data, typeof (sym->st_name )> () (sym->st_name); - this->info = convert<_data, typeof (sym->st_info )> () (sym->st_info); - this->shndx = convert<_data, typeof (sym->st_shndx)> () (sym->st_shndx); - this->value = convert<_data, typeof (sym->st_value)> () (sym->st_value); - this->size = convert<_data, typeof (sym->st_size )> () (sym->st_size); - this->bind = _elfdef<_class>::st_bind (this->info); - this->type = _elfdef<_class>::st_type (this->info); -} - -template -void symbol_data<_class, _data>::update_string_table (file *file, uint16_t s) throw (std::bad_alloc) -{ - const section *section = file->get_section (s); - this->name_string = std::string (static_cast (section->_mem ()) + this->name); -} - diff --git a/src/mod/elf.hpp b/src/mod/elf.hpp deleted file mode 100644 index ef9299780..000000000 --- a/src/mod/elf.hpp +++ /dev/null @@ -1,219 +0,0 @@ -/* - * elf.hpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ELF_HPP -#define ELF_HPP - -#include "endian.hpp" - -#include -#include -#include - -#include - -namespace Elf -{ - class file_class_32 { public: static const unsigned int id = 1; }; - class file_class_64 { public: static const unsigned int id = 2; }; - class file_data_2LSB { public: static const unsigned int id = 1; }; - class file_data_2MSB { public: static const unsigned int id = 2; }; - class section_type_UNDEFINED { }; - class section_type_SYMTAB { public: static const unsigned int id = 2; }; - - class section; - - class file - { - public: - virtual ~file () throw (); - - virtual const uint8_t get_class () const throw () = 0; - virtual const uint8_t get_data () const throw () = 0; - const uint16_t get_type () const throw () { return type; } - const uint16_t get_machine () const throw () { return machine; } - const uint16_t get_shstrndx () const throw () { return shstrndx; } - - const std::vector
get_sections () const throw () { return sections; }; - const section *get_section (unsigned int i) const throw (std::out_of_range) { return sections.at(i); }; - - const void *const _mem () const throw () { return mem; } - - static file *open (const char *filename) throw (std::bad_alloc, std::runtime_error); - - protected: - file (const char *, void *, size_t len) throw (std::bad_alloc); - - template - static file *open_class (const char *, const uint8_t *, void *, size_t) throw (std::bad_alloc, std::runtime_error); - - uint16_t type; - uint16_t machine; - uint64_t shoff; - uint16_t shnum; - uint16_t shstrndx; - - std::vector
sections; - - const std::string filename; - void *mem; - size_t len; - }; - - template - class file_data : public file - { - public: - file_data (const char *) throw (std::bad_alloc, std::runtime_error); - file_data (const char *, void *, size_t len) throw (std::bad_alloc, std::runtime_error); - - const uint8_t get_class () const throw () { return _class::id; } - const uint8_t get_data () const throw () { return _data::id; } - - private: - void construct () throw (std::bad_alloc, std::runtime_error); - }; - - class section - { - public: - virtual ~section () throw () {} - - uint32_t get_type () const throw () { return type; } - uint64_t get_size () const throw () { return size; } - const std::string &get_name_string () const throw () { return name_string; } - - const void *const _mem () const throw () { return mem; } - - virtual void update_string_table (file *) throw (std::bad_alloc); - - protected: - uint32_t name; - uint32_t type; - uint64_t offset; - uint64_t size; - uint32_t link; - - std::string name_string; - - void *mem; - }; - - template - class section_data : public virtual section - { - public: - section_data (void *, void *) throw (); - }; - - template - class section_type : public virtual section - { - }; - - class symbol; - - template <> - class section_type : public virtual section - { - public: - ~section_type () throw (); - - const std::vector &get_symbols () throw () { return symbols; } - - void update_string_table (file *) throw (std::bad_alloc); - - protected: - std::vector symbols; - }; - - template - class section_real : public section_data<_class, _data>, public section_type<_type> - { - public: - section_real (void *, void *) throw (); - }; - - template - class section_real<_class, _data, section_type_UNDEFINED> : public section_data<_class, _data>, public section_type - { - public: - section_real (void *a, void *b) throw () : section_data<_class, _data> (a, b) { } - }; - - template - class section_real<_class, _data, section_type_SYMTAB> : public section_data<_class, _data>, public section_type - { - public: - section_real (void *, void *) throw (std::bad_alloc); - }; - - class symbol - { - public: - virtual ~symbol () throw () {} - - uint8_t get_info () const throw () { return info; } - uint16_t get_shndx () const throw () { return shndx; } - uint64_t get_value () const throw () { return value; } - uint64_t get_size () const throw () { return size; } - uint8_t get_bind () const throw () { return bind; } - uint8_t get_type () const throw () { return type; } - const std::string &get_name_string () const throw () { return name_string; } - - virtual void update_string_table (file *, uint16_t) throw (std::bad_alloc) = 0; - - protected: - uint32_t name; - uint8_t info; - uint16_t shndx; - uint64_t value; - uint64_t size; - uint8_t bind; - uint8_t type; - - std::string name_string; - }; - - template - class symbol_data : public symbol - { - public: - symbol_data (void *) throw (); - - void update_string_table (file *, uint16_t) throw (std::bad_alloc); - - protected: - }; - - template - struct convert - { }; - - template - struct convert : public endian::convert - { }; - - template - struct convert : public endian::convert - { }; -} - -#endif diff --git a/src/mod/elfconfig.h b/src/mod/elfconfig.h new file mode 100644 index 000000000..8c90ea600 --- /dev/null +++ b/src/mod/elfconfig.h @@ -0,0 +1,7 @@ +#include + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define HOST_ELFDATA ELFDATA2LSB +#elif __BYTE_ORDER == __BIG_ENDIAN +#define HOST_ELFDATA ELFDATA2MSB +#endif diff --git a/src/mod/endian.hpp b/src/mod/endian.hpp deleted file mode 100644 index 082bf44d7..000000000 --- a/src/mod/endian.hpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * endian.hpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ENDIAN_HPP -#define ENDIAN_HPP - -#include -#include - -namespace endian -{ - class little_endian - { }; - - class big_endian - { }; - -#if __BYTE_ORDER == __LITTLE_ENDIAN - typedef little_endian host_endian; -#elif __BYTE_ORDER == __BIG_ENDIAN - typedef big_endian host_endian; -#endif - - template - struct convert_nop - { - inline type operator () (const type &in) const throw () { return in; } - }; - - template - struct convert_simple - { }; - - template <> - struct convert_simple : public convert_nop - { }; - - template <> - struct convert_simple - { - inline uint16_t operator () (const uint16_t &in) const throw () - { - return (in & 0x00ffU) << 8 | - (in & 0xff00U) >> 8; - } - }; - - template <> - struct convert_simple - { - inline uint32_t operator () (const uint32_t &in) const throw () - { - return (in & 0x000000ffU) << 24 | - (in & 0xff000000U) >> 24 | - (in & 0x0000ff00U) << 8 | - (in & 0x00ff0000U) >> 8; - } - }; - - template <> - struct convert_simple - { - inline uint64_t operator () (const uint64_t &in) const throw () - { - return (in & 0x00000000000000ffULL) << 56 | - (in & 0xff00000000000000ULL) >> 56 | - (in & 0x000000000000ff00ULL) << 40 | - (in & 0x00ff000000000000ULL) >> 40 | - (in & 0x0000000000ff0000ULL) << 24 | - (in & 0x0000ff0000000000ULL) >> 24 | - (in & 0x00000000ff000000ULL) << 8 | - (in & 0x000000ff00000000ULL) >> 8; - } - }; - - template <> - struct convert_simple : public convert_simple - { }; - - template <> - struct convert_simple : public convert_simple - { }; - - template <> - struct convert_simple : public convert_simple - { }; - - template - struct convert_complete - { }; - - template - struct convert_complete : public convert_nop - { }; - - template - struct convert_complete : public convert_simple - { }; - - template - struct convert_complete : public convert_nop - { }; - - template - struct convert_complete : public convert_simple - { }; - - template - struct convert - { }; - - template - struct convert : public convert_complete - { }; - - template - struct convert : public convert_complete - { }; -} - -#endif diff --git a/src/mod/modpost.c b/src/mod/modpost.c new file mode 100644 index 000000000..9d7005e7a --- /dev/null +++ b/src/mod/modpost.c @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + char const *data, *class; + char prog[1024]; + unsigned char ei[EI_NIDENT]; + int opt; + FILE *file; + + while ((opt = getopt (argc, argv, "ai:I:mo:")) != -1) + { + switch(opt) + { + case 'a': + case 'i': + case 'I': + case 'm': + case 'o': + break; + default: + return 1; + } + } + + if (!(file = fopen (argv[optind], "r"))) + { + fprintf (stderr, "Can't open file\n"); + return 1; + } + if (fread (ei, 1, EI_NIDENT, file) != EI_NIDENT) + { + fprintf (stderr, "Error: input truncated\n"); + return 1; + } + if (memcmp (ei, ELFMAG, SELFMAG) != 0) + { + fprintf (stderr, "Error: not ELF\n"); + return 1; + } + switch (ei[EI_DATA]) { + case ELFDATA2LSB: + data = "lsb"; + break; + case ELFDATA2MSB: + data = "msb"; + break; + default: + return 1; + } + switch (ei[EI_CLASS]) { + case ELFCLASS32: + class = "32"; + break; + case ELFCLASS64: + class = "64"; + break; + default: + return 1; + } + snprintf (prog, sizeof prog, "%s.real-%s-%s", argv[0], data, class); + + return execv (prog, argv); +} diff --git a/src/mod/modpost.cpp b/src/mod/modpost.cpp deleted file mode 100644 index 9afd7719f..000000000 --- a/src/mod/modpost.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * modpost.cpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "elf.hpp" -#include "module.hpp" - -#include - -#include - -using namespace linuxkernel; - -modulelist modules; - -int main (int argc, char *const argv[]) -{ - int ret = EXIT_SUCCESS; - int opt; - const char *dump_read_kernel = 0, *dump_read_module = 0, *dump_write = 0; - bool all_versions = false, modversions = false;; - - while ((opt = getopt (argc, argv, "ai:I:mo:")) != -1) - { - switch(opt) { - case 'a': - all_versions = true; - std::clog << "*** Warning: CONFIG_MODULE_SRCVERSION_ALL is not supported!" << std::endl; - return EXIT_FAILURE; - break; - case 'i': - dump_read_kernel = optarg; - break; - case 'I': - dump_read_module = optarg; - break; - case 'm': - modversions = true; - break; - case 'o': - dump_write = optarg; - break; - default: - exit(1); - } - } - - if (dump_read_kernel) - modules.dump_read (dump_read_kernel, true); - if (dump_read_module) - modules.dump_read (dump_read_module, false); - - for (int i = optind; i < argc; i++) - { - std::string filename (argv[i]); - try - { - modules.insert (filename); - } - catch (std::runtime_error &e) - { - std::clog << "*** Warning: \"" << filename << "\" failed to load: " << e.what () << std::endl; - ret = EXIT_FAILURE; - continue; - } - } - modules.write (modversions); - - if (dump_write) - modules.dump_write (dump_write, dump_read_module ? false : true); - - return ret; -} diff --git a/src/mod/module.cpp b/src/mod/module.cpp deleted file mode 100644 index d829da68f..000000000 --- a/src/mod/module.cpp +++ /dev/null @@ -1,455 +0,0 @@ -/* - * module.cpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "module.hpp" - -#include -#include -#include -#include - -#include - -using namespace linuxkernel; - -const std::string module_real::symbol_name_cleanup ("cleanup_module"); -const std::string module_real::symbol_name_init ("init_module"); -const std::string module_real::symbol_prefix_crc ("__crc_"); -const std::string module_real::symbol_prefix_ksymtab ("__ksymtab_"); - -module::module (const std::string &filename, bool kernel) throw () -: kernel (kernel), is_vmlinux (false) -{ - std::string::size_type t1 = filename.find_last_of ('/'); - std::string::size_type t2 = filename.find_last_of ('.'); - if (t1 == std::string::npos) - t1 = 0; - else - t1++; - name = filename.substr (0, t2); - if (t2 != std::string::npos) - t2 -= t1; - name_short = filename.substr (t1, t2); - - if (name == "vmlinux") - is_vmlinux = true; -} - -module_real::module_real (const std::string &filename, Elf::file *file) throw (std::runtime_error) -: module (filename, false), has_init (false), has_cleanup (false), file (file) -{ - const std::vector §ions = file->get_sections (); - Elf::section *modinfo = 0; - symtab = 0; - - for (std::vector ::const_iterator it = sections.begin (); it != sections.end (); ++it) - { - const std::string &name = (*it)->get_name_string (); - uint32_t type = (*it)->get_type (); - if (name == ".modinfo") - modinfo = *it; - if (type == Elf::section_type_SYMTAB::id) - symtab = dynamic_cast *> (*it); - } - - if (!symtab) - throw std::runtime_error ("Not a kernel module, lacks symbol table"); - - if (modinfo) - read_modinfo (modinfo); - symbols_undefined.insert (std::pair ("struct_module", symbol_undefined ("struct_module", 0))); - - read_symtab (symtab); -} - -const Elf::symbol *module_real::_get_symbol (const std::string &name) const throw () -{ - for (std::vector::const_iterator it = symtab->get_symbols ().begin (); it != symtab->get_symbols ().end (); ++it) - { - Elf::symbol *symbol = *it; - std::string symname = symbol->get_name_string (); - if (symname == name) - return symbol; - } - return 0; -} - -void module_real::write (const modulelist &list, bool modversions) -{ - std::string filename = name + ".mod.c"; - std::ofstream out (filename.c_str ()); - write_header (out); - if (modversions) - write_versions (out, list); - write_depends (out, list); - write_moddevtable (out); -} - -module_real *module_real::open (const std::string &filename) throw (std::bad_alloc, std::runtime_error) -{ - Elf::file *file = Elf::file::open (filename.c_str ()); - switch (file->get_class ()) - { - case Elf::file_class_32::id: - return open_class (filename, file); - case Elf::file_class_64::id: - return open_class (filename, file); - default: - throw std::runtime_error ("Unsupported file class"); - } -} - -template -module_real *module_real::open_class (const std::string &filename, Elf::file *file) throw (std::bad_alloc, std::runtime_error) -{ - switch (file->get_data ()) - { - case Elf::file_data_2LSB::id: - return new module_data (filename, file); - case Elf::file_data_2MSB::id: - return new module_data (filename, file); - default: - throw std::runtime_error ("Unsupported data encoding"); - } -} - -void module_real::read_modinfo (Elf::section *section) throw (std::runtime_error) -{ - const char *act, *end, *temp1, *temp2; - act = static_cast (section->_mem ()); - end = act + section->get_size (); - while (act <= end) - { - temp1 = act; - for (; *act && *act != '=' && act <= end; act++); - if (act > end) - break; - temp2 = ++act; - for (; *act && act <= end; act++); - if (act > end) - break; - modinfo.insert (std::pair (std::string (temp1, temp2 - temp1 - 1), std::string (temp2, act - temp2))); - for (; !*act && act <= end; act++); - } -} - -void module_real::read_symtab (Elf::section_type *section) throw (std::runtime_error) -{ - for (std::vector::const_iterator it = section->get_symbols ().begin (); it != section->get_symbols ().end (); ++it) - { - Elf::symbol *symbol = *it; - std::string symname = symbol->get_name_string (); - - switch (symbol->get_shndx ()) - { - case SHN_COMMON: - std::clog << "*** Warning: \"" << symname << "\" [" << name << "] is COMMON symbol" << std::endl; - break; - case SHN_ABS: - if (symname.compare (0, symbol_prefix_crc.size (), symbol_prefix_crc) == 0) - { - std::string symname_real (symname.substr (symbol_prefix_crc.size ())); - std::map::iterator it = symbols_exported.find (symname_real); - if (it == symbols_exported.end ()) - symbols_exported.insert (std::pair (symname_real, symbol_exported (symname_real, symbol->get_value ()))); - else - it->second.set_crc (symbol->get_value ()); - } - break; - case SHN_UNDEF: - if (symbol->get_bind () != STB_GLOBAL && - symbol->get_bind () != STB_WEAK) - break; - //FIXME: if (symbol->get_type () == STT_REGISTER) - // break; - /* ignore global offset table */ - if (symname == "_GLOBAL_OFFSET_TABLE_") - break; - /* ignore __this_module, it will be resolved shortly */ - if (symname == "__this_module") - break; - symbols_undefined.insert (std::pair (symname, symbol_undefined (symname, symbol->get_bind () == STB_WEAK))); - break; - default: - if (symname.compare (0, symbol_prefix_ksymtab.size (), symbol_prefix_ksymtab) == 0) - { - std::string symname_real (symname.substr (symbol_prefix_ksymtab.size ())); - std::map::iterator it = symbols_exported.find (symname_real); - if (it == symbols_exported.end ()) - symbols_exported.insert (std::pair (symname_real, symbol_exported (symname_real))); - } - else if (symname == symbol_name_cleanup) - has_cleanup = true; - else if (symname == symbol_name_init) - has_init = true; - break; - }; - } -} - -void module_real::write_depends (std::ostream &out, const modulelist &list) -{ - std::set depends; - for (std::map::const_iterator it = symbols_undefined.begin (); it != symbols_undefined.end (); ++it) - { - try - { - const std::string &mod (list.get_module_name_short_for_symbol (it->first)); - if (mod != "vmlinux") - depends.insert (mod); - } - catch (std::out_of_range &) - { } - } - out << - "static const char __module_depends[]\n" - "__attribute_used__\n" - "__attribute__((section(\".modinfo\"))) =\n" - "\"depends="; - if (depends.begin () != depends.end ()) - { - std::set::const_iterator it = depends.begin (); - out << *it; - for (++it; it != depends.end (); ++it) - out << ',' << *it; - } - out << "\";\n\n"; -} - -void module_real::write_header (std::ostream &out) -{ - out << - "#include \n" - "#include \n" - "#include \n" - "\n" - "MODULE_INFO(vermagic, VERMAGIC_STRING);\n" - "\n" - "struct module __this_module\n" - "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n" - " .name = KBUILD_MODNAME,\n"; - if (has_init) - out << " .init = init_module,\n"; - if (has_cleanup) - out << - "#ifdef CONFIG_MODULE_UNLOAD\n" - " .exit = cleanup_module,\n" - "#endif\n"; - out << "};\n\n"; -} - -void module_real::write_moddevtable (std::ostream &out) -{ - for (std::list::iterator it = devicetables.begin (); it != devicetables.end (); ++it) - { - module_devicetable::table_base *ent = *it; - if (ent) - ent->write (out); - } -} - -void module_real::write_versions (std::ostream &out, const modulelist &list) -{ - out << - "static const struct modversion_info ____versions[]\n" - "__attribute_used__\n" - "__attribute__((section(\"__versions\"))) = {\n"; - - for (_symbols_undefined::const_iterator it = symbols_undefined.begin (); it != symbols_undefined.end (); ++it) - { - try - { - const symbol_exported &sym (list.get_symbol (it->first)); - if (sym.get_crc_valid ()) - out << "\t{ 0x" << std::hex << sym.get_crc () << std::dec << ", \"" << it->first << "\" },\n"; - else - std::clog << "*** Warning: \"" << sym.get_name () << "\" [" << name << "] has no CRC!" << std::endl; - } - catch (std::out_of_range &) - { - if (list.report_symbols_missing) - std::clog << "*** Warning: \"" << it->first << "\" is undefined!" << std::endl; - } - } - - out << "};\n\n"; -} - -template -module_data::module_data (const std::string &filename, Elf::file *file) throw (std::runtime_error) -: module_real (filename, file) -{ - module_devicetable::table_create (devicetables, this, file); -} - -modulelist::modulelist () throw () -: report_symbols_missing (false) -{ } - -modulelist::~modulelist () throw () -{ - for (_modules_real::iterator it = modules_real.begin (); it != modules_real.end (); ++it) - delete it->second; - for (_modules_shadow::iterator it = modules_shadow.begin (); it != modules_shadow.end (); ++it) - delete it->second; -} - -void modulelist::dump_read (const std::string &filename, bool kernel) throw (std::runtime_error) -{ - std::ifstream in (filename.c_str ()); - while (in.good ()) - { - char buf[512]; - in.getline (buf, sizeof (buf)); - std::stringstream str (buf); - uint32_t crc; - std::string symbol, module_name; - str >> std::hex >> crc >> std::dec >> symbol >> module_name; - _modules_shadow::const_iterator it = modules_shadow.find (module_name); - module *mod; - if (it == modules_shadow.end ()) - { - mod = new module (module_name, kernel); - modules_shadow.insert (_modules_shadow_pair (module_name, mod)); - } - else - mod = it->second; - mod->symbols_exported.insert (std::pair (symbol, symbol_exported (symbol, crc))); - symbols_exported.insert (std::pair (symbol, module_name)); - if (mod->get_is_vmlinux ()) - report_symbols_missing = true; - } -} - -void modulelist::dump_write (const std::string &filename, bool kernel) const throw (std::runtime_error) -{ - char buf[128]; - std::ofstream out (filename.c_str (), std::ios::trunc); - - for (_symbols::const_iterator it = symbols_exported.begin (); it != symbols_exported.end (); ++it) - { - const module *mod = get_module (it->second); - const symbol_exported &sym = get_symbol (it->first); - if (!kernel && mod->get_kernel ()) - continue; - snprintf (buf, sizeof (buf), "0x%08x\t%s\t%s\n", sym.get_crc (), it->first.c_str (), mod->get_name ().c_str ()); - out << buf; - } -} - -const module *modulelist::get_module (const std::string &name) const throw (std::out_of_range) -{ - _modules_real::const_iterator it1 = modules_real.find (name); - if (it1 != modules_real.end ()) - return it1->second; - _modules_shadow::const_iterator it2 = modules_shadow.find (name); - if (it2 != modules_shadow.end ()) - return it2->second; - throw std::out_of_range ("Don't find module"); -} - -const module *modulelist::get_module_for_symbol (const symbolname &name) const throw (std::out_of_range) -{ - _symbols::const_iterator it = symbols_exported.find (name); - if (it == symbols_exported.end ()) - throw std::out_of_range ("symbol is undefined"); - return get_module (it->second); -} - -const std::string &modulelist::get_module_name_short_for_symbol (const symbolname &name) const throw (std::out_of_range) -{ - const module *mod = get_module_for_symbol (name); - return mod->get_name_short (); -} - -const symbol_exported &modulelist::get_symbol (const symbolname &name) const throw (std::out_of_range) -{ - const module *mod = get_module_for_symbol (name); - std::map::const_iterator it = mod->get_symbols_exported ().find (name); - if (it == mod->get_symbols_exported ().end ()) - throw std::logic_error ("Don't find symbol"); - return it->second; -} - -void modulelist::insert (module_real *mod) throw (std::runtime_error) -{ - bool overwrite = false; - - if (mod->get_is_vmlinux ()) - { - if (!modules_shadow.insert (_modules_shadow_pair (mod->get_name (), mod)).second) - overwrite = true; - report_symbols_missing = true; - } - else - { - if (!modules_real.insert (_modules_real_pair (mod->get_name (), mod)).second) - throw std::runtime_error ("Already know a module with this name"); - } - - for (std::map::const_iterator it = mod->get_symbols_exported ().begin (); - it != mod->get_symbols_exported ().end (); ++it) - if (!symbols_exported.insert (std::pair (it->second.get_name (), mod->get_name ())).second) - if (!overwrite) - std::clog << "*** Warning: \"" << it->second.get_name () << "\" [" << mod->get_name () << "] duplicated symbol!" << std::endl; -} - -void modulelist::insert (const std::string &filename) throw (std::runtime_error) -{ - module_real *mod = module_real::open (filename); - try - { - insert (mod); - } - catch (...) - { - delete mod; - throw; - } -} - -void modulelist::write (bool modversions) -{ - for (_modules_real::iterator it = modules_real.begin (); it != modules_real.end (); ++it) - it->second->write (*this, modversions); -} - -symbol::symbol (const symbolname &name) throw () -: name (name) -{ } - -symbol_exported::symbol_exported (const symbolname &name) throw () -: symbol (name), crc_valid (false) -{ } - -symbol_exported::symbol_exported (const symbolname &name, uint32_t crc) throw () -: symbol (name), crc (crc), crc_valid (true) -{ } - -void symbol_exported::set_crc (uint32_t _crc) throw () -{ - crc = _crc; - crc_valid = true; -} - -symbol_undefined::symbol_undefined (const symbolname &name, bool weak) throw () -: symbol (name), weak (weak) -{ } - diff --git a/src/mod/module.hpp b/src/mod/module.hpp deleted file mode 100644 index 2341f51ae..000000000 --- a/src/mod/module.hpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - * module.hpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MODULE_HPP -#define MODULE_HPP - -#define DISABLE_TEMPLATES -#include "elf.hpp" -#include "module_devicetable.hpp" - -#include -#include -#include - -namespace linuxkernel -{ - class modulelist; - class symbolname; - class symbol_exported; - class symbol_undefined; - - class module - { - public: - typedef std::map _symbols_exported; - - module (const std::string &name, bool kernel) throw (); - - bool get_kernel () const throw () { return kernel; } - bool get_is_vmlinux () const throw () { return is_vmlinux; } - const std::string &get_name () const throw () { return name; } - const std::string &get_name_short () const throw () { return name_short; } - const _symbols_exported &get_symbols_exported () const throw () { return symbols_exported; } - - protected: - std::string name, name_short; - bool kernel; - bool is_vmlinux; - _symbols_exported symbols_exported; - - friend class modulelist; - }; - - class module_real : public module - { - public: - typedef std::map _symbols_undefined; - - module_real (const std::string &filename, Elf::file *file) throw (std::runtime_error); - - const Elf::symbol *_get_symbol (const std::string &name) const throw (); - - void write (const modulelist &, bool modversions); - - static module_real *open (const std::string &filename) throw (std::bad_alloc, std::runtime_error); - - const static std::string symbol_name_cleanup; - const static std::string symbol_name_init; - const static std::string symbol_prefix_crc; - const static std::string symbol_prefix_ksymtab; - - protected: - template - static module_real *open_class (const std::string &filename, Elf::file *) throw (std::bad_alloc, std::runtime_error); - - void read_modinfo (Elf::section *) throw (std::runtime_error); - void read_symtab (Elf::section_type *) throw (std::runtime_error); - - void write_depends (std::ostream &, const modulelist &); - void write_header (std::ostream &); - void write_moddevtable (std::ostream &); - void write_versions (std::ostream &, const modulelist &); - - std::map modinfo; - _symbols_undefined symbols_undefined; - bool has_init; - bool has_cleanup; - Elf::section_type *symtab; - std::list devicetables; - - Elf::file *file; - }; - - template - class module_data : public module_real - { - public: - module_data (const std::string &filename, Elf::file *file) throw (std::runtime_error); - }; - - class modulelist - { - public: - typedef std::map _modules_real; - typedef std::pair _modules_real_pair; - typedef std::map _modules_shadow; - typedef std::pair _modules_shadow_pair; - typedef std::map _symbols; - - modulelist () throw (); - ~modulelist () throw (); - - void dump_read (const std::string &filename, bool kernel) throw (std::runtime_error); - void dump_write (const std::string &filename, bool kernel) const throw (std::runtime_error); - - const _modules_real &get_modules_real () const throw () { return modules_real; } - const _modules_shadow &get_modules_shadow () const throw () { return modules_shadow; } - const module *get_module (const std::string &name) const throw (std::out_of_range); - const module *get_module_for_symbol (const symbolname &name) const throw (std::out_of_range); - const std::string &get_module_name_short_for_symbol (const symbolname &name) const throw (std::out_of_range); - const symbol_exported &get_symbol (const symbolname &name) const throw (std::out_of_range); - const _symbols &get_symbols_exported () const throw () { return symbols_exported; } - - void insert (module_real *) throw (std::runtime_error); - void insert (const std::string &filename) throw (std::runtime_error); - - void write (bool modversions); - - bool report_symbols_missing; - - protected: - _modules_real modules_real; - _modules_shadow modules_shadow; - _symbols symbols_exported; - }; - - class symbolname : public std::string - { - public: - symbolname () throw () {} - symbolname (const std::string &name) throw () - : std::string (name) - { - if (size () && at (0) == '.') - erase (0, 1); - } - symbolname (const char *name) throw () - : std::string (name) - { - if (size () && at (0) == '.') - erase (0, 1); - } - }; - - class symbol - { - public: - symbol () throw () {} - symbol (const symbolname &name) throw (); - - const symbolname &get_name () const throw () { return name; } - - protected: - symbolname name; - }; - - class symbol_exported : public symbol - { - public: - symbol_exported () throw () {} - symbol_exported (const symbolname &name) throw (); - symbol_exported (const symbolname &name, uint32_t) throw (); - - uint32_t get_crc () const throw () { return crc; } - bool get_crc_valid () const throw () { return crc_valid; } - void set_crc (uint32_t) throw (); - - protected: - uint32_t crc; - bool crc_valid; - }; - - class symbol_undefined : public symbol - { - public: - symbol_undefined () throw () {} - symbol_undefined (const symbolname &name, bool weak) throw (); - - protected: - bool weak; - }; -} - -#include "module_devicetable.tpp" - -#undef DISABLE_TEMPLATES -#endif diff --git a/src/mod/module_devicetable.cpp b/src/mod/module_devicetable.cpp deleted file mode 100644 index 08387fe5a..000000000 --- a/src/mod/module_devicetable.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * module_devicetable.cpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "module.hpp" -#include "module_devicetable.hpp" - -namespace linuxkernel -{ - namespace module_devicetable - { - namespace internal - { - const std::string def::symbol = "__mod_ccw_device_table"; - const std::string def::symbol = "__mod_i2c_device_table"; - const std::string def::symbol = "__mod_ieee1394_device_table"; - const std::string def::symbol = "__mod_input_device_table"; - const std::string def::symbol = "__mod_of_device_table"; - const std::string def::symbol = "__mod_pci_device_table"; - const std::string def::symbol = "__mod_pcmcia_device_table"; - const std::string def::symbol = "__mod_pnp_device_table"; - const std::string def::symbol = "__mod_pnp_card_device_table"; - const std::string def::symbol = "__mod_serio_device_table"; - const std::string def::symbol = "__mod_usb_device_table"; - const std::string def::symbol = "__mod_vio_device_table"; - } - - void table_base::write (std::ostream &out) const throw (std::runtime_error) - { - for (std::list::const_iterator it = entries.begin (); it != entries.end (); ++it) - { - out << "MODULE_ALIAS(\""; - (*it)->write (out); - out << "\");\n"; - } - } - } -} diff --git a/src/mod/module_devicetable.hpp b/src/mod/module_devicetable.hpp deleted file mode 100644 index 088eed35d..000000000 --- a/src/mod/module_devicetable.hpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * module_devicetable.hpp - * - * Copyright (C) 2005, 2006 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MODULE_DEVICETABLE_HPP -#define MODULE_DEVICETABLE_HPP - -#include "elf.hpp" - -#include -#include -#include - -namespace linuxkernel -{ - class module_real; - - namespace module_devicetable - { - class device_ccw { }; - class device_i2c { }; - class device_ieee1394 { }; - class device_input { }; - class device_of { }; - class device_pci { }; - class device_pcmcia { }; - class device_pnp { }; - class device_pnp_card { }; - class device_serio { }; - class device_usb { }; - class device_vio { }; - - class version_2_6_16 { }; - - namespace internal - { - template - struct def {}; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - template<> struct def { static const std::string symbol; }; - } - - class table_entry - { - public: - virtual ~table_entry () {}; - virtual void write (std::ostream &) const throw (std::runtime_error) = 0; - }; - - template - class table_entry_version : public table_entry - { - }; - - template - class table_entry_data : public table_entry_version - { - }; - - class table_base - { - public: - virtual ~table_base () throw () {}; - - void write (std::ostream &out) const throw (std::runtime_error); - - - protected: - table_base () throw () {}; - - std::list entries; - }; - - template - void table_create (std::list &, const module_real *m, const Elf::file *f) throw (std::runtime_error); - - template - class table : public table_base - { - public: - static table_base *create (const module_real *m, const Elf::file *f) throw (std::runtime_error); - - protected: - table () {}; - }; - - template - class table_data : public table - { - public: - table_data (const void *, size_t) throw (std::runtime_error); - }; - } -} - -#ifndef DISABLE_TEMPLATES -#include "module_devicetable.tpp" -#endif - -#endif diff --git a/src/mod/module_devicetable.tpp b/src/mod/module_devicetable.tpp deleted file mode 100644 index 5df8f5e6d..000000000 --- a/src/mod/module_devicetable.tpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * module_devicetable.tpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MODULE_DEVICETABLE_TPP -#define MODULE_DEVICETABLE_TPP - -#include "module.hpp" - -namespace linuxkernel -{ - namespace module_devicetable - { - template - void table_create (std::list &list, const module_real *m, const Elf::file *file) throw (std::runtime_error) - { - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - list.push_back (table::create (m, file)); - } - - template - table_base *table::create (const module_real *m, const Elf::file *f) throw (std::runtime_error) - { - const Elf::symbol *sym = m->_get_symbol (internal::def::symbol); - if (!sym) - return 0; - const Elf::section *sec = f->get_section (sym->get_shndx ()); - const char *mem = static_cast (sec->_mem ()); - return new table_data (mem + sym->get_value (), sym->get_size ()); - } - } -} - -#endif diff --git a/src/mod/module_devicetable_impl_2_6_16.cpp b/src/mod/module_devicetable_impl_2_6_16.cpp deleted file mode 100644 index 23e9d7bd1..000000000 --- a/src/mod/module_devicetable_impl_2_6_16.cpp +++ /dev/null @@ -1,403 +0,0 @@ -/* - * module_devicetable_impl_2_6_16.cpp - * - * Copyright (C) 2005 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "module_devicetable_impl_2_6_16.hpp" - -#include -#include -#include - -using namespace linuxkernel::module_devicetable; - -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () -{ - char buf[4]; - snprintf (buf, sizeof (buf), "%02X", id.value); - out << buf; - return out; -} - -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () -{ - char buf[8]; - snprintf (buf, sizeof (buf), "%04X", id.value); - out << buf; - return out; -} - -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw () -{ - char buf[12]; - snprintf (buf, sizeof (buf), "%08X", id.value); - out << buf; - return out; -} - -table_entry_version::table_entry_version () throw () : - cu_type ("t"), - dev_type ("m"), - cu_model ("dt"), - dev_model ("dm") -{ } - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "ccw:"; - cu_type.write (out, match_flags & CCW_DEVICE_ID_MATCH_CU_TYPE); - cu_model.write (out, match_flags & CCW_DEVICE_ID_MATCH_CU_MODEL); - dev_type.write (out, match_flags & CCW_DEVICE_ID_MATCH_DEVICE_TYPE); - dev_model.write (out, match_flags & CCW_DEVICE_ID_MATCH_DEVICE_TYPE); -} - -table_entry_version::table_entry_version () throw () -{ -} - -void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) -{ -} - -table_entry_version::table_entry_version () throw () : - vendor_id ("ven"), - model_id ("mo"), - specifier_id ("sp"), - version ("ver") -{ } - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "ieee1394:"; - vendor_id.write (out, match_flags & IEEE1394_MATCH_VENDOR_ID); - model_id.write (out, match_flags & IEEE1394_MATCH_MODEL_ID); - specifier_id.write (out, match_flags & IEEE1394_MATCH_SPECIFIER_ID); - version.write (out, match_flags & IEEE1394_MATCH_VERSION, true); -} - -table_entry_version::table_entry_version () throw () -{ -} - -void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) -{ -} - -table_entry_version::table_entry_version () throw () -{ -} - -void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) -{ -} - -table_entry_version::table_entry_version () throw () : - vendor ("v"), - device ("d"), - subvendor ("sv"), - subdevice ("sd") -{ } - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "pci:"; - vendor.write (out, vendor != PCI_ANY_ID); - device.write (out, device != PCI_ANY_ID); - subvendor.write (out, subvendor != PCI_ANY_ID); - subdevice.write (out, subdevice != PCI_ANY_ID); - - identifier baseclass ("bc", class_id >> 16); - identifier_value baseclass_mask (class_mask >> 16); - identifier subclass ("sc", class_id >> 8); - identifier_value subclass_mask (class_mask >> 8); - identifier interface ("i", class_id); - identifier_value interface_mask (class_mask); - - if ((baseclass_mask != 0 && baseclass_mask != 0xFF) || - (subclass_mask != 0 && subclass_mask != 0xFF) || - (interface_mask != 0 && interface_mask != 0xFF)) - throw std::runtime_error ("Can't handle masks"); - - baseclass.write (out, baseclass_mask == 0xFF); - subclass.write (out, subclass_mask == 0xFF); - interface.write (out, interface_mask == 0xFF, true); -} - -table_entry_version::table_entry_version () throw () -{ -} - -void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) -{ -} - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "pnp:" << str << '*'; -} - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "pnp:" << str << '*'; -} - -table_entry_version::table_entry_version () throw () -{ -} - -void table_entry_version::write (std::ostream &out __attribute__ ((unused))) const throw (std::runtime_error) -{ -} - -table_entry_version::table_entry_version () throw () : - idVendor ("v"), - idProduct ("p"), - bDeviceClass ("dc"), - bDeviceSubClass ("dsc"), - bDeviceProtocol ("dp"), - bInterfaceClass ("ic"), - bInterfaceSubClass ("isc"), - bInterfaceProtocol ("ip") -{ } - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - if (!idVendor && !bDeviceClass && !bInterfaceClass) - return; - - out << "usb:"; - idVendor.write (out, match_flags & USB_DEVICE_ID_MATCH_VENDOR); - idProduct.write (out, match_flags & USB_DEVICE_ID_MATCH_PRODUCT); - out << 'd'; - if (bcdDevice_initial_digits) - { - char buf[12]; - snprintf (buf, sizeof (buf), "%0*X", bcdDevice_initial_digits, bcdDevice_initial); - out << buf; - } - if (range_lo == range_hi) - out << static_cast (range_lo); - else if (range_lo > 0 || range_hi < 9) - out << '[' << static_cast (range_lo) << '-' << static_cast (range_hi) << ']'; - if (bcdDevice_initial_digits < 3) - out << '*'; - bDeviceClass.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS); - bDeviceSubClass.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS); - bDeviceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL); - bInterfaceClass.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_CLASS); - bInterfaceSubClass.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS); - bInterfaceProtocol.write (out, match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL, true); -} - -void table_entry_version::write (std::ostream &out) const throw (std::runtime_error) -{ - out << "vio:" << str << '*'; -} - -#define _do_convert(name) name = Elf::convert () (id.name) - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - _do_convert (match_flags); - _do_convert (cu_type); - _do_convert (dev_type); - _do_convert (cu_model); - _do_convert (dev_model); -} - -template -table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () -{ - throw std::runtime_error ("Not implemented: I2C"); -} - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - _do_convert (match_flags); - _do_convert (vendor_id); - _do_convert (model_id); - _do_convert (specifier_id); - _do_convert (version); -} - -template -table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () -{ - throw std::runtime_error ("Not implemented: INPUT"); -} - -template -table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () -{ - throw std::runtime_error ("Not implemented: OF"); -} - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - _do_convert (vendor); - _do_convert (device); - _do_convert (subvendor); - _do_convert (subdevice); - _do_convert (class_id); - _do_convert (class_mask); -} - -template -table_entry_data::table_entry_data (const device_id &id __attribute__ ((unused))) throw () -{ - throw std::runtime_error ("Not implemented: PCMCIA"); -} - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - std::stringstream s; - s << 'd'; - s << static_cast (static_cast (id.id)); - str = s.str (); -} - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - std::stringstream s; - s << 'c'; - s << static_cast (static_cast (id.id)); - for (int i = 0; i < PNP_MAX_DEVICES; i++) - { - if (! *id.devs[i].id) - break; - s << 'd'; - s << static_cast (static_cast (id.devs[i].id)); - } - str = s.str (); -} - -template -table_entry_data::table_entry_data (const device_id &id __attribute__((unused))) throw () -{ - throw std::runtime_error ("Not implemented: SERIO"); -} - -template -table_entry_data::table_entry_data (const device_id &id, uint16_t _bcdDevice_initial, int _bcdDevice_initial_digits, unsigned char _range_lo, unsigned char _range_hi) throw () -{ - _do_convert (match_flags); - _do_convert (idVendor); - _do_convert (idProduct); - _do_convert (bDeviceClass); - _do_convert (bDeviceSubClass); - _do_convert (bDeviceProtocol); - _do_convert (bInterfaceClass); - _do_convert (bInterfaceSubClass); - _do_convert (bInterfaceProtocol); - bcdDevice_initial = _bcdDevice_initial; - bcdDevice_initial_digits = _bcdDevice_initial_digits; - range_lo = _range_lo; - range_hi = _range_hi; -} - -template -void table_entry_data::add (const device_id &id, std::list &table) throw () -{ - uint16_t match_flags; - uint16_t idVendor; - uint16_t bcdDevice_lo = 0; - uint16_t bcdDevice_hi = ~0; - uint8_t bDeviceClass; - uint8_t bInterfaceClass; - - _do_convert (match_flags); - _do_convert (idVendor); - if (match_flags & USB_DEVICE_ID_MATCH_DEV_LO) - _do_convert (bcdDevice_lo); - if (match_flags & USB_DEVICE_ID_MATCH_DEV_HI) - _do_convert (bcdDevice_hi); - _do_convert (bDeviceClass); - _do_convert (bInterfaceClass); - - if (!(idVendor | bDeviceClass | bInterfaceClass)) - return; - - for (int ndigits = 3; bcdDevice_lo <= bcdDevice_hi; ndigits--) - { - unsigned char clo = bcdDevice_lo & 0xf; - unsigned char chi = bcdDevice_hi & 0xf; - - if (chi > 9) /* it's bcd not hex */ - chi = 9; - - bcdDevice_lo >>= 4; - bcdDevice_hi >>= 4; - - if (bcdDevice_lo == bcdDevice_hi || !ndigits) - { - table.push_back (new table_entry_data (id, bcdDevice_lo, ndigits, clo, chi)); - return; - } - - if (clo > 0) - table.push_back (new table_entry_data (id, bcdDevice_lo++, ndigits, clo, 9)); - - if (chi < 9) - table.push_back (new table_entry_data (id, bcdDevice_hi--, ndigits, 0, chi)); - } -} - -template -table_entry_data::table_entry_data (const device_id &id) throw () -{ - std::stringstream s; - s << 'T' << (id.type[0] ? id.type : "*"); - s << 'S' << (id.compat[0] ? id.compat : "*"); - str = s.str (); -} - -template -table_data::table_data (const void *mem, size_t size) throw (std::runtime_error) -{ - if (size % sizeof (devin)) - throw std::runtime_error ("Bad size"); - size_t len = size / sizeof (devin); - // Remove the terminator. - len--; - const devin *e = static_cast (mem); - for (size_t i = 0; i < len; ++i) - table_entry_data::add (e[i], this->entries); -} - -#define make_templates(name) \ -template class table_data; \ -template class table_data; \ -template class table_data; \ -template class table_data -make_templates(device_ccw); -make_templates(device_i2c); -make_templates(device_ieee1394); -make_templates(device_input); -make_templates(device_of); -make_templates(device_pci); -make_templates(device_pcmcia); -make_templates(device_pnp); -make_templates(device_pnp_card); -make_templates(device_serio); -make_templates(device_usb); -make_templates(device_vio); diff --git a/src/mod/module_devicetable_impl_2_6_16.hpp b/src/mod/module_devicetable_impl_2_6_16.hpp deleted file mode 100644 index a13f57953..000000000 --- a/src/mod/module_devicetable_impl_2_6_16.hpp +++ /dev/null @@ -1,525 +0,0 @@ -/* - * module_devicetable_impl_2_6_16.hpp - * - * Copyright (C) 2005, 2006 Bastian Blank - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MODULE_DEVICETABLE_IMPL_2_6_16_HPP -#define MODULE_DEVICETABLE_IMPL_2_6_16_HPP - -#include "module_devicetable.hpp" - -#include "elf.hpp" - -namespace -{ - using namespace linuxkernel::module_devicetable; - - template - struct _elfdef - { }; - - template<> - struct _elfdef - { - typedef uint32_t pointer; - }; - - template<> - struct _elfdef - { - typedef uint64_t pointer; - }; - - template - struct device_id - { }; - - template - struct device_id - { - uint16_t match_flags; - uint16_t cu_type; - uint16_t dev_type; - uint8_t cu_model; - uint8_t dev_model; - typename _elfdef::pointer driver_info; - }; - - enum - { - CCW_DEVICE_ID_MATCH_CU_TYPE = 0x01, - CCW_DEVICE_ID_MATCH_CU_MODEL = 0x02, - CCW_DEVICE_ID_MATCH_DEVICE_TYPE = 0x04, - CCW_DEVICE_ID_MATCH_DEVICE_MODEL = 0x08, - }; - - template - struct device_id - { - uint16_t id; - }; - - template - struct device_id - { - uint32_t match_flags; - uint32_t vendor_id; - uint32_t model_id; - uint32_t specifier_id; - uint32_t version; - typename _elfdef::pointer driver_info; - }; - - enum - { - IEEE1394_MATCH_VENDOR_ID = 0x0001, - IEEE1394_MATCH_MODEL_ID = 0x0002, - IEEE1394_MATCH_SPECIFIER_ID = 0x0004, - IEEE1394_MATCH_VERSION = 0x0008, - }; - - template - struct device_id - { - uint32_t vendor, device; - uint32_t subvendor, subdevice; - uint32_t class_id, class_mask; - typename _elfdef::pointer driver_info; - }; - - const unsigned int PCI_ANY_ID = ~0U; - const int PNP_ID_LEN = 8; - const int PNP_MAX_DEVICES = 8; - - template - struct device_id - { - uint8_t id[PNP_ID_LEN]; - typename _elfdef::pointer driver_info; - }; - - template - struct device_id - { - uint8_t id[PNP_ID_LEN]; - typename _elfdef::pointer driver_info; - struct - { - uint8_t id[PNP_ID_LEN]; - } - devs[PNP_MAX_DEVICES]; - }; - - template - struct device_id - { - uint8_t type; - uint8_t extra; - uint8_t id; - uint8_t proto; - }; - - enum - { - SERIO_DEVICE_ID_ANY = 0xff, - }; - - template - struct device_id - { - uint16_t match_flags; - uint16_t idVendor; - uint16_t idProduct; - uint16_t bcdDevice_lo; - uint16_t bcdDevice_hi; - uint8_t bDeviceClass; - uint8_t bDeviceSubClass; - uint8_t bDeviceProtocol; - uint8_t bInterfaceClass; - uint8_t bInterfaceSubClass; - uint8_t bInterfaceProtocol; - typename _elfdef::pointer driver_info; - }; - - enum - { - USB_DEVICE_ID_MATCH_VENDOR = 0x0001, - USB_DEVICE_ID_MATCH_PRODUCT = 0x0002, - USB_DEVICE_ID_MATCH_DEV_LO = 0x0004, - USB_DEVICE_ID_MATCH_DEV_HI = 0x0008, - USB_DEVICE_ID_MATCH_DEV_CLASS = 0x0010, - USB_DEVICE_ID_MATCH_DEV_SUBCLASS = 0x0020, - USB_DEVICE_ID_MATCH_DEV_PROTOCOL = 0x0040, - USB_DEVICE_ID_MATCH_INT_CLASS = 0x0080, - USB_DEVICE_ID_MATCH_INT_SUBCLASS = 0x0100, - USB_DEVICE_ID_MATCH_INT_PROTOCOL = 0x0200, - }; - - template - struct device_id - { - char type[32]; - char compat[32]; - }; - - template - class identifier_value - { - public: - type value; - - identifier_value () : value (0) { } - identifier_value (const type &value) : value (value) { } - const type &operator = (const type &_value) { value = _value; return value; } - bool operator ! () const { return !value; } - operator type () const { return value; } - template - void set (const type _value) - { value = Elf::convert () (_value); } - }; - - template - class identifier - { - public: - identifier_value value; - std::string sep; - - identifier (const std::string &sep) : sep (sep) { } - identifier (const std::string &sep, const type &value) : value (value), sep (sep) { } - const type &operator = (const type &_value) { value = _value; return value.value; } - bool operator ! () const { return !value; } - operator type () const { return value; } - void write (std::ostream &out, bool enable, bool last = false) const - { - out << sep; - if (enable) - { - out << value; - if (last) - out << '*'; - } - else - out << '*'; - } - }; -} - -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); -std::ostream &operator << (std::ostream &out, const identifier_value &id) throw (); - -namespace linuxkernel -{ - namespace module_devicetable - { - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - - identifier_value match_flags; - identifier cu_type; - identifier dev_type; - identifier cu_model; - identifier dev_model; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - - identifier_value match_flags; - identifier vendor_id; - identifier model_id; - identifier specifier_id; - identifier version; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - - identifier vendor, device; - identifier subvendor, subdevice; - identifier_value class_id, class_mask; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - void write (std::ostream &) const throw (std::runtime_error); - - std::string str; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - void write (std::ostream &) const throw (std::runtime_error); - - std::string str; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template<> - class table_entry_version : public table_entry - { - public: - table_entry_version () throw (); - void write (std::ostream &) const throw (std::runtime_error); - - identifier_value match_flags; - identifier idVendor; - identifier idProduct; - unsigned int bcdDevice_initial; - int bcdDevice_initial_digits; - unsigned char range_lo; - unsigned char range_hi; - identifier bDeviceClass; - identifier bDeviceSubClass; - identifier bDeviceProtocol; - identifier bInterfaceClass; - identifier bInterfaceSubClass; - identifier bInterfaceProtocol; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &, uint16_t bcdDevice_initial, int bcdDevice_initial_digits, unsigned char range_lo, unsigned char range_hi) throw (); - - public: - static void add (const device_id &, std::list &table) throw (); - }; - - template<> - class table_entry_version : public table_entry - { - public: - void write (std::ostream &) const throw (std::runtime_error); - - std::string str; - }; - - template - class table_entry_data : public table_entry_version - { - protected: - table_entry_data (const device_id &) throw (); - - public: - static void add (const device_id &id, std::list &table) throw () - { - table.push_back (new table_entry_data (id)); - } - }; - - template - class table_data : public table - { - protected: - typedef device_id devin; - - public: - table_data (const void *mem, size_t size) throw (std::runtime_error); - }; - } -} - -#endif diff --git a/src/mod/real-lsb-32/elfconfig.h b/src/mod/real-lsb-32/elfconfig.h new file mode 100644 index 000000000..1f7a7321a --- /dev/null +++ b/src/mod/real-lsb-32/elfconfig.h @@ -0,0 +1,4 @@ +#define KERNEL_ELFCLASS ELFCLASS32 +#define KERNEL_ELFDATA ELFDATA2LSB +#define MODULE_SYMBOL_PREFIX "" +#include "../elfconfig.h" diff --git a/src/mod/real-lsb-64/elfconfig.h b/src/mod/real-lsb-64/elfconfig.h new file mode 100644 index 000000000..e6f519fcc --- /dev/null +++ b/src/mod/real-lsb-64/elfconfig.h @@ -0,0 +1,4 @@ +#define KERNEL_ELFCLASS ELFCLASS64 +#define KERNEL_ELFDATA ELFDATA2LSB +#define MODULE_SYMBOL_PREFIX "" +#include "../elfconfig.h" diff --git a/src/mod/real-msb-32/elfconfig.h b/src/mod/real-msb-32/elfconfig.h new file mode 100644 index 000000000..a9ae561ab --- /dev/null +++ b/src/mod/real-msb-32/elfconfig.h @@ -0,0 +1,4 @@ +#define KERNEL_ELFCLASS ELFCLASS32 +#define KERNEL_ELFDATA ELFDATA2MSB +#define MODULE_SYMBOL_PREFIX "" +#include "../elfconfig.h" diff --git a/src/mod/real-msb-64/elfconfig.h b/src/mod/real-msb-64/elfconfig.h new file mode 100644 index 000000000..844d22f5c --- /dev/null +++ b/src/mod/real-msb-64/elfconfig.h @@ -0,0 +1,4 @@ +#define KERNEL_ELFCLASS ELFCLASS64 +#define KERNEL_ELFDATA ELFDATA2MSB +#define MODULE_SYMBOL_PREFIX "" +#include "../elfconfig.h" From 78e72578e75b50ca0b8116dbbd9a3fe50df14631 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 19 Jul 2006 22:58:36 +0000 Subject: [PATCH 027/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7046 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index eecab793b..75cede03f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.17-3) UNRELEASED; urgency=low + + * Replace own modpost with original one. + + -- Bastian Blank Thu, 20 Jul 2006 00:58:05 +0200 + linux-kbuild-2.6 (2.6.17-2) unstable; urgency=low * Fix uninitialied variable. (closes: #377656) From 6a612543f04512a6397eab85b018456c6230cfa0 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 1 Aug 2006 09:00:51 +0000 Subject: [PATCH 028/487] src/Makefile.inc: Remove -W from CFLAGS. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7075 --- src/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.inc b/src/Makefile.inc index b274c1d4a..1fd0cab1b 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -1,6 +1,6 @@ CC = gcc CXX = g++ -CFLAGS += -Wall -W -O2 +CFLAGS += -Wall -O2 CXXFLAGS = $(CFLAGS) all: all-local all-recursive From fa7b70b8e4abb1bb9c7fce0e978202f4733a450e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 1 Aug 2006 09:01:51 +0000 Subject: [PATCH 029/487] debian/changelog: Prepare to release (2.6.17-3). svn path=/dists/trunk/linux-kbuild-2.6/; revision=7076 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 75cede03f..ba360d518 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.17-3) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.17-3) unstable; urgency=low - * Replace own modpost with original one. + * Replace own modpost with original one. - -- Bastian Blank Thu, 20 Jul 2006 00:58:05 +0200 + -- Bastian Blank Tue, 1 Aug 2006 11:01:18 +0200 linux-kbuild-2.6 (2.6.17-2) unstable; urgency=low From 93fcc786b05c096bf9631a07e0effaca2bb27c6d Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 8 Sep 2006 16:46:17 +0000 Subject: [PATCH 030/487] src/mod/Makefile.real: Use included headers. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7378 --- src/mod/Makefile.real | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/Makefile.real b/src/mod/Makefile.real index 12b35ef89..de9764cfd 100644 --- a/src/mod/Makefile.real +++ b/src/mod/Makefile.real @@ -1,5 +1,7 @@ PROGS = modpost.real-$(TYPE) +CFLAGS += -I$(top_srcdir)/include + include ../Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o From 9cee8d54aad4ec87b621aac55f2b881796c9747e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 8 Sep 2006 16:46:58 +0000 Subject: [PATCH 031/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7379 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ba360d518..d28a2419b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.17+2.6.18-rc6-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Fri, 8 Sep 2006 19:38:54 +0200 + linux-kbuild-2.6 (2.6.17-3) unstable; urgency=low * Replace own modpost with original one. From b4e104aad13f0e9865e4d17441426c26c17f74d3 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 8 Sep 2006 16:48:11 +0000 Subject: [PATCH 032/487] Update svn:ignore property. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7380 --- src/basic/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/basic/Makefile b/src/basic/Makefile index 9d6355a54..11454357d 100644 --- a/src/basic/Makefile +++ b/src/basic/Makefile @@ -1,7 +1,6 @@ PROGS = \ docproc \ - fixdep \ - split-include + fixdep OUTDIR = basic VPATH = $(top_srcdir)/scripts/basic From 5e6ae3abccd815d830338ec0d111274a8c115eaf Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 25 Sep 2006 18:42:31 +0000 Subject: [PATCH 033/487] debian/changelog: Set version to 2.6.18-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7517 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d28a2419b..4c42c69b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.17+2.6.18-rc6-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.18-1) UNRELEASED; urgency=low * New upstream version. - -- Bastian Blank Fri, 8 Sep 2006 19:38:54 +0200 + -- Bastian Blank Mon, 25 Sep 2006 21:37:32 +0200 linux-kbuild-2.6 (2.6.17-3) unstable; urgency=low From 0f8d2f1f0faa2403ef43e14e328c46003ac6223e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 25 Sep 2006 18:46:42 +0000 Subject: [PATCH 034/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=7518 --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 4c42c69b1..74029b60d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-kbuild-2.6 (2.6.18-1) UNRELEASED; urgency=low * New upstream version. + * Use included headers. (closes: #382286, #384211) -- Bastian Blank Mon, 25 Sep 2006 21:37:32 +0200 From a0f244adcc01e92f37c66ecdcba5565661cade27 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 25 Sep 2006 18:50:45 +0000 Subject: [PATCH 035/487] debian/changelog: Prepare to release (2.6.18-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=7519 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 74029b60d..3c61f1d87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (2.6.18-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.18-1) unstable; urgency=low - * New upstream version. + * New upstream version. * Use included headers. (closes: #382286, #384211) - -- Bastian Blank Mon, 25 Sep 2006 21:37:32 +0200 + -- Bastian Blank Mon, 25 Sep 2006 21:45:50 +0200 linux-kbuild-2.6 (2.6.17-3) unstable; urgency=low From ae0a8f6c0481f6e0b41ce755edeea410a0d1b1c7 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 3 Jan 2007 16:31:10 +0000 Subject: [PATCH 036/487] debian/changelog: Set version to 2.6.19-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8072 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3c61f1d87..ddb978540 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.19-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Wed, 3 Jan 2007 17:01:27 +0100 + linux-kbuild-2.6 (2.6.18-1) unstable; urgency=low * New upstream version. From 669092cf90a80f84c19435716dc530f0cd9db759 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 3 Jan 2007 16:31:25 +0000 Subject: [PATCH 037/487] debian/bin/genorig.py: Add. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8073 --- debian/bin/genorig.py | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 debian/bin/genorig.py diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py new file mode 100755 index 000000000..6a24304c5 --- /dev/null +++ b/debian/bin/genorig.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python + +import sys +sys.path.append("debian/lib/python") + +import os, os.path, re, shutil +from debian_linux.debian import read_changelog + +class main(object): + def __init__(self, input_tar, input_patch = None): + self.log = sys.stdout.write + + self.input_tar = input_tar + self.input_patch = input_patch + + changelog = read_changelog()[0] + source = changelog['Source'] + version = changelog['Version']['linux']['source_upstream'] + self.orig = '%s-%s' % (source, version) + self.orig_tar = '%s_%s.orig.tar.gz' % (source, version) + + def __call__(self): + import tempfile + self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian') + try: + self.extract() + self.patch() + self.generate() + self.tar() + finally: + pass + shutil.rmtree(self.dir) + + def extract(self): + self.log("Extracting tarball %s\n" % self.input_tar) + match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', self.input_tar) + if not match: + raise RuntimeError("Can't identify name of tarball") + cmdline = ['tar -xf', self.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)]): + raise RuntimeError("Can't extract tarball") + os.rename(os.path.join(self.dir, match.group('dir')), os.path.join(self.dir, 'temp')) + + def 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(bz2|gz))))?$', self.input_patch) + if not match: + raise RuntimeError("Can't identify name of patch") + cmdline = [] + if match.group('extension') == 'bz2': + cmdline.append('bzcat') + elif match.group('extension') == 'gz': + cmdline.append('zcat') + else: + cmdline.append('cat') + cmdline.append(self.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") + + def generate(self): + self.log("Generate orig\n") + orig = os.path.join(self.dir, self.orig) + temp = os.path.join(self.dir, 'temp') + os.mkdir(orig) + os.mkdir(os.path.join(orig, 'include')) + os.mkdir(os.path.join(orig, 'include', 'linux')) + shutil.copyfile(os.path.join(temp, 'COPYING'), os.path.join(orig, 'COPYING')) + for i in ('input.h', 'license.h', 'mod_devicetable.h'): + shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) + shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) + + def tar(self): + out = os.path.join("../orig", self.orig_tar) + self.log("Generate tarball %s\n" % out) + cmdline = ['tar -czf', out, '-C', self.dir, self.orig] + if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): + raise RuntimeError("Can't patch source") + +if __name__ == '__main__': + main(*sys.argv[1:])() From aeda95c72d44ace3003544c206d872e5004d2b31 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 14 Jan 2007 23:28:00 +0000 Subject: [PATCH 038/487] * debian/changelog: Update. * src/mod/modpost.c: Support -w. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8186 --- debian/changelog | 4 +++- src/mod/modpost.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ddb978540..4f5e2da84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ linux-kbuild-2.6 (2.6.19-1) UNRELEASED; urgency=low * New upstream version. + * src/mod: + - Support -w. - -- Bastian Blank Wed, 3 Jan 2007 17:01:27 +0100 + -- Bastian Blank Mon, 15 Jan 2007 00:26:59 +0100 linux-kbuild-2.6 (2.6.18-1) unstable; urgency=low diff --git a/src/mod/modpost.c b/src/mod/modpost.c index 9d7005e7a..66d5e4a6c 100644 --- a/src/mod/modpost.c +++ b/src/mod/modpost.c @@ -13,7 +13,7 @@ int main (int argc, char *argv[]) int opt; FILE *file; - while ((opt = getopt (argc, argv, "ai:I:mo:")) != -1) + while ((opt = getopt (argc, argv, "ai:I:mo:w")) != -1) { switch(opt) { @@ -22,6 +22,7 @@ int main (int argc, char *argv[]) case 'I': case 'm': case 'o': + case 'w': break; default: return 1; From 842fd2936ec2b20e4f6efaa59d7557b3d94c81c5 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 27 Jan 2007 19:11:52 +0000 Subject: [PATCH 039/487] debian/bin/gencontrol.py, debian/lib/python/debian_linux/debian.py: Update version code. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8220 --- debian/bin/gencontrol.py | 16 +-- debian/lib/python/debian_linux/debian.py | 170 ++++++++++++++++------- 2 files changed, 126 insertions(+), 60 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 9fcb535df..ecd28b2bd 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -37,10 +37,10 @@ class gencontrol(object): def do_main(self, packages, makefile): makeflags = { - 'VERSION': self.version['version'], - 'SOURCE_UPSTREAM': self.version['source_upstream'], - 'SOURCEVERSION': self.version['source'], - 'UPSTREAMVERSION': self.version['upstream'], + 'VERSION': self.version['linux']['version'], + 'SOURCE_UPSTREAM': self.version['upstream'], + 'SOURCEVERSION': self.version['linux']['source'], + 'UPSTREAMVERSION': self.version['linux']['upstream'], } vars = self.changelog_vars.copy() @@ -68,10 +68,10 @@ class gencontrol(object): ret = [None, None] ret[0] = version = self.changelog[0]['Version'] vars = in_vars.copy() - vars['upstreamversion'] = version['upstream'] - vars['version'] = version['version'] - vars['source_upstream'] = version['source_upstream'] - vars['major'] = version['major'] + vars['upstreamversion'] = version['linux']['upstream'] + vars['version'] = version['linux']['version'] + vars['source_upstream'] = version['upstream'] + vars['major'] = version['linux']['major'] ret[1] = vars return ret diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index 2b83362c7..7b6e9ba10 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -47,25 +47,39 @@ def read_changelog(dir = ''): return entries def parse_version(version): + ret = { + 'complete': version, + 'upstream': version, + 'debian': None, + 'linux': None, + } + try: + i = len(version) - version[::-1].index('-') + except ValueError: + return ret + ret['upstream'] = version[:i-1] + ret['debian'] = version[i:] + try: + ret['linux'] = parse_version_linux(version) + except ValueError: + pass + return ret + +def parse_version_linux(version): version_re = ur""" ^ (?P - (?P - \d+\.\d+\.\d+\+ - )? - (?P - (?P - (?P\d+\.\d+) - \. - \d+ - ) - (?: - - - (?P - .+? - ) - )? + (?P + (?P\d+\.\d+) + \. + \d+ ) + (?: + ~ + (?P + .+? + ) + )? - (?P[^-]+) ) @@ -75,22 +89,24 @@ $ if match is None: raise ValueError ret = match.groupdict() - if ret['parent'] is not None: - ret['source_upstream'] = ret['parent'] + ret['upstream'] + if ret['modifier'] is not None: + ret['upstream'] = '%s-%s' % (ret['version'], ret['modifier']) + ret['source_upstream'] = '%s~%s' % (ret['version'], ret['modifier']) else: - ret['source_upstream'] = ret['upstream'] + ret['upstream'] = ret['version'] + ret['source_upstream'] = ret['version'] return ret class package_description(object): __slots__ = "short", "long" def __init__(self, value = None): + self.long = [] if value is not None: - self.short, long = value.split ("\n", 1) - self.long = long.split ("\n.\n") + self.short, long = value.split("\n", 1) + self.append(long) else: self.short = None - self.long = [] def __str__(self): ret = self.short + '\n' @@ -100,6 +116,11 @@ class package_description(object): pars.append('\n '.join(w.wrap(i))) return self.short + '\n ' + '\n .\n '.join(pars) + def append(self, str): + str = str.strip() + if str: + self.long.extend(str.split("\n.\n")) + class package_relation(object): __slots__ = "name", "version", "arches" @@ -107,16 +128,7 @@ class package_relation(object): def __init__(self, value = None): if value is not None: - match = self._re.match(value) - if match is None: - raise RuntimeError, "Can't parse dependency %s" % value - match = match.groups() - self.name = match[0] - self.version = match[1] - if match[2] is not None: - self.arches = re.split('\s+', match[2]) - else: - self.arches = [] + self.parse(value) else: self.name = None self.version = None @@ -130,11 +142,29 @@ class package_relation(object): ret.extend([' [', ' '.join(self.arches), ']']) return ''.join(ret) + def config(self, entry): + if self.version is not None or self.arches: + return + value = entry.get(self.name, None) + if value is None: + return + self.parse(value) + + def parse(self, value): + match = self._re.match(value) + if match is None: + raise RuntimeError, "Can't parse dependency %s" % value + match = match.groups() + self.name = match[0] + self.version = match[1] + if match[2] is not None: + self.arches = re.split('\s+', match[2]) + else: + self.arches = [] + class package_relation_list(list): def __init__(self, value = None): - if isinstance(value, (list, tuple)): - self.extend(value) - elif value is not None: + if value is not None: self.extend(value) def __str__(self): @@ -146,31 +176,37 @@ class package_relation_list(list): return i return None + def append(self, value): + if isinstance(value, basestring): + value = package_relation_group(value) + elif not isinstance(value, package_relation_group): + raise ValueError, "got %s" % type(value) + j = self._match(value) + if j: + j._update_arches(value) + else: + super(package_relation_list, self).append(value) + + def config(self, entry): + for i in self: + i.config(entry) + def extend(self, value): if isinstance(value, basestring): - value = [package_relation_group(j.strip()) for j in re.split(',', value.strip())] + value = [j.strip() for j in re.split(',', value.strip())] + elif not isinstance(value, (list, tuple)): + raise ValueError, "got %s" % type(value) for i in value: - if isinstance(i, basestring): - i = package_relation_group(i) - j = self._match(i) - if j: - j._update_arches(i) - else: - self.append(i) + self.append(i) class package_relation_group(list): def __init__(self, value = None): - if isinstance(value, package_relation_list): + if value is not None: self.extend(value) - elif value is not None: - self._extend(value) def __str__(self): return ' | '.join([str(i) for i in self]) - def _extend(self, value): - self.extend([package_relation(j.strip()) for j in re.split('\|', value.strip())]) - def _match(self, value): for i, j in itertools.izip(self, value): if i.name != j.name or i.version != j.version: @@ -184,6 +220,25 @@ class package_relation_group(list): if arch not in i.arches: i.arches.append(arch) + def append(self, value): + if isinstance(value, basestring): + value = package_relation(value) + elif not isinstance(value, package_relation): + raise ValueError + super(package_relation_group, self).append(value) + + def config(self, entry): + for i in self: + i.config(entry) + + def extend(self, value): + if isinstance(value, basestring): + value = [j.strip() for j in re.split('\|', value.strip())] + elif not isinstance(value, (list, tuple)): + raise ValueError + for i in value: + self.append(i) + class package(dict): _fields = utils.sorted_dict(( ('Package', str), @@ -202,7 +257,6 @@ class package(dict): ('Suggests', package_relation_list), ('Replaces', package_relation_list), ('Conflicts', package_relation_list), - ('Reverse-Depends', package_relation_list), # Some sort of hack ('Description', package_description), )) @@ -215,17 +269,29 @@ class package(dict): super(package, self).__setitem__(key, value) def iterkeys(self): + keys = set(self.keys()) for i in self._fields.iterkeys(): - if self.has_key(i) and self[i]: + if self.has_key(i): + keys.remove(i) yield i + for i in keys: + yield i def iteritems(self): + keys = set(self.keys()) for i in self._fields.iterkeys(): - if self.has_key(i) and self[i]: + if self.has_key(i): + keys.remove(i) yield (i, self[i]) + for i in keys: + yield (i, self[i]) def itervalues(self): + keys = set(self.keys()) for i in self._fields.iterkeys(): - if self.has_key(i) and self[i]: + if self.has_key(i): + keys.remove(i) yield self[i] + for i in keys: + yield self[i] From bc4ae2dc1d6919f4fbda8fa13cc87a36021572af Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 27 Jan 2007 19:12:43 +0000 Subject: [PATCH 040/487] debian/changelog: Set version to 2.6.20~rc6-1~experimental.1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8221 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 4f5e2da84..b7567aec9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.19-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.20~rc6-1~experimental.1) UNRELEASED; urgency=low * New upstream version. * src/mod: From e9b31575412fe91ed7fe072e3f8e24b288709a76 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 12 Apr 2007 04:51:26 +0000 Subject: [PATCH 041/487] debian/changelog: Set version to 2.6.20-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8469 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b7567aec9..eb03aaf0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -linux-kbuild-2.6 (2.6.20~rc6-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.20-1) UNRELEASED; urgency=low * New upstream version. * src/mod: - Support -w. - -- Bastian Blank Mon, 15 Jan 2007 00:26:59 +0100 + -- Bastian Blank Thu, 12 Apr 2007 06:50:53 +0200 linux-kbuild-2.6 (2.6.18-1) unstable; urgency=low From 73ec2504d1a6c65f0e5a0b14dec613b02b0540f4 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 12 Apr 2007 04:53:29 +0000 Subject: [PATCH 042/487] debian/changelog - Update. - Prepare to release (2.6.20-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=8470 --- debian/changelog | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index eb03aaf0b..e5d50ee1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,9 @@ -linux-kbuild-2.6 (2.6.20-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.20-1) unstable; urgency=low * New upstream version. - * src/mod: - - Support -w. + * modpost: Support -w. - -- Bastian Blank Thu, 12 Apr 2007 06:50:53 +0200 + -- Bastian Blank Thu, 12 Apr 2007 06:53:00 +0200 linux-kbuild-2.6 (2.6.18-1) unstable; urgency=low From ea7c54068dc33acf8e95a99b3711d8d0cce20299 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 16 May 2007 22:30:48 +0000 Subject: [PATCH 043/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8593 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e5d50ee1c..eb2ff94e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.21-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Wed, 02 May 2007 19:09:17 +0200 + linux-kbuild-2.6 (2.6.20-1) unstable; urgency=low * New upstream version. From 6bf99748166ba7303989b92cf0842aeafa06d031 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 18 May 2007 21:45:43 +0000 Subject: [PATCH 044/487] debian/changelog: Prepare to release (2.6.21-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=8608 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index eb2ff94e4..adf079ede 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.21-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low - * New upstream version. + * New upstream version. - -- Bastian Blank Wed, 02 May 2007 19:09:17 +0200 + -- Bastian Blank Fri, 18 May 2007 23:45:14 +0200 linux-kbuild-2.6 (2.6.20-1) unstable; urgency=low From 9f0b0436e37f3b44bad1a8082f3bab5872ffd31e Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Wed, 23 May 2007 12:08:41 +0000 Subject: [PATCH 045/487] set new version for kbuild, should propagate to buildserver.. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8735 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index adf079ede..c0fcc72e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.22~rc2-1~experimental.1) UNRELESEAD; urgency=low + + * New upstream version + + -- maximilian attems Wed, 23 May 2007 14:08:47 +0200 + linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low * New upstream version. From 1354f16d5fdfbdfb18a020fa25c880e08821c196 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Wed, 23 May 2007 12:28:11 +0000 Subject: [PATCH 046/487] don't understand that kbuild stuff, as i'm not a user of it let other fix the sync with linux-2.6 svn path=/dists/trunk/linux-kbuild-2.6/; revision=8736 --- debian/changelog | 6 ------ 1 file changed, 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index c0fcc72e8..adf079ede 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -linux-kbuild-2.6 (2.6.22~rc2-1~experimental.1) UNRELESEAD; urgency=low - - * New upstream version - - -- maximilian attems Wed, 23 May 2007 14:08:47 +0200 - linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low * New upstream version. From 463f0f9c8363cb172107f453bb1f8f1ff9a7b683 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 30 May 2007 18:50:47 +0000 Subject: [PATCH 047/487] debian/changelog: Update to 2.6.22~rc3-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8829 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index adf079ede..780393809 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.22~rc3-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Wed, 30 May 2007 20:48:37 +0200 + linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low * New upstream version. From 37e7bbd51e764120678c0c025f29bc55774c986c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 30 May 2007 21:49:10 +0000 Subject: [PATCH 048/487] * debian/changelog: Update. * src/mod/modpost.c - Don't fail if no module is specified. - Use EXIT definitions. svn path=/dists/trunk/linux-kbuild-2.6/; revision=8830 --- debian/changelog | 3 ++- src/mod/modpost.c | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 780393809..de6a0aad8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ linux-kbuild-2.6 (2.6.22~rc3-1) UNRELEASED; urgency=low * New upstream version. + * Don't fail if no module is specified. - -- Bastian Blank Wed, 30 May 2007 20:48:37 +0200 + -- Bastian Blank Wed, 30 May 2007 23:48:22 +0200 linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low diff --git a/src/mod/modpost.c b/src/mod/modpost.c index 66d5e4a6c..1bb1a5637 100644 --- a/src/mod/modpost.c +++ b/src/mod/modpost.c @@ -25,24 +25,29 @@ int main (int argc, char *argv[]) case 'w': break; default: - return 1; + return EXIT_FAILURE; } } + if (optind == argc) + return EXIT_SUCCESS; + if (!(file = fopen (argv[optind], "r"))) { fprintf (stderr, "Can't open file\n"); - return 1; + return EXIT_FAILURE; } + if (fread (ei, 1, EI_NIDENT, file) != EI_NIDENT) { fprintf (stderr, "Error: input truncated\n"); - return 1; + return EXIT_FAILURE; } + if (memcmp (ei, ELFMAG, SELFMAG) != 0) { fprintf (stderr, "Error: not ELF\n"); - return 1; + return EXIT_FAILURE; } switch (ei[EI_DATA]) { case ELFDATA2LSB: @@ -52,7 +57,7 @@ int main (int argc, char *argv[]) data = "msb"; break; default: - return 1; + return EXIT_FAILURE; } switch (ei[EI_CLASS]) { case ELFCLASS32: @@ -62,7 +67,7 @@ int main (int argc, char *argv[]) class = "64"; break; default: - return 1; + return EXIT_FAILURE; } snprintf (prog, sizeof prog, "%s.real-%s-%s", argv[0], data, class); From 83f055fa4505fb28621bfc709e6afb0d40dbf590 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 17 Jul 2007 21:08:54 +0000 Subject: [PATCH 049/487] debian/changelog: Set version to 2.6.22-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9163 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index de6a0aad8..e83d6d541 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.22~rc3-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.22-1) UNRELEASED; urgency=low * New upstream version. * Don't fail if no module is specified. From 62d71684b03373f571aa75241208b1b67a69b6fe Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 17 Jul 2007 21:15:00 +0000 Subject: [PATCH 050/487] debian/changelog: Prepare to release (2.6.22-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=9165 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e83d6d541..ec758c869 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (2.6.22-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.22-1) unstable; urgency=low * New upstream version. * Don't fail if no module is specified. - -- Bastian Blank Wed, 30 May 2007 23:48:22 +0200 + -- Bastian Blank Tue, 17 Jul 2007 23:14:23 +0200 linux-kbuild-2.6 (2.6.21-1) unstable; urgency=low From b0af9b6feda3e8f8a9f5b243c02ffb2efb52ad2c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 30 Aug 2007 19:58:09 +0000 Subject: [PATCH 051/487] debian/changelog: Update to 2.6.23~rc4-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9422 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ec758c869..8d4970214 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.23~rc4-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Thu, 30 Aug 2007 21:15:03 +0200 + linux-kbuild-2.6 (2.6.22-1) unstable; urgency=low * New upstream version. From 4cb5d9599f64837993142fffb8c95f39acb378b0 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 30 Aug 2007 20:00:22 +0000 Subject: [PATCH 052/487] src/Makefile: Drop unused scripts. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9423 --- src/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 2a499d1aa..ee130245c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,7 +31,6 @@ SCRIPTS = \ reference_discarded.pl \ reference_init.pl \ setlocalversion \ - show_delta \ ver_linux SUBDIRS = \ From 74c5f21702629a61c0e5703ecd45bc57497192c6 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 14 Oct 2007 10:05:12 +0000 Subject: [PATCH 053/487] * debian/bin/gencontrol.py, debian/bin/genorig.py: Update. * debian/changelog: Set version to 2.6.23-1. * debian/lib/python/debian_linux: Update. * debian/rules: Replace parts from linux-2.6. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9659 --- debian/bin/gencontrol.py | 106 ++--- debian/bin/genorig.py | 68 +++- debian/changelog | 4 +- debian/lib/python/debian_linux/__init__.py | 3 - debian/lib/python/debian_linux/config.py | 209 ++++++++++ debian/lib/python/debian_linux/debian.py | 393 +++++++++++-------- debian/lib/python/debian_linux/gencontrol.py | 312 +++++++++++++++ debian/lib/python/debian_linux/utils.py | 90 ++--- debian/rules | 35 +- 9 files changed, 875 insertions(+), 345 deletions(-) create mode 100644 debian/lib/python/debian_linux/config.py create mode 100644 debian/lib/python/debian_linux/gencontrol.py diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index ecd28b2bd..2fdcdfd93 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -1,29 +1,22 @@ #!/usr/bin/env python2.4 + import sys sys.path.append("debian/lib/python") -import warnings + from debian_linux.debian import * +from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags from debian_linux.utils import * -class packages_list(sorted_dict): - def append(self, package): - self[package['Package']] = package - - def extend(self, packages): - for package in packages: - self[package['Package']] = package - class gencontrol(object): makefile_targets = ('binary-arch', 'build') def __init__(self, underlay = None): - self.changelog = read_changelog() - self.templates = templates() - self.version, self.changelog_vars = self.process_changelog({}) + self.templates = Templates(['debian/templates']) + self.process_changelog() def __call__(self): - packages = packages_list() - makefile = [] + packages = PackagesList() + makefile = Makefile() self.do_source(packages) self.do_main(packages, makefile) @@ -33,61 +26,47 @@ class gencontrol(object): def do_source(self, packages): source = self.templates["control.source"] - packages['source'] = self.process_package(source[0], self.changelog_vars) + packages['source'] = self.process_package(source[0], self.vars) def do_main(self, packages, makefile): - makeflags = { - 'VERSION': self.version['linux']['version'], - 'SOURCE_UPSTREAM': self.version['upstream'], - 'SOURCEVERSION': self.version['linux']['source'], - 'UPSTREAMVERSION': self.version['linux']['upstream'], - } - - vars = self.changelog_vars.copy() + vars = self.vars.copy() + makeflags = MakeFlags() self.do_main_setup(vars, makeflags) self.do_main_packages(packages) self.do_main_makefile(makefile, makeflags) def do_main_setup(self, vars, makeflags): - pass + makeflags.update({ + 'MAJOR': self.version.linux_major, + 'VERSION': self.version.linux_version, + 'UPSTREAMVERSION': self.version.linux_upstream, + }) def do_main_makefile(self, makefile, makeflags): - makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()]) - for i in self.makefile_targets: - makefile.append(("%s:" % i, ("$(MAKE) -f debian/rules.real %s %s" % (i, makeflags_string)))) + makefile.add(i, cmds = ["$(MAKE) -f debian/rules.real %s %s" % (i, makeflags)]) def do_main_packages(self, packages): - vars = self.changelog_vars - main = self.templates["control.main"] - packages.extend(self.process_packages(main, vars)) + packages.extend(self.process_packages(main, self.vars)) - def process_changelog(self, in_vars): - ret = [None, None] - ret[0] = version = self.changelog[0]['Version'] - vars = in_vars.copy() - vars['upstreamversion'] = version['linux']['upstream'] - vars['version'] = version['linux']['version'] - vars['source_upstream'] = version['upstream'] - vars['major'] = version['linux']['major'] - ret[1] = vars - return ret + def process_changelog(self): + changelog = Changelog(version = VersionLinux) + self.version = version = changelog[0].version + self.vars = { + 'upstreamversion': version.linux_upstream, + 'version': version.linux_version, + 'source_upstream': version.upstream, + 'major': version.linux_major, + } def process_relation(self, key, e, in_e, vars): - in_dep = in_e[key] - dep = package_relation_list() - for in_groups in in_dep: - groups = package_relation_group() - for in_item in in_groups: - item = package_relation() - item.name = self.substitute(in_item.name, vars) - if in_item.version is not None: - item.version = self.substitute(in_item.version, vars) - item.arches = in_item.arches - groups.append(item) - dep.append(groups) + import copy + dep = copy.deepcopy(in_e[key]) + for groups in dep: + for item in groups: + item.name = self.substitute(item.name, vars) e[key] = dep def process_description(self, e, in_e, vars): @@ -95,13 +74,13 @@ class gencontrol(object): desc = in_desc.__class__() desc.short = self.substitute(in_desc.short, vars) for i in in_desc.long: - desc.long.append(self.substitute(i, vars)) + desc.append(self.substitute(i, vars)) e['Description'] = desc def process_package(self, in_entry, vars): - e = package() + e = Package() for key, value in in_entry.iteritems(): - if isinstance(value, package_relation_list): + if isinstance(value, PackageRelation): self.process_relation(key, e, in_entry, vars) elif key == 'Description': self.process_description(e, in_entry, vars) @@ -129,18 +108,10 @@ class gencontrol(object): def write_control(self, list): self.write_rfc822(file("debian/control", 'w'), list) - def write_makefile(self, out_list): - out = file("debian/rules.gen", 'w') - for item in out_list: - if isinstance(item, (list, tuple)): - out.write("%s\n" % item[0]) - cmd_list = item[1] - if isinstance(cmd_list, basestring): - cmd_list = cmd_list.split('\n') - for j in cmd_list: - out.write("\t%s\n" % j) - else: - out.write("%s\n" % item) + def write_makefile(self, makefile): + f = file("debian/rules.gen", 'w') + makefile.write(f) + f.close() def write_rfc822(self, f, list): for entry in list: @@ -148,6 +119,5 @@ class gencontrol(object): f.write("%s: %s\n" % (key, value)) f.write('\n') - if __name__ == '__main__': gencontrol()() diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 6a24304c5..637ecaff1 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -4,34 +4,39 @@ import sys sys.path.append("debian/lib/python") import os, os.path, re, shutil -from debian_linux.debian import read_changelog +from debian_linux.debian import Changelog, VersionLinux -class main(object): - def __init__(self, input_tar, input_patch = None): +class Main(object): + def __init__(self, input_tar, input_patch, override_version): self.log = sys.stdout.write self.input_tar = input_tar self.input_patch = input_patch - changelog = read_changelog()[0] - source = changelog['Source'] - version = changelog['Version']['linux']['source_upstream'] - self.orig = '%s-%s' % (source, version) - self.orig_tar = '%s_%s.orig.tar.gz' % (source, version) + changelog = Changelog(version = VersionLinux)[0] + source = changelog.source + version = changelog.version + + if override_version: + version = VersionLinux('%s-undef' % override_version) + + self.log('Using source name %s, version %s\n' % (source, version.upstream)) + + self.orig = '%s-%s' % (source, version.upstream) + self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream) def __call__(self): import tempfile self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian') try: - self.extract() - self.patch() + self.upstream_extract() + self.upstream_patch() self.generate() self.tar() finally: - pass shutil.rmtree(self.dir) - def extract(self): + def upstream_extract(self): self.log("Extracting tarball %s\n" % self.input_tar) match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', self.input_tar) if not match: @@ -45,11 +50,11 @@ class main(object): raise RuntimeError("Can't extract tarball") os.rename(os.path.join(self.dir, match.group('dir')), os.path.join(self.dir, 'temp')) - def patch(self): + 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(bz2|gz))))?$', self.input_patch) + match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P(bz2|gz)))?$', self.input_patch) if not match: raise RuntimeError("Can't identify name of patch") cmdline = [] @@ -68,9 +73,7 @@ class main(object): self.log("Generate orig\n") orig = os.path.join(self.dir, self.orig) temp = os.path.join(self.dir, 'temp') - os.mkdir(orig) - os.mkdir(os.path.join(orig, 'include')) - os.mkdir(os.path.join(orig, 'include', 'linux')) + os.makedirs(os.path.join(orig, 'include', 'linux')) shutil.copyfile(os.path.join(temp, 'COPYING'), os.path.join(orig, 'COPYING')) for i in ('input.h', 'license.h', 'mod_devicetable.h'): shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) @@ -78,10 +81,35 @@ class main(object): def tar(self): out = os.path.join("../orig", self.orig_tar) + try: + os.mkdir("../orig") + except OSError: pass + try: + os.stat(out) + raise RuntimeError("Destination already exists") + except OSError: pass self.log("Generate tarball %s\n" % out) cmdline = ['tar -czf', out, '-C', self.dir, self.orig] - if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): - raise RuntimeError("Can't patch source") + try: + if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): + raise RuntimeError("Can't patch source") + os.chmod(out, 0644) + except: + try: + os.unlink(out) + except OSError: + pass + raise if __name__ == '__main__': - main(*sys.argv[1:])() + from optparse import OptionParser + parser = OptionParser(usage = "%prog [OPTION]... TAR [PATCH]") + 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)() diff --git a/debian/changelog b/debian/changelog index 8d4970214..ca5a48096 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.23~rc4-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.23-1) UNRELEASED; urgency=low * New upstream version. - -- Bastian Blank Thu, 30 Aug 2007 21:15:03 +0200 + -- Bastian Blank Sun, 14 Oct 2007 11:28:39 +0200 linux-kbuild-2.6 (2.6.22-1) unstable; urgency=low diff --git a/debian/lib/python/debian_linux/__init__.py b/debian/lib/python/debian_linux/__init__.py index b989d7d15..e69de29bb 100644 --- a/debian/lib/python/debian_linux/__init__.py +++ b/debian/lib/python/debian_linux/__init__.py @@ -1,3 +0,0 @@ -from debian import * -from utils import * - diff --git a/debian/lib/python/debian_linux/config.py b/debian/lib/python/debian_linux/config.py new file mode 100644 index 000000000..7e3e12ae8 --- /dev/null +++ b/debian/lib/python/debian_linux/config.py @@ -0,0 +1,209 @@ +import os, os.path, re, sys, textwrap + +__all__ = [ + 'ConfigParser', + 'ConfigReaderCore', +] + +class SchemaItemBoolean(object): + def __call__(self, i): + i = i.strip().lower() + if i in ("true", "1"): + return True + if i in ("false", "0"): + return False + raise Error + +class SchemaItemList(object): + def __init__(self, type = "\s+"): + self.type = type + + def __call__(self, i): + i = i.strip() + if not i: + return [] + return [j.strip() for j in re.split(self.type, i)] + +class ConfigReaderCore(dict): + config_name = "defines" + + schemas = { + 'base': { + 'arches': SchemaItemList(), + 'enabled': SchemaItemBoolean(), + 'featuresets': SchemaItemList(), + 'flavours': SchemaItemList(), + 'modules': SchemaItemBoolean(), + }, + 'image': { + 'configs': SchemaItemList(), + 'initramfs': SchemaItemBoolean(), + 'initramfs-generators': SchemaItemList(), + }, + 'relations': { + }, + 'xen': { + 'dom0-support': SchemaItemBoolean(), + 'versions': SchemaItemList(), + } + } + + def __init__(self, dirs = []): + self._dirs = dirs + self._read_base() + + def _read_arch(self, arch): + config = ConfigParser(self.schemas) + config.read(self.get_files("%s/%s" % (arch, self.config_name))) + + featuresets = config['base',].get('featuresets', []) + flavours = config['base',].get('flavours', []) + + for section in iter(config): + if section[0] in featuresets: + real = (section[-1], arch, section[0]) + elif len(section) > 1: + real = (section[-1], arch, None) + section[:-1] + else: + real = (section[-1], arch) + section[:-1] + s = self.get(real, {}) + s.update(config[section]) + self[tuple(real)] = s + + for featureset in featuresets: + self._read_arch_featureset(arch, featureset) + + if flavours: + base = self['base', arch] + featuresets.insert(0, 'none') + base['featuresets'] = featuresets + del base['flavours'] + self['base', arch] = base + self['base', arch, 'none'] = {'flavours': flavours, 'implicit-flavour': True} + + def _read_arch_featureset(self, arch, featureset): + config = ConfigParser(self.schemas) + config.read(self.get_files("%s/%s/%s" % (arch, featureset, self.config_name))) + + flavours = config['base',].get('flavours', []) + + for section in iter(config): + real = (section[-1], arch, featureset) + section[:-1] + s = self.get(real, {}) + s.update(config[section]) + self[tuple(real)] = s + + def _read_base(self): + config = ConfigParser(self.schemas) + config.read(self.get_files(self.config_name)) + + arches = config['base',]['arches'] + featuresets = config['base',]['featuresets'] + + for section in iter(config): + if section[0].startswith('featureset-'): + real = (section[-1], None, section[0].lstrip('featureset-')) + else: + real = (section[-1],) + section[1:] + self[real] = config[section] + + for arch in arches: + self._read_arch(arch) + for featureset in featuresets: + self._read_featureset(featureset) + + def _read_featureset(self, featureset): + config = ConfigParser(self.schemas) + config.read(self.get_files("featureset-%s/%s" % (featureset, self.config_name))) + + for section in iter(config): + real = (section[-1], None, featureset) + s = self.get(real, {}) + s.update(config[section]) + self[real] = s + + def get_files(self, name): + return [os.path.join(i, name) for i in self._dirs if i] + + def merge(self, section, arch = None, featureset = None, flavour = None): + ret = {} + ret.update(self.get((section,), {})) + if featureset: + ret.update(self.get((section, None, featureset), {})) + if arch: + ret.update(self.get((section, arch), {})) + if arch and featureset: + ret.update(self.get((section, arch, featureset), {})) + if arch and featureset and flavour: + ret.update(self.get((section, arch, None, flavour), {})) + ret.update(self.get((section, arch, featureset, flavour), {})) + return ret + +class ConfigParser(object): + __slots__ = '_config', 'schemas' + + def __init__(self, schemas): + self.schemas = schemas + + from ConfigParser import RawConfigParser + self._config = config = RawConfigParser() + + def __getitem__(self, key): + return self._convert()[key] + + def __iter__(self): + return iter(self._convert()) + + def __str__(self): + return '<%s(%s)>' % (self.__class__.__name__, self._convert()) + + def _convert(self): + ret = {} + for section in self._config.sections(): + data = {} + for key, value in self._config.items(section): + data[key] = value + s1 = section.split('_') + if s1[-1] in self.schemas: + ret[tuple(s1)] = self.SectionSchema(data, self.schemas[s1[-1]]) + else: + ret[(section,)] = self.Section(data) + return ret + + def keys(self): + return self._convert().keys() + + def read(self, data): + return self._config.read(data) + + class Section(dict): + def __init__(self, data): + super(ConfigParser.Section, self).__init__(data) + + def __str__(self): + return '<%s(%s)>' % (self.__class__.__name__, self._data) + + class SectionSchema(Section): + __slots__ = () + + def __init__(self, data, schema): + for key in data.keys(): + try: + data[key] = schema[key](data[key]) + except KeyError: pass + super(ConfigParser.SectionSchema, self).__init__(data) + +if __name__ == '__main__': + import sys + config = ConfigReaderCore(['debian/config']) + sections = config.keys() + sections.sort() + for section in sections: + print "[%s]" % (section,) + items = config[section] + items_keys = items.keys() + items_keys.sort() + for item in items: + print "%s: %s" % (item, items[item]) + print + diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index 7b6e9ba10..977a0bd57 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -1,103 +1,154 @@ import itertools, os.path, re, utils -def read_changelog(dir = ''): - r = re.compile(r""" -^ -( -(?P
- (?P - \w[-+0-9a-z.]+ - ) - \ - \( - (?P - [^\(\)\ \t]+ - ) - \) - \s+ - (?P - [-0-9a-zA-Z]+ - ) - \; -) -) -""", re.VERBOSE) - f = file(os.path.join(dir, "debian/changelog")) - entries = [] - act_upstream = None - while True: - line = f.readline() - if not line: - break - line = line.strip('\n') - match = r.match(line) - if not match: - continue - if match.group('header'): - e = {} - e['Distribution'] = match.group('header_distribution') - e['Source'] = match.group('header_source') - version = parse_version(match.group('header_version')) - e['Version'] = version - if act_upstream is None: - act_upstream = version['upstream'] - elif version['upstream'] != act_upstream: - break - entries.append(e) - return entries - -def parse_version(version): - ret = { - 'complete': version, - 'upstream': version, - 'debian': None, - 'linux': None, - } - try: - i = len(version) - version[::-1].index('-') - except ValueError: - return ret - ret['upstream'] = version[:i-1] - ret['debian'] = version[i:] - try: - ret['linux'] = parse_version_linux(version) - except ValueError: - pass - return ret - -def parse_version_linux(version): - version_re = ur""" +class Changelog(list): + _rules = r""" ^ (?P - (?P - (?P\d+\.\d+) - \. + \w[-+0-9a-z.]+ +) +\ +\( +(?P + [^\(\)\ \t]+ +) +\) +\s+ +(?P + [-+0-9a-zA-Z.]+ +) +\; +""" + _re = re.compile(_rules, re.X) + + class Entry(object): + __slot__ = 'distribution', 'source', 'version' + + def __init__(self, distribution, source, version): + self.distribution, self.source, self.version = distribution, source, version + + def __init__(self, dir = '', version = None): + if version is None: + version = Version + f = file(os.path.join(dir, "debian/changelog")) + while True: + line = f.readline() + if not line: + break + match = self._re.match(line) + if not match: + continue + try: + v = version(match.group('version')) + except Exception: + if not len(self): + raise + v = Version(match.group('version')) + self.append(self.Entry(match.group('distribution'), match.group('source'), v)) + +class Version(object): + _version_rules = ur""" +^ +(?: + (?P \d+ ) - (?: - ~ - (?P - .+? - ) - )? + : +)? +(?P + .+? +) +(?: - (?P[^-]+) -) +)? $ """ - match = re.match(version_re, version, re.X) - if match is None: - raise ValueError - ret = match.groupdict() - if ret['modifier'] is not None: - ret['upstream'] = '%s-%s' % (ret['version'], ret['modifier']) - ret['source_upstream'] = '%s~%s' % (ret['version'], ret['modifier']) - else: - ret['upstream'] = ret['version'] - ret['source_upstream'] = ret['version'] - return ret + _version_re = re.compile(_version_rules, re.X) -class package_description(object): + def __init__(self, version): + match = self._version_re.match(version) + if match is None: + raise RuntimeError, "Invalid debian version" + self.epoch = None + if match.group("epoch") is not None: + self.epoch = int(match.group("epoch")) + self.upstream = match.group("upstream") + self.debian = match.group("debian") + + def __str__(self): + return self.complete + + @property + def complete(self): + if self.epoch is not None: + return "%d:%s" % (self.epoch, self.complete_noepoch) + return self.complete_noepoch + + @property + def complete_noepoch(self): + if self.debian is not None: + return "%s-%s" % (self.upstream, self.debian) + return self.upstream + +class VersionLinux(Version): + _version_linux_rules = ur""" +^ +(?P + (?P\d+\.\d+) + \. + \d+ +) +(?: + ~ + (?P + .+? + ) +)? +(?: + \.dfsg\. + (?P + \d+ + ) +)? +- +(?:[^-]+) +$ +""" + _version_linux_re = re.compile(_version_linux_rules, re.X) + + def __init__(self, version): + super(VersionLinux, self).__init__(version) + match = self._version_linux_re.match(version) + if match is None: + raise RuntimeError, "Invalid debian linux version" + d = match.groupdict() + self.linux_major = d['major'] + self.linux_modifier = d['modifier'] + self.linux_version = d['version'] + if d['modifier'] is not None: + self.linux_upstream = '-'.join((d['version'], d['modifier'])) + else: + self.linux_upstream = d['version'] + self.linux_dfsg = d['dfsg'] + +class PackageFieldList(list): + def __init__(self, value = None): + self.extend(value) + + def __str__(self): + return ' '.join(self) + + def _extend(self, value): + if value is not None: + self.extend([j.strip() for j in re.split('\s', value.strip())]) + + def extend(self, value): + if isinstance(value, str): + self._extend(value) + else: + super(PackageFieldList, self).extend(value) + +class PackageDescription(object): __slots__ = "short", "long" def __init__(self, value = None): @@ -110,7 +161,7 @@ class package_description(object): def __str__(self): ret = self.short + '\n' - w = utils.wrap(width = 74, fix_sentence_endings = True) + w = utils.TextWrapper(width = 74, fix_sentence_endings = True) pars = [] for i in self.long: pars.append('\n '.join(w.wrap(i))) @@ -121,48 +172,7 @@ class package_description(object): if str: self.long.extend(str.split("\n.\n")) -class package_relation(object): - __slots__ = "name", "version", "arches" - - _re = re.compile(r'^(\S+)(?: \(([^)]+)\))?(?: \[([^]]+)\])?$') - - def __init__(self, value = None): - if value is not None: - self.parse(value) - else: - self.name = None - self.version = None - self.arches = [] - - def __str__(self): - ret = [self.name] - if self.version is not None: - ret.extend([' (', self.version, ')']) - if self.arches: - ret.extend([' [', ' '.join(self.arches), ']']) - return ''.join(ret) - - def config(self, entry): - if self.version is not None or self.arches: - return - value = entry.get(self.name, None) - if value is None: - return - self.parse(value) - - def parse(self, value): - match = self._re.match(value) - if match is None: - raise RuntimeError, "Can't parse dependency %s" % value - match = match.groups() - self.name = match[0] - self.version = match[1] - if match[2] is not None: - self.arches = re.split('\s+', match[2]) - else: - self.arches = [] - -class package_relation_list(list): +class PackageRelation(list): def __init__(self, value = None): if value is not None: self.extend(value) @@ -178,18 +188,14 @@ class package_relation_list(list): def append(self, value): if isinstance(value, basestring): - value = package_relation_group(value) - elif not isinstance(value, package_relation_group): + value = PackageRelationGroup(value) + elif not isinstance(value, PackageRelationGroup): raise ValueError, "got %s" % type(value) j = self._match(value) if j: - j._update_arches(value) + j._updateArches(value) else: - super(package_relation_list, self).append(value) - - def config(self, entry): - for i in self: - i.config(entry) + super(PackageRelation, self).append(value) def extend(self, value): if isinstance(value, basestring): @@ -199,7 +205,7 @@ class package_relation_list(list): for i in value: self.append(i) -class package_relation_group(list): +class PackageRelationGroup(list): def __init__(self, value = None): if value is not None: self.extend(value) @@ -213,7 +219,7 @@ class package_relation_group(list): return None return self - def _update_arches(self, value): + def _updateArches(self, value): for i, j in itertools.izip(self, value): if i.arches: for arch in j.arches: @@ -222,14 +228,10 @@ class package_relation_group(list): def append(self, value): if isinstance(value, basestring): - value = package_relation(value) - elif not isinstance(value, package_relation): + value = PackageRelationEntry(value) + elif not isinstance(value, PackageRelationEntry): raise ValueError - super(package_relation_group, self).append(value) - - def config(self, entry): - for i in self: - i.config(entry) + super(PackageRelationGroup, self).append(value) def extend(self, value): if isinstance(value, basestring): @@ -239,25 +241,78 @@ class package_relation_group(list): for i in value: self.append(i) -class package(dict): - _fields = utils.sorted_dict(( +class PackageRelationEntry(object): + __slots__ = "name", "operator", "version", "arches" + + _re = re.compile(r'^(\S+)(?: \((<<|<=|=|!=|>=|>>)\s*([^)]+)\))?(?: \[([^]]+)\])?$') + + class _operator(object): + OP_LT = 1; OP_LE = 2; OP_EQ = 3; OP_NE = 4; OP_GE = 5; OP_GT = 6 + operators = { '<<': OP_LT, '<=': OP_LE, '=': OP_EQ, '!=': OP_NE, '>=': OP_GE, '>>': OP_GT } + operators_neg = { OP_LT: OP_GE, OP_LE: OP_GT, OP_EQ: OP_NE, OP_NE: OP_EQ, OP_GE: OP_LT, OP_GT: OP_LE } + operators_text = dict([(b, a) for a, b in operators.iteritems()]) + + __slots__ = '_op', + + def __init__(self, value): + self._op = self.operators[value] + + def __neg__(self): + return self.__class__(self.operators_text[self.operators_neg[self._op]]) + + def __str__(self): + return self.operators_text[self._op] + + def __init__(self, value = None): + if isinstance(value, basestring): + self.parse(value) + else: + raise ValueError + + def __str__(self): + ret = [self.name] + if self.operator is not None and self.version is not None: + ret.extend([' (', str(self.operator), ' ', self.version, ')']) + if self.arches: + ret.extend([' [', ' '.join(self.arches), ']']) + return ''.join(ret) + + def parse(self, value): + match = self._re.match(value) + if match is None: + raise RuntimeError, "Can't parse dependency %s" % value + match = match.groups() + self.name = match[0] + if match[1] is not None: + self.operator = self._operator(match[1]) + else: + self.operator = None + self.version = match[2] + if match[3] is not None: + self.arches = re.split('\s+', match[3]) + else: + self.arches = [] + +class Package(dict): + _fields = utils.SortedDict(( ('Package', str), ('Source', str), - ('Architecture', utils.field_list), + ('Architecture', PackageFieldList), ('Section', str), ('Priority', str), ('Maintainer', str), ('Uploaders', str), ('Standards-Version', str), - ('Build-Depends', package_relation_list), - ('Build-Depends-Indep', package_relation_list), - ('Provides', package_relation_list), - ('Depends', package_relation_list), - ('Recommends', package_relation_list), - ('Suggests', package_relation_list), - ('Replaces', package_relation_list), - ('Conflicts', package_relation_list), - ('Description', package_description), + ('Build-Depends', PackageRelation), + ('Build-Depends-Indep', PackageRelation), + ('Provides', PackageRelation), + ('Pre-Depends', PackageRelation), + ('Depends', PackageRelation), + ('Recommends', PackageRelation), + ('Suggests', PackageRelation), + ('Replaces', PackageRelation), + ('Conflicts', PackageRelation), + ('Description', PackageDescription), )) def __setitem__(self, key, value): @@ -266,7 +321,7 @@ class package(dict): if not isinstance(value, cls): value = cls(value) except KeyError: pass - super(package, self).__setitem__(key, value) + super(Package, self).__setitem__(key, value) def iterkeys(self): keys = set(self.keys()) @@ -278,20 +333,10 @@ class package(dict): yield i def iteritems(self): - keys = set(self.keys()) - for i in self._fields.iterkeys(): - if self.has_key(i): - keys.remove(i) - yield (i, self[i]) - for i in keys: + for i in self.iterkeys(): yield (i, self[i]) def itervalues(self): - keys = set(self.keys()) - for i in self._fields.iterkeys(): - if self.has_key(i): - keys.remove(i) - yield self[i] - for i in keys: + for i in self.iterkeys(): yield self[i] diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py new file mode 100644 index 000000000..90b009f83 --- /dev/null +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -0,0 +1,312 @@ +from config import * +from debian import * +from utils import * + +class PackagesList(SortedDict): + def append(self, package): + self[package['Package']] = package + + def extend(self, packages): + for package in packages: + self[package['Package']] = package + +class Makefile(object): + def __init__(self): + self.rules = {} + self.add('.NOTPARALLEL') + + def add(self, name, deps = None, cmds = None): + if name in self.rules: + self.rules[name].add(deps, cmds) + else: + self.rules[name] = self.Rule(name, deps, cmds) + + def write(self, out): + r = self.rules.keys() + r.sort() + for i in r: + self.rules[i].write(out) + + class Rule(object): + def __init__(self, name, deps = None, cmds = None): + self.name = name + self.deps, self.cmds = set(), [] + self.add(deps, cmds) + + def add(self, deps = None, cmds = None): + if deps is not None: + self.deps.update(deps) + if cmds is not None: + self.cmds.append(cmds) + + def write(self, out): + deps_string = '' + if self.deps: + deps = list(self.deps) + deps.sort() + deps_string = ' ' + ' '.join(deps) + + if self.cmds: + if deps_string: + out.write('%s::%s\n' % (self.name, deps_string)) + for c in self.cmds: + out.write('%s::\n' % self.name) + for i in c: + out.write('\t%s\n' % i) + else: + out.write('%s:%s\n' % (self.name, deps_string)) + +class MakeFlags(dict): + def __repr__(self): + repr = super(flags, self).__repr__() + return "%s(%s)" % (self.__class__.__name__, repr) + + def __str__(self): + return ' '.join(["%s='%s'" % i for i in self.iteritems()]) + + def copy(self): + return self.__class__(super(MakeFlags, self).copy()) + +class Gencontrol(object): + makefile_targets = ('binary-arch', 'build', 'setup', 'source') + + def __init__(self, config, templates): + self.config, self.templates = config, templates + + def __call__(self): + packages = PackagesList() + makefile = Makefile() + + self.do_source(packages) + self.do_main(packages, makefile) + self.do_extra(packages, makefile) + + self.write_control(packages.itervalues()) + self.write_makefile(makefile) + + def do_source(self, packages): + source = self.templates["control.source"] + packages['source'] = self.process_package(source[0], self.vars) + + def do_main(self, packages, makefile): + config_entry = self.config['base',] + vars = self.vars.copy() + vars.update(config_entry) + + makeflags = MakeFlags() + extra = {} + + self.do_main_setup(vars, makeflags, extra) + self.do_main_packages(packages, extra) + self.do_main_makefile(makefile, makeflags, extra) + + for arch in iter(self.config['base',]['arches']): + self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra) + + def do_main_setup(self, vars, makeflags, extra): + makeflags.update({ + 'MAJOR': self.version.linux_major, + 'VERSION': self.version.linux_version, + 'UPSTREAMVERSION': self.version.linux_upstream, + 'ABINAME': self.abiname, + }) + + def do_main_makefile(self, makefile, makeflags, extra): + makefile.add('binary-indep', cmds = ["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags]) + + def do_main_packages(self, packages, extra): + pass + + def do_extra(self, packages, makefile): + try: + templates_extra = self.templates["control.extra"] + except IOError: + return + + packages.extend(self.process_packages(templates_extra, {})) + extra_arches = {} + for package in templates_extra: + arches = package['Architecture'] + for arch in arches: + i = extra_arches.get(arch, []) + i.append(package) + extra_arches[arch] = i + archs = extra_arches.keys() + archs.sort() + for arch in archs: + cmds = [] + for i in extra_arches[arch]: + tmp = [] + if i.has_key('X-Version-Overwrite-Epoch'): + tmp.append("-v1:%s" % self.version['source']) + cmds.append("$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-p%s' GENCONTROL_ARGS='%s'" % (i['Package'], ' '.join(tmp))) + makefile.add('binary-arch_%s' % arch ['binary-arch_%s_extra' % arch]) + makefile.add("binary-arch_%s_extra" % arch, cmds = cmds) + + def do_arch(self, packages, makefile, arch, vars, makeflags, extra): + config_base = self.config['base', arch] + vars.update(config_base) + vars['arch'] = arch + + makeflags['ARCH'] = arch + + self.do_arch_setup(vars, makeflags, arch, extra) + self.do_arch_makefile(makefile, arch, makeflags, extra) + self.do_arch_packages(packages, makefile, arch, vars, makeflags, extra) + self.do_arch_recurse(packages, makefile, arch, vars, makeflags, extra) + + def do_arch_setup(self, vars, makeflags, arch, extra): + pass + + def do_arch_makefile(self, makefile, arch, makeflags, extra): + for i in self.makefile_targets: + target1 = i + target2 = "%s_%s" % (i, arch) + makefile.add(target1, [target2]) + makefile.add(target2, ['%s_real' % target2]) + makefile.add('%s_real' % target2) + + def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra): + pass + + def do_arch_recurse(self, packages, makefile, arch, vars, makeflags, extra): + for featureset in self.config['base', arch]['featuresets']: + self.do_featureset(packages, makefile, arch, featureset, vars.copy(), makeflags.copy(), extra) + + def do_featureset(self, packages, makefile, arch, featureset, vars, makeflags, extra): + config_base = self.config.merge('base', arch, featureset) + vars.update(config_base) + + if not config_base.get('enabled', True): + return + + makeflags['FEATURESET'] = featureset + + vars['localversion'] = '' + if featureset != 'none': + vars['localversion'] = '-' + featureset + + self.do_featureset_setup(vars, makeflags, arch, featureset, extra) + self.do_featureset_makefile(makefile, arch, featureset, makeflags, extra) + self.do_featureset_packages(packages, makefile, arch, featureset, vars, makeflags, extra) + self.do_featureset_recurse(packages, makefile, arch, featureset, vars, makeflags, extra) + + def do_featureset_setup(self, vars, makeflags, arch, featureset, extra): + pass + + def do_featureset_makefile(self, makefile, arch, featureset, makeflags, extra): + for i in self.makefile_targets: + target1 = "%s_%s" % (i, arch) + target2 = "%s_%s_%s" % (i, arch, featureset) + makefile.add(target1, [target2]) + makefile.add(target2, ['%s_real' % target2]) + makefile.add('%s_real' % target2) + + def do_featureset_packages(self, packages, makefile, arch, featureset, vars, makeflags, extra): + pass + + def do_featureset_recurse(self, packages, makefile, arch, featureset, vars, makeflags, extra): + for flavour in self.config['base', arch, featureset]['flavours']: + self.do_flavour(packages, makefile, arch, featureset, flavour, vars.copy(), makeflags.copy(), extra) + + def do_flavour(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra): + config_base = self.config.merge('base', arch, featureset, flavour) + vars.update(config_base) + + if not vars.has_key('longclass'): + vars['longclass'] = vars['class'] + + makeflags['FLAVOUR'] = flavour + vars['localversion'] += '-' + flavour + + self.do_flavour_setup(vars, makeflags, arch, featureset, flavour, extra) + self.do_flavour_makefile(makefile, arch, featureset, flavour, makeflags, extra) + self.do_flavour_packages(packages, makefile, arch, featureset, flavour, vars, makeflags, extra) + + def do_flavour_setup(self, vars, makeflags, arch, featureset, flavour, extra): + for i in ( + ('kernel-arch', 'KERNEL_ARCH'), + ('localversion', 'LOCALVERSION'), + ): + if vars.has_key(i[0]): + makeflags[i[1]] = vars[i[0]] + + def do_flavour_makefile(self, makefile, arch, featureset, flavour, makeflags, extra): + for i in self.makefile_targets: + target1 = "%s_%s_%s" % (i, arch, featureset) + target2 = "%s_%s_%s_%s" % (i, arch, featureset, flavour) + makefile.add(target1, [target2]) + makefile.add(target2, ['%s_real' % target2]) + makefile.add('%s_real' % target2) + + def do_flavour_packages(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra): + pass + + def process_relation(self, key, e, in_e, vars): + import copy + dep = copy.deepcopy(in_e[key]) + for groups in dep: + for item in groups: + item.name = self.substitute(item.name, vars) + e[key] = dep + + def process_description(self, e, in_e, vars): + in_desc = in_e['Description'] + desc = in_desc.__class__() + desc.short = self.substitute(in_desc.short, vars) + for i in in_desc.long: + desc.append(self.substitute(i, vars)) + e['Description'] = desc + + def process_package(self, in_entry, vars): + e = Package() + for key, value in in_entry.iteritems(): + if isinstance(value, PackageRelation): + self.process_relation(key, e, in_entry, vars) + elif key == 'Description': + self.process_description(e, in_entry, vars) + elif key[:2] == 'X-': + pass + else: + e[key] = self.substitute(value, vars) + return e + + def process_packages(self, in_entries, vars): + entries = [] + for i in in_entries: + entries.append(self.process_package(i, vars)) + return entries + + def process_version_linux(self, version, abiname): + return { + 'upstreamversion': version.linux_upstream, + 'version': version.linux_version, + 'source_upstream': version.upstream, + 'major': version.linux_major, + 'abiname': abiname, + } + + def substitute(self, s, vars): + if isinstance(s, (list, tuple)): + for i in xrange(len(s)): + s[i] = self.substitute(s[i], vars) + return s + def subst(match): + return vars[match.group(1)] + return re.sub(r'@([-_a-z]+)@', subst, s) + + def write_control(self, list): + self.write_rfc822(file("debian/control", 'w'), list) + + def write_makefile(self, makefile): + f = file("debian/rules.gen", 'w') + makefile.write(f) + f.close() + + def write_rfc822(self, f, list): + for entry in list: + for key, value in entry.iteritems(): + f.write("%s: %s\n" % (key, value)) + f.write('\n') + + diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index 1519e4ebb..abe46b7b3 100644 --- a/debian/lib/python/debian_linux/utils.py +++ b/debian/lib/python/debian_linux/utils.py @@ -1,21 +1,21 @@ -import debian, re, textwrap +import debian, re, os, textwrap -class sorted_dict(dict): +class SortedDict(dict): __slots__ = '_list', def __init__(self, entries = None): - super(sorted_dict, self).__init__() + super(SortedDict, self).__init__() self._list = [] if entries is not None: for key, value in entries: self[key] = value def __delitem__(self, key): - super(sorted_dict, self).__delitem__(key) + super(SortedDict, self).__delitem__(key) self._list.remove(key) def __setitem__(self, key, value): - super(sorted_dict, self).__setitem__(key, value) + super(SortedDict, self).__setitem__(key, value) if key not in self._list: self._list.append(key) @@ -31,74 +31,38 @@ class sorted_dict(dict): for i in iter(self._list): yield self[i] -class field_list(list): - TYPE_WHITESPACE = object() - TYPE_COMMATA = object() - - def __init__(self, value = None, type = TYPE_WHITESPACE): - self.type = type - if isinstance(value, field_list): - self.type = value.type - self.extend(value) - elif isinstance(value, (list, tuple)): - self.extend(value) - else: - self._extend(value) - - def __str__(self): - if self.type is self.TYPE_WHITESPACE: - type = ' ' - elif self.type is self.TYPE_COMMATA: - type = ', ' - return type.join(self) - - def _extend(self, value): - if self.type is self.TYPE_WHITESPACE: - type = '\s' - elif self.type is self.TYPE_COMMATA: - type = ',' - if value is not None: - self.extend([j.strip() for j in re.split(type, value.strip())]) - - def extend(self, value): - if isinstance(value, str): - self._extend(value) - else: - super(field_list, self).extend(value) - -class field_list_commata(field_list): - def __init__(self, value = None): - super(field_list_commata, self).__init__(value, field_list.TYPE_COMMATA) - -class field_string(str): - def __str__(self): - return '\n '.join(self.split('\n')) - -class templates(dict): - def __init__(self, dir = None): - if dir is None: - self.dir = "debian/templates" - else: - self.dir = dir +class Templates(dict): + def __init__(self, dirs = ["debian/templates"]): + self.dirs = dirs def __getitem__(self, key): try: - return dict.__getitem__(self, key) + return super(Templates, self).__getitem__(key) except KeyError: pass - ret = self._read(key) - dict.__setitem__(self, key, ret) - return ret + value = self._read(key) + super(Templates, self).__setitem__(key, value) + return value def __setitem__(self, key, value): raise NotImplemented() - def _read(self, filename): + def _read(self, name): + prefix, id = name.split('.', 1) + + for dir in self.dirs: + filename = "%s/%s.in" % (dir, name) + if os.path.exists(filename): + f = file(filename) + if prefix == 'control': + return self._read_control(f) + return f.read() + raise KeyError(name) + + def _read_control(self, f): entries = [] - f = file("%s/%s.in" % (self.dir, filename)) - while True: - e = debian.package() + e = debian.Package() last = None lines = [] while True: @@ -129,7 +93,7 @@ class templates(dict): return entries -class wrap(textwrap.TextWrapper): +class TextWrapper(textwrap.TextWrapper): wordsep_re = re.compile( r'(\s+|' # any whitespace r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash diff --git a/debian/rules b/debian/rules index d3d868cda..d0282eb68 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,12 @@ #!/usr/bin/make -f + SHELL := sh -e DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -srcver := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}') -VERSION := $(shell echo $(srcver) | sed -e 's,-[^-]*$$,,') -MAJOR := $(word 1,$(subst ., ,$(VERSION))).$(word 2,$(subst ., ,$(VERSION))) +SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p') +VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') +VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,') +VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') include debian/rules.defs @@ -17,21 +19,24 @@ $(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) $(BUILD_DIR) $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ -orig: ../orig/linux-kbuild-$(MAJOR)-$(VERSION) - rsync --delete --exclude debian --exclude src --exclude .svn --link-dest=$^/ -av $^/ . +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))) -../orig/linux-kbuild-$(MAJOR)-$(VERSION): - if [ -f "../linux-kbuild-$(MAJOR)_$(VERSION).orig.tar.gz" ]; then \ - mkdir -p ../orig; \ - tar -C ../orig -xzf ../linux-kbuild-$(MAJOR)_$(VERSION).orig.tar.gz; \ - else \ - echo "Can't find orig tarball." >&2; \ - exit 1; \ - fi +orig: $(DIR_ORIG) + rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . + +$(DIR_ORIG): +ifeq ($(TAR_ORIG),) + $(error Cannot find orig tarball $(TAR_ORIG_NAME)) +else + mkdir -p ../orig + tar -C ../orig -xzf $(TAR_ORIG) +endif maintainerclean: -rm debian/control debian/control.md5sum debian/rules.gen - -rm -rf COPYING scripts + -rm -rf COPYING include scripts clean: debian/control dh_testdir @@ -47,7 +52,7 @@ binary-arch: binary: binary-indep binary-arch -CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*) +CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*) debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES) if [ -f debian/control.md5sum ]; then \ if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \ From e1b432f7bf2a447cb663c6983f91e959bf282207 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 14 Oct 2007 10:08:05 +0000 Subject: [PATCH 054/487] debian/rules: Fix rsync exclusion. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9660 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index d0282eb68..14d92e1cc 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,7 @@ TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) - rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . + rsync --delete --exclude debian --exclude src --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . $(DIR_ORIG): ifeq ($(TAR_ORIG),) From 46cae1d25288643d66a640a59e1484e4013d4dc9 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 14 Oct 2007 10:10:42 +0000 Subject: [PATCH 055/487] debian/templates/control.main.in: Remove provides. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9661 --- debian/templates/control.main.in | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 62101acc3..b172cbc2e 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -3,6 +3,5 @@ Architecture: any Section: devel Priority: optional Depends: ${shlibs:Depends} -Provides: linux-kbuild, linux-kbuild-@major@ Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From 211e81721c745d6a5e5c77232e01f0bb71ed5a91 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 16 Oct 2007 15:24:35 +0000 Subject: [PATCH 056/487] * debian/changelog: Update. * src/mod/modpost.c: Support -s. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9666 --- debian/changelog | 3 ++- src/mod/modpost.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ca5a48096..0cb2f5597 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ linux-kbuild-2.6 (2.6.23-1) UNRELEASED; urgency=low * New upstream version. + * modpost: Support -s. - -- Bastian Blank Sun, 14 Oct 2007 11:28:39 +0200 + -- Bastian Blank Tue, 16 Oct 2007 17:22:41 +0200 linux-kbuild-2.6 (2.6.22-1) unstable; urgency=low diff --git a/src/mod/modpost.c b/src/mod/modpost.c index 1bb1a5637..764db9ca3 100644 --- a/src/mod/modpost.c +++ b/src/mod/modpost.c @@ -13,7 +13,7 @@ int main (int argc, char *argv[]) int opt; FILE *file; - while ((opt = getopt (argc, argv, "ai:I:mo:w")) != -1) + while ((opt = getopt (argc, argv, "ai:I:mo:sw")) != -1) { switch(opt) { @@ -22,6 +22,7 @@ int main (int argc, char *argv[]) case 'I': case 'm': case 'o': + case 's': case 'w': break; default: From 5aa494b954a620e8596c443827d4fdcae8019626 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 5 Dec 2007 07:24:45 +0000 Subject: [PATCH 057/487] debian/changelog: Prepare to release (2.6.23-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=9894 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0cb2f5597..ee4e0088f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (2.6.23-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.23-1) unstable; urgency=low * New upstream version. * modpost: Support -s. - -- Bastian Blank Tue, 16 Oct 2007 17:22:41 +0200 + -- Bastian Blank Wed, 05 Dec 2007 08:23:28 +0100 linux-kbuild-2.6 (2.6.22-1) unstable; urgency=low From 59bb4d212baa814e1d1f8ac662cf303311000355 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 11 Dec 2007 23:09:36 +0000 Subject: [PATCH 058/487] debian/changelog: Update to 2.6.24~rc5-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=9944 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ee4e0088f..39195e778 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.24~rc5-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Wed, 12 Dec 2007 00:02:05 +0100 + linux-kbuild-2.6 (2.6.23-1) unstable; urgency=low * New upstream version. From 8de9017f23af4c519bba57bff02fda8b26c578e3 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 29 Jan 2008 11:58:36 +0000 Subject: [PATCH 059/487] debian/changelog: Set version to 2.6.24-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=10246 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 39195e778..458733b30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.24~rc5-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.24-1) UNRELEASED; urgency=low * New upstream version. From 0798d8cf16abb441673829ff59cecc52614446bd Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 29 Jan 2008 11:58:49 +0000 Subject: [PATCH 060/487] debian/bin/genorig.py: Remove whitespaces. svn path=/dists/trunk/linux-kbuild-2.6/; revision=10247 --- debian/bin/genorig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 637ecaff1..324882a92 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -102,9 +102,9 @@ class Main(object): raise if __name__ == '__main__': - from optparse import OptionParser - parser = OptionParser(usage = "%prog [OPTION]... TAR [PATCH]") - parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") + from optparse import OptionParser + parser = OptionParser(usage = "%prog [OPTION]... TAR [PATCH]") + parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") options, args = parser.parse_args() input_tar = args[0] From 83d7e328702a4e348c365870bf553d55d8607e5b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 29 Jan 2008 13:03:35 +0000 Subject: [PATCH 061/487] debian/changelog: Prepare to release (2.6.24-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=10249 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 458733b30..edfa952ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.24-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.24-1) unstable; urgency=low * New upstream version. - -- Bastian Blank Wed, 12 Dec 2007 00:02:05 +0100 + -- Bastian Blank Tue, 29 Jan 2008 14:03:06 +0100 linux-kbuild-2.6 (2.6.23-1) unstable; urgency=low From 3c37bd01b684fa0d13352ef1d4baaecaa7fe0768 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 29 Apr 2008 11:26:00 +0000 Subject: [PATCH 062/487] debian/changelog: Update version to 2.6.25-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11214 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index edfa952ba..946d276d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.25-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Fri, 25 Apr 2008 12:43:16 +0200 + linux-kbuild-2.6 (2.6.24-1) unstable; urgency=low * New upstream version. From 131a1b3aa0ed8ebfd40b553e4ce3c552dea98498 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 2 May 2008 08:33:39 +0000 Subject: [PATCH 063/487] debian/changelog: Prepare to release (2.6.25-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=11242 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 946d276d5..58eee8074 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.25-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.25-1) unstable; urgency=low * New upstream version. - -- Bastian Blank Fri, 25 Apr 2008 12:43:16 +0200 + -- Bastian Blank Fri, 02 May 2008 10:32:13 +0200 linux-kbuild-2.6 (2.6.24-1) unstable; urgency=low From 32e3291306f2f94fc0119b69a7c75482e6774f55 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:27:45 +0000 Subject: [PATCH 064/487] debian/bin/genorig.py: Accept more linux tarballs. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11293 --- debian/bin/genorig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 324882a92..66b8f0add 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -38,7 +38,7 @@ class Main(object): def upstream_extract(self): self.log("Extracting tarball %s\n" % self.input_tar) - match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', self.input_tar) + match = re.match(r'(^|.*/)(?Plinux-[\d.]+(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', self.input_tar) if not match: raise RuntimeError("Can't identify name of tarball") cmdline = ['tar -xf', self.input_tar, '-C', self.dir] From abe877e8b9c12ffbf1694426eee1c5385fa244c8 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:29:48 +0000 Subject: [PATCH 065/487] debian/lib/python/debian_linux/debian.py: Accept 4 component linux versions. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11294 --- debian/lib/python/debian_linux/debian.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index 977a0bd57..3b5d98ca6 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -99,6 +99,8 @@ class VersionLinux(Version): \d+ ) (?: + (\.\d+) + | ~ (?P .+? From eb62c80c17e1c5cc3f18e2444a4833feabf37021 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:32:28 +0000 Subject: [PATCH 066/487] src/mod/modpost.c: Accept new options. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11295 --- src/mod/modpost.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/modpost.c b/src/mod/modpost.c index 764db9ca3..797a415de 100644 --- a/src/mod/modpost.c +++ b/src/mod/modpost.c @@ -13,16 +13,20 @@ int main (int argc, char *argv[]) int opt; FILE *file; - while ((opt = getopt (argc, argv, "ai:I:mo:sw")) != -1) + while ((opt = getopt (argc, argv, "aci:I:K:mM:o:sSw")) != -1) { switch(opt) { case 'a': case 'i': + case 'c': case 'I': + case 'K': case 'm': + case 'M': case 'o': case 's': + case 'S': case 'w': break; default: From 5234d538b9e6cd54e429174a52d66af5bfc04a77 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:32:51 +0000 Subject: [PATCH 067/487] debian/changelog: Update to 2.6.25.1-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11296 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 58eee8074..9f8289eb6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.25.1-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Mon, 05 May 2008 19:19:11 +0200 + linux-kbuild-2.6 (2.6.25-1) unstable; urgency=low * New upstream version. From 896a43973c223440812f377acfb9428e43d0b55b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:57:21 +0000 Subject: [PATCH 068/487] debian/changelog: Set version to 2.6.25-2. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11297 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9f8289eb6..45bbb27a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -linux-kbuild-2.6 (2.6.25.1-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.25-2) UNRELEASED; urgency=low - * New upstream version. + * modpost: Support new parameters. -- Bastian Blank Mon, 05 May 2008 19:19:11 +0200 From 17dddca5631137f122cf60611484868fb60979ff Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:58:10 +0000 Subject: [PATCH 069/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11298 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 45bbb27a5..b387ed37f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ linux-kbuild-2.6 (2.6.25-2) UNRELEASED; urgency=low - * modpost: Support new parameters. + * modpost: Support new parameters. (closes: #479271) -- Bastian Blank Mon, 05 May 2008 19:19:11 +0200 From 90edba95bd1a85b7c5f93f5062a7f20ef404aeab Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 May 2008 17:59:33 +0000 Subject: [PATCH 070/487] debian/changelog: Prepare to release (2.6.25-2). svn path=/dists/trunk/linux-kbuild-2.6/; revision=11299 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b387ed37f..a76ff44f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.25-2) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.25-2) unstable; urgency=low * modpost: Support new parameters. (closes: #479271) - -- Bastian Blank Mon, 05 May 2008 19:19:11 +0200 + -- Bastian Blank Mon, 05 May 2008 19:58:40 +0200 linux-kbuild-2.6 (2.6.25-1) unstable; urgency=low From af5625d2119777168d9c1c5164c684e4fd202539 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Fri, 30 May 2008 07:23:02 +0000 Subject: [PATCH 071/487] linux-kbuild bump standard version to latest without changes svn path=/dists/trunk/linux-kbuild-2.6/; revision=11495 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 16678b49f..419755c97 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,5 +3,5 @@ Section: devel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank -Standards-Version: 3.7.2 +Standards-Version: 3.7.3 Build-Depends: debhelper (>= 4.1.0) From b2f04cdeefcd45e08abbf2a9159148ca933d6eed Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Jun 2008 09:38:45 +0000 Subject: [PATCH 072/487] * debian/changelog: Update. * src/mod/modpost.c: Support parameter "e". svn path=/dists/trunk/linux-kbuild-2.6/; revision=11681 --- debian/changelog | 7 +++++++ src/mod/modpost.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a76ff44f4..95de430fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-kbuild-2.6 (2.6.26~rc7-1) UNRELEASED; urgency=low + + * New upstream version. + * modpost: Support new parameters. + + -- Bastian Blank Sun, 22 Jun 2008 11:33:01 +0200 + linux-kbuild-2.6 (2.6.25-2) unstable; urgency=low * modpost: Support new parameters. (closes: #479271) diff --git a/src/mod/modpost.c b/src/mod/modpost.c index 797a415de..57590ab96 100644 --- a/src/mod/modpost.c +++ b/src/mod/modpost.c @@ -13,11 +13,12 @@ int main (int argc, char *argv[]) int opt; FILE *file; - while ((opt = getopt (argc, argv, "aci:I:K:mM:o:sSw")) != -1) + while ((opt = getopt (argc, argv, "acei:I:K:mM:o:sSw")) != -1) { switch(opt) { case 'a': + case 'e': case 'i': case 'c': case 'I': From 6182e3b55a771dfc35bb9ef922a8c3cbeb8a428b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 14 Jul 2008 05:27:12 +0000 Subject: [PATCH 073/487] debian/changelog: Update to 2.6.26-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11830 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 95de430fe..6aa60d86a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.26~rc7-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.26-1) UNRELEASED; urgency=low * New upstream version. * modpost: Support new parameters. From c2efe3ba4d2d26a93687abac6629279b7891ea24 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 2 Aug 2008 11:11:19 +0000 Subject: [PATCH 074/487] debian/changelog: Prepare to release (2.6.26-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=11943 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6aa60d86a..be2db7d71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (2.6.26-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.26-1) unstable; urgency=low * New upstream version. * modpost: Support new parameters. - -- Bastian Blank Sun, 22 Jun 2008 11:33:01 +0200 + -- Bastian Blank Sat, 02 Aug 2008 13:09:54 +0200 linux-kbuild-2.6 (2.6.25-2) unstable; urgency=low From 0ff386a98c4894b2d0c580c13e4d3df9e6c4fe70 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 9 Aug 2008 13:30:45 +0000 Subject: [PATCH 075/487] src/Makefile - Remove not longer available scripts. - Add new script. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11984 --- src/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index ee130245c..3c5624854 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,11 +15,11 @@ DATA = \ mkversion SCRIPTS = \ - checkconfig.pl \ checkincludes.pl \ checkstack.pl \ checkversion.pl \ gcc-version.sh \ + gcc-x86_64-has-stack-protector.sh \ gen_initramfs_list.sh \ kernel-doc \ Lindent \ @@ -28,8 +28,6 @@ SCRIPTS = \ mkuboot.sh \ namespace.pl \ patch-kernel \ - reference_discarded.pl \ - reference_init.pl \ setlocalversion \ ver_linux From ca6833b55f4fd74d167490144772fb7b4a324faf Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 9 Aug 2008 13:31:41 +0000 Subject: [PATCH 076/487] src/Makefile.inc: Make the shell always error out. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11985 --- src/Makefile.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile.inc b/src/Makefile.inc index 1fd0cab1b..460222fd0 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -1,3 +1,5 @@ +SHELL = /bin/sh -e + CC = gcc CXX = g++ CFLAGS += -Wall -O2 @@ -7,7 +9,7 @@ all: all-local all-recursive install: install-local install-recursive all-recursive install-recursive: - @target=`echo $@ | sed s/-recursive//`; \ + @target=$(echo $@ | sed s/-recursive//); \ list='$(SUBDIRS)'; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ From ed819ba8862db85b8c335b958779590f630b9fef Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 9 Aug 2008 13:37:59 +0000 Subject: [PATCH 077/487] src/Makefile.inc: Let make check for file availability. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11986 --- src/Makefile.inc | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/Makefile.inc b/src/Makefile.inc index 460222fd0..e8a5f7ee8 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -19,17 +19,26 @@ all-recursive install-recursive: all-local: $(PROGS) -install-local: $(PROGS) - @list='$(PROGS)'; for p in $$list; do \ - echo " install -D '$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ - install -D -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ - done - @list='$(SCRIPTS)'; for p in $$list; do \ - echo " install -D '$(top_srcdir)/scripts/$(OUTDIR)/$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ - install -D -m755 "$(top_srcdir)/scripts/$(OUTDIR)/$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ - done - @list='$(DATA)'; for p in $$list; do \ - echo " install -D '$(top_srcdir)/scripts/$(OUTDIR)/$$p' '$(prefix)/scripts/$(OUTDIR)/$$p'"; \ - install -D -m644 "$(top_srcdir)/scripts/$(OUTDIR)/$$p" "$(prefix)/scripts/$(OUTDIR)/$$p"; \ +install-local: install-local-dir install-local-progs install-local-scripts install-local-data + +install-local-dir: + install -d "$(prefix)/scripts/$(OUTDIR)" + +install-local-progs: $(PROGS) + @for p in $^; do \ + echo " install -m755 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ + install -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ + done + +install-local-scripts: $(SCRIPTS) + @for p in $^; do \ + echo " install -m755 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ + install -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ + done + +install-local-data: $(DATA) + @for p in $^; do \ + echo " install -m644 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ + install -m644 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ done From 5fdd1270e9b2356e4e4a4f1203d27952e368aab4 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 9 Aug 2008 13:47:18 +0000 Subject: [PATCH 078/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=11987 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index be2db7d71..860f510dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.26-2) UNRELEASED; urgency=low + + * Include new scripts. (closes: #494435) + + -- Bastian Blank Sat, 09 Aug 2008 15:45:59 +0200 + linux-kbuild-2.6 (2.6.26-1) unstable; urgency=low * New upstream version. From fd204714f85913b2cc9aefc4f01025217531ce48 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 9 Aug 2008 18:45:42 +0000 Subject: [PATCH 079/487] debian/changelog: Prepare to release (2.6.26-2). svn path=/dists/trunk/linux-kbuild-2.6/; revision=11998 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 860f510dd..7579d86d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.26-2) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.26-2) unstable; urgency=low * Include new scripts. (closes: #494435) - -- Bastian Blank Sat, 09 Aug 2008 15:45:59 +0200 + -- Bastian Blank Sat, 09 Aug 2008 20:45:12 +0200 linux-kbuild-2.6 (2.6.26-1) unstable; urgency=low From 51f416577e7ae935c9e8b43a19f9cc5da9560449 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 10 Aug 2008 10:38:28 +0000 Subject: [PATCH 080/487] src/Makefile.inc: Fix recursion. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12021 --- src/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.inc b/src/Makefile.inc index e8a5f7ee8..ec638985f 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -9,7 +9,7 @@ all: all-local all-recursive install: install-local install-recursive all-recursive install-recursive: - @target=$(echo $@ | sed s/-recursive//); \ + @target=$(shell echo $@ | sed s/-recursive//); \ list='$(SUBDIRS)'; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ From 1be90495839e765407b8762f734a14526bfd07f5 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 10 Aug 2008 10:57:30 +0000 Subject: [PATCH 081/487] debian/changelog: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12022 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7579d86d3..e5d9ecbdf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.26-3) UNRELEASED; urgency=low + + * Fix recursive installation. (closes: #494435) + + -- Bastian Blank Sun, 10 Aug 2008 12:38:44 +0200 + linux-kbuild-2.6 (2.6.26-2) unstable; urgency=low * Include new scripts. (closes: #494435) From f9b772b80403b54a8a3c3cd91f9eba07b98f2eff Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 10 Aug 2008 11:02:06 +0000 Subject: [PATCH 082/487] debian/changelog: Prepare to release (2.6.26-3). svn path=/dists/trunk/linux-kbuild-2.6/; revision=12024 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e5d9ecbdf..009483330 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.26-3) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.26-3) unstable; urgency=low * Fix recursive installation. (closes: #494435) - -- Bastian Blank Sun, 10 Aug 2008 12:38:44 +0200 + -- Bastian Blank Sun, 10 Aug 2008 13:01:41 +0200 linux-kbuild-2.6 (2.6.26-2) unstable; urgency=low From 606e13be00a3262e9860050aba7bc42a366c64c8 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 29 Nov 2008 20:00:56 +0000 Subject: [PATCH 083/487] debian/rules, debian/rules.real, src/Makefile.inc: Proper mark rules which calls submake. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12464 --- debian/rules | 2 +- debian/rules.real | 2 +- src/Makefile.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 14d92e1cc..18ff8ef37 100755 --- a/debian/rules +++ b/debian/rules @@ -54,7 +54,7 @@ binary: binary-indep binary-arch CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*) debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES) - if [ -f debian/control.md5sum ]; then \ + +if [ -f debian/control.md5sum ]; then \ if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \ $(MAKE) -f debian/rules debian/control-real; \ fi \ diff --git a/debian/rules.real b/debian/rules.real index 636cc6496..8d2bea2ed 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -11,7 +11,7 @@ $(STAMPS_DIR)/build: rm -rf '$(DIR)' mkdir -p '$(DIR)' cp -al src/* '$(DIR)' - make -C $(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) touch '$@' install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) diff --git a/src/Makefile.inc b/src/Makefile.inc index ec638985f..8d1365391 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -9,7 +9,7 @@ all: all-local all-recursive install: install-local install-recursive all-recursive install-recursive: - @target=$(shell echo $@ | sed s/-recursive//); \ + +@target=$(shell echo $@ | sed s/-recursive//); \ list='$(SUBDIRS)'; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ From 47d0f9dd70bf617f9cd18555a0f7a79be417d471 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 29 Nov 2008 20:01:24 +0000 Subject: [PATCH 084/487] debian/changelog: Update to 2.6.27-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12465 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 009483330..d3ce27242 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.27-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Sat, 29 Nov 2008 20:54:15 +0100 + linux-kbuild-2.6 (2.6.26-3) unstable; urgency=low * Fix recursive installation. (closes: #494435) From 21cc422bddac94b5cce677dad60c65e55c065061 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 22 Jan 2009 16:28:00 +0000 Subject: [PATCH 085/487] debian/changelog: Update to 2.6.28-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12595 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d3ce27242..13eb1aaa1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.27-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.28-1) UNRELEASED; urgency=low * New upstream version. From f2dfa8c99bd8856c5f53a059256bae3e031f3464 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 12:47:50 +0000 Subject: [PATCH 086/487] debian/changelog: Prepare to release (2.6.28-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=12901 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 13eb1aaa1..9aefcf900 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.28-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.28-1) unstable; urgency=low * New upstream version. - -- Bastian Blank Sat, 29 Nov 2008 20:54:15 +0100 + -- Bastian Blank Sun, 22 Feb 2009 13:45:39 +0100 linux-kbuild-2.6 (2.6.26-3) unstable; urgency=low From 8998c45183593003543068ff8dfdc77a2c725a81 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 13:08:50 +0000 Subject: [PATCH 087/487] debian/changelog: Set version to 2.6.29~rc5-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12902 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9aefcf900..6b23ea382 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.29~rc5-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Sun, 22 Feb 2009 14:04:24 +0100 + linux-kbuild-2.6 (2.6.28-1) unstable; urgency=low * New upstream version. From f7c907a89d01112b8dd68abb8f5ce451f5aedc6f Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 13:31:45 +0000 Subject: [PATCH 088/487] * debian/bin/genorig.py - Install upstream files in kbuild directory. - Add top-level Makefile and Kbuild. * debian/rules: Fix maintainerclean. * src/Makefile, src/basic/Makefile, src/genksyms/Makefile, src/kconfig/Makefile, src/mod/Makefile src/mod/Makefile.real: Fix paths. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12903 --- debian/bin/genorig.py | 7 ++++--- debian/rules | 2 +- src/Makefile | 2 +- src/basic/Makefile | 2 +- src/genksyms/Makefile | 4 ++-- src/kconfig/Makefile | 8 ++++---- src/mod/Makefile | 2 +- src/mod/Makefile.real | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 66b8f0add..e01ca97a0 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -71,11 +71,12 @@ class Main(object): def generate(self): self.log("Generate orig\n") - orig = os.path.join(self.dir, self.orig) + orig = os.path.join(self.dir, self.orig, 'kbuild') temp = os.path.join(self.dir, 'temp') os.makedirs(os.path.join(orig, 'include', 'linux')) - shutil.copyfile(os.path.join(temp, 'COPYING'), os.path.join(orig, 'COPYING')) - for i in ('input.h', 'license.h', 'mod_devicetable.h'): + for i in 'COPYING', 'Kbuild', 'Makefile': + shutil.copyfile(os.path.join(temp, i), os.path.join(orig, i)) + for i in 'input.h', 'license.h', 'mod_devicetable.h': shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) diff --git a/debian/rules b/debian/rules index 18ff8ef37..9596b7d05 100755 --- a/debian/rules +++ b/debian/rules @@ -36,7 +36,7 @@ endif maintainerclean: -rm debian/control debian/control.md5sum debian/rules.gen - -rm -rf COPYING include scripts + -rm -rf kbuild clean: debian/control dh_testdir diff --git a/src/Makefile b/src/Makefile index 3c5624854..209bbac53 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,6 +37,6 @@ SUBDIRS = \ kconfig \ mod -VPATH = $(top_srcdir)/scripts +VPATH = $(top_srcdir)/kbuild/scripts include Makefile.inc diff --git a/src/basic/Makefile b/src/basic/Makefile index 11454357d..db2d0bba8 100644 --- a/src/basic/Makefile +++ b/src/basic/Makefile @@ -3,6 +3,6 @@ PROGS = \ fixdep OUTDIR = basic -VPATH = $(top_srcdir)/scripts/basic +VPATH = $(top_srcdir)/kbuild/scripts/basic include ../Makefile.inc diff --git a/src/genksyms/Makefile b/src/genksyms/Makefile index 22a232876..7fe168167 100644 --- a/src/genksyms/Makefile +++ b/src/genksyms/Makefile @@ -1,9 +1,9 @@ PROGS = genksyms OUTDIR = genksyms -VPATH = $(top_srcdir)/scripts/genksyms +VPATH = $(top_srcdir)/kbuild/scripts/genksyms -CFLAGS += -I$(top_srcdir)/scripts/genksyms +CFLAGS += -I$(top_srcdir)/kbuild/scripts/genksyms genksyms: genksyms.o parse.o lex.o diff --git a/src/kconfig/Makefile b/src/kconfig/Makefile index c153f0705..4f00fe885 100644 --- a/src/kconfig/Makefile +++ b/src/kconfig/Makefile @@ -1,18 +1,18 @@ PROGS = conf OUTDIR = kconfig -VPATH = $(top_srcdir)/scripts/kconfig +VPATH = $(top_srcdir)/kbuild/scripts/kconfig -CFLAGS += -I$(top_srcdir)/scripts/kconfig +CFLAGS += -I$(top_srcdir)/kbuild/scripts/kconfig conf: conf.o zconf.tab.o zconf.tab.c: zconf.hash.c lex.zconf.c %.c: %.c_shipped - ln -s $< $@ + ln -sf $< $@ %.h: %.h_shipped - ln -s $< $@ + ln -sf $< $@ include ../Makefile.inc diff --git a/src/mod/Makefile b/src/mod/Makefile index e61086ffc..db60e754e 100644 --- a/src/mod/Makefile +++ b/src/mod/Makefile @@ -8,7 +8,7 @@ PROGS = \ OUTDIR = mod modpost.real-%: - $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod + $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/kbuild/scripts/mod %: %.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ diff --git a/src/mod/Makefile.real b/src/mod/Makefile.real index de9764cfd..ceb32b645 100644 --- a/src/mod/Makefile.real +++ b/src/mod/Makefile.real @@ -1,6 +1,6 @@ PROGS = modpost.real-$(TYPE) -CFLAGS += -I$(top_srcdir)/include +CFLAGS += -I$(top_srcdir)/kbuild/include include ../Makefile.inc From 67086e3fce2165b40f14e838461017804499ecae Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 13:57:37 +0000 Subject: [PATCH 089/487] * debian/rules.real: Update path. * scripts: Move from src. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12905 --- debian/rules.real | 2 +- {src => scripts}/Makefile | 0 {src => scripts}/Makefile.inc | 0 {src => scripts}/basic/Makefile | 0 {src => scripts}/genksyms/Makefile | 0 {src => scripts}/kconfig/Makefile | 0 {src => scripts}/mod/Makefile | 0 {src => scripts}/mod/Makefile.real | 0 {src => scripts}/mod/elfconfig.h | 0 {src => scripts}/mod/modpost.c | 0 {src => scripts}/mod/real-lsb-32/elfconfig.h | 0 {src => scripts}/mod/real-lsb-64/elfconfig.h | 0 {src => scripts}/mod/real-msb-32/elfconfig.h | 0 {src => scripts}/mod/real-msb-64/elfconfig.h | 0 14 files changed, 1 insertion(+), 1 deletion(-) rename {src => scripts}/Makefile (100%) rename {src => scripts}/Makefile.inc (100%) rename {src => scripts}/basic/Makefile (100%) rename {src => scripts}/genksyms/Makefile (100%) rename {src => scripts}/kconfig/Makefile (100%) rename {src => scripts}/mod/Makefile (100%) rename {src => scripts}/mod/Makefile.real (100%) rename {src => scripts}/mod/elfconfig.h (100%) rename {src => scripts}/mod/modpost.c (100%) rename {src => scripts}/mod/real-lsb-32/elfconfig.h (100%) rename {src => scripts}/mod/real-lsb-64/elfconfig.h (100%) rename {src => scripts}/mod/real-msb-32/elfconfig.h (100%) rename {src => scripts}/mod/real-msb-64/elfconfig.h (100%) diff --git a/debian/rules.real b/debian/rules.real index 8d2bea2ed..b2533165a 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -10,7 +10,7 @@ $(STAMPS_DIR)/build: DIR=$(BUILD_DIR)/build $(STAMPS_DIR)/build: rm -rf '$(DIR)' mkdir -p '$(DIR)' - cp -al src/* '$(DIR)' + cp -al scripts/* '$(DIR)' $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) touch '$@' diff --git a/src/Makefile b/scripts/Makefile similarity index 100% rename from src/Makefile rename to scripts/Makefile diff --git a/src/Makefile.inc b/scripts/Makefile.inc similarity index 100% rename from src/Makefile.inc rename to scripts/Makefile.inc diff --git a/src/basic/Makefile b/scripts/basic/Makefile similarity index 100% rename from src/basic/Makefile rename to scripts/basic/Makefile diff --git a/src/genksyms/Makefile b/scripts/genksyms/Makefile similarity index 100% rename from src/genksyms/Makefile rename to scripts/genksyms/Makefile diff --git a/src/kconfig/Makefile b/scripts/kconfig/Makefile similarity index 100% rename from src/kconfig/Makefile rename to scripts/kconfig/Makefile diff --git a/src/mod/Makefile b/scripts/mod/Makefile similarity index 100% rename from src/mod/Makefile rename to scripts/mod/Makefile diff --git a/src/mod/Makefile.real b/scripts/mod/Makefile.real similarity index 100% rename from src/mod/Makefile.real rename to scripts/mod/Makefile.real diff --git a/src/mod/elfconfig.h b/scripts/mod/elfconfig.h similarity index 100% rename from src/mod/elfconfig.h rename to scripts/mod/elfconfig.h diff --git a/src/mod/modpost.c b/scripts/mod/modpost.c similarity index 100% rename from src/mod/modpost.c rename to scripts/mod/modpost.c diff --git a/src/mod/real-lsb-32/elfconfig.h b/scripts/mod/real-lsb-32/elfconfig.h similarity index 100% rename from src/mod/real-lsb-32/elfconfig.h rename to scripts/mod/real-lsb-32/elfconfig.h diff --git a/src/mod/real-lsb-64/elfconfig.h b/scripts/mod/real-lsb-64/elfconfig.h similarity index 100% rename from src/mod/real-lsb-64/elfconfig.h rename to scripts/mod/real-lsb-64/elfconfig.h diff --git a/src/mod/real-msb-32/elfconfig.h b/scripts/mod/real-msb-32/elfconfig.h similarity index 100% rename from src/mod/real-msb-32/elfconfig.h rename to scripts/mod/real-msb-32/elfconfig.h diff --git a/src/mod/real-msb-64/elfconfig.h b/scripts/mod/real-msb-64/elfconfig.h similarity index 100% rename from src/mod/real-msb-64/elfconfig.h rename to scripts/mod/real-msb-64/elfconfig.h From 5eb9f553e7270c772615eb672c303c5426f6b580 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 14:05:13 +0000 Subject: [PATCH 090/487] * Makefile.inc - Move from scripts/Makefile.inc. - Install things into the root of the output. * scripts/Makefile, scripts/basic/Makefile, scripts/genksyms/Makefile, scripts/kconfig/Makefile, scripts/mod/Makefile, scripts/mod/Makefile.real - Fix output dirs. - Find included Makefile at the root of the source tree. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12906 --- scripts/Makefile.inc => Makefile.inc | 14 +++++++------- scripts/Makefile | 4 +++- scripts/basic/Makefile | 4 ++-- scripts/genksyms/Makefile | 4 ++-- scripts/kconfig/Makefile | 4 ++-- scripts/mod/Makefile | 4 ++-- scripts/mod/Makefile.real | 2 +- 7 files changed, 19 insertions(+), 17 deletions(-) rename scripts/Makefile.inc => Makefile.inc (63%) diff --git a/scripts/Makefile.inc b/Makefile.inc similarity index 63% rename from scripts/Makefile.inc rename to Makefile.inc index 8d1365391..1d5c2a97f 100644 --- a/scripts/Makefile.inc +++ b/Makefile.inc @@ -22,23 +22,23 @@ all-local: $(PROGS) install-local: install-local-dir install-local-progs install-local-scripts install-local-data install-local-dir: - install -d "$(prefix)/scripts/$(OUTDIR)" + install -d "$(prefix)/$(OUTDIR)" install-local-progs: $(PROGS) @for p in $^; do \ - echo " install -m755 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ - install -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ + echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ + install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ done install-local-scripts: $(SCRIPTS) @for p in $^; do \ - echo " install -m755 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ - install -m755 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ + echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ + install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ done install-local-data: $(DATA) @for p in $^; do \ - echo " install -m644 '$$p' '$(prefix)/scripts/$(OUTDIR)'"; \ - install -m644 "$$p" "$(prefix)/scripts/$(OUTDIR)"; \ + echo " install -m644 '$$p' '$(prefix)/$(OUTDIR)'"; \ + install -m644 "$$p" "$(prefix)/$(OUTDIR)"; \ done diff --git a/scripts/Makefile b/scripts/Makefile index 209bbac53..9341a25c1 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -37,6 +37,8 @@ SUBDIRS = \ kconfig \ mod +OUTDIR = scripts + VPATH = $(top_srcdir)/kbuild/scripts -include Makefile.inc +include $(top_srcdir)/Makefile.inc diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index db2d0bba8..7798dbb4c 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile @@ -2,7 +2,7 @@ PROGS = \ docproc \ fixdep -OUTDIR = basic +OUTDIR = scripts/basic VPATH = $(top_srcdir)/kbuild/scripts/basic -include ../Makefile.inc +include $(top_srcdir)/Makefile.inc diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index 7fe168167..d3bb9b186 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -1,6 +1,6 @@ PROGS = genksyms -OUTDIR = genksyms +OUTDIR = scripts/genksyms VPATH = $(top_srcdir)/kbuild/scripts/genksyms CFLAGS += -I$(top_srcdir)/kbuild/scripts/genksyms @@ -15,4 +15,4 @@ lex.o: keywords.c parse.h %.h: %.h_shipped ln -s $< $@ -include ../Makefile.inc +include $(top_srcdir)/Makefile.inc diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 4f00fe885..b1eb07379 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -1,6 +1,6 @@ PROGS = conf -OUTDIR = kconfig +OUTDIR = scripts/kconfig VPATH = $(top_srcdir)/kbuild/scripts/kconfig CFLAGS += -I$(top_srcdir)/kbuild/scripts/kconfig @@ -15,4 +15,4 @@ zconf.tab.c: zconf.hash.c lex.zconf.c %.h: %.h_shipped ln -sf $< $@ -include ../Makefile.inc +include $(top_srcdir)/Makefile.inc diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index db60e754e..4bd39195a 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -5,7 +5,7 @@ PROGS = \ modpost.real-msb-32 \ modpost.real-msb-64 -OUTDIR = mod +OUTDIR = scripts/mod modpost.real-%: $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/kbuild/scripts/mod @@ -13,7 +13,7 @@ modpost.real-%: %: %.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -include ../Makefile.inc +include $(top_srcdir)/Makefile.inc clean: rm $(PROGS) *.o diff --git a/scripts/mod/Makefile.real b/scripts/mod/Makefile.real index ceb32b645..a70944921 100644 --- a/scripts/mod/Makefile.real +++ b/scripts/mod/Makefile.real @@ -2,7 +2,7 @@ PROGS = modpost.real-$(TYPE) CFLAGS += -I$(top_srcdir)/kbuild/include -include ../Makefile.inc +include $(top_srcdir)/Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ From a6a9b576cb32287c3e8e2fca8986f73de34271e8 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 14:15:43 +0000 Subject: [PATCH 091/487] Makefile.inc: Explicitely reference files from the kbuild directory. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12907 --- Makefile.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 1d5c2a97f..2158f5640 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -30,13 +30,17 @@ install-local-progs: $(PROGS) install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ done -install-local-scripts: $(SCRIPTS) +SCRIPTS_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(SCRIPTS)) + +install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ done -install-local-data: $(DATA) +DATA_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(DATA)) + +install-local-data: $(DATA_REAL) @for p in $^; do \ echo " install -m644 '$$p' '$(prefix)/$(OUTDIR)'"; \ install -m644 "$$p" "$(prefix)/$(OUTDIR)"; \ From 25478a0cd9735e7bf29161516b7f54173838d079 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 22 Feb 2009 23:45:36 +0000 Subject: [PATCH 092/487] debian/copyright: Update. svn path=/dists/trunk/linux-kbuild-2.6/; revision=12942 --- debian/copyright | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/debian/copyright b/debian/copyright index 7cba3d457..fc6c0070c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,36 +1,21 @@ -This package was downloaded from http://kernel.org/pub/linux/kernel. +This is the Debian GNU/Linux prepackaged version of the Linux kernel. -Linux was written by Linus Torvalds -and others. +It was downloaded from http://ftp.kernel.org/pub/linux/kernel/. Copyright: -1995-1997 H. Peter Anvin -1996,1997 Linux International -1997,1998 Andrew Tridgell -1998 Michael Zucchi -1999,2004 Matt Mackall -2000 MontaVista Software, Inc. -2000,2001 Tim Waugh -2001 Simon Huggins -2001-2003 Geert Uytterhoeven -2002 David S. Miller -2002 James Morris -2002,2003 Randy Dunlap -2002,2003 Kai Germaschewski -2002-2003 Romain Lievin -2002-2003 Rusty Russel -2002-2005 Roman Zippel -2002-2005 Sam Ravnborg -2005 Arnaldo Carvalho de Melo -2005,2006 Bastian Blank -2006 Sam Ravnborg + + Copyright (C) 1996, 1997 Linux International + 2000, 2006 IBM Corporation + 2002, 2003 Kai Germaschewski + 2002-2004 Rusty Russell + 2002-2005 Roman Zippel + and others License: This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -41,5 +26,7 @@ License: along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +On Debian systems, the complete text of the GNU General Public License version +2 can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is licensed under the GPL v2, see above. From ce6da10d9fe930d0136e9f0fe2877d2eebaa158b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:30:11 +0000 Subject: [PATCH 093/487] debian/rules.real: Copy all files. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13227 --- debian/rules.real | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules.real b/debian/rules.real index b2533165a..70c991daa 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -6,11 +6,12 @@ binary-arch: install-kbuild build: $(STAMPS_DIR)/build +$(STAMPS_DIR)/build: SOURCE_FILES = $(filter-out debian, $(wildcard * .[^.]*)) $(STAMPS_DIR)/build: DIR=$(BUILD_DIR)/build $(STAMPS_DIR)/build: rm -rf '$(DIR)' mkdir -p '$(DIR)' - cp -al scripts/* '$(DIR)' + cp -al $(SOURCE_FILES) '$(DIR)' $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) touch '$@' From baa461468533fa00024f1d206eb9a4f0d550fd5a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:30:51 +0000 Subject: [PATCH 094/487] Makefile: Add. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13228 --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..e188cb5bc --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +DATA = \ + Kbuild \ + Makefile \ + +SUBDIRS = \ + scripts + +OUTDIR = . + +include $(top_srcdir)/Makefile.inc From f16138ec4b14987da45511bb10a25f2fa888d49b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:40:20 +0000 Subject: [PATCH 095/487] debian/rules: Only copy part of the orig. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13229 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 9596b7d05..25d147c7d 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,7 @@ TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) - rsync --delete --exclude debian --exclude src --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . + rsync --delete --link-dest=$(CURDIR)/$(DIR_ORIG)/kbuild/ -a $(DIR_ORIG)/kbuild/ kbuild $(DIR_ORIG): ifeq ($(TAR_ORIG),) From 5de72433ec34350d79423651d85c025cb131b0b8 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:52:34 +0000 Subject: [PATCH 096/487] Makefile.inc: Create directories via the normal install calls. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13230 --- Makefile.inc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 2158f5640..08cf27446 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -19,15 +19,12 @@ all-recursive install-recursive: all-local: $(PROGS) -install-local: install-local-dir install-local-progs install-local-scripts install-local-data - -install-local-dir: - install -d "$(prefix)/$(OUTDIR)" +install-local: install-local-progs install-local-scripts install-local-data install-local-progs: $(PROGS) @for p in $^; do \ echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ + install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done SCRIPTS_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(SCRIPTS)) @@ -35,7 +32,7 @@ SCRIPTS_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(SCRIPTS)) install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -m755 "$$p" "$(prefix)/$(OUTDIR)"; \ + install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done DATA_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(DATA)) @@ -43,6 +40,6 @@ DATA_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(DATA)) install-local-data: $(DATA_REAL) @for p in $^; do \ echo " install -m644 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -m644 "$$p" "$(prefix)/$(OUTDIR)"; \ + install -D -m644 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done From d120b0120c8cc3d34d580f725891a34720353ba5 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:53:02 +0000 Subject: [PATCH 097/487] debian/rules.real: Fix make invocation. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13231 --- debian/rules.real | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.real b/debian/rules.real index 70c991daa..9fdcc23b2 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -24,7 +24,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - make -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) dh_installchangelogs dh_installdocs dh_strip From c98ca5f48a6936ed04ead6654db7bd3179d8fd77 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 07:53:22 +0000 Subject: [PATCH 098/487] debian/changelog: Update version to 2.6.29-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13232 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6b23ea382..6dd635fce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.29~rc5-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.29-1) UNRELEASED; urgency=low * New upstream version. From ecfc8283afad3141ba8aea8ae3cd4f9df019bcc1 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 09:23:30 +0000 Subject: [PATCH 099/487] * scripts/mod/Makefile: Generate modpost.h. * scripts/mod/gendef.py: Extract getopt definitions from upstream tool. * scripts/mod/modpost.c: Use extracted getopt definitions. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13233 --- scripts/mod/Makefile | 11 +++++++++-- scripts/mod/gendef.py | 20 ++++++++++++++++++++ scripts/mod/modpost.c | 17 ++++------------- 3 files changed, 33 insertions(+), 15 deletions(-) create mode 100755 scripts/mod/gendef.py diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 4bd39195a..406b36646 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -7,14 +7,21 @@ PROGS = \ OUTDIR = scripts/mod +top_srcdir = ../.. + +include $(top_srcdir)/Makefile.inc + modpost.real-%: $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/kbuild/scripts/mod %: %.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -include $(top_srcdir)/Makefile.inc +modpost.h: $(top_srcdir)/kbuild/scripts/mod/modpost.c + ./gendef.py $< > $@ + +modpost.o: modpost.c modpost.h clean: - rm $(PROGS) *.o + rm $(PROGS) modpost.h *.o diff --git a/scripts/mod/gendef.py b/scripts/mod/gendef.py new file mode 100755 index 000000000..22dbd7d03 --- /dev/null +++ b/scripts/mod/gendef.py @@ -0,0 +1,20 @@ +#!/usr/bin/python +import re +import sys + +for line in open(sys.argv[1]): + match = re.search('getopt\(argc, argv, "([\w:]*?)"\)', line) + if match: + options = match.group(1) + break +else: + raise RuntimeError + +print '#define GETOPT_OPTIONS "%s"' % options + +print '#define GETOPT_CASE', +for c in options: + if c == ':': + continue + print "case '%c':" % c, +print diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 57590ab96..cd94433b8 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -5,6 +5,8 @@ #include #include +#include "modpost.h" + int main (int argc, char *argv[]) { char const *data, *class; @@ -13,22 +15,11 @@ int main (int argc, char *argv[]) int opt; FILE *file; - while ((opt = getopt (argc, argv, "acei:I:K:mM:o:sSw")) != -1) + while ((opt = getopt (argc, argv, GETOPT_OPTIONS)) != -1) { switch(opt) { - case 'a': - case 'e': - case 'i': - case 'c': - case 'I': - case 'K': - case 'm': - case 'M': - case 'o': - case 's': - case 'S': - case 'w': + GETOPT_CASE break; default: return EXIT_FAILURE; From 030e970a25b4617008ed39f654c034773f3ce1cd Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 09:28:26 +0000 Subject: [PATCH 100/487] Makefile, scripts/Makefile, scripts/basic/Makefile, scripts/genksyms/Makefile, scripts/kconfig/Makefile, scripts/mod/Makefile.real: Properly specify top_srcdir. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13234 --- Makefile | 2 ++ scripts/Makefile | 2 ++ scripts/basic/Makefile | 5 ++++- scripts/genksyms/Makefile | 11 +++++++---- scripts/kconfig/Makefile | 11 +++++++---- scripts/mod/Makefile.real | 2 ++ 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e188cb5bc..1ca911f3a 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,6 @@ SUBDIRS = \ OUTDIR = . +top_srcdir = . + include $(top_srcdir)/Makefile.inc diff --git a/scripts/Makefile b/scripts/Makefile index 9341a25c1..7359e5e4f 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -39,6 +39,8 @@ SUBDIRS = \ OUTDIR = scripts +top_srcdir = .. + VPATH = $(top_srcdir)/kbuild/scripts include $(top_srcdir)/Makefile.inc diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index 7798dbb4c..a65431465 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile @@ -3,6 +3,9 @@ PROGS = \ fixdep OUTDIR = scripts/basic -VPATH = $(top_srcdir)/kbuild/scripts/basic + +top_srcdir = ../.. + +VPATH = $(top_srcdir)/kbuild/$(OUTDIR) include $(top_srcdir)/Makefile.inc diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index d3bb9b186..7a9a5cf60 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -1,9 +1,14 @@ PROGS = genksyms OUTDIR = scripts/genksyms -VPATH = $(top_srcdir)/kbuild/scripts/genksyms -CFLAGS += -I$(top_srcdir)/kbuild/scripts/genksyms +top_srcdir = ../.. + +VPATH = $(top_srcdir)/kbuild/$(OUTDIR) + +include $(top_srcdir)/Makefile.inc + +CFLAGS += -I$(VPATH) genksyms: genksyms.o parse.o lex.o @@ -14,5 +19,3 @@ lex.o: keywords.c parse.h %.h: %.h_shipped ln -s $< $@ - -include $(top_srcdir)/Makefile.inc diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index b1eb07379..b3f9cb1e1 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -1,9 +1,14 @@ PROGS = conf OUTDIR = scripts/kconfig -VPATH = $(top_srcdir)/kbuild/scripts/kconfig -CFLAGS += -I$(top_srcdir)/kbuild/scripts/kconfig +top_srcdir = ../.. + +VPATH = $(top_srcdir)/kbuild/$(OUTDIR) + +include $(top_srcdir)/Makefile.inc + +CFLAGS += -I$(VPATH) conf: conf.o zconf.tab.o @@ -14,5 +19,3 @@ zconf.tab.c: zconf.hash.c lex.zconf.c %.h: %.h_shipped ln -sf $< $@ - -include $(top_srcdir)/Makefile.inc diff --git a/scripts/mod/Makefile.real b/scripts/mod/Makefile.real index a70944921..be0d63c20 100644 --- a/scripts/mod/Makefile.real +++ b/scripts/mod/Makefile.real @@ -1,5 +1,7 @@ PROGS = modpost.real-$(TYPE) +top_srcdir = ../.. + CFLAGS += -I$(top_srcdir)/kbuild/include include $(top_srcdir)/Makefile.inc From 96625f03bb4e7cf1500eaa5aa4ba9a50eb5c3e12 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 09:32:39 +0000 Subject: [PATCH 101/487] * Makefile.inc: Add clean rule. * scripts/mod/Makefile: Fix clean rule. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13235 --- Makefile.inc | 13 ++++++++----- scripts/mod/Makefile | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 08cf27446..2661adea8 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -6,19 +6,22 @@ CFLAGS += -Wall -O2 CXXFLAGS = $(CFLAGS) all: all-local all-recursive +clean: clean-local clean-recursive install: install-local install-recursive -all-recursive install-recursive: - +@target=$(shell echo $@ | sed s/-recursive//); \ - list='$(SUBDIRS)'; \ +%-recursive: + +@list='$(SUBDIRS)'; \ for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - $(MAKE) -C $$subdir $$target \ + echo "Making $* in $$subdir"; \ + $(MAKE) -C $$subdir $* \ || exit 1; \ done all-local: $(PROGS) +clean-local:: + rm -f $(PROGS) *.o + install-local: install-local-progs install-local-scripts install-local-data install-local-progs: $(PROGS) diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 406b36646..ed3d15599 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -23,5 +23,4 @@ modpost.h: $(top_srcdir)/kbuild/scripts/mod/modpost.c modpost.o: modpost.c modpost.h clean: - rm $(PROGS) modpost.h *.o - + rm -f modpost.h From 2c660e7e88500eb71f4c9c024a684b841806ce17 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 09:34:28 +0000 Subject: [PATCH 102/487] scripts/genksyms/Makefile, scripts/kconfig/Makefile: Add clean target. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13236 --- scripts/genksyms/Makefile | 3 +++ scripts/kconfig/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index 7a9a5cf60..b6af7f286 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -19,3 +19,6 @@ lex.o: keywords.c parse.h %.h: %.h_shipped ln -s $< $@ + +clean: + rm -f keywords.c parse.h diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index b3f9cb1e1..9100f3ecc 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -19,3 +19,6 @@ zconf.tab.c: zconf.hash.c lex.zconf.c %.h: %.h_shipped ln -sf $< $@ + +clean: + rm -f zconf.tab.c zconf.hash.c lex.zconf.c From 8cf20053e66b632bcef9dd68427719d9a3fdcc20 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 10:49:24 +0000 Subject: [PATCH 103/487] scripts/mod/Makefile: Don't expect script to be executable. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13241 --- scripts/mod/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index ed3d15599..0e01d9fea 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -18,7 +18,7 @@ modpost.real-%: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ modpost.h: $(top_srcdir)/kbuild/scripts/mod/modpost.c - ./gendef.py $< > $@ + python ./gendef.py $< > $@ modpost.o: modpost.c modpost.h From a4399c9dcf45658bce35e7957effed9093fb455c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 13:23:47 +0000 Subject: [PATCH 104/487] * debian/changelog: Update. * debian/templates/control.source.in: Add python to build-depends. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13243 --- debian/changelog | 2 ++ debian/templates/control.source.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6dd635fce..ea14ca518 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ linux-kbuild-2.6 (2.6.29-1) UNRELEASED; urgency=low * New upstream version. + * Autogenerate list of supported options in modpost. (closes: #518961) + - Build-depend against python. -- Bastian Blank Sun, 22 Feb 2009 14:04:24 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 419755c97..d6035c430 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -4,4 +4,4 @@ Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank Standards-Version: 3.7.3 -Build-Depends: debhelper (>= 4.1.0) +Build-Depends: debhelper (>= 4.1.0), python From 801a54a7094e49a4c85da7e070f1b34ff6cef5a4 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 13:25:43 +0000 Subject: [PATCH 105/487] * debian/changelog: Update. * debian/compat: Set to 7. * debian/templates/control.source.in: Update debhelper build-dep. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13244 --- debian/changelog | 1 + debian/compat | 2 +- debian/templates/control.source.in | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ea14ca518..f28067533 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-kbuild-2.6 (2.6.29-1) UNRELEASED; urgency=low * New upstream version. * Autogenerate list of supported options in modpost. (closes: #518961) - Build-depend against python. + * Use debhelper compat level 7. -- Bastian Blank Sun, 22 Feb 2009 14:04:24 +0100 diff --git a/debian/compat b/debian/compat index b8626c4cf..7f8f011eb 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +7 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index d6035c430..b6b63c68b 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -4,4 +4,4 @@ Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank Standards-Version: 3.7.3 -Build-Depends: debhelper (>= 4.1.0), python +Build-Depends: debhelper (>> 7), python From 5be08991d40cd429b4f2c99b616f5c4f1e7f42d7 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 24 Mar 2009 13:28:27 +0000 Subject: [PATCH 106/487] Makefile.inc: Don't override previsous definitions. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13245 --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index 2661adea8..c3e557703 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -2,7 +2,7 @@ SHELL = /bin/sh -e CC = gcc CXX = g++ -CFLAGS += -Wall -O2 +CFLAGS ?= -O2 -Wall CXXFLAGS = $(CFLAGS) all: all-local all-recursive From 8fc4dac8fe7589b887f660817f6b782049584666 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 26 Mar 2009 11:59:07 +0000 Subject: [PATCH 107/487] debian/changelog: Prepare to release (2.6.29-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=13259 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f28067533..7c5b48b58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -linux-kbuild-2.6 (2.6.29-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.29-1) unstable; urgency=low * New upstream version. * Autogenerate list of supported options in modpost. (closes: #518961) - Build-depend against python. * Use debhelper compat level 7. - -- Bastian Blank Sun, 22 Feb 2009 14:04:24 +0100 + -- Bastian Blank Thu, 26 Mar 2009 12:54:47 +0100 linux-kbuild-2.6 (2.6.28-1) unstable; urgency=low From 3ad823725cc33575e7ee4c5caaff026f5233220b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 6 May 2009 07:49:11 +0000 Subject: [PATCH 108/487] debian/changelog: Update version to 2.6.30~rc4-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13576 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7c5b48b58..a17ef21ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.30~rc4-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Tue, 05 May 2009 12:34:41 +0200 + linux-kbuild-2.6 (2.6.29-1) unstable; urgency=low * New upstream version. From 858527b2521c5d821bf3c59c978abb166e956dce Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 17 Jun 2009 14:09:42 +0000 Subject: [PATCH 109/487] debian/changelog: Set version to 2.6.30-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=13834 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a17ef21ac..8e9dabe97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.30~rc4-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.30-1) UNRELEASED; urgency=low * New upstream version. From 707c314bdd1852d9c4e954787baad5328c628e1c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 17 Jun 2009 14:50:21 +0000 Subject: [PATCH 110/487] debian/changelog: Prepare to release (2.6.30-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=13835 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8e9dabe97..1264969e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.30-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.30-1) unstable; urgency=low * New upstream version. - -- Bastian Blank Tue, 05 May 2009 12:34:41 +0200 + -- Bastian Blank Wed, 17 Jun 2009 16:49:57 +0200 linux-kbuild-2.6 (2.6.29-1) unstable; urgency=low From 5ed4d098855dc438fbc3e02a7bf381dc488f8c62 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 29 Jul 2009 17:41:04 +0000 Subject: [PATCH 111/487] debian/changelog: Update version to 2.6.31~rc4-1. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14042 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1264969e0..e45da4d1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.31~rc4-1) UNRELEASED; urgency=low + + * New upstream version. + + -- Bastian Blank Sat, 25 Jul 2009 11:46:23 +0200 + linux-kbuild-2.6 (2.6.30-1) unstable; urgency=low * New upstream version. From d9aa8c6ca04fa4905573fe944340f775652f01d2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 16:33:56 +0000 Subject: [PATCH 112/487] Use default version of python svn path=/dists/trunk/linux-kbuild-2.6/; revision=14399 --- debian/bin/gencontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 2fdcdfd93..c1a8a608b 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") From 5501d32310de5c565a03be253a5d39f70d10e240 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 16:34:36 +0000 Subject: [PATCH 113/487] Update upstream version to 2.6.31 svn path=/dists/trunk/linux-kbuild-2.6/; revision=14400 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e45da4d1d..fae832077 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.31~rc4-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.31-1~experimental.1) UNRELEASED; urgency=low * New upstream version. From 9001658b18d6de89cdd7683805b769307f5398b9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 21:13:41 +0000 Subject: [PATCH 114/487] Include new script gcc-x86_32-has-stack-protector.sh svn path=/dists/trunk/linux-kbuild-2.6/; revision=14401 --- debian/changelog | 4 ++++ scripts/Makefile | 1 + 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index fae832077..f4bd22fbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,11 @@ linux-kbuild-2.6 (2.6.31-1~experimental.1) UNRELEASED; urgency=low + [ Bastian Blank ] * New upstream version. + [ Ben Hutchings ] + * Include new script gcc-x86_32-has-stack-protector.sh. + -- Bastian Blank Sat, 25 Jul 2009 11:46:23 +0200 linux-kbuild-2.6 (2.6.30-1) unstable; urgency=low diff --git a/scripts/Makefile b/scripts/Makefile index 7359e5e4f..5479aa4bb 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -19,6 +19,7 @@ SCRIPTS = \ 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 \ From 3b94fd15ff1557d2a2f98199a23945ed7346a734 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 21:37:34 +0000 Subject: [PATCH 115/487] Add myself to Uploaders. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14402 --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f4bd22fbd..a381d3488 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-kbuild-2.6 (2.6.31-1~experimental.1) UNRELEASED; urgency=low [ Ben Hutchings ] * Include new script gcc-x86_32-has-stack-protector.sh. + * Add myself to Uploaders. -- Bastian Blank Sat, 25 Jul 2009 11:46:23 +0200 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index b6b63c68b..065676fc6 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -2,6 +2,6 @@ Source: linux-kbuild-@major@ Section: devel Priority: optional Maintainer: Debian Kernel Team -Uploaders: Bastian Blank +Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.7.3 Build-Depends: debhelper (>> 7), python From de8c500276667bb2e9ee17c5070ca1952a6d4c89 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 22:05:12 +0000 Subject: [PATCH 116/487] New upstream version (2.6.31.2). There were some fixes to kbuild in 2.6.31.2. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14403 --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a381d3488..b49816852 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.31-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.31.2-1~experimental.1) UNRELEASED; urgency=low [ Bastian Blank ] * New upstream version. @@ -6,6 +6,7 @@ linux-kbuild-2.6 (2.6.31-1~experimental.1) UNRELEASED; urgency=low [ Ben Hutchings ] * Include new script gcc-x86_32-has-stack-protector.sh. * Add myself to Uploaders. + * New upstream version (2.6.31.2). -- Bastian Blank Sat, 25 Jul 2009 11:46:23 +0200 From 64e7de3e651226748c87bd1062a4bddd4e9b72b4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 17 Oct 2009 22:11:34 +0000 Subject: [PATCH 117/487] Prepare to release 2.6.31.2-1~experimental.1 svn path=/dists/trunk/linux-kbuild-2.6/; revision=14404 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b49816852..24ffeaa08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.31.2-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.31.2-1~experimental.1) experimental; urgency=low [ Bastian Blank ] * New upstream version. @@ -8,7 +8,7 @@ linux-kbuild-2.6 (2.6.31.2-1~experimental.1) UNRELEASED; urgency=low * Add myself to Uploaders. * New upstream version (2.6.31.2). - -- Bastian Blank Sat, 25 Jul 2009 11:46:23 +0200 + -- Ben Hutchings Sat, 17 Oct 2009 23:05:27 +0100 linux-kbuild-2.6 (2.6.30-1) unstable; urgency=low From f9a0b6c6f4153897a1bca1ec461a866e97e9ebc3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 25 Oct 2009 18:44:18 +0000 Subject: [PATCH 118/487] Prepare to upload to unstable (2.6.31.2-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=14451 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 24ffeaa08..0de2ad33e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.31.2-1) unstable; urgency=low + + * Upload to unstable. + + -- Ben Hutchings Sun, 25 Oct 2009 18:38:44 +0000 + linux-kbuild-2.6 (2.6.31.2-1~experimental.1) experimental; urgency=low [ Bastian Blank ] From 000d2ab970c771d8cae0f9403c83699582c16e26 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 22 Nov 2009 18:23:41 +0000 Subject: [PATCH 119/487] Apply changes from linux-2.6/bin/genorig.py r14631 | benh | 2009-11-15 16:07:04 +0000 (Sun, 15 Nov 2009) | 1 line Add support for git repo as upstream source r13846 | waldi | 2009-06-28 10:49:43 +0100 (Sun, 28 Jun 2009) | 2 lines debian/bin/genorig.py: Remove slipped-in debugging code. r13750 | waldi | 2009-06-10 11:20:13 +0100 (Wed, 10 Jun 2009) | 2 lines debian/bin/genorig.py: Use subprocess. r13749 | waldi | 2009-06-10 09:42:47 +0100 (Wed, 10 Jun 2009) | 2 lines debian/bin/genorig.py: Cleanup. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14663 --- debian/bin/genorig.py | 67 +++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index e01ca97a0..8c836bf0a 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'(^|.*/)(?Plinux-[\d.]+(-\S+)?)\.tar(\.(?P(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'(^|.*/)(?Plinux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P(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(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(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)() From 9d0dd97603d9c70d2a717332b5e96d5484ab76c7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 2 Dec 2009 21:41:13 +0000 Subject: [PATCH 120/487] Add entry for upstream version 2.6.32-rc8 svn path=/dists/trunk/linux-kbuild-2.6/; revision=14712 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0de2ad33e..ece7a447b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.32~rc8-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release candidate. + + -- Ben Hutchings Wed, 02 Dec 2009 21:40:48 +0000 + linux-kbuild-2.6 (2.6.31.2-1) unstable; urgency=low * Upload to unstable. From e7dfd8e309b6d62ec48035eea577ab3f894cfc79 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 2 Dec 2009 21:41:43 +0000 Subject: [PATCH 121/487] Include new script module-common.lds, thanks to Zoran Dzelajlija. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14713 --- debian/changelog | 1 + scripts/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index ece7a447b..d8d04bfc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-kbuild-2.6 (2.6.32~rc8-1~experimental.1) UNRELEASED; urgency=low * New upstream release candidate. + * Include new script module-common.lds, thanks to Zoran Dzelajlija. -- Ben Hutchings Wed, 02 Dec 2009 21:40:48 +0000 diff --git a/scripts/Makefile b/scripts/Makefile index 5479aa4bb..6cfcd4019 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -27,6 +27,7 @@ SCRIPTS = \ makelst \ mksysmap \ mkuboot.sh \ + module-common.lds \ namespace.pl \ patch-kernel \ setlocalversion \ From 56ee2c379e87892bfd342947b5dd6abae29f70d3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 9 Dec 2009 01:49:05 +0000 Subject: [PATCH 122/487] Update to 2.6.32 svn path=/dists/trunk/linux-kbuild-2.6/; revision=14761 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d8d04bfc5..e51340c43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -linux-kbuild-2.6 (2.6.32~rc8-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.32-1) UNRELEASED; urgency=low - * New upstream release candidate. + * New upstream version. (closes: #560090) * Include new script module-common.lds, thanks to Zoran Dzelajlija. -- Ben Hutchings Wed, 02 Dec 2009 21:40:48 +0000 From 2577008fa1adc0a95a157e0db989f655052f6554 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 9 Dec 2009 12:02:25 +0000 Subject: [PATCH 123/487] * debian/changelog: Update. * debian/rules.real: Move contents of linux-kbuild package to /usr/lib. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14765 --- debian/changelog | 4 ++++ debian/rules.real | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e51340c43..1a6817c7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ linux-kbuild-2.6 (2.6.32-1) UNRELEASED; 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. + -- Ben Hutchings Wed, 02 Dec 2009 21:40:48 +0000 linux-kbuild-2.6 (2.6.31.2-1) unstable; urgency=low diff --git a/debian/rules.real b/debian/rules.real index 9fdcc23b2..053ac80dd 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 From 8886a0b074f3a03d5873ab405531f8bb7f1d0327 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 9 Dec 2009 12:06:32 +0000 Subject: [PATCH 124/487] scripts/Makefile: Install new file correctly as data. svn path=/dists/trunk/linux-kbuild-2.6/; revision=14766 --- scripts/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile b/scripts/Makefile index 6cfcd4019..e6d0ec569 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -12,7 +12,8 @@ DATA = \ Makefile.lib \ Makefile.modinst \ Makefile.modpost \ - mkversion + mkversion \ + module-common.lds SCRIPTS = \ checkincludes.pl \ @@ -27,7 +28,6 @@ SCRIPTS = \ makelst \ mksysmap \ mkuboot.sh \ - module-common.lds \ namespace.pl \ patch-kernel \ setlocalversion \ From 25f11f533a82cdf9df15eee67bb1dfdf1fbb86ff Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 11 Dec 2009 15:16:51 +0000 Subject: [PATCH 125/487] debian/changelog: Prepare to release (2.6.32-1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=14772 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1a6817c7b..423296f86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.32-1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] * New upstream version. (closes: #560090) @@ -7,7 +7,7 @@ linux-kbuild-2.6 (2.6.32-1) UNRELEASED; urgency=low [ Bastian Blank ] * Move contents of linux-kbuild package to /usr/lib. - -- Ben Hutchings Wed, 02 Dec 2009 21:40:48 +0000 + -- Bastian Blank Fri, 11 Dec 2009 16:16:12 +0100 linux-kbuild-2.6 (2.6.31.2-1) unstable; urgency=low From bc3119c442ef009c01694ed0a160d0c662807bea Mon Sep 17 00:00:00 2001 From: dann frazier Date: Mon, 1 Feb 2010 22:08:30 +0000 Subject: [PATCH 126/487] Include recordmcount.pl svn path=/dists/trunk/linux-kbuild-2.6/; revision=15092 --- debian/changelog | 6 ++++++ scripts/Makefile | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 423296f86..f59196d49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.32-2) UNRELEASED; urgency=low + + * Include recordmcount.pl + + -- dann frazier Mon, 01 Feb 2010 14:51:25 -0700 + linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] diff --git a/scripts/Makefile b/scripts/Makefile index e6d0ec569..743915432 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -30,6 +30,7 @@ SCRIPTS = \ mkuboot.sh \ namespace.pl \ patch-kernel \ + recordmcount.pl \ setlocalversion \ ver_linux From 65fcc72ccbcf4b5b88017e808c179d39afdab188 Mon Sep 17 00:00:00 2001 From: dann frazier Date: Tue, 2 Feb 2010 21:18:51 +0000 Subject: [PATCH 127/487] add bug closure svn path=/dists/trunk/linux-kbuild-2.6/; revision=15098 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f59196d49..30736cc12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ linux-kbuild-2.6 (2.6.32-2) UNRELEASED; urgency=low - * Include recordmcount.pl + * Include recordmcount.pl. (Closes: #568165) -- dann frazier Mon, 01 Feb 2010 14:51:25 -0700 From 109ea1ab02d0242431768e5df7b9f97448c5f9a2 Mon Sep 17 00:00:00 2001 From: dann frazier Date: Tue, 2 Feb 2010 22:54:43 +0000 Subject: [PATCH 128/487] drop recordmcount.pl - will no longer be necessary in linux-2.6_2.6.32-7 svn path=/dists/trunk/linux-kbuild-2.6/; revision=15101 --- debian/changelog | 6 ------ scripts/Makefile | 1 - 2 files changed, 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 30736cc12..423296f86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -linux-kbuild-2.6 (2.6.32-2) UNRELEASED; urgency=low - - * Include recordmcount.pl. (Closes: #568165) - - -- dann frazier Mon, 01 Feb 2010 14:51:25 -0700 - linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] diff --git a/scripts/Makefile b/scripts/Makefile index 743915432..e6d0ec569 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -30,7 +30,6 @@ SCRIPTS = \ mkuboot.sh \ namespace.pl \ patch-kernel \ - recordmcount.pl \ setlocalversion \ ver_linux From b3d02688267a78b0cd759aed27a7277034ad44c1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 20 Feb 2010 04:31:28 +0000 Subject: [PATCH 129/487] Include arch scripts in orig tarball svn path=/dists/trunk/linux-kbuild-2.6/; revision=15236 --- debian/bin/genorig.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 8c836bf0a..3eaf5b8fc 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -102,6 +102,11 @@ class Main(object): for i in 'input.h', 'license.h', 'mod_devicetable.h': shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) + for arch in os.listdir(os.path.join(temp, 'arch')): + if os.path.exists(os.path.join(temp, 'arch', arch, 'scripts')): + os.makedirs(os.path.join(orig, 'arch', arch)) + shutil.copytree(os.path.join(temp, 'arch', arch, 'scripts'), + os.path.join(orig, 'arch', arch, 'scripts')) def tar(self): out = os.path.join("../orig", self.orig_tar) From bb601e3c9a5c360dd193beea4949d28efe6b0c9c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 20 Feb 2010 05:01:37 +0000 Subject: [PATCH 130/487] Allow for inclusion of arch scripts svn path=/dists/trunk/linux-kbuild-2.6/; revision=15237 --- debian/rules.real | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 053ac80dd..f55c36f03 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -1,5 +1,20 @@ export DH_OPTIONS +DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +KERNEL_ARCH := $(DEB_BUILD_ARCH) +ifneq ($(filter amd64 i386,$(DEB_BUILD_ARCH)),) + KERNEL_ARCH := x86 +endif +ifneq ($(filter armeb armel,$(DEB_BUILD_ARCH)),) + KERNEL_ARCH := arm +endif +ifeq (hppa,$(DEB_BUILD_ARCH)) + KERNEL_ARCH := parisc +endif +ifeq (mipsel,$(DEB_BUILD_ARCH)) + KERNEL_ARCH := mips +endif + include debian/rules.defs binary-arch: install-kbuild @@ -12,7 +27,7 @@ $(STAMPS_DIR)/build: rm -rf '$(DIR)' mkdir -p '$(DIR)' cp -al $(SOURCE_FILES) '$(DIR)' - $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH) touch '$@' install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) @@ -24,7 +39,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs From b7fdcc7c6e2d635d92984e9e6401ad71a41b3082 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 20 Feb 2010 05:02:06 +0000 Subject: [PATCH 131/487] Allow for inclusion of arch scripts svn path=/dists/trunk/linux-kbuild-2.6/; revision=15238 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1ca911f3a..02e980c48 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ DATA = \ Makefile \ SUBDIRS = \ - scripts + scripts \ + $(wildcard arch/$(SRCARCH)/scripts) OUTDIR = . From b26042becba85f1bbfb63db06c42c66ca2f5f3d7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 20 Feb 2010 05:04:10 +0000 Subject: [PATCH 132/487] Open changelog entry for 2.6.33-rc8 svn path=/dists/trunk/linux-kbuild-2.6/; revision=15239 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 423296f86..99409503a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-kbuild-2.6 (2.6.33~rc8-1) UNRELEASED; urgency=low + + [ Ben Hutchings ] + * New upstream release candidate + + -- Ben Hutchings Sat, 20 Feb 2010 04:19:45 +0000 + linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] From 3ee66006236c5d5e284ef831a4ef1692db6f3d87 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 20 Feb 2010 05:07:11 +0000 Subject: [PATCH 133/487] Include ia64-specific scripts (Closes: #392592) svn path=/dists/trunk/linux-kbuild-2.6/; revision=15240 --- arch/ia64/scripts/Makefile | 21 +++++++++++++++++++++ debian/changelog | 1 + 2 files changed, 22 insertions(+) create mode 100644 arch/ia64/scripts/Makefile diff --git a/arch/ia64/scripts/Makefile b/arch/ia64/scripts/Makefile new file mode 100644 index 000000000..772d5ed3b --- /dev/null +++ b/arch/ia64/scripts/Makefile @@ -0,0 +1,21 @@ +SCRIPTS = \ + check-gas \ + pvcheck.sed \ + toolchain-flags \ + unwcheck.py + +DATA = \ + check-gas-asm.S \ + check-model.c \ + check-segrel.S \ + check-segrel.lds \ + check-serialize.S \ + check-text-align.S + +OUTDIR = arch/ia64/scripts + +top_srcdir = ../../.. + +VPATH = $(top_srcdir)/kbuild/$(OUTDIR) + +include $(top_srcdir)/Makefile.inc diff --git a/debian/changelog b/debian/changelog index 99409503a..2e2611002 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-kbuild-2.6 (2.6.33~rc8-1) UNRELEASED; urgency=low [ Ben Hutchings ] * New upstream release candidate + * Include ia64-specific scripts (Closes: #392592) -- Ben Hutchings Sat, 20 Feb 2010 04:19:45 +0000 From db0f14f73beac0771fdc48632243f4f87e535306 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 20 Feb 2010 13:32:25 +0000 Subject: [PATCH 134/487] Remove arch specific workaround. svn path=/dists/trunk/linux-kbuild-2.6/; revision=15246 --- Makefile | 3 +-- arch/ia64/scripts/Makefile | 21 --------------------- debian/changelog | 8 -------- debian/rules.real | 19 ++----------------- 4 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 arch/ia64/scripts/Makefile diff --git a/Makefile b/Makefile index 02e980c48..1ca911f3a 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,7 @@ DATA = \ Makefile \ SUBDIRS = \ - scripts \ - $(wildcard arch/$(SRCARCH)/scripts) + scripts OUTDIR = . diff --git a/arch/ia64/scripts/Makefile b/arch/ia64/scripts/Makefile deleted file mode 100644 index 772d5ed3b..000000000 --- a/arch/ia64/scripts/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SCRIPTS = \ - check-gas \ - pvcheck.sed \ - toolchain-flags \ - unwcheck.py - -DATA = \ - check-gas-asm.S \ - check-model.c \ - check-segrel.S \ - check-segrel.lds \ - check-serialize.S \ - check-text-align.S - -OUTDIR = arch/ia64/scripts - -top_srcdir = ../../.. - -VPATH = $(top_srcdir)/kbuild/$(OUTDIR) - -include $(top_srcdir)/Makefile.inc diff --git a/debian/changelog b/debian/changelog index 2e2611002..423296f86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,3 @@ -linux-kbuild-2.6 (2.6.33~rc8-1) UNRELEASED; urgency=low - - [ Ben Hutchings ] - * New upstream release candidate - * Include ia64-specific scripts (Closes: #392592) - - -- Ben Hutchings Sat, 20 Feb 2010 04:19:45 +0000 - linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] diff --git a/debian/rules.real b/debian/rules.real index f55c36f03..053ac80dd 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -1,20 +1,5 @@ export DH_OPTIONS -DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -KERNEL_ARCH := $(DEB_BUILD_ARCH) -ifneq ($(filter amd64 i386,$(DEB_BUILD_ARCH)),) - KERNEL_ARCH := x86 -endif -ifneq ($(filter armeb armel,$(DEB_BUILD_ARCH)),) - KERNEL_ARCH := arm -endif -ifeq (hppa,$(DEB_BUILD_ARCH)) - KERNEL_ARCH := parisc -endif -ifeq (mipsel,$(DEB_BUILD_ARCH)) - KERNEL_ARCH := mips -endif - include debian/rules.defs binary-arch: install-kbuild @@ -27,7 +12,7 @@ $(STAMPS_DIR)/build: rm -rf '$(DIR)' mkdir -p '$(DIR)' cp -al $(SOURCE_FILES) '$(DIR)' - $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH) + $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) touch '$@' install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) @@ -39,7 +24,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) SRCARCH=$(KERNEL_ARCH) + $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs From 9bb069b99807ca360121e8a03fcbebf375fb1398 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 20 Feb 2010 13:36:28 +0000 Subject: [PATCH 135/487] Remove further crap. svn path=/dists/trunk/linux-kbuild-2.6/; revision=15247 --- debian/bin/genorig.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 3eaf5b8fc..8c836bf0a 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -102,11 +102,6 @@ class Main(object): for i in 'input.h', 'license.h', 'mod_devicetable.h': shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) - for arch in os.listdir(os.path.join(temp, 'arch')): - if os.path.exists(os.path.join(temp, 'arch', arch, 'scripts')): - os.makedirs(os.path.join(orig, 'arch', arch)) - shutil.copytree(os.path.join(temp, 'arch', arch, 'scripts'), - os.path.join(orig, 'arch', arch, 'scripts')) def tar(self): out = os.path.join("../orig", self.orig_tar) From 4a474f72f8a0658a1e63de80923899ed7ac6ec25 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 17 May 2010 02:49:41 +0000 Subject: [PATCH 136/487] New upstream version (2.6.34). Generate dummy autoconf.h to keep modpost building. svn path=/dists/trunk/linux-kbuild-2.6/; revision=15713 --- debian/changelog | 6 ++++++ debian/rules | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 423296f86..47da5a1bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.34-1~experimental.1) UNRELEASED; urgency=low + + * New upstream version + + -- Ben Hutchings Mon, 17 May 2010 03:26:43 +0100 + linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low [ Ben Hutchings ] diff --git a/debian/rules b/debian/rules index 25d147c7d..2ca960d0a 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: From da4531e0a972fda9736e1a45c6a2caa3ff3a8793 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 20 May 2010 00:33:16 +0000 Subject: [PATCH 137/487] Prepare to release linux-kbuild-2.6 (2.6.34-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=15755 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 47da5a1bb..d5af6c2ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-kbuild-2.6 (2.6.34-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.34-1~experimental.1) experimental; urgency=low * New upstream version - -- Ben Hutchings Mon, 17 May 2010 03:26:43 +0100 + -- Ben Hutchings Thu, 20 May 2010 01:19:43 +0100 linux-kbuild-2.6 (2.6.32-1) unstable; urgency=low From 2652ada94976f960bd7c9733a8c10f334d8e7c59 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 8 Aug 2010 21:06:45 +0000 Subject: [PATCH 138/487] Open changelog for 2.6.35-1~experimental.1 svn path=/dists/trunk/linux-kbuild-2.6/; revision=16103 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d5af6c2ce..28453470e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.35-1~experimental.1) UNRELEASED; urgency=low + + * New upstream version + + -- Ben Hutchings Sun, 08 Aug 2010 15:44:37 +0100 + linux-kbuild-2.6 (2.6.34-1~experimental.1) experimental; urgency=low * New upstream version From 8b8625b349b358c412cd81df49ea55347afb5b85 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 8 Aug 2010 21:22:16 +0000 Subject: [PATCH 139/487] Update policy version to 3.9.1; no changes required svn path=/dists/trunk/linux-kbuild-2.6/; revision=16104 --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 28453470e..e75fc07f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-kbuild-2.6 (2.6.35-1~experimental.1) UNRELEASED; urgency=low * New upstream version + * Update policy version to 3.9.1; no changes required -- Ben Hutchings Sun, 08 Aug 2010 15:44:37 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 065676fc6..3de9893df 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,5 +3,5 @@ Section: devel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings -Standards-Version: 3.7.3 +Standards-Version: 3.9.1 Build-Depends: debhelper (>> 7), python From f79e26d344b927f566f8b67748b68dee5984b7b3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 8 Aug 2010 21:30:55 +0000 Subject: [PATCH 140/487] Fix minor issues reported by lintian: - Add ${misc:Depends} to dependencies - Add debian/source/format file - Remove redundant priority and section fields svn path=/dists/trunk/linux-kbuild-2.6/; revision=16105 --- debian/changelog | 4 ++++ debian/source/format | 1 + debian/templates/control.main.in | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index e75fc07f0..266a2b284 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ linux-kbuild-2.6 (2.6.35-1~experimental.1) UNRELEASED; urgency=low * New upstream version * Update policy version to 3.9.1; no changes required + * Fix minor issues reported by lintian: + - Add ${misc:Depends} to dependencies + - Add debian/source/format file + - Remove redundant priority and section fields -- Ben Hutchings Sun, 08 Aug 2010 15:44:37 +0100 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..d3827e75a --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index b172cbc2e..045643346 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,7 +1,5 @@ Package: linux-kbuild-@version@ Architecture: any -Section: devel -Priority: optional -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From abde6e3058843a5d91789e36955fd33e5c4fec59 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 8 Aug 2010 21:37:14 +0000 Subject: [PATCH 141/487] Prepare to release linux-kbuild-2.6 (2.6.35-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=16106 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 266a2b284..d8a0f1b97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-kbuild-2.6 (2.6.35-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.35-1~experimental.1) experimental; urgency=low * New upstream version * Update policy version to 3.9.1; no changes required @@ -7,7 +7,7 @@ linux-kbuild-2.6 (2.6.35-1~experimental.1) UNRELEASED; urgency=low - Add debian/source/format file - Remove redundant priority and section fields - -- Ben Hutchings Sun, 08 Aug 2010 15:44:37 +0100 + -- Ben Hutchings Sun, 08 Aug 2010 22:31:47 +0100 linux-kbuild-2.6 (2.6.34-1~experimental.1) experimental; urgency=low From 269a9c63a2e1db849e6f8987542c4ca25cb614c4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 15 Nov 2010 00:39:04 +0000 Subject: [PATCH 142/487] Prepare to release linux-kbuild-2.6 (2.6.36-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=16548 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d8a0f1b97..03478c643 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.36-1~experimental.1) experimental; urgency=low + + * New upstream version + + -- Ben Hutchings Mon, 15 Nov 2010 00:20:33 +0000 + linux-kbuild-2.6 (2.6.35-1~experimental.1) experimental; urgency=low * New upstream version From fa7aa5f23e62308f5119b323616772e8b6c83cda Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 16 Jan 2011 14:55:15 +0000 Subject: [PATCH 143/487] Update for 2.6.37 svn path=/dists/trunk/linux-kbuild-2.6/; revision=16818 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 03478c643..0936f4e31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.37-1~experimental.1) UNRELEASED; urgency=low + + * New upstream version + + -- Ben Hutchings Sun, 16 Jan 2011 13:11:23 +0000 + linux-kbuild-2.6 (2.6.36-1~experimental.1) experimental; urgency=low * New upstream version From 55870599f52b23df723540ee9902d316d6cc59b7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 16 Jan 2011 15:14:34 +0000 Subject: [PATCH 144/487] Include new script gcc-goto.sh svn path=/dists/trunk/linux-kbuild-2.6/; revision=16819 --- debian/changelog | 1 + scripts/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0936f4e31..2a8112d37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-kbuild-2.6 (2.6.37-1~experimental.1) UNRELEASED; urgency=low * New upstream version + * Include new script gcc-goto.sh -- Ben Hutchings Sun, 16 Jan 2011 13:11:23 +0000 diff --git a/scripts/Makefile b/scripts/Makefile index e6d0ec569..15016f9c4 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -19,6 +19,7 @@ SCRIPTS = \ checkincludes.pl \ checkstack.pl \ checkversion.pl \ + gcc-goto.sh \ gcc-version.sh \ gcc-x86_32-has-stack-protector.sh \ gcc-x86_64-has-stack-protector.sh \ From 77f5e70f757e310cf8560c9cd289f6ca54d6da80 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 16 Jan 2011 15:14:59 +0000 Subject: [PATCH 145/487] Prepare to release linux-kbuild-2.6 (2.6.37-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=16820 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2a8112d37..0298978ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (2.6.37-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (2.6.37-1~experimental.1) experimental; urgency=low * New upstream version * Include new script gcc-goto.sh - -- Ben Hutchings Sun, 16 Jan 2011 13:11:23 +0000 + -- Ben Hutchings Sun, 16 Jan 2011 15:14:34 +0000 linux-kbuild-2.6 (2.6.36-1~experimental.1) experimental; urgency=low From 795be1396d8f9fa249036c83baa4027a0e42aad6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 15 Feb 2011 14:56:21 +0000 Subject: [PATCH 146/487] Prepare to release linux-kbuild-2.6 (2.6.37-1). svn path=/dists/sid/linux-kbuild-2.6/; revision=16894 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0298978ed..f5af7cb69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.37-1) unstable; urgency=low + + * Upload to unstable + + -- Ben Hutchings Tue, 15 Feb 2011 14:15:36 +0000 + linux-kbuild-2.6 (2.6.37-1~experimental.1) experimental; urgency=low * New upstream version From 59636e8363a121e37eef53eb461bbc7423f1667c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 16 Mar 2011 13:46:54 +0000 Subject: [PATCH 147/487] Prepare to release linux-kbuild-2.6 (2.6.38-1). svn path=/dists/sid/linux-kbuild-2.6/; revision=17088 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f5af7cb69..e6382bf48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.38-1) unstable; urgency=low + + * New upstream release + + -- Ben Hutchings Wed, 16 Mar 2011 13:45:58 +0000 + linux-kbuild-2.6 (2.6.37-1) unstable; urgency=low * Upload to unstable From ee3f234e4ffdb2e489d20d36eeb659b700868bd3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 20 May 2011 12:22:16 +0000 Subject: [PATCH 148/487] Prepare to release linux-kbuild-2.6 (2.6.39-1). svn path=/dists/sid/linux-kbuild-2.6/; revision=17467 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e6382bf48..0dcdcfc8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (2.6.39-1) unstable; urgency=low + + * New upstream release + + -- Ben Hutchings Fri, 20 May 2011 04:53:57 +0100 + linux-kbuild-2.6 (2.6.38-1) unstable; urgency=low * New upstream release From c39c30cafd5c2a8902437d4f8fe2f1c39f7231fa Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 1 Jun 2011 07:19:05 +0000 Subject: [PATCH 149/487] Prepare gencontrol and templates for Linux 3.0 - Fix source package name as linux-kbuild-2.6 - Remove the 'major' template variable and 'MAJOR' make variable svn path=/dists/trunk/linux-kbuild-2.6/; revision=17560 --- debian/bin/gencontrol.py | 2 -- debian/lib/python/debian_linux/debian.py | 5 +---- debian/lib/python/debian_linux/gencontrol.py | 2 -- debian/templates/control.source.in | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index c1a8a608b..6c985051a 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -38,7 +38,6 @@ class gencontrol(object): def do_main_setup(self, vars, makeflags): makeflags.update({ - 'MAJOR': self.version.linux_major, 'VERSION': self.version.linux_version, 'UPSTREAMVERSION': self.version.linux_upstream, }) @@ -58,7 +57,6 @@ class gencontrol(object): 'upstreamversion': version.linux_upstream, 'version': version.linux_version, 'source_upstream': version.upstream, - 'major': version.linux_major, } def process_relation(self, key, e, in_e, vars): diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index 3b5d98ca6..dd199fab3 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -94,9 +94,7 @@ class VersionLinux(Version): _version_linux_rules = ur""" ^ (?P - (?P\d+\.\d+) - \. - \d+ + \d+\.\d+\.\d+ ) (?: (\.\d+) @@ -124,7 +122,6 @@ $ if match is None: raise RuntimeError, "Invalid debian linux version" d = match.groupdict() - self.linux_major = d['major'] self.linux_modifier = d['modifier'] self.linux_version = d['version'] if d['modifier'] is not None: diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index 90b009f83..4128ce58d 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -105,7 +105,6 @@ class Gencontrol(object): def do_main_setup(self, vars, makeflags, extra): makeflags.update({ - 'MAJOR': self.version.linux_major, 'VERSION': self.version.linux_version, 'UPSTREAMVERSION': self.version.linux_upstream, 'ABINAME': self.abiname, @@ -282,7 +281,6 @@ class Gencontrol(object): 'upstreamversion': version.linux_upstream, 'version': version.linux_version, 'source_upstream': version.upstream, - 'major': version.linux_major, 'abiname': abiname, } diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 3de9893df..cb2a9756c 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -1,4 +1,4 @@ -Source: linux-kbuild-@major@ +Source: linux-kbuild-2.6 Section: devel Priority: optional Maintainer: Debian Kernel Team From a2bedeaee8a1b7406cabb239cc0007069d8c6381 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 1 Jun 2011 07:28:10 +0000 Subject: [PATCH 150/487] Update to 3.0-rc1 svn path=/dists/trunk/linux-kbuild-2.6/; revision=17561 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0dcdcfc8a..f7908a3b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release candidate + + -- Ben Hutchings Wed, 01 Jun 2011 08:08:57 +0100 + linux-kbuild-2.6 (2.6.39-1) unstable; urgency=low * New upstream release From 9ad8128fdcf2a5a45b26e51ef206c630b65251e5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 1 Jun 2011 07:29:47 +0000 Subject: [PATCH 151/487] Stop building docproc docproc is not needed for building modules, and upstream has moved it out of scripts/basic to avoid a false dependency. svn path=/dists/trunk/linux-kbuild-2.6/; revision=17562 --- scripts/basic/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index a65431465..cbae6072d 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile @@ -1,5 +1,4 @@ PROGS = \ - docproc \ fixdep OUTDIR = scripts/basic From 2e7ed3cfdc680387c4fb9136ff64b6c75851e627 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 1 Jun 2011 09:21:00 +0000 Subject: [PATCH 152/487] Note removal of docproc svn path=/dists/trunk/linux-kbuild-2.6/; revision=17565 --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index f7908a3b5..3750c7a8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1) UNRELEASED; urgency=low * New upstream release candidate + * Remove docproc, no longer required for module builds -- Ben Hutchings Wed, 01 Jun 2011 08:08:57 +0100 From ce4b86886ae9a99ef3c442d87dcc35d513098494 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 1 Jun 2011 09:21:15 +0000 Subject: [PATCH 153/487] Prepare to release linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=17566 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3750c7a8a..c7a7734b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1) UNRELEASED; urgency=low +linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1) experimental; urgency=low * New upstream release candidate * Remove docproc, no longer required for module builds - -- Ben Hutchings Wed, 01 Jun 2011 08:08:57 +0100 + -- Ben Hutchings Wed, 01 Jun 2011 10:21:01 +0100 linux-kbuild-2.6 (2.6.39-1) unstable; urgency=low From 8d3de625941af54c07f2d86f6cba7775d19cc686 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 29 Jun 2011 02:17:27 +0000 Subject: [PATCH 154/487] Prepare to release linux-kbuild-2.6 (3.0.0~rc5-1~experimental.1). svn path=/dists/trunk/linux-kbuild-2.6/; revision=17765 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index c7a7734b5..73cc088c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (3.0.0~rc5-1~experimental.1) experimental; urgency=low + + * New upstream release candidate + + -- Ben Hutchings Wed, 29 Jun 2011 02:32:31 +0100 + linux-kbuild-2.6 (3.0.0~rc1-1~experimental.1) experimental; urgency=low * New upstream release candidate From e98bb258e2ed08f5c9bde36664bcac56feb75cfb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jul 2011 14:02:57 +0000 Subject: [PATCH 155/487] Update to v3.0 svn path=/dists/trunk/linux-kbuild-2.6/; revision=17853 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 73cc088c9..372097323 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (3.0.0-1) unstable; urgency=low + + * New upstream release + + -- Ben Hutchings Sun, 24 Jul 2011 15:38:35 +0200 + linux-kbuild-2.6 (3.0.0~rc5-1~experimental.1) experimental; urgency=low * New upstream release candidate From 4b5543a84f5fdbe3055da56e8fe15780151ebc2e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 28 Jul 2011 23:10:37 +0000 Subject: [PATCH 156/487] Include new script depmod.sh (Closes: #635539) svn path=/dists/trunk/linux-kbuild-2.6/; revision=17864 --- debian/changelog | 6 ++++++ scripts/Makefile | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 372097323..38648eb0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-kbuild-2.6 (3.0.0-2) unstable; urgency=low + + * Include new script depmod.sh (Closes: #635539) + + -- Ben Hutchings Fri, 29 Jul 2011 01:00:20 +0200 + linux-kbuild-2.6 (3.0.0-1) unstable; urgency=low * New upstream release diff --git a/scripts/Makefile b/scripts/Makefile index 15016f9c4..d74e23563 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -19,6 +19,7 @@ SCRIPTS = \ checkincludes.pl \ checkstack.pl \ checkversion.pl \ + depmod.sh \ gcc-goto.sh \ gcc-version.sh \ gcc-x86_32-has-stack-protector.sh \ From 2d593fc6be2d9d2a04f77e1e8d28d25c00a434d3 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 10:34:32 +0000 Subject: [PATCH 157/487] debian/bin/genorig.py: Merge changes from linux-2.6. svn path=/dists/trunk/linux-kbuild-2.6/; revision=17869 --- debian/bin/genorig.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 8c836bf0a..7ff0f82f2 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -12,7 +12,7 @@ import subprocess from debian_linux.debian import Changelog, VersionLinux class Main(object): - def __init__(self, input_files, override_version): + def __init__(self, input_files, override_version, override_tag): self.log = sys.stdout.write self.input_files = input_files @@ -24,11 +24,15 @@ class Main(object): if override_version: version = VersionLinux('%s-undef' % override_version) - self.log('Using source name %s, version %s\n' % (source, version.upstream)) + self.version_dfsg = version.linux_dfsg + if self.version_dfsg is None: + self.version_dfsg = '0' + + self.log('Using source name %s, version %s, dfsg %s\n' % (source, version.upstream, self.version_dfsg)) self.orig = '%s-%s' % (source, version.upstream) self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream) - self.tag = 'v' + version.upstream.replace('~', '-') + self.tag = override_tag or ('v' + version.upstream.replace('~', '-')) def __call__(self): import tempfile @@ -129,7 +133,8 @@ if __name__ == '__main__': from optparse import OptionParser parser = OptionParser(usage = "%prog [OPTION]... {TAR [PATCH] | REPO}") parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") + parser.add_option("-t", "--override-tag", dest = "override_tag", help = "Override tag", metavar = "TAG") options, args = parser.parse_args() assert 1 <= len(args) <= 2 - Main(args, options.override_version)() + Main(args, options.override_version, options.override_tag)() From c001326e89dda9593d32f101a1f8ef076471f7d9 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 10:37:47 +0000 Subject: [PATCH 158/487] /dists/trunk/linux-tools: Rename package. svn path=/dists/trunk/linux-tools/; revision=17870 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 38648eb0d..d07345def 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.0.0-3) UNRELEASED; urgency=low + + * Rename to linux-tools. + + -- Bastian Blank Sun, 31 Jul 2011 12:36:15 +0200 + linux-kbuild-2.6 (3.0.0-2) unstable; urgency=low * Include new script depmod.sh (Closes: #635539) From 4260a547170bf229f0796c10b79813761366b38a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:01:09 +0000 Subject: [PATCH 159/487] debian/templates/control.source.in: Fix package name. svn path=/dists/trunk/linux-tools/; revision=17871 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index cb2a9756c..b7af7a293 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -1,4 +1,4 @@ -Source: linux-kbuild-2.6 +Source: linux-tools Section: devel Priority: optional Maintainer: Debian Kernel Team From 4ba4479b0db3719d4a79348e54882e85cd7bdd8a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:02:37 +0000 Subject: [PATCH 160/487] * debian/build: Move build infrastructure. * debian/rules: Clean build dir * debian/rules.real: Use build dir directly. svn path=/dists/trunk/linux-tools/; revision=17872 --- debian/bin/genorig.py | 2 +- Makefile => debian/build/Makefile | 2 +- Makefile.inc => debian/build/Makefile.inc | 0 {scripts => debian/build/scripts}/Makefile | 2 +- {scripts => debian/build/scripts}/basic/Makefile | 2 +- {scripts => debian/build/scripts}/genksyms/Makefile | 2 +- {scripts => debian/build/scripts}/kconfig/Makefile | 2 +- {scripts => debian/build/scripts}/mod/Makefile | 2 +- {scripts => debian/build/scripts}/mod/Makefile.real | 2 +- {scripts => debian/build/scripts}/mod/elfconfig.h | 0 {scripts => debian/build/scripts}/mod/gendef.py | 0 {scripts => debian/build/scripts}/mod/modpost.c | 0 .../build/scripts}/mod/real-lsb-32/elfconfig.h | 0 .../build/scripts}/mod/real-lsb-64/elfconfig.h | 0 .../build/scripts}/mod/real-msb-32/elfconfig.h | 0 .../build/scripts}/mod/real-msb-64/elfconfig.h | 0 debian/rules | 7 ++++--- debian/rules.real | 10 ++-------- 18 files changed, 14 insertions(+), 19 deletions(-) rename Makefile => debian/build/Makefile (63%) rename Makefile.inc => debian/build/Makefile.inc (100%) rename {scripts => debian/build/scripts}/Makefile (93%) rename {scripts => debian/build/scripts}/basic/Makefile (68%) rename {scripts => debian/build/scripts}/genksyms/Makefile (85%) rename {scripts => debian/build/scripts}/kconfig/Makefile (86%) rename {scripts => debian/build/scripts}/mod/Makefile (90%) rename {scripts => debian/build/scripts}/mod/Makefile.real (86%) rename {scripts => debian/build/scripts}/mod/elfconfig.h (100%) rename {scripts => debian/build/scripts}/mod/gendef.py (100%) rename {scripts => debian/build/scripts}/mod/modpost.c (100%) rename {scripts => debian/build/scripts}/mod/real-lsb-32/elfconfig.h (100%) rename {scripts => debian/build/scripts}/mod/real-lsb-64/elfconfig.h (100%) rename {scripts => debian/build/scripts}/mod/real-msb-32/elfconfig.h (100%) rename {scripts => debian/build/scripts}/mod/real-msb-64/elfconfig.h (100%) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 7ff0f82f2..66ce1ee2d 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -98,7 +98,7 @@ class Main(object): def generate(self): self.log("Generate orig\n") - orig = os.path.join(self.dir, self.orig, 'kbuild') + orig = os.path.join(self.dir, self.orig) temp = os.path.join(self.dir, 'temp') os.makedirs(os.path.join(orig, 'include', 'linux')) for i in 'COPYING', 'Kbuild', 'Makefile': diff --git a/Makefile b/debian/build/Makefile similarity index 63% rename from Makefile rename to debian/build/Makefile index 1ca911f3a..56a2929b9 100644 --- a/Makefile +++ b/debian/build/Makefile @@ -9,4 +9,4 @@ OUTDIR = . top_srcdir = . -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc diff --git a/Makefile.inc b/debian/build/Makefile.inc similarity index 100% rename from Makefile.inc rename to debian/build/Makefile.inc diff --git a/scripts/Makefile b/debian/build/scripts/Makefile similarity index 93% rename from scripts/Makefile rename to debian/build/scripts/Makefile index d74e23563..1ef6f0a1e 100644 --- a/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -47,4 +47,4 @@ top_srcdir = .. VPATH = $(top_srcdir)/kbuild/scripts -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc diff --git a/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile similarity index 68% rename from scripts/basic/Makefile rename to debian/build/scripts/basic/Makefile index cbae6072d..3aa741d04 100644 --- a/scripts/basic/Makefile +++ b/debian/build/scripts/basic/Makefile @@ -7,4 +7,4 @@ top_srcdir = ../.. VPATH = $(top_srcdir)/kbuild/$(OUTDIR) -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc diff --git a/scripts/genksyms/Makefile b/debian/build/scripts/genksyms/Makefile similarity index 85% rename from scripts/genksyms/Makefile rename to debian/build/scripts/genksyms/Makefile index b6af7f286..2debf5b09 100644 --- a/scripts/genksyms/Makefile +++ b/debian/build/scripts/genksyms/Makefile @@ -6,7 +6,7 @@ top_srcdir = ../.. VPATH = $(top_srcdir)/kbuild/$(OUTDIR) -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc CFLAGS += -I$(VPATH) diff --git a/scripts/kconfig/Makefile b/debian/build/scripts/kconfig/Makefile similarity index 86% rename from scripts/kconfig/Makefile rename to debian/build/scripts/kconfig/Makefile index 9100f3ecc..d14e845f5 100644 --- a/scripts/kconfig/Makefile +++ b/debian/build/scripts/kconfig/Makefile @@ -6,7 +6,7 @@ top_srcdir = ../.. VPATH = $(top_srcdir)/kbuild/$(OUTDIR) -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc CFLAGS += -I$(VPATH) diff --git a/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile similarity index 90% rename from scripts/mod/Makefile rename to debian/build/scripts/mod/Makefile index 0e01d9fea..c413590c4 100644 --- a/scripts/mod/Makefile +++ b/debian/build/scripts/mod/Makefile @@ -9,7 +9,7 @@ OUTDIR = scripts/mod top_srcdir = ../.. -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc modpost.real-%: $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/kbuild/scripts/mod diff --git a/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real similarity index 86% rename from scripts/mod/Makefile.real rename to debian/build/scripts/mod/Makefile.real index be0d63c20..a0979abce 100644 --- a/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -4,7 +4,7 @@ top_srcdir = ../.. CFLAGS += -I$(top_srcdir)/kbuild/include -include $(top_srcdir)/Makefile.inc +include $(top_srcdir)/debian/build/Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ diff --git a/scripts/mod/elfconfig.h b/debian/build/scripts/mod/elfconfig.h similarity index 100% rename from scripts/mod/elfconfig.h rename to debian/build/scripts/mod/elfconfig.h diff --git a/scripts/mod/gendef.py b/debian/build/scripts/mod/gendef.py similarity index 100% rename from scripts/mod/gendef.py rename to debian/build/scripts/mod/gendef.py diff --git a/scripts/mod/modpost.c b/debian/build/scripts/mod/modpost.c similarity index 100% rename from scripts/mod/modpost.c rename to debian/build/scripts/mod/modpost.c diff --git a/scripts/mod/real-lsb-32/elfconfig.h b/debian/build/scripts/mod/real-lsb-32/elfconfig.h similarity index 100% rename from scripts/mod/real-lsb-32/elfconfig.h rename to debian/build/scripts/mod/real-lsb-32/elfconfig.h diff --git a/scripts/mod/real-lsb-64/elfconfig.h b/debian/build/scripts/mod/real-lsb-64/elfconfig.h similarity index 100% rename from scripts/mod/real-lsb-64/elfconfig.h rename to debian/build/scripts/mod/real-lsb-64/elfconfig.h diff --git a/scripts/mod/real-msb-32/elfconfig.h b/debian/build/scripts/mod/real-msb-32/elfconfig.h similarity index 100% rename from scripts/mod/real-msb-32/elfconfig.h rename to debian/build/scripts/mod/real-msb-32/elfconfig.h diff --git a/scripts/mod/real-msb-64/elfconfig.h b/debian/build/scripts/mod/real-msb-64/elfconfig.h similarity index 100% rename from scripts/mod/real-msb-64/elfconfig.h rename to debian/build/scripts/mod/real-msb-64/elfconfig.h diff --git a/debian/rules b/debian/rules index 2ca960d0a..fab307f2e 100755 --- a/debian/rules +++ b/debian/rules @@ -11,12 +11,12 @@ 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) kbuild/include/generated/autoconf.h +$(STAMPS_DIR)/build-base: $(STAMPS_DIR) kbuild/include/generated/autoconf.h dh_testdir $(MAKE) -f debian/rules.gen build touch $@ -$(BUILD_DIR) $(STAMPS_DIR): +$(STAMPS_DIR): @[ -d $@ ] || mkdir $@ # modpost needs CONFIG_SYMBOL_PREFIX from autoconf.h, but this is undefined @@ -46,7 +46,8 @@ maintainerclean: clean: debian/control dh_testdir - rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc kbuild/include/generated + make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) + rm -rf $(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 053ac80dd..996a5bab0 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -6,25 +6,19 @@ binary-arch: install-kbuild build: $(STAMPS_DIR)/build -$(STAMPS_DIR)/build: SOURCE_FILES = $(filter-out debian, $(wildcard * .[^.]*)) -$(STAMPS_DIR)/build: DIR=$(BUILD_DIR)/build $(STAMPS_DIR)/build: - rm -rf '$(DIR)' - mkdir -p '$(DIR)' - cp -al $(SOURCE_FILES) '$(DIR)' - $(MAKE) -C $(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) touch '$@' install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) install-kbuild: DH_OPTIONS = -p$(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 dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(SOURCE_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(BUILD_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs From 41a97d5147b75a9c2bcbb3e46960475a7d73342c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:04:53 +0000 Subject: [PATCH 161/487] * debian/changelog: Update. * debian/source/format: Set to 3.0 (quilt). svn path=/dists/trunk/linux-tools/; revision=17873 --- debian/changelog | 1 + debian/source/format | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d07345def..ee29b7760 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.0.0-3) UNRELEASED; urgency=low * Rename to linux-tools. + * Use 3.0 (quilt) source format. -- Bastian Blank Sun, 31 Jul 2011 12:36:15 +0200 diff --git a/debian/source/format b/debian/source/format index d3827e75a..163aaf8d8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -1.0 +3.0 (quilt) From a78250e1bc1e8798251edcee3ad7f70f2064c6a6 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:18:48 +0000 Subject: [PATCH 162/487] Move imported code to root directory. svn path=/dists/trunk/linux-tools/; revision=17874 --- debian/build/Makefile.inc | 4 ++-- debian/build/scripts/Makefile | 2 +- debian/build/scripts/basic/Makefile | 2 +- debian/build/scripts/genksyms/Makefile | 2 +- debian/build/scripts/kconfig/Makefile | 2 +- debian/build/scripts/mod/Makefile | 4 ++-- debian/build/scripts/mod/Makefile.real | 2 +- debian/rules | 12 ++++++------ 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/debian/build/Makefile.inc b/debian/build/Makefile.inc index c3e557703..72658a42f 100644 --- a/debian/build/Makefile.inc +++ b/debian/build/Makefile.inc @@ -30,7 +30,7 @@ install-local-progs: $(PROGS) install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done -SCRIPTS_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(SCRIPTS)) +SCRIPTS_REAL = $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS)) install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ @@ -38,7 +38,7 @@ install-local-scripts: $(SCRIPTS_REAL) install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done -DATA_REAL = $(addprefix $(top_srcdir)/kbuild/$(OUTDIR)/,$(DATA)) +DATA_REAL = $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA)) install-local-data: $(DATA_REAL) @for p in $^; do \ diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 1ef6f0a1e..d591c9bcc 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -45,6 +45,6 @@ OUTDIR = scripts top_srcdir = .. -VPATH = $(top_srcdir)/kbuild/scripts +VPATH = $(top_srcdir)/scripts include $(top_srcdir)/debian/build/Makefile.inc diff --git a/debian/build/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile index 3aa741d04..7a5ef1c80 100644 --- a/debian/build/scripts/basic/Makefile +++ b/debian/build/scripts/basic/Makefile @@ -5,6 +5,6 @@ OUTDIR = scripts/basic top_srcdir = ../.. -VPATH = $(top_srcdir)/kbuild/$(OUTDIR) +VPATH = $(top_srcdir)/$(OUTDIR) include $(top_srcdir)/debian/build/Makefile.inc diff --git a/debian/build/scripts/genksyms/Makefile b/debian/build/scripts/genksyms/Makefile index 2debf5b09..66f5b2d4f 100644 --- a/debian/build/scripts/genksyms/Makefile +++ b/debian/build/scripts/genksyms/Makefile @@ -4,7 +4,7 @@ OUTDIR = scripts/genksyms top_srcdir = ../.. -VPATH = $(top_srcdir)/kbuild/$(OUTDIR) +VPATH = $(top_srcdir)/$(OUTDIR) include $(top_srcdir)/debian/build/Makefile.inc diff --git a/debian/build/scripts/kconfig/Makefile b/debian/build/scripts/kconfig/Makefile index d14e845f5..370db47ab 100644 --- a/debian/build/scripts/kconfig/Makefile +++ b/debian/build/scripts/kconfig/Makefile @@ -4,7 +4,7 @@ OUTDIR = scripts/kconfig top_srcdir = ../.. -VPATH = $(top_srcdir)/kbuild/$(OUTDIR) +VPATH = $(top_srcdir)/$(OUTDIR) include $(top_srcdir)/debian/build/Makefile.inc diff --git a/debian/build/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile index c413590c4..5cb67d4a8 100644 --- a/debian/build/scripts/mod/Makefile +++ b/debian/build/scripts/mod/Makefile @@ -12,12 +12,12 @@ top_srcdir = ../.. include $(top_srcdir)/debian/build/Makefile.inc modpost.real-%: - $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/kbuild/scripts/mod + $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod %: %.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -modpost.h: $(top_srcdir)/kbuild/scripts/mod/modpost.c +modpost.h: $(top_srcdir)/scripts/mod/modpost.c python ./gendef.py $< > $@ modpost.o: modpost.c modpost.h diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index a0979abce..d999c78de 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -2,7 +2,7 @@ PROGS = modpost.real-$(TYPE) top_srcdir = ../.. -CFLAGS += -I$(top_srcdir)/kbuild/include +CFLAGS += -I$(top_srcdir)/include include $(top_srcdir)/debian/build/Makefile.inc diff --git a/debian/rules b/debian/rules index fab307f2e..81eaebec3 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: $(STAMPS_DIR) kbuild/include/generated/autoconf.h +$(STAMPS_DIR)/build-base: $(STAMPS_DIR) include/generated/autoconf.h dh_testdir $(MAKE) -f debian/rules.gen build touch $@ @@ -21,7 +21,7 @@ $(STAMPS_DIR): # modpost needs CONFIG_SYMBOL_PREFIX from autoconf.h, but this is undefined # for all Debian architectures. -kbuild/include/generated/autoconf.h: +include/generated/autoconf.h: @mkdir -p $(@D) @[ -f $@ ] || touch $@ @@ -30,7 +30,7 @@ TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) - rsync --delete --link-dest=$(CURDIR)/$(DIR_ORIG)/kbuild/ -a $(DIR_ORIG)/kbuild/ kbuild + rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . $(DIR_ORIG): ifeq ($(TAR_ORIG),) @@ -41,13 +41,13 @@ else endif maintainerclean: - -rm debian/control debian/control.md5sum debian/rules.gen - -rm -rf kbuild + rm -f debian/control debian/control.md5sum debian/rules.gen + rm -rf $(filter-out debian .svk .svn, $(wildcard * .[^.]*)) clean: debian/control dh_testdir make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc kbuild/include/generated + rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc include/generated dh_clean binary-indep: From d5a4f432acb5e41163366e5cd0eb479cd0227ab7 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:27:34 +0000 Subject: [PATCH 163/487] debian/source/local-options: Add. svn path=/dists/trunk/linux-tools/; revision=17876 --- debian/source/local-options | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/source/local-options diff --git a/debian/source/local-options b/debian/source/local-options new file mode 100644 index 000000000..2ee6f0fa1 --- /dev/null +++ b/debian/source/local-options @@ -0,0 +1 @@ +abort-on-upstream-changes From 37b7f2a85bb7d83bfbdc989e5413932b1db6c155 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 11:32:31 +0000 Subject: [PATCH 164/487] * debian/changelog: Update. * debian/patches: Add patch. * debian/rules: Remove now unneeded autoconf.h handling. svn path=/dists/trunk/linux-tools/; revision=17877 --- debian/changelog | 1 + debian/patches/modpost-symbol-prefix.patch | 19 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 10 ++-------- 4 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 debian/patches/modpost-symbol-prefix.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index ee29b7760..a7d6e5df3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (3.0.0-3) UNRELEASED; urgency=low * Rename to linux-tools. * Use 3.0 (quilt) source format. + * Properly patch modpost symbol prefix setting. -- Bastian Blank Sun, 31 Jul 2011 12:36:15 +0200 diff --git a/debian/patches/modpost-symbol-prefix.patch b/debian/patches/modpost-symbol-prefix.patch new file mode 100644 index 000000000..7fc7e7a0d --- /dev/null +++ b/debian/patches/modpost-symbol-prefix.patch @@ -0,0 +1,19 @@ +--- a/scripts/mod/modpost.c ++++ b/scripts/mod/modpost.c +@@ -16,15 +16,11 @@ + #include + #include + #include "modpost.h" +-#include "../../include/generated/autoconf.h" + #include "../../include/linux/license.h" + + /* Some toolchains use a `_' prefix for all user symbols. */ +-#ifdef CONFIG_SYMBOL_PREFIX +-#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX +-#else ++/* No Debian architecture currently does this. */ + #define MODULE_SYMBOL_PREFIX "" +-#endif + + + /* Are we using CONFIG_MODVERSIONS? */ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..2597269a7 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +modpost-symbol-prefix.patch diff --git a/debian/rules b/debian/rules index 81eaebec3..d201eff61 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: $(STAMPS_DIR) include/generated/autoconf.h +$(STAMPS_DIR)/build-base: $(STAMPS_DIR) dh_testdir $(MAKE) -f debian/rules.gen build touch $@ @@ -19,12 +19,6 @@ $(STAMPS_DIR)/build-base: $(STAMPS_DIR) include/generated/autoconf.h $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ -# modpost needs CONFIG_SYMBOL_PREFIX from autoconf.h, but this is undefined -# for all Debian architectures. -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))) @@ -47,7 +41,7 @@ maintainerclean: clean: debian/control dh_testdir make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc include/generated + rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc dh_clean binary-indep: From 3cc26070a49d55b40ab57f0983b2012759c8028c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 31 Jul 2011 17:19:18 +0000 Subject: [PATCH 165/487] * debian/bin/genorig.py: Include files needed for tools/perf. * debian/build: Build tools/perf. * debian/templates/control.source.in: Add build-deps. svn path=/dists/trunk/linux-tools/; revision=17878 --- debian/bin/genorig.py | 16 +++++++++++++--- debian/build/Makefile | 3 ++- debian/templates/control.source.in | 4 +++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 66ce1ee2d..0ec20c025 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -100,12 +100,22 @@ class Main(object): self.log("Generate orig\n") orig = os.path.join(self.dir, self.orig) temp = os.path.join(self.dir, 'temp') - os.makedirs(os.path.join(orig, 'include', 'linux')) + # TODO: move this informations somewhere else + os.mkdir(os.path.join(orig)) for i in 'COPYING', 'Kbuild', 'Makefile': shutil.copyfile(os.path.join(temp, i), os.path.join(orig, i)) - for i in 'input.h', 'license.h', 'mod_devicetable.h': - shutil.copyfile(os.path.join(temp, 'include', 'linux', i), os.path.join(orig, 'include', 'linux', i)) + for i in 's390', 'x86': + os.makedirs(os.path.join(orig, 'arch', i, 'include')) + shutil.copyfile(os.path.join(temp, 'arch', i, 'Makefile'), os.path.join(orig, 'arch', i, 'Makefile')) + shutil.copytree(os.path.join(temp, 'arch', i, 'include', 'asm'), os.path.join(orig, 'arch', i, 'include', 'asm')) + os.mkdir(os.path.join(orig, 'arch', 'x86', 'lib')) + shutil.copyfile(os.path.join(temp, 'arch', 'x86', 'lib', 'memcpy_64.S'), os.path.join(orig, 'arch', 'x86', 'lib', 'memcpy_64.S')) + os.mkdir(os.path.join(orig, 'include')) + shutil.copytree(os.path.join(temp, 'include', 'linux'), os.path.join(orig, 'include', 'linux')) + os.mkdir(os.path.join(orig, 'lib')) + shutil.copyfile(os.path.join(temp, 'lib', 'rbtree.c'), os.path.join(orig, 'lib', 'rbtree.c')) shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) + shutil.copytree(os.path.join(temp, 'tools'), os.path.join(orig, 'tools')) def tar(self): out = os.path.join("../orig", self.orig_tar) diff --git a/debian/build/Makefile b/debian/build/Makefile index 56a2929b9..532714e33 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -3,7 +3,8 @@ DATA = \ Makefile \ SUBDIRS = \ - scripts + scripts \ + tools OUTDIR = . diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index b7af7a293..91fcc41c5 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -4,4 +4,6 @@ Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.1 -Build-Depends: debhelper (>> 7), python +Build-Depends: + debhelper (>> 7), python, + binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev From 1e409bb704e7843e9dcfc02c76aba501b747f7ac Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 13 Sep 2011 14:44:15 +0000 Subject: [PATCH 166/487] Add linux-tools-* binary package svn path=/dists/trunk/linux-tools/; revision=18085 --- debian/rules.real | 3 +++ debian/templates/control.main.in | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/debian/rules.real b/debian/rules.real index 996a5bab0..b5fdc9adc 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,6 +3,9 @@ export DH_OPTIONS include debian/rules.defs binary-arch: install-kbuild +ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 sh4 sparc sparc64,$(ARCH)),) + binary-arch-arch: install-tools_$(ARCH) +endif build: $(STAMPS_DIR)/build diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 045643346..80fbdae32 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -3,3 +3,15 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. + +Package: linux-tools-@version@ +Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64 +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} +Recommends: linux-base (>= 2.6.32-16) +Suggests: linux-doc-@version@ +Description: Performance analysis tools for Linux @upstreamversion@ + This package contains the 'perf' performance analysis tools for Linux + kernel version @upstreamversion@. + . + The linux-base package contains a 'perf' command which will invoke the + appropriate version for the running kernel. From 44e90b24ae36593c88babb797b997039cf07e919 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 13 Sep 2011 15:01:01 +0000 Subject: [PATCH 167/487] debian/build - Always define top_srcdir and VPATH. - Fix build of genksyms and kconfig. svn path=/dists/trunk/linux-tools/; revision=18086 --- debian/build/Makefile | 4 +--- debian/build/Makefile.inc | 5 +++++ debian/build/scripts/Makefile | 6 +----- debian/build/scripts/basic/Makefile | 6 +----- debian/build/scripts/genksyms/Makefile | 14 ++++---------- debian/build/scripts/kconfig/Makefile | 12 +++--------- debian/build/scripts/mod/Makefile | 4 +--- 7 files changed, 16 insertions(+), 35 deletions(-) diff --git a/debian/build/Makefile b/debian/build/Makefile index 532714e33..970d4e4c7 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -8,6 +8,4 @@ SUBDIRS = \ OUTDIR = . -top_srcdir = . - -include $(top_srcdir)/debian/build/Makefile.inc +include Makefile.inc diff --git a/debian/build/Makefile.inc b/debian/build/Makefile.inc index 72658a42f..22966b838 100644 --- a/debian/build/Makefile.inc +++ b/debian/build/Makefile.inc @@ -1,8 +1,13 @@ +top_srcdir = $(dir $(lastword $(MAKEFILE_LIST)))/../.. + +VPATH = $(top_srcdir)/$(OUTDIR) + SHELL = /bin/sh -e CC = gcc CXX = g++ CFLAGS ?= -O2 -Wall +CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) CXXFLAGS = $(CFLAGS) all: all-local all-recursive diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index d591c9bcc..13f2e7a56 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -43,8 +43,4 @@ SUBDIRS = \ OUTDIR = scripts -top_srcdir = .. - -VPATH = $(top_srcdir)/scripts - -include $(top_srcdir)/debian/build/Makefile.inc +include ..//Makefile.inc diff --git a/debian/build/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile index 7a5ef1c80..0ae6a26a8 100644 --- a/debian/build/scripts/basic/Makefile +++ b/debian/build/scripts/basic/Makefile @@ -3,8 +3,4 @@ PROGS = \ OUTDIR = scripts/basic -top_srcdir = ../.. - -VPATH = $(top_srcdir)/$(OUTDIR) - -include $(top_srcdir)/debian/build/Makefile.inc +include ../../Makefile.inc diff --git a/debian/build/scripts/genksyms/Makefile b/debian/build/scripts/genksyms/Makefile index 66f5b2d4f..fc26e0c54 100644 --- a/debian/build/scripts/genksyms/Makefile +++ b/debian/build/scripts/genksyms/Makefile @@ -2,17 +2,11 @@ PROGS = genksyms OUTDIR = scripts/genksyms -top_srcdir = ../.. +include ../../Makefile.inc -VPATH = $(top_srcdir)/$(OUTDIR) +genksyms: genksyms.o parse.tab.o lex.lex.o -include $(top_srcdir)/debian/build/Makefile.inc - -CFLAGS += -I$(VPATH) - -genksyms: genksyms.o parse.o lex.o - -lex.o: keywords.c parse.h +lex.lex.o: keywords.hash.c parse.tab.h %.c: %.c_shipped ln -s $< $@ @@ -21,4 +15,4 @@ lex.o: keywords.c parse.h ln -s $< $@ clean: - rm -f keywords.c parse.h + rm -f keywords.hash.c parse.tab.c parse.tab.h diff --git a/debian/build/scripts/kconfig/Makefile b/debian/build/scripts/kconfig/Makefile index 370db47ab..201ab58bb 100644 --- a/debian/build/scripts/kconfig/Makefile +++ b/debian/build/scripts/kconfig/Makefile @@ -2,17 +2,11 @@ PROGS = conf OUTDIR = scripts/kconfig -top_srcdir = ../.. - -VPATH = $(top_srcdir)/$(OUTDIR) - -include $(top_srcdir)/debian/build/Makefile.inc - -CFLAGS += -I$(VPATH) +include ../../Makefile.inc conf: conf.o zconf.tab.o -zconf.tab.c: zconf.hash.c lex.zconf.c +zconf.tab.c: zconf.hash.c zconf.lex.c %.c: %.c_shipped ln -sf $< $@ @@ -21,4 +15,4 @@ zconf.tab.c: zconf.hash.c lex.zconf.c ln -sf $< $@ clean: - rm -f zconf.tab.c zconf.hash.c lex.zconf.c + rm -f zconf.tab.c zconf.hash.c zconf.lex.c diff --git a/debian/build/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile index 5cb67d4a8..fe5e90bb5 100644 --- a/debian/build/scripts/mod/Makefile +++ b/debian/build/scripts/mod/Makefile @@ -7,9 +7,7 @@ PROGS = \ OUTDIR = scripts/mod -top_srcdir = ../.. - -include $(top_srcdir)/debian/build/Makefile.inc +include ../../Makefile.inc modpost.real-%: $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod From 1c3586990924e47905a622f146f33d6776629cd6 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 13 Sep 2011 15:02:49 +0000 Subject: [PATCH 168/487] debian/changelog: Set version to 3.1.0~rc6-1. svn path=/dists/trunk/linux-tools/; revision=18087 --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a7d6e5df3..7f57d93d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -linux-tools (3.0.0-3) UNRELEASED; urgency=low +linux-tools (3.1.0~rc6-1) UNRELEASED; urgency=low + * New upstream release candidate * Rename to linux-tools. * Use 3.0 (quilt) source format. * Properly patch modpost symbol prefix setting. + * Build linux-tools binary package. -- Bastian Blank Sun, 31 Jul 2011 12:36:15 +0200 From 45f0fbef18856ccfaf14f24d536d5e01b3f491ad Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Tue, 13 Sep 2011 15:10:56 +0000 Subject: [PATCH 169/487] debian/build/tools: Add Makefiles. svn path=/dists/trunk/linux-tools/; revision=18088 --- debian/build/tools/Makefile | 4 ++++ debian/build/tools/perf/Makefile | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 debian/build/tools/Makefile create mode 100644 debian/build/tools/perf/Makefile diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile new file mode 100644 index 000000000..561fc1f61 --- /dev/null +++ b/debian/build/tools/Makefile @@ -0,0 +1,4 @@ +SUBDIRS = \ + perf + +include ../Makefile.inc diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile new file mode 100644 index 000000000..fc5dfe53b --- /dev/null +++ b/debian/build/tools/perf/Makefile @@ -0,0 +1,10 @@ +OUTDIR = tools/perf + +include ../../Makefile.inc + +all: + -mkdir out + make -C $(top_srcdir)/tools/perf O=$(CURDIR)/out + +clean: + rm -rf out From e94a213f938f1fb7a1c149df9ef5d54a95ca9d40 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 22 Sep 2011 12:59:49 +0000 Subject: [PATCH 170/487] debian/bin/genorig.py: Support globs to copy files. svn path=/dists/trunk/linux-tools/; revision=18112 --- debian/bin/genorig.py | 77 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 16 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 0ec20c025..5bcd0b6f0 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -11,6 +11,41 @@ import subprocess from debian_linux.debian import Changelog, VersionLinux + +class FileGlob(object): + def __init__(self, root): + self.root = root or os.curdir + + def __call__(self, pathname): + dirname, basename = os.path.split(pathname) + if dirname: + dirs = self(dirname) + else: + dirs = ('', ) + for d in dirs: + if basename: + for name in self.glob(d, basename): + yield os.path.join(d, name) + elif self.isdir(d): + yield os.path.join(d, '') + + def glob(self, dirname, pattern): + import fnmatch + try: + names = self.listdir(dirname) + except os.error: + return () + if pattern[0] != '.': + names = filter(lambda x: x[0] != '.', names) + return fnmatch.filter(names, pattern) + + def isdir(self, dirname): + return os.path.isdir(os.path.join(self.root, dirname)) + + def listdir(self, dirname): + return os.listdir(os.path.join(self.root, dirname)) + + class Main(object): def __init__(self, input_files, override_version, override_tag): self.log = sys.stdout.write @@ -100,22 +135,32 @@ class Main(object): self.log("Generate orig\n") orig = os.path.join(self.dir, self.orig) temp = os.path.join(self.dir, 'temp') - # TODO: move this informations somewhere else - os.mkdir(os.path.join(orig)) - for i in 'COPYING', 'Kbuild', 'Makefile': - shutil.copyfile(os.path.join(temp, i), os.path.join(orig, i)) - for i in 's390', 'x86': - os.makedirs(os.path.join(orig, 'arch', i, 'include')) - shutil.copyfile(os.path.join(temp, 'arch', i, 'Makefile'), os.path.join(orig, 'arch', i, 'Makefile')) - shutil.copytree(os.path.join(temp, 'arch', i, 'include', 'asm'), os.path.join(orig, 'arch', i, 'include', 'asm')) - os.mkdir(os.path.join(orig, 'arch', 'x86', 'lib')) - shutil.copyfile(os.path.join(temp, 'arch', 'x86', 'lib', 'memcpy_64.S'), os.path.join(orig, 'arch', 'x86', 'lib', 'memcpy_64.S')) - os.mkdir(os.path.join(orig, 'include')) - shutil.copytree(os.path.join(temp, 'include', 'linux'), os.path.join(orig, 'include', 'linux')) - os.mkdir(os.path.join(orig, 'lib')) - shutil.copyfile(os.path.join(temp, 'lib', 'rbtree.c'), os.path.join(orig, 'lib', 'rbtree.c')) - shutil.copytree(os.path.join(temp, 'scripts'), os.path.join(orig, 'scripts')) - shutil.copytree(os.path.join(temp, 'tools'), os.path.join(orig, 'tools')) + + to_copy = ( + 'COPYING', + 'Kbuild', + 'Makefile', + 'arch/*/include/', + 'arch/*/Makefile', + 'arch/x86/lib/memcpy_64.S', + 'include/', + 'lib/rbtree.c', + 'scripts/', + 'tools/', + ) + + glob = FileGlob(temp) + for i in to_copy: + for j in glob(i): + temp_j = os.path.join(temp, j) + orig_j = os.path.join(orig, j) + if j.endswith('/'): + shutil.copytree(temp_j, orig_j) + else: + d = os.path.dirname(orig_j) + if not os.path.exists(d): + os.makedirs(d) + shutil.copyfile(temp_j, orig_j) def tar(self): out = os.path.join("../orig", self.orig_tar) From badbaf4943308a96a3292e8b69f6883b6d9081b6 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 11:50:12 +0000 Subject: [PATCH 171/487] debian/build/tools/perf/Makefile: Produce and check kernel arch. svn path=/dists/trunk/linux-tools/; revision=18127 --- debian/build/tools/perf/Makefile | 38 +++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index fc5dfe53b..d26acb00f 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -2,9 +2,45 @@ OUTDIR = tools/perf include ../../Makefile.inc +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) + +ifeq ($(DEB_HOST_ARCH_CPU),amd64) + KERNEL_ARCH_PERF = x86 +else ifeq ($(DEB_HOST_ARCH_CPU),arm) + KERNEL_ARCH_PERF = arm +else ifeq ($(DEB_HOST_ARCH_CPU),i386) + KERNEL_ARCH_PERF = x86 +else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) + KERNEL_ARCH_PERF = powerpc +else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) + KERNEL_ARCH_PERF = powerpc +else ifeq ($(DEB_HOST_ARCH_CPU),s390) + KERNEL_ARCH_PERF = s390 +else ifeq ($(DEB_HOST_ARCH_CPU),s390x) + KERNEL_ARCH_PERF = s390x +else ifeq ($(DEB_HOST_ARCH_CPU),sh4) + KERNEL_ARCH_PERF = sh +else ifeq ($(DEB_HOST_ARCH_CPU),sparc) + KERNEL_ARCH_PERF = sparc +else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) + KERNEL_ARCH_PERF = sparc +endif + +MAKE_PERF := $(MAKE) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error + +$(warning $(KERNEL_ARCH_PERF)) +$(warning $(DEB_HOST_ARCH_CPU)) + all: +ifdef KERNEL_ARCH_PERF -mkdir out - make -C $(top_srcdir)/tools/perf O=$(CURDIR)/out + +$(MAKE_PERF) +endif + +install: +ifdef KERNEL_ARCH_PERF + +$(MAKE_PERF) install install-man +endif clean: rm -rf out From 51d0620a116369bef320c89f859da4e4e752a456 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 12:53:12 +0000 Subject: [PATCH 172/487] debian/patches: Create manpages and binaries including the version. svn path=/dists/trunk/linux-tools/; revision=18128 --- debian/patches/series | 1 + debian/patches/tools-perf-version.patch | 44 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 debian/patches/tools-perf-version.patch diff --git a/debian/patches/series b/debian/patches/series index 2597269a7..91a9e4ed8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ modpost-symbol-prefix.patch +tools-perf-version.patch diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch new file mode 100644 index 000000000..adf4de428 --- /dev/null +++ b/debian/patches/tools-perf-version.patch @@ -0,0 +1,44 @@ +--- a/tools/perf/Makefile ++++ b/tools/perf/Makefile +@@ -859,7 +859,7 @@ + + install: all + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' +- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' ++ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' +@@ -879,7 +879,7 @@ + $(MAKE) -C Documentation install + + install-man: +- $(MAKE) -C Documentation install-man ++ $(MAKE) -C Documentation install-man VERSION=$(VERSION) + + install-html: + $(MAKE) -C Documentation install-html +--- a/tools/perf/Documentation/Makefile ++++ b/tools/perf/Documentation/Makefile +@@ -156,13 +156,15 @@ + + install: install-man + +-install-man: man ++install-man: $(addprefix install-man-,$(DOC_MAN1)) ++ ++install-man-perf.1: perf.1 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ ++install-man-perf%.1: perf%.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) +- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) +-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) +-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) ++ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 + + install-info: info + $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) From 99bca1cff038e748aec2a686c698a1f0aaa43b3b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 12:53:49 +0000 Subject: [PATCH 173/487] debian/build/tools/perf/Makefile: Add version to sub-make. svn path=/dists/trunk/linux-tools/; revision=18129 --- debian/build/tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index d26acb00f..3a5c8cb31 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -34,12 +34,12 @@ $(warning $(DEB_HOST_ARCH_CPU)) all: ifdef KERNEL_ARCH_PERF -mkdir out - +$(MAKE_PERF) + +$(MAKE_PERF) all man VERSION=$(VERSION) endif install: ifdef KERNEL_ARCH_PERF - +$(MAKE_PERF) install install-man + +$(MAKE_PERF) install install-man VERSION=$(VERSION) endif clean: From e2cfe08ec0e85647f3b3874abf0a64ba74080709 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 12:54:18 +0000 Subject: [PATCH 174/487] debian/templates/control.source.in: Add missing build-deps. svn path=/dists/trunk/linux-tools/; revision=18130 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 91fcc41c5..1ff4c1ed4 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,4 +6,4 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.1 Build-Depends: debhelper (>> 7), python, - binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev + asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto From 91b00be8be35104f6f73c2ea9d006003c1f93c5f Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 12:54:45 +0000 Subject: [PATCH 175/487] debian/templates/control.main.in: Restrict linux-kbuild to linux-any. svn path=/dists/trunk/linux-tools/; revision=18131 --- debian/templates/control.main.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 80fbdae32..158bdf4c6 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,5 +1,5 @@ Package: linux-kbuild-@version@ -Architecture: any +Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From 53efc1e6c4484905a09578011f294a293b1075e6 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 13:22:17 +0000 Subject: [PATCH 176/487] debian/build/tools/perf/Makefile - Workaround file-overwrite in documentation makefile. - Remove debugging output. svn path=/dists/trunk/linux-tools/; revision=18132 --- debian/build/tools/perf/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 3a5c8cb31..38fa2f43e 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -26,7 +26,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -MAKE_PERF := $(MAKE) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error $(warning $(KERNEL_ARCH_PERF)) $(warning $(DEB_HOST_ARCH_CPU)) @@ -34,13 +34,17 @@ $(warning $(DEB_HOST_ARCH_CPU)) all: ifdef KERNEL_ARCH_PERF -mkdir out - +$(MAKE_PERF) all man VERSION=$(VERSION) + # upstream makefile is broken + cp -al $(top_srcdir)/tools/perf/Documentation doc + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out all VERSION=$(VERSION) + +$(MAKE_PERF) -C doc man VERSION=$(VERSION) endif install: ifdef KERNEL_ARCH_PERF - +$(MAKE_PERF) install install-man VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out install VERSION=$(VERSION) + +$(MAKE_PERF) -C doc install-man VERSION=$(VERSION) endif clean: - rm -rf out + rm -rf doc out From e9b13d76bcea5794b865d5aa5ccf5d293d20c6a8 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 26 Sep 2011 13:23:11 +0000 Subject: [PATCH 177/487] debian/rules.real: Build linux-tools package svn path=/dists/trunk/linux-tools/; revision=18133 --- debian/rules.real | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index b5fdc9adc..45eb8f390 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -2,9 +2,11 @@ export DH_OPTIONS include debian/rules.defs +DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) + binary-arch: install-kbuild -ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 sh4 sparc sparc64,$(ARCH)),) - binary-arch-arch: install-tools_$(ARCH) +ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) + binary-arch: install-tools endif build: $(STAMPS_DIR)/build @@ -21,7 +23,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(BUILD_DIR) install prefix=$(DIR) top_srcdir=$(CURDIR) + $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs @@ -34,3 +36,24 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb +install-tools: PACKAGE_NAME = linux-tools-$(VERSION) +install-tools: DH_OPTIONS = -p$(PACKAGE_NAME) +install-tools: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-tools: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_clean -k -d + $(MAKE) -C $(BUILD_DIR)/tools install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ + dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + From 93d7cd4b8c0c74f1b6263573757ca88cec5ae87a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 7 Oct 2011 20:20:47 +0000 Subject: [PATCH 178/487] debian/bin/genorig.py: Check both return values of git export. svn path=/dists/trunk/linux-tools/; revision=18159 --- debian/bin/genorig.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 5bcd0b6f0..d00dbd361 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -94,8 +94,10 @@ class Main(object): extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir, stdin=archive_proc.stdout) - if extract_proc.wait(): - raise RuntimeError("Can't extract tarball") + ret1 = archive_proc.wait() + ret2 = extract_proc.wait() + if ret1 or ret2: + raise RuntimeError("Can't create archive") def upstream_extract(self, input_tar): self.log("Extracting tarball %s\n" % input_tar) From ae16437eb6811c8cfe78a6ea08f0c1e9c4069afa Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 7 Oct 2011 20:31:19 +0000 Subject: [PATCH 179/487] debian/bin/genorig.py: Create symlink to tar in "..". svn path=/dists/trunk/linux-tools/; revision=18160 --- debian/bin/genorig.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index d00dbd361..0bb17e417 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -182,9 +182,11 @@ class Main(object): except: try: os.unlink(out) - except OSError: - pass + except OSError: pass raise + try: + os.symlink(os.path.join('orig', self.orig_tar), os.path.join('..', self.orig_tar)) + except OSError: pass if __name__ == '__main__': from optparse import OptionParser From 1f1148f3b4e47cfaef7f8900128dc74109ebd12b Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 7 Oct 2011 20:37:08 +0000 Subject: [PATCH 180/487] debian/changelog: Set version to 3.1.0~rc9-1. svn path=/dists/trunk/linux-tools/; revision=18161 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7f57d93d9..5763d6b38 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.1.0~rc6-1) UNRELEASED; urgency=low +linux-tools (3.1.0~rc9-1) UNRELEASED; urgency=low * New upstream release candidate * Rename to linux-tools. From 268761383b0dd3f2355cfcea2bf30be8cc7e8e67 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 7 Oct 2011 20:37:52 +0000 Subject: [PATCH 181/487] * debian/patches/series: Add new patch. * debian/patches/tools-perf-install.patch: Install perf scripts non-executable. svn path=/dists/trunk/linux-tools/; revision=18162 --- debian/patches/series | 1 + debian/patches/tools-perf-install.patch | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 debian/patches/tools-perf-install.patch diff --git a/debian/patches/series b/debian/patches/series index 91a9e4ed8..fd1f7d4cc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ modpost-symbol-prefix.patch tools-perf-version.patch +tools-perf-install.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch new file mode 100644 index 000000000..dc34577f3 --- /dev/null +++ b/debian/patches/tools-perf-install.patch @@ -0,0 +1,20 @@ +--- a/tools/perf/Makefile ++++ b/tools/perf/Makefile +@@ -863,13 +863,13 @@ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' +- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' +- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' ++ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' ++ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' + $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' +- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' +- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' ++ $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' ++ $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' + $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + + install-python_ext: From dd86c5ae34bde6cff7939354fd7c8ee3176f0893 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Fri, 7 Oct 2011 20:42:00 +0000 Subject: [PATCH 182/487] debian/templates/control.source.in: Update Standards-Version. svn path=/dists/trunk/linux-tools/; revision=18163 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 1ff4c1ed4..113cf6698 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto From 2e414e50f9540eb49b7a696be00a280c25c25a60 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 27 Oct 2011 20:49:19 +0000 Subject: [PATCH 183/487] debian/build/tools/perf/Makefile: Remove debugging output. svn path=/dists/trunk/linux-tools/; revision=18182 --- debian/build/tools/perf/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 38fa2f43e..f46a154c4 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -28,9 +28,6 @@ endif MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error -$(warning $(KERNEL_ARCH_PERF)) -$(warning $(DEB_HOST_ARCH_CPU)) - all: ifdef KERNEL_ARCH_PERF -mkdir out From babee13047d635dd619d600f26caef71afb9833d Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 27 Oct 2011 20:57:53 +0000 Subject: [PATCH 184/487] debian/lib/python/debian_linux/debian.py: Allow new versioning schema. svn path=/dists/trunk/linux-tools/; revision=18183 --- debian/lib/python/debian_linux/debian.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index dd199fab3..a949c90cd 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -94,10 +94,10 @@ class VersionLinux(Version): _version_linux_rules = ur""" ^ (?P - \d+\.\d+\.\d+ + \d+\.\d+ ) (?: - (\.\d+) + \.\d+ | ~ (?P From fbd9ff49952facdd56d0836eccba9bbc882ed014 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 27 Oct 2011 20:58:14 +0000 Subject: [PATCH 185/487] debian/changelog: Set version to 3.1-1~experimental.1. svn path=/dists/trunk/linux-tools/; revision=18184 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5763d6b38..24dd161bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -linux-tools (3.1.0~rc9-1) UNRELEASED; urgency=low +linux-tools (3.1-1~experimental.1) UNRELEASED; urgency=low - * New upstream release candidate + * New upstream version. * Rename to linux-tools. * Use 3.0 (quilt) source format. * Properly patch modpost symbol prefix setting. From 4c20a659c175b480b7c4d23b9e967e78e2ff5d21 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 3 Nov 2011 14:40:57 +0000 Subject: [PATCH 186/487] debian/changelog: Prepare to release (3.1-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=18229 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 24dd161bd..084f7f211 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.1-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.1-1~experimental.1) unstable; urgency=low * New upstream version. * Rename to linux-tools. @@ -6,7 +6,7 @@ linux-tools (3.1-1~experimental.1) UNRELEASED; urgency=low * Properly patch modpost symbol prefix setting. * Build linux-tools binary package. - -- Bastian Blank Sun, 31 Jul 2011 12:36:15 +0200 + -- Bastian Blank Thu, 03 Nov 2011 15:39:32 +0100 linux-kbuild-2.6 (3.0.0-2) unstable; urgency=low From 858074eb2bff66617dc85ec58cf62a8e9ef7881d Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 3 Nov 2011 14:41:18 +0000 Subject: [PATCH 187/487] debian/changelog: Set correct distribution. svn path=/dists/trunk/linux-tools/; revision=18230 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 084f7f211..705802705 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.1-1~experimental.1) unstable; urgency=low +linux-tools (3.1-1~experimental.1) experimental; urgency=low * New upstream version. * Rename to linux-tools. From 2d0e3ca8c9621f2c9cc5ae41cc449e8ac073df12 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 12 Nov 2011 05:06:21 +0000 Subject: [PATCH 188/487] Update to 3.1.1 svn path=/dists/trunk/linux-tools/; revision=18248 --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 705802705..810ac5b8f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ -linux-tools (3.1-1~experimental.1) experimental; urgency=low +linux-tools (3.1.1-1) UNRELEASED; urgency=low - * New upstream version. + * New upstream release + + [ Bastian Blank ] * Rename to linux-tools. * Use 3.0 (quilt) source format. * Properly patch modpost symbol prefix setting. From 197c9e07021079444a61ce118ba21f7ce41eeb4b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Nov 2011 05:14:15 +0000 Subject: [PATCH 189/487] Prepare to release linux-tools (3.1.1-1). svn path=/dists/trunk/linux-tools/; revision=18274 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 810ac5b8f..f2522d929 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.1.1-1) UNRELEASED; urgency=low +linux-tools (3.1.1-1) unstable; urgency=low * New upstream release @@ -8,7 +8,7 @@ linux-tools (3.1.1-1) UNRELEASED; urgency=low * Properly patch modpost symbol prefix setting. * Build linux-tools binary package. - -- Bastian Blank Thu, 03 Nov 2011 15:39:32 +0100 + -- Ben Hutchings Mon, 14 Nov 2011 04:57:47 +0000 linux-kbuild-2.6 (3.0.0-2) unstable; urgency=low From 0074a87e33920e357888e44559a30291234ee50a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Nov 2011 05:52:11 +0000 Subject: [PATCH 190/487] Bump recommended version of linux-base to 3.4 to get fixed perf wrapper In earlier versions of linux-base, the perf wrapper will call the wrong command e.g. perf_3.1.0 instead of perf_3.1. svn path=/dists/trunk/linux-tools/; revision=18279 --- debian/templates/control.main.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 158bdf4c6..c59263116 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-tools-@version@ Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} -Recommends: linux-base (>= 2.6.32-16) +Recommends: linux-base (>= 3.4) Suggests: linux-doc-@version@ Description: Performance analysis tools for Linux @upstreamversion@ This package contains the 'perf' performance analysis tools for Linux From 679a4bb14f7a238c57bdff3d19c8109f18451569 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Nov 2011 03:17:16 +0000 Subject: [PATCH 191/487] Change the check for stale debian/control to tolerate binNMUs (Closes: #649005) svn path=/dists/sid/linux-tools/; revision=18290 --- debian/changelog | 7 +++++++ debian/rules | 16 +++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index f2522d929..c2a85d4b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.1.1-2) UNRELEASED; urgency=low + + * Change the check for stale debian/control to tolerate binNMUs + (Closes: #649005) + + -- Ben Hutchings Thu, 17 Nov 2011 03:07:31 +0000 + linux-tools (3.1.1-1) unstable; urgency=low * New upstream release diff --git a/debian/rules b/debian/rules index d201eff61..28304f75f 100755 --- a/debian/rules +++ b/debian/rules @@ -55,13 +55,15 @@ binary: binary-indep binary-arch CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*) debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES) - +if [ -f debian/control.md5sum ]; then \ - if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \ - $(MAKE) -f debian/rules debian/control-real; \ - fi \ - else \ - $(MAKE) -f debian/rules debian/control-real; \ - fi +ifeq ($(wildcard debian/control.md5sum),) + $(MAKE) -f debian/rules debian/control-real +else ifeq ($(VERSION_DEBIAN_BINNMU),) + md5sum --check debian/control.md5sum --status || \ + $(MAKE) -f debian/rules debian/control-real +else + grep -v debian/changelog debian/control.md5sum | md5sum --check - --status || \ + $(MAKE) -f debian/rules debian/control-real +endif debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES) chmod +x $< From 7a1642ecbf1683c44e60aff0cf26f6fe3c428cf8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Nov 2011 03:36:14 +0000 Subject: [PATCH 192/487] Prepare to release inux-tools (3.1.1-2). To be rebuilt with perl 5.14 (Closes: #649006) svn path=/dists/sid/linux-tools/; revision=18291 --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c2a85d4b9..51ddd856f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ -linux-tools (3.1.1-2) UNRELEASED; urgency=low +linux-tools (3.1.1-2) unstable; urgency=low * Change the check for stale debian/control to tolerate binNMUs (Closes: #649005) + * Rebuild with perl 5.14 (Closes: #649006) - -- Ben Hutchings Thu, 17 Nov 2011 03:07:31 +0000 + -- Ben Hutchings Thu, 17 Nov 2011 03:18:03 +0000 linux-tools (3.1.1-1) unstable; urgency=low From 788702d28f4bbc92e2e7357eed217d5a07c82eb7 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 19 Nov 2011 18:55:14 +0000 Subject: [PATCH 193/487] * Fix s390x support. svn path=/dists/sid/linux-tools/; revision=18297 --- debian/build/tools/perf/Makefile | 2 +- debian/changelog | 6 ++++++ debian/rules.real | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index f46a154c4..ec91e9b92 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -17,7 +17,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) else ifeq ($(DEB_HOST_ARCH_CPU),s390) KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),s390x) - KERNEL_ARCH_PERF = s390x + KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),sh4) KERNEL_ARCH_PERF = sh else ifeq ($(DEB_HOST_ARCH_CPU),sparc) diff --git a/debian/changelog b/debian/changelog index 51ddd856f..eb640b2b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.1.1-3) UNRELEASED; urgency=low + + * Fix s390x support. + + -- Aurelien Jarno Fri, 18 Nov 2011 17:26:51 +0100 + linux-tools (3.1.1-2) unstable; urgency=low * Change the check for stale debian/control to tolerate binNMUs diff --git a/debian/rules.real b/debian/rules.real index 45eb8f390..17eec6acb 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -5,7 +5,7 @@ include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) binary-arch: install-kbuild -ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif From f2f83e602c5afa8b2626c20f38cdd1cd5abd5857 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 7 Dec 2011 01:53:57 +0000 Subject: [PATCH 194/487] Prepare to release linux-tools (3.2~rc4-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=18360 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f2522d929..68d0b3a79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.2~rc4-1~experimental.1) experimental; urgency=low + + * New upstream release candidate + + -- Ben Hutchings Wed, 07 Dec 2011 01:53:15 +0000 + linux-tools (3.1.1-1) unstable; urgency=low * New upstream release From b209b7c71b28b16e67344cd7d9ddf8d32c2b5cc9 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sun, 18 Dec 2011 20:34:37 +0000 Subject: [PATCH 195/487] Prepare to release linux-tools (3.1.1-3). svn path=/dists/sid/linux-tools/; revision=18396 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index eb640b2b0..13c9cc846 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.1.1-3) UNRELEASED; urgency=low +linux-tools (3.1.1-3) unstable; urgency=low * Fix s390x support. - -- Aurelien Jarno Fri, 18 Nov 2011 17:26:51 +0100 + -- Aurelien Jarno Sun, 18 Dec 2011 19:32:12 +0100 linux-tools (3.1.1-2) unstable; urgency=low From dfa23d84403ea9f770e8e57fe34ade55639103e1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 19 Jan 2012 04:38:15 +0000 Subject: [PATCH 196/487] Update to 3.2.1 svn path=/dists/trunk/linux-tools/; revision=18585 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 68d0b3a79..20a653e93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.2.1-1) unstable; urgency=low + + * New upstream release + + -- Ben Hutchings Thu, 19 Jan 2012 04:17:19 +0000 + linux-tools (3.2~rc4-1~experimental.1) experimental; urgency=low * New upstream release candidate From 08e15ab4235484f32a1815f2a7b98dad33bf0966 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 19 Jan 2012 14:14:23 +0000 Subject: [PATCH 197/487] Add Vcs-{Svn,Browser} fields svn path=/dists/trunk/linux-tools/; revision=18597 --- debian/changelog | 6 ++++++ debian/templates/control.source.in | 2 ++ 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 20a653e93..1289c002b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.2.1-2) UNRELEASED; urgency=low + + * Add Vcs-{Svn,Browser} fields + + -- Ben Hutchings Thu, 19 Jan 2012 14:13:27 +0000 + linux-tools (3.2.1-1) unstable; urgency=low * New upstream release diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 113cf6698..82fa837fd 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,3 +7,5 @@ Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto +Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ +Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 49a19ef5934972e0df56d1cf3afd5394bf1e9afd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 22 Jan 2012 23:49:56 +0000 Subject: [PATCH 198/487] Reduce minimum version of linux-base to 3.4~ to support backports svn path=/dists/trunk/linux-tools/; revision=18601 --- debian/changelog | 1 + debian/templates/control.main.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1289c002b..11d03a7bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.2.1-2) UNRELEASED; urgency=low * Add Vcs-{Svn,Browser} fields + * Reduce minimum version of linux-base to 3.4~ to support backports -- Ben Hutchings Thu, 19 Jan 2012 14:13:27 +0000 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index c59263116..0a18f5b25 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-tools-@version@ Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} -Recommends: linux-base (>= 3.4) +Recommends: linux-base (>= 3.4~) Suggests: linux-doc-@version@ Description: Performance analysis tools for Linux @upstreamversion@ This package contains the 'perf' performance analysis tools for Linux From 0f467535ccdce958468d871d9f2026d48b454198 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 24 Jan 2012 04:27:26 +0000 Subject: [PATCH 199/487] Prepare to release linux-tools (3.2.1-2). svn path=/dists/trunk/linux-tools/; revision=18610 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0f7b889d6..12f637d98 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.2.1-2) UNRELEASED; urgency=low +linux-tools (3.2.1-2) unstable; urgency=low * Add Vcs-{Svn,Browser} fields * Reduce minimum version of linux-base to 3.4~ to support backports - -- Ben Hutchings Thu, 19 Jan 2012 14:13:27 +0000 + -- Ben Hutchings Tue, 24 Jan 2012 04:26:24 +0000 linux-tools (3.2.1-1) unstable; urgency=low From 911d35c2aefe6a7c1350ab21fc73fddc1e1b75ca Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 5 Mar 2012 03:50:37 +0000 Subject: [PATCH 200/487] Update to 3.2.7 svn path=/dists/sid/linux-tools/; revision=18795 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 12f637d98..5fd778318 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +linux-tools (3.2.7-1) unstable; urgency=low + + * New upstream stable update: + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.7 + - perf tools: Fix perf stack to non executable on x86_64 + - perf evsel: Fix an issue where perf report fails to show the proper + percentage + + -- Ben Hutchings Mon, 05 Mar 2012 00:19:02 +0000 + linux-tools (3.2.1-2) unstable; urgency=low * Add Vcs-{Svn,Browser} fields From b8e53f54a20c763cccdef1ce274926e1816d73a8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 11 Mar 2012 03:27:44 +0000 Subject: [PATCH 201/487] Update to 3.3-rc7 svn path=/dists/trunk/linux-tools/; revision=18807 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5fd778318..7f1230178 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.3~rc7-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release candidate + + -- Ben Hutchings Sun, 11 Mar 2012 02:08:45 +0000 + linux-tools (3.2.7-1) unstable; urgency=low * New upstream stable update: From 62a142135ae61fec3836d913eb9621ba2e103bba Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 11 Mar 2012 03:38:16 +0000 Subject: [PATCH 202/487] linux-kbuild: debian/control: Set Multi-Arch: foreign svn path=/dists/trunk/linux-tools/; revision=18808 --- debian/changelog | 1 + debian/rules.real | 6 ++++++ debian/templates/control.main.in | 1 + 3 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7f1230178..af16d163b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.3~rc7-1~experimental.1) UNRELEASED; urgency=low * New upstream release candidate + * linux-kbuild: debian/control: Set Multi-Arch: foreign -- Ben Hutchings Sun, 11 Mar 2012 02:08:45 +0000 diff --git a/debian/rules.real b/debian/rules.real index 17eec6acb..5cb4e7e2a 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,6 +3,7 @@ export DH_OPTIONS include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +HAVE_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) binary-arch: install-kbuild ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) @@ -23,6 +24,11 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d +ifneq (,$(HAVE_MULTIARCH)) + echo linux-kbuild:Multi-Arch=foreign >>debian/$(PACKAGE_NAME).substvars +else + echo linux-kbuild:Multi-Arch= >>debian/$(PACKAGE_NAME).substvars +endif $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 0a18f5b25..01288d8c4 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,6 +1,7 @@ Package: linux-kbuild-@version@ Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: ${linux-kbuild:Multi-Arch} Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From a4037ce51ea452b8d59debfcf1ef70706e5ae69d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 20 Mar 2012 05:03:49 +0000 Subject: [PATCH 203/487] Apply upstream changes to fix various buffer overflow bugs svn path=/dists/sid/linux-tools/; revision=18864 --- debian/changelog | 8 + ...rect-use-of-snprintf-results-in-segv.patch | 64 +++++ ...tools-use-scnprintf-where-applicable.patch | 267 ++++++++++++++++++ debian/patches/series | 2 + 4 files changed, 341 insertions(+) create mode 100644 debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch create mode 100644 debian/patches/perf-tools-use-scnprintf-where-applicable.patch diff --git a/debian/changelog b/debian/changelog index 5fd778318..2bd4a00b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux-tools (3.2.7-2) unstable; urgency=high + + * Apply upstream changes to fix various buffer overflow bugs: + - perf tools: Use scnprintf where applicable + - perf tools: Incorrect use of snprintf results in SEGV + + -- Ben Hutchings Tue, 20 Mar 2012 04:54:22 +0000 + linux-tools (3.2.7-1) unstable; urgency=low * New upstream stable update: diff --git a/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch b/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch new file mode 100644 index 000000000..ed0930f9b --- /dev/null +++ b/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch @@ -0,0 +1,64 @@ +From b832796caa1fda8516464a003c8c7cc547bc20c2 Mon Sep 17 00:00:00 2001 +From: Anton Blanchard +Date: Wed, 7 Mar 2012 11:42:49 +1100 +Subject: perf tools: Incorrect use of snprintf results in SEGV + +From: Anton Blanchard + +commit b832796caa1fda8516464a003c8c7cc547bc20c2 upstream. + +I have a workload where perf top scribbles over the stack and we SEGV. +What makes it interesting is that an snprintf is causing this. + +The workload is a c++ gem that has method names over 3000 characters +long, but snprintf is designed to avoid overrunning buffers. So what +went wrong? + +The problem is we assume snprintf returns the number of characters +written: + + ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level); +... + ret += repsep_snprintf(bf + ret, size - ret, "%s", self->ms.sym->name); + +Unfortunately this is not how snprintf works. snprintf returns the +number of characters that would have been written if there was enough +space. In the above case, if the first snprintf returns a value larger +than size, we pass a negative size into the second snprintf and happily +scribble over the stack. If you have 3000 character c++ methods thats a +lot of stack to trample. + +This patch fixes repsep_snprintf by clamping the value at size - 1 which +is the maximum snprintf can write before adding the NULL terminator. + +I get the sinking feeling that there are a lot of other uses of snprintf +that have this same bug, we should audit them all. + +Cc: David Ahern +Cc: Eric B Munson +Cc: Frederic Weisbecker +Cc: Ingo Molnar +Cc: Paul Mackerras +Cc: Peter Zijlstra +Cc: Yanmin Zhang +Link: http://lkml.kernel.org/r/20120307114249.44275ca3@kryten +Signed-off-by: Anton Blanchard +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + tools/perf/util/sort.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/tools/perf/util/sort.c ++++ b/tools/perf/util/sort.c +@@ -33,6 +33,9 @@ static int repsep_snprintf(char *bf, siz + } + } + va_end(ap); ++ ++ if (n >= (int)size) ++ return size - 1; + return n; + } + diff --git a/debian/patches/perf-tools-use-scnprintf-where-applicable.patch b/debian/patches/perf-tools-use-scnprintf-where-applicable.patch new file mode 100644 index 000000000..b610e4f77 --- /dev/null +++ b/debian/patches/perf-tools-use-scnprintf-where-applicable.patch @@ -0,0 +1,267 @@ +From e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0 Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Wed, 14 Mar 2012 12:29:29 -0300 +Subject: perf tools: Use scnprintf where applicable + +From: Arnaldo Carvalho de Melo + +commit e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0 upstream. + +Several places were expecting that the value returned was the number of +characters printed, not what would be printed if there was space. + +Fix it by using the scnprintf and vscnprintf variants we inherited from +the kernel sources. + +Some corner cases where the number of printed characters were not +accounted were fixed too. + +Reported-by: Anton Blanchard +Cc: Anton Blanchard +Cc: Eric B Munson +Cc: David Ahern +Cc: Frederic Weisbecker +Cc: Mike Galbraith +Cc: Paul Mackerras +Cc: Peter Zijlstra +Cc: Stephane Eranian +Cc: Yanmin Zhang +Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman + +--- + tools/perf/arch/powerpc/util/header.c | 2 +- + tools/perf/arch/x86/util/header.c | 2 +- + tools/perf/util/color.c | 9 +++++---- + tools/perf/util/header.c | 4 ++-- + tools/perf/util/hist.c | 30 +++++++++++++++--------------- + tools/perf/util/strbuf.c | 7 ++++--- + tools/perf/util/ui/browsers/hists.c | 12 ++++++------ + tools/perf/util/ui/helpline.c | 2 +- + 8 files changed, 35 insertions(+), 33 deletions(-) + +--- a/tools/perf/arch/powerpc/util/header.c ++++ b/tools/perf/arch/powerpc/util/header.c +@@ -25,7 +25,7 @@ get_cpuid(char *buffer, size_t sz) + + pvr = mfspr(SPRN_PVR); + +- nb = snprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); ++ nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); + + /* look for end marker to ensure the entire data fit */ + if (strchr(buffer, '$')) { +--- a/tools/perf/arch/x86/util/header.c ++++ b/tools/perf/arch/x86/util/header.c +@@ -48,7 +48,7 @@ get_cpuid(char *buffer, size_t sz) + if (family >= 0x6) + model += ((a >> 16) & 0xf) << 4; + } +- nb = snprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); ++ nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); + + /* look for end marker to ensure the entire data fit */ + if (strchr(buffer, '$')) { +--- a/tools/perf/util/color.c ++++ b/tools/perf/util/color.c +@@ -1,3 +1,4 @@ ++#include + #include "cache.h" + #include "color.h" + +@@ -182,12 +183,12 @@ static int __color_vsnprintf(char *bf, s + } + + if (perf_use_color_default && *color) +- r += snprintf(bf, size, "%s", color); +- r += vsnprintf(bf + r, size - r, fmt, args); ++ r += scnprintf(bf, size, "%s", color); ++ r += vscnprintf(bf + r, size - r, fmt, args); + if (perf_use_color_default && *color) +- r += snprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); ++ r += scnprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); + if (trail) +- r += snprintf(bf + r, size - r, "%s", trail); ++ r += scnprintf(bf + r, size - r, "%s", trail); + return r; + } + +--- a/tools/perf/util/header.c ++++ b/tools/perf/util/header.c +@@ -1227,7 +1227,7 @@ int build_id_cache__add_s(const char *sb + if (realname == NULL || filename == NULL || linkname == NULL) + goto out_free; + +- len = snprintf(filename, size, "%s%s%s", ++ len = scnprintf(filename, size, "%s%s%s", + debugdir, is_kallsyms ? "/" : "", realname); + if (mkdir_p(filename, 0755)) + goto out_free; +@@ -1242,7 +1242,7 @@ int build_id_cache__add_s(const char *sb + goto out_free; + } + +- len = snprintf(linkname, size, "%s/.build-id/%.2s", ++ len = scnprintf(linkname, size, "%s/.build-id/%.2s", + debugdir, sbuild_id); + + if (access(linkname, X_OK) && mkdir_p(linkname, 0755)) +--- a/tools/perf/util/hist.c ++++ b/tools/perf/util/hist.c +@@ -767,7 +767,7 @@ static int hist_entry__pcnt_snprintf(str + sep ? "%.2f" : " %6.2f%%", + (period * 100.0) / total); + else +- ret = snprintf(s, size, sep ? "%.2f" : " %6.2f%%", ++ ret = scnprintf(s, size, sep ? "%.2f" : " %6.2f%%", + (period * 100.0) / total); + if (symbol_conf.show_cpu_utilization) { + ret += percent_color_snprintf(s + ret, size - ret, +@@ -790,20 +790,20 @@ static int hist_entry__pcnt_snprintf(str + } + } + } else +- ret = snprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period); ++ ret = scnprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period); + + if (symbol_conf.show_nr_samples) { + if (sep) +- ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); ++ ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); + else +- ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); ++ ret += scnprintf(s + ret, size - ret, "%11" PRIu64, nr_events); + } + + if (symbol_conf.show_total_period) { + if (sep) +- ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); ++ ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); + else +- ret += snprintf(s + ret, size - ret, " %12" PRIu64, period); ++ ret += scnprintf(s + ret, size - ret, " %12" PRIu64, period); + } + + if (pair_hists) { +@@ -818,25 +818,25 @@ static int hist_entry__pcnt_snprintf(str + diff = new_percent - old_percent; + + if (fabs(diff) >= 0.01) +- snprintf(bf, sizeof(bf), "%+4.2F%%", diff); ++ ret += scnprintf(bf, sizeof(bf), "%+4.2F%%", diff); + else +- snprintf(bf, sizeof(bf), " "); ++ ret += scnprintf(bf, sizeof(bf), " "); + + if (sep) +- ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); ++ ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf); + else +- ret += snprintf(s + ret, size - ret, "%11.11s", bf); ++ ret += scnprintf(s + ret, size - ret, "%11.11s", bf); + + if (show_displacement) { + if (displacement) +- snprintf(bf, sizeof(bf), "%+4ld", displacement); ++ ret += scnprintf(bf, sizeof(bf), "%+4ld", displacement); + else +- snprintf(bf, sizeof(bf), " "); ++ ret += scnprintf(bf, sizeof(bf), " "); + + if (sep) +- ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); ++ ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf); + else +- ret += snprintf(s + ret, size - ret, "%6.6s", bf); ++ ret += scnprintf(s + ret, size - ret, "%6.6s", bf); + } + } + +@@ -854,7 +854,7 @@ int hist_entry__snprintf(struct hist_ent + if (se->elide) + continue; + +- ret += snprintf(s + ret, size - ret, "%s", sep ?: " "); ++ ret += scnprintf(s + ret, size - ret, "%s", sep ?: " "); + ret += se->se_snprintf(he, s + ret, size - ret, + hists__col_len(hists, se->se_width_idx)); + } +--- a/tools/perf/util/strbuf.c ++++ b/tools/perf/util/strbuf.c +@@ -1,4 +1,5 @@ + #include "cache.h" ++#include + + int prefixcmp(const char *str, const char *prefix) + { +@@ -89,14 +90,14 @@ void strbuf_addf(struct strbuf *sb, cons + if (!strbuf_avail(sb)) + strbuf_grow(sb, 64); + va_start(ap, fmt); +- len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); ++ len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); + va_end(ap); + if (len < 0) +- die("your vsnprintf is broken"); ++ die("your vscnprintf is broken"); + if (len > strbuf_avail(sb)) { + strbuf_grow(sb, len); + va_start(ap, fmt); +- len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); ++ len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); + va_end(ap); + if (len > strbuf_avail(sb)) { + die("this should not happen, your snprintf is broken"); +--- a/tools/perf/util/ui/browsers/hists.c ++++ b/tools/perf/util/ui/browsers/hists.c +@@ -839,15 +839,15 @@ static int hists__browser_title(struct h + unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE]; + + nr_events = convert_unit(nr_events, &unit); +- printed = snprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name); ++ printed = scnprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name); + + if (thread) +- printed += snprintf(bf + printed, size - printed, ++ printed += scnprintf(bf + printed, size - printed, + ", Thread: %s(%d)", + (thread->comm_set ? thread->comm : ""), + thread->pid); + if (dso) +- printed += snprintf(bf + printed, size - printed, ++ printed += scnprintf(bf + printed, size - printed, + ", DSO: %s", dso->short_name); + return printed; + } +@@ -1097,7 +1097,7 @@ static void perf_evsel_menu__write(struc + HE_COLORSET_NORMAL); + + nr_events = convert_unit(nr_events, &unit); +- printed = snprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events, ++ printed = scnprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events, + unit, unit == ' ' ? "" : " ", ev_name); + slsmg_printf("%s", bf); + +@@ -1107,8 +1107,8 @@ static void perf_evsel_menu__write(struc + if (!current_entry) + ui_browser__set_color(browser, HE_COLORSET_TOP); + nr_events = convert_unit(nr_events, &unit); +- snprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!", nr_events, +- unit, unit == ' ' ? "" : " "); ++ printed += scnprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!", ++ nr_events, unit, unit == ' ' ? "" : " "); + warn = bf; + } + +--- a/tools/perf/util/ui/helpline.c ++++ b/tools/perf/util/ui/helpline.c +@@ -65,7 +65,7 @@ int ui_helpline__show_help(const char *f + static int backlog; + + pthread_mutex_lock(&ui__lock); +- ret = vsnprintf(ui_helpline__last_msg + backlog, ++ ret = vscnprintf(ui_helpline__last_msg + backlog, + sizeof(ui_helpline__last_msg) - backlog, format, ap); + backlog += ret; + diff --git a/debian/patches/series b/debian/patches/series index fd1f7d4cc..17b8cc3b3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,5 @@ +perf-tools-incorrect-use-of-snprintf-results-in-segv.patch +perf-tools-use-scnprintf-where-applicable.patch modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch From 0b28651979093598846bf7be87ba01367ef39805 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 21 Mar 2012 05:43:35 +0000 Subject: [PATCH 204/487] Update to 3.3 svn path=/dists/trunk/linux-tools/; revision=18876 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index af16d163b..671acd23c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.3~rc7-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.3-1~experimental.1) UNRELEASED; urgency=low * New upstream release candidate * linux-kbuild: debian/control: Set Multi-Arch: foreign From c19b71e6402e3ae6e02ba41da6ab028ece4f052c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 24 Mar 2012 23:15:55 +0000 Subject: [PATCH 205/487] linux-tools: Build perf on alpha and hppa (Closes: #664834) svn path=/dists/trunk/linux-tools/; revision=18884 --- debian/build/tools/perf/Makefile | 6 +++++- debian/changelog | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index ec91e9b92..916465d75 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -4,10 +4,14 @@ include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) -ifeq ($(DEB_HOST_ARCH_CPU),amd64) +ifeq ($(DEB_HOST_ARCH_CPU),alpha) + KERNEL_ARCH_PERF = alpha +else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86 else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm +else ifeq ($(DEB_HOST_ARCH_CPU),hppa) + KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = x86 else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) diff --git a/debian/changelog b/debian/changelog index 9445fba94..5e415a9c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (3.3-1~experimental.1) UNRELEASED; urgency=low * New upstream release candidate * linux-kbuild: debian/control: Set Multi-Arch: foreign + * linux-tools: Build perf on alpha and hppa (Closes: #664834) -- Ben Hutchings Sun, 11 Mar 2012 02:08:45 +0000 From 620deb801b94f993da0c7654c93a56f75027ab7b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 24 Mar 2012 23:51:19 +0000 Subject: [PATCH 206/487] Prepare to release linux-tools (3.3-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=18885 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5e415a9c2..104d98c4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -linux-tools (3.3-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.3-1~experimental.1) experimental; urgency=low * New upstream release candidate * linux-kbuild: debian/control: Set Multi-Arch: foreign * linux-tools: Build perf on alpha and hppa (Closes: #664834) - -- Ben Hutchings Sun, 11 Mar 2012 02:08:45 +0000 + -- Ben Hutchings Sat, 24 Mar 2012 23:15:59 +0000 linux-tools (3.2.7-2) unstable; urgency=high From 75c7c014a87f505dba4e9dd01c1170aebf1f0a7f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 18:39:12 +0000 Subject: [PATCH 207/487] Fix version insertion in perf man page cross-references svn path=/dists/trunk/linux-tools/; revision=19105 --- debian/patches/tools-perf-version.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index adf4de428..8d3ca11b0 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -29,7 +29,7 @@ + +install-man-perf.1: perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) -+ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + +install-man-perf%.1: perf%.1 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) @@ -38,7 +38,7 @@ - $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) -# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) -# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) -+ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 ++ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 install-info: info $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) From 7e4d726be6472bbbdcfb6c9b32ec9e7ee78aef7c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 18:54:23 +0000 Subject: [PATCH 208/487] Update to 3.4 Build-Depend on bison and flex, now required to build perf. Update tools-perf-version.patch for changes in man page output paths. svn path=/dists/trunk/linux-tools/; revision=19106 --- debian/changelog | 7 +++++++ debian/patches/tools-perf-version.patch | 12 ++++++------ debian/templates/control.source.in | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 104d98c4c..ef81c062d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.4-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release + * Build-Depend on bison and flex, now required to build perf + + -- Ben Hutchings Sat, 09 Jun 2012 19:13:54 +0100 + linux-tools (3.3-1~experimental.1) experimental; urgency=low * New upstream release candidate diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 8d3ca11b0..a523320c6 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -859,7 +859,7 @@ +@@ -939,7 +939,7 @@ install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' @@ -9,7 +9,7 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -879,7 +879,7 @@ +@@ -959,7 +959,7 @@ $(MAKE) -C Documentation install install-man: @@ -20,18 +20,18 @@ $(MAKE) -C Documentation install-html --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile -@@ -156,13 +156,15 @@ +@@ -170,13 +170,15 @@ install: install-man -install-man: man -+install-man: $(addprefix install-man-,$(DOC_MAN1)) ++install-man: $(addprefix install-man-,$(_DOC_MAN1)) + -+install-man-perf.1: perf.1 ++install-man-perf.1: $(OUTPUT)perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) + sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + -+install-man-perf%.1: perf%.1 ++install-man-perf%.1: $(OUTPUT)perf%.1 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) -# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) -# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 82fa837fd..93742de63 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,6 +6,6 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto + asciidoc, binutils-dev, bison, flex, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From ada20cc98f99ca02efeb4ebbc4052544bb20702c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 18:55:31 +0000 Subject: [PATCH 209/487] Note in changelog: Fix version insertion in perf man page cross-references svn path=/dists/trunk/linux-tools/; revision=19107 --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index ef81c062d..257505367 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (3.4-1~experimental.1) UNRELEASED; urgency=low * New upstream release * Build-Depend on bison and flex, now required to build perf + * Fix version insertion in perf man page cross-references -- Ben Hutchings Sat, 09 Jun 2012 19:13:54 +0100 From 8072f7dee95770b202db1a85929a15934228e1f8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 19:18:46 +0000 Subject: [PATCH 210/487] Fix version insertion in perf man page title svn path=/dists/trunk/linux-tools/; revision=19108 --- debian/patches/tools-perf-version.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index a523320c6..167654741 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -29,7 +29,7 @@ + +install-man-perf.1: $(OUTPUT)perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) -+ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + +install-man-perf%.1: $(OUTPUT)perf%.1 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) @@ -38,7 +38,7 @@ - $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) -# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) -# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) -+ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 ++ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 install-info: info $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) From 7134d05010799b49c592df2cb6487140e11896d4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 19:23:17 +0000 Subject: [PATCH 211/487] Fix version insertion in perf man pages svn path=/dists/sid/linux-tools/; revision=19110 --- debian/changelog | 6 ++++++ debian/patches/tools-perf-version.patch | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2bd4a00b8..d6fece2e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.2.7-3) UNRELEASED; urgency=low + + * Fix version insertion in perf man pages + + -- Ben Hutchings Sat, 09 Jun 2012 19:56:44 +0100 + linux-tools (3.2.7-2) unstable; urgency=high * Apply upstream changes to fix various buffer overflow bugs: diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index adf4de428..5f7bfc17b 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -29,7 +29,7 @@ + +install-man-perf.1: perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) -+ sed -e 's/"perf"/"perf_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + +install-man-perf%.1: perf%.1 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) @@ -38,7 +38,7 @@ - $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) -# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) -# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) -+ sed -e 's/"perf-/"perf_$(VERSION)-/' -e 's/fBperf-/fBperf_$(VERSION-)/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 ++ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 install-info: info $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) From 644824c2d85cf67c12868072d30e5b3f8cc48aff Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 9 Jun 2012 20:22:31 +0000 Subject: [PATCH 212/487] Prepare to release linux-tools (3.4-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=19111 --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 257505367..5d19cd688 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -linux-tools (3.4-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.4-1~experimental.1) experimental; urgency=low * New upstream release * Build-Depend on bison and flex, now required to build perf - * Fix version insertion in perf man page cross-references + * Fix version insertion in perf man pages - -- Ben Hutchings Sat, 09 Jun 2012 19:13:54 +0100 + -- Ben Hutchings Sat, 09 Jun 2012 20:51:12 +0100 linux-tools (3.3-1~experimental.1) experimental; urgency=low From 3292a49f348027f774252d96f6973192e914d816 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 20 Jun 2012 04:14:02 +0000 Subject: [PATCH 213/487] Update to 3.2.17 svn path=/dists/sid/linux-tools/; revision=19176 --- debian/changelog | 10 +- ...rect-use-of-snprintf-results-in-segv.patch | 64 ----- ...tools-use-scnprintf-where-applicable.patch | 267 ------------------ debian/patches/series | 2 - 4 files changed, 9 insertions(+), 334 deletions(-) delete mode 100644 debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch delete mode 100644 debian/patches/perf-tools-use-scnprintf-where-applicable.patch diff --git a/debian/changelog b/debian/changelog index d6fece2e3..8f1b0f5cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,12 @@ -linux-tools (3.2.7-3) UNRELEASED; urgency=low +linux-tools (3.2.17-1) UNRELEASED; urgency=low + + * New upstream stable updates: + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.15 + - modpost: fix ALL_INIT_DATA_SECTIONS + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.16 + - perf hists: Catch and handle out-of-date hist entry maps. + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.17 + - Perf: fix build breakage * Fix version insertion in perf man pages diff --git a/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch b/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch deleted file mode 100644 index ed0930f9b..000000000 --- a/debian/patches/perf-tools-incorrect-use-of-snprintf-results-in-segv.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b832796caa1fda8516464a003c8c7cc547bc20c2 Mon Sep 17 00:00:00 2001 -From: Anton Blanchard -Date: Wed, 7 Mar 2012 11:42:49 +1100 -Subject: perf tools: Incorrect use of snprintf results in SEGV - -From: Anton Blanchard - -commit b832796caa1fda8516464a003c8c7cc547bc20c2 upstream. - -I have a workload where perf top scribbles over the stack and we SEGV. -What makes it interesting is that an snprintf is causing this. - -The workload is a c++ gem that has method names over 3000 characters -long, but snprintf is designed to avoid overrunning buffers. So what -went wrong? - -The problem is we assume snprintf returns the number of characters -written: - - ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level); -... - ret += repsep_snprintf(bf + ret, size - ret, "%s", self->ms.sym->name); - -Unfortunately this is not how snprintf works. snprintf returns the -number of characters that would have been written if there was enough -space. In the above case, if the first snprintf returns a value larger -than size, we pass a negative size into the second snprintf and happily -scribble over the stack. If you have 3000 character c++ methods thats a -lot of stack to trample. - -This patch fixes repsep_snprintf by clamping the value at size - 1 which -is the maximum snprintf can write before adding the NULL terminator. - -I get the sinking feeling that there are a lot of other uses of snprintf -that have this same bug, we should audit them all. - -Cc: David Ahern -Cc: Eric B Munson -Cc: Frederic Weisbecker -Cc: Ingo Molnar -Cc: Paul Mackerras -Cc: Peter Zijlstra -Cc: Yanmin Zhang -Link: http://lkml.kernel.org/r/20120307114249.44275ca3@kryten -Signed-off-by: Anton Blanchard -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Greg Kroah-Hartman - ---- - tools/perf/util/sort.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/tools/perf/util/sort.c -+++ b/tools/perf/util/sort.c -@@ -33,6 +33,9 @@ static int repsep_snprintf(char *bf, siz - } - } - va_end(ap); -+ -+ if (n >= (int)size) -+ return size - 1; - return n; - } - diff --git a/debian/patches/perf-tools-use-scnprintf-where-applicable.patch b/debian/patches/perf-tools-use-scnprintf-where-applicable.patch deleted file mode 100644 index b610e4f77..000000000 --- a/debian/patches/perf-tools-use-scnprintf-where-applicable.patch +++ /dev/null @@ -1,267 +0,0 @@ -From e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0 Mon Sep 17 00:00:00 2001 -From: Arnaldo Carvalho de Melo -Date: Wed, 14 Mar 2012 12:29:29 -0300 -Subject: perf tools: Use scnprintf where applicable - -From: Arnaldo Carvalho de Melo - -commit e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0 upstream. - -Several places were expecting that the value returned was the number of -characters printed, not what would be printed if there was space. - -Fix it by using the scnprintf and vscnprintf variants we inherited from -the kernel sources. - -Some corner cases where the number of printed characters were not -accounted were fixed too. - -Reported-by: Anton Blanchard -Cc: Anton Blanchard -Cc: Eric B Munson -Cc: David Ahern -Cc: Frederic Weisbecker -Cc: Mike Galbraith -Cc: Paul Mackerras -Cc: Peter Zijlstra -Cc: Stephane Eranian -Cc: Yanmin Zhang -Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Greg Kroah-Hartman - ---- - tools/perf/arch/powerpc/util/header.c | 2 +- - tools/perf/arch/x86/util/header.c | 2 +- - tools/perf/util/color.c | 9 +++++---- - tools/perf/util/header.c | 4 ++-- - tools/perf/util/hist.c | 30 +++++++++++++++--------------- - tools/perf/util/strbuf.c | 7 ++++--- - tools/perf/util/ui/browsers/hists.c | 12 ++++++------ - tools/perf/util/ui/helpline.c | 2 +- - 8 files changed, 35 insertions(+), 33 deletions(-) - ---- a/tools/perf/arch/powerpc/util/header.c -+++ b/tools/perf/arch/powerpc/util/header.c -@@ -25,7 +25,7 @@ get_cpuid(char *buffer, size_t sz) - - pvr = mfspr(SPRN_PVR); - -- nb = snprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); -+ nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); - - /* look for end marker to ensure the entire data fit */ - if (strchr(buffer, '$')) { ---- a/tools/perf/arch/x86/util/header.c -+++ b/tools/perf/arch/x86/util/header.c -@@ -48,7 +48,7 @@ get_cpuid(char *buffer, size_t sz) - if (family >= 0x6) - model += ((a >> 16) & 0xf) << 4; - } -- nb = snprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); -+ nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); - - /* look for end marker to ensure the entire data fit */ - if (strchr(buffer, '$')) { ---- a/tools/perf/util/color.c -+++ b/tools/perf/util/color.c -@@ -1,3 +1,4 @@ -+#include - #include "cache.h" - #include "color.h" - -@@ -182,12 +183,12 @@ static int __color_vsnprintf(char *bf, s - } - - if (perf_use_color_default && *color) -- r += snprintf(bf, size, "%s", color); -- r += vsnprintf(bf + r, size - r, fmt, args); -+ r += scnprintf(bf, size, "%s", color); -+ r += vscnprintf(bf + r, size - r, fmt, args); - if (perf_use_color_default && *color) -- r += snprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); -+ r += scnprintf(bf + r, size - r, "%s", PERF_COLOR_RESET); - if (trail) -- r += snprintf(bf + r, size - r, "%s", trail); -+ r += scnprintf(bf + r, size - r, "%s", trail); - return r; - } - ---- a/tools/perf/util/header.c -+++ b/tools/perf/util/header.c -@@ -1227,7 +1227,7 @@ int build_id_cache__add_s(const char *sb - if (realname == NULL || filename == NULL || linkname == NULL) - goto out_free; - -- len = snprintf(filename, size, "%s%s%s", -+ len = scnprintf(filename, size, "%s%s%s", - debugdir, is_kallsyms ? "/" : "", realname); - if (mkdir_p(filename, 0755)) - goto out_free; -@@ -1242,7 +1242,7 @@ int build_id_cache__add_s(const char *sb - goto out_free; - } - -- len = snprintf(linkname, size, "%s/.build-id/%.2s", -+ len = scnprintf(linkname, size, "%s/.build-id/%.2s", - debugdir, sbuild_id); - - if (access(linkname, X_OK) && mkdir_p(linkname, 0755)) ---- a/tools/perf/util/hist.c -+++ b/tools/perf/util/hist.c -@@ -767,7 +767,7 @@ static int hist_entry__pcnt_snprintf(str - sep ? "%.2f" : " %6.2f%%", - (period * 100.0) / total); - else -- ret = snprintf(s, size, sep ? "%.2f" : " %6.2f%%", -+ ret = scnprintf(s, size, sep ? "%.2f" : " %6.2f%%", - (period * 100.0) / total); - if (symbol_conf.show_cpu_utilization) { - ret += percent_color_snprintf(s + ret, size - ret, -@@ -790,20 +790,20 @@ static int hist_entry__pcnt_snprintf(str - } - } - } else -- ret = snprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period); -+ ret = scnprintf(s, size, sep ? "%" PRIu64 : "%12" PRIu64 " ", period); - - if (symbol_conf.show_nr_samples) { - if (sep) -- ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); -+ ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, nr_events); - else -- ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); -+ ret += scnprintf(s + ret, size - ret, "%11" PRIu64, nr_events); - } - - if (symbol_conf.show_total_period) { - if (sep) -- ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); -+ ret += scnprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); - else -- ret += snprintf(s + ret, size - ret, " %12" PRIu64, period); -+ ret += scnprintf(s + ret, size - ret, " %12" PRIu64, period); - } - - if (pair_hists) { -@@ -818,25 +818,25 @@ static int hist_entry__pcnt_snprintf(str - diff = new_percent - old_percent; - - if (fabs(diff) >= 0.01) -- snprintf(bf, sizeof(bf), "%+4.2F%%", diff); -+ ret += scnprintf(bf, sizeof(bf), "%+4.2F%%", diff); - else -- snprintf(bf, sizeof(bf), " "); -+ ret += scnprintf(bf, sizeof(bf), " "); - - if (sep) -- ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); -+ ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf); - else -- ret += snprintf(s + ret, size - ret, "%11.11s", bf); -+ ret += scnprintf(s + ret, size - ret, "%11.11s", bf); - - if (show_displacement) { - if (displacement) -- snprintf(bf, sizeof(bf), "%+4ld", displacement); -+ ret += scnprintf(bf, sizeof(bf), "%+4ld", displacement); - else -- snprintf(bf, sizeof(bf), " "); -+ ret += scnprintf(bf, sizeof(bf), " "); - - if (sep) -- ret += snprintf(s + ret, size - ret, "%c%s", *sep, bf); -+ ret += scnprintf(s + ret, size - ret, "%c%s", *sep, bf); - else -- ret += snprintf(s + ret, size - ret, "%6.6s", bf); -+ ret += scnprintf(s + ret, size - ret, "%6.6s", bf); - } - } - -@@ -854,7 +854,7 @@ int hist_entry__snprintf(struct hist_ent - if (se->elide) - continue; - -- ret += snprintf(s + ret, size - ret, "%s", sep ?: " "); -+ ret += scnprintf(s + ret, size - ret, "%s", sep ?: " "); - ret += se->se_snprintf(he, s + ret, size - ret, - hists__col_len(hists, se->se_width_idx)); - } ---- a/tools/perf/util/strbuf.c -+++ b/tools/perf/util/strbuf.c -@@ -1,4 +1,5 @@ - #include "cache.h" -+#include - - int prefixcmp(const char *str, const char *prefix) - { -@@ -89,14 +90,14 @@ void strbuf_addf(struct strbuf *sb, cons - if (!strbuf_avail(sb)) - strbuf_grow(sb, 64); - va_start(ap, fmt); -- len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); -+ len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); - va_end(ap); - if (len < 0) -- die("your vsnprintf is broken"); -+ die("your vscnprintf is broken"); - if (len > strbuf_avail(sb)) { - strbuf_grow(sb, len); - va_start(ap, fmt); -- len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); -+ len = vscnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); - va_end(ap); - if (len > strbuf_avail(sb)) { - die("this should not happen, your snprintf is broken"); ---- a/tools/perf/util/ui/browsers/hists.c -+++ b/tools/perf/util/ui/browsers/hists.c -@@ -839,15 +839,15 @@ static int hists__browser_title(struct h - unsigned long nr_events = self->stats.nr_events[PERF_RECORD_SAMPLE]; - - nr_events = convert_unit(nr_events, &unit); -- printed = snprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name); -+ printed = scnprintf(bf, size, "Events: %lu%c %s", nr_events, unit, ev_name); - - if (thread) -- printed += snprintf(bf + printed, size - printed, -+ printed += scnprintf(bf + printed, size - printed, - ", Thread: %s(%d)", - (thread->comm_set ? thread->comm : ""), - thread->pid); - if (dso) -- printed += snprintf(bf + printed, size - printed, -+ printed += scnprintf(bf + printed, size - printed, - ", DSO: %s", dso->short_name); - return printed; - } -@@ -1097,7 +1097,7 @@ static void perf_evsel_menu__write(struc - HE_COLORSET_NORMAL); - - nr_events = convert_unit(nr_events, &unit); -- printed = snprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events, -+ printed = scnprintf(bf, sizeof(bf), "%lu%c%s%s", nr_events, - unit, unit == ' ' ? "" : " ", ev_name); - slsmg_printf("%s", bf); - -@@ -1107,8 +1107,8 @@ static void perf_evsel_menu__write(struc - if (!current_entry) - ui_browser__set_color(browser, HE_COLORSET_TOP); - nr_events = convert_unit(nr_events, &unit); -- snprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!", nr_events, -- unit, unit == ' ' ? "" : " "); -+ printed += scnprintf(bf, sizeof(bf), ": %ld%c%schunks LOST!", -+ nr_events, unit, unit == ' ' ? "" : " "); - warn = bf; - } - ---- a/tools/perf/util/ui/helpline.c -+++ b/tools/perf/util/ui/helpline.c -@@ -65,7 +65,7 @@ int ui_helpline__show_help(const char *f - static int backlog; - - pthread_mutex_lock(&ui__lock); -- ret = vsnprintf(ui_helpline__last_msg + backlog, -+ ret = vscnprintf(ui_helpline__last_msg + backlog, - sizeof(ui_helpline__last_msg) - backlog, format, ap); - backlog += ret; - diff --git a/debian/patches/series b/debian/patches/series index 17b8cc3b3..fd1f7d4cc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ -perf-tools-incorrect-use-of-snprintf-results-in-segv.patch -perf-tools-use-scnprintf-where-applicable.patch modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch From b989eb0842a79484b79413db9000951bdda041d1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 20 Jun 2012 06:04:10 +0000 Subject: [PATCH 214/487] Build usbip userland packages (Closes: #568362) Do not build a shared library package; the API and ABI have changed from libusbip0 but there has been no upstream soversion change. svn path=/dists/sid/linux-tools/; revision=19177 --- debian/bin/genorig.py | 1 + debian/build/Makefile | 1 + debian/build/drivers/staging/usbip/Makefile | 24 ++++++++ debian/changelog | 3 + debian/libusbip-dev.install | 3 + debian/patches/series | 1 + .../usbip-remove-usbip_bind_driver-man-page | 56 +++++++++++++++++++ debian/rules.real | 23 +++++++- debian/templates/control.main.in | 32 +++++++++++ debian/templates/control.source.in | 3 +- debian/usbip.install | 4 ++ 11 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 debian/build/drivers/staging/usbip/Makefile create mode 100644 debian/libusbip-dev.install create mode 100644 debian/patches/usbip-remove-usbip_bind_driver-man-page create mode 100644 debian/usbip.install diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 0bb17e417..a83142945 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -145,6 +145,7 @@ class Main(object): 'arch/*/include/', 'arch/*/Makefile', 'arch/x86/lib/memcpy_64.S', + 'drivers/staging/usbip/userspace/', 'include/', 'lib/rbtree.c', 'scripts/', diff --git a/debian/build/Makefile b/debian/build/Makefile index 970d4e4c7..c14458250 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -3,6 +3,7 @@ DATA = \ Makefile \ SUBDIRS = \ + drivers/staging/usbip \ scripts \ tools diff --git a/debian/build/drivers/staging/usbip/Makefile b/debian/build/drivers/staging/usbip/Makefile new file mode 100644 index 000000000..ef35f0737 --- /dev/null +++ b/debian/build/drivers/staging/usbip/Makefile @@ -0,0 +1,24 @@ +srcdir := $(top_srcdir)/drivers/staging/usbip/userspace + +# Make sure we don't override top_srcdir in the sub-make. 'unexport +# top_srcdir' is *not* sufficient; nor is adding 'MAKEFLAGS=' to the +# sub-make command line. +unexport MAKEFLAGS + +all: + cd $(srcdir) && ./autogen.sh + mkdir -p userspace + cd userspace && $(srcdir)/configure \ + --prefix=/usr \ + --with-tcp-wrappers=no \ + --with-usbids-dir=/usr/share/misc \ + --disable-shared + $(MAKE) -C userspace + +install: + $(MAKE) -C userspace install + +clean: + rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) + find $(srcdir)/ -name Makefile.in -delete + rm -rf userspace diff --git a/debian/changelog b/debian/changelog index 8f1b0f5cd..4252096bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ linux-tools (3.2.17-1) UNRELEASED; urgency=low - Perf: fix build breakage * Fix version insertion in perf man pages + * Build usbip userland packages (Closes: #568362) + - Do not build a shared library package; the API and ABI have changed + from libusbip0 but there has been no upstream soversion change -- Ben Hutchings Sat, 09 Jun 2012 19:56:44 +0100 diff --git a/debian/libusbip-dev.install b/debian/libusbip-dev.install new file mode 100644 index 000000000..7b2d9eb61 --- /dev/null +++ b/debian/libusbip-dev.install @@ -0,0 +1,3 @@ +usr/lib/libusbip.la +usr/lib/libusbip.a +usr/include/usbip/* diff --git a/debian/patches/series b/debian/patches/series index fd1f7d4cc..49ad21b28 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch +usbip-remove-usbip_bind_driver-man-page diff --git a/debian/patches/usbip-remove-usbip_bind_driver-man-page b/debian/patches/usbip-remove-usbip_bind_driver-man-page new file mode 100644 index 000000000..2a71f9f2c --- /dev/null +++ b/debian/patches/usbip-remove-usbip_bind_driver-man-page @@ -0,0 +1,56 @@ +From: Ben Hutchings +Subject: The usbip_bind_driver command was removed; remove the man page too + +--- a/drivers/staging/usbip/userspace/Makefile.am ++++ b/drivers/staging/usbip/userspace/Makefile.am +@@ -3,4 +3,4 @@ + include_HEADERS := $(addprefix libsrc/, \ + usbip_common.h vhci_driver.h usbip_host_driver.h) + +-dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8 usbip_bind_driver.8) ++dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8) +--- a/drivers/staging/usbip/userspace/doc/usbip_bind_driver.8 ++++ /dev/null +@@ -1,42 +0,0 @@ +-.TH USBIP_BIND_DRIVER "8" "February 2009" "usbip" "System Administration Utilities" +-.SH NAME +-usbip_bind_driver \- change driver binding for USB/IP +- +-.SH SYNOPSIS +-.B usbip_bind_driver +-[\fIoptions\fR] +- +-.SH DESCRIPTION +-Driver bindings for USB devices can be changed using +-this program. It is used to export and unexport USB +-devices over USB/IP. +- +-.SH OPTIONS +-.TP +-\fB\-u\fR, \fB\-\-usbip\fR +-Make a device exportable +-.TP +-\fB\-o\fR, \fB\-\-other\fR +-Use a device by a local driver +-.TP +-\fB\-l\fR, \fB\-\-list\fR +-Print usb devices and their drivers +-.TP +-\fB\-L\fR, \fB\-\-list2\fR +-Print usb devices and their drivers in parseable mode +- +-.SH EXAMPLES +- +- server:# usbip_bind_driver --list +- - List driver assignments for usb devices. +- +- server:# usbip_bind_driver --usbip 1-2 +- - Bind usbip-host.ko to the device of busid 1-2. +- - A usb device 1-2 is now exportable to other hosts! +- +- server:# usbip_bind_driver --other 1-2 +- - Shutdown exporting and use the device locally. +- +-.SH "SEE ALSO" +-\fBusbip\fP\fB(8)\fB\fP, +-\fBusbipd\fP\fB(8)\fB\fP diff --git a/debian/rules.real b/debian/rules.real index 17eec6acb..548df5f62 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,8 +3,10 @@ export DH_OPTIONS include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +PACKAGE_VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: ,,p') +USBIP_VERSION := 1.1.1+$(PACKAGE_VERSION) -binary-arch: install-kbuild +binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif @@ -57,3 +59,22 @@ install-tools: $(STAMPS_DIR)/build dh_md5sums dh_builddeb +install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip +install-usbip: DIR = $(CURDIR)/debian/tmp +install-usbip: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_clean -k -d + $(MAKE) -C $(BUILD_DIR)/drivers/staging/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_install + dh_installchangelogs + dh_installdocs + dh_lintian + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol -- -v$(USBIP_VERSION) + dh_md5sums + dh_builddeb diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 0a18f5b25..5f9d6a867 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -15,3 +15,35 @@ Description: Performance analysis tools for Linux @upstreamversion@ . The linux-base package contains a 'perf' command which will invoke the appropriate version for the running kernel. + +Package: libusbip-dev +Architecture: linux-any +Depends: ${misc:Depends} +Section: libdevel +Description: USB device sharing system over IP network (development files) + USB/IP is a system for sharing USB devices over the network. + . + This package provides headers for the libusbip library and + the library itself for static linking. + +Package: usbip +Architecture: linux-any +Depends: usbutils, ${shlibs:Depends}, ${misc:Depends} +Section: admin +Description: USB device sharing system over IP network + USB/IP is a system for sharing USB devices over the network. + . + To share USB devices between computers with their full + functionality, USB/IP encapsulates "USB requests" into IP + packets and transmits them between computers. + . + Original USB device drivers and applications can be used + for remote USB devices without any modification of them. A + computer can use remote USB devices as if they were + directly attached. + . + Currently USB/IP provides no access control or encryption. + It should only be used in trusted environments. + . + This package provides the server component 'usbipd' and the + client tool 'usbip'. diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 82fa837fd..38ea5e236 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,6 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto + asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, + autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ diff --git a/debian/usbip.install b/debian/usbip.install new file mode 100644 index 000000000..4252b2807 --- /dev/null +++ b/debian/usbip.install @@ -0,0 +1,4 @@ +usr/sbin/usbip +usr/sbin/usbipd +usr/share/man/man8/usbip.8 +usr/share/man/man8/usbipd.8 From d0d98ef3a7e90d3031140b5e5e0adbc3fe88b1ed Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jun 2012 00:44:58 +0000 Subject: [PATCH 215/487] Clean up usbip package version generation Extract the current usbip version from its config.h file rather than repeating it in rules.real where we might forget to update it. Pass VERSION_DEBIAN into rules.real from rules.gen rather than invoking dpkg-parsechangelog again. svn path=/dists/sid/linux-tools/; revision=19188 --- debian/bin/gencontrol.py | 1 + debian/rules.real | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 6c985051a..c7b9364ec 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -39,6 +39,7 @@ class gencontrol(object): def do_main_setup(self, vars, makeflags): makeflags.update({ 'VERSION': self.version.linux_version, + 'VERSION_DEBIAN': self.version.complete, 'UPSTREAMVERSION': self.version.linux_upstream, }) diff --git a/debian/rules.real b/debian/rules.real index 548df5f62..beb766bcb 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,8 +3,6 @@ export DH_OPTIONS include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -PACKAGE_VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: ,,p') -USBIP_VERSION := 1.1.1+$(PACKAGE_VERSION) binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) @@ -61,6 +59,7 @@ install-tools: $(STAMPS_DIR)/build install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/tmp +install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/drivers/staging/usbip/userspace/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot @@ -75,6 +74,7 @@ install-usbip: $(STAMPS_DIR)/build dh_fixperms dh_installdeb dh_shlibdeps - dh_gencontrol -- -v$(USBIP_VERSION) + test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN)" + dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN) dh_md5sums dh_builddeb From fec5558bd764b798ca795b9ebb523fff1559ab9e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jun 2012 01:09:28 +0000 Subject: [PATCH 216/487] Update usbip man pages further svn path=/dists/sid/linux-tools/; revision=19189 --- debian/patches/series | 2 +- ...-man-page => usbip-update-man-pages.patch} | 36 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) rename debian/patches/{usbip-remove-usbip_bind_driver-man-page => usbip-update-man-pages.patch} (55%) diff --git a/debian/patches/series b/debian/patches/series index 49ad21b28..cc090d7df 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch -usbip-remove-usbip_bind_driver-man-page +usbip-update-man-pages.patch diff --git a/debian/patches/usbip-remove-usbip_bind_driver-man-page b/debian/patches/usbip-update-man-pages.patch similarity index 55% rename from debian/patches/usbip-remove-usbip_bind_driver-man-page rename to debian/patches/usbip-update-man-pages.patch index 2a71f9f2c..e4dfa4b74 100644 --- a/debian/patches/usbip-remove-usbip_bind_driver-man-page +++ b/debian/patches/usbip-update-man-pages.patch @@ -1,6 +1,9 @@ From: Ben Hutchings -Subject: The usbip_bind_driver command was removed; remove the man page too +Subject: Update man pages for merging of commands +usbip_bind_driver (formerly usbip_attach_driver) was merged into the +usbip command. Remove the separate man page for it. Update examples +and references accordingly. --- a/drivers/staging/usbip/userspace/Makefile.am +++ b/drivers/staging/usbip/userspace/Makefile.am @@ -3,4 +3,4 @@ @@ -54,3 +57,34 @@ Subject: The usbip_bind_driver command was removed; remove the man page too -.SH "SEE ALSO" -\fBusbip\fP\fB(8)\fB\fP, -\fBusbipd\fP\fB(8)\fB\fP +--- a/drivers/staging/usbip/userspace/doc/usbip.8 ++++ b/drivers/staging/usbip/userspace/doc/usbip.8 +@@ -67,5 +67,4 @@ + - Detach the usb device. + + .SH "SEE ALSO" +-\fBusbipd\fP\fB(8)\fB\fP, +-\fBusbip_attach_driver\fP\fB(8)\fB\fP ++\fBusbipd\fP\fB(8)\fB\fP +--- a/drivers/staging/usbip/userspace/doc/usbipd.8 ++++ b/drivers/staging/usbip/userspace/doc/usbipd.8 +@@ -48,15 +48,14 @@ + server:# usbipd -D + - Start usbip daemon. + +- server:# usbip_bind_driver --list ++ server:# usbip list + - List driver assignments for usb devices. + +- server:# usbip_bind_driver --usbip 1-2 ++ server:# usbip bind -b 1-2 + - Bind usbip-host.ko to the device of busid 1-2. + - A usb device 1-2 is now exportable to other hosts! +- - Use 'usbip_bind_driver --other 1-2' when you want to shutdown exporting and use the device locally. ++ - Use 'usbip unbind -b 1-2' when you want to shutdown exporting and use the device locally. + + .SH "SEE ALSO" +-\fBusbip\fP\fB(8)\fB\fP, +-\fBusbip_attach_driver\fP\fB(8)\fB\fP ++\fBusbip\fP\fB(8)\fB\fP + From 3fd6a12507fe8087d2f209ff2caa74d54a9ffc6d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jun 2012 01:40:30 +0000 Subject: [PATCH 217/487] Fix yet another reference to usb_bind_driver svn path=/dists/sid/linux-tools/; revision=19190 --- debian/patches/usbip-update-man-pages.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/patches/usbip-update-man-pages.patch b/debian/patches/usbip-update-man-pages.patch index e4dfa4b74..f66a7902c 100644 --- a/debian/patches/usbip-update-man-pages.patch +++ b/debian/patches/usbip-update-man-pages.patch @@ -68,6 +68,15 @@ and references accordingly. +\fBusbipd\fP\fB(8)\fB\fP --- a/drivers/staging/usbip/userspace/doc/usbipd.8 +++ b/drivers/staging/usbip/userspace/doc/usbipd.8 +@@ -10,7 +10,7 @@ + provides USB/IP clients access to exported USB devices. + + Devices have to explicitly be exported using +-.B usbip_bind_driver ++.B usbip bind + before usbipd makes them available to other hosts. + + The daemon accepts connections from USB/IP clients @@ -48,15 +48,14 @@ server:# usbipd -D - Start usbip daemon. From 0de76df225d9bd077442d4095db43c40c10c08a6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jun 2012 01:51:39 +0000 Subject: [PATCH 218/487] usbipd: Enable TCP wrappers for access control svn path=/dists/sid/linux-tools/; revision=19191 --- debian/build/drivers/staging/usbip/Makefile | 2 +- debian/changelog | 1 + debian/patches/series | 2 + .../patches/usbip-document-tcp-wrappers.patch | 27 ++++++++++++++ ...explicit-configure-with-tcp-wrappers.patch | 37 +++++++++++++++++++ debian/templates/control.source.in | 2 +- 6 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 debian/patches/usbip-document-tcp-wrappers.patch create mode 100644 debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch diff --git a/debian/build/drivers/staging/usbip/Makefile b/debian/build/drivers/staging/usbip/Makefile index ef35f0737..e895461b7 100644 --- a/debian/build/drivers/staging/usbip/Makefile +++ b/debian/build/drivers/staging/usbip/Makefile @@ -10,7 +10,7 @@ all: mkdir -p userspace cd userspace && $(srcdir)/configure \ --prefix=/usr \ - --with-tcp-wrappers=no \ + --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ --disable-shared $(MAKE) -C userspace diff --git a/debian/changelog b/debian/changelog index 4252096bf..35488b755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ linux-tools (3.2.17-1) UNRELEASED; urgency=low * Build usbip userland packages (Closes: #568362) - Do not build a shared library package; the API and ABI have changed from libusbip0 but there has been no upstream soversion change + * usbipd: Enable TCP wrappers for access control -- Ben Hutchings Sat, 09 Jun 2012 19:56:44 +0100 diff --git a/debian/patches/series b/debian/patches/series index cc090d7df..f2b52bb65 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,5 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-update-man-pages.patch +usbip-fix-explicit-configure-with-tcp-wrappers.patch +usbip-document-tcp-wrappers.patch diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch new file mode 100644 index 000000000..617ddd86f --- /dev/null +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -0,0 +1,27 @@ +From: Ben Hutchings +Subject: usbip: Document TCP wrappers + +Add references to TCP wrappers configuration in the manual page. + +--- a/drivers/staging/usbip/userspace/doc/usbipd.8 ++++ b/drivers/staging/usbip/userspace/doc/usbipd.8 +@@ -14,7 +14,8 @@ + before usbipd makes them available to other hosts. + + The daemon accepts connections from USB/IP clients +-on TCP port 3240. ++on TCP port 3240. The clients authorised to connect may be ++configured as documented in hosts_access(5). + + .SH OPTIONS + .HP +@@ -39,7 +40,8 @@ + + .B usbipd + offers no authentication or authorization for USB/IP. Any +-USB/IP client can connect and use exported devices. ++USB/IP client running on an authorised host can connect and ++use exported devices. + + .SH EXAMPLES + diff --git a/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch b/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch new file mode 100644 index 000000000..20d7e9c18 --- /dev/null +++ b/debian/patches/usbip-fix-explicit-configure-with-tcp-wrappers.patch @@ -0,0 +1,37 @@ +From: Ben Hutchings +Subject: usbip: Fix explicit configure --with-tcp-wrappers + +If the --with-tcp-wrappers[=yes] option is given and the wrap library +checks out, we currently add '-lwrap' to $LIBS but then reset it to +$saved_LIBS. In fact there is no need to save and restore $LIBS here +because failure is fatal. $wrap_LIB is also unused, so don't set that +either. + +--- a/drivers/staging/usbip/userspace/configure.ac ++++ b/drivers/staging/usbip/userspace/configure.ac +@@ -56,8 +56,7 @@ + [AS_HELP_STRING([--with-tcp-wrappers], + [use the libwrap (TCP wrappers) library])], + dnl [ACTION-IF-GIVEN] +- [saved_LIBS="$LIBS" +- if test "$withval" = "yes"; then ++ [if test "$withval" = "yes"; then + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([for hosts_access in -lwrap]) + LIBS="-lwrap $LIBS" +@@ -65,13 +64,11 @@ + [int hosts_access(); int allow_severity, deny_severity;], + [hosts_access()], + [AC_MSG_RESULT([yes]); +- AC_DEFINE([HAVE_LIBWRAP], [1], +- [use tcp wrapper]) wrap_LIB="-lwrap"], ++ AC_DEFINE([HAVE_LIBWRAP], [1], [use tcp wrapper])], + [AC_MSG_RESULT([not found]); exit 1]) + else + AC_MSG_RESULT([no]) +- fi +- LIBS="$saved_LIBS"], ++ fi], + dnl [ACTION-IF-NOT-GIVEN] + [AC_MSG_RESULT([(default)]) + AC_MSG_CHECKING([for hosts_access in -lwrap]) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 38ea5e236..6fe36dcaa 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,6 +7,6 @@ Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev + autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From e33ff13054ac40e9dc20adbc00eb86a3543f14ba Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Jun 2012 02:11:08 +0000 Subject: [PATCH 219/487] Prepare to release linux-tools (3.2.17-1). svn path=/dists/sid/linux-tools/; revision=19192 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35488b755..1569cfbc3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.2.17-1) UNRELEASED; urgency=low +linux-tools (3.2.17-1) unstable; urgency=low * New upstream stable updates: http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.2.15 @@ -14,7 +14,7 @@ linux-tools (3.2.17-1) UNRELEASED; urgency=low from libusbip0 but there has been no upstream soversion change * usbipd: Enable TCP wrappers for access control - -- Ben Hutchings Sat, 09 Jun 2012 19:56:44 +0100 + -- Ben Hutchings Sun, 24 Jun 2012 02:52:26 +0100 linux-tools (3.2.7-2) unstable; urgency=high From 59de3aea5ff928c8b3e0f612d3e6a1530cbfb6ce Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 19 Aug 2012 22:04:11 +0000 Subject: [PATCH 220/487] Drop third version component of 0 from upstream tags and tarball names Also remove the temporary --override-tag option; we know what the tag names look like. svn path=/dists/trunk/linux-tools/; revision=19335 --- debian/bin/genorig.py | 10 +++++----- debian/changelog | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 0bb17e417..064b332e0 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -47,7 +47,7 @@ class FileGlob(object): class Main(object): - def __init__(self, input_files, override_version, override_tag): + def __init__(self, input_files, override_version): self.log = sys.stdout.write self.input_files = input_files @@ -67,7 +67,8 @@ class Main(object): self.orig = '%s-%s' % (source, version.upstream) self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream) - self.tag = override_tag or ('v' + version.upstream.replace('~', '-')) + self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1", + version.upstream.replace('~', '-')) def __call__(self): import tempfile @@ -101,7 +102,7 @@ class Main(object): def upstream_extract(self, input_tar): self.log("Extracting tarball %s\n" % input_tar) - match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', input_tar) + match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', input_tar) if not match: raise RuntimeError("Can't identify name of tarball") @@ -192,8 +193,7 @@ if __name__ == '__main__': from optparse import OptionParser parser = OptionParser(usage = "%prog [OPTION]... {TAR [PATCH] | REPO}") parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") - parser.add_option("-t", "--override-tag", dest = "override_tag", help = "Override tag", metavar = "TAG") options, args = parser.parse_args() assert 1 <= len(args) <= 2 - Main(args, options.override_version, options.override_tag)() + Main(args, options.override_version)() diff --git a/debian/changelog b/debian/changelog index 5d19cd688..bbcde31f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.5-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release + + -- Ben Hutchings Fri, 10 Aug 2012 03:59:44 +0100 + linux-tools (3.4-1~experimental.1) experimental; urgency=low * New upstream release From 2eef688159e7f780c8c7466832bbc0fb1099144f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 19 Aug 2012 22:08:13 +0000 Subject: [PATCH 221/487] debian/bin: PEP8 and other style fixes. svn path=/dists/trunk/linux-tools/; revision=19336 --- debian/bin/genorig.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 064b332e0..30a2e75dd 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -52,7 +52,7 @@ class Main(object): self.input_files = input_files - changelog = Changelog(version = VersionLinux)[0] + changelog = Changelog(version=VersionLinux)[0] source = changelog.source version = changelog.version @@ -72,7 +72,7 @@ class Main(object): def __call__(self): import tempfile - self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian') + self.dir = tempfile.mkdtemp(prefix='genorig', dir='debian') try: if os.path.isdir(self.input_files[0]): self.upstream_export(self.input_files[0]) @@ -169,11 +169,13 @@ class Main(object): out = os.path.join("../orig", self.orig_tar) try: os.mkdir("../orig") - except OSError: pass + except OSError: + pass try: os.stat(out) raise RuntimeError("Destination already exists") - except OSError: pass + except OSError: + pass self.log("Generate tarball %s\n" % out) cmdline = ['tar -czf', out, '-C', self.dir, self.orig] try: @@ -183,16 +185,18 @@ class Main(object): except: try: os.unlink(out) - except OSError: pass + except OSError: + pass raise try: os.symlink(os.path.join('orig', self.orig_tar), os.path.join('..', self.orig_tar)) - except OSError: pass + except OSError: + pass if __name__ == '__main__': from optparse import OptionParser - parser = OptionParser(usage = "%prog [OPTION]... {TAR [PATCH] | REPO}") - parser.add_option("-V", "--override-version", dest = "override_version", help = "Override version", metavar = "VERSION") + 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() assert 1 <= len(args) <= 2 From 4b391a0528a912c030806cf1f6b7c8e590c4aea9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 19 Aug 2012 22:44:35 +0000 Subject: [PATCH 222/487] Explicitly disable perf Gtk UI for now svn path=/dists/trunk/linux-tools/; revision=19337 --- debian/build/tools/perf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 916465d75..c4e219d2b 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -30,7 +30,8 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error +# disable Gtk UI until it's more usable +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error all: ifdef KERNEL_ARCH_PERF From 4ba53ec51018c3903919473830736361878cb3c8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 19 Aug 2012 23:56:30 +0000 Subject: [PATCH 223/487] perf: Fix include order for bison/flex-generated C files This doesn't seem to cause a problem with the Gtk UI disabled, but I can't see any reason why -I/usr/include/slang shouldn't trigger it just as -I/usr/include/gtk-2.0 does. And we might enable the Gtk UI later anyway. svn path=/dists/trunk/linux-tools/; revision=19338 --- ...-order-for-bison-flex-generated-C-fi.patch | 36 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 37 insertions(+) create mode 100644 debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch diff --git a/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch b/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch new file mode 100644 index 000000000..121bff15f --- /dev/null +++ b/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch @@ -0,0 +1,36 @@ +From: Ben Hutchings +Date: Mon, 20 Aug 2012 00:35:01 +0100 +Subject: perf: Fix include order for bison/flex-generated C files + +When we use a separate output directory, we add util/ to the include +path for the generated C files. However, this is currently added to +the end of the path, behind /usr/include/slang and +/usr/include/gtk-2.0 if use of the respective libraries is enabled. +Thus the '#include "../perf.h"' in util/parse-events.l can actually +include /usr/include/perf.h if it exists. + +Move '-Iutil/' ahead of all the other preprocessor options. + +Reported-by: Sedat Dilek +Signed-off-by: Ben Hutchings +--- + tools/perf/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/perf/Makefile b/tools/perf/Makefile +index 0eee64c..434175c 100644 +--- a/tools/perf/Makefile ++++ b/tools/perf/Makefile +@@ -756,10 +756,10 @@ $(OUTPUT)perf.o perf.spec \ + # over the general rule for .o + + $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS +- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $< ++ $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -w $< + + $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS +- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $< ++ $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w $< + + $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< diff --git a/debian/patches/series b/debian/patches/series index fd1f7d4cc..0c20d014a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch +perf-Fix-include-order-for-bison-flex-generated-C-fi.patch From efa1770509d5a6523fd1ad51c0a69dd368923485 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 20 Aug 2012 00:11:07 +0000 Subject: [PATCH 224/487] Prepare to release linux-tools (3.5-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=19339 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bbcde31f4..b2415f384 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.5-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.5-1~experimental.1) experimental; urgency=low * New upstream release - -- Ben Hutchings Fri, 10 Aug 2012 03:59:44 +0100 + -- Ben Hutchings Mon, 20 Aug 2012 00:57:12 +0100 linux-tools (3.4-1~experimental.1) experimental; urgency=low From e27b6aeb07e0072f6635a2ecdc67138afbb055ca Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 Aug 2012 04:49:15 +0000 Subject: [PATCH 225/487] Add xz support, thanks to Sedat Dilek svn path=/dists/trunk/linux-tools/; revision=19351 --- debian/bin/genorig.py | 18 ++++++++---------- debian/changelog | 8 ++++++++ debian/rules | 4 ++-- debian/source/options | 1 + 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 debian/source/options diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 30a2e75dd..246520940 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -66,7 +66,7 @@ class Main(object): self.log('Using source name %s, version %s, dfsg %s\n' % (source, version.upstream, self.version_dfsg)) self.orig = '%s-%s' % (source, version.upstream) - self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream) + self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream) self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1", version.upstream.replace('~', '-')) @@ -92,7 +92,7 @@ class Main(object): '--prefix=temp/', self.tag], cwd=input_repo, stdout=subprocess.PIPE) - extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir, + extract_proc = subprocess.Popen(['tar', '-xaf', '-'], cwd=self.dir, stdin=archive_proc.stdout) ret1 = archive_proc.wait() @@ -102,15 +102,11 @@ class Main(object): def upstream_extract(self, input_tar): self.log("Extracting tarball %s\n" % input_tar) - match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', input_tar) + match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P(bz2|gz|xz)))?$', input_tar) if not match: raise RuntimeError("Can't identify name of tarball") - cmdline = ['tar', '-xf', input_tar, '-C', self.dir] - if match.group('extension') == 'bz2': - cmdline.append('-j') - elif match.group('extension') == 'gz': - cmdline.append('-z') + cmdline = ['tar', '-xaf', input_tar, '-C', self.dir] if subprocess.Popen(cmdline).wait(): raise RuntimeError("Can't extract tarball") @@ -119,7 +115,7 @@ class Main(object): 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(bz2|gz)))?$', input_patch) + match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P(bz2|gz|xz)))?$', input_patch) if not match: raise RuntimeError("Can't identify name of patch") cmdline = [] @@ -127,6 +123,8 @@ class Main(object): cmdline.append('bzcat') elif match.group('extension') == 'gz': cmdline.append('zcat') + elif match.group('extension') == 'xz': + cmdline.append('xzcat') else: cmdline.append('cat') cmdline.append(input_patch) @@ -177,7 +175,7 @@ class Main(object): except OSError: pass self.log("Generate tarball %s\n" % out) - cmdline = ['tar -czf', out, '-C', self.dir, self.orig] + cmdline = ['tar -caf', out, '-C', self.dir, self.orig] try: if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): raise RuntimeError("Can't patch source") diff --git a/debian/changelog b/debian/changelog index b2415f384..812cb5699 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux-tools (3.5-1~experimental.2) UNRELEASED; urgency=low + + * genorig: Accept xz-compressed upstream tarballs and patches, and + generate an xz-compressed orig tarball, thanks to Sedat Dilek + * source: Enable xz-compression for debian directory tarball + + -- Ben Hutchings Tue, 21 Aug 2012 05:05:42 +0100 + linux-tools (3.5-1~experimental.1) experimental; urgency=low * New upstream release diff --git a/debian/rules b/debian/rules index 28304f75f..3a21ac59f 100755 --- a/debian/rules +++ b/debian/rules @@ -20,7 +20,7 @@ $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ DIR_ORIG = ../orig/$(SOURCE)-$(VERSION) -TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz +TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.xz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) @@ -31,7 +31,7 @@ ifeq ($(TAR_ORIG),) $(error Cannot find orig tarball $(TAR_ORIG_NAME)) else mkdir -p ../orig - tar -C ../orig -xzf $(TAR_ORIG) + tar -C ../orig -xaf $(TAR_ORIG) endif maintainerclean: diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..b7bc1f2b7 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +compression = "xz" From 2d80638e0df5250b23bb3d031e432fd7c59fd138 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 9 Oct 2012 03:34:41 +0000 Subject: [PATCH 226/487] Update to 3.6 (Closes: #690011) svn path=/dists/trunk/linux-tools/; revision=19421 --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 812cb5699..026b1a262 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -linux-tools (3.5-1~experimental.2) UNRELEASED; urgency=low +linux-tools (3.6-1~experimental.1) UNRELEASED; urgency=low + * New upstream release (Closes: #690011) + + [ Ben Hutchings ] * genorig: Accept xz-compressed upstream tarballs and patches, and generate an xz-compressed orig tarball, thanks to Sedat Dilek * source: Enable xz-compression for debian directory tarball From b4db2d4936eed14ab1a5d442d9f7141c73e93504 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 26 Nov 2012 06:16:28 +0000 Subject: [PATCH 227/487] Add myself to Uploaders. svn path=/dists/trunk/linux-tools/; revision=19537 --- debian/changelog | 3 +++ debian/templates/control.source.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 026b1a262..f007bacef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ linux-tools (3.6-1~experimental.1) UNRELEASED; urgency=low generate an xz-compressed orig tarball, thanks to Sedat Dilek * source: Enable xz-compression for debian directory tarball + [ Jonathan Nieder ] + * Add myself to uploaders list. + -- Ben Hutchings Tue, 21 Aug 2012 05:05:42 +0100 linux-tools (3.5-1~experimental.1) experimental; urgency=low diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 93742de63..972e084e1 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -2,7 +2,7 @@ Source: linux-tools Section: devel Priority: optional Maintainer: Debian Kernel Team -Uploaders: Bastian Blank , Ben Hutchings +Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder Standards-Version: 3.9.2 Build-Depends: debhelper (>> 7), python, From 9c8dd43fa792148f92a42fce809b076e8b0df4ea Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 26 Nov 2012 06:21:21 +0000 Subject: [PATCH 228/487] Prepare to release linux-tools (3.6-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=19538 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f007bacef..6aeebb664 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.6-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.6-1~experimental.1) experimental; urgency=low * New upstream release (Closes: #690011) @@ -10,7 +10,7 @@ linux-tools (3.6-1~experimental.1) UNRELEASED; urgency=low [ Jonathan Nieder ] * Add myself to uploaders list. - -- Ben Hutchings Tue, 21 Aug 2012 05:05:42 +0100 + -- Jonathan Nieder Sat, 24 Nov 2012 13:40:28 -0800 linux-tools (3.5-1~experimental.1) experimental; urgency=low From 000732c3ff150b675b958fdbc3fcd87a9378897d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Dec 2012 00:46:42 +0000 Subject: [PATCH 229/487] [amd64] linux-tools: Enable optimisations and special-casing of x86_64 (Closes: #694759) This requires including another source file in the 'orig' tarball, so bump to the latest stable update. I don't think it has any fixes relevant to linux-tools. svn path=/dists/trunk/linux-tools/; revision=19565 --- debian/bin/genorig.py | 1 + debian/build/tools/perf/Makefile | 4 +- debian/changelog | 10 ++++ ...86-builds-with-ARCH-specified-on-the.patch | 55 +++++++++++++++++++ debian/patches/series | 1 + 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 246520940..18f7bdd01 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -144,6 +144,7 @@ class Main(object): 'arch/*/include/', 'arch/*/Makefile', 'arch/x86/lib/memcpy_64.S', + 'arch/x86/lib/memset_64.S', 'include/', 'lib/rbtree.c', 'scripts/', diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index c4e219d2b..9372be1a4 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -7,13 +7,13 @@ DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) - KERNEL_ARCH_PERF = x86 + KERNEL_ARCH_PERF = x86_64 else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) - KERNEL_ARCH_PERF = x86 + KERNEL_ARCH_PERF = i386 else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) diff --git a/debian/changelog b/debian/changelog index 6aeebb664..df072e986 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +linux-tools (3.6.8-1~experimental.1) UNRELEASED; urgency=low + + * New upstream stable update + + [ Ben Hutchings ] + * [amd64] linux-tools: Enable optimisations and special-casing of x86_64 + (Closes: #694759) + + -- Ben Hutchings Sun, 02 Dec 2012 00:33:22 +0000 + linux-tools (3.6-1~experimental.1) experimental; urgency=low * New upstream release (Closes: #690011) diff --git a/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch b/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch new file mode 100644 index 000000000..2f8a7943e --- /dev/null +++ b/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch @@ -0,0 +1,55 @@ +From: David Ahern +Date: Mon, 27 Aug 2012 13:05:54 -0600 +Subject: perf tools: Fix x86 builds with ARCH specified on the command line + +commit 09a2f16a916178489fc4bf439de668d81fda7616 upstream. + +e.g., compiling i386 on x86_64 using: +$ make -C tools/perf ARCH=i386 + +fails with: + + CC /tmp/pbuild/util/evsel.o +In file included from util/evsel.c:21:0: +util/perf_regs.h:5:23: fatal error: perf_regs.h: No such file or directory +compilation terminated. + +Adding V=1 you see that the include argument for the arch is +'-Iarch/i386/include' is wrong. It is supposed to be -Iarch/x86/include +per the redefinition of ARCH in the Makefile. + +According to the make manual, +http://www.gnu.org/software/make/manual/make.html#Override-Directive: + "If a variable has been set with a command argument (see Overriding + Variables), then ordinary assignments in the makefile are ignored. If + you want to set the variable in the makefile even though it was set + with a command argument, you can use an override directive ..." + +Make it so. + +Signed-off-by: David Ahern +Cc: Frederic Weisbecker +Cc: Ingo Molnar +Cc: Peter Zijlstra +Link: http://lkml.kernel.org/r/1346094354-74356-1-git-send-email-dsahern@gmail.com +Signed-off-by: Arnaldo Carvalho de Melo +[bwh: Adjust context for 3.6.8] +--- + tools/perf/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/tools/perf/Makefile ++++ b/tools/perf/Makefile +@@ -56,10 +56,10 @@ AR = $(CROSS_COMPILE)ar + + # Additional ARCH settings for x86 + ifeq ($(ARCH),i386) +- ARCH := x86 ++ override ARCH := x86 + endif + ifeq ($(ARCH),x86_64) +- ARCH := x86 ++ override ARCH := x86 + IS_X86_64 := 0 + ifeq (, $(findstring m32,$(EXTRA_CFLAGS))) + IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1) diff --git a/debian/patches/series b/debian/patches/series index 0c20d014a..f2693a5ab 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch perf-Fix-include-order-for-bison-flex-generated-C-fi.patch +perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch From b06e85a63be82dcd03cd902e9ecb77f15060a386 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2012 08:45:26 +0000 Subject: [PATCH 230/487] Update to 3.7 svn path=/dists/trunk/linux-tools/; revision=19650 --- debian/changelog | 4 +- ...-order-for-bison-flex-generated-C-fi.patch | 36 ------------ ...86-builds-with-ARCH-specified-on-the.patch | 55 ------------------- debian/patches/series | 2 - 4 files changed, 2 insertions(+), 95 deletions(-) delete mode 100644 debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch delete mode 100644 debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch diff --git a/debian/changelog b/debian/changelog index df072e986..29868f5a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -linux-tools (3.6.8-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.7.1-1~experimental.1) UNRELEASED; urgency=low - * New upstream stable update + * New upstream release [ Ben Hutchings ] * [amd64] linux-tools: Enable optimisations and special-casing of x86_64 diff --git a/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch b/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch deleted file mode 100644 index 121bff15f..000000000 --- a/debian/patches/perf-Fix-include-order-for-bison-flex-generated-C-fi.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Ben Hutchings -Date: Mon, 20 Aug 2012 00:35:01 +0100 -Subject: perf: Fix include order for bison/flex-generated C files - -When we use a separate output directory, we add util/ to the include -path for the generated C files. However, this is currently added to -the end of the path, behind /usr/include/slang and -/usr/include/gtk-2.0 if use of the respective libraries is enabled. -Thus the '#include "../perf.h"' in util/parse-events.l can actually -include /usr/include/perf.h if it exists. - -Move '-Iutil/' ahead of all the other preprocessor options. - -Reported-by: Sedat Dilek -Signed-off-by: Ben Hutchings ---- - tools/perf/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/perf/Makefile b/tools/perf/Makefile -index 0eee64c..434175c 100644 ---- a/tools/perf/Makefile -+++ b/tools/perf/Makefile -@@ -756,10 +756,10 @@ $(OUTPUT)perf.o perf.spec \ - # over the general rule for .o - - $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS -- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $< -+ $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -w $< - - $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS -- $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $< -+ $(QUIET_CC)$(CC) -o $@ -c -Iutil/ $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w $< - - $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< diff --git a/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch b/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch deleted file mode 100644 index 2f8a7943e..000000000 --- a/debian/patches/perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: David Ahern -Date: Mon, 27 Aug 2012 13:05:54 -0600 -Subject: perf tools: Fix x86 builds with ARCH specified on the command line - -commit 09a2f16a916178489fc4bf439de668d81fda7616 upstream. - -e.g., compiling i386 on x86_64 using: -$ make -C tools/perf ARCH=i386 - -fails with: - - CC /tmp/pbuild/util/evsel.o -In file included from util/evsel.c:21:0: -util/perf_regs.h:5:23: fatal error: perf_regs.h: No such file or directory -compilation terminated. - -Adding V=1 you see that the include argument for the arch is -'-Iarch/i386/include' is wrong. It is supposed to be -Iarch/x86/include -per the redefinition of ARCH in the Makefile. - -According to the make manual, -http://www.gnu.org/software/make/manual/make.html#Override-Directive: - "If a variable has been set with a command argument (see Overriding - Variables), then ordinary assignments in the makefile are ignored. If - you want to set the variable in the makefile even though it was set - with a command argument, you can use an override directive ..." - -Make it so. - -Signed-off-by: David Ahern -Cc: Frederic Weisbecker -Cc: Ingo Molnar -Cc: Peter Zijlstra -Link: http://lkml.kernel.org/r/1346094354-74356-1-git-send-email-dsahern@gmail.com -Signed-off-by: Arnaldo Carvalho de Melo -[bwh: Adjust context for 3.6.8] ---- - tools/perf/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/tools/perf/Makefile -+++ b/tools/perf/Makefile -@@ -56,10 +56,10 @@ AR = $(CROSS_COMPILE)ar - - # Additional ARCH settings for x86 - ifeq ($(ARCH),i386) -- ARCH := x86 -+ override ARCH := x86 - endif - ifeq ($(ARCH),x86_64) -- ARCH := x86 -+ override ARCH := x86 - IS_X86_64 := 0 - ifeq (, $(findstring m32,$(EXTRA_CFLAGS))) - IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1) diff --git a/debian/patches/series b/debian/patches/series index f2693a5ab..fd1f7d4cc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch -perf-Fix-include-order-for-bison-flex-generated-C-fi.patch -perf-tools-Fix-x86-builds-with-ARCH-specified-on-the.patch From 0e69bea674c8f03ff65fcb9bc0bdd407690853d4 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2012 08:46:54 +0000 Subject: [PATCH 231/487] Refresh patches svn path=/dists/trunk/linux-tools/; revision=19651 --- debian/patches/tools-perf-install.patch | 6 +++--- debian/patches/tools-perf-version.patch | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index dc34577f3..001220553 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -863,13 +863,13 @@ +@@ -1051,13 +1051,13 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -16,5 +16,5 @@ + $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' - - install-python_ext: + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' + $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 167654741..b4f890461 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -939,7 +939,7 @@ +@@ -1047,7 +1047,7 @@ install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' @@ -9,7 +9,7 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -959,7 +959,7 @@ +@@ -1069,7 +1069,7 @@ $(MAKE) -C Documentation install install-man: From a1865fdcc8879518d8931d196dd0470a1d99b7b5 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2012 08:51:54 +0000 Subject: [PATCH 232/487] Actually refresh patches A whitespace error had snuck in. Sorry for the noise. svn path=/dists/trunk/linux-tools/; revision=19652 --- debian/patches/tools-perf-install.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 001220553..b82fb7b7a 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -16,5 +16,5 @@ + $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' - $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' + $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' From c1eee615d74df6319e1cda4d5b7489645df2951d Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2012 09:10:28 +0000 Subject: [PATCH 233/487] Install completion script non-executable svn path=/dists/trunk/linux-tools/; revision=19653 --- debian/patches/tools-perf-install.patch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index b82fb7b7a..34d612cde 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1051,13 +1051,13 @@ +@@ -1051,16 +1051,16 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -17,4 +17,8 @@ + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' - $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' +- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + + install-python_ext: + $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' From 99568636a3fbbb930e99c730a1cc7b36481dadf0 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 Dec 2012 16:38:37 +0000 Subject: [PATCH 234/487] linux-kbuild: Use Section: kernel. Users of out-of-tree modules need linux-kbuild even when not doing any real development. Moving it to section "kernel" should make it easier to find. svn path=/dists/trunk/linux-tools/; revision=19654 --- debian/changelog | 3 +++ debian/templates/control.main.in | 1 + debian/templates/control.source.in | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 29868f5a1..4e4d2e5d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ linux-tools (3.7.1-1~experimental.1) UNRELEASED; urgency=low * [amd64] linux-tools: Enable optimisations and special-casing of x86_64 (Closes: #694759) + [ Uwe Kleine-König ] + * linux-kbuild: debian/control: Use Section: kernel (Closes: #545017) + -- Ben Hutchings Sun, 02 Dec 2012 00:33:22 +0000 linux-tools (3.6-1~experimental.1) experimental; urgency=low diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 01288d8c4..af41e2e97 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -6,6 +6,7 @@ Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. Package: linux-tools-@version@ +Section: devel Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 972e084e1..708734633 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -1,5 +1,5 @@ Source: linux-tools -Section: devel +Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder From 1e472db46ad3b54b7b33645c72faf450d9a1bdf0 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sat, 29 Dec 2012 07:16:26 +0000 Subject: [PATCH 235/487] Prepare to upload to experimental (3.7.1-1~experimental.1) svn path=/dists/trunk/linux-tools/; revision=19660 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4e4d2e5d3..2aad616d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.7.1-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.7.1-1~experimental.1) experimental; urgency=low * New upstream release @@ -9,7 +9,7 @@ linux-tools (3.7.1-1~experimental.1) UNRELEASED; urgency=low [ Uwe Kleine-König ] * linux-kbuild: debian/control: Use Section: kernel (Closes: #545017) - -- Ben Hutchings Sun, 02 Dec 2012 00:33:22 +0000 + -- Jonathan Nieder Fri, 28 Dec 2012 09:29:53 -0800 linux-tools (3.6-1~experimental.1) experimental; urgency=low From 3ad679557793e4e22b9c90d09a34b6411e31228a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Feb 2013 05:15:41 +0000 Subject: [PATCH 236/487] Update to 3.8 Refresh perf patches. svn path=/dists/trunk/linux-tools/; revision=19845 --- debian/build/tools/perf/Makefile | 1 + debian/changelog | 4 +++- debian/patches/tools-perf-install.patch | 8 ++++++- debian/patches/tools-perf-version.patch | 32 ++++++++++++------------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 9372be1a4..b6dfa2f10 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -38,6 +38,7 @@ ifdef KERNEL_ARCH_PERF -mkdir out # upstream makefile is broken cp -al $(top_srcdir)/tools/perf/Documentation doc + cp -al $(top_srcdir)/tools/perf/config config +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out all VERSION=$(VERSION) +$(MAKE_PERF) -C doc man VERSION=$(VERSION) endif diff --git a/debian/changelog b/debian/changelog index 0a7b852e2..1fc7d4abe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -linux-tools (3.7.1-1~experimental.2) UNRELEASED; urgency=low +linux-tools (3.8-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release -- Jonathan Nieder Sat, 29 Dec 2012 22:51:43 -0800 diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 34d612cde..e8e642c1f 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1051,16 +1051,16 @@ +@@ -1105,20 +1105,20 @@ install: all try-install-man $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -19,6 +19,12 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' - $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' +- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' ++ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' +- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' ++ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' install-python_ext: $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index b4f890461..ee91b535f 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,31 +1,31 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1047,7 +1047,7 @@ +@@ -1101,7 +1101,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p - install: all + install: all try-install-man $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -1069,7 +1069,7 @@ - $(MAKE) -C Documentation install +@@ -1125,7 +1125,7 @@ install-python_ext: - install-man: -- $(MAKE) -C Documentation install-man -+ $(MAKE) -C Documentation install-man VERSION=$(VERSION) + # 'make install-doc' should call 'make -C Documentation install' + $(INSTALL_DOC_TARGETS): +- $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) ++ $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) VERSION=$(VERSION) + + ### Cleaning rules - install-html: - $(MAKE) -C Documentation install-html --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile -@@ -170,13 +170,15 @@ +@@ -188,13 +188,15 @@ ifdef missing_tools + $(error "You need to install $(missing_tools) for man pages") + endif - install: install-man - --install-man: man -+install-man: $(addprefix install-man-,$(_DOC_MAN1)) +-do-install-man: man ++do-install-man: $(addprefix install-man-,$(_DOC_MAN1)) + +install-man-perf.1: $(OUTPUT)perf.1 + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) @@ -40,5 +40,5 @@ -# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) + sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 - install-info: info - $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) + install-man: check-man-tools man + From d205f3002a138ab00ccc54328ea0f0a77afee904 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 2 Mar 2013 16:04:15 +0000 Subject: [PATCH 237/487] Fix version parsing in debian/bin/genorig.py when using a DFSG number svn path=/dists/trunk/linux-tools/; revision=19886 --- debian/bin/genorig.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 3195106e5..cf008a6ec 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -67,8 +67,7 @@ class Main(object): self.orig = '%s-%s' % (source, version.upstream) self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream) - self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1", - version.upstream.replace('~', '-')) + self.tag = 'v' + version.linux_upstream_full def __call__(self): import tempfile From 2725cdf9449db63d3661a0064b80b71951d9a10d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 2 Mar 2013 16:15:44 +0000 Subject: [PATCH 238/487] Apply patches in orig target, matching "dpkg-source -x" and linux orig target svn path=/dists/trunk/linux-tools/; revision=19889 --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index 3a21ac59f..a9358ec7d 100755 --- a/debian/rules +++ b/debian/rules @@ -25,6 +25,7 @@ TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ orig: $(DIR_ORIG) rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . + QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0 $(DIR_ORIG): ifeq ($(TAR_ORIG),) From 8c00a1b1a90df99a7ff79f2a02292f75bf433486 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 2 Mar 2013 16:31:41 +0000 Subject: [PATCH 239/487] Update Python debian_linux module from linux and use it in gencontrol.py svn path=/dists/trunk/linux-tools/; revision=19890 --- debian/bin/gencontrol.py | 62 +--- debian/lib/python/debian_linux/__init__.py | 1 + debian/lib/python/debian_linux/config.py | 298 +++++++++++-------- debian/lib/python/debian_linux/debian.py | 272 +++++++++++------ debian/lib/python/debian_linux/gencontrol.py | 196 ++++++------ debian/lib/python/debian_linux/utils.py | 131 ++++---- 6 files changed, 503 insertions(+), 457 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index c7b9364ec..d67f7d560 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -4,10 +4,10 @@ import sys sys.path.append("debian/lib/python") from debian_linux.debian import * -from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags +from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags, Gencontrol from debian_linux.utils import * -class gencontrol(object): +class gencontrol(Gencontrol): makefile_targets = ('binary-arch', 'build') def __init__(self, underlay = None): @@ -60,63 +60,5 @@ class gencontrol(object): 'source_upstream': version.upstream, } - def process_relation(self, key, e, in_e, vars): - import copy - dep = copy.deepcopy(in_e[key]) - for groups in dep: - for item in groups: - item.name = self.substitute(item.name, vars) - e[key] = dep - - def process_description(self, e, in_e, vars): - in_desc = in_e['Description'] - desc = in_desc.__class__() - desc.short = self.substitute(in_desc.short, vars) - for i in in_desc.long: - desc.append(self.substitute(i, vars)) - e['Description'] = desc - - def process_package(self, in_entry, vars): - e = Package() - for key, value in in_entry.iteritems(): - if isinstance(value, PackageRelation): - self.process_relation(key, e, in_entry, vars) - elif key == 'Description': - self.process_description(e, in_entry, vars) - elif key[:2] == 'X-': - pass - else: - e[key] = self.substitute(value, vars) - return e - - def process_packages(self, in_entries, vars): - entries = [] - for i in in_entries: - entries.append(self.process_package(i, vars)) - return entries - - def substitute(self, s, vars): - if isinstance(s, (list, tuple)): - for i in xrange(len(s)): - s[i] = self.substitute(s[i], vars) - return s - def subst(match): - return vars[match.group(1)] - return re.sub(r'@([a-z_]+)@', subst, s) - - def write_control(self, list): - self.write_rfc822(file("debian/control", 'w'), list) - - def write_makefile(self, makefile): - f = file("debian/rules.gen", 'w') - makefile.write(f) - f.close() - - def write_rfc822(self, f, list): - for entry in list: - for key, value in entry.iteritems(): - f.write("%s: %s\n" % (key, value)) - f.write('\n') - if __name__ == '__main__': gencontrol()() diff --git a/debian/lib/python/debian_linux/__init__.py b/debian/lib/python/debian_linux/__init__.py index e69de29bb..b785cebf7 100644 --- a/debian/lib/python/debian_linux/__init__.py +++ b/debian/lib/python/debian_linux/__init__.py @@ -0,0 +1 @@ +# Module diff --git a/debian/lib/python/debian_linux/config.py b/debian/lib/python/debian_linux/config.py index 7e3e12ae8..17211dddc 100644 --- a/debian/lib/python/debian_linux/config.py +++ b/debian/lib/python/debian_linux/config.py @@ -1,10 +1,17 @@ -import os, os.path, re, sys, textwrap +import os +import os.path +import re +import sys +import textwrap +import cPickle __all__ = [ + 'ConfigCoreDump', + 'ConfigCoreHierarchy', 'ConfigParser', - 'ConfigReaderCore', ] + class SchemaItemBoolean(object): def __call__(self, i): i = i.strip().lower() @@ -14,8 +21,9 @@ class SchemaItemBoolean(object): return False raise Error + class SchemaItemList(object): - def __init__(self, type = "\s+"): + def __init__(self, type="\s+"): self.type = type def __call__(self, i): @@ -24,108 +32,38 @@ class SchemaItemList(object): return [] return [j.strip() for j in re.split(self.type, i)] -class ConfigReaderCore(dict): - config_name = "defines" - schemas = { - 'base': { - 'arches': SchemaItemList(), - 'enabled': SchemaItemBoolean(), - 'featuresets': SchemaItemList(), - 'flavours': SchemaItemList(), - 'modules': SchemaItemBoolean(), - }, - 'image': { - 'configs': SchemaItemList(), - 'initramfs': SchemaItemBoolean(), - 'initramfs-generators': SchemaItemList(), - }, - 'relations': { - }, - 'xen': { - 'dom0-support': SchemaItemBoolean(), - 'versions': SchemaItemList(), - } - } +class ConfigCore(dict): + def get_merge(self, section, arch, featureset, flavour, key, default=None): + temp = [] - def __init__(self, dirs = []): - self._dirs = dirs - self._read_base() + if arch and featureset and flavour: + temp.append(self.get((section, arch, featureset, flavour), {}).get(key)) + temp.append(self.get((section, arch, None, flavour), {}).get(key)) + if arch and featureset: + temp.append(self.get((section, arch, featureset), {}).get(key)) + if arch: + temp.append(self.get((section, arch), {}).get(key)) + if featureset: + temp.append(self.get((section, None, featureset), {}).get(key)) + temp.append(self.get((section,), {}).get(key)) - def _read_arch(self, arch): - config = ConfigParser(self.schemas) - config.read(self.get_files("%s/%s" % (arch, self.config_name))) + ret = [] - featuresets = config['base',].get('featuresets', []) - flavours = config['base',].get('flavours', []) - - for section in iter(config): - if section[0] in featuresets: - real = (section[-1], arch, section[0]) - elif len(section) > 1: - real = (section[-1], arch, None) + section[:-1] + for i in temp: + if i is None: + continue + elif isinstance(i, (list, tuple)): + ret.extend(i) + elif ret: + # TODO + return ret else: - real = (section[-1], arch) + section[:-1] - s = self.get(real, {}) - s.update(config[section]) - self[tuple(real)] = s + return i - for featureset in featuresets: - self._read_arch_featureset(arch, featureset) + return ret or default - if flavours: - base = self['base', arch] - featuresets.insert(0, 'none') - base['featuresets'] = featuresets - del base['flavours'] - self['base', arch] = base - self['base', arch, 'none'] = {'flavours': flavours, 'implicit-flavour': True} - - def _read_arch_featureset(self, arch, featureset): - config = ConfigParser(self.schemas) - config.read(self.get_files("%s/%s/%s" % (arch, featureset, self.config_name))) - - flavours = config['base',].get('flavours', []) - - for section in iter(config): - real = (section[-1], arch, featureset) + section[:-1] - s = self.get(real, {}) - s.update(config[section]) - self[tuple(real)] = s - - def _read_base(self): - config = ConfigParser(self.schemas) - config.read(self.get_files(self.config_name)) - - arches = config['base',]['arches'] - featuresets = config['base',]['featuresets'] - - for section in iter(config): - if section[0].startswith('featureset-'): - real = (section[-1], None, section[0].lstrip('featureset-')) - else: - real = (section[-1],) + section[1:] - self[real] = config[section] - - for arch in arches: - self._read_arch(arch) - for featureset in featuresets: - self._read_featureset(featureset) - - def _read_featureset(self, featureset): - config = ConfigParser(self.schemas) - config.read(self.get_files("featureset-%s/%s" % (featureset, self.config_name))) - - for section in iter(config): - real = (section[-1], None, featureset) - s = self.get(real, {}) - s.update(config[section]) - self[real] = s - - def get_files(self, name): - return [os.path.join(i, name) for i in self._dirs if i] - - def merge(self, section, arch = None, featureset = None, flavour = None): + def merge(self, section, arch=None, featureset=None, flavour=None): ret = {} ret.update(self.get((section,), {})) if featureset: @@ -139,6 +77,118 @@ class ConfigReaderCore(dict): ret.update(self.get((section, arch, featureset, flavour), {})) return ret + def dump(self, fp): + cPickle.dump(self, fp, 0) + + +class ConfigCoreDump(object): + def __new__(self, fp): + return cPickle.load(fp) + + +class ConfigCoreHierarchy(object): + schema_base = { + 'base': { + 'arches': SchemaItemList(), + 'enabled': SchemaItemBoolean(), + 'featuresets': SchemaItemList(), + 'flavours': SchemaItemList(), + }, + } + + def __new__(cls, schema, dirs=[]): + schema_complete = cls.schema_base.copy() + for key, value in schema.iteritems(): + schema_complete.setdefault(key, {}).update(value) + return cls.Reader(dirs, schema_complete)() + + class Reader(object): + config_name = "defines" + + def __init__(self, dirs, schema): + self.dirs, self.schema = dirs, schema + + def __call__(self): + ret = ConfigCore() + self.read(ret) + return ret + + def get_files(self, *dirs): + dirs = list(dirs) + dirs.append(self.config_name) + return (os.path.join(i, *dirs) for i in self.dirs if i) + + def read_arch(self, ret, arch): + config = ConfigParser(self.schema) + config.read(self.get_files(arch)) + + featuresets = config['base', ].get('featuresets', []) + flavours = config['base', ].get('flavours', []) + + for section in iter(config): + if section[0] in featuresets: + real = (section[-1], arch, section[0]) + elif len(section) > 1: + real = (section[-1], arch, None) + section[:-1] + else: + real = (section[-1], arch) + section[:-1] + s = ret.get(real, {}) + s.update(config[section]) + ret[tuple(real)] = s + + for featureset in featuresets: + self.read_arch_featureset(ret, arch, featureset) + + if flavours: + base = ret['base', arch] + featuresets.insert(0, 'none') + base['featuresets'] = featuresets + del base['flavours'] + ret['base', arch] = base + ret['base', arch, 'none'] = {'flavours': flavours, 'implicit-flavour': True} + + def read_arch_featureset(self, ret, arch, featureset): + config = ConfigParser(self.schema) + config.read(self.get_files(arch, featureset)) + + flavours = config['base', ].get('flavours', []) + + for section in iter(config): + real = (section[-1], arch, featureset) + section[:-1] + s = ret.get(real, {}) + s.update(config[section]) + ret[tuple(real)] = s + + def read(self, ret): + config = ConfigParser(self.schema) + config.read(self.get_files()) + + arches = config['base', ]['arches'] + featuresets = config['base', ].get('featuresets', []) + + for section in iter(config): + if section[0].startswith('featureset-'): + real = (section[-1], None, section[0][11:]) + else: + real = (section[-1],) + section[1:] + ret[real] = config[section] + + for arch in arches: + self.read_arch(ret, arch) + for featureset in featuresets: + self.read_featureset(ret, featureset) + + def read_featureset(self, ret, featureset): + config = ConfigParser(self.schema) + config.read(self.get_files('featureset-%s' % featureset)) + + for section in iter(config): + real = (section[-1], None, featureset) + s = ret.get(real, {}) + s.update(config[section]) + ret[real] = s + + class ConfigParser(object): __slots__ = '_config', 'schemas' @@ -163,47 +213,37 @@ class ConfigParser(object): data = {} for key, value in self._config.items(section): data[key] = value - s1 = section.split('_') - if s1[-1] in self.schemas: - ret[tuple(s1)] = self.SectionSchema(data, self.schemas[s1[-1]]) + section_list = section.split('_') + section_base = section_list[-1] + if section_base in self.schemas: + section_ret = tuple(section_list) + data = self._convert_one(self.schemas[section_base], data) else: - ret[(section,)] = self.Section(data) + section_ret = (section, ) + ret[section_ret] = data return ret + def _convert_one(self, schema, data): + ret = {} + for key, value in data.iteritems(): + if key in schema: + value = schema[key](value) + ret[key] = value + return ret + def keys(self): return self._convert().keys() def read(self, data): return self._config.read(data) - class Section(dict): - def __init__(self, data): - super(ConfigParser.Section, self).__init__(data) - - def __str__(self): - return '<%s(%s)>' % (self.__class__.__name__, self._data) - - class SectionSchema(Section): - __slots__ = () - - def __init__(self, data, schema): - for key in data.keys(): - try: - data[key] = schema[key](data[key]) - except KeyError: pass - super(ConfigParser.SectionSchema, self).__init__(data) if __name__ == '__main__': import sys - config = ConfigReaderCore(['debian/config']) - sections = config.keys() - sections.sort() - for section in sections: - print "[%s]" % (section,) - items = config[section] - items_keys = items.keys() - items_keys.sort() - for item in items: - print "%s: %s" % (item, items[item]) + sys.path.append('debian/lib/python') + config = ConfigCoreDump(open('debian/config.defines.dump')) + for section, items in sorted(config.iteritems()): + print u"[%s]" % (section,) + for item, value in sorted(items.iteritems()): + print u"%s: %s" % (item, value) print - diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index a949c90cd..a57752658 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -1,4 +1,10 @@ -import itertools, os.path, re, utils +import collections +import itertools +import os.path +import re + +from . import utils + class Changelog(list): _rules = r""" @@ -26,7 +32,7 @@ class Changelog(list): def __init__(self, distribution, source, version): self.distribution, self.source, self.version = distribution, source, version - def __init__(self, dir = '', version = None): + def __init__(self, dir='', version=None): if version is None: version = Version f = file(os.path.join(dir, "debian/changelog")) @@ -45,6 +51,7 @@ class Changelog(list): v = Version(match.group('version')) self.append(self.Entry(match.group('distribution'), match.group('source'), v)) + class Version(object): _version_rules = ur""" ^ @@ -59,7 +66,7 @@ class Version(object): ) (?: - - (?P[^-]+) + (?P[^-]+) )? $ """ @@ -68,37 +75,45 @@ $ def __init__(self, version): match = self._version_re.match(version) if match is None: - raise RuntimeError, "Invalid debian version" + raise RuntimeError(u"Invalid debian version") self.epoch = None if match.group("epoch") is not None: self.epoch = int(match.group("epoch")) self.upstream = match.group("upstream") - self.debian = match.group("debian") + self.revision = match.group("revision") - def __str__(self): + def __unicode__(self): return self.complete @property def complete(self): if self.epoch is not None: - return "%d:%s" % (self.epoch, self.complete_noepoch) + return u"%d:%s" % (self.epoch, self.complete_noepoch) return self.complete_noepoch @property def complete_noepoch(self): - if self.debian is not None: - return "%s-%s" % (self.upstream, self.debian) + if self.revision is not None: + return u"%s-%s" % (self.upstream, self.revision) return self.upstream + @property + def debian(self): + from warnings import warn + warn(u"debian argument was replaced by revision", DeprecationWarning, stacklevel=2) + return self.revision + + class VersionLinux(Version): _version_linux_rules = ur""" ^ (?P \d+\.\d+ ) -(?: +(?P \.\d+ - | +)? +(?: ~ (?P .+? @@ -111,7 +126,17 @@ class VersionLinux(Version): ) )? - -(?:[^-]+) +\d+ +(\.\d+)? +(?: + (?P + ~experimental\.\d+ + ) + | + (?P + [^-]+ + ) +)? $ """ _version_linux_re = re.compile(_version_linux_rules, re.X) @@ -120,125 +145,159 @@ $ super(VersionLinux, self).__init__(version) match = self._version_linux_re.match(version) if match is None: - raise RuntimeError, "Invalid debian linux version" + raise RuntimeError(u"Invalid debian linux version") d = match.groupdict() self.linux_modifier = d['modifier'] self.linux_version = d['version'] if d['modifier'] is not None: - self.linux_upstream = '-'.join((d['version'], d['modifier'])) + assert not d['update'] + self.linux_upstream = u'-'.join((d['version'], d['modifier'])) else: self.linux_upstream = d['version'] + self.linux_upstream_full = self.linux_upstream + (d['update'] or u'') self.linux_dfsg = d['dfsg'] - -class PackageFieldList(list): - def __init__(self, value = None): - self.extend(value) + self.linux_revision_experimental = match.group('revision_experimental') and True + self.linux_revision_other = match.group('revision_other') and True - def __str__(self): - return ' '.join(self) - def _extend(self, value): - if value is not None: - self.extend([j.strip() for j in re.split('\s', value.strip())]) +class PackageArchitecture(collections.MutableSet): + __slots__ = '_data' + + def __init__(self, value=None): + self._data = set() + if value: + self.extend(value) + + def __contains__(self, value): + return self._data.__contains__(value) + + def __iter__(self): + return self._data.__iter__() + + def __len__(self): + return self._data.__len__() + + def __unicode__(self): + return u' '.join(sorted(self)) + + def add(self, value): + self._data.add(value) + + def discard(self, value): + self._data.discard(value) def extend(self, value): - if isinstance(value, str): - self._extend(value) + if isinstance(value, basestring): + for i in re.split('\s', value.strip()): + self.add(i) else: - super(PackageFieldList, self).extend(value) + raise RuntimeError + class PackageDescription(object): __slots__ = "short", "long" - def __init__(self, value = None): + def __init__(self, value=None): + self.short = [] self.long = [] if value is not None: - self.short, long = value.split("\n", 1) + short, long = value.split(u"\n", 1) self.append(long) - else: - self.short = None + self.append_short(short) - def __str__(self): - ret = self.short + '\n' - w = utils.TextWrapper(width = 74, fix_sentence_endings = True) - pars = [] + def __unicode__(self): + wrap = utils.TextWrapper(width=74, fix_sentence_endings=True).wrap + short = u', '.join(self.short) + long_pars = [] for i in self.long: - pars.append('\n '.join(w.wrap(i))) - return self.short + '\n ' + '\n .\n '.join(pars) + long_pars.append(wrap(i)) + long = u'\n .\n '.join([u'\n '.join(i) for i in long_pars]) + return short + u'\n ' + long def append(self, str): str = str.strip() if str: - self.long.extend(str.split("\n.\n")) + self.long.extend(str.split(u"\n.\n")) + + def append_short(self, str): + for i in [i.strip() for i in str.split(u",")]: + if i: + self.short.append(i) + + def extend(self, desc): + if isinstance(desc, PackageDescription): + self.short.extend(desc.short) + self.long.extend(desc.long) + else: + raise TypeError + class PackageRelation(list): - def __init__(self, value = None): - if value is not None: - self.extend(value) + def __init__(self, value=None, override_arches=None): + if value: + self.extend(value, override_arches) - def __str__(self): - return ', '.join([str(i) for i in self]) + def __unicode__(self): + return u', '.join((unicode(i) for i in self)) - def _match(self, value): + def _search_value(self, value): for i in self: - if i._match(value): + if i._search_value(value): return i return None - def append(self, value): + def append(self, value, override_arches=None): if isinstance(value, basestring): - value = PackageRelationGroup(value) + value = PackageRelationGroup(value, override_arches) elif not isinstance(value, PackageRelationGroup): - raise ValueError, "got %s" % type(value) - j = self._match(value) + raise ValueError(u"got %s" % type(value)) + j = self._search_value(value) if j: - j._updateArches(value) + j._update_arches(value) else: super(PackageRelation, self).append(value) - def extend(self, value): + def extend(self, value, override_arches=None): if isinstance(value, basestring): - value = [j.strip() for j in re.split(',', value.strip())] - elif not isinstance(value, (list, tuple)): - raise ValueError, "got %s" % type(value) + value = (j.strip() for j in re.split(u',', value.strip())) for i in value: - self.append(i) + self.append(i, override_arches) + class PackageRelationGroup(list): - def __init__(self, value = None): - if value is not None: - self.extend(value) + def __init__(self, value=None, override_arches=None): + if value: + self.extend(value, override_arches) - def __str__(self): - return ' | '.join([str(i) for i in self]) + def __unicode__(self): + return u' | '.join((unicode(i) for i in self)) - def _match(self, value): + def _search_value(self, value): for i, j in itertools.izip(self, value): if i.name != j.name or i.version != j.version: return None return self - def _updateArches(self, value): + def _update_arches(self, value): for i, j in itertools.izip(self, value): if i.arches: for arch in j.arches: if arch not in i.arches: i.arches.append(arch) - def append(self, value): + def append(self, value, override_arches=None): if isinstance(value, basestring): - value = PackageRelationEntry(value) + value = PackageRelationEntry(value, override_arches) elif not isinstance(value, PackageRelationEntry): raise ValueError super(PackageRelationGroup, self).append(value) - def extend(self, value): + def extend(self, value, override_arches=None): if isinstance(value, basestring): - value = [j.strip() for j in re.split('\|', value.strip())] - elif not isinstance(value, (list, tuple)): - raise ValueError + value = (j.strip() for j in re.split('\|', value.strip())) for i in value: - self.append(i) + self.append(i, override_arches) + class PackageRelationEntry(object): __slots__ = "name", "operator", "version", "arches" @@ -246,9 +305,31 @@ class PackageRelationEntry(object): _re = re.compile(r'^(\S+)(?: \((<<|<=|=|!=|>=|>>)\s*([^)]+)\))?(?: \[([^]]+)\])?$') class _operator(object): - OP_LT = 1; OP_LE = 2; OP_EQ = 3; OP_NE = 4; OP_GE = 5; OP_GT = 6 - operators = { '<<': OP_LT, '<=': OP_LE, '=': OP_EQ, '!=': OP_NE, '>=': OP_GE, '>>': OP_GT } - operators_neg = { OP_LT: OP_GE, OP_LE: OP_GT, OP_EQ: OP_NE, OP_NE: OP_EQ, OP_GE: OP_LT, OP_GT: OP_LE } + OP_LT = 1 + OP_LE = 2 + OP_EQ = 3 + OP_NE = 4 + OP_GE = 5 + OP_GT = 6 + + operators = { + u'<<': OP_LT, + u'<=': OP_LE, + u'=': OP_EQ, + u'!=': OP_NE, + u'>=': OP_GE, + u'>>': OP_GT, + } + + operators_neg = { + OP_LT: OP_GE, + OP_LE: OP_GT, + OP_EQ: OP_NE, + OP_NE: OP_EQ, + OP_GE: OP_LT, + OP_GT: OP_LE, + } + operators_text = dict([(b, a) for a, b in operators.iteritems()]) __slots__ = '_op', @@ -259,27 +340,30 @@ class PackageRelationEntry(object): def __neg__(self): return self.__class__(self.operators_text[self.operators_neg[self._op]]) - def __str__(self): + def __unicode__(self): return self.operators_text[self._op] - def __init__(self, value = None): - if isinstance(value, basestring): - self.parse(value) - else: + def __init__(self, value=None, override_arches=None): + if not isinstance(value, basestring): raise ValueError - def __str__(self): + self.parse(value) + + if override_arches: + self.arches = list(override_arches) + + def __unicode__(self): ret = [self.name] if self.operator is not None and self.version is not None: - ret.extend([' (', str(self.operator), ' ', self.version, ')']) + ret.extend((u' (', unicode(self.operator), u' ', self.version, u')')) if self.arches: - ret.extend([' [', ' '.join(self.arches), ']']) - return ''.join(ret) + ret.extend((u' [', u' '.join(self.arches), u']')) + return u''.join(ret) def parse(self, value): match = self._re.match(value) if match is None: - raise RuntimeError, "Can't parse dependency %s" % value + raise RuntimeError(u"Can't parse dependency %s" % value) match = match.groups() self.name = match[0] if match[1] is not None: @@ -292,16 +376,17 @@ class PackageRelationEntry(object): else: self.arches = [] + class Package(dict): - _fields = utils.SortedDict(( - ('Package', str), - ('Source', str), - ('Architecture', PackageFieldList), - ('Section', str), - ('Priority', str), - ('Maintainer', str), - ('Uploaders', str), - ('Standards-Version', str), + _fields = collections.OrderedDict(( + ('Package', unicode), + ('Source', unicode), + ('Architecture', PackageArchitecture), + ('Section', unicode), + ('Priority', unicode), + ('Maintainer', unicode), + ('Uploaders', unicode), + ('Standards-Version', unicode), ('Build-Depends', PackageRelation), ('Build-Depends-Indep', PackageRelation), ('Provides', PackageRelation), @@ -310,6 +395,7 @@ class Package(dict): ('Recommends', PackageRelation), ('Suggests', PackageRelation), ('Replaces', PackageRelation), + ('Breaks', PackageRelation), ('Conflicts', PackageRelation), ('Description', PackageDescription), )) @@ -319,13 +405,14 @@ class Package(dict): cls = self._fields[key] if not isinstance(value, cls): value = cls(value) - except KeyError: pass + except KeyError: + pass super(Package, self).__setitem__(key, value) def iterkeys(self): keys = set(self.keys()) for i in self._fields.iterkeys(): - if self.has_key(i): + if i in self: keys.remove(i) yield i for i in keys: @@ -338,4 +425,3 @@ class Package(dict): def itervalues(self): for i in self.iterkeys(): yield self[i] - diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index 4128ce58d..aac564c42 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -1,8 +1,10 @@ -from config import * -from debian import * -from utils import * +import codecs +from collections import OrderedDict -class PackagesList(SortedDict): +from .debian import * + + +class PackagesList(OrderedDict): def append(self, package): self[package['Package']] = package @@ -10,16 +12,21 @@ class PackagesList(SortedDict): for package in packages: self[package['Package']] = package + class Makefile(object): def __init__(self): self.rules = {} self.add('.NOTPARALLEL') - def add(self, name, deps = None, cmds = None): + def add(self, name, deps=None, cmds=None): if name in self.rules: self.rules[name].add(deps, cmds) else: self.rules[name] = self.Rule(name, deps, cmds) + if deps is not None: + for i in deps: + if i not in self.rules: + self.rules[i] = self.Rule(i) def write(self, out): r = self.rules.keys() @@ -28,12 +35,12 @@ class Makefile(object): self.rules[i].write(out) class Rule(object): - def __init__(self, name, deps = None, cmds = None): + def __init__(self, name, deps=None, cmds=None): self.name = name self.deps, self.cmds = set(), [] self.add(deps, cmds) - def add(self, deps = None, cmds = None): + def add(self, deps=None, cmds=None): if deps is not None: self.deps.update(deps) if cmds is not None: @@ -56,22 +63,25 @@ class Makefile(object): else: out.write('%s:%s\n' % (self.name, deps_string)) + class MakeFlags(dict): def __repr__(self): repr = super(flags, self).__repr__() return "%s(%s)" % (self.__class__.__name__, repr) def __str__(self): - return ' '.join(["%s='%s'" % i for i in self.iteritems()]) + return ' '.join(["%s='%s'" % i for i in sorted(self.iteritems())]) def copy(self): return self.__class__(super(MakeFlags, self).copy()) -class Gencontrol(object): - makefile_targets = ('binary-arch', 'build', 'setup', 'source') - def __init__(self, config, templates): +class Gencontrol(object): + makefile_targets = ('binary-arch', 'build-arch', 'setup') + + def __init__(self, config, templates, version=Version): self.config, self.templates = config, templates + self.changelog = Changelog(version=version) def __call__(self): packages = PackagesList() @@ -81,45 +91,42 @@ class Gencontrol(object): self.do_main(packages, makefile) self.do_extra(packages, makefile) - self.write_control(packages.itervalues()) - self.write_makefile(makefile) + self.write(packages, makefile) def do_source(self, packages): - source = self.templates["control.source"] - packages['source'] = self.process_package(source[0], self.vars) + source = self.templates["control.source"][0] + source['Source'] = self.changelog[0].source + packages['source'] = self.process_package(source) def do_main(self, packages, makefile): - config_entry = self.config['base',] + config_entry = self.config['base', ] vars = self.vars.copy() - vars.update(config_entry) makeflags = MakeFlags() extra = {} self.do_main_setup(vars, makeflags, extra) - self.do_main_packages(packages, extra) self.do_main_makefile(makefile, makeflags, extra) - - for arch in iter(self.config['base',]['arches']): - self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra) + self.do_main_packages(packages, vars, makeflags, extra) + self.do_main_recurse(packages, makefile, vars, makeflags, extra) def do_main_setup(self, vars, makeflags, extra): - makeflags.update({ - 'VERSION': self.version.linux_version, - 'UPSTREAMVERSION': self.version.linux_upstream, - 'ABINAME': self.abiname, - }) - - def do_main_makefile(self, makefile, makeflags, extra): - makefile.add('binary-indep', cmds = ["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags]) - - def do_main_packages(self, packages, extra): pass + def do_main_makefile(self, makefile, makeflags, extra): + makefile.add('build-indep', cmds=["$(MAKE) -f debian/rules.real build-indep %s" % makeflags]) + makefile.add('binary-indep', cmds=["$(MAKE) -f debian/rules.real binary-indep %s" % makeflags]) + + def do_main_packages(self, packages, vars, makeflags, extra): + pass + + def do_main_recurse(self, packages, makefile, vars, makeflags, extra): + for arch in iter(self.config['base', ]['arches']): + self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), extra) + def do_extra(self, packages, makefile): - try: - templates_extra = self.templates["control.extra"] - except IOError: + templates_extra = self.templates.get("control.extra", None) + if templates_extra is None: return packages.extend(self.process_packages(templates_extra, {})) @@ -136,19 +143,15 @@ class Gencontrol(object): cmds = [] for i in extra_arches[arch]: tmp = [] - if i.has_key('X-Version-Overwrite-Epoch'): + if 'X-Version-Overwrite-Epoch' in i: tmp.append("-v1:%s" % self.version['source']) cmds.append("$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-p%s' GENCONTROL_ARGS='%s'" % (i['Package'], ' '.join(tmp))) - makefile.add('binary-arch_%s' % arch ['binary-arch_%s_extra' % arch]) - makefile.add("binary-arch_%s_extra" % arch, cmds = cmds) + makefile.add('binary-arch_%s' % arch['binary-arch_%s_extra' % arch]) + makefile.add("binary-arch_%s_extra" % arch, cmds=cmds) def do_arch(self, packages, makefile, arch, vars, makeflags, extra): - config_base = self.config['base', arch] - vars.update(config_base) vars['arch'] = arch - makeflags['ARCH'] = arch - self.do_arch_setup(vars, makeflags, arch, extra) self.do_arch_makefile(makefile, arch, makeflags, extra) self.do_arch_packages(packages, makefile, arch, vars, makeflags, extra) @@ -158,29 +161,27 @@ class Gencontrol(object): pass def do_arch_makefile(self, makefile, arch, makeflags, extra): + makeflags['ARCH'] = arch + for i in self.makefile_targets: target1 = i - target2 = "%s_%s" % (i, arch) + target2 = '_'.join((target1, arch)) + target3 = '_'.join((target2, 'real')) makefile.add(target1, [target2]) - makefile.add(target2, ['%s_real' % target2]) - makefile.add('%s_real' % target2) + makefile.add(target2, [target3]) def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra): pass def do_arch_recurse(self, packages, makefile, arch, vars, makeflags, extra): - for featureset in self.config['base', arch]['featuresets']: + for featureset in self.config['base', arch].get('featuresets', ()): self.do_featureset(packages, makefile, arch, featureset, vars.copy(), makeflags.copy(), extra) def do_featureset(self, packages, makefile, arch, featureset, vars, makeflags, extra): config_base = self.config.merge('base', arch, featureset) - vars.update(config_base) - if not config_base.get('enabled', True): return - makeflags['FEATURESET'] = featureset - vars['localversion'] = '' if featureset != 'none': vars['localversion'] = '-' + featureset @@ -194,12 +195,14 @@ class Gencontrol(object): pass def do_featureset_makefile(self, makefile, arch, featureset, makeflags, extra): + makeflags['FEATURESET'] = featureset + for i in self.makefile_targets: - target1 = "%s_%s" % (i, arch) - target2 = "%s_%s_%s" % (i, arch, featureset) + target1 = '_'.join((i, arch)) + target2 = '_'.join((target1, featureset)) + target3 = '_'.join((target2, 'real')) makefile.add(target1, [target2]) - makefile.add(target2, ['%s_real' % target2]) - makefile.add('%s_real' % target2) + makefile.add(target2, [target3]) def do_featureset_packages(self, packages, makefile, arch, featureset, vars, makeflags, extra): pass @@ -210,12 +213,7 @@ class Gencontrol(object): def do_flavour(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra): config_base = self.config.merge('base', arch, featureset, flavour) - vars.update(config_base) - if not vars.has_key('longclass'): - vars['longclass'] = vars['class'] - - makeflags['FLAVOUR'] = flavour vars['localversion'] += '-' + flavour self.do_flavour_setup(vars, makeflags, arch, featureset, flavour, extra) @@ -227,74 +225,74 @@ class Gencontrol(object): ('kernel-arch', 'KERNEL_ARCH'), ('localversion', 'LOCALVERSION'), ): - if vars.has_key(i[0]): + if i[0] in vars: makeflags[i[1]] = vars[i[0]] def do_flavour_makefile(self, makefile, arch, featureset, flavour, makeflags, extra): + makeflags['FLAVOUR'] = flavour + for i in self.makefile_targets: - target1 = "%s_%s_%s" % (i, arch, featureset) - target2 = "%s_%s_%s_%s" % (i, arch, featureset, flavour) + target1 = '_'.join((i, arch, featureset)) + target2 = '_'.join((target1, flavour)) + target3 = '_'.join((target2, 'real')) makefile.add(target1, [target2]) - makefile.add(target2, ['%s_real' % target2]) - makefile.add('%s_real' % target2) + makefile.add(target2, [target3]) def do_flavour_packages(self, packages, makefile, arch, featureset, flavour, vars, makeflags, extra): pass - def process_relation(self, key, e, in_e, vars): + def process_relation(self, dep, vars): import copy - dep = copy.deepcopy(in_e[key]) + dep = copy.deepcopy(dep) for groups in dep: for item in groups: item.name = self.substitute(item.name, vars) - e[key] = dep + if item.version: + item.version = self.substitute(item.version, vars) + return dep - def process_description(self, e, in_e, vars): - in_desc = in_e['Description'] + def process_description(self, in_desc, vars): desc = in_desc.__class__() desc.short = self.substitute(in_desc.short, vars) for i in in_desc.long: desc.append(self.substitute(i, vars)) - e['Description'] = desc + return desc - def process_package(self, in_entry, vars): - e = Package() + def process_package(self, in_entry, vars={}): + entry = in_entry.__class__() for key, value in in_entry.iteritems(): if isinstance(value, PackageRelation): - self.process_relation(key, e, in_entry, vars) - elif key == 'Description': - self.process_description(e, in_entry, vars) - elif key[:2] == 'X-': - pass + value = self.process_relation(value, vars) + elif isinstance(value, PackageDescription): + value = self.process_description(value, vars) else: - e[key] = self.substitute(value, vars) - return e + value = self.substitute(value, vars) + entry[key] = value + return entry - def process_packages(self, in_entries, vars): - entries = [] - for i in in_entries: - entries.append(self.process_package(i, vars)) - return entries - - def process_version_linux(self, version, abiname): - return { - 'upstreamversion': version.linux_upstream, - 'version': version.linux_version, - 'source_upstream': version.upstream, - 'abiname': abiname, - } + def process_packages(self, entries, vars): + return [self.process_package(i, vars) for i in entries] def substitute(self, s, vars): if isinstance(s, (list, tuple)): - for i in xrange(len(s)): - s[i] = self.substitute(s[i], vars) - return s + return [self.substitute(i, vars) for i in s] + def subst(match): return vars[match.group(1)] - return re.sub(r'@([-_a-z]+)@', subst, s) + + return re.sub(r'@([-_a-z]+)@', subst, unicode(s)) + + def write(self, packages, makefile): + self.write_control(packages.itervalues()) + self.write_makefile(makefile) + + def write_config(self): + f = file("debian/config.dump", 'w') + self.config.write(f) + f.close() def write_control(self, list): - self.write_rfc822(file("debian/control", 'w'), list) + self.write_rfc822(codecs.open("debian/control", 'w', 'utf-8'), list) def write_makefile(self, makefile): f = file("debian/rules.gen", 'w') @@ -304,7 +302,5 @@ class Gencontrol(object): def write_rfc822(self, f, list): for entry in list: for key, value in entry.iteritems(): - f.write("%s: %s\n" % (key, value)) - f.write('\n') - - + f.write(u"%s: %s\n" % (key, value)) + f.write(u'\n') diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index abe46b7b3..563104ed3 100644 --- a/debian/lib/python/debian_linux/utils.py +++ b/debian/lib/python/debian_linux/utils.py @@ -1,50 +1,20 @@ -import debian, re, os, textwrap +import codecs +import os +import re +import textwrap -class SortedDict(dict): - __slots__ = '_list', - def __init__(self, entries = None): - super(SortedDict, self).__init__() - self._list = [] - if entries is not None: - for key, value in entries: - self[key] = value - - def __delitem__(self, key): - super(SortedDict, self).__delitem__(key) - self._list.remove(key) - - def __setitem__(self, key, value): - super(SortedDict, self).__setitem__(key, value) - if key not in self._list: - self._list.append(key) - - def iterkeys(self): - for i in iter(self._list): - yield i - - def iteritems(self): - for i in iter(self._list): - yield (i, self[i]) - - def itervalues(self): - for i in iter(self._list): - yield self[i] - -class Templates(dict): - def __init__(self, dirs = ["debian/templates"]): +class Templates(object): + def __init__(self, dirs=["debian/templates"]): self.dirs = dirs - def __getitem__(self, key): - try: - return super(Templates, self).__getitem__(key) - except KeyError: pass - value = self._read(key) - super(Templates, self).__setitem__(key, value) - return value + self._cache = {} - def __setitem__(self, key, value): - raise NotImplemented() + def __getitem__(self, key): + ret = self.get(key) + if ret is not None: + return ret + raise KeyError(key) def _read(self, name): prefix, id = name.split('.', 1) @@ -52,49 +22,60 @@ class Templates(dict): for dir in self.dirs: filename = "%s/%s.in" % (dir, name) if os.path.exists(filename): - f = file(filename) + f = codecs.open(filename, 'r', 'utf-8') if prefix == 'control': - return self._read_control(f) + return read_control(f) return f.read() - raise KeyError(name) - def _read_control(self, f): - entries = [] + def get(self, key, default=None): + if key in self._cache: + return self._cache[key] + value = self._cache.setdefault(key, self._read(key)) + if value is None: + return default + return value + + +def read_control(f): + from .debian import Package + + entries = [] + eof = False + + while not eof: + e = Package() + last = None + lines = [] while True: - e = debian.Package() - last = None - lines = [] - while True: - line = f.readline() - if not line: - break - line = line.strip('\n') - if not line: - break - if line[0] in ' \t': - if not last: - raise ValueError('Continuation line seen before first header') - lines.append(line.lstrip()) - continue - if last: - e[last] = '\n'.join(lines) - i = line.find(':') - if i < 0: - raise ValueError("Not a header, not a continuation: ``%s''" % line) - last = line[:i] - lines = [line[i+1:].lstrip()] - if last: - e[last] = '\n'.join(lines) - if not e: + line = f.readline() + if not line: + eof = True break - + line = line.strip('\n') + if not line: + break + if line[0] in ' \t': + if not last: + raise ValueError(u'Continuation line seen before first header') + lines.append(line.lstrip()) + continue + if last: + e[last] = u'\n'.join(lines) + i = line.find(':') + if i < 0: + raise ValueError(u"Not a header, not a continuation: ``%s''" % line) + last = line[:i] + lines = [line[i + 1:].lstrip()] + if last: + e[last] = '\n'.join(lines) + if e: entries.append(e) - return entries + return entries + class TextWrapper(textwrap.TextWrapper): wordsep_re = re.compile( r'(\s+|' # any whitespace r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash - From 9e5d7a5001b801d55e0855ba7e963b4309deaf41 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Mar 2013 04:14:49 +0000 Subject: [PATCH 240/487] Add bug closure for new upstream version svn path=/dists/trunk/linux-tools/; revision=19904 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1fc7d4abe..c7c89cf72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ linux-tools (3.8-1~experimental.1) UNRELEASED; urgency=low - * New upstream release + * New upstream release (Closes: #702450) -- Jonathan Nieder Sat, 29 Dec 2012 22:51:43 -0800 From 897cc92da0c81674835557441291b20985da4c12 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Mar 2013 04:26:32 +0000 Subject: [PATCH 241/487] Update to 3.8.2 svn path=/dists/trunk/linux-tools/; revision=19905 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c7c89cf72..f556237c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.8-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.8.2-1~experimental.1) UNRELEASED; urgency=low * New upstream release (Closes: #702450) From c8f35be001ddce5a0d94d9c902b92343cc14caf3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Mar 2013 05:00:13 +0000 Subject: [PATCH 242/487] linux-tools: Install bash_completion script for perf with a version-dependent name (Closes: #701790) svn path=/dists/trunk/linux-tools/; revision=19906 --- debian/changelog | 4 ++++ debian/patches/tools-perf-install.patch | 4 ++-- debian/patches/tools-perf-version.patch | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f556237c8..e503134e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ linux-tools (3.8.2-1~experimental.1) UNRELEASED; urgency=low * New upstream release (Closes: #702450) + [ Ben Hutchings ] + * linux-tools: Install bash_completion script for perf with a version- + dependent name (Closes: #701790) + -- Jonathan Nieder Sat, 29 Dec 2012 22:51:43 -0800 linux-tools (3.7.1-1~experimental.1) experimental; urgency=low diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index e8e642c1f..0e5926b61 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -17,8 +17,8 @@ + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' -- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' -+ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' +- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' ++ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' - $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' + $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index ee91b535f..4e78ad0e9 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,6 +9,15 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' +@@ -1114,7 +1114,7 @@ install: all try-install-man + $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' + $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' +- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' + $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' @@ -1125,7 +1125,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' From 446cec59898afd89b27ab51e9dbdf23e21ef0d34 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 7 Mar 2013 06:14:52 +0000 Subject: [PATCH 243/487] Prepare to release linux-tools (3.8.2-1~experimental.1). svn path=/dists/trunk/linux-tools/; revision=19908 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e503134e4..b32feecc3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.8.2-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.8.2-1~experimental.1) experimental; urgency=low * New upstream release (Closes: #702450) @@ -6,7 +6,7 @@ linux-tools (3.8.2-1~experimental.1) UNRELEASED; urgency=low * linux-tools: Install bash_completion script for perf with a version- dependent name (Closes: #701790) - -- Jonathan Nieder Sat, 29 Dec 2012 22:51:43 -0800 + -- Ben Hutchings Thu, 07 Mar 2013 05:32:40 +0000 linux-tools (3.7.1-1~experimental.1) experimental; urgency=low From 7609e9a78d4202b442d418eec75465a73c0ed889 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 7 May 2013 01:11:07 +0000 Subject: [PATCH 244/487] Update to 3.8.11 svn path=/dists/sid/linux-tools/; revision=20055 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b32feecc3..e73ea211b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.8.11-1) UNRELEASED; urgency=low + + * New upstream stable update + + -- Ben Hutchings Tue, 07 May 2013 02:03:13 +0100 + linux-tools (3.8.2-1~experimental.1) experimental; urgency=low * New upstream release (Closes: #702450) From cc2ca471cdab53bf81d9accc666e50df1a0aca53 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 7 May 2013 05:54:07 +0000 Subject: [PATCH 245/487] Prepare to release linux-tools (3.8.11-1). Upload to unstable (Closes: #707023) svn path=/dists/sid/linux-tools/; revision=20056 --- debian/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e73ea211b..13bce3553 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ -linux-tools (3.8.11-1) UNRELEASED; urgency=low +linux-tools (3.8.11-1) unstable; urgency=low * New upstream stable update - -- Ben Hutchings Tue, 07 May 2013 02:03:13 +0100 + [ Ben Hutchings ] + * Upload to unstable (Closes: #707023) + + -- Ben Hutchings Tue, 07 May 2013 02:11:16 +0100 linux-tools (3.8.2-1~experimental.1) experimental; urgency=low From ebd4d6c14ac4664fbd2c6f30d038452d37dc7091 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 May 2013 03:56:32 +0000 Subject: [PATCH 246/487] Update to 3.9.3 svn path=/dists/trunk/linux-tools/; revision=20134 --- debian/changelog | 6 ++++++ debian/patches/series | 1 - debian/patches/tools-perf-install.patch | 6 +++--- debian/patches/tools-perf-version.patch | 8 ++++---- debian/patches/usbip-update-man-pages.patch | 14 -------------- 5 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 debian/patches/usbip-update-man-pages.patch diff --git a/debian/changelog b/debian/changelog index b32feecc3..13e5d01d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.9.3-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release + + -- Ben Hutchings Tue, 21 May 2013 02:15:28 +0100 + linux-tools (3.8.2-1~experimental.1) experimental; urgency=low * New upstream release (Closes: #702450) diff --git a/debian/patches/series b/debian/patches/series index 458433eb6..8a0a63bc7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch -usbip-update-man-pages.patch usbip-document-tcp-wrappers.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 0e5926b61..4f6e7c7a3 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1105,20 +1105,20 @@ install: all try-install-man +@@ -1145,20 +1145,20 @@ install-bin: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -26,5 +26,5 @@ - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' - install-python_ext: - $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' + install: install-bin try-install-man + diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 4e78ad0e9..8dc5971fb 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,15 +1,15 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1101,7 +1101,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p +@@ -1141,7 +1141,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p - install: all try-install-man + install-bin: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -1114,7 +1114,7 @@ install: all try-install-man +@@ -1154,7 +1154,7 @@ install-bin: all $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' @@ -18,7 +18,7 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -@@ -1125,7 +1125,7 @@ install-python_ext: +@@ -1167,7 +1167,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): diff --git a/debian/patches/usbip-update-man-pages.patch b/debian/patches/usbip-update-man-pages.patch deleted file mode 100644 index 95f158408..000000000 --- a/debian/patches/usbip-update-man-pages.patch +++ /dev/null @@ -1,14 +0,0 @@ -From: Ben Hutchings -Subject: Update man pages for merging of commands - -usbip_bind_driver (formerly usbip_attach_driver) was merged into the -usbip command. Remove the separate man page for it. Update examples -and references accordingly. ---- a/drivers/staging/usbip/userspace/Makefile.am -+++ b/drivers/staging/usbip/userspace/Makefile.am -@@ -3,4 +3,4 @@ - include_HEADERS := $(addprefix libsrc/, \ - usbip_common.h vhci_driver.h usbip_host_driver.h) - --dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8 usbip_bind_driver.8) -+dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8) From fd6f735f0d57e8e8137c46b83781d5681fd33bfc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 May 2013 05:30:54 +0000 Subject: [PATCH 247/487] Add more kluges to the cross-modpost makefile for 3.9 mod_devicetable.h is now converted into a series of offset definitions in devicetable-offsets.h which are included by file2alias.c. So we have to replicate that as well. Note that there are some architecture combinations for which some alias types won't be parsed correctly (and probably never were). The current cross-modpost build rules are really not sustainable. svn path=/dists/trunk/linux-tools/; revision=20135 --- debian/build/scripts/mod/Makefile.real | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index d999c78de..e00c519bc 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -9,6 +9,22 @@ include $(top_srcdir)/debian/build/Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -%.real-$(TYPE).o: $(SOURCEDIR)/%.c - $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $^ +%.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h + $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $< +WORD_SIZE := $(subst lsb-,,$(subst msb-,,$(TYPE))) + +# XXX This doesn't quite work, because if we cross-build between 64-bit +# architectures they may have different alignment for pointers (aka +# kernel_ulong_t). This particularly affects i2c_device_id and +# platform_device_id. + +real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c + $(CC) $(CFLAGS) -include linux/types.h -Dkernel_ulong_t=__u$(WORD_SIZE) -S -o $@ $< + +real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s + echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__" + sed -ne "/^->/{s:->#\(.*\):/* \1 */:; \ + s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:->::; p;}" $< >>$@ From d686671722d045630cd40c6b9f3d643feb02b2c1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 12:26:08 +0000 Subject: [PATCH 248/487] Merge linux-tools from trunk to sid svn path=/dists/sid/linux-tools/; revision=20188 --- debian/build/scripts/mod/Makefile.real | 20 ++++++++++++++++++-- debian/changelog | 6 ++++++ debian/patches/series | 1 - debian/patches/tools-perf-install.patch | 6 +++--- debian/patches/tools-perf-version.patch | 8 ++++---- debian/patches/usbip-update-man-pages.patch | 14 -------------- 6 files changed, 31 insertions(+), 24 deletions(-) delete mode 100644 debian/patches/usbip-update-man-pages.patch diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index d999c78de..e00c519bc 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -9,6 +9,22 @@ include $(top_srcdir)/debian/build/Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -%.real-$(TYPE).o: $(SOURCEDIR)/%.c - $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $^ +%.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h + $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $< +WORD_SIZE := $(subst lsb-,,$(subst msb-,,$(TYPE))) + +# XXX This doesn't quite work, because if we cross-build between 64-bit +# architectures they may have different alignment for pointers (aka +# kernel_ulong_t). This particularly affects i2c_device_id and +# platform_device_id. + +real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c + $(CC) $(CFLAGS) -include linux/types.h -Dkernel_ulong_t=__u$(WORD_SIZE) -S -o $@ $< + +real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s + echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__" + sed -ne "/^->/{s:->#\(.*\):/* \1 */:; \ + s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:->::; p;}" $< >>$@ diff --git a/debian/changelog b/debian/changelog index 13bce3553..17ae23c0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.9.3-1~experimental.1) UNRELEASED; urgency=low + + * New upstream release + + -- Ben Hutchings Tue, 21 May 2013 02:15:28 +0100 + linux-tools (3.8.11-1) unstable; urgency=low * New upstream stable update diff --git a/debian/patches/series b/debian/patches/series index 458433eb6..8a0a63bc7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch -usbip-update-man-pages.patch usbip-document-tcp-wrappers.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 0e5926b61..4f6e7c7a3 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,6 +1,6 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1105,20 +1105,20 @@ install: all try-install-man +@@ -1145,20 +1145,20 @@ install-bin: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -26,5 +26,5 @@ - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' - install-python_ext: - $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' + install: install-bin try-install-man + diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 4e78ad0e9..8dc5971fb 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,15 +1,15 @@ --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1101,7 +1101,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p +@@ -1141,7 +1141,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p - install: all try-install-man + install-bin: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -1114,7 +1114,7 @@ install: all try-install-man +@@ -1154,7 +1154,7 @@ install-bin: all $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' @@ -18,7 +18,7 @@ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -@@ -1125,7 +1125,7 @@ install-python_ext: +@@ -1167,7 +1167,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): diff --git a/debian/patches/usbip-update-man-pages.patch b/debian/patches/usbip-update-man-pages.patch deleted file mode 100644 index 95f158408..000000000 --- a/debian/patches/usbip-update-man-pages.patch +++ /dev/null @@ -1,14 +0,0 @@ -From: Ben Hutchings -Subject: Update man pages for merging of commands - -usbip_bind_driver (formerly usbip_attach_driver) was merged into the -usbip command. Remove the separate man page for it. Update examples -and references accordingly. ---- a/drivers/staging/usbip/userspace/Makefile.am -+++ b/drivers/staging/usbip/userspace/Makefile.am -@@ -3,4 +3,4 @@ - include_HEADERS := $(addprefix libsrc/, \ - usbip_common.h vhci_driver.h usbip_host_driver.h) - --dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8 usbip_bind_driver.8) -+dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8) From 97ff3c4a28609b016131f4ba9ef740a0a365e9e1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 12:39:43 +0000 Subject: [PATCH 249/487] Fix alignment of kernel_ulong_t in modpost when cross-building from i386 Whenever kernel_ulong_t is 64-bit, it is also 64-bit aligned. (This is not true for u64, but that is not used directly in device ID tables.) So define kernel_ulong_t as either __u32 or __u64 __attribute__((aligned(8))) accordingly. svn path=/dists/sid/linux-tools/; revision=20189 --- debian/build/scripts/mod/Makefile.real | 7 +------ debian/build/scripts/mod/real-lsb-32/types.h | 2 ++ debian/build/scripts/mod/real-lsb-64/types.h | 2 ++ debian/build/scripts/mod/real-msb-32/types.h | 2 ++ debian/build/scripts/mod/real-msb-64/types.h | 2 ++ 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 debian/build/scripts/mod/real-lsb-32/types.h create mode 100644 debian/build/scripts/mod/real-lsb-64/types.h create mode 100644 debian/build/scripts/mod/real-msb-32/types.h create mode 100644 debian/build/scripts/mod/real-msb-64/types.h diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index e00c519bc..0c09186c6 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -14,13 +14,8 @@ modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversio WORD_SIZE := $(subst lsb-,,$(subst msb-,,$(TYPE))) -# XXX This doesn't quite work, because if we cross-build between 64-bit -# architectures they may have different alignment for pointers (aka -# kernel_ulong_t). This particularly affects i2c_device_id and -# platform_device_id. - real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c - $(CC) $(CFLAGS) -include linux/types.h -Dkernel_ulong_t=__u$(WORD_SIZE) -S -o $@ $< + $(CC) -include real-$(TYPE)/types.h $(CFLAGS) -S -o $@ $< real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__" diff --git a/debian/build/scripts/mod/real-lsb-32/types.h b/debian/build/scripts/mod/real-lsb-32/types.h new file mode 100644 index 000000000..75e8b22d3 --- /dev/null +++ b/debian/build/scripts/mod/real-lsb-32/types.h @@ -0,0 +1,2 @@ +#include +typedef __u32 kernel_ulong_t; diff --git a/debian/build/scripts/mod/real-lsb-64/types.h b/debian/build/scripts/mod/real-lsb-64/types.h new file mode 100644 index 000000000..79f540ebe --- /dev/null +++ b/debian/build/scripts/mod/real-lsb-64/types.h @@ -0,0 +1,2 @@ +#include +typedef __u64 __attribute__((aligned(8))) kernel_ulong_t; diff --git a/debian/build/scripts/mod/real-msb-32/types.h b/debian/build/scripts/mod/real-msb-32/types.h new file mode 100644 index 000000000..75e8b22d3 --- /dev/null +++ b/debian/build/scripts/mod/real-msb-32/types.h @@ -0,0 +1,2 @@ +#include +typedef __u32 kernel_ulong_t; diff --git a/debian/build/scripts/mod/real-msb-64/types.h b/debian/build/scripts/mod/real-msb-64/types.h new file mode 100644 index 000000000..79f540ebe --- /dev/null +++ b/debian/build/scripts/mod/real-msb-64/types.h @@ -0,0 +1,2 @@ +#include +typedef __u64 __attribute__((aligned(8))) kernel_ulong_t; From f0a25889c3f52172c3738139a94ab804e9319b7f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 12:40:22 +0000 Subject: [PATCH 250/487] Drop now-unused definition of WORD_SIZE in modpost makefile svn path=/dists/sid/linux-tools/; revision=20190 --- debian/build/scripts/mod/Makefile.real | 2 -- 1 file changed, 2 deletions(-) diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index 0c09186c6..5cb84f684 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -12,8 +12,6 @@ modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversio %.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $< -WORD_SIZE := $(subst lsb-,,$(subst msb-,,$(TYPE))) - real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c $(CC) -include real-$(TYPE)/types.h $(CFLAGS) -S -o $@ $< From 5a4c25ceca889da7c15f3f74ec52d3c57430f23a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 12:45:05 +0000 Subject: [PATCH 251/487] Add new intermediate files/directories to clean rules svn path=/dists/sid/linux-tools/; revision=20191 --- debian/build/scripts/mod/Makefile | 2 +- debian/build/tools/perf/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/build/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile index fe5e90bb5..4b5e9b43c 100644 --- a/debian/build/scripts/mod/Makefile +++ b/debian/build/scripts/mod/Makefile @@ -21,4 +21,4 @@ modpost.h: $(top_srcdir)/scripts/mod/modpost.c modpost.o: modpost.c modpost.h clean: - rm -f modpost.h + rm -f modpost.h real-*/devicetable-offsets.* diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index b6dfa2f10..4199c3805 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -50,4 +50,4 @@ ifdef KERNEL_ARCH_PERF endif clean: - rm -rf doc out + rm -rf config doc out From 03ddf5688f84e1c0e6bd0e1479b0d85389a4ac40 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 12:45:26 +0000 Subject: [PATCH 252/487] Update to 3.9.4 svn path=/dists/sid/linux-tools/; revision=20192 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 17ae23c0a..5afdae79a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.9.3-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.9.4-1~experimental.1) UNRELEASED; urgency=low * New upstream release From fa0ad3f1b8661bc891d7db4cc3815896ccfcff92 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Jun 2013 13:00:26 +0000 Subject: [PATCH 253/487] Prepare to release linux-tools (3.9.4-1). svn path=/dists/sid/linux-tools/; revision=20193 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5afdae79a..f30d4cd4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.9.4-1~experimental.1) UNRELEASED; urgency=low +linux-tools (3.9.4-1) unstable; urgency=low * New upstream release - -- Ben Hutchings Tue, 21 May 2013 02:15:28 +0100 + -- Ben Hutchings Mon, 03 Jun 2013 13:45:52 +0100 linux-tools (3.8.11-1) unstable; urgency=low From 6a1e3f019432cdd0522536e86c98dc20f70d6e65 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 02:58:40 +0000 Subject: [PATCH 254/487] Update to 3.10, thanks to Chris Boot for updating the modpost patch svn path=/dists/trunk/linux-tools/; revision=20323 --- debian/changelog | 6 ++++++ debian/patches/modpost-symbol-prefix.patch | 17 ++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index f30d4cd4d..2119b43ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.10-1~exp1) UNRELEASED; urgency=low + + * New upstream release + + -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 + linux-tools (3.9.4-1) unstable; urgency=low * New upstream release diff --git a/debian/patches/modpost-symbol-prefix.patch b/debian/patches/modpost-symbol-prefix.patch index 7fc7e7a0d..a291b6062 100644 --- a/debian/patches/modpost-symbol-prefix.patch +++ b/debian/patches/modpost-symbol-prefix.patch @@ -1,19 +1,10 @@ --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -16,15 +16,11 @@ - #include - #include +@@ -18,7 +18,6 @@ + #include + #include #include "modpost.h" -#include "../../include/generated/autoconf.h" #include "../../include/linux/license.h" + #include "../../include/linux/export.h" - /* Some toolchains use a `_' prefix for all user symbols. */ --#ifdef CONFIG_SYMBOL_PREFIX --#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX --#else -+/* No Debian architecture currently does this. */ - #define MODULE_SYMBOL_PREFIX "" --#endif - - - /* Are we using CONFIG_MODVERSIONS? */ From d5911a76eb138efb094ca441a938a943740cedc7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 04:51:08 +0000 Subject: [PATCH 255/487] debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches svn path=/dists/trunk/linux-tools/; revision=20324 --- debian/changelog | 6 ++++++ debian/patches/modpost-symbol-prefix.patch | 12 ++++++++++++ debian/patches/tools-perf-install.patch | 5 +++++ debian/patches/tools-perf-version.patch | 9 +++++++++ debian/patches/usbip-document-tcp-wrappers.patch | 2 ++ 5 files changed, 34 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2119b43ab..f1b13bd0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,12 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low * New upstream release + [ Chris Boot ] + * Update modpost-symbol-prefix.patch for 3.10 + + [ Ben Hutchings ] + * debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches + -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 linux-tools (3.9.4-1) unstable; urgency=low diff --git a/debian/patches/modpost-symbol-prefix.patch b/debian/patches/modpost-symbol-prefix.patch index a291b6062..51c2cb271 100644 --- a/debian/patches/modpost-symbol-prefix.patch +++ b/debian/patches/modpost-symbol-prefix.patch @@ -1,3 +1,15 @@ +From: Chris Boot +Date: Mon, 01 Jul 2013 23:10:02 +0100 +Subject: modpost symbol prefix setting +Forwarded: not-needed + +[bwh: The original version of this was added by Bastian Blank. The +upstream code includes so that +can tell whether C symbols have an underscore prefix. Since we build +modpost separately from the kernel, won't exist. +However, no Debian Linux architecture uses the symbol prefix, so we +can simply omit it.] + --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -18,7 +18,6 @@ diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 4f6e7c7a3..163365dda 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,3 +1,8 @@ +From: Bastian Blank +Date: Fri, 07 Oct 2011 21:37:52 +0100 +Subject: Install perf scripts non-executable +Forwarded: no + --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -1145,20 +1145,20 @@ install-bin: all diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 8dc5971fb..67935344d 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,3 +1,12 @@ +From: Bastian Blank +Date: Mon, 26 Sep 2011 13:53:12 +0100 +Subject: Create manpages and binaries including the version +Forwarded: no + +[bwh: Fix version insertion in perf man page cross-references and perf +man page title. Install bash_completion script for perf with a +version-dependent name.] + --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -1141,7 +1141,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch index 3edbe98dd..bcb339856 100644 --- a/debian/patches/usbip-document-tcp-wrappers.patch +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -1,5 +1,7 @@ From: Ben Hutchings +Date: Sun, 24 Jun 2012 02:51:39 +0100 Subject: usbip: Document TCP wrappers +Forwarded: no Add references to TCP wrappers configuration in the manual page. From fce9f378db519f7462ef59c1a9820a26aecbd1b2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 04:56:26 +0000 Subject: [PATCH 256/487] debian/copyright: Convert to machine-readable format (fka DEP-5) svn path=/dists/trunk/linux-tools/; revision=20325 --- debian/changelog | 1 + debian/copyright | 54 +++++++++++++++++++++--------------------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/debian/changelog b/debian/changelog index f1b13bd0d..bcf2e28d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low [ Ben Hutchings ] * debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches + * debian/copyright: Convert to machine-readable format (fka DEP-5) -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 diff --git a/debian/copyright b/debian/copyright index fc6c0070c..d4b93d31c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,32 +1,26 @@ -This is the Debian GNU/Linux prepackaged version of the Linux kernel. +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Linux kernel +Source: http://ftp.kernel.org/pub/linux/kernel/ -It was downloaded from http://ftp.kernel.org/pub/linux/kernel/. +Files: * +Copyright: 1991-2012 Linus Torvalds and many others +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License version + 2 can be found in `/usr/share/common-licenses/GPL-2'. -Copyright: - - Copyright (C) 1996, 1997 Linux International - 2000, 2006 IBM Corporation - 2002, 2003 Kai Germaschewski - 2002-2004 Rusty Russell - 2002-2005 Roman Zippel - and others - -License: - - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General Public License version -2 can be found in `/usr/share/common-licenses/GPL-2'. - -The Debian packaging is licensed under the GPL v2, see above. +Files: debian/* +Copyright: 2006-2012 Debian kernel team +License: GPL-2 From b1ba315fd1a334491e18465bf165f54bf207aa83 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 05:00:10 +0000 Subject: [PATCH 257/487] debian/copyright: Move explanation of indirect linking of perf to OpenSSL This was originally added to debian/copyright in src:linux-2.6, which was the source for linux-tools binary packages. Obviously it belongs in src:linux-tools now. svn path=/dists/trunk/linux-tools/; revision=20326 --- debian/changelog | 1 + debian/copyright | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index bcf2e28d7..36560fda2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low [ Ben Hutchings ] * debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches * debian/copyright: Convert to machine-readable format (fka DEP-5) + * debian/copyright: Add explanation of indirect linking of perf to OpenSSL -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 diff --git a/debian/copyright b/debian/copyright index d4b93d31c..1e7200f61 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,12 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Linux kernel Source: http://ftp.kernel.org/pub/linux/kernel/ +Comment: + The 'perf' tool is dynamically linked with the Python interpreter, + which is itself dynamically linked with OpenSSL, which is not + GPL-compatible. However, since perf itself does not link with or use + OpenSSL, we believe that this indirect linking does not require + additional permissions beyond the GPL. Files: * Copyright: 1991-2012 Linus Torvalds and many others From 3ee789e9d59b57b9dc2775817637801915c9e871 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 05:07:45 +0000 Subject: [PATCH 258/487] debian/rules.real: Remove support for pre-multiarch dpkg svn path=/dists/trunk/linux-tools/; revision=20328 --- debian/changelog | 1 + debian/rules.real | 6 ------ debian/templates/control.main.in | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 36560fda2..3fb0d2ec9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low * debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches * debian/copyright: Convert to machine-readable format (fka DEP-5) * debian/copyright: Add explanation of indirect linking of perf to OpenSSL + * debian/rules.real: Remove support for pre-multiarch dpkg -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 diff --git a/debian/rules.real b/debian/rules.real index 0aa38254e..beb766bcb 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,7 +3,6 @@ export DH_OPTIONS include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -HAVE_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) @@ -24,11 +23,6 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d -ifneq (,$(HAVE_MULTIARCH)) - echo linux-kbuild:Multi-Arch=foreign >>debian/$(PACKAGE_NAME).substvars -else - echo linux-kbuild:Multi-Arch= >>debian/$(PACKAGE_NAME).substvars -endif $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index f985c6310..74cdb2011 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,7 +1,7 @@ Package: linux-kbuild-@version@ Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} -Multi-Arch: ${linux-kbuild:Multi-Arch} +Multi-Arch: foreign Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. From 28acb1fbb6b021bae7acf64d74c66f6068a84327 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Jul 2013 05:15:33 +0000 Subject: [PATCH 259/487] Update policy version to 3.9.4 debian/rules: Implement build-arch and build-indep targets svn path=/dists/trunk/linux-tools/; revision=20329 --- debian/changelog | 2 ++ debian/rules | 6 +++++- debian/templates/control.source.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3fb0d2ec9..83ed2310d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low * debian/copyright: Convert to machine-readable format (fka DEP-5) * debian/copyright: Add explanation of indirect linking of perf to OpenSSL * debian/rules.real: Remove support for pre-multiarch dpkg + * Update policy version to 3.9.4 + - debian/rules: Implement build-arch and build-indep targets -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 diff --git a/debian/rules b/debian/rules index a9358ec7d..6867d47e2 100755 --- a/debian/rules +++ b/debian/rules @@ -10,12 +10,16 @@ VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.* include debian/rules.defs -build: debian/control $(STAMPS_DIR)/build-base +build: build-arch build-indep + +build-arch: debian/control $(STAMPS_DIR)/build-base $(STAMPS_DIR)/build-base: $(STAMPS_DIR) dh_testdir $(MAKE) -f debian/rules.gen build touch $@ +build-indep: debian/control + $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index a4377273f..5583772ee 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder -Standards-Version: 3.9.2 +Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, bison, flex, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, From 41ace24b2d9d1afb6ebfe9951aa0342607d29636 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 16 Jul 2013 04:53:37 +0000 Subject: [PATCH 260/487] Merge changes from trunk svn path=/dists/sid/linux-tools/; revision=20356 --- debian/changelog | 17 ++++++ debian/copyright | 60 +++++++++---------- debian/patches/modpost-symbol-prefix.patch | 29 +++++---- debian/patches/tools-perf-install.patch | 5 ++ debian/patches/tools-perf-version.patch | 9 +++ .../patches/usbip-document-tcp-wrappers.patch | 2 + debian/rules | 6 +- debian/rules.real | 6 -- debian/templates/control.main.in | 2 +- debian/templates/control.source.in | 2 +- 10 files changed, 86 insertions(+), 52 deletions(-) diff --git a/debian/changelog b/debian/changelog index f30d4cd4d..83ed2310d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +linux-tools (3.10-1~exp1) UNRELEASED; urgency=low + + * New upstream release + + [ Chris Boot ] + * Update modpost-symbol-prefix.patch for 3.10 + + [ Ben Hutchings ] + * debian/patches: Add DEP-3 headers (From, Subject, Forwarded) to all patches + * debian/copyright: Convert to machine-readable format (fka DEP-5) + * debian/copyright: Add explanation of indirect linking of perf to OpenSSL + * debian/rules.real: Remove support for pre-multiarch dpkg + * Update policy version to 3.9.4 + - debian/rules: Implement build-arch and build-indep targets + + -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 + linux-tools (3.9.4-1) unstable; urgency=low * New upstream release diff --git a/debian/copyright b/debian/copyright index fc6c0070c..1e7200f61 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,32 +1,32 @@ -This is the Debian GNU/Linux prepackaged version of the Linux kernel. +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Linux kernel +Source: http://ftp.kernel.org/pub/linux/kernel/ +Comment: + The 'perf' tool is dynamically linked with the Python interpreter, + which is itself dynamically linked with OpenSSL, which is not + GPL-compatible. However, since perf itself does not link with or use + OpenSSL, we believe that this indirect linking does not require + additional permissions beyond the GPL. -It was downloaded from http://ftp.kernel.org/pub/linux/kernel/. +Files: * +Copyright: 1991-2012 Linus Torvalds and many others +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License version + 2 can be found in `/usr/share/common-licenses/GPL-2'. -Copyright: - - Copyright (C) 1996, 1997 Linux International - 2000, 2006 IBM Corporation - 2002, 2003 Kai Germaschewski - 2002-2004 Rusty Russell - 2002-2005 Roman Zippel - and others - -License: - - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General Public License version -2 can be found in `/usr/share/common-licenses/GPL-2'. - -The Debian packaging is licensed under the GPL v2, see above. +Files: debian/* +Copyright: 2006-2012 Debian kernel team +License: GPL-2 diff --git a/debian/patches/modpost-symbol-prefix.patch b/debian/patches/modpost-symbol-prefix.patch index 7fc7e7a0d..51c2cb271 100644 --- a/debian/patches/modpost-symbol-prefix.patch +++ b/debian/patches/modpost-symbol-prefix.patch @@ -1,19 +1,22 @@ +From: Chris Boot +Date: Mon, 01 Jul 2013 23:10:02 +0100 +Subject: modpost symbol prefix setting +Forwarded: not-needed + +[bwh: The original version of this was added by Bastian Blank. The +upstream code includes so that +can tell whether C symbols have an underscore prefix. Since we build +modpost separately from the kernel, won't exist. +However, no Debian Linux architecture uses the symbol prefix, so we +can simply omit it.] + --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -16,15 +16,11 @@ - #include - #include +@@ -18,7 +18,6 @@ + #include + #include #include "modpost.h" -#include "../../include/generated/autoconf.h" #include "../../include/linux/license.h" + #include "../../include/linux/export.h" - /* Some toolchains use a `_' prefix for all user symbols. */ --#ifdef CONFIG_SYMBOL_PREFIX --#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX --#else -+/* No Debian architecture currently does this. */ - #define MODULE_SYMBOL_PREFIX "" --#endif - - - /* Are we using CONFIG_MODVERSIONS? */ diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 4f6e7c7a3..163365dda 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -1,3 +1,8 @@ +From: Bastian Blank +Date: Fri, 07 Oct 2011 21:37:52 +0100 +Subject: Install perf scripts non-executable +Forwarded: no + --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -1145,20 +1145,20 @@ install-bin: all diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 8dc5971fb..67935344d 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -1,3 +1,12 @@ +From: Bastian Blank +Date: Mon, 26 Sep 2011 13:53:12 +0100 +Subject: Create manpages and binaries including the version +Forwarded: no + +[bwh: Fix version insertion in perf man page cross-references and perf +man page title. Install bash_completion script for perf with a +version-dependent name.] + --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -1141,7 +1141,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch index 3edbe98dd..bcb339856 100644 --- a/debian/patches/usbip-document-tcp-wrappers.patch +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -1,5 +1,7 @@ From: Ben Hutchings +Date: Sun, 24 Jun 2012 02:51:39 +0100 Subject: usbip: Document TCP wrappers +Forwarded: no Add references to TCP wrappers configuration in the manual page. diff --git a/debian/rules b/debian/rules index a9358ec7d..6867d47e2 100755 --- a/debian/rules +++ b/debian/rules @@ -10,12 +10,16 @@ VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.* include debian/rules.defs -build: debian/control $(STAMPS_DIR)/build-base +build: build-arch build-indep + +build-arch: debian/control $(STAMPS_DIR)/build-base $(STAMPS_DIR)/build-base: $(STAMPS_DIR) dh_testdir $(MAKE) -f debian/rules.gen build touch $@ +build-indep: debian/control + $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ diff --git a/debian/rules.real b/debian/rules.real index 0aa38254e..beb766bcb 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,7 +3,6 @@ export DH_OPTIONS include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -HAVE_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) @@ -24,11 +23,6 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d -ifneq (,$(HAVE_MULTIARCH)) - echo linux-kbuild:Multi-Arch=foreign >>debian/$(PACKAGE_NAME).substvars -else - echo linux-kbuild:Multi-Arch= >>debian/$(PACKAGE_NAME).substvars -endif $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index f985c6310..74cdb2011 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -1,7 +1,7 @@ Package: linux-kbuild-@version@ Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} -Multi-Arch: ${linux-kbuild:Multi-Arch} +Multi-Arch: foreign Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index a4377273f..5583772ee 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder -Standards-Version: 3.9.2 +Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, asciidoc, binutils-dev, bison, flex, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, From 9ac5adbd7d164cacbe10a1a421423b16cd177349 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 16 Jul 2013 06:50:09 +0000 Subject: [PATCH 261/487] linux-kbuild: Update modpost wrapper for 3.10 Implement the -T option svn path=/dists/sid/linux-tools/; revision=20358 --- debian/build/scripts/mod/gendef.py | 2 +- debian/build/scripts/mod/modpost.c | 64 +++++++++++++++++++++++++++--- debian/changelog | 2 + 3 files changed, 62 insertions(+), 6 deletions(-) diff --git a/debian/build/scripts/mod/gendef.py b/debian/build/scripts/mod/gendef.py index 22dbd7d03..6e1bdf41b 100755 --- a/debian/build/scripts/mod/gendef.py +++ b/debian/build/scripts/mod/gendef.py @@ -14,7 +14,7 @@ print '#define GETOPT_OPTIONS "%s"' % options print '#define GETOPT_CASE', for c in options: - if c == ':': + if c == ':' or c == 'T': continue print "case '%c':" % c, print diff --git a/debian/build/scripts/mod/modpost.c b/debian/build/scripts/mod/modpost.c index cd94433b8..53e55096d 100644 --- a/debian/build/scripts/mod/modpost.c +++ b/debian/build/scripts/mod/modpost.c @@ -10,6 +10,8 @@ int main (int argc, char *argv[]) { char const *data, *class; + char *list_name = NULL; + char *name; char prog[1024]; unsigned char ei[EI_NIDENT]; int opt; @@ -21,17 +23,69 @@ int main (int argc, char *argv[]) { GETOPT_CASE break; + case 'T': + list_name = optarg; + break; default: return EXIT_FAILURE; } } - if (optind == argc) - return EXIT_SUCCESS; - - if (!(file = fopen (argv[optind], "r"))) + if (optind != argc) { - fprintf (stderr, "Can't open file\n"); + name = argv[optind]; + } + else if (list_name) + { + size_t name_len; + int is_stdin = strcmp (list_name, "-") == 0; + + /* Read first line of list file */ + if (is_stdin) + { + file = stdin; + setvbuf(stdin, NULL, _IONBF, 0); /* don't over-read */ + } + else + { + file = fopen (list_name, "r"); + if (!file) + { + fprintf (stderr, "Can't open \"%s\"\n", list_name); + return EXIT_FAILURE; + } + } + if (getline (&name, &name_len, file) < 0) + { + fprintf (stderr, "Can't read \"%s\"\n", list_name); + return EXIT_FAILURE; + } + if (!is_stdin) + fclose(file); + + /* Remove new-line */ + name [strcspn (name, "\n")] = 0; + + /* If this came from stdin, we need to add the first name to the + * arguments, because the upstream modpost can't read it again. + */ + if (is_stdin) + { + char **new_argv = malloc (sizeof(*argv) * (argc + 2)); + memcpy(new_argv, argv, sizeof(*argv) * argc); + new_argv [argc] = name; + new_argv [argc + 1] = NULL; + argv = new_argv; + } + } + else + { + return EXIT_SUCCESS; + } + + if (!(file = fopen (name, "r"))) + { + fprintf (stderr, "Can't open \"%s\"\n", name); return EXIT_FAILURE; } diff --git a/debian/changelog b/debian/changelog index 83ed2310d..48ca97ee9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low * debian/rules.real: Remove support for pre-multiarch dpkg * Update policy version to 3.9.4 - debian/rules: Implement build-arch and build-indep targets + * linux-kbuild: Update modpost wrapper for 3.10 + - Implement the -T option -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 From 74f8cdda3206e5a2b316707cc9df319f2e1a45be Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 16 Jul 2013 12:29:51 +0000 Subject: [PATCH 262/487] Prepare to release linux-tools (3.10-1). svn path=/dists/sid/linux-tools/; revision=20359 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 48ca97ee9..3f2021a6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.10-1~exp1) UNRELEASED; urgency=low +linux-tools (3.10-1) unstable; urgency=low * New upstream release @@ -15,7 +15,7 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low * linux-kbuild: Update modpost wrapper for 3.10 - Implement the -T option - -- Chris Boot Mon, 01 Jul 2013 22:07:42 +0100 + -- Ben Hutchings Tue, 16 Jul 2013 13:29:22 +0100 linux-tools (3.9.4-1) unstable; urgency=low From 6aaae070ee1f96541b054a2f4b375e1e456ef118 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Jul 2013 03:08:21 +0000 Subject: [PATCH 263/487] linux-kbuild: Fix use of getline() in modpost wrapper (Closes: #717195) svn path=/dists/sid/linux-tools/; revision=20360 --- debian/build/scripts/mod/modpost.c | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/build/scripts/mod/modpost.c b/debian/build/scripts/mod/modpost.c index 53e55096d..1cead40c2 100644 --- a/debian/build/scripts/mod/modpost.c +++ b/debian/build/scripts/mod/modpost.c @@ -11,7 +11,7 @@ int main (int argc, char *argv[]) { char const *data, *class; char *list_name = NULL; - char *name; + char *name = NULL; char prog[1024]; unsigned char ei[EI_NIDENT]; int opt; diff --git a/debian/changelog b/debian/changelog index 3f2021a6b..0879ec9b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.10-2) unstable; urgency=low + + * linux-kbuild: Fix use of getline() in modpost wrapper (Closes: #717195) + + -- Ben Hutchings Thu, 18 Jul 2013 04:02:11 +0100 + linux-tools (3.10-1) unstable; urgency=low * New upstream release From c92d538900d971f1272b05ec58d4fefb9f273be9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Aug 2013 13:42:55 +0000 Subject: [PATCH 264/487] Update to 3.11-rc4 (patches apply cleanly!) svn path=/dists/trunk/linux-tools/; revision=20465 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0879ec9b2..b8c217492 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.11~rc4-1~exp1) UNRELEASED; urgency=low + + * New upstream release candidate + + -- Ben Hutchings Thu, 08 Aug 2013 15:39:50 +0200 + linux-tools (3.10-2) unstable; urgency=low * linux-kbuild: Fix use of getline() in modpost wrapper (Closes: #717195) From 48eaa7bab40ada889106bc562d8677ed0ccb69e8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Aug 2013 14:20:53 +0000 Subject: [PATCH 265/487] linux-tools: Build perf documentation out-of-tree, as this now works and our previous workaround does not svn path=/dists/trunk/linux-tools/; revision=20466 --- debian/build/tools/perf/Makefile | 8 ++------ debian/changelog | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 4199c3805..44382df6d 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -36,18 +36,14 @@ MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2= all: ifdef KERNEL_ARCH_PERF -mkdir out - # upstream makefile is broken - cp -al $(top_srcdir)/tools/perf/Documentation doc - cp -al $(top_srcdir)/tools/perf/config config +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out all VERSION=$(VERSION) - +$(MAKE_PERF) -C doc man VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation O=$(CURDIR)/out man VERSION=$(VERSION) endif install: ifdef KERNEL_ARCH_PERF +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out install VERSION=$(VERSION) - +$(MAKE_PERF) -C doc install-man VERSION=$(VERSION) endif clean: - rm -rf config doc out + rm -rf out diff --git a/debian/changelog b/debian/changelog index b8c217492..eef3af58e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ linux-tools (3.11~rc4-1~exp1) UNRELEASED; urgency=low * New upstream release candidate + [ Ben Hutchings ] + * linux-tools: Build perf documentation out-of-tree, as this now works + and our previous workaround does not + -- Ben Hutchings Thu, 08 Aug 2013 15:39:50 +0200 linux-tools (3.10-2) unstable; urgency=low From 2dc5dfb9f5a903b5e5432ac41332d9ebaca48c75 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Aug 2013 14:48:34 +0000 Subject: [PATCH 266/487] Prepare to release linux-tools (3.11~rc4-1~exp1). svn path=/dists/trunk/linux-tools/; revision=20467 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index eef3af58e..0646a878a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.11~rc4-1~exp1) UNRELEASED; urgency=low +linux-tools (3.11~rc4-1~exp1) experimental; urgency=low * New upstream release candidate @@ -6,7 +6,7 @@ linux-tools (3.11~rc4-1~exp1) UNRELEASED; urgency=low * linux-tools: Build perf documentation out-of-tree, as this now works and our previous workaround does not - -- Ben Hutchings Thu, 08 Aug 2013 15:39:50 +0200 + -- Ben Hutchings Thu, 08 Aug 2013 16:21:00 +0200 linux-tools (3.10-2) unstable; urgency=low From 43ef82bb5b502bfb6750766979f614e3a1c37076 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Aug 2013 19:48:34 +0000 Subject: [PATCH 267/487] linux-kbuild: Fix no-modules case in modpost wrapper (Closes: #719129) svn path=/dists/sid/linux-tools/; revision=20470 --- debian/build/scripts/mod/modpost.c | 14 ++++++++++++-- debian/changelog | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/debian/build/scripts/mod/modpost.c b/debian/build/scripts/mod/modpost.c index 1cead40c2..8747c0cde 100644 --- a/debian/build/scripts/mod/modpost.c +++ b/debian/build/scripts/mod/modpost.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -57,8 +58,16 @@ int main (int argc, char *argv[]) } if (getline (&name, &name_len, file) < 0) { - fprintf (stderr, "Can't read \"%s\"\n", list_name); - return EXIT_FAILURE; + if (errno) + { + fprintf (stderr, "Can't read \"%s\"\n", list_name); + return EXIT_FAILURE; + } + else + { + /* Empty list */ + return EXIT_SUCCESS; + } } if (!is_stdin) fclose(file); @@ -80,6 +89,7 @@ int main (int argc, char *argv[]) } else { + /* Empty list */ return EXIT_SUCCESS; } diff --git a/debian/changelog b/debian/changelog index 0879ec9b2..21bae7f48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.10-3) UNRELEASED; urgency=low + + * linux-kbuild: Fix no-modules case in modpost wrapper (Closes: #719129) + + -- Ben Hutchings Thu, 08 Aug 2013 21:02:50 +0200 + linux-tools (3.10-2) unstable; urgency=low * linux-kbuild: Fix use of getline() in modpost wrapper (Closes: #717195) From 4535007178f55c6bc99b5ad69958f888fe27bc55 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Aug 2013 19:49:17 +0000 Subject: [PATCH 268/487] Prepare to release linux-tools (3.10-3). svn path=/dists/sid/linux-tools/; revision=20471 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 21bae7f48..9afbd1aa6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.10-3) UNRELEASED; urgency=low +linux-tools (3.10-3) unstable; urgency=low * linux-kbuild: Fix no-modules case in modpost wrapper (Closes: #719129) - -- Ben Hutchings Thu, 08 Aug 2013 21:02:50 +0200 + -- Ben Hutchings Thu, 08 Aug 2013 21:49:02 +0200 linux-tools (3.10-2) unstable; urgency=low From b26b7ec848378b2de6781143d10d446018f20cca Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 30 Aug 2013 11:46:32 +0000 Subject: [PATCH 269/487] Prepare to release linux-tools (3.10-4) for the perl 5.18 transition usbip: Fix package version override to be binNMU-safe, ready for the next time svn path=/dists/sid/linux-tools/; revision=20533 --- debian/changelog | 7 +++++++ debian/rules.real | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9afbd1aa6..4c1d74ec6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.10-4) unstable; urgency=low + + * Sourceful upload for the perl 5.18 transition + * usbip: Fix package version override to be binNMU-safe + + -- Ben Hutchings Fri, 30 Aug 2013 12:44:56 +0100 + linux-tools (3.10-3) unstable; urgency=low * linux-kbuild: Fix no-modules case in modpost wrapper (Closes: #719129) diff --git a/debian/rules.real b/debian/rules.real index beb766bcb..8b2730e8e 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -4,6 +4,10 @@ include debian/rules.defs DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) +# VERSION_DEBIAN is the package source version; VERSION_DEBIAN_FULL +# includes any binNMU part. +VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') + binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-tools @@ -74,7 +78,7 @@ install-usbip: $(STAMPS_DIR)/build dh_fixperms dh_installdeb dh_shlibdeps - test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN)" - dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN) + test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN_FULL)" + dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL) dh_md5sums dh_builddeb From da25f50b98fb65451b6a7490e951c2138fce8da5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Oct 2013 01:16:19 +0000 Subject: [PATCH 270/487] Update to 3.11 svn path=/dists/sid/linux-tools/; revision=20723 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b51c582f3..ea0d98cff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.11-1~exp1) UNRELEASED; urgency=low + + * New upstream release + + -- Ben Hutchings Sat, 19 Oct 2013 01:16:20 +0100 + linux-tools (3.11~rc4-1~exp1) experimental; urgency=low * New upstream release candidate From 73f6d82a7873707547070bfe2bac32de25901a60 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Oct 2013 01:38:49 +0000 Subject: [PATCH 271/487] linux-tools: Build perf with libaudit and libunwind svn path=/dists/sid/linux-tools/; revision=20724 --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ea0d98cff..4942124de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.11-1~exp1) UNRELEASED; urgency=low * New upstream release + * linux-tools: Build perf with libaudit and libunwind -- Ben Hutchings Sat, 19 Oct 2013 01:16:20 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 5583772ee..f8fc55985 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev, python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 310ae6db87622b6ea86c5c800d3601421fb6efee Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Oct 2013 01:52:45 +0000 Subject: [PATCH 272/487] Prepare to release linux-tools (3.11-1~exp1). svn path=/dists/sid/linux-tools/; revision=20725 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4942124de..7b7292153 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.11-1~exp1) UNRELEASED; urgency=low +linux-tools (3.11-1~exp1) unstable; urgency=low * New upstream release * linux-tools: Build perf with libaudit and libunwind - -- Ben Hutchings Sat, 19 Oct 2013 01:16:20 +0100 + -- Ben Hutchings Sat, 19 Oct 2013 02:38:59 +0100 linux-tools (3.11~rc4-1~exp1) experimental; urgency=low From aaef79f1654db19cfa77f5346b757a6b2831a1b0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Oct 2013 01:53:10 +0000 Subject: [PATCH 273/487] Prepare to release linux-tools (3.11-1). svn path=/dists/sid/linux-tools/; revision=20726 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7b7292153..feb6d2ada 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.11-1~exp1) unstable; urgency=low +linux-tools (3.11-1) unstable; urgency=low * New upstream release * linux-tools: Build perf with libaudit and libunwind From 6138aa4f8bce5856654c782832437a469ddbc9a6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 27 Oct 2013 17:17:21 +0000 Subject: [PATCH 274/487] linux-tools: Limit build-dependency on libunwind8-dev to architectures where it is available svn path=/dists/sid/linux-tools/; revision=20740 --- debian/changelog | 7 +++++++ debian/templates/control.source.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index feb6d2ada..fb604b5c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.11-2) UNRELEASED; urgency=low + + * linux-tools: Limit build-dependency on libunwind8-dev to architectures + where it is available + + -- Ben Hutchings Sun, 27 Oct 2013 17:15:02 +0000 + linux-tools (3.11-1) unstable; urgency=low * New upstream release diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f8fc55985..f2622a49b 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev, python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev [amd64 armel armhf i386 ia64 mips powerpc ppc64], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 364f50ff21c08193ddfffc5844c24e22069694a2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 27 Oct 2013 17:59:18 +0000 Subject: [PATCH 275/487] Remove build-dependency on libunwind8-dev on ia64 libunwind8-dev is available but practically uninstallable on ia64, as the default compiler version is still gcc-4.6 which depends on libunwind7-dev and thus conflicts with it. We could use libunwind7-dev instead, but then we only want it for perf which we can't build for ia64 anyway! svn path=/dists/sid/linux-tools/; revision=20741 --- debian/changelog | 2 +- debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index fb604b5c0..9dbb40405 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ linux-tools (3.11-2) UNRELEASED; urgency=low * linux-tools: Limit build-dependency on libunwind8-dev to architectures - where it is available + where it is available and needed -- Ben Hutchings Sun, 27 Oct 2013 17:15:02 +0000 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f2622a49b..c48eb7251 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev [amd64 armel armhf i386 ia64 mips powerpc ppc64], python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev [amd64 armel armhf i386 mips powerpc ppc64], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 99504223d700ed876f0a1a5b65fde3eeb7eac0d0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 27 Oct 2013 18:09:50 +0000 Subject: [PATCH 276/487] Prepare to release linux-tools (3.11-2). svn path=/dists/sid/linux-tools/; revision=20742 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9dbb40405..6de901aba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.11-2) UNRELEASED; urgency=low +linux-tools (3.11-2) unstable; urgency=low * linux-tools: Limit build-dependency on libunwind8-dev to architectures where it is available and needed - -- Ben Hutchings Sun, 27 Oct 2013 17:15:02 +0000 + -- Ben Hutchings Sun, 27 Oct 2013 18:01:37 +0000 linux-tools (3.11-1) unstable; urgency=low From f2655a84c9183f553caff321e95c8739a2ee499b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Oct 2013 03:41:10 +0000 Subject: [PATCH 277/487] Avoid building with libunwind8-dev The transition from libunwind soversion 7 to 8 is blocked and will likely remain blocked for some time because libunwind7 is linked into all ia64 binaries. For amd64 and i386, downgrade the build-dependency to libunwind7-dev. For architectures that are supported by libunwind8-dev, remove the build-dependency and ensure we don't accidentally link with libunwind8 by setting NO_LIBUNWIND=1 when building perf. svn path=/dists/sid/linux-tools/; revision=20755 --- debian/build/tools/perf/Makefile | 8 +++++++- debian/changelog | 7 +++++++ debian/templates/control.source.in | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 44382df6d..50abf0961 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -4,16 +4,20 @@ include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) +NO_LIBUNWIND = 1 + ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 + NO_LIBUNWIND = else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 + NO_LIBUNWIND = else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) @@ -31,7 +35,9 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) endif # disable Gtk UI until it's more usable -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error +# disable libunwind on architectures lacking libunwind7-dev, just in case +# libunwind8-dev is installed +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) all: ifdef KERNEL_ARCH_PERF diff --git a/debian/changelog b/debian/changelog index 6de901aba..9c9a5782f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.11-3) unstable; urgency=low + + * linux-tools: Replace build-dependency on libunwind8-dev with + libunwind7-dev, as the new libunwind will not enter testing soon + + -- Ben Hutchings Tue, 29 Oct 2013 02:12:36 +0000 + linux-tools (3.11-2) unstable; urgency=low * linux-tools: Limit build-dependency on libunwind8-dev to architectures diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index c48eb7251..14b6c8317 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind8-dev [amd64 armel armhf i386 mips powerpc ppc64], python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 10fb384d4761fa37f7f4eb139f2f32c60e94be8f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 21 Nov 2013 01:27:40 +0000 Subject: [PATCH 278/487] Update to 3.12 svn path=/dists/trunk/linux-tools/; revision=20808 --- debian/changelog | 6 ++++++ debian/patches/tools-perf-install.patch | 7 +++++-- debian/patches/tools-perf-version.patch | 14 +++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9c9a5782f..2aa9f8d9c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.12-1~exp1) UNRELEASED; urgency=low + + * New upstream release (Closes: #729197) + + -- Ben Hutchings Mon, 18 Nov 2013 04:17:25 +0000 + linux-tools (3.11-3) unstable; urgency=low * linux-tools: Replace build-dependency on libunwind8-dev with diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 163365dda..bbfc34f2c 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -5,15 +5,17 @@ Forwarded: no --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1145,20 +1145,20 @@ install-bin: all +@@ -775,23 +775,23 @@ install-bin: all + ifndef NO_LIBPERL $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' - $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' - $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' - $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' + $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + endif + ifndef NO_LIBPYTHON $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' - $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' @@ -21,6 +23,7 @@ Forwarded: no + $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + endif $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' - $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 67935344d..c16880628 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,25 +9,25 @@ version-dependent name.] --- a/tools/perf/Makefile +++ b/tools/perf/Makefile -@@ -1141,7 +1141,7 @@ perfexec_instdir_SQ = $(subst ','\'',$(p +@@ -769,7 +769,7 @@ check: $(OUTPUT)common-cmds.h install-bin: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' -@@ -1154,7 +1154,7 @@ install-bin: all - $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' + ifndef NO_LIBPERL +@@ -787,7 +787,7 @@ ifndef NO_LIBPYTHON $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + endif $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' - $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -@@ -1167,7 +1167,7 @@ install-python_ext: +@@ -800,7 +800,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -38,7 +38,7 @@ version-dependent name.] --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile -@@ -188,13 +188,15 @@ ifdef missing_tools +@@ -182,13 +182,15 @@ ifdef missing_tools $(error "You need to install $(missing_tools) for man pages") endif From 1f44ebf9a03fedc1d2b80cc876d41806127baa86 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 21 Nov 2013 01:28:38 +0000 Subject: [PATCH 279/487] [x86, powerpc, ppc64] linux-tools: Build perf with libnuma Add a patch to fix some type errors on 32-bit architectures. svn path=/dists/trunk/linux-tools/; revision=20809 --- debian/changelog | 1 + debian/patches/perf-fix-numa-types.patch | 46 ++++++++++++++++++++++++ debian/patches/series | 1 + debian/templates/control.source.in | 2 +- 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 debian/patches/perf-fix-numa-types.patch diff --git a/debian/changelog b/debian/changelog index 2aa9f8d9c..415f2cd0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.12-1~exp1) UNRELEASED; urgency=low * New upstream release (Closes: #729197) + * [x86, powerpc, ppc64] linux-tools: Build perf with libnuma -- Ben Hutchings Mon, 18 Nov 2013 04:17:25 +0000 diff --git a/debian/patches/perf-fix-numa-types.patch b/debian/patches/perf-fix-numa-types.patch new file mode 100644 index 000000000..136fd9735 --- /dev/null +++ b/debian/patches/perf-fix-numa-types.patch @@ -0,0 +1,46 @@ +From: Ben Hutchings +Date: Mon, 18 Nov 2013 05:12:30 +0000 +Subject: perf: Fix type errors in bench/numa.c +Forwarded: no + +Fix the following errors on i386 and probably most other 32-bit +architectures: + +bench/numa.c: In function 'worker_thread': +bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] + if (diff.tv_sec >= g->p.nr_secs) { + ^ +bench/numa.c:1161:6: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' [-Werror=format=] + process_nr, thread_nr, runtime_ns_max / bytes_done, val); + ^ + +Signed-off-by: Ben Hutchings +--- +--- a/tools/perf/bench/numa.c ++++ b/tools/perf/bench/numa.c +@@ -12,6 +12,7 @@ + #include "bench.h" + + #include ++#include + #include + #include + #include +@@ -1110,7 +1111,7 @@ static void *worker_thread(void *__tdata + /* Check whether our max runtime timed out: */ + if (g->p.nr_secs) { + timersub(&stop, &start0, &diff); +- if (diff.tv_sec >= g->p.nr_secs) { ++ if (diff.tv_sec >= (time_t)g->p.nr_secs) { + g->stop_work = true; + break; + } +@@ -1157,7 +1158,7 @@ static void *worker_thread(void *__tdata + runtime_ns_max += diff.tv_usec * 1000; + + if (details >= 0) { +- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n", ++ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIx64"]\n", + process_nr, thread_nr, runtime_ns_max / bytes_done, val); + } + fflush(stdout); diff --git a/debian/patches/series b/debian/patches/series index 8a0a63bc7..62a2a395d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch +perf-fix-numa-types.patch diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 14b6c8317..f1f520bc9 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, + asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 3a0a15d1b3688d2b75953ffa2f4ae2c78dbdf03d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 21 Nov 2013 01:28:59 +0000 Subject: [PATCH 280/487] Prepare to release linux-tools (3.12-1~exp1). svn path=/dists/trunk/linux-tools/; revision=20810 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 415f2cd0e..9eb9e4081 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.12-1~exp1) UNRELEASED; urgency=low +linux-tools (3.12-1~exp1) experimental; urgency=low * New upstream release (Closes: #729197) * [x86, powerpc, ppc64] linux-tools: Build perf with libnuma - -- Ben Hutchings Mon, 18 Nov 2013 04:17:25 +0000 + -- Ben Hutchings Mon, 18 Nov 2013 05:14:34 +0000 linux-tools (3.11-3) unstable; urgency=low From 49d1c6f1b6fb32f759bfa5acfc4ab0a47b180e8f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Dec 2013 02:04:08 +0000 Subject: [PATCH 281/487] linux-tools: Replace build-dependency on binutils-dev with libiberty-dev (Closes: #730883) Keep old binutils-dev versions as an alternative, for ease of backporting. svn path=/dists/trunk/linux-tools/; revision=20829 --- debian/changelog | 8 ++++++++ debian/templates/control.source.in | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9eb9e4081..cc7fac18e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux-tools (3.12-1~exp2) UNRELEASED; urgency=low + + * linux-tools: Replace build-dependency on binutils-dev with + libiberty-dev (or old binutils-dev, for ease of backporting) + (Closes: #730883) + + -- Ben Hutchings Sat, 30 Nov 2013 23:48:32 +0000 + linux-tools (3.12-1~exp1) experimental; urgency=low * New upstream release (Closes: #729197) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f1f520bc9..f995fdedb 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, binutils-dev, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 4f97c4f1e9cfb42a0697c6094f8ce7429f07af90 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 2 Dec 2013 05:25:21 +0000 Subject: [PATCH 282/487] debian/rules: Don't kill a git-svn clone on "make -f debian/rules orig". Thanks to Jon Severinsson. svn path=/dists/trunk/linux-tools/; revision=20844 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 6867d47e2..b04b1de29 100755 --- a/debian/rules +++ b/debian/rules @@ -28,7 +28,7 @@ TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.xz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) - rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . + rsync --delete --exclude /debian --exclude .svk --exclude .svn --exclude .git --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0 $(DIR_ORIG): From 763ecd85fddf7c1dedafe27f8c3dcff0005b2ad5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 25 Dec 2013 11:41:18 +0000 Subject: [PATCH 283/487] Update to 3.12.6 svn path=/dists/sid/linux-tools/; revision=20916 --- debian/changelog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cc7fac18e..8c251581b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,10 @@ -linux-tools (3.12-1~exp2) UNRELEASED; urgency=low +linux-tools (3.12.6-1) UNRELEASED; urgency=low + * New upstream stable update + - perf tools: Remove cast of non-variadic function to variadic + - perf tools: Synthesize anon MMAP records again + + [ Ben Hutchings ] * linux-tools: Replace build-dependency on binutils-dev with libiberty-dev (or old binutils-dev, for ease of backporting) (Closes: #730883) From e350788233c3940aa2d355964f41b1e43d34e390 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 25 Dec 2013 12:39:13 +0000 Subject: [PATCH 284/487] Prepare to release linux-tools (3.12.6-1). svn path=/dists/sid/linux-tools/; revision=20917 --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8c251581b..c43c2b574 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.12.6-1) UNRELEASED; urgency=low +linux-tools (3.12.6-1) unstable; urgency=medium * New upstream stable update - perf tools: Remove cast of non-variadic function to variadic @@ -8,6 +8,7 @@ linux-tools (3.12.6-1) UNRELEASED; urgency=low * linux-tools: Replace build-dependency on binutils-dev with libiberty-dev (or old binutils-dev, for ease of backporting) (Closes: #730883) + * Upload to unstable (Closes: #733076) -- Ben Hutchings Sat, 30 Nov 2013 23:48:32 +0000 From 257b73a0b69feae5ac419b43e0c438fe68905963 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 7 Jan 2014 14:39:50 +0000 Subject: [PATCH 285/487] Remove changelog line for 3.12.6-1 that is not present in the uploaded package svn path=/dists/sid/linux-tools/; revision=20962 --- debian/changelog | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c43c2b574..9b10afb4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,6 @@ linux-tools (3.12.6-1) unstable; urgency=medium * linux-tools: Replace build-dependency on binutils-dev with libiberty-dev (or old binutils-dev, for ease of backporting) (Closes: #730883) - * Upload to unstable (Closes: #733076) -- Ben Hutchings Sat, 30 Nov 2013 23:48:32 +0000 From 09bd3a69bed47d9264b34558701a8952ba8ba8c1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 Jan 2014 05:53:15 +0000 Subject: [PATCH 286/487] Update to 3.13 Refresh/drop patches as appropriate. svn path=/dists/trunk/linux-tools/; revision=20993 --- debian/changelog | 3 +- debian/patches/modpost-symbol-prefix.patch | 4 +- debian/patches/perf-fix-numa-types.patch | 46 -------------- debian/patches/series | 1 - debian/patches/tools-perf-install.patch | 60 ++++++++++-------- debian/patches/tools-perf-version.patch | 61 ++++++++++--------- .../patches/usbip-document-tcp-wrappers.patch | 8 +-- 7 files changed, 73 insertions(+), 110 deletions(-) delete mode 100644 debian/patches/perf-fix-numa-types.patch diff --git a/debian/changelog b/debian/changelog index cc7fac18e..eda83ec7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -linux-tools (3.12-1~exp2) UNRELEASED; urgency=low +linux-tools (3.13-1~exp1) UNRELEASED; urgency=low + * New upstream release * linux-tools: Replace build-dependency on binutils-dev with libiberty-dev (or old binutils-dev, for ease of backporting) (Closes: #730883) diff --git a/debian/patches/modpost-symbol-prefix.patch b/debian/patches/modpost-symbol-prefix.patch index 51c2cb271..0bda5f242 100644 --- a/debian/patches/modpost-symbol-prefix.patch +++ b/debian/patches/modpost-symbol-prefix.patch @@ -12,9 +12,9 @@ can simply omit it.] --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -18,7 +18,6 @@ - #include +@@ -19,7 +19,6 @@ #include + #include #include "modpost.h" -#include "../../include/generated/autoconf.h" #include "../../include/linux/license.h" diff --git a/debian/patches/perf-fix-numa-types.patch b/debian/patches/perf-fix-numa-types.patch deleted file mode 100644 index 136fd9735..000000000 --- a/debian/patches/perf-fix-numa-types.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Ben Hutchings -Date: Mon, 18 Nov 2013 05:12:30 +0000 -Subject: perf: Fix type errors in bench/numa.c -Forwarded: no - -Fix the following errors on i386 and probably most other 32-bit -architectures: - -bench/numa.c: In function 'worker_thread': -bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] - if (diff.tv_sec >= g->p.nr_secs) { - ^ -bench/numa.c:1161:6: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' [-Werror=format=] - process_nr, thread_nr, runtime_ns_max / bytes_done, val); - ^ - -Signed-off-by: Ben Hutchings ---- ---- a/tools/perf/bench/numa.c -+++ b/tools/perf/bench/numa.c -@@ -12,6 +12,7 @@ - #include "bench.h" - - #include -+#include - #include - #include - #include -@@ -1110,7 +1111,7 @@ static void *worker_thread(void *__tdata - /* Check whether our max runtime timed out: */ - if (g->p.nr_secs) { - timersub(&stop, &start0, &diff); -- if (diff.tv_sec >= g->p.nr_secs) { -+ if (diff.tv_sec >= (time_t)g->p.nr_secs) { - g->stop_work = true; - break; - } -@@ -1157,7 +1158,7 @@ static void *worker_thread(void *__tdata - runtime_ns_max += diff.tv_usec * 1000; - - if (details >= 0) { -- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n", -+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIx64"]\n", - process_nr, thread_nr, runtime_ns_max / bytes_done, val); - } - fflush(stdout); diff --git a/debian/patches/series b/debian/patches/series index 62a2a395d..8a0a63bc7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,4 +2,3 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch -perf-fix-numa-types.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index bbfc34f2c..2a8b44f2d 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -3,36 +3,42 @@ Date: Fri, 07 Oct 2011 21:37:52 +0100 Subject: Install perf scripts non-executable Forwarded: no ---- a/tools/perf/Makefile -+++ b/tools/perf/Makefile -@@ -775,23 +775,23 @@ install-bin: all +[bwh: Forward-ported to 3.12] + +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -827,8 +827,8 @@ install-bin: all install-gtk ifndef NO_LIBPERL - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' -- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' -- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' -+ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' -+ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl' - $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + $(call QUIET_INSTALL, perl-scripts) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ ++ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ ++ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ + $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif - ifndef NO_LIBPYTHON - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' -- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' -- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' -+ $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace' -+ $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python' - $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' +@@ -836,18 +836,18 @@ ifndef NO_LIBPYTHON + $(call QUIET_INSTALL, python-scripts) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ +- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ ++ $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ ++ $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ + $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' endif - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' -- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' -+ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' -- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' -+ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -+ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(call QUIET_INSTALL, bash_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' ++ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, tests) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ +- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ ++ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ +- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' ++ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' install: install-bin try-install-man diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index c16880628..17317b7f3 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -5,29 +5,31 @@ Forwarded: no [bwh: Fix version insertion in perf man page cross-references and perf man page title. Install bash_completion script for perf with a -version-dependent name.] +version-dependent name. And do the same for trace.] ---- a/tools/perf/Makefile -+++ b/tools/perf/Makefile -@@ -769,7 +769,7 @@ check: $(OUTPUT)common-cmds.h - - install-bin: all - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' -- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' -+ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' - $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' - ifndef NO_LIBPERL -@@ -787,7 +787,7 @@ ifndef NO_LIBPYTHON - $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -818,8 +818,8 @@ install-gtk: + install-bin: all install-gtk + $(call QUIET_INSTALL, binaries) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace' ++ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \ ++ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' + $(call QUIET_INSTALL, libexec) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + $(call QUIET_INSTALL, perf-archive) \ +@@ -842,7 +842,7 @@ ifndef NO_LIBPYTHON endif - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d' -- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' -+ $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' - $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -@@ -800,7 +800,7 @@ install-python_ext: + $(call QUIET_INSTALL, bash_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, tests) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ + $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ +@@ -856,7 +856,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -38,7 +40,7 @@ version-dependent name.] --- a/tools/perf/Documentation/Makefile +++ b/tools/perf/Documentation/Makefile -@@ -182,13 +182,15 @@ ifdef missing_tools +@@ -183,14 +183,16 @@ ifdef missing_tools $(error "You need to install $(missing_tools) for man pages") endif @@ -50,13 +52,14 @@ version-dependent name.] + sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 + +install-man-perf%.1: $(OUTPUT)perf%.1 - $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) --# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) --# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) -- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) --# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) --# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) -+ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 + $(call QUIET_INSTALL, Documentation-man) \ + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ +- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) ++ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 install-man: check-man-tools man diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch index bcb339856..10ef542e3 100644 --- a/debian/patches/usbip-document-tcp-wrappers.patch +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -7,17 +7,17 @@ Add references to TCP wrappers configuration in the manual page. --- a/drivers/staging/usbip/userspace/doc/usbipd.8 +++ b/drivers/staging/usbip/userspace/doc/usbipd.8 -@@ -14,7 +14,8 @@ +@@ -14,7 +14,8 @@ Devices have to explicitly be exported u before usbipd makes them available to other hosts. The daemon accepts connections from USB/IP clients --on TCP port 3240. -+on TCP port 3240. The clients authorised to connect may be +-on TCP port 3240 by default. ++on TCP port 3240 by default. The clients authorised to connect may be +configured as documented in hosts_access(5). .SH OPTIONS .HP -@@ -44,7 +45,8 @@ +@@ -69,7 +70,8 @@ Show version. .B usbipd offers no authentication or authorization for USB/IP. Any From 8cad86b947aa69e52250c00d1f78d6f64cc98532 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 21 Jan 2014 06:33:13 +0000 Subject: [PATCH 287/487] Bypass the new and buggy tools/perf/Makefile in favour of Makefile.perf Somehow this new wrapper manages to reduce the priority of our 'prefix' setting. That interacts with the insane way prefix is defaulted in config/Makefile so that the prefix is wrong at build time but right at install time (resulting in a rebuild then!). Also the wrapper replaces our -j option and we would have to set JOBS instead. The perf makefiles never get better, just different... svn path=/dists/trunk/linux-tools/; revision=20994 --- debian/build/tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 50abf0961..72123ec08 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -42,13 +42,13 @@ MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2= all: ifdef KERNEL_ARCH_PERF -mkdir out - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out all VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out all VERSION=$(VERSION) +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation O=$(CURDIR)/out man VERSION=$(VERSION) endif install: ifdef KERNEL_ARCH_PERF - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf O=$(CURDIR)/out install VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out install VERSION=$(VERSION) endif clean: From 2fa2de4959dd5bc20f921e8e5959623e8ff1c530 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 10:52:19 +0000 Subject: [PATCH 288/487] linux-tools: Replace build-dependency on libunwind7-dev with libunwind8-dev svn path=/dists/sid/linux-tools/; revision=21015 --- debian/build/tools/perf/Makefile | 6 ------ debian/changelog | 7 +++++++ debian/templates/control.source.in | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 50abf0961..45d8d2266 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -4,20 +4,16 @@ include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) -NO_LIBUNWIND = 1 - ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 - NO_LIBUNWIND = else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 - NO_LIBUNWIND = else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) @@ -35,8 +31,6 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) endif # disable Gtk UI until it's more usable -# disable libunwind on architectures lacking libunwind7-dev, just in case -# libunwind8-dev is installed MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) all: diff --git a/debian/changelog b/debian/changelog index 9b10afb4e..eb07d8af7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.12.6-2) UNRELEASED; urgency=low + + * linux-tools: Replace build-dependency on libunwind7-dev with + libunwind8-dev + + -- Ben Hutchings Sun, 02 Feb 2014 11:51:18 +0100 + linux-tools (3.12.6-1) unstable; urgency=medium * New upstream stable update diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f995fdedb..c6ead8cdb 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind7-dev [amd64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 armel armhf i386 mips powerpc ppc64], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 8ec14f8b6da4d63dcec7be218b2bee7bfc36fdee Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 10:52:47 +0000 Subject: [PATCH 289/487] Prepare to release linux-tools (3.12.6-2). svn path=/dists/sid/linux-tools/; revision=21016 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index eb07d8af7..c4f1336a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.12.6-2) UNRELEASED; urgency=low +linux-tools (3.12.6-2) unstable; urgency=medium * linux-tools: Replace build-dependency on libunwind7-dev with libunwind8-dev From 340374facaa9eb97dfab9fafd6f98e19213ee21b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 11:09:41 +0000 Subject: [PATCH 290/487] Prepare to release linux-tools (3.13-1~exp1). svn path=/dists/trunk/linux-tools/; revision=21019 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c32acafcd..4aa025f8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.13-1~exp1) UNRELEASED; urgency=low +linux-tools (3.13-1~exp1) experimental; urgency=low * New upstream release From a3f8abcc2a9a669237aafa95ac375541eb801575 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 15:41:21 +0000 Subject: [PATCH 291/487] linux-tools: Explicitly enable/disable libunwind usage for all architectures (fixes FTBFS on s390x and sparc) svn path=/dists/sid/linux-tools/; revision=21023 --- debian/build/tools/perf/Makefile | 6 ++++++ debian/changelog | 7 +++++++ debian/templates/control.source.in | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 45d8d2266..5e6c511d6 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -3,21 +3,27 @@ OUTDIR = tools/perf include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) +NO_LIBUNWIND=1 ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) KERNEL_ARCH_PERF = powerpc + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),s390) KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),s390x) diff --git a/debian/changelog b/debian/changelog index c4f1336a1..2e236b592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.12.6-3) UNRELEASED; urgency=medium + + * linux-tools: Explicitly enable/disable libunwind usage for all + architectures (fixes FTBFS on s390x and sparc) + + -- Ben Hutchings Sun, 02 Feb 2014 16:14:33 +0100 + linux-tools (3.12.6-2) unstable; urgency=medium * linux-tools: Replace build-dependency on libunwind7-dev with diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index c6ead8cdb..0db2f3644 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 armel armhf i386 mips powerpc ppc64], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 armel armhf i386 powerpc ppc64], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 315706dfada1c068aa690c4f8c0a23582c750674 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 15:46:40 +0000 Subject: [PATCH 292/487] linux-tools: Only use libunwind on x86, as perf needs additional porting work for other architectures (fixes FTBFS on arm and powerpc) svn path=/dists/sid/linux-tools/; revision=21024 --- debian/build/tools/perf/Makefile | 3 --- debian/changelog | 2 ++ debian/templates/control.source.in | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 5e6c511d6..ae35f6ce7 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -12,7 +12,6 @@ else ifeq ($(DEB_HOST_ARCH_CPU),amd64) NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) @@ -20,10 +19,8 @@ else ifeq ($(DEB_HOST_ARCH_CPU),i386) NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) KERNEL_ARCH_PERF = powerpc - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),s390) KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),s390x) diff --git a/debian/changelog b/debian/changelog index 2e236b592..c821350ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ linux-tools (3.12.6-3) UNRELEASED; urgency=medium * linux-tools: Explicitly enable/disable libunwind usage for all architectures (fixes FTBFS on s390x and sparc) + * linux-tools: Only use libunwind on x86, as perf needs additional + porting work for other architectures (fixes FTBFS on arm and powerpc) -- Ben Hutchings Sun, 02 Feb 2014 16:14:33 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 0db2f3644..fdfa64c3c 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 armel armhf i386 powerpc ppc64], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 8b0c975bb81f7e0325a7c1bca5c263c2930076bf Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 15:56:30 +0000 Subject: [PATCH 293/487] Prepare to release linux-tools (3.12.6-3). svn path=/dists/sid/linux-tools/; revision=21025 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c821350ca..798e20f8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -linux-tools (3.12.6-3) UNRELEASED; urgency=medium +linux-tools (3.12.6-3) unstable; urgency=medium * linux-tools: Explicitly enable/disable libunwind usage for all architectures (fixes FTBFS on s390x and sparc) * linux-tools: Only use libunwind on x86, as perf needs additional porting work for other architectures (fixes FTBFS on arm and powerpc) - -- Ben Hutchings Sun, 02 Feb 2014 16:14:33 +0100 + -- Ben Hutchings Sun, 02 Feb 2014 16:46:44 +0100 linux-tools (3.12.6-2) unstable; urgency=medium From 3e8d83d5ac2caccb35cd0453b169c41faf541397 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 2 Feb 2014 16:03:56 +0000 Subject: [PATCH 294/487] Prepare to release linux-tools (3.13-1~exp2). svn path=/dists/trunk/linux-tools/; revision=21028 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1e12c233b..d4a6b850e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.13-1~exp2) experimental; urgency=medium + + * Merge changes from sid up to 3.12.6-3 + + -- Ben Hutchings Sun, 02 Feb 2014 16:57:49 +0100 + linux-tools (3.13-1~exp1) experimental; urgency=low * New upstream release From f38b58be664f8adc7276bba21c08dbcc02a15098 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 6 Feb 2014 01:04:26 +0000 Subject: [PATCH 295/487] linux-tools: Fix/revert unportable code in perf trace (fixes FTBFS on powerpc, sparc) svn path=/dists/trunk/linux-tools/; revision=21033 --- debian/changelog | 7 ++ ...fallback-definition-of-EFD_SEMAPHORE.patch | 30 ++++++++ ...e-architecture-specific-signal-numbe.patch | 44 +++++++++++ ...e-Initial-beautifier-for-ioctl-s-cmd.patch | 74 +++++++++++++++++++ debian/patches/series | 3 + 5 files changed, 158 insertions(+) create mode 100644 debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch create mode 100644 debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch create mode 100644 debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch diff --git a/debian/changelog b/debian/changelog index d4a6b850e..8e70fd519 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.13-1~exp3) UNRELEASED; urgency=medium + + * linux-tools: Fix/revert unportable code in perf trace (fixes FTBFS + on powerpc, sparc) + + -- Ben Hutchings Wed, 05 Feb 2014 04:45:12 +0000 + linux-tools (3.13-1~exp2) experimental; urgency=medium * Merge changes from sid up to 3.12.6-3 diff --git a/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch b/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch new file mode 100644 index 000000000..5e34cf7ce --- /dev/null +++ b/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch @@ -0,0 +1,30 @@ +From: Ben Hutchings +Date: Thu, 6 Feb 2014 00:46:51 +0000 +Subject: [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE +Forwarded: http://mid.gmane.org/1391648435.3003.100.camel@deadeye.wl.decadent.org.uk + +glibc 2.17 is missing this on sparc, despite the fact that it's +not architecture-specific. + +Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg') +Signed-off-by: Ben Hutchings +Cc: +--- + tools/perf/builtin-trace.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c +index c9671bd..5c32dcf 100644 +--- a/tools/perf/builtin-trace.c ++++ b/tools/perf/builtin-trace.c +@@ -35,6 +35,10 @@ + # define MADV_UNMERGEABLE 13 + #endif + ++#ifndef EFD_SEMAPHORE ++# define EFD_SEMAPHORE 1 ++#endif ++ + struct tp_field { + int offset; + union { diff --git a/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch b/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch new file mode 100644 index 000000000..0146c76a2 --- /dev/null +++ b/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch @@ -0,0 +1,44 @@ +From: Ben Hutchings +Date: Thu, 6 Feb 2014 00:47:06 +0000 +Subject: [PATCH 3/3] perf trace: Decode architecture-specific signal numbers +Forwarded: http://mid.gmane.org/1391648441.3003.101.camel@deadeye.wl.decadent.org.uk + +SIGSTKFLT is not defined on alpha, mips or sparc. +SIGEMT and SIGSWI are defined on some architectures and should be +decoded here if so. + +Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls') +Signed-off-by: Ben Hutchings +Cc: +--- + tools/perf/builtin-trace.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c +index 5c32dcf..25ea64c 100644 +--- a/tools/perf/builtin-trace.c ++++ b/tools/perf/builtin-trace.c +@@ -807,7 +807,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal + P_SIGNUM(PIPE); + P_SIGNUM(ALRM); + P_SIGNUM(TERM); +- P_SIGNUM(STKFLT); + P_SIGNUM(CHLD); + P_SIGNUM(CONT); + P_SIGNUM(STOP); +@@ -823,6 +822,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal + P_SIGNUM(IO); + P_SIGNUM(PWR); + P_SIGNUM(SYS); ++#ifdef SIGEMT ++ P_SIGNUM(EMT); ++#endif ++#ifdef SIGSTKFLT ++ P_SIGNUM(STKFLT); ++#endif ++#ifdef SIGSWI ++ P_SIGNUM(SWI); ++#endif + default: break; + } + diff --git a/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch b/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch new file mode 100644 index 000000000..909fdbc1e --- /dev/null +++ b/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch @@ -0,0 +1,74 @@ +From: Ben Hutchings +Date: Thu, 6 Feb 2014 00:46:39 +0000 +Subject: [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" +Forwarded: http://mid.gmane.org/1391648425.3003.99.camel@deadeye.wl.decadent.org.uk + +This reverts commit 78645cf3ed32860a3e83b8e35aa469f5b844a4ba, +which is incorrect for many architectures and has broken +compilation on at least powerpc and sparc. + +Signed-off-by: Ben Hutchings +Cc: +--- + tools/perf/builtin-trace.c | 34 +--------------------------------- + 1 file changed, 1 insertion(+), 33 deletions(-) + +diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c +index 8be17fc..c9671bd 100644 +--- a/tools/perf/builtin-trace.c ++++ b/tools/perf/builtin-trace.c +@@ -275,14 +275,6 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size, + + #define SCA_STRARRAY syscall_arg__scnprintf_strarray + +-static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, +- struct syscall_arg *arg) +-{ +- return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg); +-} +- +-#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray +- + static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, + struct syscall_arg *arg); + +@@ -835,28 +827,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal + + #define SCA_SIGNUM syscall_arg__scnprintf_signum + +-#define TCGETS 0x5401 +- +-static const char *tioctls[] = { +- "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW", +- "TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL", +- "TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI", +- "TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC", +- "TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX", +- "TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO", +- "TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK", +- "TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2", +- "TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK", +- "TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG", +- "TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL", +- [0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG", +- "TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS", +- "TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI", +- "TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE", +-}; +- +-static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); +- + #define STRARRAY(arg, name, array) \ + .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ + .arg_parm = { [arg] = &strarray__##array, } +@@ -937,9 +907,7 @@ static struct syscall_fmt { + { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, + { .name = "ioctl", .errmsg = true, + .arg_scnprintf = { [0] = SCA_FD, /* fd */ +- [1] = SCA_STRHEXARRAY, /* cmd */ +- [2] = SCA_HEX, /* arg */ }, +- .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, ++ [2] = SCA_HEX, /* arg */ }, }, + { .name = "kill", .errmsg = true, + .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, + { .name = "linkat", .errmsg = true, diff --git a/debian/patches/series b/debian/patches/series index 8a0a63bc7..a7055abb4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,6 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch +revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch +perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch +perf-trace-Decode-architecture-specific-signal-numbe.patch From c1cf4ba8ec1662e08d8c925ce388c681166ac055 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 7 Feb 2014 22:12:40 +0000 Subject: [PATCH 296/487] Prepare to release linux-tools (3.13-1~exp3). svn path=/dists/trunk/linux-tools/; revision=21036 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8e70fd519..50791adf2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.13-1~exp3) UNRELEASED; urgency=medium +linux-tools (3.13-1~exp3) experimental; urgency=medium * linux-tools: Fix/revert unportable code in perf trace (fixes FTBFS on powerpc, sparc) - -- Ben Hutchings Wed, 05 Feb 2014 04:45:12 +0000 + -- Ben Hutchings Fri, 07 Feb 2014 20:36:29 +0000 linux-tools (3.13-1~exp2) experimental; urgency=medium From 4b00bb56ea3f4fb4a5e5c0cf884e69ac49d9af04 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 22 Feb 2014 15:39:04 +0000 Subject: [PATCH 297/487] Update to 3.13.4 svn path=/dists/sid/linux-tools/; revision=21061 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 50791adf2..922530dd6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux-tools (3.13.4-1) UNRELEASED; urgency=medium + + * New upstream stable update: + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.13.2 + - perf kvm: Fix kvm report without guestmount. + + -- Ben Hutchings Sat, 22 Feb 2014 14:55:41 +0000 + linux-tools (3.13-1~exp3) experimental; urgency=medium * linux-tools: Fix/revert unportable code in perf trace (fixes FTBFS From 3b5c5481d828b39be6eddf4faf0b1851271ba4f5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 22 Feb 2014 16:02:28 +0000 Subject: [PATCH 298/487] Prepare to release linux-tools (3.13.4-1). svn path=/dists/sid/linux-tools/; revision=21066 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 922530dd6..fe6d567ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -linux-tools (3.13.4-1) UNRELEASED; urgency=medium +linux-tools (3.13.4-1) unstable; urgency=medium * New upstream stable update: http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.13.2 - perf kvm: Fix kvm report without guestmount. - -- Ben Hutchings Sat, 22 Feb 2014 14:55:41 +0000 + -- Ben Hutchings Sat, 22 Feb 2014 15:39:27 +0000 linux-tools (3.13-1~exp3) experimental; urgency=medium From b0512bce81f2bb4055af1df66e8698d9f54d16fe Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 22 Feb 2014 23:20:19 +0000 Subject: [PATCH 299/487] linux-tools: Remove the 'trace_3.13' link to perf I don't think we should install this alias yet: - We need a wrapper for it anyway, so there's little point adding a versioned link - It doesn't work out-of-the-box as non-root (it depends on debugfs), so it's less widely useful than strace - 'perf trace' doesn't take much more typing svn path=/dists/sid/linux-tools/; revision=21106 --- debian/build/tools/perf/Makefile | 7 +++++++ debian/changelog | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 38a656d0e..b42098ecf 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -46,6 +46,13 @@ endif install: ifdef KERNEL_ARCH_PERF +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out install VERSION=$(VERSION) +# Don't install a 'trace' alias yet: +# - We need a wrapper for it anyway, so there's little point adding a +# versioned link +# - It doesn't work out-of-the-box as non-root (it depends on debugfs), +# so it's less widely useful than strace +# - 'perf trace' doesn't take much more typing + rm -f $(DESTDIR)/usr/bin/trace_$(VERSION) endif clean: diff --git a/debian/changelog b/debian/changelog index fe6d567ef..3d93ab4a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.13.4-2) UNRELEASED; urgency=medium + + * linux-tools: Remove the 'trace_3.13' link to perf + + -- Ben Hutchings Sat, 22 Feb 2014 23:13:30 +0000 + linux-tools (3.13.4-1) unstable; urgency=medium * New upstream stable update: From 318ee6e36bf05d0a42e530665b7c1ba62f616a1c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 22 Feb 2014 23:38:24 +0000 Subject: [PATCH 300/487] Clean another autoconf-generated file so double-builds work svn path=/dists/sid/linux-tools/; revision=21107 --- debian/build/drivers/staging/usbip/Makefile | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/build/drivers/staging/usbip/Makefile b/debian/build/drivers/staging/usbip/Makefile index e895461b7..59992d7b9 100644 --- a/debian/build/drivers/staging/usbip/Makefile +++ b/debian/build/drivers/staging/usbip/Makefile @@ -19,6 +19,6 @@ install: $(MAKE) -C userspace install clean: - rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) + rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) find $(srcdir)/ -name Makefile.in -delete rm -rf userspace diff --git a/debian/changelog b/debian/changelog index 3d93ab4a0..76a475fa6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (3.13.4-2) UNRELEASED; urgency=medium * linux-tools: Remove the 'trace_3.13' link to perf + * Clean another autoconf-generated file so double-builds work -- Ben Hutchings Sat, 22 Feb 2014 23:13:30 +0000 From e534752fb2759983dcf7afb58371e7d567e76138 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 9 Mar 2014 17:38:51 +0000 Subject: [PATCH 301/487] Update to 3.14-rc5 svn path=/dists/trunk/linux-tools/; revision=21136 --- debian/changelog | 6 ++ ...fallback-definition-of-EFD_SEMAPHORE.patch | 30 -------- ...e-Initial-beautifier-for-ioctl-s-cmd.patch | 74 ------------------- debian/patches/series | 2 - debian/patches/tools-perf-install.patch | 12 +-- debian/patches/tools-perf-version.patch | 12 +-- 6 files changed, 18 insertions(+), 118 deletions(-) delete mode 100644 debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch delete mode 100644 debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch diff --git a/debian/changelog b/debian/changelog index fe6d567ef..a19343d45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.14~rc5-1~exp1) UNRELEASED; urgency=medium + + * New upstream release candidate + + -- Ben Hutchings Sun, 09 Mar 2014 13:45:19 +0000 + linux-tools (3.13.4-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch b/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch deleted file mode 100644 index 5e34cf7ce..000000000 --- a/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Ben Hutchings -Date: Thu, 6 Feb 2014 00:46:51 +0000 -Subject: [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE -Forwarded: http://mid.gmane.org/1391648435.3003.100.camel@deadeye.wl.decadent.org.uk - -glibc 2.17 is missing this on sparc, despite the fact that it's -not architecture-specific. - -Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg') -Signed-off-by: Ben Hutchings -Cc: ---- - tools/perf/builtin-trace.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index c9671bd..5c32dcf 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -35,6 +35,10 @@ - # define MADV_UNMERGEABLE 13 - #endif - -+#ifndef EFD_SEMAPHORE -+# define EFD_SEMAPHORE 1 -+#endif -+ - struct tp_field { - int offset; - union { diff --git a/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch b/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch deleted file mode 100644 index 909fdbc1e..000000000 --- a/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Ben Hutchings -Date: Thu, 6 Feb 2014 00:46:39 +0000 -Subject: [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" -Forwarded: http://mid.gmane.org/1391648425.3003.99.camel@deadeye.wl.decadent.org.uk - -This reverts commit 78645cf3ed32860a3e83b8e35aa469f5b844a4ba, -which is incorrect for many architectures and has broken -compilation on at least powerpc and sparc. - -Signed-off-by: Ben Hutchings -Cc: ---- - tools/perf/builtin-trace.c | 34 +--------------------------------- - 1 file changed, 1 insertion(+), 33 deletions(-) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index 8be17fc..c9671bd 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -275,14 +275,6 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size, - - #define SCA_STRARRAY syscall_arg__scnprintf_strarray - --static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, -- struct syscall_arg *arg) --{ -- return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg); --} -- --#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray -- - static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, - struct syscall_arg *arg); - -@@ -835,28 +827,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal - - #define SCA_SIGNUM syscall_arg__scnprintf_signum - --#define TCGETS 0x5401 -- --static const char *tioctls[] = { -- "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW", -- "TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL", -- "TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI", -- "TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC", -- "TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX", -- "TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO", -- "TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK", -- "TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2", -- "TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK", -- "TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG", -- "TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL", -- [0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG", -- "TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS", -- "TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI", -- "TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE", --}; -- --static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); -- - #define STRARRAY(arg, name, array) \ - .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ - .arg_parm = { [arg] = &strarray__##array, } -@@ -937,9 +907,7 @@ static struct syscall_fmt { - { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, - { .name = "ioctl", .errmsg = true, - .arg_scnprintf = { [0] = SCA_FD, /* fd */ -- [1] = SCA_STRHEXARRAY, /* cmd */ -- [2] = SCA_HEX, /* arg */ }, -- .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, -+ [2] = SCA_HEX, /* arg */ }, }, - { .name = "kill", .errmsg = true, - .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, - { .name = "linkat", .errmsg = true, diff --git a/debian/patches/series b/debian/patches/series index a7055abb4..bb7bb2475 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,6 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch -revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch -perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch perf-trace-Decode-architecture-specific-signal-numbe.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 2a8b44f2d..6de3c81ff 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -7,7 +7,7 @@ Forwarded: no --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -827,8 +827,8 @@ install-bin: all install-gtk +@@ -842,8 +842,8 @@ install-bin: all install-gtk ifndef NO_LIBPERL $(call QUIET_INSTALL, perl-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ @@ -18,7 +18,7 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif -@@ -836,18 +836,18 @@ ifndef NO_LIBPYTHON +@@ -851,18 +851,18 @@ ifndef NO_LIBPYTHON $(call QUIET_INSTALL, python-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ @@ -28,10 +28,10 @@ Forwarded: no + $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' endif - $(call QUIET_INSTALL, bash_completion-script) \ + $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ -- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' -+ $(INSTALL) -m 644 bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' ++ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ - $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ @@ -40,5 +40,5 @@ Forwarded: no - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' - install: install-bin try-install-man + install: install-bin try-install-man install-traceevent-plugins diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 17317b7f3..25d57e0c1 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,7 +9,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -818,8 +818,8 @@ install-gtk: +@@ -833,8 +833,8 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -20,16 +20,16 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, libexec) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-archive) \ -@@ -842,7 +842,7 @@ ifndef NO_LIBPYTHON +@@ -857,7 +857,7 @@ ifndef NO_LIBPYTHON endif - $(call QUIET_INSTALL, bash_completion-script) \ + $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ -- $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' -+ $(INSTALL) bash_completion '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ -@@ -856,7 +856,7 @@ install-python_ext: +@@ -871,7 +871,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): From 0b8b168b15cba6e53128db0c1a8582b12779bdde Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 17 Mar 2014 19:30:58 +0000 Subject: [PATCH 302/487] Update to 3.14-rc7 svn path=/dists/trunk/linux-tools/; revision=21159 --- debian/changelog | 2 +- ...e-architecture-specific-signal-numbe.patch | 44 ------------------- debian/patches/series | 1 - 3 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch diff --git a/debian/changelog b/debian/changelog index a19343d45..cc43bb350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.14~rc5-1~exp1) UNRELEASED; urgency=medium +linux-tools (3.14~rc7-1~exp1) UNRELEASED; urgency=medium * New upstream release candidate diff --git a/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch b/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch deleted file mode 100644 index 0146c76a2..000000000 --- a/debian/patches/perf-trace-Decode-architecture-specific-signal-numbe.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Ben Hutchings -Date: Thu, 6 Feb 2014 00:47:06 +0000 -Subject: [PATCH 3/3] perf trace: Decode architecture-specific signal numbers -Forwarded: http://mid.gmane.org/1391648441.3003.101.camel@deadeye.wl.decadent.org.uk - -SIGSTKFLT is not defined on alpha, mips or sparc. -SIGEMT and SIGSWI are defined on some architectures and should be -decoded here if so. - -Fixes: 8bad5b0abfdb ('perf trace: Beautify signal number arg in several syscalls') -Signed-off-by: Ben Hutchings -Cc: ---- - tools/perf/builtin-trace.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index 5c32dcf..25ea64c 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -807,7 +807,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal - P_SIGNUM(PIPE); - P_SIGNUM(ALRM); - P_SIGNUM(TERM); -- P_SIGNUM(STKFLT); - P_SIGNUM(CHLD); - P_SIGNUM(CONT); - P_SIGNUM(STOP); -@@ -823,6 +822,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal - P_SIGNUM(IO); - P_SIGNUM(PWR); - P_SIGNUM(SYS); -+#ifdef SIGEMT -+ P_SIGNUM(EMT); -+#endif -+#ifdef SIGSTKFLT -+ P_SIGNUM(STKFLT); -+#endif -+#ifdef SIGSWI -+ P_SIGNUM(SWI); -+#endif - default: break; - } - diff --git a/debian/patches/series b/debian/patches/series index bb7bb2475..8a0a63bc7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,4 +2,3 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch -perf-trace-Decode-architecture-specific-signal-numbe.patch From a2f5e52915e670eaea61a7ffd245cd1c1eb884d0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 17 Mar 2014 20:18:15 +0000 Subject: [PATCH 303/487] Prepare to release linux-tools (3.14~rc7-1~exp1). svn path=/dists/trunk/linux-tools/; revision=21160 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc43bb350..27b46cb24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.14~rc7-1~exp1) UNRELEASED; urgency=medium +linux-tools (3.14~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate - -- Ben Hutchings Sun, 09 Mar 2014 13:45:19 +0000 + -- Ben Hutchings Mon, 17 Mar 2014 19:31:14 +0000 linux-tools (3.13.4-1) unstable; urgency=medium From 3d3c39f14c93d2e47f6bab1943e58bea8a5a13c1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 19 Mar 2014 22:32:11 +0000 Subject: [PATCH 304/487] Update to 3.13.6 Drop a patch that went upstream. Drop patch reverting unportable code that has been #ifdef'd upstream. svn path=/dists/sid/linux-tools/; revision=21172 --- debian/changelog | 10 ++- ...fallback-definition-of-EFD_SEMAPHORE.patch | 30 -------- ...e-Initial-beautifier-for-ioctl-s-cmd.patch | 74 ------------------- debian/patches/series | 2 - 4 files changed, 9 insertions(+), 107 deletions(-) delete mode 100644 debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch delete mode 100644 debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch diff --git a/debian/changelog b/debian/changelog index 76a475fa6..76ff2da85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,13 @@ -linux-tools (3.13.4-2) UNRELEASED; urgency=medium +linux-tools (3.13.6-1) UNRELEASED; urgency=medium + * New upstream stable update: + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.13.5 + - Modpost: fixed USB alias generation for ranges including 0x9 and 0xA + http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.13.6 + - perf trace: Fix ioctl 'request' beautifier build problems on + !(i386 || x86_64) arches + + [ Ben Hutchings ] * linux-tools: Remove the 'trace_3.13' link to perf * Clean another autoconf-generated file so double-builds work diff --git a/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch b/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch deleted file mode 100644 index 5e34cf7ce..000000000 --- a/debian/patches/perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Ben Hutchings -Date: Thu, 6 Feb 2014 00:46:51 +0000 -Subject: [PATCH 2/3] perf trace: Add fallback definition of EFD_SEMAPHORE -Forwarded: http://mid.gmane.org/1391648435.3003.100.camel@deadeye.wl.decadent.org.uk - -glibc 2.17 is missing this on sparc, despite the fact that it's -not architecture-specific. - -Fixes: 49af9e93adfa ('perf trace: Beautify eventfd2 'flags' arg') -Signed-off-by: Ben Hutchings -Cc: ---- - tools/perf/builtin-trace.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index c9671bd..5c32dcf 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -35,6 +35,10 @@ - # define MADV_UNMERGEABLE 13 - #endif - -+#ifndef EFD_SEMAPHORE -+# define EFD_SEMAPHORE 1 -+#endif -+ - struct tp_field { - int offset; - union { diff --git a/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch b/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch deleted file mode 100644 index 909fdbc1e..000000000 --- a/debian/patches/revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Ben Hutchings -Date: Thu, 6 Feb 2014 00:46:39 +0000 -Subject: [PATCH 1/3] Revert "perf trace: Initial beautifier for ioctl's 'cmd' arg" -Forwarded: http://mid.gmane.org/1391648425.3003.99.camel@deadeye.wl.decadent.org.uk - -This reverts commit 78645cf3ed32860a3e83b8e35aa469f5b844a4ba, -which is incorrect for many architectures and has broken -compilation on at least powerpc and sparc. - -Signed-off-by: Ben Hutchings -Cc: ---- - tools/perf/builtin-trace.c | 34 +--------------------------------- - 1 file changed, 1 insertion(+), 33 deletions(-) - -diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c -index 8be17fc..c9671bd 100644 ---- a/tools/perf/builtin-trace.c -+++ b/tools/perf/builtin-trace.c -@@ -275,14 +275,6 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size, - - #define SCA_STRARRAY syscall_arg__scnprintf_strarray - --static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, -- struct syscall_arg *arg) --{ -- return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg); --} -- --#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray -- - static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, - struct syscall_arg *arg); - -@@ -835,28 +827,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal - - #define SCA_SIGNUM syscall_arg__scnprintf_signum - --#define TCGETS 0x5401 -- --static const char *tioctls[] = { -- "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW", -- "TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL", -- "TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI", -- "TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC", -- "TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX", -- "TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO", -- "TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK", -- "TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2", -- "TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK", -- "TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG", -- "TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL", -- [0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG", -- "TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS", -- "TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI", -- "TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE", --}; -- --static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); -- - #define STRARRAY(arg, name, array) \ - .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ - .arg_parm = { [arg] = &strarray__##array, } -@@ -937,9 +907,7 @@ static struct syscall_fmt { - { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, - { .name = "ioctl", .errmsg = true, - .arg_scnprintf = { [0] = SCA_FD, /* fd */ -- [1] = SCA_STRHEXARRAY, /* cmd */ -- [2] = SCA_HEX, /* arg */ }, -- .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, -+ [2] = SCA_HEX, /* arg */ }, }, - { .name = "kill", .errmsg = true, - .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, - { .name = "linkat", .errmsg = true, diff --git a/debian/patches/series b/debian/patches/series index a7055abb4..bb7bb2475 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,6 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch -revert-perf-trace-Initial-beautifier-for-ioctl-s-cmd.patch -perf-trace-Add-fallback-definition-of-EFD_SEMAPHORE.patch perf-trace-Decode-architecture-specific-signal-numbe.patch From d2fa3b21818cfcc15380856c6394fae21756ab76 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 19 Mar 2014 23:08:14 +0000 Subject: [PATCH 305/487] Prepare to release linux-tools (3.13.6-1). svn path=/dists/sid/linux-tools/; revision=21174 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 76ff2da85..070a1aa1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.13.6-1) UNRELEASED; urgency=medium +linux-tools (3.13.6-1) unstable; urgency=medium * New upstream stable update: http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.13.5 @@ -11,7 +11,7 @@ linux-tools (3.13.6-1) UNRELEASED; urgency=medium * linux-tools: Remove the 'trace_3.13' link to perf * Clean another autoconf-generated file so double-builds work - -- Ben Hutchings Sat, 22 Feb 2014 23:13:30 +0000 + -- Ben Hutchings Wed, 19 Mar 2014 22:33:21 +0000 linux-tools (3.13.4-1) unstable; urgency=medium From da6823452398b009c66469ec3e71cc39d45311a1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 31 Mar 2014 12:26:43 +0000 Subject: [PATCH 306/487] Update to 3.14 svn path=/dists/trunk/linux-tools/; revision=21202 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8d163ae6a..3f885ad5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.14-1~exp1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Mon, 31 Mar 2014 13:13:35 +0100 + linux-tools (3.14~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate From 8e1813d155cf1f84005f118d96a0ff63f5a0f93c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 28 Apr 2014 16:46:41 +0000 Subject: [PATCH 307/487] Prepare to release linux-tools (3.14-1). svn path=/dists/trunk/linux-tools/; revision=21280 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3f885ad5d..48c1f884e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (3.14-1~exp1) UNRELEASED; urgency=medium +linux-tools (3.14-1) unstable; urgency=medium * New upstream release - -- Ben Hutchings Mon, 31 Mar 2014 13:13:35 +0100 + -- Ben Hutchings Mon, 28 Apr 2014 17:46:24 +0100 linux-tools (3.14~rc7-1~exp1) experimental; urgency=medium From 41b28afb6c46d119dfc1295007bbd3db93cb27fc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 17:49:10 +0000 Subject: [PATCH 308/487] Update to 3.16-rc7 - genorig: Include new directory for usbip UAPI header - debian/control: Update Build-Depends for usbip switching from libsysfs to libudev svn path=/dists/trunk/linux-tools/; revision=21641 --- debian/bin/genorig.py | 1 + debian/changelog | 11 +++++++++++ debian/templates/control.source.in | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index cf008a6ec..668e82760 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -144,6 +144,7 @@ class Main(object): 'arch/*/Makefile', 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', + 'drivers/staging/usbip/uapi/', 'drivers/staging/usbip/userspace/', 'include/', 'lib/rbtree.c', diff --git a/debian/changelog b/debian/changelog index 48c1f884e..78c4bc0af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium + + * New upstream release candidate + + [ Ben Hutchings ] + * genorig: Include new directory for usbip UAPI header + * debian/control: Update Build-Depends for usbip switching from + libsysfs to libudev + + -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 + linux-tools (3.14-1) unstable; urgency=medium * New upstream release diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index fdfa64c3c..f11555c6b 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,6 +7,6 @@ Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev + autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 11a8ecec5ac57a6d706522f8e7fae6906263cf32 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 18:04:34 +0000 Subject: [PATCH 309/487] perf: Build with V=1 as V=2 no longer works svn path=/dists/trunk/linux-tools/; revision=21642 --- debian/build/tools/perf/Makefile | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index b42098ecf..303ec895a 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -34,7 +34,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) endif # disable Gtk UI until it's more usable -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=2 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=1 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) all: ifdef KERNEL_ARCH_PERF diff --git a/debian/changelog b/debian/changelog index 78c4bc0af..5bc74f359 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium * genorig: Include new directory for usbip UAPI header * debian/control: Update Build-Depends for usbip switching from libsysfs to libudev + * perf: Build with V=1 as V=2 no longer works -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 From 465ef86f0aac5dd9ac22f988af787a225f5f8985 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 18:53:26 +0000 Subject: [PATCH 310/487] debian/rules.real: Split up build rule so we can selectively add variables We need to define an extra variable when building perf. svn path=/dists/trunk/linux-tools/; revision=21643 --- debian/rules.real | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 8b2730e8e..dcdae6c87 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -15,10 +15,12 @@ endif build: $(STAMPS_DIR)/build -$(STAMPS_DIR)/build: - $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) +$(STAMPS_DIR)/build: build-kbuild build-tools build-usbip touch '$@' +build-kbuild: + $(MAKE) -C $(BUILD_DIR)/scripts top_srcdir=$(CURDIR) + install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME) install-kbuild: BASE_DIR = /usr/lib/$(PACKAGE_NAME) @@ -40,6 +42,9 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb +build-tools: + $(MAKE) -C $(BUILD_DIR)/tools top_srcdir=$(CURDIR) + install-tools: PACKAGE_NAME = linux-tools-$(VERSION) install-tools: DH_OPTIONS = -p$(PACKAGE_NAME) install-tools: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) @@ -61,6 +66,9 @@ install-tools: $(STAMPS_DIR)/build dh_md5sums dh_builddeb +build-usbip: + $(MAKE) -C $(BUILD_DIR)/drivers/staging/usbip top_srcdir=$(CURDIR) + install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/tmp install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/drivers/staging/usbip/userspace/config.h) From d72e351ea7cf2986822a3a6c1fc1bc7ed43e8488 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 18:56:18 +0000 Subject: [PATCH 311/487] perf: Change build command to avoid a rebuild during 'make install' svn path=/dists/trunk/linux-tools/; revision=21644 --- debian/changelog | 1 + debian/rules.real | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5bc74f359..820643320 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium * debian/control: Update Build-Depends for usbip switching from libsysfs to libudev * perf: Build with V=1 as V=2 no longer works + * perf: Change build command to avoid a rebuild during 'make install' -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 diff --git a/debian/rules.real b/debian/rules.real index dcdae6c87..76bd1265f 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -43,7 +43,10 @@ install-kbuild: $(STAMPS_DIR)/build dh_builddeb build-tools: - $(MAKE) -C $(BUILD_DIR)/tools top_srcdir=$(CURDIR) +# perf changes some default directories depending on whether DESTDIR is +# set. We must define it even when building to avoid a rebuild when we +# run 'make install'. + $(MAKE) -C $(BUILD_DIR)/tools top_srcdir=$(CURDIR) DESTDIR=dummy install-tools: PACKAGE_NAME = linux-tools-$(VERSION) install-tools: DH_OPTIONS = -p$(PACKAGE_NAME) From a00c00dda5a2173e787f11015b12a052402c2665 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 19:18:10 +0000 Subject: [PATCH 312/487] Revert previous changes to debian/rules.real and move to debian/build/tools/perf/Makefile svn path=/dists/trunk/linux-tools/; revision=21645 --- debian/build/tools/perf/Makefile | 5 ++++- debian/rules.real | 15 ++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 303ec895a..4b9573b44 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -39,7 +39,10 @@ MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2= all: ifdef KERNEL_ARCH_PERF -mkdir out - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out all VERSION=$(VERSION) +# perf changes some default directories depending on whether DESTDIR is +# set. We must define it even when building to avoid a rebuild when we +# run 'make install'. + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out all VERSION=$(VERSION) DESTDIR=dummy +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation O=$(CURDIR)/out man VERSION=$(VERSION) endif diff --git a/debian/rules.real b/debian/rules.real index 76bd1265f..8b2730e8e 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -15,12 +15,10 @@ endif build: $(STAMPS_DIR)/build -$(STAMPS_DIR)/build: build-kbuild build-tools build-usbip +$(STAMPS_DIR)/build: + $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) touch '$@' -build-kbuild: - $(MAKE) -C $(BUILD_DIR)/scripts top_srcdir=$(CURDIR) - install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME) install-kbuild: BASE_DIR = /usr/lib/$(PACKAGE_NAME) @@ -42,12 +40,6 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -build-tools: -# perf changes some default directories depending on whether DESTDIR is -# set. We must define it even when building to avoid a rebuild when we -# run 'make install'. - $(MAKE) -C $(BUILD_DIR)/tools top_srcdir=$(CURDIR) DESTDIR=dummy - install-tools: PACKAGE_NAME = linux-tools-$(VERSION) install-tools: DH_OPTIONS = -p$(PACKAGE_NAME) install-tools: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) @@ -69,9 +61,6 @@ install-tools: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -build-usbip: - $(MAKE) -C $(BUILD_DIR)/drivers/staging/usbip top_srcdir=$(CURDIR) - install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/tmp install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/drivers/staging/usbip/userspace/config.h) From 986ca4e77630624b1dbeea5e18a15fe1033259af Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 19:28:46 +0000 Subject: [PATCH 313/487] linux-tools: Install traceevent plugins in /usr/lib/traceevent_/plugins (Closes: #756429) svn path=/dists/trunk/linux-tools/; revision=21646 --- debian/build/tools/perf/Makefile | 5 +++-- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 4b9573b44..ca6ac47b3 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -33,8 +33,9 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -# disable Gtk UI until it's more usable -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core NO_GTK2=1 NO_PERL=1 V=1 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +# - disable Gtk UI until it's more usable +# - Include version in all directory names +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins NO_GTK2=1 NO_PERL=1 V=1 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) all: ifdef KERNEL_ARCH_PERF diff --git a/debian/changelog b/debian/changelog index 820643320..2f7e68c75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium libsysfs to libudev * perf: Build with V=1 as V=2 no longer works * perf: Change build command to avoid a rebuild during 'make install' + * linux-tools: Install traceevent plugins in + /usr/lib/traceevent_/plugins (Closes: #756429) -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 From e7dd8f382b7a134cb0a209a53b04b7935873a11c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 20:11:00 +0000 Subject: [PATCH 314/487] linux-kbuild: Install scripts/Makefile.extrawarn svn path=/dists/trunk/linux-tools/; revision=21647 --- debian/build/scripts/Makefile | 1 + debian/changelog | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 13f2e7a56..104cb8d1b 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -8,6 +8,7 @@ DATA = \ Kbuild.include \ Makefile.build \ Makefile.clean \ + Makefile.extrawarn \ Makefile.host \ Makefile.lib \ Makefile.modinst \ diff --git a/debian/changelog b/debian/changelog index 2f7e68c75..eaf1382f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium * perf: Change build command to avoid a rebuild during 'make install' * linux-tools: Install traceevent plugins in /usr/lib/traceevent_/plugins (Closes: #756429) + * linux-kbuild: Install scripts/Makefile.extrawarn -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 From 5a9d03bb0d1f57d0c13f243859275f95f5d4590f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jul 2014 20:13:33 +0000 Subject: [PATCH 315/487] Prepare to release linux-tools (3.16~rc7-1~exp1). svn path=/dists/trunk/linux-tools/; revision=21648 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index eaf1382f6..203d6bf0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium +linux-tools (3.16~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate @@ -12,7 +12,7 @@ linux-tools (3.16~rc7-1) UNRELEASED; urgency=medium /usr/lib/traceevent_/plugins (Closes: #756429) * linux-kbuild: Install scripts/Makefile.extrawarn - -- Ben Hutchings Tue, 29 Jul 2014 18:08:55 +0100 + -- Ben Hutchings Tue, 29 Jul 2014 21:11:10 +0100 linux-tools (3.14-1) unstable; urgency=medium From 6c9f034ae86428cdbbabf17e3d037778ed6825f7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 24 Aug 2014 00:54:41 +0000 Subject: [PATCH 316/487] Update to 3.16 svn path=/dists/trunk/linux-tools/; revision=21740 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 203d6bf0f..308b911a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.16-1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Sat, 23 Aug 2014 17:50:42 -0700 + linux-tools (3.16~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate From b7b252be8b271f6ba5f691c0df731c86300fe3d1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 26 Aug 2014 08:14:42 +0000 Subject: [PATCH 317/487] [ppc64el] Build linux-tools binary package svn path=/dists/trunk/linux-tools/; revision=21747 --- debian/build/tools/perf/Makefile | 2 ++ debian/changelog | 3 +++ debian/rules.real | 2 +- debian/templates/control.main.in | 2 +- debian/templates/control.source.in | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index ca6ac47b3..afe052627 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -21,6 +21,8 @@ else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) KERNEL_ARCH_PERF = powerpc +else ifeq ($(DEB_HOST_ARCH_CPU),ppc64el) + KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),s390) KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),s390x) diff --git a/debian/changelog b/debian/changelog index 308b911a2..0e673ccb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ linux-tools (3.16-1) UNRELEASED; urgency=medium * New upstream release + [ Mauricio Faria de Oliveira ] + * [ppc64el] Build linux-tools binary package + -- Ben Hutchings Sat, 23 Aug 2014 17:50:42 -0700 linux-tools (3.16~rc7-1~exp1) experimental; urgency=medium diff --git a/debian/rules.real b/debian/rules.real index 8b2730e8e..42e7174b6 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -9,7 +9,7 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') binary-arch: install-kbuild install-usbip -ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 74cdb2011..390782c3f 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-tools-@version@ Section: devel -Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64 +Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) Suggests: linux-doc-@version@ diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f11555c6b..77d72482f 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 98b8aa1ab76534e1ab657fe206e0aa1ae5583711 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 26 Aug 2014 08:15:18 +0000 Subject: [PATCH 318/487] Add bug closure for linux-tools on ppc64el svn path=/dists/trunk/linux-tools/; revision=21748 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0e673ccb4..7fdecad5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,7 @@ linux-tools (3.16-1) UNRELEASED; urgency=medium * New upstream release [ Mauricio Faria de Oliveira ] - * [ppc64el] Build linux-tools binary package + * [ppc64el] Build linux-tools binary package (Closes: #754213) -- Ben Hutchings Sat, 23 Aug 2014 17:50:42 -0700 From 2123f441686d140a01305b864be454c5570d164b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 8 Sep 2014 17:43:57 +0000 Subject: [PATCH 319/487] linux-kbuild: Build and install recordmcount and recordmcount.pl These are needed now that we build kernels with DYNAMIC_FTRACE enabled. Also fix the recordmcount dependency for OOT modules - they should not depend on its source files! svn path=/dists/trunk/linux-tools/; revision=21789 --- debian/build/scripts/Makefile | 4 +++- debian/changelog | 5 +++++ .../kbuild-fix-recordmcount-dependency.patch | 22 +++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 debian/patches/kbuild-fix-recordmcount-dependency.patch diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 104cb8d1b..8d2ea80a0 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -2,7 +2,8 @@ PROGS = \ bin2c \ conmakehash \ kallsyms \ - pnmtologo + pnmtologo \ + recordmcount DATA = \ Kbuild.include \ @@ -33,6 +34,7 @@ SCRIPTS = \ mkuboot.sh \ namespace.pl \ patch-kernel \ + recordmcount.pl \ setlocalversion \ ver_linux diff --git a/debian/changelog b/debian/changelog index 7fdecad5b..87f669658 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,11 @@ linux-tools (3.16-1) UNRELEASED; urgency=medium [ Mauricio Faria de Oliveira ] * [ppc64el] Build linux-tools binary package (Closes: #754213) + [ Ben Hutchings ] + * linux-kbuild: Build and install recordmcount and recordmcount.pl, + needed for kernels with DYNAMIC_FTRACE enabled + * linux-kbuild: Fix recordmcount dependency for OOT modules + -- Ben Hutchings Sat, 23 Aug 2014 17:50:42 -0700 linux-tools (3.16~rc7-1~exp1) experimental; urgency=medium diff --git a/debian/patches/kbuild-fix-recordmcount-dependency.patch b/debian/patches/kbuild-fix-recordmcount-dependency.patch new file mode 100644 index 000000000..54279024f --- /dev/null +++ b/debian/patches/kbuild-fix-recordmcount-dependency.patch @@ -0,0 +1,22 @@ +From: Ben Hutchings +Subject: kbuild: Fix recordmcount dependency for OOT modules +Date: Mon, 08 Sep 2014 18:31:24 +0100 + +We never rebuild anything in-tree when building an out-of-tree +modules, so external modules should not depend on the recordmcount +sources. + +--- a/scripts/Makefile.build ++++ b/scripts/Makefile.build +@@ -240,6 +240,11 @@ cmd_record_mcount = \ + fi; + endif + ++# Don't require recordmcount source for an OOT build. ++ifdef KBUILD_EXTMOD ++recordmcount_source := ++endif ++ + define rule_cc_o_c + $(call echo-cmd,checksrc) $(cmd_checksrc) \ + $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ diff --git a/debian/patches/series b/debian/patches/series index 8a0a63bc7..413b05d9e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ modpost-symbol-prefix.patch tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch +kbuild-fix-recordmcount-dependency.patch From 1e01bb178db9112a956866eaf6ad4e04a523cbed Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 8 Sep 2014 19:12:12 +0000 Subject: [PATCH 320/487] Prepare to release linux-tools (3.16-1). svn path=/dists/trunk/linux-tools/; revision=21790 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 87f669658..82f909569 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.16-1) UNRELEASED; urgency=medium +linux-tools (3.16-1) unstable; urgency=medium * New upstream release @@ -10,7 +10,7 @@ linux-tools (3.16-1) UNRELEASED; urgency=medium needed for kernels with DYNAMIC_FTRACE enabled * linux-kbuild: Fix recordmcount dependency for OOT modules - -- Ben Hutchings Sat, 23 Aug 2014 17:50:42 -0700 + -- Ben Hutchings Mon, 08 Sep 2014 18:45:06 +0100 linux-tools (3.16~rc7-1~exp1) experimental; urgency=medium From 592377f237bd6e2c8e7ce12bcd64a8c9fd12f50b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 9 Sep 2014 12:23:39 +0000 Subject: [PATCH 321/487] linux-kbuild: Change the type headers used for devicetable-offsets.c (Closes: #754213) Avoid depending on UAPI headers or . This really closes: #754213. It also fixes modpost handling of input device IDs when host and target have differing word size. svn path=/dists/sid/linux-tools/; revision=21798 --- debian/build/scripts/mod/Makefile.real | 4 +--- debian/build/scripts/mod/real-lsb-32/types.h | 3 ++- debian/build/scripts/mod/real-lsb-64/types.h | 3 ++- debian/build/scripts/mod/real-msb-32/types.h | 3 ++- debian/build/scripts/mod/real-msb-64/types.h | 3 ++- debian/build/scripts/mod/types.h | 6 ++++++ debian/changelog | 9 +++++++++ 7 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 debian/build/scripts/mod/types.h diff --git a/debian/build/scripts/mod/Makefile.real b/debian/build/scripts/mod/Makefile.real index 5cb84f684..790dbf284 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/build/scripts/mod/Makefile.real @@ -2,8 +2,6 @@ PROGS = modpost.real-$(TYPE) top_srcdir = ../.. -CFLAGS += -I$(top_srcdir)/include - include $(top_srcdir)/debian/build/Makefile.inc modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o @@ -13,7 +11,7 @@ modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversio $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $< real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c - $(CC) -include real-$(TYPE)/types.h $(CFLAGS) -S -o $@ $< + $(CC) -include real-$(TYPE)/types.h $(CFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $< real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__" diff --git a/debian/build/scripts/mod/real-lsb-32/types.h b/debian/build/scripts/mod/real-lsb-32/types.h index 75e8b22d3..bad6dcccd 100644 --- a/debian/build/scripts/mod/real-lsb-32/types.h +++ b/debian/build/scripts/mod/real-lsb-32/types.h @@ -1,2 +1,3 @@ -#include +#include "../types.h" typedef __u32 kernel_ulong_t; +#define BITS_PER_LONG 32 diff --git a/debian/build/scripts/mod/real-lsb-64/types.h b/debian/build/scripts/mod/real-lsb-64/types.h index 79f540ebe..8d7b87591 100644 --- a/debian/build/scripts/mod/real-lsb-64/types.h +++ b/debian/build/scripts/mod/real-lsb-64/types.h @@ -1,2 +1,3 @@ -#include +#include "../types.h" typedef __u64 __attribute__((aligned(8))) kernel_ulong_t; +#define BITS_PER_LONG 64 diff --git a/debian/build/scripts/mod/real-msb-32/types.h b/debian/build/scripts/mod/real-msb-32/types.h index 75e8b22d3..bad6dcccd 100644 --- a/debian/build/scripts/mod/real-msb-32/types.h +++ b/debian/build/scripts/mod/real-msb-32/types.h @@ -1,2 +1,3 @@ -#include +#include "../types.h" typedef __u32 kernel_ulong_t; +#define BITS_PER_LONG 32 diff --git a/debian/build/scripts/mod/real-msb-64/types.h b/debian/build/scripts/mod/real-msb-64/types.h index 79f540ebe..8d7b87591 100644 --- a/debian/build/scripts/mod/real-msb-64/types.h +++ b/debian/build/scripts/mod/real-msb-64/types.h @@ -1,2 +1,3 @@ -#include +#include "../types.h" typedef __u64 __attribute__((aligned(8))) kernel_ulong_t; +#define BITS_PER_LONG 64 diff --git a/debian/build/scripts/mod/types.h b/debian/build/scripts/mod/types.h new file mode 100644 index 000000000..f61caf5d0 --- /dev/null +++ b/debian/build/scripts/mod/types.h @@ -0,0 +1,6 @@ +/* Minimal definitions for mod_devicetable.h and devicetable-offsets.c */ +typedef unsigned char __u8; +typedef unsigned short __u16; +typedef unsigned int __u32; +typedef unsigned long long __u64; +#define offsetof(a,b) __builtin_offsetof(a,b) diff --git a/debian/changelog b/debian/changelog index 82f909569..14025d861 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +linux-tools (3.16-2) unstable; urgency=medium + + * linux-kbuild: Change the type headers used for devicetable-offsets.c + to avoid depending on UAPI headers or . This really + closes: #754213. It also fixes modpost handling of input device IDs + when host and target have differing word size. + + -- Ben Hutchings Tue, 09 Sep 2014 13:21:05 +0100 + linux-tools (3.16-1) unstable; urgency=medium * New upstream release From 5e54999ac585f8c0267df108126b0c0b4bf91bae Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 27 Sep 2014 01:54:29 +0000 Subject: [PATCH 322/487] linux-tools: Fix build configuration to avoid linking perf with libbfd (Closes: #763002) svn path=/dists/sid/linux-tools/; revision=21908 --- debian/build/tools/perf/Makefile | 13 ++++++++++++- debian/changelog | 8 ++++++++ debian/templates/control.source.in | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index afe052627..aedb06d31 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -37,7 +37,13 @@ endif # - disable Gtk UI until it's more usable # - Include version in all directory names -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins NO_GTK2=1 NO_PERL=1 V=1 HAVE_CPLUS_DEMANGLE=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins NO_GTK2=1 NO_PERL=1 V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) + +# perf can link against libbfd if available, but the result is +# undistributable as they are licenced under GPL v2 and v3+ +# respectively. Override detection of libbfd and insist that +# cplus_demangle() can be found in libiberty (LGPL v2.1+). +MAKE_PERF += feature-libbfd=0 HAVE_CPLUS_DEMANGLE_SUPPORT=1 all: ifdef KERNEL_ARCH_PERF @@ -47,6 +53,11 @@ ifdef KERNEL_ARCH_PERF # run 'make install'. +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out all VERSION=$(VERSION) DESTDIR=dummy +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation O=$(CURDIR)/out man VERSION=$(VERSION) +# Check that perf didn't get linked against libbfd + type ldd + ! ldd $(CURDIR)/out/perf | grep '\blibbfd' +# Check that it includes cplus_demangle from libiberty + grep cplus_demangle $(CURDIR)/out/perf endif install: diff --git a/debian/changelog b/debian/changelog index 14025d861..694e43f4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux-tools (3.16-3) UNRELEASED; urgency=low + + * linux-tools: Fix build configuration to avoid linking perf with libbfd + (Closes: #763002) + * linux-tools: Add a check that perf is not linked with libbfd + + -- Ben Hutchings Sat, 27 Sep 2014 02:39:21 +0100 + linux-tools (3.16-2) unstable; urgency=medium * linux-kbuild: Change the type headers used for devicetable-offsets.c diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 77d72482f..d58c87956 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 3c43bbca49703736b7798d6bca4cce10bab908a3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 27 Sep 2014 02:01:14 +0000 Subject: [PATCH 323/487] linux-tools: Split up MAKE_PERF definition some more svn path=/dists/sid/linux-tools/; revision=21909 --- debian/build/tools/perf/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index aedb06d31..33c511f94 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -35,9 +35,13 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -# - disable Gtk UI until it's more usable -# - Include version in all directory names -MAKE_PERF := $(MAKE) prefix=/usr perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins NO_GTK2=1 NO_PERL=1 V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) + +# Disable Gtk UI until it's more usable +MAKE_PERF += NO_GTK2=1 + +# Include version in all directory names +MAKE_PERF += perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins # perf can link against libbfd if available, but the result is # undistributable as they are licenced under GPL v2 and v3+ From 14581639295133d770591cf1f588df50156c284e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 27 Sep 2014 02:07:04 +0000 Subject: [PATCH 324/487] [armel,armhf] linux-tools: Enable use of libunwind perf requires some architecture-specific code in conjunction with libunwind. It used to enable use of libunwind automatically anyway, so we had to override this for architectures where it would fail to build (by setting NO_LIBUNWIND=1). The makefile is now fixed so we don't need to this. Since perf now has the extra code for arm, this enables use of libunwind there. svn path=/dists/sid/linux-tools/; revision=21910 --- debian/build/tools/perf/Makefile | 5 +---- debian/changelog | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 33c511f94..53da47e77 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -3,20 +3,17 @@ OUTDIR = tools/perf include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) -NO_LIBUNWIND=1 ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) @@ -35,7 +32,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error # Disable Gtk UI until it's more usable MAKE_PERF += NO_GTK2=1 diff --git a/debian/changelog b/debian/changelog index 694e43f4e..2722b6069 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-tools (3.16-3) UNRELEASED; urgency=low * linux-tools: Fix build configuration to avoid linking perf with libbfd (Closes: #763002) * linux-tools: Add a check that perf is not linked with libbfd + * [armel,armhf] linux-tools: Enable use of libunwind -- Ben Hutchings Sat, 27 Sep 2014 02:39:21 +0100 From 90fbb6433381613859710d54da597b164039b919 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 09:58:05 +0000 Subject: [PATCH 325/487] Update to 3.17 usbip userspace moved to tools/usb/usbip. Update genorig.py, patch and makefiles accordingly. svn path=/dists/trunk/linux-tools/; revision=21951 --- debian/bin/genorig.py | 2 -- debian/build/Makefile | 1 - debian/build/tools/Makefile | 3 ++- .../{drivers/staging => tools/usb}/usbip/Makefile | 10 ++++------ debian/changelog | 7 +++++++ debian/patches/usbip-document-tcp-wrappers.patch | 4 ++-- 6 files changed, 15 insertions(+), 12 deletions(-) rename debian/build/{drivers/staging => tools/usb}/usbip/Makefile (74%) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 668e82760..5773e5fcf 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -144,8 +144,6 @@ class Main(object): 'arch/*/Makefile', 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', - 'drivers/staging/usbip/uapi/', - 'drivers/staging/usbip/userspace/', 'include/', 'lib/rbtree.c', 'scripts/', diff --git a/debian/build/Makefile b/debian/build/Makefile index c14458250..970d4e4c7 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -3,7 +3,6 @@ DATA = \ Makefile \ SUBDIRS = \ - drivers/staging/usbip \ scripts \ tools diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile index 561fc1f61..bb530cbbe 100644 --- a/debian/build/tools/Makefile +++ b/debian/build/tools/Makefile @@ -1,4 +1,5 @@ SUBDIRS = \ - perf + perf \ + usb/usbip include ../Makefile.inc diff --git a/debian/build/drivers/staging/usbip/Makefile b/debian/build/tools/usb/usbip/Makefile similarity index 74% rename from debian/build/drivers/staging/usbip/Makefile rename to debian/build/tools/usb/usbip/Makefile index 59992d7b9..294766806 100644 --- a/debian/build/drivers/staging/usbip/Makefile +++ b/debian/build/tools/usb/usbip/Makefile @@ -1,4 +1,4 @@ -srcdir := $(top_srcdir)/drivers/staging/usbip/userspace +srcdir := $(top_srcdir)/tools/usb/usbip # Make sure we don't override top_srcdir in the sub-make. 'unexport # top_srcdir' is *not* sufficient; nor is adding 'MAKEFLAGS=' to the @@ -7,18 +7,16 @@ unexport MAKEFLAGS all: cd $(srcdir) && ./autogen.sh - mkdir -p userspace - cd userspace && $(srcdir)/configure \ + $(srcdir)/configure \ --prefix=/usr \ --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ --disable-shared - $(MAKE) -C userspace + $(MAKE) install: - $(MAKE) -C userspace install + $(MAKE) install clean: rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) find $(srcdir)/ -name Makefile.in -delete - rm -rf userspace diff --git a/debian/changelog b/debian/changelog index 14025d861..564642622 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (3.17-1~exp1) UNRELEASED; urgency=medium + + * New upstream release + - usbip userspace moved to tools/usb/usbip + + -- Ben Hutchings Fri, 17 Oct 2014 11:49:02 +0200 + linux-tools (3.16-2) unstable; urgency=medium * linux-kbuild: Change the type headers used for devicetable-offsets.c diff --git a/debian/patches/usbip-document-tcp-wrappers.patch b/debian/patches/usbip-document-tcp-wrappers.patch index 10ef542e3..d9d7b301d 100644 --- a/debian/patches/usbip-document-tcp-wrappers.patch +++ b/debian/patches/usbip-document-tcp-wrappers.patch @@ -5,8 +5,8 @@ Forwarded: no Add references to TCP wrappers configuration in the manual page. ---- a/drivers/staging/usbip/userspace/doc/usbipd.8 -+++ b/drivers/staging/usbip/userspace/doc/usbipd.8 +--- a/tools/usb/usbip/doc/usbipd.8 ++++ b/tools/usb/usbip/doc/usbipd.8 @@ -14,7 +14,8 @@ Devices have to explicitly be exported u before usbipd makes them available to other hosts. From 8e93bf1ffa8e3fdb70af27e41e956378938fb502 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 11:04:19 +0000 Subject: [PATCH 326/487] rules.real: Update for usbip userspace in tools/usb/usbip svn path=/dists/trunk/linux-tools/; revision=21952 --- debian/rules.real | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 42e7174b6..a83ca6943 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -63,12 +63,12 @@ install-tools: $(STAMPS_DIR)/build install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/tmp -install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/drivers/staging/usbip/userspace/config.h) +install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(BUILD_DIR)/drivers/staging/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_install dh_installchangelogs dh_installdocs From ee84d0ea531e1e4f85407463c153be5d9d6cc51a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 11:04:40 +0000 Subject: [PATCH 327/487] Update makefiles for bin2c moving to scripts/basic svn path=/dists/trunk/linux-tools/; revision=21953 --- debian/build/scripts/Makefile | 1 - debian/build/scripts/basic/Makefile | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 8d2ea80a0..917a89c70 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -1,5 +1,4 @@ PROGS = \ - bin2c \ conmakehash \ kallsyms \ pnmtologo \ diff --git a/debian/build/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile index 0ae6a26a8..1b2635f9e 100644 --- a/debian/build/scripts/basic/Makefile +++ b/debian/build/scripts/basic/Makefile @@ -1,4 +1,5 @@ PROGS = \ + bin2c \ fixdep OUTDIR = scripts/basic From 10fff005042d494fea72bbdac252e7c8511fdd65 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 11:08:39 +0000 Subject: [PATCH 328/487] Build usbip in a subdirectory of debian/build/tools/usb/usbip again svn path=/dists/trunk/linux-tools/; revision=21954 --- debian/build/tools/usb/usbip/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/build/tools/usb/usbip/Makefile b/debian/build/tools/usb/usbip/Makefile index 294766806..90fc6baa0 100644 --- a/debian/build/tools/usb/usbip/Makefile +++ b/debian/build/tools/usb/usbip/Makefile @@ -7,16 +7,18 @@ unexport MAKEFLAGS all: cd $(srcdir) && ./autogen.sh - $(srcdir)/configure \ + mkdir -p out + cd out && $(srcdir)/configure \ --prefix=/usr \ --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ --disable-shared - $(MAKE) + $(MAKE) -C out install: - $(MAKE) install + $(MAKE) -C out install clean: rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) find $(srcdir)/ -name Makefile.in -delete + rm -rf out From 14d9f651a190bec7d8f5e763a36c2709d5eae197 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 11:51:05 +0000 Subject: [PATCH 329/487] rules.real: Fix usbip version lookup svn path=/dists/trunk/linux-tools/; revision=21955 --- debian/rules.real | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.real b/debian/rules.real index a83ca6943..4e961a50f 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -63,7 +63,7 @@ install-tools: $(STAMPS_DIR)/build install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/tmp -install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/config.h) +install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/out/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot From 5213ff48709971432a242fd34fa7c0160a90f69f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 12:00:22 +0000 Subject: [PATCH 330/487] usbip: Include uninstalled svn path=/dists/trunk/linux-tools/; revision=21956 --- debian/patches/series | 1 + ...ip-include-uninstalled-linux-usbip-h.patch | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 debian/patches/usbip-include-uninstalled-linux-usbip-h.patch diff --git a/debian/patches/series b/debian/patches/series index 413b05d9e..cd239c608 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch +usbip-include-uninstalled-linux-usbip-h.patch diff --git a/debian/patches/usbip-include-uninstalled-linux-usbip-h.patch b/debian/patches/usbip-include-uninstalled-linux-usbip-h.patch new file mode 100644 index 000000000..aec6cb898 --- /dev/null +++ b/debian/patches/usbip-include-uninstalled-linux-usbip-h.patch @@ -0,0 +1,27 @@ +From: Ben Hutchings +Date: Fri, 17 Oct 2014 13:55:16 +0200 +Subject: usbip: Include uninstalled + +We need to include from the current kernel +source, not the installed linux-libc-dev. The clean way to +do this is probably to run 'make headers_install' and then +add $(top_srcdir)/usr/include to the front of the system +header list. But I don't have time to implement that right +now. + +The wrong way to do it is to add include/uapi to the header +path. explicitly prevents this from working. +But we can get away with selectively including UAPI headers +without unifdef processing, so do that here. + +--- a/tools/usb/usbip/libsrc/usbip_common.h ++++ b/tools/usb/usbip/libsrc/usbip_common.h +@@ -15,7 +15,7 @@ + #include + #include + #include +-#include ++#include "../../../../include/uapi/linux/usbip.h" + + #ifndef USBIDS_FILE + #define USBIDS_FILE "/usr/share/hwdata/usb.ids" From 85c3ccf8d66604304eafa372d5b62913a42a98c1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 12:58:42 +0000 Subject: [PATCH 331/487] rules.real: Only install tools/perf into linux-tools-$(VERSION) We were running 'make install' in the tools directory, which now includes usbip. svn path=/dists/trunk/linux-tools/; revision=21958 --- debian/rules.real | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.real b/debian/rules.real index 4e961a50f..2bf84cd5b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -47,7 +47,7 @@ install-tools: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_clean -k -d - $(MAKE) -C $(BUILD_DIR)/tools install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(MAKE) -C $(BUILD_DIR)/tools/perf install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs From 2411c6ad35765fddd4d5cd7ee7c230995db57c88 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 17 Oct 2014 13:55:39 +0000 Subject: [PATCH 332/487] Prepare to release linux-tools (3.17-1~exp1). svn path=/dists/trunk/linux-tools/; revision=21959 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 564642622..3e92e0461 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (3.17-1~exp1) UNRELEASED; urgency=medium +linux-tools (3.17-1~exp1) experimental; urgency=medium * New upstream release - usbip userspace moved to tools/usb/usbip - -- Ben Hutchings Fri, 17 Oct 2014 11:49:02 +0200 + -- Ben Hutchings Fri, 17 Oct 2014 14:58:51 +0200 linux-tools (3.16-2) unstable; urgency=medium From 54cd2daff6dfca85d79199bd71941b5c0ae36665 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 15:25:52 +0000 Subject: [PATCH 333/487] Update to 3.18.5 svn path=/dists/trunk/linux-tools/; revision=22316 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3e92e0461..6b94b24aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Sat, 31 Jan 2015 15:57:02 +0100 + linux-tools (3.17-1~exp1) experimental; urgency=medium * New upstream release From 9ad41e02900fe5c301153a5c0c736142b793555d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 16:21:27 +0000 Subject: [PATCH 334/487] [arm64] Enable building linux-tools, thanks to Steve Capper svn path=/dists/sid/linux-tools/; revision=22317 --- debian/build/tools/perf/Makefile | 2 + debian/changelog | 1 + .../perf-tools-fix-arm64-build-error.patch | 39 +++++++++++++++++++ debian/patches/series | 1 + debian/rules.real | 2 +- debian/templates/control.main.in | 2 +- debian/templates/control.source.in | 2 +- 7 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 debian/patches/perf-tools-fix-arm64-build-error.patch diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 53da47e77..d21a33d29 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -10,6 +10,8 @@ else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm +else ifeq ($(DEB_HOST_ARCH_CPU),arm64) + KERNEL_ARCH_PERF = arm64 else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) diff --git a/debian/changelog b/debian/changelog index 2722b6069..7cda61047 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux-tools (3.16-3) UNRELEASED; urgency=low (Closes: #763002) * linux-tools: Add a check that perf is not linked with libbfd * [armel,armhf] linux-tools: Enable use of libunwind + * [arm64] Enable building linux-tools, thanks to Steve Capper -- Ben Hutchings Sat, 27 Sep 2014 02:39:21 +0100 diff --git a/debian/patches/perf-tools-fix-arm64-build-error.patch b/debian/patches/perf-tools-fix-arm64-build-error.patch new file mode 100644 index 000000000..6ac6b9c10 --- /dev/null +++ b/debian/patches/perf-tools-fix-arm64-build-error.patch @@ -0,0 +1,39 @@ +From: Mark Salter +Date: Fri, 25 Jul 2014 18:02:46 -0400 +Subject: perf tools: Fix arm64 build error +Origin: https://git.kernel.org/linus/7d885749b6de2c9a1168d566e2380207b9177108 + +I'm seeing the following build error on arm64: + + In file included from util/event.c:3:0: + util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) + u64 cache_regs[PERF_REGS_MAX]; + ^ + +This patch adds a PERF_REGS_MAX definition for arm64. + +Signed-off-by: Mark Salter +Acked-by: Jean Pihet +Cc: Ingo Molnar +Cc: Jean Pihet +Cc: Paul Mackerras +Cc: Peter Zijlstra +Link: http://lkml.kernel.org/r/1406325766-8085-1-git-send-email-msalter@redhat.com +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/perf/arch/arm64/include/perf_regs.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h +index e9441b9..1d3f39c 100644 +--- a/tools/perf/arch/arm64/include/perf_regs.h ++++ b/tools/perf/arch/arm64/include/perf_regs.h +@@ -6,6 +6,8 @@ + #include + + #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1) ++#define PERF_REGS_MAX PERF_REG_ARM64_MAX ++ + #define PERF_REG_IP PERF_REG_ARM64_PC + #define PERF_REG_SP PERF_REG_ARM64_SP + diff --git a/debian/patches/series b/debian/patches/series index 413b05d9e..7e214610c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ tools-perf-version.patch tools-perf-install.patch usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch +perf-tools-fix-arm64-build-error.patch diff --git a/debian/rules.real b/debian/rules.real index 42e7174b6..3ad38ddae 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -9,7 +9,7 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') binary-arch: install-kbuild install-usbip -ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 390782c3f..a90f8fea2 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-tools-@version@ Section: devel -Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 +Architecture: alpha amd64 arm64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) Suggests: linux-doc-@version@ diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index d58c87956..f9c8fb6c0 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 8a9aa24ef98e738efc23c7c56840bb189aff09ff Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 16:28:10 +0000 Subject: [PATCH 335/487] Add bug number for arm64 svn path=/dists/sid/linux-tools/; revision=22318 --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 7cda61047..339f284ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-tools (3.16-3) UNRELEASED; urgency=low * linux-tools: Add a check that perf is not linked with libbfd * [armel,armhf] linux-tools: Enable use of libunwind * [arm64] Enable building linux-tools, thanks to Steve Capper + (Closes: #771340) -- Ben Hutchings Sat, 27 Sep 2014 02:39:21 +0100 From 3ca51a296a46defdecbf72eb9e96bc9de806464f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 16:42:21 +0000 Subject: [PATCH 336/487] Revert "[armel,armhf] linux-tools: Enable use of libunwind" I want to enable this, but (a) it doesn't work because I forgot to change the build-dependency (b) it is not likely to be eligible for a freeze exception. svn path=/dists/sid/linux-tools/; revision=22319 --- debian/build/tools/perf/Makefile | 5 ++++- debian/changelog | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index d21a33d29..d1b281300 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -3,11 +3,13 @@ OUTDIR = tools/perf include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) +NO_LIBUNWIND=1 ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),arm64) @@ -16,6 +18,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) @@ -34,7 +37,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error +MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) # Disable Gtk UI until it's more usable MAKE_PERF += NO_GTK2=1 diff --git a/debian/changelog b/debian/changelog index 339f284ed..468b7a51c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,6 @@ linux-tools (3.16-3) UNRELEASED; urgency=low * linux-tools: Fix build configuration to avoid linking perf with libbfd (Closes: #763002) * linux-tools: Add a check that perf is not linked with libbfd - * [armel,armhf] linux-tools: Enable use of libunwind * [arm64] Enable building linux-tools, thanks to Steve Capper (Closes: #771340) From ff4066284b11337a7a949194bfaeb96bf39055d7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:04:38 +0000 Subject: [PATCH 337/487] [arm64] Build perf with libunwind, even though we don't on armel and armhf svn path=/dists/sid/linux-tools/; revision=22321 --- debian/build/tools/perf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index d1b281300..a687e2255 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -14,6 +14,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),arm64) KERNEL_ARCH_PERF = arm64 + NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) From 0d10d7cf9abb36a3a6835ebf97073d40eb68f4d4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:14:36 +0000 Subject: [PATCH 338/487] linux-tools: Remove explicit NO_LIBUNWIND In 3.12.6-3 we explicitly disabled use of libunwind on most architectures because perf requires its own architecture-specific code on top of libunwind yet it would attempt to build with libunwind wherever libunwind8-dev was installed. This was fixed in perf 3.15 so we can remove this workaround. svn path=/dists/trunk/linux-tools/; revision=22323 --- debian/build/tools/perf/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index a687e2255..d21a33d29 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -3,23 +3,19 @@ OUTDIR = tools/perf include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) -NO_LIBUNWIND=1 ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) KERNEL_ARCH_PERF = x86_64 - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),arm64) KERNEL_ARCH_PERF = arm64 - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 - NO_LIBUNWIND= else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) @@ -38,7 +34,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) KERNEL_ARCH_PERF = sparc endif -MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error NO_LIBUNWIND=$(NO_LIBUNWIND) +MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error # Disable Gtk UI until it's more usable MAKE_PERF += NO_GTK2=1 From e787540d29efd86b9ab7be798adb6defe46470e6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:17:09 +0000 Subject: [PATCH 339/487] [armel,armhf] linux-tools: Enable use of libunwind svn path=/dists/trunk/linux-tools/; revision=22324 --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 60a3524ff..50e684eaf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium * linux-tools: Add a check that perf is not linked with libbfd * [arm64] Enable building linux-tools, thanks to Steve Capper (Closes: #771340) + * [armel,armhf] linux-tools: Enable use of libunwind -- Ben Hutchings Sat, 31 Jan 2015 15:57:02 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f9c8fb6c0..ca994dea9 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 arm64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 73a24d765829a46091a7ef8deacf04d33775521f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:42:15 +0000 Subject: [PATCH 340/487] [hppa,sparc] linux-tools: Enable use of libnuma svn path=/dists/trunk/linux-tools/; revision=22325 --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 50e684eaf..d795bef27 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium * [arm64] Enable building linux-tools, thanks to Steve Capper (Closes: #771340) * [armel,armhf] linux-tools: Enable use of libunwind + * [hppa,sparc] linux-tools: Enable use of libnuma -- Ben Hutchings Sat, 31 Jan 2015 15:57:02 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index ca994dea9..aebdab86c 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 powerpc ppc64 ppc64el sparc], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 655aa10dbbc734269b61dc9bc0c833fdbb439b8a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:44:51 +0000 Subject: [PATCH 341/487] [mips*,powerpcspe,x32] Enable building linux-tools svn path=/dists/trunk/linux-tools/; revision=22326 --- debian/changelog | 1 + debian/templates/control.main.in | 2 +- debian/templates/control.source.in | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d795bef27..49be2b404 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium (Closes: #771340) * [armel,armhf] linux-tools: Enable use of libunwind * [hppa,sparc] linux-tools: Enable use of libnuma + * [mips*,powerpcspe,x32] Enable building linux-tools -- Ben Hutchings Sat, 31 Jan 2015 15:57:02 +0100 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index a90f8fea2..06f712199 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-tools-@version@ Section: devel -Architecture: alpha amd64 arm64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64 +Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) Suggests: linux-doc-@version@ diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index aebdab86c..880c5e049 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 powerpc ppc64 ppc64el sparc], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From 3b3a8e2801f89d7d0c1bc574796cd2284d32ef18 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 31 Jan 2015 23:46:34 +0000 Subject: [PATCH 342/487] Drop perf build fix for arm64 which is already in 3.18 svn path=/dists/trunk/linux-tools/; revision=22327 --- .../perf-tools-fix-arm64-build-error.patch | 39 ------------------- debian/patches/series | 1 - 2 files changed, 40 deletions(-) delete mode 100644 debian/patches/perf-tools-fix-arm64-build-error.patch diff --git a/debian/patches/perf-tools-fix-arm64-build-error.patch b/debian/patches/perf-tools-fix-arm64-build-error.patch deleted file mode 100644 index 6ac6b9c10..000000000 --- a/debian/patches/perf-tools-fix-arm64-build-error.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Mark Salter -Date: Fri, 25 Jul 2014 18:02:46 -0400 -Subject: perf tools: Fix arm64 build error -Origin: https://git.kernel.org/linus/7d885749b6de2c9a1168d566e2380207b9177108 - -I'm seeing the following build error on arm64: - - In file included from util/event.c:3:0: - util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) - u64 cache_regs[PERF_REGS_MAX]; - ^ - -This patch adds a PERF_REGS_MAX definition for arm64. - -Signed-off-by: Mark Salter -Acked-by: Jean Pihet -Cc: Ingo Molnar -Cc: Jean Pihet -Cc: Paul Mackerras -Cc: Peter Zijlstra -Link: http://lkml.kernel.org/r/1406325766-8085-1-git-send-email-msalter@redhat.com -Signed-off-by: Arnaldo Carvalho de Melo ---- - tools/perf/arch/arm64/include/perf_regs.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h -index e9441b9..1d3f39c 100644 ---- a/tools/perf/arch/arm64/include/perf_regs.h -+++ b/tools/perf/arch/arm64/include/perf_regs.h -@@ -6,6 +6,8 @@ - #include - - #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1) -+#define PERF_REGS_MAX PERF_REG_ARM64_MAX -+ - #define PERF_REG_IP PERF_REG_ARM64_PC - #define PERF_REG_SP PERF_REG_ARM64_SP - diff --git a/debian/patches/series b/debian/patches/series index 1788464ad..cd239c608 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,4 +4,3 @@ tools-perf-install.patch usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch -perf-tools-fix-arm64-build-error.patch From 93d340e304b723965c3512b793b4961ba2960075 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Feb 2015 00:54:23 +0000 Subject: [PATCH 343/487] [mips*,powerpcspe,x32] Enable building linux-tools svn path=/dists/trunk/linux-tools/; revision=22328 --- debian/rules.real | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.real b/debian/rules.real index 04a219398..6761f7e20 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -9,7 +9,7 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') binary-arch: install-kbuild install-usbip -ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif From 7d0cee1a70ab9c6d77a5ca26180767d5472a4a27 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Feb 2015 01:53:11 +0000 Subject: [PATCH 344/487] [mips*] Add the necessary CPU name mapping for linux-tools svn path=/dists/trunk/linux-tools/; revision=22329 --- debian/build/tools/perf/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index d21a33d29..fa1b0b8ab 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -16,6 +16,14 @@ else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) KERNEL_ARCH_PERF = i386 +else ifeq ($(DEB_HOST_ARCH_CPU),mips) + KERNEL_ARCH_PERF = mips +else ifeq ($(DEB_HOST_ARCH_CPU),mips64) + KERNEL_ARCH_PERF = mips +else ifeq ($(DEB_HOST_ARCH_CPU),mips64el) + KERNEL_ARCH_PERF = mips +else ifeq ($(DEB_HOST_ARCH_CPU),mipsel) + KERNEL_ARCH_PERF = mips else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) KERNEL_ARCH_PERF = powerpc else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) From 601ca2a69e8ee81af49b8a2a25b6d872d3ed62d6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 1 Feb 2015 01:53:49 +0000 Subject: [PATCH 345/487] Prepare to release linux-tools (3.18.5-1~exp1). svn path=/dists/trunk/linux-tools/; revision=22330 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 49be2b404..4b6ca1765 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium +linux-tools (3.18.5-1~exp1) experimental; urgency=medium * New upstream release * linux-tools: Fix build configuration to avoid linking perf with libbfd @@ -10,7 +10,7 @@ linux-tools (3.18.5-1~exp1) UNRELEASED; urgency=medium * [hppa,sparc] linux-tools: Enable use of libnuma * [mips*,powerpcspe,x32] Enable building linux-tools - -- Ben Hutchings Sat, 31 Jan 2015 15:57:02 +0100 + -- Ben Hutchings Sun, 01 Feb 2015 02:53:07 +0100 linux-tools (3.17-1~exp1) experimental; urgency=medium From e09c8c1f0962fada6d60e4fdf57f38bb602df6a7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 2 Feb 2015 22:14:13 +0000 Subject: [PATCH 346/487] Revert addition of libc-bin to dependencies, as it is an essential package svn path=/dists/sid/linux-tools/; revision=22332 --- debian/templates/control.source.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f9c8fb6c0..45bb33d7f 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libc-bin, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 arm64 i386], python-dev, xmlto, + asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 i386 powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From ad1d97846e2ebcb717c58dca87d390b43656cb4d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 3 Feb 2015 01:29:01 +0000 Subject: [PATCH 347/487] Prepare to release linux-tools (3.16-3). svn path=/dists/sid/linux-tools/; revision=22333 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 468b7a51c..46a8fb474 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (3.16-3) UNRELEASED; urgency=low +linux-tools (3.16-3) unstable; urgency=medium * linux-tools: Fix build configuration to avoid linking perf with libbfd (Closes: #763002) @@ -6,7 +6,7 @@ linux-tools (3.16-3) UNRELEASED; urgency=low * [arm64] Enable building linux-tools, thanks to Steve Capper (Closes: #771340) - -- Ben Hutchings Sat, 27 Sep 2014 02:39:21 +0100 + -- Ben Hutchings Mon, 02 Feb 2015 22:05:59 +0000 linux-tools (3.16-2) unstable; urgency=medium From c3ce7d22ee8002cfcf7760f9f5f8039a76b6ea07 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 10 May 2015 23:51:13 +0000 Subject: [PATCH 348/487] Update to 4.0.2 svn path=/dists/trunk/linux-tools/; revision=22591 --- debian/changelog | 6 ++++++ debian/patches/tools-perf-version.patch | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index c26a02d87..22991611f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.0.2-1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 + linux-tools (3.18.5-1~exp1) experimental; urgency=medium * New upstream release diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 25d57e0c1..317208f3a 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,7 +9,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -833,8 +833,8 @@ install-gtk: +@@ -923,8 +923,8 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -17,10 +17,10 @@ version-dependent name. And do the same for trace.] - $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \ + $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' - $(call QUIET_INSTALL, libexec) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' - $(call QUIET_INSTALL, perf-archive) \ -@@ -857,7 +857,7 @@ ifndef NO_LIBPYTHON + ifndef NO_PERF_READ_VDSO32 + $(call QUIET_INSTALL, perf-read-vdso32) \ + $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; +@@ -957,7 +957,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ @@ -29,7 +29,7 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ -@@ -871,7 +871,7 @@ install-python_ext: +@@ -971,7 +971,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): From 576b717dd95859e767ce42364cd9ed8445063502 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:20:08 +0000 Subject: [PATCH 349/487] Add lib/hweight.c to the orig tarball, needed by perf svn path=/dists/trunk/linux-tools/; revision=22592 --- debian/bin/genorig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 5773e5fcf..a41c5c504 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -145,6 +145,7 @@ class Main(object): 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', 'include/', + 'lib/hweight.c', 'lib/rbtree.c', 'scripts/', 'tools/', From a9cec7c3d806a34b17bfb49699dd7ef71a538aa1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:27:16 +0000 Subject: [PATCH 350/487] linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands svn path=/dists/trunk/linux-tools/; revision=22593 --- debian/changelog | 2 ++ debian/patches/tools-perf-version.patch | 42 +++++++++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 22991611f..e394a76b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * New upstream release + * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 + commands -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 317208f3a..7ff342e1b 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -5,11 +5,12 @@ Forwarded: no [bwh: Fix version insertion in perf man page cross-references and perf man page title. Install bash_completion script for perf with a -version-dependent name. And do the same for trace.] +version-dependent name. And do the same for trace. And the same for +perf-read-vdso{,x}32.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -923,8 +923,8 @@ install-gtk: +@@ -923,15 +923,15 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -19,7 +20,16 @@ version-dependent name. And do the same for trace.] + $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' ifndef NO_PERF_READ_VDSO32 $(call QUIET_INSTALL, perf-read-vdso32) \ - $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; +- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)/perf-read-vdso32_$(VERSION)'; + endif + ifndef NO_PERF_READ_VDSOX32 + $(call QUIET_INSTALL, perf-read-vdsox32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)/perf-read-vdsox32_$(VERSION)'; + endif + $(call QUIET_INSTALL, libexec) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' @@ -957,7 +957,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ @@ -63,3 +73,29 @@ version-dependent name. And do the same for trace.] install-man: check-man-tools man +--- a/tools/perf/util/vdso.c ++++ b/tools/perf/util/vdso.c +@@ -22,6 +22,8 @@ + */ + #include "find-vdso-map.c" + ++#include "PERF-VERSION-FILE" ++ + #define VDSO__TEMP_FILE_NAME "/tmp/perf-vdso.so-XXXXXX" + + struct vdso_file { +@@ -51,12 +53,12 @@ static struct vdso_info *vdso_info__new( + .vdso32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSO32, +- .read_prog = "perf-read-vdso32", ++ .read_prog = "perf-read-vdso32_" PERF_VERSION, + }, + .vdsox32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSOX32, +- .read_prog = "perf-read-vdsox32", ++ .read_prog = "perf-read-vdsox32_" PERF_VERSION, + }, + #endif + }; From 0a463c3c64bde43115f1afb66f3e156dfa22b9f7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:32:20 +0000 Subject: [PATCH 351/487] linux-tools: Set ARCH=x86 when building for either amd64 or i386 svn path=/dists/trunk/linux-tools/; revision=22594 --- debian/build/tools/perf/Makefile | 4 ++-- debian/changelog | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index fa1b0b8ab..d92ded4be 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -7,7 +7,7 @@ DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha else ifeq ($(DEB_HOST_ARCH_CPU),amd64) - KERNEL_ARCH_PERF = x86_64 + KERNEL_ARCH_PERF = x86 else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),arm64) @@ -15,7 +15,7 @@ else ifeq ($(DEB_HOST_ARCH_CPU),arm64) else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc else ifeq ($(DEB_HOST_ARCH_CPU),i386) - KERNEL_ARCH_PERF = i386 + KERNEL_ARCH_PERF = x86 else ifeq ($(DEB_HOST_ARCH_CPU),mips) KERNEL_ARCH_PERF = mips else ifeq ($(DEB_HOST_ARCH_CPU),mips64) diff --git a/debian/changelog b/debian/changelog index e394a76b2..d8aaa8285 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * New upstream release * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands + * linux-tools: Set ARCH=x86 when building for either amd64 or i386 -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 From 024b90c4b9a0543b96d416b117cf95787558de2b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:35:01 +0000 Subject: [PATCH 352/487] linux-kbuild: Include Makefile.kasan (Closes: #783681) svn path=/dists/trunk/linux-tools/; revision=22595 --- debian/build/scripts/Makefile | 1 + debian/changelog | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 917a89c70..91aeba040 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -10,6 +10,7 @@ DATA = \ Makefile.clean \ Makefile.extrawarn \ Makefile.host \ + Makefile.kasan \ Makefile.lib \ Makefile.modinst \ Makefile.modpost \ diff --git a/debian/changelog b/debian/changelog index d8aaa8285..ce50cc7ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands * linux-tools: Set ARCH=x86 when building for either amd64 or i386 + * linux-kbuild: Include Makefile.kasan (Closes: #783681) -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 From 7d0adfb758b7964cc4d42976a7938b88dfffd23a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:48:55 +0000 Subject: [PATCH 353/487] Group and sort KERNEL_ARCH_PERF definitions by kernel architecture Use the $(filter) function to test for any of the CPU names that map to each kernel architecture, where there are several. svn path=/dists/trunk/linux-tools/; revision=22596 --- debian/build/tools/perf/Makefile | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index d92ded4be..3e14aeb11 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -6,40 +6,24 @@ DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) ifeq ($(DEB_HOST_ARCH_CPU),alpha) KERNEL_ARCH_PERF = alpha -else ifeq ($(DEB_HOST_ARCH_CPU),amd64) - KERNEL_ARCH_PERF = x86 else ifeq ($(DEB_HOST_ARCH_CPU),arm) KERNEL_ARCH_PERF = arm else ifeq ($(DEB_HOST_ARCH_CPU),arm64) KERNEL_ARCH_PERF = arm64 +else ifneq ($(filter mips%,$(DEB_HOST_ARCH_CPU)),) + KERNEL_ARCH_PERF = mips else ifeq ($(DEB_HOST_ARCH_CPU),hppa) KERNEL_ARCH_PERF = parisc -else ifeq ($(DEB_HOST_ARCH_CPU),i386) - KERNEL_ARCH_PERF = x86 -else ifeq ($(DEB_HOST_ARCH_CPU),mips) - KERNEL_ARCH_PERF = mips -else ifeq ($(DEB_HOST_ARCH_CPU),mips64) - KERNEL_ARCH_PERF = mips -else ifeq ($(DEB_HOST_ARCH_CPU),mips64el) - KERNEL_ARCH_PERF = mips -else ifeq ($(DEB_HOST_ARCH_CPU),mipsel) - KERNEL_ARCH_PERF = mips -else ifeq ($(DEB_HOST_ARCH_CPU),powerpc) +else ifneq ($(filter powerpc% ppc%,$(DEB_HOST_ARCH_CPU)),) KERNEL_ARCH_PERF = powerpc -else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64) - KERNEL_ARCH_PERF = powerpc -else ifeq ($(DEB_HOST_ARCH_CPU),ppc64el) - KERNEL_ARCH_PERF = powerpc -else ifeq ($(DEB_HOST_ARCH_CPU),s390) - KERNEL_ARCH_PERF = s390 -else ifeq ($(DEB_HOST_ARCH_CPU),s390x) +else ifneq ($(filter s390%,$(DEB_HOST_ARCH_CPU)),) KERNEL_ARCH_PERF = s390 else ifeq ($(DEB_HOST_ARCH_CPU),sh4) KERNEL_ARCH_PERF = sh -else ifeq ($(DEB_HOST_ARCH_CPU),sparc) - KERNEL_ARCH_PERF = sparc -else ifeq ($(DEB_HOST_ARCH_CPU),sparc64) +else ifneq ($(filter sparc%,$(DEB_HOST_ARCH_CPU)),) KERNEL_ARCH_PERF = sparc +else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),) + KERNEL_ARCH_PERF = x86 endif MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error From 5b3ac6f123887ad841af54463e059e839e089212 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:50:57 +0000 Subject: [PATCH 354/487] Thanks to Luca Boccassi and Lukas Wunner for some hints on upgrading to 4.0 (Closes: #778588) svn path=/dists/trunk/linux-tools/; revision=22597 --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index ce50cc7ea..b01acf075 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * New upstream release + * Thanks to Luca Boccassi and Lukas Wunner for some hints on upgrading + to 4.0 (Closes: #778588) * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands * linux-tools: Set ARCH=x86 when building for either amd64 or i386 From 968c0ca2effcedf9336ebf55229bfc71023b9f2e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 00:51:41 +0000 Subject: [PATCH 355/487] perf ARCH=x86 applies to x32 as well svn path=/dists/trunk/linux-tools/; revision=22598 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b01acf075..28a603de4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium to 4.0 (Closes: #778588) * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands - * linux-tools: Set ARCH=x86 when building for either amd64 or i386 + * linux-tools: Set ARCH=x86 when building perf for amd64, i386 or x32 * linux-kbuild: Include Makefile.kasan (Closes: #783681) -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 From 6d290c8057c4d0d4b87de9a41281c303c4e2a12f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 01:43:36 +0000 Subject: [PATCH 356/487] linux-kbuild: Enable Large File Support (Closes: #778942) svn path=/dists/trunk/linux-tools/; revision=22599 --- debian/build/scripts/Makefile | 2 ++ debian/changelog | 1 + 2 files changed, 3 insertions(+) diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index 91aeba040..ab2a6a412 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -47,3 +47,5 @@ SUBDIRS = \ OUTDIR = scripts include ..//Makefile.inc + +CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 diff --git a/debian/changelog b/debian/changelog index 28a603de4..f5d30488b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium commands * linux-tools: Set ARCH=x86 when building perf for amd64, i386 or x32 * linux-kbuild: Include Makefile.kasan (Closes: #783681) + * linux-kbuild: Enable Large File Support (Closes: #778942) -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 From 105faf0c32cfc53af0f00ada3069be27c7a582e2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 02:00:34 +0000 Subject: [PATCH 357/487] debian/control: Add gcc-multilib to Build-Depends in order to build perf-read-vdso{,x}32 svn path=/dists/trunk/linux-tools/; revision=22600 --- debian/changelog | 2 ++ debian/templates/control.source.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f5d30488b..c5eb7ab0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * New upstream release * Thanks to Luca Boccassi and Lukas Wunner for some hints on upgrading to 4.0 (Closes: #778588) + * debian/control: Add gcc-multilib to Build-Depends in order to build + perf-read-vdso{,x}32 * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands * linux-tools: Set ARCH=x86 when building perf for amd64, i386 or x32 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index f83620854..20a2f6239 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -6,7 +6,7 @@ Uploaders: Bastian Blank , Ben Hutchings Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, - asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, + asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From e61262a4b00f4f4e00c647aa9b0ee1f658d92206 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 02:19:32 +0000 Subject: [PATCH 358/487] Revert "linux-tools: Add version suffix to the new perf-read-vdso{,x}32 commands" This doesn't work properly as the C macro PERF_VERSION includes the third version component. Also these binaries really belong under /usr/lib, not /usr/bin. svn path=/dists/trunk/linux-tools/; revision=22601 --- debian/changelog | 2 -- debian/patches/tools-perf-version.patch | 42 ++----------------------- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/debian/changelog b/debian/changelog index c5eb7ab0e..1bb6e3de0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,6 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium to 4.0 (Closes: #778588) * debian/control: Add gcc-multilib to Build-Depends in order to build perf-read-vdso{,x}32 - * linux-tools: Add version suffix to the new perf-read-vdso{,x}32 - commands * linux-tools: Set ARCH=x86 when building perf for amd64, i386 or x32 * linux-kbuild: Include Makefile.kasan (Closes: #783681) * linux-kbuild: Enable Large File Support (Closes: #778942) diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 7ff342e1b..317208f3a 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -5,12 +5,11 @@ Forwarded: no [bwh: Fix version insertion in perf man page cross-references and perf man page title. Install bash_completion script for perf with a -version-dependent name. And do the same for trace. And the same for -perf-read-vdso{,x}32.] +version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -923,15 +923,15 @@ install-gtk: +@@ -923,8 +923,8 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -20,16 +19,7 @@ perf-read-vdso{,x}32.] + $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' ifndef NO_PERF_READ_VDSO32 $(call QUIET_INSTALL, perf-read-vdso32) \ -- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; -+ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)/perf-read-vdso32_$(VERSION)'; - endif - ifndef NO_PERF_READ_VDSOX32 - $(call QUIET_INSTALL, perf-read-vdsox32) \ -- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; -+ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)/perf-read-vdsox32_$(VERSION)'; - endif - $(call QUIET_INSTALL, libexec) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; @@ -957,7 +957,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ @@ -73,29 +63,3 @@ perf-read-vdso{,x}32.] install-man: check-man-tools man ---- a/tools/perf/util/vdso.c -+++ b/tools/perf/util/vdso.c -@@ -22,6 +22,8 @@ - */ - #include "find-vdso-map.c" - -+#include "PERF-VERSION-FILE" -+ - #define VDSO__TEMP_FILE_NAME "/tmp/perf-vdso.so-XXXXXX" - - struct vdso_file { -@@ -51,12 +53,12 @@ static struct vdso_info *vdso_info__new( - .vdso32 = { - .temp_file_name = VDSO__TEMP_FILE_NAME, - .dso_name = DSO__NAME_VDSO32, -- .read_prog = "perf-read-vdso32", -+ .read_prog = "perf-read-vdso32_" PERF_VERSION, - }, - .vdsox32 = { - .temp_file_name = VDSO__TEMP_FILE_NAME, - .dso_name = DSO__NAME_VDSOX32, -- .read_prog = "perf-read-vdsox32", -+ .read_prog = "perf-read-vdsox32_" PERF_VERSION, - }, - #endif - }; From a2bc9d510ea14ded774be3d979ce876e61f50f06 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 02:51:07 +0000 Subject: [PATCH 359/487] linux-tools: Install perf-read-vdso{,x}32 in versioned directory under /usr/lib Also move all the other 'libexec' stuff from /usr/share to /usr/lib. It's all a big multilib (not multiarch) mess. :-( svn path=/dists/trunk/linux-tools/; revision=22602 --- debian/build/tools/perf/Makefile | 2 +- debian/changelog | 2 + debian/patches/tools-perf-version.patch | 49 +++++++++++++++++++++++-- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 3e14aeb11..bcf921085 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -32,7 +32,7 @@ MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wn MAKE_PERF += NO_GTK2=1 # Include version in all directory names -MAKE_PERF += perfexecdir=share/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins +MAKE_PERF += perfexecdir=lib/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins # perf can link against libbfd if available, but the result is # undistributable as they are licenced under GPL v2 and v3+ diff --git a/debian/changelog b/debian/changelog index 1bb6e3de0..c41d68751 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium to 4.0 (Closes: #778588) * debian/control: Add gcc-multilib to Build-Depends in order to build perf-read-vdso{,x}32 + * linux-tools: Install perf-read-vdso{,x}32 in versioned directory + under /usr/lib * linux-tools: Set ARCH=x86 when building perf for amd64, i386 or x32 * linux-kbuild: Include Makefile.kasan (Closes: #783681) * linux-kbuild: Enable Large File Support (Closes: #778942) diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 317208f3a..fb3d790aa 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,7 +9,17 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -923,8 +923,8 @@ install-gtk: +@@ -756,6 +756,9 @@ $(OUTPUT)util/find_next_bit.o: ../lib/ut + $(OUTPUT)util/parse-events.o: util/parse-events.c $(OUTPUT)PERF-CFLAGS + $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -Wno-redundant-decls $< + ++$(OUTPUT)util/vdso.o: util/vdso.c $(OUTPUT)PERF-CFLAGS ++ $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' $< ++ + $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS + $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $< + +@@ -923,18 +926,18 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -17,10 +27,24 @@ version-dependent name. And do the same for trace.] - $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace' + $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \ + $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' ++ $(call QUIET_INSTALL, libexec) \ ++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' ifndef NO_PERF_READ_VDSO32 $(call QUIET_INSTALL, perf-read-vdso32) \ - $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; -@@ -957,7 +957,7 @@ ifndef NO_LIBPYTHON +- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif + ifndef NO_PERF_READ_VDSOX32 + $(call QUIET_INSTALL, perf-read-vdsox32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif +- $(call QUIET_INSTALL, libexec) \ +- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + $(call QUIET_INSTALL, perf-archive) \ + $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + $(call QUIET_INSTALL, perf-with-kcore) \ +@@ -957,7 +960,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ @@ -29,7 +53,7 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ -@@ -971,7 +971,7 @@ install-python_ext: +@@ -971,7 +974,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -63,3 +87,20 @@ version-dependent name. And do the same for trace.] install-man: check-man-tools man +--- a/tools/perf/util/vdso.c ++++ b/tools/perf/util/vdso.c +@@ -51,12 +51,12 @@ static struct vdso_info *vdso_info__new( + .vdso32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSO32, +- .read_prog = "perf-read-vdso32", ++ .read_prog = PERFEXECDIR "/perf-read-vdso32", + }, + .vdsox32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSOX32, +- .read_prog = "perf-read-vdsox32", ++ .read_prog = PERFEXECDIR "/perf-read-vdsox32", + }, + #endif + }; From b1b86869b409129456c359ef3147cfce8a57d84c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 11 May 2015 03:06:19 +0000 Subject: [PATCH 360/487] Prepare to release linux-tools (4.0.2-1). svn path=/dists/trunk/linux-tools/; revision=22603 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c41d68751..67021142c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.0.2-1) UNRELEASED; urgency=medium +linux-tools (4.0.2-1) unstable; urgency=medium * New upstream release * Thanks to Luca Boccassi and Lukas Wunner for some hints on upgrading @@ -11,7 +11,7 @@ linux-tools (4.0.2-1) UNRELEASED; urgency=medium * linux-kbuild: Include Makefile.kasan (Closes: #783681) * linux-kbuild: Enable Large File Support (Closes: #778942) - -- Ben Hutchings Mon, 11 May 2015 00:46:20 +0100 + -- Ben Hutchings Mon, 11 May 2015 03:53:12 +0100 linux-tools (3.18.5-1~exp1) experimental; urgency=medium From ed67452fc59ed352ab3c0cba9925686c0227b7b1 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 28 Jun 2015 18:44:20 +0000 Subject: [PATCH 361/487] Add hyperv-daemons package svn path=/dists/trunk/linux-tools/; revision=22770 --- debian/README.Debian.hyperv-daemons | 14 +++++++++++ debian/build/tools/Makefile | 1 + debian/build/tools/hv/Makefile | 15 +++++++++++ debian/changelog | 6 +++++ debian/hyperv-daemons.hv-fcopy-daemon.service | 10 ++++++++ debian/hyperv-daemons.hv-kvp-daemon.service | 9 +++++++ debian/hyperv-daemons.hv-vss-daemon.service | 9 +++++++ debian/hyperv-daemons.install | 1 + debian/rules.real | 25 ++++++++++++++++++- debian/templates/control.main.in | 18 +++++++++++++ debian/templates/control.source.in | 3 ++- 11 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 debian/README.Debian.hyperv-daemons create mode 100644 debian/build/tools/hv/Makefile create mode 100644 debian/hyperv-daemons.hv-fcopy-daemon.service create mode 100644 debian/hyperv-daemons.hv-kvp-daemon.service create mode 100644 debian/hyperv-daemons.hv-vss-daemon.service create mode 100644 debian/hyperv-daemons.install diff --git a/debian/README.Debian.hyperv-daemons b/debian/README.Debian.hyperv-daemons new file mode 100644 index 000000000..8fff2afd3 --- /dev/null +++ b/debian/README.Debian.hyperv-daemons @@ -0,0 +1,14 @@ +hyperv-daemon for Debian +------------------------ + + If you want to change screen resolution on Linux guest, + plese update kernel parameter. + + 1. edit /etc/default/grub file + - add 'video=hyperv_fb:"horizontal"x"vertical"' to + 'GRUB_CMDLINE_LINUX_DEFAULT=' or 'GRUB_CMDLINE_LINUX=' line + (e.g. GRUB_CMDLINE_LINUX=video=hyperv_fb:1280x1024) + 2. then, exec update-grub + 3. reboot Linux guest + + -- Hideki Yamane Thu, 28 May 2015 10:23:52 +0900 diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile index bb530cbbe..06bc26609 100644 --- a/debian/build/tools/Makefile +++ b/debian/build/tools/Makefile @@ -1,4 +1,5 @@ SUBDIRS = \ + hv \ perf \ usb/usbip diff --git a/debian/build/tools/hv/Makefile b/debian/build/tools/hv/Makefile new file mode 100644 index 000000000..a1fddeb49 --- /dev/null +++ b/debian/build/tools/hv/Makefile @@ -0,0 +1,15 @@ +PROGS = \ + hv_fcopy_daemon \ + hv_kvp_daemon \ + hv_vss_daemon + +OUTDIR = tools/hv +prefix = /usr/sbin + +include ../../Makefile.inc + +install-local-progs: $(PROGS) + @for p in $^; do \ + echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$$(basename $$p)"; \ + done diff --git a/debian/changelog b/debian/changelog index 67021142c..cd63d49d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.0.2-2) UNRELEASED; urgency=medium + + * Add hyperv-daemons package. (closes: #782761) + + -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 + linux-tools (4.0.2-1) unstable; urgency=medium * New upstream release diff --git a/debian/hyperv-daemons.hv-fcopy-daemon.service b/debian/hyperv-daemons.hv-fcopy-daemon.service new file mode 100644 index 000000000..6aec2b388 --- /dev/null +++ b/debian/hyperv-daemons.hv-fcopy-daemon.service @@ -0,0 +1,10 @@ +[Unit] +Description=Hyper-V file copy service (FCOPY) daemon +ConditionVirtualization=microsoft +ConditionPathExists=/dev/vmbus/hv_fcopy + +[Service] +ExecStart=/usr/sbin/hv_fcopy_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.hv-kvp-daemon.service b/debian/hyperv-daemons.hv-kvp-daemon.service new file mode 100644 index 000000000..f6f6f0d29 --- /dev/null +++ b/debian/hyperv-daemons.hv-kvp-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hyper-V key-value pair (KVP) daemon +ConditionVirtualization=microsoft + +[Service] +ExecStart=/usr/sbin/hv_kvp_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.hv-vss-daemon.service b/debian/hyperv-daemons.hv-vss-daemon.service new file mode 100644 index 000000000..3e6534d55 --- /dev/null +++ b/debian/hyperv-daemons.hv-vss-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hyper-V volume shadow copy service (VSS) daemon +ConditionVirtualization=microsoft + +[Service] +ExecStart=/usr/sbin/hv_vss_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.install b/debian/hyperv-daemons.install new file mode 100644 index 000000000..2c00a4a79 --- /dev/null +++ b/debian/hyperv-daemons.install @@ -0,0 +1 @@ +debian/hyperv-daemons.*.service lib/systemd/system/ diff --git a/debian/rules.real b/debian/rules.real index 6761f7e20..7e829b6f5 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -8,7 +8,7 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) # includes any binNMU part. VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') -binary-arch: install-kbuild install-usbip +binary-arch: install-kbuild install-usbip install-hyperv-daemons ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif @@ -82,3 +82,26 @@ install-usbip: $(STAMPS_DIR)/build dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL) dh_md5sums dh_builddeb + +install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons +install-hyperv-daemons: DH_OPTIONS = -p$(PACKAGE_NAME) +install-hyperv-daemons: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-hyperv-daemons: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_clean -k -d + $(MAKE) -C $(BUILD_DIR)/tools/hv install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_install + dh_installchangelogs + dh_installdocs + dh_systemd_enable + dh_systemd_start + dh_lintian + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 06f712199..a7b823355 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -49,3 +49,21 @@ Description: USB device sharing system over IP network . This package provides the server component 'usbipd' and the client tool 'usbip'. + +Package: hyperv-daemons +Architecture: i386 amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: admin +Description: Support daemons for Linux running on Hyper-V + Suite of daemons that are needed when Linux guest is running on Hyper-V. + It includes: hv-fcopy-daemon, hv-kvp-daemon, hv-vss-daemon + . + hv-fcopy-daemon is an implementation of file copy service functionality for + Linux Guest running on Hyper-V, it enables host to copy a file + into the Linux Guest. + . + hv-kvp-daemon is an implementation of Hyper-V key-value pair (KVP) functionality + for Linux, it also supports IP injection functionality on the Guest. + . + hv-vss-daemon is an implementation of Hyper-V VSS functionality for Linux, + it is used for host initiated guest snapshot on Hyper-V hypervisor. diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 20a2f6239..c996f1a96 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,6 +7,7 @@ Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev + autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, + dh-systemd Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ From b4ca8fe3f884b536463a0e7dad306cefb10e88fc Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 28 Jun 2015 18:48:45 +0000 Subject: [PATCH 362/487] debian/rules.real: Use dh_prep svn path=/dists/trunk/linux-tools/; revision=22771 --- debian/rules.real | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 7e829b6f5..9be92ab0b 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -26,7 +26,7 @@ install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)/$(BASE_DIR) install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot - dh_clean -k -d + dh_prep $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs @@ -46,7 +46,7 @@ install-tools: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) install-tools: $(STAMPS_DIR)/build dh_testdir dh_testroot - dh_clean -k -d + dh_prep $(MAKE) -C $(BUILD_DIR)/tools/perf install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ @@ -67,7 +67,7 @@ install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION " install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot - dh_clean -k -d + dh_prep $(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_install dh_installchangelogs @@ -89,7 +89,7 @@ install-hyperv-daemons: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) install-hyperv-daemons: $(STAMPS_DIR)/build dh_testdir dh_testroot - dh_clean -k -d + dh_prep $(MAKE) -C $(BUILD_DIR)/tools/hv install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_install dh_installchangelogs From ab2a55f5f26ae0cee1cf95dfa11ce5d8b4be52e0 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 28 Jun 2015 19:00:39 +0000 Subject: [PATCH 363/487] Use dpkg provided make-snippets svn path=/dists/trunk/linux-tools/; revision=22772 --- debian/rules | 2 -- debian/rules.defs | 3 ++- debian/rules.real | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index b04b1de29..654636195 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,6 @@ #!/usr/bin/make -f SHELL := sh -e -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) -DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p') VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,') diff --git a/debian/rules.defs b/debian/rules.defs index 06b3f3edb..b2664867d 100644 --- a/debian/rules.defs +++ b/debian/rules.defs @@ -1,4 +1,5 @@ +include /usr/share/dpkg/default.mk + BUILD_DIR = debian/build STAMPS_DIR = debian/stamps TEMPLATES_DIR = debian/templates - diff --git a/debian/rules.real b/debian/rules.real index 9be92ab0b..d173b6f0c 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -2,8 +2,6 @@ export DH_OPTIONS include debian/rules.defs -DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) - # VERSION_DEBIAN is the package source version; VERSION_DEBIAN_FULL # includes any binNMU part. VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') From 66fd690ba94cb456079862f6ca1a1ab8b3912620 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sun, 28 Jun 2015 19:30:14 +0000 Subject: [PATCH 364/487] Use pre-defined version variables svn path=/dists/trunk/linux-tools/; revision=22773 --- debian/rules | 9 +++------ debian/rules.real | 8 ++------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/debian/rules b/debian/rules index 654636195..f5476e14b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,7 @@ #!/usr/bin/make -f SHELL := sh -e -SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p') -VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') -VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,') -VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') +VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') include debian/rules.defs @@ -21,8 +18,8 @@ build-indep: debian/control $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ -DIR_ORIG = ../orig/$(SOURCE)-$(VERSION) -TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.xz +DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) +TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) orig: $(DIR_ORIG) diff --git a/debian/rules.real b/debian/rules.real index d173b6f0c..ee176abd4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -2,10 +2,6 @@ export DH_OPTIONS include debian/rules.defs -# VERSION_DEBIAN is the package source version; VERSION_DEBIAN_FULL -# includes any binNMU part. -VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p') - binary-arch: install-kbuild install-usbip install-hyperv-daemons ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-tools @@ -76,8 +72,8 @@ install-usbip: $(STAMPS_DIR)/build dh_fixperms dh_installdeb dh_shlibdeps - test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN_FULL)" - dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL) + test -n "$(VERSION)" -a -n "$(DEB_VERSION)" + dh_gencontrol -- -v$(VERSION)+$(DEB_VERSION) dh_md5sums dh_builddeb From 56960b53473d7bfa98f27d67f686ec8f48fd4375 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 12 Jul 2015 23:20:31 +0000 Subject: [PATCH 365/487] Add credit to Hideki Yamane for hyperv-daemons svn path=/dists/trunk/linux-tools/; revision=22828 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cd63d49d3..d6d8c81bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ linux-tools (4.0.2-2) UNRELEASED; urgency=medium - * Add hyperv-daemons package. (closes: #782761) + * Add hyperv-daemons package, thanks to Hideki Yamane (closes: #782761) -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 From 5372a3b5e7c1970697d7c61347da519a43e480fd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 12 Jul 2015 23:58:02 +0000 Subject: [PATCH 366/487] Update to 4.1.2 svn path=/dists/trunk/linux-tools/; revision=22829 --- debian/changelog | 5 ++++- debian/patches/tools-perf-install.patch | 4 ++-- debian/patches/tools-perf-version.patch | 26 ++++++++++++------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index d6d8c81bd..bf719464d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -linux-tools (4.0.2-2) UNRELEASED; urgency=medium +linux-tools (4.1.2-1~exp1) UNRELEASED; urgency=medium + * New upstream release + + [ Bastian Blank ] * Add hyperv-daemons package, thanks to Hideki Yamane (closes: #782761) -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 6de3c81ff..03b2694f7 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -7,7 +7,7 @@ Forwarded: no --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -842,8 +842,8 @@ install-bin: all install-gtk +@@ -484,8 +484,8 @@ endif ifndef NO_LIBPERL $(call QUIET_INSTALL, perl-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ @@ -18,7 +18,7 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif -@@ -851,18 +851,18 @@ ifndef NO_LIBPYTHON +@@ -493,18 +493,18 @@ ifndef NO_LIBPYTHON $(call QUIET_INSTALL, python-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index fb3d790aa..5ea2f4885 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,17 +9,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -756,6 +756,9 @@ $(OUTPUT)util/find_next_bit.o: ../lib/ut - $(OUTPUT)util/parse-events.o: util/parse-events.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -Wno-redundant-decls $< - -+$(OUTPUT)util/vdso.o: util/vdso.c $(OUTPUT)PERF-CFLAGS -+ $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' $< -+ - $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow -Wno-undef -Wno-switch-default $< - -@@ -923,18 +926,18 @@ install-gtk: +@@ -465,18 +465,18 @@ install-gtk: install-bin: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -44,7 +34,7 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, perf-archive) \ $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-with-kcore) \ -@@ -957,7 +960,7 @@ ifndef NO_LIBPYTHON +@@ -499,7 +499,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ @@ -53,7 +43,7 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ -@@ -971,7 +974,7 @@ install-python_ext: +@@ -513,7 +513,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -87,6 +77,16 @@ version-dependent name. And do the same for trace.] install-man: check-man-tools man +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -127,6 +127,7 @@ CFLAGS_find_next_bit.o += -Wno-unused-pa + CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" + CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" + CFLAGS_parse-events.o += -Wno-redundant-decls ++CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' + + $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE + $(call rule_mkdir) --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c @@ -51,12 +51,12 @@ static struct vdso_info *vdso_info__new( From 7d26874efa16338c350ff0d3f41a47036ce0508b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 00:12:02 +0000 Subject: [PATCH 367/487] Update perf clean rule for 4.1; it now creates a file in the source directory svn path=/dists/trunk/linux-tools/; revision=22830 --- debian/build/tools/perf/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index bcf921085..968f4ec5d 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -68,4 +68,8 @@ ifdef KERNEL_ARCH_PERF endif clean: +ifdef KERNEL_ARCH_PERF + mkdir -p out + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out clean rm -rf out +endif From c8ccbe988289a13300821091c5bbd4eb549d8907 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 00:12:58 +0000 Subject: [PATCH 368/487] Rename README.Debian.hyperv-daemon so dh_installdocs finds it svn path=/dists/trunk/linux-tools/; revision=22831 --- ...{README.Debian.hyperv-daemons => hyperv-daemons.README.Debian} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename debian/{README.Debian.hyperv-daemons => hyperv-daemons.README.Debian} (100%) diff --git a/debian/README.Debian.hyperv-daemons b/debian/hyperv-daemons.README.Debian similarity index 100% rename from debian/README.Debian.hyperv-daemons rename to debian/hyperv-daemons.README.Debian From 86f4cd8484129f1d638a260b130fd6b12d36a4e8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 00:30:34 +0000 Subject: [PATCH 369/487] hyperv-daemons: Rewrite description svn path=/dists/trunk/linux-tools/; revision=22833 --- debian/changelog | 3 +++ debian/templates/control.main.in | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf719464d..b90338ab9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ linux-tools (4.1.2-1~exp1) UNRELEASED; urgency=medium [ Bastian Blank ] * Add hyperv-daemons package, thanks to Hideki Yamane (closes: #782761) + [ Ben Hutchings ] + * hyperv-daemons: Rewrite description + -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 linux-tools (4.0.2-1) unstable; urgency=medium diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index a7b823355..3b613687e 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -55,15 +55,15 @@ Architecture: i386 amd64 Depends: ${shlibs:Depends}, ${misc:Depends} Section: admin Description: Support daemons for Linux running on Hyper-V - Suite of daemons that are needed when Linux guest is running on Hyper-V. - It includes: hv-fcopy-daemon, hv-kvp-daemon, hv-vss-daemon + Suite of daemons for Linux guests running on Hyper-V, consisting of + hv_fcopy_daemon, hv_kvp_daemon and hv_vss_daemon. . - hv-fcopy-daemon is an implementation of file copy service functionality for - Linux Guest running on Hyper-V, it enables host to copy a file - into the Linux Guest. + hv_fcopy_daemon provides the file copy service, allowing the host to + copy files into the guest. . - hv-kvp-daemon is an implementation of Hyper-V key-value pair (KVP) functionality - for Linux, it also supports IP injection functionality on the Guest. + hv_kvp_daemon provides the key-value pair (KVP) service, allowing the + host to get and set the IP networking configuration of the guest. + (This requires helper scripts which are not currently included.) . - hv-vss-daemon is an implementation of Hyper-V VSS functionality for Linux, - it is used for host initiated guest snapshot on Hyper-V hypervisor. + hv_vss_daemon provides the volume shadow copy service (VSS), allowing + the host to freeze the guest filesystems while taking a snapshot. From 5a176ef1a44796b97427e076d15ba3313045892c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 00:55:21 +0000 Subject: [PATCH 370/487] Prepare to release linux-tools (4.1.2-1~exp1). svn path=/dists/trunk/linux-tools/; revision=22834 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b90338ab9..1f1f36761 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.1.2-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.1.2-1~exp1) experimental; urgency=medium * New upstream release @@ -8,7 +8,7 @@ linux-tools (4.1.2-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * hyperv-daemons: Rewrite description - -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 + -- Ben Hutchings Mon, 13 Jul 2015 01:33:27 +0100 linux-tools (4.0.2-1) unstable; urgency=medium From 2fe492c10fbc478c1e749e34060b40e713dbc54e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Jul 2015 19:31:07 +0000 Subject: [PATCH 371/487] linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man page date svn path=/dists/trunk/linux-tools/; revision=22835 --- debian/changelog | 7 ++++++ debian/patches/series | 1 + debian/patches/tools-perf-man-date.patch | 32 ++++++++++++++++++++++++ debian/rules.real | 1 + 4 files changed, 41 insertions(+) create mode 100644 debian/patches/tools-perf-man-date.patch diff --git a/debian/changelog b/debian/changelog index 1f1f36761..6b132e8ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.1.2-1~exp2) UNRELEASED; urgency=medium + + * linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man + page date + + -- Ben Hutchings Mon, 13 Jul 2015 19:52:17 +0100 + linux-tools (4.1.2-1~exp1) experimental; urgency=medium * New upstream release diff --git a/debian/patches/series b/debian/patches/series index cd239c608..144996d2d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ tools-perf-install.patch usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch +tools-perf-man-date.patch diff --git a/debian/patches/tools-perf-man-date.patch b/debian/patches/tools-perf-man-date.patch new file mode 100644 index 000000000..e4f30d4fd --- /dev/null +++ b/debian/patches/tools-perf-man-date.patch @@ -0,0 +1,32 @@ +From: Ben Hutchings +Date: Mon, 13 Jul 2015 20:29:20 +0100 +Subject: perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date + +This allows man pages to be built reproducibly. + +Signed-off-by: Ben Hutchings +--- +--- a/tools/perf/Documentation/Makefile ++++ b/tools/perf/Documentation/Makefile +@@ -120,6 +120,9 @@ endif + ifdef DOCBOOK_SUPPRESS_SP + XMLTO_EXTRA += -m manpage-suppress-sp.xsl + endif ++ifdef KBUILD_BUILD_TIMESTAMP ++ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) ++endif + + SHELL_PATH ?= $(SHELL) + # Shell quote; +--- a/tools/perf/Documentation/asciidoc.conf ++++ b/tools/perf/Documentation/asciidoc.conf +@@ -71,6 +71,9 @@ ifdef::backend-docbook[] + [header] + template::[header-declarations] + ++ ++template::[docinfo] ++ + + {mantitle} + {manvolnum} diff --git a/debian/rules.real b/debian/rules.real index ee176abd4..6a83b40c0 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -1,4 +1,5 @@ export DH_OPTIONS +export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: ,,p') include debian/rules.defs From b3cf7793e22175296403564a7dcb52e2bf62339a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 16 Jul 2015 18:59:30 +0000 Subject: [PATCH 372/487] hyperv-daemons: Only attempt to build package on i386, amd64 (fixes FTBFS on other architectures) svn path=/dists/trunk/linux-tools/; revision=22837 --- debian/changelog | 2 ++ debian/rules.real | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6b132e8ef..b21544685 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ linux-tools (4.1.2-1~exp2) UNRELEASED; urgency=medium * linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man page date + * hyperv-daemons: Only attempt to build package on i386, amd64 + (fixes FTBFS on other architectures) -- Ben Hutchings Mon, 13 Jul 2015 19:52:17 +0100 diff --git a/debian/rules.real b/debian/rules.real index 6a83b40c0..65406d151 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,10 +3,13 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs -binary-arch: install-kbuild install-usbip install-hyperv-daemons +binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-tools endif +ifneq ($(filter i386 amd64,$(DEB_BUILD_ARCH)),) + binary-arch: install-hyperv-daemons +endif build: $(STAMPS_DIR)/build From e7a634de1c3d90b740c1392c2db6c5948ddcaa40 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 27 Jul 2015 18:18:45 +0000 Subject: [PATCH 373/487] Set next version to 4.1.2-1 as it will be uploaded to unstable svn path=/dists/trunk/linux-tools/; revision=22866 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b21544685..e66bbf531 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.1.2-1~exp2) UNRELEASED; urgency=medium +linux-tools (4.1.2-1) UNRELEASED; urgency=medium * linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man page date From ef2c6c7e5c8025351cd7054e2202840e7675fb80 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Aug 2015 22:28:09 +0000 Subject: [PATCH 374/487] Update to 4.1.4 svn path=/dists/trunk/linux-tools/; revision=22895 --- debian/changelog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e66bbf531..451de4334 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,10 @@ -linux-tools (4.1.2-1) UNRELEASED; urgency=medium +linux-tools (4.1.4-1) UNRELEASED; urgency=medium + * New upstream stable update: + http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4 + - perf bench numa: Fix to show proper convergence stats + + [ Ben Hutchings ] * linux-tools: Set $KBUILD_BUILD_TIMESTAMP from changelog and use it as man page date * hyperv-daemons: Only attempt to build package on i386, amd64 From c2faa8741df04d6ccd5d58a81069e18ca5d5defd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Aug 2015 22:45:04 +0000 Subject: [PATCH 375/487] linux-tools: Rename to linux-perf-, since other tools are in other binary packages svn path=/dists/trunk/linux-tools/; revision=22896 --- debian/changelog | 2 ++ debian/templates/control.main.in | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 451de4334..f73d4c100 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ linux-tools (4.1.4-1) UNRELEASED; urgency=medium page date * hyperv-daemons: Only attempt to build package on i386, amd64 (fixes FTBFS on other architectures) + * linux-tools: Rename to linux-perf-, since other tools are + in other binary packages -- Ben Hutchings Mon, 13 Jul 2015 19:52:17 +0100 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 3b613687e..2c2432add 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -5,11 +5,12 @@ Multi-Arch: foreign Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. -Package: linux-tools-@version@ +Package: linux-perf-@version@ Section: devel Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) +Provides: linux-tools-@version@ Suggests: linux-doc-@version@ Description: Performance analysis tools for Linux @upstreamversion@ This package contains the 'perf' performance analysis tools for Linux From bb6e62e1ed3f5c5ec19e8b25bdbef3e3a3da1897 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 3 Aug 2015 23:46:29 +0000 Subject: [PATCH 376/487] Update rules for renaming of linux-tools binary package svn path=/dists/trunk/linux-tools/; revision=22899 --- debian/rules.real | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules.real b/debian/rules.real index 65406d151..3f2669fb1 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -5,7 +5,7 @@ include debian/rules.defs binary-arch: install-kbuild install-usbip ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) - binary-arch: install-tools + binary-arch: install-perf endif ifneq ($(filter i386 amd64,$(DEB_BUILD_ARCH)),) binary-arch: install-hyperv-daemons @@ -38,10 +38,10 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -install-tools: PACKAGE_NAME = linux-tools-$(VERSION) -install-tools: DH_OPTIONS = -p$(PACKAGE_NAME) -install-tools: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) -install-tools: $(STAMPS_DIR)/build +install-perf: PACKAGE_NAME = linux-perf-$(VERSION) +install-perf: DH_OPTIONS = -p$(PACKAGE_NAME) +install-perf: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-perf: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep From f049f86efef2abdf4458ffdb9c5583a78bb52c0b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 4 Aug 2015 00:14:39 +0000 Subject: [PATCH 377/487] Add {Conflicts,Replaces}: linux-tools to linux-perf temporarily linux-tools-4.1 already exists in experimental. As linux-perf-4.1 installs the same files, it needs to conflict and replace it. This won't be needed for 4.2 onward. svn path=/dists/trunk/linux-tools/; revision=22900 --- debian/templates/control.main.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 2c2432add..e76b88637 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -11,6 +11,8 @@ Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipse Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) Provides: linux-tools-@version@ +Conflicts: linux-tools-@version@ +Replaces: linux-tools-@version@ Suggests: linux-doc-@version@ Description: Performance analysis tools for Linux @upstreamversion@ This package contains the 'perf' performance analysis tools for Linux From 3803569d4bc9ec46b84ddfd79fa575854d87275e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 4 Aug 2015 00:19:50 +0000 Subject: [PATCH 378/487] Prepare to release linux-tools (4.1.4-1). svn path=/dists/trunk/linux-tools/; revision=22901 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f73d4c100..48280e943 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.1.4-1) UNRELEASED; urgency=medium +linux-tools (4.1.4-1) unstable; urgency=medium * New upstream stable update: http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4 @@ -12,7 +12,7 @@ linux-tools (4.1.4-1) UNRELEASED; urgency=medium * linux-tools: Rename to linux-perf-, since other tools are in other binary packages - -- Ben Hutchings Mon, 13 Jul 2015 19:52:17 +0100 + -- Ben Hutchings Tue, 04 Aug 2015 00:47:58 +0100 linux-tools (4.1.2-1~exp1) experimental; urgency=medium From 89176f4b934f55945595ace836f1ba568e869bd8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 4 Aug 2015 16:12:20 +0000 Subject: [PATCH 379/487] [mips*,alpha,hppa] linux-perf: Add empty Build files for these architectures (fixes FTBFS) svn path=/dists/sid/linux-tools/; revision=22910 --- debian/changelog | 7 +++++ debian/patches/series | 1 + ...uild-files-for-architectures-lacking.patch | 27 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch diff --git a/debian/changelog b/debian/changelog index 48280e943..78dfcaef6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.1.4-2) unstable; urgency=medium + + * [mips*,alpha,hppa] linux-perf: Add empty Build files for these architectures + (fixes FTBFS) + + -- Ben Hutchings Tue, 04 Aug 2015 17:11:46 +0100 + linux-tools (4.1.4-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/series b/debian/patches/series index 144996d2d..c4285b581 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch tools-perf-man-date.patch +tools-perf-add-empty-build-files-for-architectures-lacking.patch diff --git a/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch b/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch new file mode 100644 index 000000000..f648d5888 --- /dev/null +++ b/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch @@ -0,0 +1,27 @@ +From: Ben Hutchings +Date: Tue, 04 Aug 2015 16:59:53 +0100 +Subject: tools/perf: Add empty Build files for architectures lacking them +Forwarded: http://mid.gmane.org/1438704627.7315.2.camel@decadent.org.uk + +perf currently fails to build on MIPS as there is no +tools/perf/arch/mips/Build file. Adding an empty file fixes this as +there are no MIPS-specific sources to build. + +It looks like the same is needed for Alpha and PA-RISC, though I +haven't been able to test those. + +Signed-off-by: Ben Hutchings +Fixes: 5e8c0fb6a957 ("perf build: Add arch x86 objects building") +--- +--- /dev/null ++++ b/tools/perf/arch/alpha/Build +@@ -0,0 +1 @@ ++# empty +--- /dev/null ++++ b/tools/perf/arch/mips/Build +@@ -0,0 +1,1 @@ ++# empty +--- /dev/null ++++ b/tools/perf/arch/parisc/Build +@@ -0,0 +1 @@ ++# empty From e0a1c96c554ad943ea115deaa39778246635f3b5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 11 Aug 2015 18:57:35 +0200 Subject: [PATCH 380/487] Add .gitignore files based on svn:ignore properties For the top-level .gitignore, do this via a patch. --- debian/.gitignore | 17 +++++++++++++++++ debian/changelog | 7 +++++++ debian/patches/gitignore.patch | 14 ++++++++++++++ debian/patches/series | 1 + 4 files changed, 39 insertions(+) create mode 100644 debian/.gitignore create mode 100644 debian/patches/gitignore.patch diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..4ad73d6a8 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,17 @@ +!/patches +!*.patch +!*.diff +/*.debhelper +/*.debhelper.log +/*.substvars +/control +/control.md5sum +/files +/hyperv-daemons/ +/libusbip-dev/ +/linux-kbuild-* +/linux-perf-* +/rules.gen +/stamps/ +/tmp/ +/usbip/ diff --git a/debian/changelog b/debian/changelog index 78dfcaef6..41107e81f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.1.4-3) UNRELEASED; urgency=medium + + * Adjust for migration to git: + - Update .gitignore files + + -- Ben Hutchings Tue, 11 Aug 2015 18:56:56 +0200 + linux-tools (4.1.4-2) unstable; urgency=medium * [mips*,alpha,hppa] linux-perf: Add empty Build files for these architectures diff --git a/debian/patches/gitignore.patch b/debian/patches/gitignore.patch new file mode 100644 index 000000000..b4d0048e5 --- /dev/null +++ b/debian/patches/gitignore.patch @@ -0,0 +1,14 @@ +From: Ben Hutchings Date: Tue, 11 Aug 2015 19:07:49 +0200 Subject: [PATCH 381/487] Explicitly ignore some files that svn ignores by default --- debian/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/.gitignore b/debian/.gitignore index 4ad73d6a8..e94573978 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -3,6 +3,9 @@ !*.diff /*.debhelper /*.debhelper.log +*.pyc +*~ +.#* /*.substvars /control /control.md5sum From 14e7abc03fc87ea3b72a1e5ba45f76a02a39adc0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 11 Aug 2015 19:08:46 +0200 Subject: [PATCH 382/487] Update Vcs-* fields to point to git --- debian/changelog | 1 + debian/templates/control.source.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 41107e81f..ebd05b67a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (4.1.4-3) UNRELEASED; urgency=medium * Adjust for migration to git: - Update .gitignore files + - debian/control: Update Vcs-* fields -- Ben Hutchings Tue, 11 Aug 2015 18:56:56 +0200 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index c996f1a96..74af0c32e 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -9,5 +9,5 @@ Build-Depends: asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, dh-systemd -Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ -Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/ +Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git +Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git From 1e84c2a729c4b34c925c285de1277950a6accd2f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 11 Aug 2015 19:09:44 +0200 Subject: [PATCH 383/487] debian/rules: Exclude .git from maintainerclean rule --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ebd05b67a..1cd5669e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-tools (4.1.4-3) UNRELEASED; urgency=medium * Adjust for migration to git: - Update .gitignore files - debian/control: Update Vcs-* fields + - debian/rules: Exclude .git from maintainerclean rule -- Ben Hutchings Tue, 11 Aug 2015 18:56:56 +0200 diff --git a/debian/rules b/debian/rules index f5476e14b..e87348846 100755 --- a/debian/rules +++ b/debian/rules @@ -36,7 +36,7 @@ endif maintainerclean: rm -f debian/control debian/control.md5sum debian/rules.gen - rm -rf $(filter-out debian .svk .svn, $(wildcard * .[^.]*)) + rm -rf $(filter-out debian .svk .svn .git, $(wildcard * .[^.]*)) clean: debian/control dh_testdir From 094026e778e9c3a40c36f624e8545a4d9127d6c3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 13 Aug 2015 21:34:08 +0200 Subject: [PATCH 384/487] Build userland headers and add them to the front of the system include path This fixes a build failure in tools/hv when the installed linux-libc-dev is too old. --- debian/bin/genorig.py | 2 ++ debian/build/Makefile | 10 ++++++++++ debian/build/Makefile.inc | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index a41c5c504..bbb5285b5 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -142,8 +142,10 @@ class Main(object): 'Makefile', 'arch/*/include/', 'arch/*/Makefile', + 'arch/x86/syscalls/', 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', + 'arch/x86/tools/', 'include/', 'lib/hweight.c', 'lib/rbtree.c', diff --git a/debian/build/Makefile b/debian/build/Makefile index 970d4e4c7..329e47ed2 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -9,3 +9,13 @@ SUBDIRS = \ OUTDIR = . include Makefile.inc + +# Build userland headers first +unexport VERSION +all-local: + $(MAKE) -C $(top_srcdir) O=$(CURDIR)/out \ + INSTALL_HDR_PATH=$(CURDIR) headers_install +all-recursive: all-local + +clean-local:: + rm -rf generated include out diff --git a/debian/build/Makefile.inc b/debian/build/Makefile.inc index 22966b838..414246f47 100644 --- a/debian/build/Makefile.inc +++ b/debian/build/Makefile.inc @@ -7,7 +7,8 @@ SHELL = /bin/sh -e CC = gcc CXX = g++ CFLAGS ?= -O2 -Wall -CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) +CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) \ + -isystem $(top_srcdir)/debian/build/include CXXFLAGS = $(CFLAGS) all: all-local all-recursive From 1561e3da38398ca98887eb5f6f70e12368b0c4f3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 13 Aug 2015 20:52:14 +0200 Subject: [PATCH 385/487] Update to 4.2-rc6 Refresh perf patches. Add a newly needed type to scripts/mod/types.h. --- debian/bin/genorig.py | 2 +- debian/build/scripts/mod/types.h | 3 +++ debian/changelog | 5 ++++- debian/patches/tools-perf-install.patch | 8 +++++--- debian/patches/tools-perf-version.patch | 14 +++++++------- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index bbb5285b5..76a3b53d9 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -142,7 +142,7 @@ class Main(object): 'Makefile', 'arch/*/include/', 'arch/*/Makefile', - 'arch/x86/syscalls/', + 'arch/x86/entry/syscalls/', 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', 'arch/x86/tools/', diff --git a/debian/build/scripts/mod/types.h b/debian/build/scripts/mod/types.h index f61caf5d0..aba3827f4 100644 --- a/debian/build/scripts/mod/types.h +++ b/debian/build/scripts/mod/types.h @@ -3,4 +3,7 @@ typedef unsigned char __u8; typedef unsigned short __u16; typedef unsigned int __u32; typedef unsigned long long __u64; +typedef struct { + __u8 b[16]; +} uuid_le; #define offsetof(a,b) __builtin_offsetof(a,b) diff --git a/debian/changelog b/debian/changelog index 1cd5669e6..72b2d00cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -linux-tools (4.1.4-3) UNRELEASED; urgency=medium +linux-tools (4.2~rc6-1~exp1) UNRELEASED; urgency=medium + * New upstream release candidate + + [ Ben Hutchings ] * Adjust for migration to git: - Update .gitignore files - debian/control: Update Vcs-* fields diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 03b2694f7..268aee08f 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -7,7 +7,7 @@ Forwarded: no --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -484,8 +484,8 @@ endif +@@ -510,8 +510,8 @@ endif ifndef NO_LIBPERL $(call QUIET_INSTALL, perl-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ @@ -18,7 +18,7 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif -@@ -493,18 +493,18 @@ ifndef NO_LIBPYTHON +@@ -519,20 +519,20 @@ ifndef NO_LIBPYTHON $(call QUIET_INSTALL, python-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ @@ -32,6 +32,8 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ - $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + + install-tests: all install-gtk $(call QUIET_INSTALL, tests) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ - $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ @@ -40,5 +42,5 @@ Forwarded: no - $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' - install: install-bin try-install-man install-traceevent-plugins + install-bin: install-tools install-tests diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 5ea2f4885..153633f87 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,8 +9,8 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -465,18 +465,18 @@ install-gtk: - install-bin: all install-gtk +@@ -491,18 +491,18 @@ install-gtk: + install-tools: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ - $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -34,16 +34,16 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, perf-archive) \ $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-with-kcore) \ -@@ -499,7 +499,7 @@ ifndef NO_LIBPYTHON +@@ -525,7 +525,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ - $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + + install-tests: all install-gtk $(call QUIET_INSTALL, tests) \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ - $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ -@@ -513,7 +513,7 @@ install-python_ext: +@@ -543,7 +543,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -79,7 +79,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/util/Build +++ b/tools/perf/util/Build -@@ -127,6 +127,7 @@ CFLAGS_find_next_bit.o += -Wno-unused-pa +@@ -130,6 +130,7 @@ CFLAGS_find_next_bit.o += -Wno-unused-pa CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_parse-events.o += -Wno-redundant-decls From 9083cdad756db8ea298c170f65f9f435d238b121 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 13 Aug 2015 19:57:47 +0200 Subject: [PATCH 386/487] genorig.py: Include kernel/locking in orig so we can build liblockdep --- debian/bin/genorig.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 76a3b53d9..c1e8b70d1 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -138,6 +138,7 @@ class Main(object): to_copy = ( 'COPYING', + 'Documentation/locking/lockdep-design.txt', 'Kbuild', 'Makefile', 'arch/*/include/', @@ -147,6 +148,7 @@ class Main(object): 'arch/x86/lib/memset_64.S', 'arch/x86/tools/', 'include/', + 'kernel/locking/', 'lib/hweight.c', 'lib/rbtree.c', 'scripts/', From 042546e3a12601034b99d0f4c52565989e03a0e1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 13 Aug 2015 20:48:12 +0200 Subject: [PATCH 387/487] Add liblockdep packages liblockdep is in fairly bad shape - one patch needed to make it build at all, another to make it build in a separate directory successfully, and a third to fix the soname. And the install rule doesn't install its public headers. But maybe it will be useful. --- debian/build/tools/Makefile | 1 + debian/build/tools/lib/lockdep/Makefile | 26 +++++++++ debian/build/tools/lib/lockdep/lockdep.in | 2 + debian/liblockdep-dev.docs | 1 + debian/liblockdep-dev.install | 3 ++ debian/lockdep.install | 1 + debian/patches/lockdep-fix-headers.patch | 62 ++++++++++++++++++++++ debian/patches/lockdep-fix-oot-build.patch | 33 ++++++++++++ debian/patches/lockdep-fix-soname.patch | 11 ++++ debian/patches/series | 3 ++ debian/rules.real | 26 ++++++++- debian/templates/control.main.in | 25 +++++++++ 12 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 debian/build/tools/lib/lockdep/Makefile create mode 100644 debian/build/tools/lib/lockdep/lockdep.in create mode 100644 debian/liblockdep-dev.docs create mode 100644 debian/liblockdep-dev.install create mode 100644 debian/lockdep.install create mode 100644 debian/patches/lockdep-fix-headers.patch create mode 100644 debian/patches/lockdep-fix-oot-build.patch create mode 100644 debian/patches/lockdep-fix-soname.patch diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile index 06bc26609..a3cdd8728 100644 --- a/debian/build/tools/Makefile +++ b/debian/build/tools/Makefile @@ -1,5 +1,6 @@ SUBDIRS = \ hv \ + lib/lockdep \ perf \ usb/usbip diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile new file mode 100644 index 000000000..7c8408ffc --- /dev/null +++ b/debian/build/tools/lib/lockdep/Makefile @@ -0,0 +1,26 @@ +srcdir := $(top_srcdir)/tools/lib/lockdep + +DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +MAKE_LOCKDEP := $(MAKE) -C $(srcdir) O=$(CURDIR)/out V=1 \ + prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \ + LIBLOCKDEP_VERSION=$(VERSION) + +unexport CFLAGS + +all: + mkdir -p out + $(MAKE_LOCKDEP) + +install: + $(MAKE_LOCKDEP) install + mkdir -p $(DESTDIR)/usr/include + cp -R $(srcdir)/include/liblockdep $(DESTDIR)/usr/include/ + ln -s liblockdep.so.$(VERSION) \ + $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so +# Upstream lockdep preload script is not suitable for installation + sed 's/@VERSION@/$(VERSION)/' lockdep.in > $(DESTDIR)/usr/bin/lockdep + chmod 755 $(DESTDIR)/usr/bin/lockdep + +clean: + rm -rf out diff --git a/debian/build/tools/lib/lockdep/lockdep.in b/debian/build/tools/lib/lockdep/lockdep.in new file mode 100644 index 000000000..4a0d03ac5 --- /dev/null +++ b/debian/build/tools/lib/lockdep/lockdep.in @@ -0,0 +1,2 @@ +#!/bin/sh +LD_PRELOAD="liblockdep.so.@VERSION@ $LD_PRELOAD" exec "$@" diff --git a/debian/liblockdep-dev.docs b/debian/liblockdep-dev.docs new file mode 100644 index 000000000..15b2bbe12 --- /dev/null +++ b/debian/liblockdep-dev.docs @@ -0,0 +1 @@ +Documentation/locking/lockdep-design.txt diff --git a/debian/liblockdep-dev.install b/debian/liblockdep-dev.install new file mode 100644 index 000000000..bd857244b --- /dev/null +++ b/debian/liblockdep-dev.install @@ -0,0 +1,3 @@ +usr/include/liblockdep +usr/lib/*/liblockdep.a +usr/lib/*/liblockdep.so diff --git a/debian/lockdep.install b/debian/lockdep.install new file mode 100644 index 000000000..236942003 --- /dev/null +++ b/debian/lockdep.install @@ -0,0 +1 @@ +usr/bin/lockdep diff --git a/debian/patches/lockdep-fix-headers.patch b/debian/patches/lockdep-fix-headers.patch new file mode 100644 index 000000000..c0e3ced12 --- /dev/null +++ b/debian/patches/lockdep-fix-headers.patch @@ -0,0 +1,62 @@ +--- /dev/null ++++ b/tools/lib/lockdep/uinclude/linux/export.h +@@ -0,0 +1,10 @@ ++#ifndef _LINUX_EXPORT_H ++#define _LINUX_EXPORT_H ++ ++#define EXPORT_SYMBOL(sym) ++#define EXPORT_SYMBOL_GPL(sym) ++#define EXPORT_SYMBOL_GPL_FUTURE(sym) ++#define EXPORT_UNUSED_SYMBOL(sym) ++#define EXPORT_UNUSED_SYMBOL_GPL(sym) ++ ++#endif /* _LINUX_EXPORT_H */ +--- a/tools/lib/lockdep/uinclude/linux/kernel.h ++++ b/tools/lib/lockdep/uinclude/linux/kernel.h +@@ -23,7 +23,7 @@ + #define WARN_ON(x) (x) + #define WARN_ON_ONCE(x) (x) + #define likely(x) (x) +-#define WARN(x, y, z) (x) ++#define WARN(x, y...) (x) + #define uninitialized_var(x) x + #define __init + #define noinline +--- a/tools/lib/lockdep/preload.c ++++ b/tools/lib/lockdep/preload.c +@@ -5,7 +5,7 @@ + #include + #include + #include "include/liblockdep/mutex.h" +-#include "../../../include/linux/rbtree.h" ++#include + + /** + * struct lock_lookup - liblockdep's view of a single unique lock +--- a/tools/lib/lockdep/uinclude/linux/rbtree.h ++++ b/tools/lib/lockdep/uinclude/linux/rbtree.h +@@ -1 +1 @@ +-#include "../../../include/linux/rbtree.h" ++#include "../../include/linux/rbtree.h" +--- a/tools/lib/lockdep/uinclude/linux/compiler.h ++++ b/tools/lib/lockdep/uinclude/linux/compiler.h +@@ -4,4 +4,10 @@ + #define __used __attribute__((__unused__)) + #define unlikely + ++#define __ACCESS_ONCE(x) ({ \ ++ __attribute__((__unused__)) typeof(x) __var = (__force typeof(x)) 0; \ ++ (volatile typeof(x) *)&(x); }) ++#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x)) ++#define WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) ++ + #endif +--- a/tools/lib/lockdep/uinclude/linux/rcu.h ++++ b/tools/lib/lockdep/uinclude/linux/rcu.h +@@ -18,4 +18,6 @@ static inline bool rcu_is_watching(void) + return false; + } + ++#define RCU_INIT_POINTER(p, v) (p = v) ++ + #endif diff --git a/debian/patches/lockdep-fix-oot-build.patch b/debian/patches/lockdep-fix-oot-build.patch new file mode 100644 index 000000000..20117433a --- /dev/null +++ b/debian/patches/lockdep-fix-oot-build.patch @@ -0,0 +1,33 @@ +--- a/tools/lib/lockdep/Makefile ++++ b/tools/lib/lockdep/Makefile +@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef + + do_compile_shared_library = \ + ($(print_shared_lib_compile) \ +- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$@"';$(shell ln -s $@ liblockdep.so)) ++ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)/liblockdep.so)) + + do_build_static_lib = \ + ($(print_static_lib_build) \ +@@ -116,10 +116,10 @@ all_cmd: $(CMD_TARGETS) + $(LIB_IN): force + $(Q)$(MAKE) $(build)=liblockdep + +-liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN) ++$(OUTPUT)liblockdep.so.$(LIBLOCKDEP_VERSION): $(LIB_IN) + $(Q)$(do_compile_shared_library) + +-liblockdep.a: $(LIB_IN) ++$(OUTPUT)liblockdep.a: $(LIB_IN) + $(Q)$(do_build_static_lib) + + tags: force +@@ -147,7 +147,7 @@ install_lib: all_cmd + install: install_lib + + clean: +- $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d ++ $(RM) $(OUTPUT)*.o *~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*liblockdep*.so* $(VERSION_FILES) $(OUTPUT).*.d + $(RM) tags TAGS + + PHONY += force diff --git a/debian/patches/lockdep-fix-soname.patch b/debian/patches/lockdep-fix-soname.patch new file mode 100644 index 000000000..dab83d6d1 --- /dev/null +++ b/debian/patches/lockdep-fix-soname.patch @@ -0,0 +1,11 @@ +--- a/tools/lib/lockdep/Makefile ++++ b/tools/lib/lockdep/Makefile +@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef + + do_compile_shared_library = \ + ($(print_shared_lib_compile) \ +- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)liblockdep.so)) ++ $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so)) + + do_build_static_lib = \ + ($(print_static_lib_build) \ diff --git a/debian/patches/series b/debian/patches/series index d2cc300b9..e1943ce42 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,6 @@ kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch tools-perf-man-date.patch tools-perf-add-empty-build-files-for-architectures-lacking.patch +lockdep-fix-oot-build.patch +lockdep-fix-headers.patch +lockdep-fix-soname.patch diff --git a/debian/rules.real b/debian/rules.real index 3f2669fb1..feaafa62f 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,7 +3,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs -binary-arch: install-kbuild install-usbip +binary-arch: install-kbuild install-usbip install-lockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif @@ -103,3 +103,27 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_gencontrol dh_md5sums dh_builddeb + +install-lockdep: DH_OPTIONS = -plockdep -pliblockdep$(VERSION) -pliblockdep-dev +install-lockdep: DIR = $(CURDIR)/debian/tmp +install-lockdep: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_prep + $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ + DESTDIR=$(DIR) + env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) \ + 'usr/lib/*/liblockdep.so.*' + dh_install + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + env -u DH_OPTIONS dh_makeshlibs -pliblockdep$(VERSION) \ + liblockdep$(VERSION) + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index e76b88637..cb88ca5d3 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -70,3 +70,28 @@ Description: Support daemons for Linux running on Hyper-V . hv_vss_daemon provides the volume shadow copy service (VSS), allowing the host to freeze the guest filesystems while taking a snapshot. + +Package: lockdep +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ +Recommends: liblockdep-dev +Section: devel +Multi-Arch: allowed +Description: Runtime locking correctness validator + TBD + +Package: liblockdep@version@ +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: libs +Multi-Arch: same +Description: Runtime locking correctness validator - shared library + TBD + +Package: liblockdep-dev +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: libdevel +Multi-Arch: same +Description: Runtime locking correctness validator - development files + TBD From 738c38f0f47b0fe18bc2901ac97fc59b633a1b45 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 00:35:15 +0200 Subject: [PATCH 388/487] Add .gitignore files to debian/build --- debian/build/.gitignore | 3 +++ debian/build/scripts/.gitignore | 7 +++++++ debian/build/scripts/basic/.gitignore | 2 ++ debian/build/scripts/genksyms/.gitignore | 1 + debian/build/scripts/kconfig/.gitignore | 1 + debian/build/scripts/mod/.gitignore | 4 ++++ debian/build/tools/hv/.gitignore | 1 + 7 files changed, 19 insertions(+) create mode 100644 debian/build/.gitignore create mode 100644 debian/build/scripts/.gitignore create mode 100644 debian/build/scripts/basic/.gitignore create mode 100644 debian/build/scripts/genksyms/.gitignore create mode 100644 debian/build/scripts/kconfig/.gitignore create mode 100644 debian/build/scripts/mod/.gitignore create mode 100644 debian/build/tools/hv/.gitignore diff --git a/debian/build/.gitignore b/debian/build/.gitignore new file mode 100644 index 000000000..81804986a --- /dev/null +++ b/debian/build/.gitignore @@ -0,0 +1,3 @@ +*.o +/include/ +out/ diff --git a/debian/build/scripts/.gitignore b/debian/build/scripts/.gitignore new file mode 100644 index 000000000..663e60761 --- /dev/null +++ b/debian/build/scripts/.gitignore @@ -0,0 +1,7 @@ +*.hash.c +*.lex.c +*.tab.[ch] +/conmakehash +/kallsyms +/pnmtologo +/recordmcount diff --git a/debian/build/scripts/basic/.gitignore b/debian/build/scripts/basic/.gitignore new file mode 100644 index 000000000..e717ebbc0 --- /dev/null +++ b/debian/build/scripts/basic/.gitignore @@ -0,0 +1,2 @@ +/bin2c +/fixdep diff --git a/debian/build/scripts/genksyms/.gitignore b/debian/build/scripts/genksyms/.gitignore new file mode 100644 index 000000000..34a2a0520 --- /dev/null +++ b/debian/build/scripts/genksyms/.gitignore @@ -0,0 +1 @@ +/genksyms diff --git a/debian/build/scripts/kconfig/.gitignore b/debian/build/scripts/kconfig/.gitignore new file mode 100644 index 000000000..c9a5c234a --- /dev/null +++ b/debian/build/scripts/kconfig/.gitignore @@ -0,0 +1 @@ +/conf diff --git a/debian/build/scripts/mod/.gitignore b/debian/build/scripts/mod/.gitignore new file mode 100644 index 000000000..c0602d204 --- /dev/null +++ b/debian/build/scripts/mod/.gitignore @@ -0,0 +1,4 @@ +/modpost +/modpost.h +/modpost.real-* +devicetable-offsets.[hs] diff --git a/debian/build/tools/hv/.gitignore b/debian/build/tools/hv/.gitignore new file mode 100644 index 000000000..b6961eb1b --- /dev/null +++ b/debian/build/tools/hv/.gitignore @@ -0,0 +1 @@ +/hv_*_daemon From a0804637edfbb63340d8d59b0329f32d642c55bc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:25:33 +0200 Subject: [PATCH 389/487] Improve liblockdep documentation a little Add long descriptions for all liblockdep packages, and a README.Debian for liblockdep-dev which links to some articles about it. --- debian/liblockdep-dev.README.Debian | 13 +++++++++++++ debian/templates/control.main.in | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 debian/liblockdep-dev.README.Debian diff --git a/debian/liblockdep-dev.README.Debian b/debian/liblockdep-dev.README.Debian new file mode 100644 index 000000000..a0673a170 --- /dev/null +++ b/debian/liblockdep-dev.README.Debian @@ -0,0 +1,13 @@ +liblockdep for Debian +--------------------- + +liblockdep does not have proper documentation, but these articles +provide an introduction: + + https://lwn.net/Articles/536363/ + http://www.vctlabs.com/posts/2014/Jul/09/liblockdep/ + +'lockdep-design.txt' explains some more detail about what lockdep +does, both in the kernel and as liblockdep. + + -- Ben Hutchings , Fri, 14 Aug 2015 14:22:55 +0200 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index cb88ca5d3..a1fa00fbd 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -78,7 +78,8 @@ Recommends: liblockdep-dev Section: devel Multi-Arch: allowed Description: Runtime locking correctness validator - TBD + lockdep is a wrapper for programs that use the pthreads API, which detects + actual and potential deadlocks and other locking bugs. Package: liblockdep@version@ Architecture: linux-any @@ -86,7 +87,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs Multi-Arch: same Description: Runtime locking correctness validator - shared library - TBD + liblockdep is a library for programs that use the pthreads API, which can + be used to detect actual and potential deadlocks and other locking bugs. Package: liblockdep-dev Architecture: linux-any @@ -94,4 +96,5 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Section: libdevel Multi-Arch: same Description: Runtime locking correctness validator - development files - TBD + liblockdep is a library for programs that use the pthreads API, which can + be used to detect actual and potential deadlocks and other locking bugs. From f9ff7ea6b2e3600ac9d63bd11a36335041db5b86 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:30:34 +0200 Subject: [PATCH 390/487] Refresh lockdep-fix-soname.patch to apply on top of lockdep-fix-oot-build.patch --- debian/patches/lockdep-fix-soname.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/lockdep-fix-soname.patch b/debian/patches/lockdep-fix-soname.patch index dab83d6d1..0eea891b7 100644 --- a/debian/patches/lockdep-fix-soname.patch +++ b/debian/patches/lockdep-fix-soname.patch @@ -4,7 +4,7 @@ do_compile_shared_library = \ ($(print_shared_lib_compile) \ -- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)liblockdep.so)) +- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$(@F)"';$(shell ln -s $(@F) $(@D)/liblockdep.so)) + $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so)) do_build_static_lib = \ From de56a162e478fec55010ddfe1e276f8a80629e13 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:34:43 +0200 Subject: [PATCH 391/487] Add headers to liblockdep patches --- debian/patches/lockdep-fix-headers.patch | 6 ++++++ debian/patches/lockdep-fix-oot-build.patch | 6 ++++++ debian/patches/lockdep-fix-soname.patch | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/debian/patches/lockdep-fix-headers.patch b/debian/patches/lockdep-fix-headers.patch index c0e3ced12..95f16161f 100644 --- a/debian/patches/lockdep-fix-headers.patch +++ b/debian/patches/lockdep-fix-headers.patch @@ -1,3 +1,9 @@ +From: Ben Hutchings +Date: Thu, 13 Aug 2015 20:48:12 +0200 +Subject: liblockdep: Add more headers and definitions needed by lockdep + +Signed-off-by: Ben Hutchings +--- --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/export.h @@ -0,0 +1,10 @@ diff --git a/debian/patches/lockdep-fix-oot-build.patch b/debian/patches/lockdep-fix-oot-build.patch index 20117433a..03bc43298 100644 --- a/debian/patches/lockdep-fix-oot-build.patch +++ b/debian/patches/lockdep-fix-oot-build.patch @@ -1,3 +1,9 @@ +From: Ben Hutchings +Date: Thu, 13 Aug 2015 20:48:12 +0200 +Subject: liblockdep: Fix object file paths used in an out-of-tree build + +Signed-off-by: Ben Hutchings +--- --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile @@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef diff --git a/debian/patches/lockdep-fix-soname.patch b/debian/patches/lockdep-fix-soname.patch index 0eea891b7..a3ac90be9 100644 --- a/debian/patches/lockdep-fix-soname.patch +++ b/debian/patches/lockdep-fix-soname.patch @@ -1,3 +1,9 @@ +From: Ben Hutchings +Date: Thu, 13 Aug 2015 20:48:12 +0200 +Subject: liblockdep: Remove double-quotes from soname + +Signed-off-by: Ben Hutchings +--- --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile @@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef From aed0e372616955df9c051d35a50aa439cb96d5af Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:39:23 +0200 Subject: [PATCH 392/487] Add liblockdep package build directories to .gitignore --- debian/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/.gitignore b/debian/.gitignore index e94573978..c5589b51b 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -11,9 +11,11 @@ /control.md5sum /files /hyperv-daemons/ +/liblockdep*/ /libusbip-dev/ /linux-kbuild-* /linux-perf-* +/lockdep/ /rules.gen /stamps/ /tmp/ From 0c37eee43787f8f711460838271e57eb6a7768a8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:47:02 +0200 Subject: [PATCH 393/487] Note liblockdep packages in changelog --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 72b2d00cd..c2a0fdee7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (4.2~rc6-1~exp1) UNRELEASED; urgency=medium - Update .gitignore files - debian/control: Update Vcs-* fields - debian/rules: Exclude .git from maintainerclean rule + * Add packages of liblockdep (lockdep, liblockdep, liblockdep-dev) -- Ben Hutchings Tue, 11 Aug 2015 18:56:56 +0200 From bf2ec125301428e88f7fb80eb70b859d57505b4c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:58:37 +0200 Subject: [PATCH 394/487] Change liblockdep short descriptions to be consistent with libusbip --- debian/templates/control.main.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index a1fa00fbd..75ff67258 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -86,7 +86,7 @@ Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs Multi-Arch: same -Description: Runtime locking correctness validator - shared library +Description: Runtime locking correctness validator (shared library) liblockdep is a library for programs that use the pthreads API, which can be used to detect actual and potential deadlocks and other locking bugs. @@ -95,6 +95,6 @@ Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Section: libdevel Multi-Arch: same -Description: Runtime locking correctness validator - development files +Description: Runtime locking correctness validator (development files) liblockdep is a library for programs that use the pthreads API, which can be used to detect actual and potential deadlocks and other locking bugs. From 61919e8c53c0768c0b819bfa8c28ddc12e92d468 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 14 Aug 2015 14:59:04 +0200 Subject: [PATCH 395/487] Prepare to release linux-tools (4.2~rc6-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c2a0fdee7..1fae1e587 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.2~rc6-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.2~rc6-1~exp1) experimental; urgency=medium * New upstream release candidate @@ -9,7 +9,7 @@ linux-tools (4.2~rc6-1~exp1) UNRELEASED; urgency=medium - debian/rules: Exclude .git from maintainerclean rule * Add packages of liblockdep (lockdep, liblockdep, liblockdep-dev) - -- Ben Hutchings Tue, 11 Aug 2015 18:56:56 +0200 + -- Ben Hutchings Fri, 14 Aug 2015 14:58:57 +0200 linux-tools (4.1.4-2) unstable; urgency=medium From 896fca1190f1fcdc33a38a89c928c7d9a1a03fa5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 16 Aug 2015 01:58:19 +0200 Subject: [PATCH 396/487] genorig: Include more mips makefiles (fixes FTBFS) --- debian/bin/genorig.py | 2 ++ debian/changelog | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index c1e8b70d1..6c4e87628 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -143,6 +143,8 @@ class Main(object): 'Makefile', 'arch/*/include/', 'arch/*/Makefile', + 'arch/mips/Kbuild.platforms', + 'arch/mips/*/Platform', 'arch/x86/entry/syscalls/', 'arch/x86/lib/memcpy_64.S', 'arch/x86/lib/memset_64.S', diff --git a/debian/changelog b/debian/changelog index 1fae1e587..efb039adc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.2~rc6-1~exp2) UNRELEASED; urgency=medium + + * genorig: Include more mips makefiles (fixes FTBFS) + + -- Ben Hutchings Sun, 16 Aug 2015 01:58:11 +0200 + linux-tools (4.2~rc6-1~exp1) experimental; urgency=medium * New upstream release candidate From 5f25972323d7a388fbd200effe88c869412bd97d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 17 Aug 2015 10:41:47 +0200 Subject: [PATCH 397/487] Update to 4.2-rc7 --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index efb039adc..c4aef035a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -linux-tools (4.2~rc6-1~exp2) UNRELEASED; urgency=medium +linux-tools (4.2~rc7-1~exp1) UNRELEASED; urgency=medium + * New upstream release candidate + + [ Ben Hutchings ] * genorig: Include more mips makefiles (fixes FTBFS) -- Ben Hutchings Sun, 16 Aug 2015 01:58:11 +0200 From 290754d10842e84180dec351d2a91ac5e28975b2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 17 Aug 2015 10:42:20 +0200 Subject: [PATCH 398/487] Prepare to release linux-tools (4.2~rc7-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index c4aef035a..ea3071ccd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -linux-tools (4.2~rc7-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.2~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate [ Ben Hutchings ] * genorig: Include more mips makefiles (fixes FTBFS) - -- Ben Hutchings Sun, 16 Aug 2015 01:58:11 +0200 + -- Ben Hutchings Mon, 17 Aug 2015 10:42:08 +0200 linux-tools (4.2~rc6-1~exp1) experimental; urgency=medium From ad62cfffb2f8a7404b346bc07a4329edf584f399 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 18:47:27 +0100 Subject: [PATCH 399/487] Update to 4.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ea3071ccd..184c1816a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.2-1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 + linux-tools (4.2~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate From 277d4945c78ae2474b2b1967d43d6ba79107dda0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 19:26:03 +0100 Subject: [PATCH 400/487] debian/bin,debian/control,debian/lib/python,debian/rules: Use Python 3 debian/lib/python: Sync with linux package --- debian/bin/gencontrol.py | 4 +- debian/bin/genorig.py | 4 +- debian/changelog | 4 + debian/lib/python/debian_linux/config.py | 36 ++++-- debian/lib/python/debian_linux/debian.py | 109 ++++++++++--------- debian/lib/python/debian_linux/gencontrol.py | 32 +++--- debian/lib/python/debian_linux/utils.py | 19 ++-- debian/rules | 2 +- debian/templates/control.source.in | 2 +- 9 files changed, 116 insertions(+), 96 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index d67f7d560..a26d0ee71 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys sys.path.append("debian/lib/python") @@ -21,7 +21,7 @@ class gencontrol(Gencontrol): self.do_source(packages) self.do_main(packages, makefile) - self.write_control(packages.itervalues()) + self.write_control(packages.values()) self.write_makefile(makefile) def do_source(self, packages): diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 6c4e87628..b072e22fd 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys sys.path.append("debian/lib/python") @@ -186,7 +186,7 @@ class Main(object): try: if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): raise RuntimeError("Can't patch source") - os.chmod(out, 0644) + os.chmod(out, 0o644) except: try: os.unlink(out) diff --git a/debian/changelog b/debian/changelog index 184c1816a..885324d25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,10 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * New upstream release + [ Ben Hutchings ] + * debian/bin,debian/control,debian/lib/python,debian/rules: Use Python 3 + - debian/lib/python: Sync with linux package + -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 linux-tools (4.2~rc7-1~exp1) experimental; urgency=medium diff --git a/debian/lib/python/debian_linux/config.py b/debian/lib/python/debian_linux/config.py index 17211dddc..79ef425f9 100644 --- a/debian/lib/python/debian_linux/config.py +++ b/debian/lib/python/debian_linux/config.py @@ -1,9 +1,14 @@ import os import os.path +import pickle import re import sys import textwrap -import cPickle + +try: + from configparser import RawConfigParser +except ImportError: + from ConfigParser import RawConfigParser __all__ = [ 'ConfigCoreDump', @@ -22,6 +27,14 @@ class SchemaItemBoolean(object): raise Error +class SchemaItemInteger(object): + def __call__(self, i): + try: + return int(i.strip(), 0) + except ValueError: + raise Error + + class SchemaItemList(object): def __init__(self, type="\s+"): self.type = type @@ -78,12 +91,12 @@ class ConfigCore(dict): return ret def dump(self, fp): - cPickle.dump(self, fp, 0) + pickle.dump(self, fp, 0) class ConfigCoreDump(object): def __new__(self, fp): - return cPickle.load(fp) + return pickle.load(fp) class ConfigCoreHierarchy(object): @@ -98,7 +111,7 @@ class ConfigCoreHierarchy(object): def __new__(cls, schema, dirs=[]): schema_complete = cls.schema_base.copy() - for key, value in schema.iteritems(): + for key, value in schema.items(): schema_complete.setdefault(key, {}).update(value) return cls.Reader(dirs, schema_complete)() @@ -195,7 +208,6 @@ class ConfigParser(object): def __init__(self, schemas): self.schemas = schemas - from ConfigParser import RawConfigParser self._config = config = RawConfigParser() def __getitem__(self, key): @@ -225,7 +237,7 @@ class ConfigParser(object): def _convert_one(self, schema, data): ret = {} - for key, value in data.iteritems(): + for key, value in data.items(): if key in schema: value = schema[key](value) ret[key] = value @@ -241,9 +253,9 @@ class ConfigParser(object): if __name__ == '__main__': import sys sys.path.append('debian/lib/python') - config = ConfigCoreDump(open('debian/config.defines.dump')) - for section, items in sorted(config.iteritems()): - print u"[%s]" % (section,) - for item, value in sorted(items.iteritems()): - print u"%s: %s" % (item, value) - print + config = ConfigCoreDump(open('debian/config.defines.dump', 'rb')) + for section, items in sorted(config.items(), key=lambda a:tuple(i or '' for i in a[0])): + print(u"[%s]" % (section,)) + for item, value in sorted(items.items()): + print(u"%s: %s" % (item, value)) + print() diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index a57752658..00db2c316 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -1,5 +1,4 @@ import collections -import itertools import os.path import re @@ -35,7 +34,7 @@ class Changelog(list): def __init__(self, dir='', version=None): if version is None: version = Version - f = file(os.path.join(dir, "debian/changelog")) + f = open(os.path.join(dir, "debian/changelog"), encoding="UTF-8") while True: line = f.readline() if not line: @@ -53,7 +52,7 @@ class Changelog(list): class Version(object): - _version_rules = ur""" + _version_rules = r""" ^ (?: (?P @@ -82,7 +81,7 @@ $ self.upstream = match.group("upstream") self.revision = match.group("revision") - def __unicode__(self): + def __str__(self): return self.complete @property @@ -105,14 +104,15 @@ $ class VersionLinux(Version): - _version_linux_rules = ur""" + _version_linux_rules = r""" ^ (?P \d+\.\d+ ) (?P - \.\d+ -)? + (?:\.\d+)? + (?:-[a-z]+\d+)? +) (?: ~ (?P @@ -130,13 +130,20 @@ class VersionLinux(Version): (\.\d+)? (?: (?P - ~experimental\.\d+ + ~exp\d+ ) | + (?P + [~+]deb\d+u\d+ + )? + (?P + ~bpo\d+\+\d+ + )? + | (?P [^-]+ ) -)? +) $ """ _version_linux_re = re.compile(_version_linux_rules, re.X) @@ -151,12 +158,14 @@ $ self.linux_version = d['version'] if d['modifier'] is not None: assert not d['update'] - self.linux_upstream = u'-'.join((d['version'], d['modifier'])) + self.linux_upstream = '-'.join((d['version'], d['modifier'])) else: self.linux_upstream = d['version'] - self.linux_upstream_full = self.linux_upstream + (d['update'] or u'') + self.linux_upstream_full = self.linux_upstream + d['update'] self.linux_dfsg = d['dfsg'] self.linux_revision_experimental = match.group('revision_experimental') and True + self.linux_revision_security = match.group('revision_security') and True + self.linux_revision_backports = match.group('revision_backports') and True self.linux_revision_other = match.group('revision_other') and True @@ -177,8 +186,8 @@ class PackageArchitecture(collections.MutableSet): def __len__(self): return self._data.__len__() - def __unicode__(self): - return u' '.join(sorted(self)) + def __str__(self): + return ' '.join(sorted(self)) def add(self, value): self._data.add(value) @@ -187,7 +196,7 @@ class PackageArchitecture(collections.MutableSet): self._data.discard(value) def extend(self, value): - if isinstance(value, basestring): + if isinstance(value, str): for i in re.split('\s', value.strip()): self.add(i) else: @@ -205,14 +214,14 @@ class PackageDescription(object): self.append(long) self.append_short(short) - def __unicode__(self): + def __str__(self): wrap = utils.TextWrapper(width=74, fix_sentence_endings=True).wrap - short = u', '.join(self.short) + short = ', '.join(self.short) long_pars = [] for i in self.long: long_pars.append(wrap(i)) - long = u'\n .\n '.join([u'\n '.join(i) for i in long_pars]) - return short + u'\n ' + long + long = '\n .\n '.join(['\n '.join(i) for i in long_pars]) + return short + '\n ' + long def append(self, str): str = str.strip() @@ -237,8 +246,8 @@ class PackageRelation(list): if value: self.extend(value, override_arches) - def __unicode__(self): - return u', '.join((unicode(i) for i in self)) + def __str__(self): + return ', '.join(str(i) for i in self) def _search_value(self, value): for i in self: @@ -247,7 +256,7 @@ class PackageRelation(list): return None def append(self, value, override_arches=None): - if isinstance(value, basestring): + if isinstance(value, str): value = PackageRelationGroup(value, override_arches) elif not isinstance(value, PackageRelationGroup): raise ValueError(u"got %s" % type(value)) @@ -258,8 +267,8 @@ class PackageRelation(list): super(PackageRelation, self).append(value) def extend(self, value, override_arches=None): - if isinstance(value, basestring): - value = (j.strip() for j in re.split(u',', value.strip())) + if isinstance(value, str): + value = (j.strip() for j in re.split(',', value.strip())) for i in value: self.append(i, override_arches) @@ -269,31 +278,31 @@ class PackageRelationGroup(list): if value: self.extend(value, override_arches) - def __unicode__(self): - return u' | '.join((unicode(i) for i in self)) + def __str__(self): + return ' | '.join(str(i) for i in self) def _search_value(self, value): - for i, j in itertools.izip(self, value): + for i, j in zip(self, value): if i.name != j.name or i.version != j.version: return None return self def _update_arches(self, value): - for i, j in itertools.izip(self, value): + for i, j in zip(self, value): if i.arches: for arch in j.arches: if arch not in i.arches: i.arches.append(arch) def append(self, value, override_arches=None): - if isinstance(value, basestring): + if isinstance(value, str): value = PackageRelationEntry(value, override_arches) elif not isinstance(value, PackageRelationEntry): raise ValueError super(PackageRelationGroup, self).append(value) def extend(self, value, override_arches=None): - if isinstance(value, basestring): + if isinstance(value, str): value = (j.strip() for j in re.split('\|', value.strip())) for i in value: self.append(i, override_arches) @@ -313,12 +322,12 @@ class PackageRelationEntry(object): OP_GT = 6 operators = { - u'<<': OP_LT, - u'<=': OP_LE, - u'=': OP_EQ, - u'!=': OP_NE, - u'>=': OP_GE, - u'>>': OP_GT, + '<<': OP_LT, + '<=': OP_LE, + '=': OP_EQ, + '!=': OP_NE, + '>=': OP_GE, + '>>': OP_GT, } operators_neg = { @@ -330,7 +339,7 @@ class PackageRelationEntry(object): OP_GT: OP_LE, } - operators_text = dict([(b, a) for a, b in operators.iteritems()]) + operators_text = dict((b, a) for a, b in operators.items()) __slots__ = '_op', @@ -340,11 +349,11 @@ class PackageRelationEntry(object): def __neg__(self): return self.__class__(self.operators_text[self.operators_neg[self._op]]) - def __unicode__(self): + def __str__(self): return self.operators_text[self._op] def __init__(self, value=None, override_arches=None): - if not isinstance(value, basestring): + if not isinstance(value, str): raise ValueError self.parse(value) @@ -352,13 +361,13 @@ class PackageRelationEntry(object): if override_arches: self.arches = list(override_arches) - def __unicode__(self): + def __str__(self): ret = [self.name] if self.operator is not None and self.version is not None: - ret.extend((u' (', unicode(self.operator), u' ', self.version, u')')) + ret.extend((' (', str(self.operator), ' ', self.version, ')')) if self.arches: - ret.extend((u' [', u' '.join(self.arches), u']')) - return u''.join(ret) + ret.extend((' [', ' '.join(self.arches), ']')) + return ''.join(ret) def parse(self, value): match = self._re.match(value) @@ -379,14 +388,14 @@ class PackageRelationEntry(object): class Package(dict): _fields = collections.OrderedDict(( - ('Package', unicode), - ('Source', unicode), + ('Package', str), + ('Source', str), ('Architecture', PackageArchitecture), - ('Section', unicode), - ('Priority', unicode), - ('Maintainer', unicode), - ('Uploaders', unicode), - ('Standards-Version', unicode), + ('Section', str), + ('Priority', str), + ('Maintainer', str), + ('Uploaders', str), + ('Standards-Version', str), ('Build-Depends', PackageRelation), ('Build-Depends-Indep', PackageRelation), ('Provides', PackageRelation), @@ -411,7 +420,7 @@ class Package(dict): def iterkeys(self): keys = set(self.keys()) - for i in self._fields.iterkeys(): + for i in self._fields.keys(): if i in self: keys.remove(i) yield i diff --git a/debian/lib/python/debian_linux/gencontrol.py b/debian/lib/python/debian_linux/gencontrol.py index aac564c42..ec139ff1a 100644 --- a/debian/lib/python/debian_linux/gencontrol.py +++ b/debian/lib/python/debian_linux/gencontrol.py @@ -29,9 +29,7 @@ class Makefile(object): self.rules[i] = self.Rule(i) def write(self, out): - r = self.rules.keys() - r.sort() - for i in r: + for i in sorted(self.rules.keys()): self.rules[i].write(out) class Rule(object): @@ -70,7 +68,7 @@ class MakeFlags(dict): return "%s(%s)" % (self.__class__.__name__, repr) def __str__(self): - return ' '.join(["%s='%s'" % i for i in sorted(self.iteritems())]) + return ' '.join("%s='%s'" % i for i in sorted(self.items())) def copy(self): return self.__class__(super(MakeFlags, self).copy()) @@ -129,25 +127,21 @@ class Gencontrol(object): if templates_extra is None: return - packages.extend(self.process_packages(templates_extra, {})) + packages_extra = self.process_packages(templates_extra, self.vars) + packages.extend(packages_extra) extra_arches = {} - for package in templates_extra: + for package in packages_extra: arches = package['Architecture'] for arch in arches: i = extra_arches.get(arch, []) i.append(package) extra_arches[arch] = i - archs = extra_arches.keys() - archs.sort() - for arch in archs: + for arch in sorted(extra_arches.keys()): cmds = [] for i in extra_arches[arch]: - tmp = [] - if 'X-Version-Overwrite-Epoch' in i: - tmp.append("-v1:%s" % self.version['source']) - cmds.append("$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='-p%s' GENCONTROL_ARGS='%s'" % (i['Package'], ' '.join(tmp))) - makefile.add('binary-arch_%s' % arch['binary-arch_%s_extra' % arch]) - makefile.add("binary-arch_%s_extra" % arch, cmds=cmds) + cmds.append("$(MAKE) -f debian/rules.real install-dummy ARCH='%s' DH_OPTIONS='-p%s'" % (arch, i['Package'])) + makefile.add('binary-arch_%s' % arch, ['binary-arch_%s_extra' % arch]) + makefile.add("binary-arch_%s_extra" % arch, cmds = cmds) def do_arch(self, packages, makefile, arch, vars, makeflags, extra): vars['arch'] = arch @@ -280,10 +274,10 @@ class Gencontrol(object): def subst(match): return vars[match.group(1)] - return re.sub(r'@([-_a-z]+)@', subst, unicode(s)) + return re.sub(r'@([-_a-z0-9]+)@', subst, str(s)) def write(self, packages, makefile): - self.write_control(packages.itervalues()) + self.write_control(packages.values()) self.write_makefile(makefile) def write_config(self): @@ -295,7 +289,7 @@ class Gencontrol(object): self.write_rfc822(codecs.open("debian/control", 'w', 'utf-8'), list) def write_makefile(self, makefile): - f = file("debian/rules.gen", 'w') + f = open("debian/rules.gen", 'w') makefile.write(f) f.close() @@ -303,4 +297,4 @@ class Gencontrol(object): for entry in list: for key, value in entry.iteritems(): f.write(u"%s: %s\n" % (key, value)) - f.write(u'\n') + f.write('\n') diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index 563104ed3..5f34b6ead 100644 --- a/debian/lib/python/debian_linux/utils.py +++ b/debian/lib/python/debian_linux/utils.py @@ -19,13 +19,14 @@ class Templates(object): def _read(self, name): prefix, id = name.split('.', 1) - for dir in self.dirs: - filename = "%s/%s.in" % (dir, name) - if os.path.exists(filename): - f = codecs.open(filename, 'r', 'utf-8') - if prefix == 'control': - return read_control(f) - return f.read() + for suffix in ['.in', '']: + for dir in self.dirs: + filename = "%s/%s%s" % (dir, name, suffix) + if os.path.exists(filename): + f = codecs.open(filename, 'r', 'utf-8') + if prefix == 'control': + return read_control(f) + return f.read() def get(self, key, default=None): if key in self._cache: @@ -57,11 +58,11 @@ def read_control(f): break if line[0] in ' \t': if not last: - raise ValueError(u'Continuation line seen before first header') + raise ValueError('Continuation line seen before first header') lines.append(line.lstrip()) continue if last: - e[last] = u'\n'.join(lines) + e[last] = '\n'.join(lines) i = line.find(':') if i < 0: raise ValueError(u"Not a header, not a continuation: ``%s''" % line) diff --git a/debian/rules b/debian/rules index e87348846..b01412ce9 100755 --- a/debian/rules +++ b/debian/rules @@ -41,7 +41,7 @@ maintainerclean: clean: debian/control dh_testdir make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc + rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ dh_clean binary-indep: diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 74af0c32e..6837272f5 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -5,7 +5,7 @@ Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder Standards-Version: 3.9.4 Build-Depends: - debhelper (>> 7), python, + debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, dh-systemd From 87937205f722dde4fc97b046f05d8231933238ab Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 19:38:59 +0100 Subject: [PATCH 401/487] debian/bin/genorig.py: Make orig tarballs reproducible --- debian/bin/genorig.py | 23 +++++++++++++++++++---- debian/changelog | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index b072e22fd..2fcfdaadf 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -8,6 +8,7 @@ import os.path import re import shutil import subprocess +import time from debian_linux.debian import Changelog, VersionLinux @@ -79,8 +80,19 @@ class Main(object): self.upstream_extract(self.input_files[0]) if len(self.input_files) > 1: self.upstream_patch(self.input_files[1]) + + # generate() will change file mtimes. Capture the + # original release time so we can apply it to the final + # tarball. Note this doesn't work in case we apply an + # upstream patch, as that doesn't carry a release time. + orig_date = time.strftime( + "%a, %d %b %Y %H:%M:%S +0000", + time.gmtime( + os.stat(os.path.join(self.dir, 'temp/Makefile')) + .st_mtime)) + self.generate() - self.tar() + self.tar(orig_date) finally: shutil.rmtree(self.dir) @@ -170,7 +182,7 @@ class Main(object): os.makedirs(d) shutil.copyfile(temp_j, orig_j) - def tar(self): + def tar(self, orig_date): out = os.path.join("../orig", self.orig_tar) try: os.mkdir("../orig") @@ -182,9 +194,12 @@ class Main(object): except OSError: pass self.log("Generate tarball %s\n" % out) - cmdline = ['tar -caf', out, '-C', self.dir, self.orig] + cmdline = '''(cd '%s' && find '%s' -print0) | + LC_ALL=C sort -z | + tar -C '%s' --no-recursion --null -T - --mtime '%s' -caf '%s' + ''' % (self.dir, self.orig, self.dir, orig_date, out) try: - if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]): + if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', cmdline]): raise RuntimeError("Can't patch source") os.chmod(out, 0o644) except: diff --git a/debian/changelog b/debian/changelog index 885324d25..262b1b16b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * debian/bin,debian/control,debian/lib/python,debian/rules: Use Python 3 - debian/lib/python: Sync with linux package + * debian/bin/genorig.py: Make orig tarballs reproducible -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 From 4a0a255e4faf0ddde44eda671907671955273f0e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 20:04:19 +0100 Subject: [PATCH 402/487] linux-perf: Fix installation directory for bash completions --- debian/build/tools/perf/Makefile | 4 ++++ debian/changelog | 1 + 2 files changed, 5 insertions(+) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 968f4ec5d..e327a2d02 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -66,6 +66,10 @@ ifdef KERNEL_ARCH_PERF # - 'perf trace' doesn't take much more typing rm -f $(DESTDIR)/usr/bin/trace_$(VERSION) endif + mkdir -p $(DESTDIR)/usr/share/bash-completion/ + mv $(DESTDIR)/etc/bash_completion.d \ + $(DESTDIR)/usr/share/bash-completion/completions + rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc clean: ifdef KERNEL_ARCH_PERF diff --git a/debian/changelog b/debian/changelog index 262b1b16b..c2da5a7b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * debian/bin,debian/control,debian/lib/python,debian/rules: Use Python 3 - debian/lib/python: Sync with linux package * debian/bin/genorig.py: Make orig tarballs reproducible + * linux-perf: Fix installation directory for bash completions -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 From d13fc1ddbebe17615a87df715d62fe72acaa3c5d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 20:11:17 +0100 Subject: [PATCH 403/487] linux-perf: Remove shebang lines from perf scripts --- debian/changelog | 1 + debian/patches/series | 1 + .../patches/tools-perf-remove-shebangs.patch | 38 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 debian/patches/tools-perf-remove-shebangs.patch diff --git a/debian/changelog b/debian/changelog index c2da5a7b2..5e6980259 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium - debian/lib/python: Sync with linux package * debian/bin/genorig.py: Make orig tarballs reproducible * linux-perf: Fix installation directory for bash completions + * linux-perf: Remove shebang lines from perf scripts -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/patches/series b/debian/patches/series index e1943ce42..0343ca21b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ tools-perf-add-empty-build-files-for-architectures-lacking.patch lockdep-fix-oot-build.patch lockdep-fix-headers.patch lockdep-fix-soname.patch +tools-perf-remove-shebangs.patch diff --git a/debian/patches/tools-perf-remove-shebangs.patch b/debian/patches/tools-perf-remove-shebangs.patch new file mode 100644 index 000000000..f9bb858d2 --- /dev/null +++ b/debian/patches/tools-perf-remove-shebangs.patch @@ -0,0 +1,38 @@ +From: Ben Hutchings +Date: Fri, 25 Sep 2015 20:09:23 +0100 +Subject: tools/perf: Remove shebang lines from perf scripts + +perf scripts need to be invoked through perf, not directly through +perl (or other language interpreter). So including shebang lines in +them is useless and possibly misleading. + +Signed-off-by: Ben Hutchings +--- +--- a/tools/perf/scripts/perl/rw-by-file.pl ++++ b/tools/perf/scripts/perl/rw-by-file.pl +@@ -1,4 +1,3 @@ +-#!/usr/bin/perl -w + # (c) 2009, Tom Zanussi + # Licensed under the terms of the GNU GPL License version 2 + +--- a/tools/perf/scripts/perl/rw-by-pid.pl ++++ b/tools/perf/scripts/perl/rw-by-pid.pl +@@ -1,4 +1,3 @@ +-#!/usr/bin/perl -w + # (c) 2009, Tom Zanussi + # Licensed under the terms of the GNU GPL License version 2 + +--- a/tools/perf/scripts/perl/rwtop.pl ++++ b/tools/perf/scripts/perl/rwtop.pl +@@ -1,4 +1,3 @@ +-#!/usr/bin/perl -w + # (c) 2010, Tom Zanussi + # Licensed under the terms of the GNU GPL License version 2 + +--- a/tools/perf/scripts/perl/wakeup-latency.pl ++++ b/tools/perf/scripts/perl/wakeup-latency.pl +@@ -1,4 +1,3 @@ +-#!/usr/bin/perl -w + # (c) 2009, Tom Zanussi + # Licensed under the terms of the GNU GPL License version 2 + From 5b5133ebf7ed35256c3fe6f9adae7497ee9f41c3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 20:18:12 +0100 Subject: [PATCH 404/487] Set compiler flags according to dpkg-buildflags ...and in general, pass compiler flags down through all makefiles, regardless of what creative names people found for the variables. --- debian/build/Makefile.inc | 8 +++--- debian/build/tools/lib/lockdep/Makefile | 11 +++++--- debian/build/tools/perf/Makefile | 2 +- debian/build/tools/usb/usbip/Makefile | 3 ++- debian/changelog | 1 + debian/patches/series | 2 ++ .../tools-lib-lockdep-use-ldflags.patch | 17 ++++++++++++ .../tools-lib-traceevent-use-ldflags.patch | 26 +++++++++++++++++++ 8 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 debian/patches/tools-lib-lockdep-use-ldflags.patch create mode 100644 debian/patches/tools-lib-traceevent-use-ldflags.patch diff --git a/debian/build/Makefile.inc b/debian/build/Makefile.inc index 414246f47..15ff1fdb0 100644 --- a/debian/build/Makefile.inc +++ b/debian/build/Makefile.inc @@ -6,10 +6,12 @@ SHELL = /bin/sh -e CC = gcc CXX = g++ -CFLAGS ?= -O2 -Wall -CPPFLAGS = -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) \ +CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall +CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \ + -I$(top_srcdir)/$(OUTDIR) -I$(top_srcdir)/debian/build/$(OUTDIR) \ -isystem $(top_srcdir)/debian/build/include -CXXFLAGS = $(CFLAGS) +CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall +LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) all: all-local all-recursive clean: clean-local clean-recursive diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile index 7c8408ffc..427c0de9b 100644 --- a/debian/build/tools/lib/lockdep/Makefile +++ b/debian/build/tools/lib/lockdep/Makefile @@ -1,10 +1,13 @@ -srcdir := $(top_srcdir)/tools/lib/lockdep +OUTDIR = tools/lib/lockdep + +include ../../../Makefile.inc DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -MAKE_LOCKDEP := $(MAKE) -C $(srcdir) O=$(CURDIR)/out V=1 \ +MAKE_LOCKDEP := $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR)/out V=1 \ prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \ - LIBLOCKDEP_VERSION=$(VERSION) + LIBLOCKDEP_VERSION=$(VERSION) \ + CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)' unexport CFLAGS @@ -15,7 +18,7 @@ all: install: $(MAKE_LOCKDEP) install mkdir -p $(DESTDIR)/usr/include - cp -R $(srcdir)/include/liblockdep $(DESTDIR)/usr/include/ + cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/ ln -s liblockdep.so.$(VERSION) \ $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so # Upstream lockdep preload script is not suitable for installation diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index e327a2d02..44ca19274 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -26,7 +26,7 @@ else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),) KERNEL_ARCH_PERF = x86 endif -MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error +MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' # Disable Gtk UI until it's more usable MAKE_PERF += NO_GTK2=1 diff --git a/debian/build/tools/usb/usbip/Makefile b/debian/build/tools/usb/usbip/Makefile index 90fc6baa0..75e5705bb 100644 --- a/debian/build/tools/usb/usbip/Makefile +++ b/debian/build/tools/usb/usbip/Makefile @@ -8,7 +8,8 @@ unexport MAKEFLAGS all: cd $(srcdir) && ./autogen.sh mkdir -p out - cd out && $(srcdir)/configure \ + cd out && \ + $(shell dpkg-buildflags --export=cmdline) $(srcdir)/configure \ --prefix=/usr \ --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ diff --git a/debian/changelog b/debian/changelog index 5e6980259..53554c55f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * debian/bin/genorig.py: Make orig tarballs reproducible * linux-perf: Fix installation directory for bash completions * linux-perf: Remove shebang lines from perf scripts + * Set compiler flags according to dpkg-buildflags -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/patches/series b/debian/patches/series index 0343ca21b..e09d47f45 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,5 @@ lockdep-fix-oot-build.patch lockdep-fix-headers.patch lockdep-fix-soname.patch tools-perf-remove-shebangs.patch +tools-lib-traceevent-use-ldflags.patch +tools-lib-lockdep-use-ldflags.patch diff --git a/debian/patches/tools-lib-lockdep-use-ldflags.patch b/debian/patches/tools-lib-lockdep-use-ldflags.patch new file mode 100644 index 000000000..c4ebd3ed5 --- /dev/null +++ b/debian/patches/tools-lib-lockdep-use-ldflags.patch @@ -0,0 +1,17 @@ +From: Ben Hutchings +Date: Fri, 25 Sep 2015 21:36:29 +0100 +Subject: tools/lib/lockdep: Use LDFLAGS + +Signed-off-by: Ben Hutchings +--- +--- a/tools/lib/lockdep/Makefile ++++ b/tools/lib/lockdep/Makefile +@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef + + do_compile_shared_library = \ + ($(print_shared_lib_compile) \ +- $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so)) ++ $(CC) $(LDFLAGS) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='$(@F)';$(shell ln -s $(@F) $(@D)/liblockdep.so)) + + do_build_static_lib = \ + ($(print_static_lib_build) \ diff --git a/debian/patches/tools-lib-traceevent-use-ldflags.patch b/debian/patches/tools-lib-traceevent-use-ldflags.patch new file mode 100644 index 000000000..bd6c5c0b6 --- /dev/null +++ b/debian/patches/tools-lib-traceevent-use-ldflags.patch @@ -0,0 +1,26 @@ +From: Ben Hutchings +Date: Fri, 25 Sep 2015 21:26:48 +0100 +Subject: tools/lib/traceevent: Use LDFLAGS + +Signed-off-by: Ben Hutchings +--- +--- a/tools/lib/traceevent/Makefile ++++ b/tools/lib/traceevent/Makefile +@@ -172,7 +172,7 @@ $(TE_IN): force + $(Q)$(MAKE) $(build)=libtraceevent + + $(OUTPUT)libtraceevent.so: $(TE_IN) +- $(QUIET_LINK)$(CC) --shared $^ -o $@ ++ $(QUIET_LINK)$(CC) $(LDFLAGS) --shared $^ -o $@ + + $(OUTPUT)libtraceevent.a: $(TE_IN) + $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ +@@ -189,7 +189,7 @@ $(PLUGINS_IN): force + $(Q)$(MAKE) $(build)=$(plugin_obj) + + $(OUTPUT)%.so: $(OUTPUT)%-in.o +- $(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^ ++ $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $^ + + define make_version.h + (echo '/* This file is automatically generated. Do not modify. */'; \ From 4555b9e92e1560c60a5c1fa1f9eb489bea292eb8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 20:32:34 +0100 Subject: [PATCH 405/487] hyperv-daemons: Fix fortify format warning --- debian/changelog | 1 + debian/patches/series | 1 + .../tools-hv-fix-fortify-format-warning.patch | 54 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 debian/patches/tools-hv-fix-fortify-format-warning.patch diff --git a/debian/changelog b/debian/changelog index 53554c55f..fd712fa43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * linux-perf: Fix installation directory for bash completions * linux-perf: Remove shebang lines from perf scripts * Set compiler flags according to dpkg-buildflags + * hyperv-daemons: Fix fortify format warning -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/patches/series b/debian/patches/series index e09d47f45..f8ec6ae43 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -13,3 +13,4 @@ lockdep-fix-soname.patch tools-perf-remove-shebangs.patch tools-lib-traceevent-use-ldflags.patch tools-lib-lockdep-use-ldflags.patch +tools-hv-fix-fortify-format-warning.patch diff --git a/debian/patches/tools-hv-fix-fortify-format-warning.patch b/debian/patches/tools-hv-fix-fortify-format-warning.patch new file mode 100644 index 000000000..a5e0ba6c1 --- /dev/null +++ b/debian/patches/tools-hv-fix-fortify-format-warning.patch @@ -0,0 +1,54 @@ +From: Ben Hutchings +Date: Fri, 25 Sep 2015 20:28:10 +0100 +Subject: tools/hv: Fix fortify format warning + +With fortify enabled, gcc warns: + +tools/hv/hv_kvp_daemon.c:705:2: error: format not a string literal and no format arguments [-Werror=format-security] + snprintf(dev_id, sizeof(dev_id), kvp_net_dir); + ^ + +kvp_net_dir is a pointer to a string literal, but lacks const +qualification. As it is never modified, it should be a const +array rather than a pointer. + +Also, while snprintf() has a bounds check, the following strcat()s +do not. Combine them into a single snprintf(). + +Signed-off-by: Ben Hutchings +--- +--- a/tools/hv/hv_kvp_daemon.c ++++ b/tools/hv/hv_kvp_daemon.c +@@ -691,10 +691,10 @@ static char *kvp_mac_to_if_name(char *ma + DIR *dir; + struct dirent *entry; + FILE *file; +- char *p, *q, *x; ++ char *p, *x; + char *if_name = NULL; + char buf[256]; +- char *kvp_net_dir = "/sys/class/net/"; ++ const char kvp_net_dir[] = "/sys/class/net/"; + char dev_id[256]; + unsigned int i; + +@@ -702,17 +702,9 @@ static char *kvp_mac_to_if_name(char *ma + if (dir == NULL) + return NULL; + +- snprintf(dev_id, sizeof(dev_id), kvp_net_dir); +- q = dev_id + strlen(kvp_net_dir); +- + while ((entry = readdir(dir)) != NULL) { +- /* +- * Set the state for the next pass. +- */ +- *q = '\0'; +- +- strcat(dev_id, entry->d_name); +- strcat(dev_id, "/address"); ++ snprintf(dev_id, sizeof(dev_id), "%s%s/address", ++ kvp_net_dir, entry->d_name); + + file = fopen(dev_id, "r"); + if (file == NULL) From 40299a2dbd6555d810674f125ee4bc976bf38746 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 20:36:50 +0100 Subject: [PATCH 406/487] debian/rules: Add support for DEB_BUILD_OPTIONS=parallel=N --- debian/changelog | 1 + debian/rules | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index fd712fa43..658c463bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * linux-perf: Remove shebang lines from perf scripts * Set compiler flags according to dpkg-buildflags * hyperv-daemons: Fix fortify format warning + * debian/rules: Add support for DEB_BUILD_OPTIONS=parallel=N -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/rules b/debian/rules index b01412ce9..78f11b47e 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,8 @@ VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$ include debian/rules.defs +MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + build: build-arch build-indep build-arch: debian/control $(STAMPS_DIR)/build-base From d95159f909ec1cf42ece64e554319314097c4dd1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 22:24:39 +0100 Subject: [PATCH 407/487] debian/control: Update policy version to 3.9.6; no changes required --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 658c463bb..c0541dec3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * Set compiler flags according to dpkg-buildflags * hyperv-daemons: Fix fortify format warning * debian/rules: Add support for DEB_BUILD_OPTIONS=parallel=N + * debian/control: Update policy version to 3.9.6; no changes required -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 6837272f5..761bf9b6a 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder -Standards-Version: 3.9.4 +Standards-Version: 3.9.6 Build-Depends: debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, From e966731fa07da3ba824cb57d5fc9e503e400f547 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 22:55:24 +0100 Subject: [PATCH 408/487] Revert "perf build: Fix libunwind feature detection on 32-bit x86" --- debian/changelog | 2 ++ ...d-fix-libunwind-feature-detection-on.patch | 23 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 26 insertions(+) create mode 100644 debian/patches/revert-perf-build-fix-libunwind-feature-detection-on.patch diff --git a/debian/changelog b/debian/changelog index c0541dec3..85ff92a3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * hyperv-daemons: Fix fortify format warning * debian/rules: Add support for DEB_BUILD_OPTIONS=parallel=N * debian/control: Update policy version to 3.9.6; no changes required + * linux-perf: Revert "perf build: Fix libunwind feature detection on 32-bit + x86", which was a regression for us -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 diff --git a/debian/patches/revert-perf-build-fix-libunwind-feature-detection-on.patch b/debian/patches/revert-perf-build-fix-libunwind-feature-detection-on.patch new file mode 100644 index 000000000..6787fa2ea --- /dev/null +++ b/debian/patches/revert-perf-build-fix-libunwind-feature-detection-on.patch @@ -0,0 +1,23 @@ +From: Ben Hutchings +Date: Fri, 25 Sep 2015 22:50:50 +0100 +Subject: Revert "perf build: Fix libunwind feature detection on 32-bit x86" + +This reverts commit 05b41775e2edd69a83f592e3534930c934d4038e. +It broke feature detection that was working just fine for us. +--- + tools/perf/config/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile +index 094ddae..9b8937c 100644 +--- a/tools/perf/config/Makefile ++++ b/tools/perf/config/Makefile +@@ -32,7 +32,7 @@ ifeq ($(ARCH),x86) + LIBUNWIND_LIBS = -lunwind -lunwind-x86_64 + $(call detected,CONFIG_X86_64) + else +- LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind ++ LIBUNWIND_LIBS = -lunwind -lunwind-x86 + endif + NO_PERF_REGS := 0 + endif diff --git a/debian/patches/series b/debian/patches/series index f8ec6ae43..97b2e641c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ tools-perf-remove-shebangs.patch tools-lib-traceevent-use-ldflags.patch tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch +revert-perf-build-fix-libunwind-feature-detection-on.patch From 755c6a0307237e05150fdfddc85d70ee69138256 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 25 Sep 2015 22:55:59 +0100 Subject: [PATCH 409/487] Prepare to release linux-tools (4.2-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 85ff92a3e..1b79a39ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.2-1) UNRELEASED; urgency=medium +linux-tools (4.2-1) unstable; urgency=medium * New upstream release @@ -15,7 +15,7 @@ linux-tools (4.2-1) UNRELEASED; urgency=medium * linux-perf: Revert "perf build: Fix libunwind feature detection on 32-bit x86", which was a regression for us - -- Ben Hutchings Fri, 25 Sep 2015 18:42:20 +0100 + -- Ben Hutchings Fri, 25 Sep 2015 22:55:41 +0100 linux-tools (4.2~rc7-1~exp1) experimental; urgency=medium From 98517d1ea6e34efaae3d11d63ac5a5f229e49c01 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Sep 2015 14:12:43 +0100 Subject: [PATCH 410/487] [x32] Don't attempt to build linux-perf (fixes FTBFS) --- debian/build/tools/perf/Makefile | 5 ++++- debian/changelog | 6 ++++++ debian/rules.real | 2 +- debian/templates/control.main.in | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index 44ca19274..c3d1c0738 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -23,7 +23,10 @@ else ifeq ($(DEB_HOST_ARCH_CPU),sh4) else ifneq ($(filter sparc%,$(DEB_HOST_ARCH_CPU)),) KERNEL_ARCH_PERF = sparc else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),) - KERNEL_ARCH_PERF = x86 + # But x32 isn't supported yet + ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),x32) + KERNEL_ARCH_PERF = x86 + endif endif MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' diff --git a/debian/changelog b/debian/changelog index 1b79a39ca..0ec51a191 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.2-2) UNRELEASED; urgency=medium + + * [x32] Don't attempt to build linux-perf (fixes FTBFS) + + -- Ben Hutchings Tue, 29 Sep 2015 04:50:43 +0100 + linux-tools (4.2-1) unstable; urgency=medium * New upstream release diff --git a/debian/rules.real b/debian/rules.real index feaafa62f..fc84db874 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -4,7 +4,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs binary-arch: install-kbuild install-usbip install-lockdep -ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif ifneq ($(filter i386 amd64,$(DEB_BUILD_ARCH)),) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 75ff67258..b905cef04 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -7,7 +7,7 @@ Description: Kbuild infrastructure for Linux @version@ Package: linux-perf-@version@ Section: devel -Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 +Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends} Recommends: linux-base (>= 3.4~) Provides: linux-tools-@version@ From a3a8096d0efe8e516efc1446f10b6ff2fafc95c5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Sep 2015 14:12:51 +0100 Subject: [PATCH 411/487] [x32] Build hyperv-daemons package --- debian/changelog | 1 + debian/rules.real | 2 +- debian/templates/control.main.in | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0ec51a191..e775bd194 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (4.2-2) UNRELEASED; urgency=medium * [x32] Don't attempt to build linux-perf (fixes FTBFS) + * [x32] Build hyperv-daemons package -- Ben Hutchings Tue, 29 Sep 2015 04:50:43 +0100 diff --git a/debian/rules.real b/debian/rules.real index fc84db874..c9400efd3 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -7,7 +7,7 @@ binary-arch: install-kbuild install-usbip install-lockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif -ifneq ($(filter i386 amd64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-hyperv-daemons endif diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index b905cef04..4de03fb13 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -54,7 +54,7 @@ Description: USB device sharing system over IP network client tool 'usbip'. Package: hyperv-daemons -Architecture: i386 amd64 +Architecture: i386 amd64 x32 Depends: ${shlibs:Depends}, ${misc:Depends} Section: admin Description: Support daemons for Linux running on Hyper-V From 19679ebe60858e5d3d66697cdb4d286914a9835e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 1 Oct 2015 01:37:33 +0100 Subject: [PATCH 412/487] [alpha] uapi: Add support for __SANE_USERSPACE_TYPES__(fixes FTBFS) --- debian/changelog | 1 + ...support-for-__sane_userspace_types__.patch | 56 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 58 insertions(+) create mode 100644 debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch diff --git a/debian/changelog b/debian/changelog index e775bd194..1cd2ccdca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (4.2-2) UNRELEASED; urgency=medium * [x32] Don't attempt to build linux-perf (fixes FTBFS) * [x32] Build hyperv-daemons package + * [alpha] uapi: Add support for __SANE_USERSPACE_TYPES__(fixes FTBFS) -- Ben Hutchings Tue, 29 Sep 2015 04:50:43 +0100 diff --git a/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch b/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch new file mode 100644 index 000000000..3b3e38189 --- /dev/null +++ b/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch @@ -0,0 +1,56 @@ +From: Ben Hutchings +Date: Tue, 29 Sep 2015 02:55:06 +0100 +Subject: [PATCH] alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ +Forwarded: http://mid.gmane.org/1443659755.2730.14.camel@decadent.org.uk + +This fixes compiler errors in perf such as: + +tests/attr.c: In function 'store_event': +tests/attr.c:66:27: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64 {aka long unsigned int}' [-Werror=format=] + snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, + ^ + +Signed-off-by: Ben Hutchings +Tested-by: Michael Cree +Cc: stable@vger.kernel.org +--- + arch/alpha/include/asm/types.h | 2 +- + arch/alpha/include/uapi/asm/types.h | 12 +++++++++++- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h +index 4cb4b6d..0bc66e1 100644 +--- a/arch/alpha/include/asm/types.h ++++ b/arch/alpha/include/asm/types.h +@@ -1,6 +1,6 @@ + #ifndef _ALPHA_TYPES_H + #define _ALPHA_TYPES_H + +-#include ++#include + + #endif /* _ALPHA_TYPES_H */ +diff --git a/arch/alpha/include/uapi/asm/types.h b/arch/alpha/include/uapi/asm/types.h +index 9fd3cd4..8d1024d 100644 +--- a/arch/alpha/include/uapi/asm/types.h ++++ b/arch/alpha/include/uapi/asm/types.h +@@ -9,8 +9,18 @@ + * need to be careful to avoid a name clashes. + */ + +-#ifndef __KERNEL__ ++/* ++ * This is here because we used to use l64 for alpha ++ * and we don't want to impact user mode with our change to ll64 ++ * in the kernel. ++ * ++ * However, some user programs are fine with this. They can ++ * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. ++ */ ++#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__) + #include ++#else ++#include + #endif + + #endif /* _UAPI_ALPHA_TYPES_H */ diff --git a/debian/patches/series b/debian/patches/series index 97b2e641c..9715fd947 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ tools-lib-traceevent-use-ldflags.patch tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch +alpha-uapi-add-support-for-__sane_userspace_types__.patch From c24544eee8017d2367f1bac1000a5a6d81352dfb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 2 Oct 2015 18:41:41 +0100 Subject: [PATCH 413/487] Prepare to release linux-tools (4.2-2). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1cd2ccdca..b7a44942c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -linux-tools (4.2-2) UNRELEASED; urgency=medium +linux-tools (4.2-2) unstable; urgency=medium * [x32] Don't attempt to build linux-perf (fixes FTBFS) * [x32] Build hyperv-daemons package * [alpha] uapi: Add support for __SANE_USERSPACE_TYPES__(fixes FTBFS) - -- Ben Hutchings Tue, 29 Sep 2015 04:50:43 +0100 + -- Ben Hutchings Fri, 02 Oct 2015 18:41:22 +0100 linux-tools (4.2-1) unstable; urgency=medium From ec98f72b189b9868b0321b475407fe6e16fdbdd2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 6 Oct 2015 23:55:28 +0100 Subject: [PATCH 414/487] Update to 4.3-rc3 --- debian/changelog | 6 +++ debian/patches/lockdep-fix-headers.patch | 51 +------------------ debian/patches/series | 1 - ...uild-files-for-architectures-lacking.patch | 27 ---------- 4 files changed, 7 insertions(+), 78 deletions(-) delete mode 100644 debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch diff --git a/debian/changelog b/debian/changelog index 1b79a39ca..8bf1d316f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.3~rc3-1~exp1) UNRELEASED; urgency=medium + + * New upstream release candidate + + -- Ben Hutchings Mon, 28 Sep 2015 01:54:21 +0100 + linux-tools (4.2-1) unstable; urgency=medium * New upstream release diff --git a/debian/patches/lockdep-fix-headers.patch b/debian/patches/lockdep-fix-headers.patch index 95f16161f..e2c1db8e7 100644 --- a/debian/patches/lockdep-fix-headers.patch +++ b/debian/patches/lockdep-fix-headers.patch @@ -1,49 +1,9 @@ From: Ben Hutchings Date: Thu, 13 Aug 2015 20:48:12 +0200 -Subject: liblockdep: Add more headers and definitions needed by lockdep +Subject: liblockdep: Define WRITE_ONCE(), used by . Signed-off-by: Ben Hutchings --- ---- /dev/null -+++ b/tools/lib/lockdep/uinclude/linux/export.h -@@ -0,0 +1,10 @@ -+#ifndef _LINUX_EXPORT_H -+#define _LINUX_EXPORT_H -+ -+#define EXPORT_SYMBOL(sym) -+#define EXPORT_SYMBOL_GPL(sym) -+#define EXPORT_SYMBOL_GPL_FUTURE(sym) -+#define EXPORT_UNUSED_SYMBOL(sym) -+#define EXPORT_UNUSED_SYMBOL_GPL(sym) -+ -+#endif /* _LINUX_EXPORT_H */ ---- a/tools/lib/lockdep/uinclude/linux/kernel.h -+++ b/tools/lib/lockdep/uinclude/linux/kernel.h -@@ -23,7 +23,7 @@ - #define WARN_ON(x) (x) - #define WARN_ON_ONCE(x) (x) - #define likely(x) (x) --#define WARN(x, y, z) (x) -+#define WARN(x, y...) (x) - #define uninitialized_var(x) x - #define __init - #define noinline ---- a/tools/lib/lockdep/preload.c -+++ b/tools/lib/lockdep/preload.c -@@ -5,7 +5,7 @@ - #include - #include - #include "include/liblockdep/mutex.h" --#include "../../../include/linux/rbtree.h" -+#include - - /** - * struct lock_lookup - liblockdep's view of a single unique lock ---- a/tools/lib/lockdep/uinclude/linux/rbtree.h -+++ b/tools/lib/lockdep/uinclude/linux/rbtree.h -@@ -1 +1 @@ --#include "../../../include/linux/rbtree.h" -+#include "../../include/linux/rbtree.h" --- a/tools/lib/lockdep/uinclude/linux/compiler.h +++ b/tools/lib/lockdep/uinclude/linux/compiler.h @@ -4,4 +4,10 @@ @@ -57,12 +17,3 @@ Signed-off-by: Ben Hutchings +#define WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) + #endif ---- a/tools/lib/lockdep/uinclude/linux/rcu.h -+++ b/tools/lib/lockdep/uinclude/linux/rcu.h -@@ -18,4 +18,6 @@ static inline bool rcu_is_watching(void) - return false; - } - -+#define RCU_INIT_POINTER(p, v) (p = v) -+ - #endif diff --git a/debian/patches/series b/debian/patches/series index 97b2e641c..2632af577 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,7 +6,6 @@ usbip-document-tcp-wrappers.patch kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch tools-perf-man-date.patch -tools-perf-add-empty-build-files-for-architectures-lacking.patch lockdep-fix-oot-build.patch lockdep-fix-headers.patch lockdep-fix-soname.patch diff --git a/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch b/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch deleted file mode 100644 index f648d5888..000000000 --- a/debian/patches/tools-perf-add-empty-build-files-for-architectures-lacking.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Ben Hutchings -Date: Tue, 04 Aug 2015 16:59:53 +0100 -Subject: tools/perf: Add empty Build files for architectures lacking them -Forwarded: http://mid.gmane.org/1438704627.7315.2.camel@decadent.org.uk - -perf currently fails to build on MIPS as there is no -tools/perf/arch/mips/Build file. Adding an empty file fixes this as -there are no MIPS-specific sources to build. - -It looks like the same is needed for Alpha and PA-RISC, though I -haven't been able to test those. - -Signed-off-by: Ben Hutchings -Fixes: 5e8c0fb6a957 ("perf build: Add arch x86 objects building") ---- ---- /dev/null -+++ b/tools/perf/arch/alpha/Build -@@ -0,0 +1 @@ -+# empty ---- /dev/null -+++ b/tools/perf/arch/mips/Build -@@ -0,0 +1,1 @@ -+# empty ---- /dev/null -+++ b/tools/perf/arch/parisc/Build -@@ -0,0 +1 @@ -+# empty From 555b137e02b13f9377ab90faec0f881893bd8056 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 7 Oct 2015 01:01:23 +0100 Subject: [PATCH 415/487] Update to 4.3-rc4 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6642b807e..720e1df26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.3~rc3-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.3~rc4-1~exp1) UNRELEASED; urgency=medium * New upstream release candidate From 882febcd6e42eb53b4aaf0dd84bf8eeb4364eb1c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 7 Oct 2015 01:15:46 +0100 Subject: [PATCH 416/487] Prepare to release linux-tools (4.3~rc4-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 720e1df26..db971cba7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (4.3~rc4-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.3~rc4-1~exp1) experimental; urgency=medium * New upstream release candidate - -- Ben Hutchings Mon, 28 Sep 2015 01:54:21 +0100 + -- Ben Hutchings Wed, 07 Oct 2015 01:15:46 +0100 linux-tools (4.2-2) unstable; urgency=medium From 4a03a090bed4bd82f88b3b77e476ac6e0bb2d2e0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Oct 2015 17:54:22 +0100 Subject: [PATCH 417/487] perf: Fix build on architectures without CONFIG_PERF_REGS --- debian/changelog | 6 +++ ...n-architectures-without-config_perf_.patch | 51 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 58 insertions(+) create mode 100644 debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch diff --git a/debian/changelog b/debian/changelog index db971cba7..fdf6c6cc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.3~rc4-1~exp2) UNRELEASED; urgency=medium + + * perf: Fix build on architectures without CONFIG_PERF_REGS + + -- Ben Hutchings Thu, 08 Oct 2015 17:54:09 +0100 + linux-tools (4.3~rc4-1~exp1) experimental; urgency=medium * New upstream release candidate diff --git a/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch b/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch new file mode 100644 index 000000000..6f867f6ff --- /dev/null +++ b/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch @@ -0,0 +1,51 @@ +From: Ben Hutchings +Date: Thu, 8 Oct 2015 17:38:22 +0100 +Subject: perf: Fix build on architectures without CONFIG_PERF_REGS +Forwarded: http://mid.gmane.org/1444323185.2956.260.camel@decadent.org.uk + +perf currently fails to link on all architectures other than arm, +arm64 and x86: + +tools/perf/libperf.a(libperf-in.o): In function `parse_regs': +tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks' +tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks' +tools/perf/util/parse-regs-options.c:45: undefined reference to `sample_reg_masks' +tools/perf/util/parse-regs-options.c:38: undefined reference to `sample_reg_masks' + +Fixes: bcc84ec65ad1 ("perf record: Add ability to name registers to record") +Signed-off-by: Ben Hutchings +Cc: Stephane Eranian +--- + tools/perf/builtin-record.c | 2 ++ + tools/perf/util/Build | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c +index 142eeb3..34dd749c 100644 +--- a/tools/perf/builtin-record.c ++++ b/tools/perf/builtin-record.c +@@ -1082,9 +1082,11 @@ struct option __record_options[] = { + "sample transaction flags (special events only)"), + OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread, + "use per-thread mmaps"), ++#ifdef CONFIG_PERF_REGS + OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register", + "sample selected machine registers on interrupt," + " use -I ? to list register names", parse_regs), ++#endif + OPT_BOOLEAN(0, "running-time", &record.opts.running_time, + "Record running/enabled time of read (:S) events"), + OPT_CALLBACK('k', "clockid", &record.opts, +diff --git a/tools/perf/util/Build b/tools/perf/util/Build +index 349bc96..333b08d 100644 +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -83,7 +83,7 @@ libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ + libperf-$(CONFIG_AUXTRACE) += intel-pt.o + libperf-$(CONFIG_AUXTRACE) += intel-bts.o + libperf-y += parse-branch-options.o +-libperf-y += parse-regs-options.o ++libperf-$(CONFIG_PERF_REGS) += parse-regs-options.o + + libperf-$(CONFIG_LIBELF) += symbol-elf.o + libperf-$(CONFIG_LIBELF) += probe-file.o diff --git a/debian/patches/series b/debian/patches/series index d5becb893..e333479a8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch +perf-fix-build-on-architectures-without-config_perf_.patch From 81a7a029f960abbb449c77c1b29f4725af2b91a4 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 8 Oct 2015 21:01:23 +0100 Subject: [PATCH 418/487] Use upstream fix for perf build breakage --- ...n-architectures-without-config_perf_.patch | 51 ------------- ...uild-break-on-powerpc-due-to-sample_.patch | 75 +++++++++++++++++++ debian/patches/series | 2 +- 3 files changed, 76 insertions(+), 52 deletions(-) delete mode 100644 debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch create mode 100644 debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch diff --git a/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch b/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch deleted file mode 100644 index 6f867f6ff..000000000 --- a/debian/patches/perf-fix-build-on-architectures-without-config_perf_.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Ben Hutchings -Date: Thu, 8 Oct 2015 17:38:22 +0100 -Subject: perf: Fix build on architectures without CONFIG_PERF_REGS -Forwarded: http://mid.gmane.org/1444323185.2956.260.camel@decadent.org.uk - -perf currently fails to link on all architectures other than arm, -arm64 and x86: - -tools/perf/libperf.a(libperf-in.o): In function `parse_regs': -tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks' -tools/perf/util/parse-regs-options.c:28: undefined reference to `sample_reg_masks' -tools/perf/util/parse-regs-options.c:45: undefined reference to `sample_reg_masks' -tools/perf/util/parse-regs-options.c:38: undefined reference to `sample_reg_masks' - -Fixes: bcc84ec65ad1 ("perf record: Add ability to name registers to record") -Signed-off-by: Ben Hutchings -Cc: Stephane Eranian ---- - tools/perf/builtin-record.c | 2 ++ - tools/perf/util/Build | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c -index 142eeb3..34dd749c 100644 ---- a/tools/perf/builtin-record.c -+++ b/tools/perf/builtin-record.c -@@ -1082,9 +1082,11 @@ struct option __record_options[] = { - "sample transaction flags (special events only)"), - OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread, - "use per-thread mmaps"), -+#ifdef CONFIG_PERF_REGS - OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register", - "sample selected machine registers on interrupt," - " use -I ? to list register names", parse_regs), -+#endif - OPT_BOOLEAN(0, "running-time", &record.opts.running_time, - "Record running/enabled time of read (:S) events"), - OPT_CALLBACK('k', "clockid", &record.opts, -diff --git a/tools/perf/util/Build b/tools/perf/util/Build -index 349bc96..333b08d 100644 ---- a/tools/perf/util/Build -+++ b/tools/perf/util/Build -@@ -83,7 +83,7 @@ libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/ - libperf-$(CONFIG_AUXTRACE) += intel-pt.o - libperf-$(CONFIG_AUXTRACE) += intel-bts.o - libperf-y += parse-branch-options.o --libperf-y += parse-regs-options.o -+libperf-$(CONFIG_PERF_REGS) += parse-regs-options.o - - libperf-$(CONFIG_LIBELF) += symbol-elf.o - libperf-$(CONFIG_LIBELF) += probe-file.o diff --git a/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch b/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch new file mode 100644 index 000000000..f660de82b --- /dev/null +++ b/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch @@ -0,0 +1,75 @@ +From: Sukadev Bhattiprolu +Date: Thu, 24 Sep 2015 17:53:49 -0400 +Subject: perf tools: Fix build break on powerpc due to sample_reg_masks +Origin: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit?id=9fb4765451f22c5e782c1590747717550bff34b2 + +perf_regs.c does not get built on Powerpc as CONFIG_PERF_REGS is false. +So the weak definition for 'sample_regs_masks' doesn't get picked up. + +Adding perf_regs.o to util/Build unconditionally, exposes a redefinition +error for 'perf_reg_value()' function (due to the static inline version +in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that +function. + +Signed-off-by: Sukadev Bhattiprolu +Acked-by: Jiri Olsa +Cc: Naveen N. Rao +Cc: Stephane Eranian +Cc: linuxppc-dev@ozlabs.org +Link: http://lkml.kernel.org/r/20150930182836.GA27858@us.ibm.com +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/perf/util/Build | 2 +- + tools/perf/util/perf_regs.c | 2 ++ + tools/perf/util/perf_regs.h | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tools/perf/util/Build b/tools/perf/util/Build +index 349bc96..e5f18a2 100644 +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -17,6 +17,7 @@ libperf-y += levenshtein.o + libperf-y += llvm-utils.o + libperf-y += parse-options.o + libperf-y += parse-events.o ++libperf-y += perf_regs.o + libperf-y += path.o + libperf-y += rbtree.o + libperf-y += bitmap.o +@@ -103,7 +104,6 @@ libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o + + libperf-y += scripting-engines/ + +-libperf-$(CONFIG_PERF_REGS) += perf_regs.o + libperf-$(CONFIG_ZLIB) += zlib.o + libperf-$(CONFIG_LZMA) += lzma.o + +diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c +index 885e8ac..6b8eb13 100644 +--- a/tools/perf/util/perf_regs.c ++++ b/tools/perf/util/perf_regs.c +@@ -6,6 +6,7 @@ const struct sample_reg __weak sample_reg_masks[] = { + SMPL_REG_END + }; + ++#ifdef HAVE_PERF_REGS_SUPPORT + int perf_reg_value(u64 *valp, struct regs_dump *regs, int id) + { + int i, idx = 0; +@@ -29,3 +30,4 @@ out: + *valp = regs->cache_regs[id]; + return 0; + } ++#endif +diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h +index 2984dcc..679d6e4 100644 +--- a/tools/perf/util/perf_regs.h ++++ b/tools/perf/util/perf_regs.h +@@ -2,6 +2,7 @@ + #define __PERF_REGS_H + + #include ++#include + + struct regs_dump; + diff --git a/debian/patches/series b/debian/patches/series index e333479a8..0ef4a447a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,4 +15,4 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch -perf-fix-build-on-architectures-without-config_perf_.patch +perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch From 2b5f419b8526d1d1705cb51167d4994e313839a7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 13 Oct 2015 22:02:43 +0100 Subject: [PATCH 419/487] Update to 4.3-rc5 --- debian/changelog | 5 +- ...uild-break-on-powerpc-due-to-sample_.patch | 75 ------------------- debian/patches/series | 1 - 3 files changed, 3 insertions(+), 78 deletions(-) delete mode 100644 debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch diff --git a/debian/changelog b/debian/changelog index fdf6c6cc7..aaee693c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ -linux-tools (4.3~rc4-1~exp2) UNRELEASED; urgency=medium +linux-tools (4.3~rc5-1~exp1) UNRELEASED; urgency=medium - * perf: Fix build on architectures without CONFIG_PERF_REGS + * New upstream release candidate + - perf: Fix build on architectures without CONFIG_PERF_REGS -- Ben Hutchings Thu, 08 Oct 2015 17:54:09 +0100 diff --git a/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch b/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch deleted file mode 100644 index f660de82b..000000000 --- a/debian/patches/perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Sukadev Bhattiprolu -Date: Thu, 24 Sep 2015 17:53:49 -0400 -Subject: perf tools: Fix build break on powerpc due to sample_reg_masks -Origin: https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit?id=9fb4765451f22c5e782c1590747717550bff34b2 - -perf_regs.c does not get built on Powerpc as CONFIG_PERF_REGS is false. -So the weak definition for 'sample_regs_masks' doesn't get picked up. - -Adding perf_regs.o to util/Build unconditionally, exposes a redefinition -error for 'perf_reg_value()' function (due to the static inline version -in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that -function. - -Signed-off-by: Sukadev Bhattiprolu -Acked-by: Jiri Olsa -Cc: Naveen N. Rao -Cc: Stephane Eranian -Cc: linuxppc-dev@ozlabs.org -Link: http://lkml.kernel.org/r/20150930182836.GA27858@us.ibm.com -Signed-off-by: Arnaldo Carvalho de Melo ---- - tools/perf/util/Build | 2 +- - tools/perf/util/perf_regs.c | 2 ++ - tools/perf/util/perf_regs.h | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/Build b/tools/perf/util/Build -index 349bc96..e5f18a2 100644 ---- a/tools/perf/util/Build -+++ b/tools/perf/util/Build -@@ -17,6 +17,7 @@ libperf-y += levenshtein.o - libperf-y += llvm-utils.o - libperf-y += parse-options.o - libperf-y += parse-events.o -+libperf-y += perf_regs.o - libperf-y += path.o - libperf-y += rbtree.o - libperf-y += bitmap.o -@@ -103,7 +104,6 @@ libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o - - libperf-y += scripting-engines/ - --libperf-$(CONFIG_PERF_REGS) += perf_regs.o - libperf-$(CONFIG_ZLIB) += zlib.o - libperf-$(CONFIG_LZMA) += lzma.o - -diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c -index 885e8ac..6b8eb13 100644 ---- a/tools/perf/util/perf_regs.c -+++ b/tools/perf/util/perf_regs.c -@@ -6,6 +6,7 @@ const struct sample_reg __weak sample_reg_masks[] = { - SMPL_REG_END - }; - -+#ifdef HAVE_PERF_REGS_SUPPORT - int perf_reg_value(u64 *valp, struct regs_dump *regs, int id) - { - int i, idx = 0; -@@ -29,3 +30,4 @@ out: - *valp = regs->cache_regs[id]; - return 0; - } -+#endif -diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h -index 2984dcc..679d6e4 100644 ---- a/tools/perf/util/perf_regs.h -+++ b/tools/perf/util/perf_regs.h -@@ -2,6 +2,7 @@ - #define __PERF_REGS_H - - #include -+#include - - struct regs_dump; - diff --git a/debian/patches/series b/debian/patches/series index 0ef4a447a..d5becb893 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,4 +15,3 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch -perf-tools-fix-build-break-on-powerpc-due-to-sample_.patch From 1a487289fb4c99d021640d260c8508c59eb3e1c9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Oct 2015 01:03:41 +0100 Subject: [PATCH 420/487] Prepare to release linux-tools (4.3~rc5-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index aaee693c4..84144252a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -linux-tools (4.3~rc5-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.3~rc5-1~exp1) experimental; urgency=medium * New upstream release candidate - perf: Fix build on architectures without CONFIG_PERF_REGS - -- Ben Hutchings Thu, 08 Oct 2015 17:54:09 +0100 + -- Ben Hutchings Wed, 14 Oct 2015 00:49:38 +0100 linux-tools (4.3~rc4-1~exp1) experimental; urgency=medium From 468eb97bf780ab76b2faa7af872f0168f1bbe5de Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Oct 2015 02:04:51 +0100 Subject: [PATCH 421/487] Remove the redundant build-base stamp file --- debian/rules | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 78f11b47e..58b5d88aa 100755 --- a/debian/rules +++ b/debian/rules @@ -9,11 +9,9 @@ MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) build: build-arch build-indep -build-arch: debian/control $(STAMPS_DIR)/build-base -$(STAMPS_DIR)/build-base: $(STAMPS_DIR) +build-arch: debian/control $(STAMPS_DIR) dh_testdir $(MAKE) -f debian/rules.gen build - touch $@ build-indep: debian/control From 5385ecc9a830c50e1bac3b806b0917ef077791fd Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Oct 2015 02:05:02 +0100 Subject: [PATCH 422/487] Move stamp directory creation into rules.real --- debian/rules | 5 +---- debian/rules.real | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 58b5d88aa..4572e23c6 100755 --- a/debian/rules +++ b/debian/rules @@ -9,15 +9,12 @@ MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) build: build-arch build-indep -build-arch: debian/control $(STAMPS_DIR) +build-arch: debian/control dh_testdir $(MAKE) -f debian/rules.gen build build-indep: debian/control -$(STAMPS_DIR): - @[ -d $@ ] || mkdir $@ - DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) diff --git a/debian/rules.real b/debian/rules.real index c9400efd3..a75feb4ae 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -15,6 +15,7 @@ build: $(STAMPS_DIR)/build $(STAMPS_DIR)/build: $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) + mkdir -p $(STAMPS_DIR) touch '$@' install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) From 198dbc71653231ba788c084c75eff4888b256264 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 14 Oct 2015 02:08:31 +0100 Subject: [PATCH 423/487] Fix the build-indep and binary-indep targets (fixes FTBFS for arch:all) --- debian/bin/gencontrol.py | 2 +- debian/changelog | 6 ++++++ debian/rules | 5 +++++ debian/rules.real | 28 ++++++++++++++++++++++++---- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index a26d0ee71..64fbcf2f0 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -8,7 +8,7 @@ from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags, Gencontro from debian_linux.utils import * class gencontrol(Gencontrol): - makefile_targets = ('binary-arch', 'build') + makefile_targets = ('binary-arch', 'binary-indep', 'build') def __init__(self, underlay = None): self.templates = Templates(['debian/templates']) diff --git a/debian/changelog b/debian/changelog index 84144252a..3b453a535 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.3~rc5-1~exp2) experimental; urgency=medium + + * Fix the build-indep and binary-indep targets (fixes FTBFS for arch:all) + + -- Ben Hutchings Wed, 14 Oct 2015 02:08:09 +0100 + linux-tools (4.3~rc5-1~exp1) experimental; urgency=medium * New upstream release candidate diff --git a/debian/rules b/debian/rules index 4572e23c6..ee262a9fc 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,11 @@ build-arch: debian/control dh_testdir $(MAKE) -f debian/rules.gen build +# XXX All we really need to do is to generate the lockdep script, +# but for now we take the stupid option of building everything. build-indep: debian/control + dh_testdir + $(MAKE) -f debian/rules.gen build DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz @@ -43,6 +47,7 @@ clean: debian/control binary-indep: dh_testdir + $(MAKE) -f debian/rules.gen binary-indep binary-arch: dh_testdir diff --git a/debian/rules.real b/debian/rules.real index a75feb4ae..303e16579 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,7 +3,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs -binary-arch: install-kbuild install-usbip install-lockdep +binary-arch: install-kbuild install-usbip install-liblockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif @@ -11,6 +11,8 @@ ifneq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) binary-arch: install-hyperv-daemons endif +binary-indep: install-lockdep + build: $(STAMPS_DIR)/build $(STAMPS_DIR)/build: @@ -105,9 +107,9 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -install-lockdep: DH_OPTIONS = -plockdep -pliblockdep$(VERSION) -pliblockdep-dev -install-lockdep: DIR = $(CURDIR)/debian/tmp -install-lockdep: $(STAMPS_DIR)/build +install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev +install-liblockdep: DIR = $(CURDIR)/debian/tmp +install-liblockdep: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep @@ -128,3 +130,21 @@ install-lockdep: $(STAMPS_DIR)/build dh_gencontrol dh_md5sums dh_builddeb + +install-lockdep: DH_OPTIONS = -plockdep +install-lockdep: DIR = $(CURDIR)/debian/tmp +install-lockdep: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_prep + $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ + DESTDIR=$(DIR) + dh_install + dh_installchangelogs + dh_installdocs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb From 566f58ab6147b76f5a6d844acbbb0140a7428054 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 10 Dec 2015 00:06:41 +0000 Subject: [PATCH 424/487] Update to 4.3 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3b453a535..1f4086792 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.3-1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Thu, 10 Dec 2015 00:04:28 +0000 + linux-tools (4.3~rc5-1~exp2) experimental; urgency=medium * Fix the build-indep and binary-indep targets (fixes FTBFS for arch:all) From e7df5735bc20afaae67ae79b7a658796b1e64ef9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 10 Dec 2015 01:16:55 +0000 Subject: [PATCH 425/487] genorig: Make file list much more selective This removes about 1.2 million lines of dead code. --- debian/bin/genorig.py | 64 +++++++++++++------ ...support-for-__sane_userspace_types__.patch | 24 +++---- 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 2fcfdaadf..ddb29f21d 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -148,26 +148,50 @@ class Main(object): orig = os.path.join(self.dir, self.orig) temp = os.path.join(self.dir, 'temp') - to_copy = ( - 'COPYING', - 'Documentation/locking/lockdep-design.txt', - 'Kbuild', - 'Makefile', - 'arch/*/include/', - 'arch/*/Makefile', - 'arch/mips/Kbuild.platforms', - 'arch/mips/*/Platform', - 'arch/x86/entry/syscalls/', - 'arch/x86/lib/memcpy_64.S', - 'arch/x86/lib/memset_64.S', - 'arch/x86/tools/', - 'include/', - 'kernel/locking/', - 'lib/hweight.c', - 'lib/rbtree.c', - 'scripts/', - 'tools/', - ) + to_copy = [ + 'COPYING', + 'Kbuild', + 'Makefile', + 'arch/*/include/uapi/', + 'arch/*/Makefile', + 'arch/mips/Kbuild.platforms', + 'arch/mips/*/Platform', + 'arch/x86/entry/syscalls/', + 'arch/x86/include/asm/msr-index.h', # belongs in uapi + 'arch/x86/tools/', + 'include/uapi/', + 'scripts/', + 'tools/', + ] + + # Extra files required by kbuild + to_copy += [ + 'include/linux/export.h', + 'include/linux/kbuild.h', + 'include/linux/license.h', + 'include/linux/mod_devicetable.h', + ] + + # Extra files required by lockdep + to_copy += [ + 'Documentation/locking/lockdep-design.txt', + 'include/linux/hash.h', + 'include/linux/list.h', + 'include/linux/lockdep.h', + 'include/linux/poison.h', + 'include/linux/rbtree_augmented.h', + 'kernel/locking/', + ] + + # Extra files required by perf + with open(os.path.join(temp, 'tools/perf/MANIFEST')) as manifest: + for path in manifest: + path = path.strip() + for known in to_copy: + if known[-1] == '/' and path.startswith(known): + break + else: + to_copy.append(path) glob = FileGlob(temp) for i in to_copy: diff --git a/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch b/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch index 3b3e38189..3d6a877bf 100644 --- a/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch +++ b/debian/patches/alpha-uapi-add-support-for-__sane_userspace_types__.patch @@ -18,18 +18,18 @@ Cc: stable@vger.kernel.org arch/alpha/include/uapi/asm/types.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) -diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h -index 4cb4b6d..0bc66e1 100644 ---- a/arch/alpha/include/asm/types.h -+++ b/arch/alpha/include/asm/types.h -@@ -1,6 +1,6 @@ - #ifndef _ALPHA_TYPES_H - #define _ALPHA_TYPES_H - --#include -+#include - - #endif /* _ALPHA_TYPES_H */ +# diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h +# index 4cb4b6d..0bc66e1 100644 +# --- a/arch/alpha/include/asm/types.h +# +++ b/arch/alpha/include/asm/types.h +# @@ -1,6 +1,6 @@ +# #ifndef _ALPHA_TYPES_H +# #define _ALPHA_TYPES_H +# +# -#include +# +#include +# +# #endif /* _ALPHA_TYPES_H */ diff --git a/arch/alpha/include/uapi/asm/types.h b/arch/alpha/include/uapi/asm/types.h index 9fd3cd4..8d1024d 100644 --- a/arch/alpha/include/uapi/asm/types.h From 02e867b636c610e2e3f68864f77a7ae5bd4a7fc8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 10 Dec 2015 02:44:23 +0000 Subject: [PATCH 426/487] Fix parallel builds of both arch and indep binaries A parallel 'debian/rules build' will now invoke 'debian/rules.real build' twice in parallel, which is disastrous. - Add and use proper build-arch and build-indep targets in debian/rules.gen and debian/rules.real - Assign a separate temporary directory to each target in debian/rules.real. Add the directories to .gitignore and the clean rule. - Pull installation of the lockdep wrapper (which is indep) up into debian/rules.real so that we don't end up building liblockdep twice in parallel. --- debian/.gitignore | 1 + debian/bin/gencontrol.py | 2 +- debian/build/tools/lib/lockdep/Makefile | 3 --- debian/lockdep.dirs | 1 + debian/lockdep.install | 1 - debian/rules | 8 +++---- debian/rules.real | 29 +++++++++++++++---------- 7 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 debian/lockdep.dirs delete mode 100644 debian/lockdep.install diff --git a/debian/.gitignore b/debian/.gitignore index c5589b51b..78c29121b 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -7,6 +7,7 @@ *~ .#* /*.substvars +/*-tmp/ /control /control.md5sum /files diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 64fbcf2f0..d299ef252 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -8,7 +8,7 @@ from debian_linux.gencontrol import PackagesList, Makefile, MakeFlags, Gencontro from debian_linux.utils import * class gencontrol(Gencontrol): - makefile_targets = ('binary-arch', 'binary-indep', 'build') + makefile_targets = ('binary-arch', 'binary-indep', 'build-arch', 'build-indep') def __init__(self, underlay = None): self.templates = Templates(['debian/templates']) diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile index 427c0de9b..a0f954fd4 100644 --- a/debian/build/tools/lib/lockdep/Makefile +++ b/debian/build/tools/lib/lockdep/Makefile @@ -21,9 +21,6 @@ install: cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/ ln -s liblockdep.so.$(VERSION) \ $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so -# Upstream lockdep preload script is not suitable for installation - sed 's/@VERSION@/$(VERSION)/' lockdep.in > $(DESTDIR)/usr/bin/lockdep - chmod 755 $(DESTDIR)/usr/bin/lockdep clean: rm -rf out diff --git a/debian/lockdep.dirs b/debian/lockdep.dirs new file mode 100644 index 000000000..e77248175 --- /dev/null +++ b/debian/lockdep.dirs @@ -0,0 +1 @@ +usr/bin diff --git a/debian/lockdep.install b/debian/lockdep.install deleted file mode 100644 index 236942003..000000000 --- a/debian/lockdep.install +++ /dev/null @@ -1 +0,0 @@ -usr/bin/lockdep diff --git a/debian/rules b/debian/rules index ee262a9fc..dad5e2ed7 100755 --- a/debian/rules +++ b/debian/rules @@ -11,13 +11,11 @@ build: build-arch build-indep build-arch: debian/control dh_testdir - $(MAKE) -f debian/rules.gen build + $(MAKE) -f debian/rules.gen build-arch -# XXX All we really need to do is to generate the lockdep script, -# but for now we take the stupid option of building everything. build-indep: debian/control dh_testdir - $(MAKE) -f debian/rules.gen build + $(MAKE) -f debian/rules.gen build-indep DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz @@ -42,7 +40,7 @@ maintainerclean: clean: debian/control dh_testdir make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ + rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp dh_clean binary-indep: diff --git a/debian/rules.real b/debian/rules.real index 303e16579..1eb2cf8e4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -13,7 +13,9 @@ endif binary-indep: install-lockdep -build: $(STAMPS_DIR)/build +build-arch: $(STAMPS_DIR)/build + +build-indep: $(STAMPS_DIR)/build: $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) @@ -63,14 +65,14 @@ install-perf: $(STAMPS_DIR)/build dh_builddeb install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip -install-usbip: DIR = $(CURDIR)/debian/tmp +install-usbip: DIR = $(CURDIR)/debian/usbip-tmp install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/out/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep $(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) - dh_install + dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs dh_lintian @@ -108,16 +110,16 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_builddeb install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev -install-liblockdep: DIR = $(CURDIR)/debian/tmp +install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp install-liblockdep: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ DESTDIR=$(DIR) - env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) \ + env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \ 'usr/lib/*/liblockdep.so.*' - dh_install + dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs dh_strip @@ -131,15 +133,18 @@ install-liblockdep: $(STAMPS_DIR)/build dh_md5sums dh_builddeb -install-lockdep: DH_OPTIONS = -plockdep -install-lockdep: DIR = $(CURDIR)/debian/tmp -install-lockdep: $(STAMPS_DIR)/build +install-lockdep: PACKAGE_NAME = lockdep +install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME) +install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-lockdep: dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ - DESTDIR=$(DIR) - dh_install + dh_installdirs +# Upstream lockdep preload script is not suitable for installation + sed 's/@VERSION@/$(VERSION)/' $(BUILD_DIR)/tools/lib/lockdep/lockdep.in \ + > $(DIR)/usr/bin/lockdep + chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs dh_installdocs dh_compress From 035db8b49dc38c2c6fd07552270db6232ead6b4a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 13 Dec 2015 03:47:05 +0000 Subject: [PATCH 427/487] Prepare to release linux-tools (4.3-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1f4086792..e1c416dca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (4.3-1) UNRELEASED; urgency=medium +linux-tools (4.3-1) unstable; urgency=medium * New upstream release - -- Ben Hutchings Thu, 10 Dec 2015 00:04:28 +0000 + -- Ben Hutchings Sun, 13 Dec 2015 03:47:05 +0000 linux-tools (4.3~rc5-1~exp2) experimental; urgency=medium From d5db520e0772b183dcf93215d71c72b7ab77f189 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 00:15:48 +0000 Subject: [PATCH 428/487] Update to 4.3.1 This adds #AC to SVM_EXIT_REASONS as part of the fix for CVE-2015-5307, which makes a small change to perf. However the real reason to update is so that we can include more files in the orig tarball. --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index e1c416dca..729b406b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.3.1-1) UNRELEASED; urgency=medium + + * New upstream stable update + - [x86] Add #AC to SVM_EXIT_REASONS + + -- Ben Hutchings Mon, 14 Dec 2015 00:13:52 +0000 + linux-tools (4.3-1) unstable; urgency=medium * New upstream release From e221f869d038f881acf8af970912de3b2df6404c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 00:17:57 +0000 Subject: [PATCH 429/487] debian/bin/genorig.py: Add more files under arch/*/include/asm to file list Fixes FTBFS on several architectures. --- debian/bin/genorig.py | 2 ++ debian/changelog | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index ddb29f21d..97183eb4d 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -152,8 +152,10 @@ class Main(object): 'COPYING', 'Kbuild', 'Makefile', + 'arch/*/include/asm/Kbuild', # may select generic uapi headers 'arch/*/include/uapi/', 'arch/*/Makefile', + 'arch/arm/include/asm/types.h', # belongs in uapi 'arch/mips/Kbuild.platforms', 'arch/mips/*/Platform', 'arch/x86/entry/syscalls/', diff --git a/debian/changelog b/debian/changelog index 729b406b2..ec1cfb62d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,10 @@ linux-tools (4.3.1-1) UNRELEASED; urgency=medium * New upstream stable update - [x86] Add #AC to SVM_EXIT_REASONS + [ Ben Hutchings ] + * debian/bin/genorig.py: Add more files under arch/*/include/asm to file list + (fixes FTBFS on several architectures) + -- Ben Hutchings Mon, 14 Dec 2015 00:13:52 +0000 linux-tools (4.3-1) unstable; urgency=medium From d68eb02a7bb9fe71b7894e92e47dd565f139088e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 00:43:39 +0000 Subject: [PATCH 430/487] Prepare to release linux-tools (4.3.1-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ec1cfb62d..252fecebf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.3.1-1) UNRELEASED; urgency=medium +linux-tools (4.3.1-1) unstable; urgency=medium * New upstream stable update - [x86] Add #AC to SVM_EXIT_REASONS @@ -7,7 +7,7 @@ linux-tools (4.3.1-1) UNRELEASED; urgency=medium * debian/bin/genorig.py: Add more files under arch/*/include/asm to file list (fixes FTBFS on several architectures) - -- Ben Hutchings Mon, 14 Dec 2015 00:13:52 +0000 + -- Ben Hutchings Mon, 14 Dec 2015 00:43:39 +0000 linux-tools (4.3-1) unstable; urgency=medium From e808d0a3f78df7da37b1b6ff6a851cd11298565f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 00:48:40 +0000 Subject: [PATCH 431/487] Update to 4.4-rc4 --- debian/changelog | 6 ++++++ debian/patches/lockdep-fix-headers.patch | 19 ------------------- debian/patches/series | 1 - 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 debian/patches/lockdep-fix-headers.patch diff --git a/debian/changelog b/debian/changelog index 252fecebf..bb71f2de5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4~rc4-1~exp1) UNRELEASED; urgency=medium + + * New upstream release candidate + + -- Ben Hutchings Mon, 14 Dec 2015 00:48:22 +0000 + linux-tools (4.3.1-1) unstable; urgency=medium * New upstream stable update diff --git a/debian/patches/lockdep-fix-headers.patch b/debian/patches/lockdep-fix-headers.patch deleted file mode 100644 index e2c1db8e7..000000000 --- a/debian/patches/lockdep-fix-headers.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Ben Hutchings -Date: Thu, 13 Aug 2015 20:48:12 +0200 -Subject: liblockdep: Define WRITE_ONCE(), used by . - -Signed-off-by: Ben Hutchings ---- ---- a/tools/lib/lockdep/uinclude/linux/compiler.h -+++ b/tools/lib/lockdep/uinclude/linux/compiler.h -@@ -4,4 +4,10 @@ - #define __used __attribute__((__unused__)) - #define unlikely - -+#define __ACCESS_ONCE(x) ({ \ -+ __attribute__((__unused__)) typeof(x) __var = (__force typeof(x)) 0; \ -+ (volatile typeof(x) *)&(x); }) -+#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x)) -+#define WRITE_ONCE(x, val) (ACCESS_ONCE(x) = (val)) -+ - #endif diff --git a/debian/patches/series b/debian/patches/series index d5becb893..c8eedbf7f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,7 +7,6 @@ kbuild-fix-recordmcount-dependency.patch usbip-include-uninstalled-linux-usbip-h.patch tools-perf-man-date.patch lockdep-fix-oot-build.patch -lockdep-fix-headers.patch lockdep-fix-soname.patch tools-perf-remove-shebangs.patch tools-lib-traceevent-use-ldflags.patch From c353d9e9f83eac43bf4f458b26d0fa7903ec50bf Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 01:16:03 +0000 Subject: [PATCH 432/487] Fix reference to non-UAPI in include/uapi/linux/Kbuild --- ...ling-kernel-only-linux-nvme.h-as-uap.patch | 23 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 24 insertions(+) create mode 100644 debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch diff --git a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch new file mode 100644 index 000000000..633b219e6 --- /dev/null +++ b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch @@ -0,0 +1,23 @@ +From: Ben Hutchings +Date: Mon, 14 Dec 2015 01:09:32 +0000 +Subject: nvme: Stop installing kernel-only as UAPI +Forwarded: http://mid.gmane.org/20151214011442.GL28542@decadent.org.uk + +Fixes: 9d99a8dda154 ("nvme: move hardware structures out of the uapi ...") +Signed-off-by: Ben Hutchings +--- + include/uapi/linux/Kbuild | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild +index 628e6e6..41652af 100644 +--- a/include/uapi/linux/Kbuild ++++ b/include/uapi/linux/Kbuild +@@ -306,7 +306,6 @@ header-y += nfs_mount.h + header-y += nl80211.h + header-y += n_r3964.h + header-y += nubus.h +-header-y += nvme.h + header-y += nvram.h + header-y += omap3isp.h + header-y += omapfb.h diff --git a/debian/patches/series b/debian/patches/series index c8eedbf7f..880f2ac05 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch +nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch From 4de0426133505b0a010a0764bf88c89268b94257 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 14 Dec 2015 01:28:50 +0000 Subject: [PATCH 433/487] Prepare to release linux-tools (4.4~rc4-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bb71f2de5..d9ecc4f4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (4.4~rc4-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.4~rc4-1~exp1) experimental; urgency=medium * New upstream release candidate - -- Ben Hutchings Mon, 14 Dec 2015 00:48:22 +0000 + -- Ben Hutchings Mon, 14 Dec 2015 01:28:50 +0000 linux-tools (4.3.1-1) unstable; urgency=medium From 291e65ffd0df775f60818568a9f63aa2b0662bb2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Dec 2015 03:47:50 +0000 Subject: [PATCH 434/487] debian/rules: Fix check for binNMU, broken since 4.1.4-1 --- debian/changelog | 6 ++++++ debian/rules | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 252fecebf..dc0f83c82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.3.1-2) UNRELEASED; urgency=medium + + * debian/rules: Fix check for binNMU, broken since 4.1.4-1 + + -- Ben Hutchings Sat, 19 Dec 2015 03:47:10 +0000 + linux-tools (4.3.1-1) unstable; urgency=medium * New upstream stable update diff --git a/debian/rules b/debian/rules index dad5e2ed7..36a278d58 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,11 @@ #!/usr/bin/make -f SHELL := sh -e -VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') include debian/rules.defs +VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') + MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) build: build-arch build-indep From 0dcb7d42987bdeee8ecd1c02081b65db05aa706e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 19 Dec 2015 03:48:51 +0000 Subject: [PATCH 435/487] Upload for Perl 5.22 transition (Closes: #808329) --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index dc0f83c82..4e9b9d31c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -linux-tools (4.3.1-2) UNRELEASED; urgency=medium +linux-tools (4.3.1-2) unstable; urgency=medium + * Upload for Perl 5.22 transition (Closes: #808329) * debian/rules: Fix check for binNMU, broken since 4.1.4-1 -- Ben Hutchings Sat, 19 Dec 2015 03:47:10 +0000 From 23e312bd0c9b6ccb2db9e27b3e475f779c179670 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 00:04:38 +0000 Subject: [PATCH 436/487] Update to 4.4 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d9ecc4f4a..6515c7c39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 + linux-tools (4.4~rc4-1~exp1) experimental; urgency=medium * New upstream release candidate From ea4dea20adf600dbdc7327765ff4aaf190c6d8fc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 00:18:11 +0000 Subject: [PATCH 437/487] linux-perf: Fix reading of build-id from vDSO --- debian/changelog | 3 +++ ...ls-fix-reading-of-build-id-from-vdso.patch | 26 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+) create mode 100644 debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch diff --git a/debian/changelog b/debian/changelog index a111dd24f..db23e48d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium * New upstream release + [ Ben Hutchings ] + * linux-perf: Fix reading of build-id from vDSO + -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 linux-tools (4.4~rc4-1~exp1) experimental; urgency=medium diff --git a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch new file mode 100644 index 000000000..7ca7c0c57 --- /dev/null +++ b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch @@ -0,0 +1,26 @@ +From: Ben Hutchings +Date: Wed, 13 Jan 2016 15:16:30 +0000 +Subject: perf tools: Fix reading of build-id from vDSO +Forwarded: http://mid.gmane.org/20160113172301.GT28542@decadent.org.uk + +We need to use the long name (the filename) when reading the build-id +from a DSO. Using the short name doesn't work for (at least) vDSOs. + +Signed-off-by: Ben Hutchings +--- + tools/perf/util/symbol.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c +index cd08027..b60bc49 100644 +--- a/tools/perf/util/symbol.c ++++ b/tools/perf/util/symbol.c +@@ -1465,7 +1465,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter) + * Read the build id if possible. This is required for + * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work + */ +- if (filename__read_build_id(dso->name, build_id, BUILD_ID_SIZE) > 0) ++ if (filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0) + dso__set_build_id(dso, build_id); + + /* diff --git a/debian/patches/series b/debian/patches/series index 880f2ac05..d2ab6e491 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch +perf-tools-fix-reading-of-build-id-from-vdso.patch From 6a920e68459a07c5b2bb8125a640231fef9454f6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 00:24:30 +0000 Subject: [PATCH 438/487] linux-perf: Leave -rc suffix out of version in package description --- debian/changelog | 1 + debian/templates/control.main.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index db23e48d7..a46a17db1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * linux-perf: Fix reading of build-id from vDSO + * linux-perf: Leave -rc suffix out of version in package description -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 4de03fb13..6106752f6 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -14,9 +14,9 @@ Provides: linux-tools-@version@ Conflicts: linux-tools-@version@ Replaces: linux-tools-@version@ Suggests: linux-doc-@version@ -Description: Performance analysis tools for Linux @upstreamversion@ +Description: Performance analysis tools for Linux @version@ This package contains the 'perf' performance analysis tools for Linux - kernel version @upstreamversion@. + kernel version @version@. . The linux-base package contains a 'perf' command which will invoke the appropriate version for the running kernel. From 56b9798cd8b341f5dd12d3885563639c19c573a8 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 8 Jan 2016 12:15:30 +0000 Subject: [PATCH 439/487] debian.py: Implement stable order of fields not in the predefined order --- debian/changelog | 1 + debian/lib/python/debian_linux/debian.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a46a17db1..f4beb3302 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * linux-perf: Fix reading of build-id from vDSO * linux-perf: Leave -rc suffix out of version in package description + * debian.py: Implement stable order of fields not in the predefined order -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py index 00db2c316..1df0a1b69 100644 --- a/debian/lib/python/debian_linux/debian.py +++ b/debian/lib/python/debian_linux/debian.py @@ -424,7 +424,7 @@ class Package(dict): if i in self: keys.remove(i) yield i - for i in keys: + for i in sorted(list(keys)): yield i def iteritems(self): From 6f7f065366ad3526ba86cac966f683cb6c657a1c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 8 Jan 2016 19:31:40 +0000 Subject: [PATCH 440/487] genorig.py: Make orig tarballs really reproducible - Override umask while extracting/exporting files - Override user and group names in tarball --- debian/bin/genorig.py | 5 ++++- debian/changelog | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 97183eb4d..f1f942335 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -73,6 +73,7 @@ class Main(object): def __call__(self): import tempfile self.dir = tempfile.mkdtemp(prefix='genorig', dir='debian') + old_umask = os.umask(0o022) try: if os.path.isdir(self.input_files[0]): self.upstream_export(self.input_files[0]) @@ -92,8 +93,10 @@ class Main(object): .st_mtime)) self.generate() + os.umask(old_umask) self.tar(orig_date) finally: + os.umask(old_umask) shutil.rmtree(self.dir) def upstream_export(self, input_repo): @@ -222,7 +225,7 @@ class Main(object): self.log("Generate tarball %s\n" % out) cmdline = '''(cd '%s' && find '%s' -print0) | LC_ALL=C sort -z | - tar -C '%s' --no-recursion --null -T - --mtime '%s' -caf '%s' + tar -C '%s' --no-recursion --null -T - --mtime '%s' --owner root --group root -caf '%s' ''' % (self.dir, self.orig, self.dir, orig_date, out) try: if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', cmdline]): diff --git a/debian/changelog b/debian/changelog index f4beb3302..283966313 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium * linux-perf: Fix reading of build-id from vDSO * linux-perf: Leave -rc suffix out of version in package description * debian.py: Implement stable order of fields not in the predefined order + * genorig.py: Make orig tarballs really reproducible: + - Override umask while extracting/exporting files + - Override user and group names in tarball -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 From ec2f54f0aa9a73a02fbeb61d6895558566d45f3b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 00:31:02 +0000 Subject: [PATCH 441/487] Prepare to release linux-tools (4.4-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 283966313..009da019f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.4-1~exp1) experimental; urgency=medium * New upstream release @@ -10,7 +10,7 @@ linux-tools (4.4-1~exp1) UNRELEASED; urgency=medium - Override umask while extracting/exporting files - Override user and group names in tarball - -- Ben Hutchings Tue, 19 Jan 2016 00:04:27 +0000 + -- Ben Hutchings Tue, 19 Jan 2016 00:31:02 +0000 linux-tools (4.4~rc4-1~exp1) experimental; urgency=medium From 68515dfcb9fda1e008c2e30d294bdd65ba9a6253 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 19 Jan 2016 22:03:05 +0000 Subject: [PATCH 442/487] linux-perf: Fix FTBFS with gcc 6 (used on hppa, sparc64) --- debian/changelog | 6 ++ ...f-add-missing-braces-to-if-statement.patch | 30 ++++++++ ...ingly-indented-assignment-whitespace.patch | 26 +++++++ ...remove-wrong-semicolon-in-while-loop.patch | 26 +++++++ ...nused-variables-x86_-32-64-_regoffse.patch | 75 +++++++++++++++++++ debian/patches/series | 4 + 6 files changed, 167 insertions(+) create mode 100644 debian/patches/perf-add-missing-braces-to-if-statement.patch create mode 100644 debian/patches/perf-fix-misleadingly-indented-assignment-whitespace.patch create mode 100644 debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch create mode 100644 debian/patches/perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch diff --git a/debian/changelog b/debian/changelog index 009da019f..b375ed2cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4-1~exp2) experimental; urgency=medium + + * linux-perf: Fix FTBFS with gcc 6 (used on hppa, sparc64) + + -- Ben Hutchings Tue, 19 Jan 2016 22:11:13 +0000 + linux-tools (4.4-1~exp1) experimental; urgency=medium * New upstream release diff --git a/debian/patches/perf-add-missing-braces-to-if-statement.patch b/debian/patches/perf-add-missing-braces-to-if-statement.patch new file mode 100644 index 000000000..e56236650 --- /dev/null +++ b/debian/patches/perf-add-missing-braces-to-if-statement.patch @@ -0,0 +1,30 @@ +From: Markus Trippelsdorf +Subject: Add missing braces to if statement +Date: Mon, 14 Dec 2015 16:44:03 +0100 +Origin: http://article.gmane.org/gmane.linux.kernel/2108038 + +Add missing braces to if statement. + +The issue was pointed out by gcc-6's -Wmisleading-indentation. + +Acked-by: Ingo Molnar +Signed-off-by: Markus Trippelsdorf +--- +diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c +index d4d7cc27252f..718bd46d47fa 100644 +--- a/tools/perf/ui/browsers/annotate.c ++++ b/tools/perf/ui/browsers/annotate.c +@@ -755,11 +755,11 @@ static int annotate_browser__run(struct annotate_browser *browser, + nd = browser->curr_hot; + break; + case K_UNTAB: +- if (nd != NULL) ++ if (nd != NULL) { + nd = rb_next(nd); + if (nd == NULL) + nd = rb_first(&browser->entries); +- else ++ } else + nd = browser->curr_hot; + break; + case K_F1: diff --git a/debian/patches/perf-fix-misleadingly-indented-assignment-whitespace.patch b/debian/patches/perf-fix-misleadingly-indented-assignment-whitespace.patch new file mode 100644 index 000000000..a9bf0895f --- /dev/null +++ b/debian/patches/perf-fix-misleadingly-indented-assignment-whitespace.patch @@ -0,0 +1,26 @@ +From: Markus Trippelsdorf +Subject: Fix misleadingly indented assignment (whitespace) +Date: Mon, 14 Dec 2015 16:44:40 +0100 +Origin: http://article.gmane.org/gmane.linux.kernel/2108042 + +Fix misleadingly indented assignment. +This is just a simple whitespace fix. + +The issue was pointed out by gcc-6's -Wmisleading-indentation. + +Acked-by: Ingo Molnar +Signed-off-by: Markus Trippelsdorf +--- +diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c +index e4b173dec4b9..c900b664ab8f 100644 +--- a/tools/perf/util/pmu.c ++++ b/tools/perf/util/pmu.c +@@ -153,7 +153,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n + if (fd == -1) + return -1; + +- sret = read(fd, alias->unit, UNIT_MAX_LEN); ++ sret = read(fd, alias->unit, UNIT_MAX_LEN); + if (sret < 0) + goto error; + diff --git a/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch b/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch new file mode 100644 index 000000000..9a8c03722 --- /dev/null +++ b/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch @@ -0,0 +1,26 @@ +From: Markus Trippelsdorf +Subject: Remove wrong semicolon in while loop +Date: Mon, 14 Dec 2015 16:43:35 +0100 +Origin: http://article.gmane.org/gmane.linux.kernel/2108037 + +The while loop was spinning. Fix by removing a semicolon. + +The issue was pointed out by gcc-6's -Wmisleading-indentation. + +Reviewed-by: Matt Fleming +Acked-by: Ingo Molnar +Signed-off-by: Markus Trippelsdorf +--- +diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c +index d28c1b6a3b54..fa5d17af88b7 100644 +--- a/tools/perf/arch/x86/tests/intel-cqm.c ++++ b/tools/perf/arch/x86/tests/intel-cqm.c +@@ -17,7 +17,7 @@ static pid_t spawn(void) + if (pid) + return pid; + +- while(1); ++ while(1) + sleep(5); + return 0; + } diff --git a/debian/patches/perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch b/debian/patches/perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch new file mode 100644 index 000000000..96141eefb --- /dev/null +++ b/debian/patches/perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch @@ -0,0 +1,75 @@ +From: Ben Hutchings +Date: Tue, 19 Jan 2016 21:12:41 +0000 +Subject: perf tools: Fix unused variables: x86_{32,64}_regoffset_table +Forwarded: http://mid.gmane.org/20160119213306.GE2637@decadent.org.uk + +gcc 5 doesn't seem to care about these, but gcc 6 does and that +results in a build failure. + +Fixes: bbbe6bf6037d ("perf tools: Introduce regs_query_register_offset() ...") +Signed-off-by: Ben Hutchings +--- + tools/perf/arch/x86/util/dwarf-regs.c | 38 ++++++++++++++++------------------- + 1 file changed, 17 insertions(+), 21 deletions(-) + +diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c +index 9223c16..fe1e516 100644 +--- a/tools/perf/arch/x86/util/dwarf-regs.c ++++ b/tools/perf/arch/x86/util/dwarf-regs.c +@@ -55,26 +55,10 @@ struct pt_regs_offset { + + #define REG_OFFSET_END {.name = NULL, .offset = 0} + ++/* TODO: switching by dwarf address size */ + #ifdef __x86_64__ +-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} +-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1} +-#else +-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1} +-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} +-#endif +- +-static const struct pt_regs_offset x86_32_regoffset_table[] = { +- REG_OFFSET_NAME_32("%ax", eax), +- REG_OFFSET_NAME_32("%cx", ecx), +- REG_OFFSET_NAME_32("%dx", edx), +- REG_OFFSET_NAME_32("%bx", ebx), +- REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */ +- REG_OFFSET_NAME_32("%bp", ebp), +- REG_OFFSET_NAME_32("%si", esi), +- REG_OFFSET_NAME_32("%di", edi), +- REG_OFFSET_END, +-}; + ++#define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} + static const struct pt_regs_offset x86_64_regoffset_table[] = { + REG_OFFSET_NAME_64("%ax", rax), + REG_OFFSET_NAME_64("%dx", rdx), +@@ -94,12 +78,24 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = { + REG_OFFSET_NAME_64("%r15", r15), + REG_OFFSET_END, + }; +- +-/* TODO: switching by dwarf address size */ +-#ifdef __x86_64__ + #define regoffset_table x86_64_regoffset_table ++ + #else ++ ++#define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)} ++static const struct pt_regs_offset x86_32_regoffset_table[] = { ++ REG_OFFSET_NAME_32("%ax", eax), ++ REG_OFFSET_NAME_32("%cx", ecx), ++ REG_OFFSET_NAME_32("%dx", edx), ++ REG_OFFSET_NAME_32("%bx", ebx), ++ REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */ ++ REG_OFFSET_NAME_32("%bp", ebp), ++ REG_OFFSET_NAME_32("%si", esi), ++ REG_OFFSET_NAME_32("%di", edi), ++ REG_OFFSET_END, ++}; + #define regoffset_table x86_32_regoffset_table ++ + #endif + + /* Minus 1 for the ending REG_OFFSET_END */ diff --git a/debian/patches/series b/debian/patches/series index d2ab6e491..004a5caba 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,3 +16,7 @@ revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch perf-tools-fix-reading-of-build-id-from-vdso.patch +perf-fix-misleadingly-indented-assignment-whitespace.patch +perf-add-missing-braces-to-if-statement.patch +perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch +perf-remove-wrong-semicolon-in-while-loop.patch From d7161dc252cffcc1fecb7ba45b45b322b0b5a80a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Feb 2016 01:33:13 +0000 Subject: [PATCH 443/487] Prepare to release linux-tools (4.4-1). --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index b375ed2cd..84e423a85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4-1) unstable; urgency=medium + + * Upload to unstable + + -- Ben Hutchings Thu, 18 Feb 2016 01:30:50 +0000 + linux-tools (4.4-1~exp2) experimental; urgency=medium * linux-perf: Fix FTBFS with gcc 6 (used on hppa, sparc64) From c536b8098a2aa13b69e16cbbbd82fc3d9dd2f623 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Feb 2016 03:19:23 +0000 Subject: [PATCH 444/487] Update to 4.5-rc4 Drop/refresh patches as appropriate. --- debian/changelog | 6 ++++ debian/patches/lockdep-fix-oot-build.patch | 10 +++---- ...ling-kernel-only-linux-nvme.h-as-uap.patch | 23 -------------- ...f-add-missing-braces-to-if-statement.patch | 30 ------------------- ...remove-wrong-semicolon-in-while-loop.patch | 26 ---------------- ...ls-fix-reading-of-build-id-from-vdso.patch | 26 ---------------- debian/patches/series | 4 --- debian/patches/tools-perf-install.patch | 8 +++-- debian/patches/tools-perf-version.patch | 16 +++++----- 9 files changed, 25 insertions(+), 124 deletions(-) delete mode 100644 debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch delete mode 100644 debian/patches/perf-add-missing-braces-to-if-statement.patch delete mode 100644 debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch delete mode 100644 debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch diff --git a/debian/changelog b/debian/changelog index 84e423a85..66bbdd24a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium + + * New upstream release candidate + + -- Ben Hutchings Thu, 18 Feb 2016 03:19:14 +0000 + linux-tools (4.4-1) unstable; urgency=medium * Upload to unstable diff --git a/debian/patches/lockdep-fix-oot-build.patch b/debian/patches/lockdep-fix-oot-build.patch index 03bc43298..c1b82e2b4 100644 --- a/debian/patches/lockdep-fix-oot-build.patch +++ b/debian/patches/lockdep-fix-oot-build.patch @@ -6,7 +6,7 @@ Signed-off-by: Ben Hutchings --- --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile -@@ -98,7 +98,7 @@ build := -f $(srctree)/tools/build/Makef +@@ -100,7 +100,7 @@ include $(srctree)/tools/build/Makefile. do_compile_shared_library = \ ($(print_shared_lib_compile) \ @@ -15,7 +15,7 @@ Signed-off-by: Ben Hutchings do_build_static_lib = \ ($(print_static_lib_build) \ -@@ -116,10 +116,10 @@ all_cmd: $(CMD_TARGETS) +@@ -118,10 +118,10 @@ all_cmd: $(CMD_TARGETS) $(LIB_IN): force $(Q)$(MAKE) $(build)=liblockdep @@ -28,12 +28,12 @@ Signed-off-by: Ben Hutchings $(Q)$(do_build_static_lib) tags: force -@@ -147,7 +147,7 @@ install_lib: all_cmd +@@ -149,7 +149,7 @@ install_lib: all_cmd install: install_lib clean: -- $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d -+ $(RM) $(OUTPUT)*.o *~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*liblockdep*.so* $(VERSION_FILES) $(OUTPUT).*.d +- $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d .*.cmd ++ $(RM) $(OUTPUT)*.o *~ $(TARGETS) $(OUTPUT)*.a $(OUTPUT)*liblockdep*.so* $(VERSION_FILES) $(OUTPUT).*.d $(OUTPUT).*.cmd $(RM) tags TAGS PHONY += force diff --git a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch deleted file mode 100644 index 633b219e6..000000000 --- a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Ben Hutchings -Date: Mon, 14 Dec 2015 01:09:32 +0000 -Subject: nvme: Stop installing kernel-only as UAPI -Forwarded: http://mid.gmane.org/20151214011442.GL28542@decadent.org.uk - -Fixes: 9d99a8dda154 ("nvme: move hardware structures out of the uapi ...") -Signed-off-by: Ben Hutchings ---- - include/uapi/linux/Kbuild | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild -index 628e6e6..41652af 100644 ---- a/include/uapi/linux/Kbuild -+++ b/include/uapi/linux/Kbuild -@@ -306,7 +306,6 @@ header-y += nfs_mount.h - header-y += nl80211.h - header-y += n_r3964.h - header-y += nubus.h --header-y += nvme.h - header-y += nvram.h - header-y += omap3isp.h - header-y += omapfb.h diff --git a/debian/patches/perf-add-missing-braces-to-if-statement.patch b/debian/patches/perf-add-missing-braces-to-if-statement.patch deleted file mode 100644 index e56236650..000000000 --- a/debian/patches/perf-add-missing-braces-to-if-statement.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Markus Trippelsdorf -Subject: Add missing braces to if statement -Date: Mon, 14 Dec 2015 16:44:03 +0100 -Origin: http://article.gmane.org/gmane.linux.kernel/2108038 - -Add missing braces to if statement. - -The issue was pointed out by gcc-6's -Wmisleading-indentation. - -Acked-by: Ingo Molnar -Signed-off-by: Markus Trippelsdorf ---- -diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c -index d4d7cc27252f..718bd46d47fa 100644 ---- a/tools/perf/ui/browsers/annotate.c -+++ b/tools/perf/ui/browsers/annotate.c -@@ -755,11 +755,11 @@ static int annotate_browser__run(struct annotate_browser *browser, - nd = browser->curr_hot; - break; - case K_UNTAB: -- if (nd != NULL) -+ if (nd != NULL) { - nd = rb_next(nd); - if (nd == NULL) - nd = rb_first(&browser->entries); -- else -+ } else - nd = browser->curr_hot; - break; - case K_F1: diff --git a/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch b/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch deleted file mode 100644 index 9a8c03722..000000000 --- a/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Markus Trippelsdorf -Subject: Remove wrong semicolon in while loop -Date: Mon, 14 Dec 2015 16:43:35 +0100 -Origin: http://article.gmane.org/gmane.linux.kernel/2108037 - -The while loop was spinning. Fix by removing a semicolon. - -The issue was pointed out by gcc-6's -Wmisleading-indentation. - -Reviewed-by: Matt Fleming -Acked-by: Ingo Molnar -Signed-off-by: Markus Trippelsdorf ---- -diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c -index d28c1b6a3b54..fa5d17af88b7 100644 ---- a/tools/perf/arch/x86/tests/intel-cqm.c -+++ b/tools/perf/arch/x86/tests/intel-cqm.c -@@ -17,7 +17,7 @@ static pid_t spawn(void) - if (pid) - return pid; - -- while(1); -+ while(1) - sleep(5); - return 0; - } diff --git a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch deleted file mode 100644 index 7ca7c0c57..000000000 --- a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Ben Hutchings -Date: Wed, 13 Jan 2016 15:16:30 +0000 -Subject: perf tools: Fix reading of build-id from vDSO -Forwarded: http://mid.gmane.org/20160113172301.GT28542@decadent.org.uk - -We need to use the long name (the filename) when reading the build-id -from a DSO. Using the short name doesn't work for (at least) vDSOs. - -Signed-off-by: Ben Hutchings ---- - tools/perf/util/symbol.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c -index cd08027..b60bc49 100644 ---- a/tools/perf/util/symbol.c -+++ b/tools/perf/util/symbol.c -@@ -1465,7 +1465,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter) - * Read the build id if possible. This is required for - * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work - */ -- if (filename__read_build_id(dso->name, build_id, BUILD_ID_SIZE) > 0) -+ if (filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0) - dso__set_build_id(dso, build_id); - - /* diff --git a/debian/patches/series b/debian/patches/series index 004a5caba..1fdb100a8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,9 +14,5 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch -nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch -perf-tools-fix-reading-of-build-id-from-vdso.patch perf-fix-misleadingly-indented-assignment-whitespace.patch -perf-add-missing-braces-to-if-statement.patch perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch -perf-remove-wrong-semicolon-in-while-loop.patch diff --git a/debian/patches/tools-perf-install.patch b/debian/patches/tools-perf-install.patch index 268aee08f..8d3ede9ff 100644 --- a/debian/patches/tools-perf-install.patch +++ b/debian/patches/tools-perf-install.patch @@ -7,7 +7,7 @@ Forwarded: no --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -510,8 +510,8 @@ endif +@@ -563,8 +563,8 @@ endif ifndef NO_LIBPERL $(call QUIET_INSTALL, perl-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ @@ -18,7 +18,7 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' endif -@@ -519,20 +519,20 @@ ifndef NO_LIBPYTHON +@@ -572,23 +572,23 @@ ifndef NO_LIBPYTHON $(call QUIET_INSTALL, python-scripts) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ @@ -32,6 +32,10 @@ Forwarded: no $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ - $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ +- $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' ++ $(INSTALL) -m 644 Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' install-tests: all install-gtk $(call QUIET_INSTALL, tests) \ diff --git a/debian/patches/tools-perf-version.patch b/debian/patches/tools-perf-version.patch index 153633f87..f9fa2ca5b 100644 --- a/debian/patches/tools-perf-version.patch +++ b/debian/patches/tools-perf-version.patch @@ -9,7 +9,7 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf -@@ -491,18 +491,18 @@ install-gtk: +@@ -539,18 +539,18 @@ install-gtk: install-tools: all install-gtk $(call QUIET_INSTALL, binaries) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ @@ -34,16 +34,16 @@ version-dependent name. And do the same for trace.] $(call QUIET_INSTALL, perf-archive) \ $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' $(call QUIET_INSTALL, perf-with-kcore) \ -@@ -525,7 +525,7 @@ ifndef NO_LIBPYTHON +@@ -578,7 +578,7 @@ ifndef NO_LIBPYTHON endif $(call QUIET_INSTALL, perf_completion-script) \ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ - $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' - - install-tests: all install-gtk - $(call QUIET_INSTALL, tests) \ -@@ -543,7 +543,7 @@ install-python_ext: + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ + $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' +@@ -599,7 +599,7 @@ install-python_ext: # 'make install-doc' should call 'make -C Documentation install' $(INSTALL_DOC_TARGETS): @@ -79,8 +79,8 @@ version-dependent name. And do the same for trace.] --- a/tools/perf/util/Build +++ b/tools/perf/util/Build -@@ -130,6 +130,7 @@ CFLAGS_find_next_bit.o += -Wno-unused-pa - CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" +@@ -138,6 +138,7 @@ CFLAGS_rbtree.o += -Wno-unused-pa + CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" CFLAGS_parse-events.o += -Wno-redundant-decls +CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' From 32be752344acb9d171a1fd9d4d8e02ebdf3d6e48 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Feb 2016 04:14:17 +0000 Subject: [PATCH 445/487] lockdep: Add missing macros --- debian/changelog | 3 ++ .../patches/lockdep-add-missing-macros.patch | 32 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 36 insertions(+) create mode 100644 debian/patches/lockdep-add-missing-macros.patch diff --git a/debian/changelog b/debian/changelog index 66bbdd24a..6132e475f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium * New upstream release candidate + [ Ben Hutchings ] + * lockdep: Add missing macros + -- Ben Hutchings Thu, 18 Feb 2016 03:19:14 +0000 linux-tools (4.4-1) unstable; urgency=medium diff --git a/debian/patches/lockdep-add-missing-macros.patch b/debian/patches/lockdep-add-missing-macros.patch new file mode 100644 index 000000000..c5691a19e --- /dev/null +++ b/debian/patches/lockdep-add-missing-macros.patch @@ -0,0 +1,32 @@ +From: Ben Hutchings +Date: Thu, 18 Feb 2016 03:34:25 +0000 +Subject: lockdep: Add missing macros + +liblockdep is broken again due to lockdep using kernel macros that it +doesn't have substitutes for. +--- +--- a/tools/lib/lockdep/uinclude/linux/kernel.h ++++ b/tools/lib/lockdep/uinclude/linux/kernel.h +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #ifndef container_of + #define container_of(ptr, type, member) ({ \ +--- a/tools/lib/lockdep/uinclude/linux/list.h ++++ b/tools/lib/lockdep/uinclude/linux/list.h +@@ -1 +1,2 @@ + #include "../../../include/linux/list.h" ++#define hlist_for_each_entry_rcu hlist_for_each_entry +--- a/tools/lib/lockdep/uinclude/linux/compiler.h ++++ b/tools/lib/lockdep/uinclude/linux/compiler.h +@@ -3,6 +3,7 @@ + + #define __used __attribute__((__unused__)) + #define unlikely ++#define READ_ONCE(x) (x) + #define WRITE_ONCE(x, val) x=(val) + #define RCU_INIT_POINTER(p, v) p=(v) + diff --git a/debian/patches/series b/debian/patches/series index 1fdb100a8..88588321a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,3 +16,4 @@ revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch perf-fix-misleadingly-indented-assignment-whitespace.patch perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch +lockdep-add-missing-macros.patch From 2b1e87a61f86c3dce6ff1813ebd2e5938047c61e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Feb 2016 21:47:37 +0000 Subject: [PATCH 446/487] linux-perf: Include version number in strace groups installation directory Closes: #813080 --- debian/build/tools/perf/Makefile | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index c3d1c0738..e1798e4a1 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -35,7 +35,7 @@ MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wn MAKE_PERF += NO_GTK2=1 # Include version in all directory names -MAKE_PERF += perfexecdir=lib/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins +MAKE_PERF += perfexecdir=lib/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins STRACE_GROUPS_DIR=share/perf_$(VERSION)-core/strace/groups # perf can link against libbfd if available, but the result is # undistributable as they are licenced under GPL v2 and v3+ diff --git a/debian/changelog b/debian/changelog index 84e423a85..76b6ff9df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux-tools (4.4-2) UNRELEASED; urgency=medium + + * linux-perf: Include version number in strace groups installation directory + (Closes: #813080) + + -- Ben Hutchings Thu, 18 Feb 2016 21:46:41 +0000 + linux-tools (4.4-1) unstable; urgency=medium * Upload to unstable From d97f0b3ee88307d597df1c1d1f5804c44a9a1128 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 18 Feb 2016 22:05:18 +0000 Subject: [PATCH 447/487] [alpha,sh4] Attempt to fix build failures --- debian/changelog | 1 + .../perf-tools-fix-bpf-feature-check.patch | 21 +++++++ ...s-x86-build-perf-on-older-user-space.patch | 57 +++++++++++++++++++ debian/patches/series | 2 + 4 files changed, 81 insertions(+) create mode 100644 debian/patches/perf-tools-fix-bpf-feature-check.patch create mode 100644 debian/patches/revert-perf-tools-x86-build-perf-on-older-user-space.patch diff --git a/debian/changelog b/debian/changelog index 76b6ff9df..dc3a28012 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (4.4-2) UNRELEASED; urgency=medium * linux-perf: Include version number in strace groups installation directory (Closes: #813080) + * [alpha,sh4] Attempt to fix build failures -- Ben Hutchings Thu, 18 Feb 2016 21:46:41 +0000 diff --git a/debian/patches/perf-tools-fix-bpf-feature-check.patch b/debian/patches/perf-tools-fix-bpf-feature-check.patch new file mode 100644 index 000000000..c36475904 --- /dev/null +++ b/debian/patches/perf-tools-fix-bpf-feature-check.patch @@ -0,0 +1,21 @@ +From: Ben Hutchings +Date: Thu, 18 Feb 2016 22:03:03 +0000 +Subject: perf tools: Fix bpf feature check + +Check that the bpf() system call is actually wired up for the target +architecture using #ifdef __NR_bpf. + +Signed-off-by: Ben Hutchings +--- +--- a/tools/build/feature/test-bpf.c ++++ b/tools/build/feature/test-bpf.c +@@ -1,4 +1,9 @@ + #include ++#include ++ ++#ifndef __NR_bpf ++#error "bpf system call not wired for this architecture" ++#endif + + int main(void) + { diff --git a/debian/patches/revert-perf-tools-x86-build-perf-on-older-user-space.patch b/debian/patches/revert-perf-tools-x86-build-perf-on-older-user-space.patch new file mode 100644 index 000000000..c4e2e272a --- /dev/null +++ b/debian/patches/revert-perf-tools-x86-build-perf-on-older-user-space.patch @@ -0,0 +1,57 @@ +From d9ea89d8408f647c05c720bf35a1fba4992dd4a8 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Thu, 18 Feb 2016 23:37:19 +0000 +Subject: [PATCH] Revert "perf tools, x86: Build perf on older user-space as + well" + +This reverts commit eae7a755ee81129370c8f555b0d5672e6673735d. +The empty unistd_{32,64}.h headers prevent building on sh, which also +now splits its unistd.h this way. + +Signed-off-by: Ben Hutchings +--- + tools/perf/perf-sys.h | 6 ------ + tools/perf/util/include/asm/unistd_32.h | 1 - + tools/perf/util/include/asm/unistd_64.h | 1 - + 3 files changed, 8 deletions(-) + delete mode 100644 tools/perf/util/include/asm/unistd_32.h + delete mode 100644 tools/perf/util/include/asm/unistd_64.h + +diff --git a/tools/perf/perf-sys.h b/tools/perf/perf-sys.h +index 83a25cef82fd..182a84eb5bd6 100644 +--- a/tools/perf/perf-sys.h ++++ b/tools/perf/perf-sys.h +@@ -11,9 +11,6 @@ + #if defined(__i386__) + #define cpu_relax() asm volatile("rep; nop" ::: "memory"); + #define CPUINFO_PROC {"model name"} +-#ifndef __NR_perf_event_open +-# define __NR_perf_event_open 336 +-#endif + #ifndef __NR_futex + # define __NR_futex 240 + #endif +@@ -25,9 +22,6 @@ + #if defined(__x86_64__) + #define cpu_relax() asm volatile("rep; nop" ::: "memory"); + #define CPUINFO_PROC {"model name"} +-#ifndef __NR_perf_event_open +-# define __NR_perf_event_open 298 +-#endif + #ifndef __NR_futex + # define __NR_futex 202 + #endif +diff --git a/tools/perf/util/include/asm/unistd_32.h b/tools/perf/util/include/asm/unistd_32.h +deleted file mode 100644 +index 8b137891791f..000000000000 +--- a/tools/perf/util/include/asm/unistd_32.h ++++ /dev/null +@@ -1 +0,0 @@ +- +diff --git a/tools/perf/util/include/asm/unistd_64.h b/tools/perf/util/include/asm/unistd_64.h +deleted file mode 100644 +index 8b137891791f..000000000000 +--- a/tools/perf/util/include/asm/unistd_64.h ++++ /dev/null +@@ -1 +0,0 @@ +- diff --git a/debian/patches/series b/debian/patches/series index 004a5caba..17f92f0e3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,3 +20,5 @@ perf-fix-misleadingly-indented-assignment-whitespace.patch perf-add-missing-braces-to-if-statement.patch perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch perf-remove-wrong-semicolon-in-while-loop.patch +revert-perf-tools-x86-build-perf-on-older-user-space.patch +perf-tools-fix-bpf-feature-check.patch From b0a0319c869a25b7403d46face0edf2cd49c143f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 19 Feb 2016 01:14:37 +0000 Subject: [PATCH 448/487] Build fixdep under debian/build and clean it up properly Mattia Dongili noted that it's currently built under tools/build (upstream bug). Build it under the current output directory (which means we build it multiple times) and clean all copies. --- debian/build/Makefile | 3 +++ debian/changelog | 1 + debian/patches/series | 1 + ...tools-stop-building-fixdep-in-source.patch | 20 +++++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 debian/patches/tools-stop-building-fixdep-in-source.patch diff --git a/debian/build/Makefile b/debian/build/Makefile index 329e47ed2..b2305e785 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -19,3 +19,6 @@ all-recursive: all-local clean-local:: rm -rf generated include out +# fixdep may be built in several places since we don't set the output directory +# consistently (XXX) + find -name fixdep -delete diff --git a/debian/changelog b/debian/changelog index dc3a28012..ecc0f3cde 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-tools (4.4-2) UNRELEASED; urgency=medium * linux-perf: Include version number in strace groups installation directory (Closes: #813080) * [alpha,sh4] Attempt to fix build failures + * Build fixdep under debian/build and clean it up properly -- Ben Hutchings Thu, 18 Feb 2016 21:46:41 +0000 diff --git a/debian/patches/series b/debian/patches/series index 17f92f0e3..a845fe63a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -22,3 +22,4 @@ perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch perf-remove-wrong-semicolon-in-while-loop.patch revert-perf-tools-x86-build-perf-on-older-user-space.patch perf-tools-fix-bpf-feature-check.patch +tools-stop-building-fixdep-in-source.patch diff --git a/debian/patches/tools-stop-building-fixdep-in-source.patch b/debian/patches/tools-stop-building-fixdep-in-source.patch new file mode 100644 index 000000000..aae97ba39 --- /dev/null +++ b/debian/patches/tools-stop-building-fixdep-in-source.patch @@ -0,0 +1,20 @@ +From: Ben Hutchings +Date: Fri, 19 Feb 2016 01:14:05 +0000 +Subject: tools: Stop building fixdep in the source directory + +Use the proper target, $(OUTPUT)fixdep, not fixdep. + +Reported-by: Mattia Dongili +Signed-off-by: Ben Hutchings +--- +--- a/tools/build/Makefile.include ++++ b/tools/build/Makefile.include +@@ -4,7 +4,7 @@ ifdef CROSS_COMPILE + fixdep: + else + fixdep: +- $(Q)$(MAKE) -C $(srctree)/tools/build fixdep ++ $(Q)$(MAKE) -C $(srctree)/tools/build $(OUTPUT)fixdep + endif + + .PHONY: fixdep From 5f504574dfb0c3ff55b6ec208b73a3440f6ebabf Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 19 Feb 2016 17:11:29 +0000 Subject: [PATCH 449/487] Prepare to release linux-tools (4.4-2). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ecc0f3cde..886434600 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -linux-tools (4.4-2) UNRELEASED; urgency=medium +linux-tools (4.4-2) unstable; urgency=medium * linux-perf: Include version number in strace groups installation directory (Closes: #813080) * [alpha,sh4] Attempt to fix build failures * Build fixdep under debian/build and clean it up properly - -- Ben Hutchings Thu, 18 Feb 2016 21:46:41 +0000 + -- Ben Hutchings Fri, 19 Feb 2016 17:11:29 +0000 linux-tools (4.4-1) unstable; urgency=medium From e1fd4b6f1e2d2122072323a014ae4cd439c996e0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 19 Feb 2016 19:17:44 +0000 Subject: [PATCH 450/487] Move definition of OUTDIR from debian/build/**/Makefile to outer rules Simplify things by making debian/rules.real, debian/rules and debian/build/Makefile.inc (for the recursive case) set OUTDIR. --- debian/build/Makefile | 2 -- debian/build/Makefile.inc | 5 ++++- debian/build/scripts/Makefile | 2 -- debian/build/scripts/basic/Makefile | 2 -- debian/build/scripts/genksyms/Makefile | 2 -- debian/build/scripts/kconfig/Makefile | 2 -- debian/build/scripts/mod/Makefile | 2 -- debian/build/tools/hv/Makefile | 1 - debian/build/tools/lib/lockdep/Makefile | 2 -- debian/build/tools/perf/Makefile | 2 -- debian/rules | 2 +- debian/rules.real | 17 ++++++++++------- 12 files changed, 15 insertions(+), 26 deletions(-) diff --git a/debian/build/Makefile b/debian/build/Makefile index 329e47ed2..a83996d22 100644 --- a/debian/build/Makefile +++ b/debian/build/Makefile @@ -6,8 +6,6 @@ SUBDIRS = \ scripts \ tools -OUTDIR = . - include Makefile.inc # Build userland headers first diff --git a/debian/build/Makefile.inc b/debian/build/Makefile.inc index 15ff1fdb0..f7ca4d1e7 100644 --- a/debian/build/Makefile.inc +++ b/debian/build/Makefile.inc @@ -1,5 +1,8 @@ top_srcdir = $(dir $(lastword $(MAKEFILE_LIST)))/../.. +# Normalise OUTDIR to avoid triggering rebuilds +override OUTDIR := $(patsubst ./%,%,$(OUTDIR)) + VPATH = $(top_srcdir)/$(OUTDIR) SHELL = /bin/sh -e @@ -21,7 +24,7 @@ install: install-local install-recursive +@list='$(SUBDIRS)'; \ for subdir in $$list; do \ echo "Making $* in $$subdir"; \ - $(MAKE) -C $$subdir $* \ + $(MAKE) -C $$subdir OUTDIR=$(OUTDIR)/$$subdir $* \ || exit 1; \ done diff --git a/debian/build/scripts/Makefile b/debian/build/scripts/Makefile index ab2a6a412..d62a40f7b 100644 --- a/debian/build/scripts/Makefile +++ b/debian/build/scripts/Makefile @@ -44,8 +44,6 @@ SUBDIRS = \ kconfig \ mod -OUTDIR = scripts - include ..//Makefile.inc CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 diff --git a/debian/build/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile index 1b2635f9e..6a801c327 100644 --- a/debian/build/scripts/basic/Makefile +++ b/debian/build/scripts/basic/Makefile @@ -2,6 +2,4 @@ PROGS = \ bin2c \ fixdep -OUTDIR = scripts/basic - include ../../Makefile.inc diff --git a/debian/build/scripts/genksyms/Makefile b/debian/build/scripts/genksyms/Makefile index fc26e0c54..22e3163da 100644 --- a/debian/build/scripts/genksyms/Makefile +++ b/debian/build/scripts/genksyms/Makefile @@ -1,7 +1,5 @@ PROGS = genksyms -OUTDIR = scripts/genksyms - include ../../Makefile.inc genksyms: genksyms.o parse.tab.o lex.lex.o diff --git a/debian/build/scripts/kconfig/Makefile b/debian/build/scripts/kconfig/Makefile index 201ab58bb..52e436633 100644 --- a/debian/build/scripts/kconfig/Makefile +++ b/debian/build/scripts/kconfig/Makefile @@ -1,7 +1,5 @@ PROGS = conf -OUTDIR = scripts/kconfig - include ../../Makefile.inc conf: conf.o zconf.tab.o diff --git a/debian/build/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile index 4b5e9b43c..be0e2aa3c 100644 --- a/debian/build/scripts/mod/Makefile +++ b/debian/build/scripts/mod/Makefile @@ -5,8 +5,6 @@ PROGS = \ modpost.real-msb-32 \ modpost.real-msb-64 -OUTDIR = scripts/mod - include ../../Makefile.inc modpost.real-%: diff --git a/debian/build/tools/hv/Makefile b/debian/build/tools/hv/Makefile index a1fddeb49..7f89bbb54 100644 --- a/debian/build/tools/hv/Makefile +++ b/debian/build/tools/hv/Makefile @@ -3,7 +3,6 @@ PROGS = \ hv_kvp_daemon \ hv_vss_daemon -OUTDIR = tools/hv prefix = /usr/sbin include ../../Makefile.inc diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/build/tools/lib/lockdep/Makefile index a0f954fd4..7e2534e07 100644 --- a/debian/build/tools/lib/lockdep/Makefile +++ b/debian/build/tools/lib/lockdep/Makefile @@ -1,5 +1,3 @@ -OUTDIR = tools/lib/lockdep - include ../../../Makefile.inc DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) diff --git a/debian/build/tools/perf/Makefile b/debian/build/tools/perf/Makefile index c3d1c0738..e20b6b39e 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/build/tools/perf/Makefile @@ -1,5 +1,3 @@ -OUTDIR = tools/perf - include ../../Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) diff --git a/debian/rules b/debian/rules index 36a278d58..f6e52337c 100755 --- a/debian/rules +++ b/debian/rules @@ -40,7 +40,7 @@ maintainerclean: clean: debian/control dh_testdir - make -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) + $(MAKE) -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) OUTDIR=. rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp dh_clean diff --git a/debian/rules.real b/debian/rules.real index 1eb2cf8e4..4294a84d7 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,6 +3,10 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs +define submake ++$(MAKE) -C $(BUILD_DIR)/$(1) top_srcdir=$(CURDIR) OUTDIR=$(1) +endef + binary-arch: install-kbuild install-usbip install-liblockdep ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf @@ -18,7 +22,7 @@ build-arch: $(STAMPS_DIR)/build build-indep: $(STAMPS_DIR)/build: - $(MAKE) -C $(BUILD_DIR) top_srcdir=$(CURDIR) + $(call submake,.) mkdir -p $(STAMPS_DIR) touch '$@' @@ -30,7 +34,7 @@ install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/scripts install prefix=$(DIR) top_srcdir=$(CURDIR) + $(call submake,scripts) install prefix=$(DIR) dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs @@ -50,7 +54,7 @@ install-perf: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/perf install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(call submake,tools/perf) install DESTDIR=$(DIR) dh_perl /usr/share/perf_$(VERSION)-core/scripts/perl/Perf-Trace-Util/lib/ dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs @@ -71,7 +75,7 @@ install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/usb/usbip install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(call submake,tools/usb/usbip) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs @@ -93,7 +97,7 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/hv install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(call submake,tools/hv) install DESTDIR=$(DIR) dh_install dh_installchangelogs dh_installdocs @@ -115,8 +119,7 @@ install-liblockdep: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/lib/lockdep install top_srcdir=$(CURDIR) \ - DESTDIR=$(DIR) + $(call submake,tools/lib/lockdep) install DESTDIR=$(DIR) env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \ 'usr/lib/*/liblockdep.so.*' dh_install --sourcedir=$(DIR) From 00337468627cb9042d6f87524c66ccd19869e75a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 19 Feb 2016 20:05:58 +0000 Subject: [PATCH 451/487] Move makefile hierarchy to debian/rules.d; use debian/build for output only By passing both -C and -f options to make, we can separate makefiles from the output directory without adding prefixes to all targets. We can also reduce the 'clean' commands to little more than 'rm -rf'. --- debian/.gitignore | 1 + debian/build/.gitignore | 3 --- debian/build/scripts/.gitignore | 7 ------ debian/build/scripts/basic/.gitignore | 2 -- debian/build/scripts/basic/Makefile | 5 ----- debian/build/scripts/genksyms/.gitignore | 1 - debian/build/scripts/kconfig/.gitignore | 1 - debian/build/scripts/mod/.gitignore | 4 ---- debian/build/scripts/mod/Makefile | 22 ------------------- debian/build/tools/hv/.gitignore | 1 - debian/rules | 5 +++-- debian/{build => rules.d}/Makefile | 7 ++---- debian/{build => rules.d}/Makefile.inc | 11 +++------- debian/{build => rules.d}/scripts/Makefile | 2 +- debian/rules.d/scripts/basic/Makefile | 5 +++++ .../scripts/genksyms/Makefile | 5 +---- .../scripts/kconfig/Makefile | 5 +---- debian/rules.d/scripts/mod/Makefile | 22 +++++++++++++++++++ .../scripts/mod/Makefile.real | 10 +++++---- .../scripts/mod/elfconfig.h | 0 .../{build => rules.d}/scripts/mod/gendef.py | 0 .../{build => rules.d}/scripts/mod/modpost.c | 2 +- .../scripts/mod/real-lsb-32/elfconfig.h | 0 .../scripts/mod/real-lsb-32/types.h | 0 .../scripts/mod/real-lsb-64/elfconfig.h | 0 .../scripts/mod/real-lsb-64/types.h | 0 .../scripts/mod/real-msb-32/elfconfig.h | 0 .../scripts/mod/real-msb-32/types.h | 0 .../scripts/mod/real-msb-64/elfconfig.h | 0 .../scripts/mod/real-msb-64/types.h | 0 debian/{build => rules.d}/scripts/mod/types.h | 0 debian/{build => rules.d}/tools/Makefile | 2 +- debian/{build => rules.d}/tools/hv/Makefile | 2 +- .../tools/lib/lockdep/Makefile | 8 ++----- .../tools/lib/lockdep/lockdep.in | 0 debian/{build => rules.d}/tools/perf/Makefile | 22 ++++++------------- .../tools/usb/usbip/Makefile | 7 ++---- debian/rules.real | 6 ++--- 38 files changed, 62 insertions(+), 106 deletions(-) delete mode 100644 debian/build/.gitignore delete mode 100644 debian/build/scripts/.gitignore delete mode 100644 debian/build/scripts/basic/.gitignore delete mode 100644 debian/build/scripts/basic/Makefile delete mode 100644 debian/build/scripts/genksyms/.gitignore delete mode 100644 debian/build/scripts/kconfig/.gitignore delete mode 100644 debian/build/scripts/mod/.gitignore delete mode 100644 debian/build/scripts/mod/Makefile delete mode 100644 debian/build/tools/hv/.gitignore rename debian/{build => rules.d}/Makefile (63%) rename debian/{build => rules.d}/Makefile.inc (88%) rename debian/{build => rules.d}/scripts/Makefile (95%) create mode 100644 debian/rules.d/scripts/basic/Makefile rename debian/{build => rules.d}/scripts/genksyms/Makefile (66%) rename debian/{build => rules.d}/scripts/kconfig/Makefile (64%) create mode 100644 debian/rules.d/scripts/mod/Makefile rename debian/{build => rules.d}/scripts/mod/Makefile.real (67%) rename debian/{build => rules.d}/scripts/mod/elfconfig.h (100%) rename debian/{build => rules.d}/scripts/mod/gendef.py (100%) rename debian/{build => rules.d}/scripts/mod/modpost.c (99%) rename debian/{build => rules.d}/scripts/mod/real-lsb-32/elfconfig.h (100%) rename debian/{build => rules.d}/scripts/mod/real-lsb-32/types.h (100%) rename debian/{build => rules.d}/scripts/mod/real-lsb-64/elfconfig.h (100%) rename debian/{build => rules.d}/scripts/mod/real-lsb-64/types.h (100%) rename debian/{build => rules.d}/scripts/mod/real-msb-32/elfconfig.h (100%) rename debian/{build => rules.d}/scripts/mod/real-msb-32/types.h (100%) rename debian/{build => rules.d}/scripts/mod/real-msb-64/elfconfig.h (100%) rename debian/{build => rules.d}/scripts/mod/real-msb-64/types.h (100%) rename debian/{build => rules.d}/scripts/mod/types.h (100%) rename debian/{build => rules.d}/tools/Makefile (58%) rename debian/{build => rules.d}/tools/hv/Makefile (87%) rename debian/{build => rules.d}/tools/lib/lockdep/Makefile (78%) rename debian/{build => rules.d}/tools/lib/lockdep/lockdep.in (100%) rename debian/{build => rules.d}/tools/perf/Makefile (75%) rename debian/{build => rules.d}/tools/usb/usbip/Makefile (88%) diff --git a/debian/.gitignore b/debian/.gitignore index 78c29121b..6c99239ff 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -8,6 +8,7 @@ .#* /*.substvars /*-tmp/ +/build/ /control /control.md5sum /files diff --git a/debian/build/.gitignore b/debian/build/.gitignore deleted file mode 100644 index 81804986a..000000000 --- a/debian/build/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.o -/include/ -out/ diff --git a/debian/build/scripts/.gitignore b/debian/build/scripts/.gitignore deleted file mode 100644 index 663e60761..000000000 --- a/debian/build/scripts/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.hash.c -*.lex.c -*.tab.[ch] -/conmakehash -/kallsyms -/pnmtologo -/recordmcount diff --git a/debian/build/scripts/basic/.gitignore b/debian/build/scripts/basic/.gitignore deleted file mode 100644 index e717ebbc0..000000000 --- a/debian/build/scripts/basic/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin2c -/fixdep diff --git a/debian/build/scripts/basic/Makefile b/debian/build/scripts/basic/Makefile deleted file mode 100644 index 6a801c327..000000000 --- a/debian/build/scripts/basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -PROGS = \ - bin2c \ - fixdep - -include ../../Makefile.inc diff --git a/debian/build/scripts/genksyms/.gitignore b/debian/build/scripts/genksyms/.gitignore deleted file mode 100644 index 34a2a0520..000000000 --- a/debian/build/scripts/genksyms/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/genksyms diff --git a/debian/build/scripts/kconfig/.gitignore b/debian/build/scripts/kconfig/.gitignore deleted file mode 100644 index c9a5c234a..000000000 --- a/debian/build/scripts/kconfig/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/conf diff --git a/debian/build/scripts/mod/.gitignore b/debian/build/scripts/mod/.gitignore deleted file mode 100644 index c0602d204..000000000 --- a/debian/build/scripts/mod/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/modpost -/modpost.h -/modpost.real-* -devicetable-offsets.[hs] diff --git a/debian/build/scripts/mod/Makefile b/debian/build/scripts/mod/Makefile deleted file mode 100644 index be0e2aa3c..000000000 --- a/debian/build/scripts/mod/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -PROGS = \ - modpost \ - modpost.real-lsb-32 \ - modpost.real-lsb-64 \ - modpost.real-msb-32 \ - modpost.real-msb-64 - -include ../../Makefile.inc - -modpost.real-%: - $(MAKE) -f Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod - -%: %.o - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ - -modpost.h: $(top_srcdir)/scripts/mod/modpost.c - python ./gendef.py $< > $@ - -modpost.o: modpost.c modpost.h - -clean: - rm -f modpost.h real-*/devicetable-offsets.* diff --git a/debian/build/tools/hv/.gitignore b/debian/build/tools/hv/.gitignore deleted file mode 100644 index b6961eb1b..000000000 --- a/debian/build/tools/hv/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/hv_*_daemon diff --git a/debian/rules b/debian/rules index f6e52337c..44e36f46a 100755 --- a/debian/rules +++ b/debian/rules @@ -40,8 +40,9 @@ maintainerclean: clean: debian/control dh_testdir - $(MAKE) -C $(BUILD_DIR) clean top_srcdir=$(CURDIR) OUTDIR=. - rm -rf $(STAMPS_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp + mkdir -p $(BUILD_DIR) + $(MAKE) -C $(BUILD_DIR) -f $(CURDIR)/debian/rules.d/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=. clean + rm -rf $(STAMPS_DIR) $(BUILD_DIR) debian/lib/python/debian_linux/__pycache__ debian/*-tmp dh_clean binary-indep: diff --git a/debian/build/Makefile b/debian/rules.d/Makefile similarity index 63% rename from debian/build/Makefile rename to debian/rules.d/Makefile index a83996d22..b03a795a7 100644 --- a/debian/build/Makefile +++ b/debian/rules.d/Makefile @@ -6,14 +6,11 @@ SUBDIRS = \ scripts \ tools -include Makefile.inc +include $(top_rulesdir)/Makefile.inc # Build userland headers first unexport VERSION all-local: - $(MAKE) -C $(top_srcdir) O=$(CURDIR)/out \ + $(MAKE) -C $(top_srcdir) O=$(CURDIR) \ INSTALL_HDR_PATH=$(CURDIR) headers_install all-recursive: all-local - -clean-local:: - rm -rf generated include out diff --git a/debian/build/Makefile.inc b/debian/rules.d/Makefile.inc similarity index 88% rename from debian/build/Makefile.inc rename to debian/rules.d/Makefile.inc index f7ca4d1e7..acdcf71cd 100644 --- a/debian/build/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -1,5 +1,3 @@ -top_srcdir = $(dir $(lastword $(MAKEFILE_LIST)))/../.. - # Normalise OUTDIR to avoid triggering rebuilds override OUTDIR := $(patsubst ./%,%,$(OUTDIR)) @@ -17,22 +15,19 @@ CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) all: all-local all-recursive -clean: clean-local clean-recursive +clean: clean-recursive install: install-local install-recursive %-recursive: +@list='$(SUBDIRS)'; \ for subdir in $$list; do \ echo "Making $* in $$subdir"; \ - $(MAKE) -C $$subdir OUTDIR=$(OUTDIR)/$$subdir $* \ - || exit 1; \ + mkdir -p $$subdir; \ + $(MAKE) -C $$subdir -f $(top_rulesdir)/$(OUTDIR)/$$subdir/Makefile OUTDIR=$(OUTDIR)/$$subdir $*; \ done all-local: $(PROGS) -clean-local:: - rm -f $(PROGS) *.o - install-local: install-local-progs install-local-scripts install-local-data install-local-progs: $(PROGS) diff --git a/debian/build/scripts/Makefile b/debian/rules.d/scripts/Makefile similarity index 95% rename from debian/build/scripts/Makefile rename to debian/rules.d/scripts/Makefile index d62a40f7b..8d9708771 100644 --- a/debian/build/scripts/Makefile +++ b/debian/rules.d/scripts/Makefile @@ -44,6 +44,6 @@ SUBDIRS = \ kconfig \ mod -include ..//Makefile.inc +include $(top_rulesdir)/Makefile.inc CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 diff --git a/debian/rules.d/scripts/basic/Makefile b/debian/rules.d/scripts/basic/Makefile new file mode 100644 index 000000000..86b86a849 --- /dev/null +++ b/debian/rules.d/scripts/basic/Makefile @@ -0,0 +1,5 @@ +PROGS = \ + bin2c \ + fixdep + +include $(top_rulesdir)/Makefile.inc diff --git a/debian/build/scripts/genksyms/Makefile b/debian/rules.d/scripts/genksyms/Makefile similarity index 66% rename from debian/build/scripts/genksyms/Makefile rename to debian/rules.d/scripts/genksyms/Makefile index 22e3163da..8e416da44 100644 --- a/debian/build/scripts/genksyms/Makefile +++ b/debian/rules.d/scripts/genksyms/Makefile @@ -1,6 +1,6 @@ PROGS = genksyms -include ../../Makefile.inc +include $(top_rulesdir)/Makefile.inc genksyms: genksyms.o parse.tab.o lex.lex.o @@ -11,6 +11,3 @@ lex.lex.o: keywords.hash.c parse.tab.h %.h: %.h_shipped ln -s $< $@ - -clean: - rm -f keywords.hash.c parse.tab.c parse.tab.h diff --git a/debian/build/scripts/kconfig/Makefile b/debian/rules.d/scripts/kconfig/Makefile similarity index 64% rename from debian/build/scripts/kconfig/Makefile rename to debian/rules.d/scripts/kconfig/Makefile index 52e436633..b6e252144 100644 --- a/debian/build/scripts/kconfig/Makefile +++ b/debian/rules.d/scripts/kconfig/Makefile @@ -1,6 +1,6 @@ PROGS = conf -include ../../Makefile.inc +include $(top_rulesdir)/Makefile.inc conf: conf.o zconf.tab.o @@ -11,6 +11,3 @@ zconf.tab.c: zconf.hash.c zconf.lex.c %.h: %.h_shipped ln -sf $< $@ - -clean: - rm -f zconf.tab.c zconf.hash.c zconf.lex.c diff --git a/debian/rules.d/scripts/mod/Makefile b/debian/rules.d/scripts/mod/Makefile new file mode 100644 index 000000000..728afaa3b --- /dev/null +++ b/debian/rules.d/scripts/mod/Makefile @@ -0,0 +1,22 @@ +PROGS = \ + modpost \ + modpost.real-lsb-32 \ + modpost.real-lsb-64 \ + modpost.real-msb-32 \ + modpost.real-msb-64 + +include $(top_rulesdir)/Makefile.inc + +wrapperdir = $(top_rulesdir)/$(OUTDIR) + +modpost.real-%: + $(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod + +%: %.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c + python $(wrapperdir)/gendef.py $< > $@ + +modpost.o: $(wrapperdir)/modpost.c modpost-opts.h + $(CC) $(CFLAGS) -I $(CURDIR) -c -o $@ $< diff --git a/debian/build/scripts/mod/Makefile.real b/debian/rules.d/scripts/mod/Makefile.real similarity index 67% rename from debian/build/scripts/mod/Makefile.real rename to debian/rules.d/scripts/mod/Makefile.real index 790dbf284..489ea4f7b 100644 --- a/debian/build/scripts/mod/Makefile.real +++ b/debian/rules.d/scripts/mod/Makefile.real @@ -1,17 +1,19 @@ PROGS = modpost.real-$(TYPE) -top_srcdir = ../.. +include $(top_rulesdir)/Makefile.inc -include $(top_srcdir)/debian/build/Makefile.inc +wrapperdir = $(top_rulesdir)/$(OUTDIR) +CFLAGS += -I $(CURDIR)/real-$(TYPE) -I $(wrapperdir)/real-$(TYPE) modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o sumversion.real-$(TYPE).o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ %.real-$(TYPE).o: $(SOURCEDIR)/%.c real-$(TYPE)/devicetable-offsets.h - $(CC) -I real-$(TYPE) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< real-$(TYPE)/devicetable-offsets.s: $(SOURCEDIR)/devicetable-offsets.c - $(CC) -include real-$(TYPE)/types.h $(CFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $< + mkdir -p real-$(TYPE) + $(CC) -include $(wrapperdir)/real-$(TYPE)/types.h $(CFLAGS) -nostdinc -I$(top_srcdir)/include -S -o $@ $< real-$(TYPE)/devicetable-offsets.h: real-$(TYPE)/devicetable-offsets.s echo >$@ "#define __DEVICEVTABLE_OFFSETS_H__" diff --git a/debian/build/scripts/mod/elfconfig.h b/debian/rules.d/scripts/mod/elfconfig.h similarity index 100% rename from debian/build/scripts/mod/elfconfig.h rename to debian/rules.d/scripts/mod/elfconfig.h diff --git a/debian/build/scripts/mod/gendef.py b/debian/rules.d/scripts/mod/gendef.py similarity index 100% rename from debian/build/scripts/mod/gendef.py rename to debian/rules.d/scripts/mod/gendef.py diff --git a/debian/build/scripts/mod/modpost.c b/debian/rules.d/scripts/mod/modpost.c similarity index 99% rename from debian/build/scripts/mod/modpost.c rename to debian/rules.d/scripts/mod/modpost.c index 8747c0cde..d574957ae 100644 --- a/debian/build/scripts/mod/modpost.c +++ b/debian/rules.d/scripts/mod/modpost.c @@ -6,7 +6,7 @@ #include #include -#include "modpost.h" +#include "modpost-opts.h" int main (int argc, char *argv[]) { diff --git a/debian/build/scripts/mod/real-lsb-32/elfconfig.h b/debian/rules.d/scripts/mod/real-lsb-32/elfconfig.h similarity index 100% rename from debian/build/scripts/mod/real-lsb-32/elfconfig.h rename to debian/rules.d/scripts/mod/real-lsb-32/elfconfig.h diff --git a/debian/build/scripts/mod/real-lsb-32/types.h b/debian/rules.d/scripts/mod/real-lsb-32/types.h similarity index 100% rename from debian/build/scripts/mod/real-lsb-32/types.h rename to debian/rules.d/scripts/mod/real-lsb-32/types.h diff --git a/debian/build/scripts/mod/real-lsb-64/elfconfig.h b/debian/rules.d/scripts/mod/real-lsb-64/elfconfig.h similarity index 100% rename from debian/build/scripts/mod/real-lsb-64/elfconfig.h rename to debian/rules.d/scripts/mod/real-lsb-64/elfconfig.h diff --git a/debian/build/scripts/mod/real-lsb-64/types.h b/debian/rules.d/scripts/mod/real-lsb-64/types.h similarity index 100% rename from debian/build/scripts/mod/real-lsb-64/types.h rename to debian/rules.d/scripts/mod/real-lsb-64/types.h diff --git a/debian/build/scripts/mod/real-msb-32/elfconfig.h b/debian/rules.d/scripts/mod/real-msb-32/elfconfig.h similarity index 100% rename from debian/build/scripts/mod/real-msb-32/elfconfig.h rename to debian/rules.d/scripts/mod/real-msb-32/elfconfig.h diff --git a/debian/build/scripts/mod/real-msb-32/types.h b/debian/rules.d/scripts/mod/real-msb-32/types.h similarity index 100% rename from debian/build/scripts/mod/real-msb-32/types.h rename to debian/rules.d/scripts/mod/real-msb-32/types.h diff --git a/debian/build/scripts/mod/real-msb-64/elfconfig.h b/debian/rules.d/scripts/mod/real-msb-64/elfconfig.h similarity index 100% rename from debian/build/scripts/mod/real-msb-64/elfconfig.h rename to debian/rules.d/scripts/mod/real-msb-64/elfconfig.h diff --git a/debian/build/scripts/mod/real-msb-64/types.h b/debian/rules.d/scripts/mod/real-msb-64/types.h similarity index 100% rename from debian/build/scripts/mod/real-msb-64/types.h rename to debian/rules.d/scripts/mod/real-msb-64/types.h diff --git a/debian/build/scripts/mod/types.h b/debian/rules.d/scripts/mod/types.h similarity index 100% rename from debian/build/scripts/mod/types.h rename to debian/rules.d/scripts/mod/types.h diff --git a/debian/build/tools/Makefile b/debian/rules.d/tools/Makefile similarity index 58% rename from debian/build/tools/Makefile rename to debian/rules.d/tools/Makefile index a3cdd8728..e99cdca33 100644 --- a/debian/build/tools/Makefile +++ b/debian/rules.d/tools/Makefile @@ -4,4 +4,4 @@ SUBDIRS = \ perf \ usb/usbip -include ../Makefile.inc +include $(top_rulesdir)/Makefile.inc diff --git a/debian/build/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile similarity index 87% rename from debian/build/tools/hv/Makefile rename to debian/rules.d/tools/hv/Makefile index 7f89bbb54..25af78660 100644 --- a/debian/build/tools/hv/Makefile +++ b/debian/rules.d/tools/hv/Makefile @@ -5,7 +5,7 @@ PROGS = \ prefix = /usr/sbin -include ../../Makefile.inc +include $(top_rulesdir)/Makefile.inc install-local-progs: $(PROGS) @for p in $^; do \ diff --git a/debian/build/tools/lib/lockdep/Makefile b/debian/rules.d/tools/lib/lockdep/Makefile similarity index 78% rename from debian/build/tools/lib/lockdep/Makefile rename to debian/rules.d/tools/lib/lockdep/Makefile index 7e2534e07..c3980200e 100644 --- a/debian/build/tools/lib/lockdep/Makefile +++ b/debian/rules.d/tools/lib/lockdep/Makefile @@ -1,8 +1,8 @@ -include ../../../Makefile.inc +include $(top_rulesdir)/Makefile.inc DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -MAKE_LOCKDEP := $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR)/out V=1 \ +MAKE_LOCKDEP := $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \ prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \ LIBLOCKDEP_VERSION=$(VERSION) \ CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)' @@ -10,7 +10,6 @@ MAKE_LOCKDEP := $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR)/out V=1 \ unexport CFLAGS all: - mkdir -p out $(MAKE_LOCKDEP) install: @@ -19,6 +18,3 @@ install: cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/ ln -s liblockdep.so.$(VERSION) \ $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so - -clean: - rm -rf out diff --git a/debian/build/tools/lib/lockdep/lockdep.in b/debian/rules.d/tools/lib/lockdep/lockdep.in similarity index 100% rename from debian/build/tools/lib/lockdep/lockdep.in rename to debian/rules.d/tools/lib/lockdep/lockdep.in diff --git a/debian/build/tools/perf/Makefile b/debian/rules.d/tools/perf/Makefile similarity index 75% rename from debian/build/tools/perf/Makefile rename to debian/rules.d/tools/perf/Makefile index e20b6b39e..0d97497ab 100644 --- a/debian/build/tools/perf/Makefile +++ b/debian/rules.d/tools/perf/Makefile @@ -1,4 +1,4 @@ -include ../../Makefile.inc +include $(top_rulesdir)/Makefile.inc DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) @@ -27,7 +27,7 @@ else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),) endif endif -MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' +MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' # Disable Gtk UI until it's more usable MAKE_PERF += NO_GTK2=1 @@ -43,22 +43,21 @@ MAKE_PERF += feature-libbfd=0 HAVE_CPLUS_DEMANGLE_SUPPORT=1 all: ifdef KERNEL_ARCH_PERF - -mkdir out # perf changes some default directories depending on whether DESTDIR is # set. We must define it even when building to avoid a rebuild when we # run 'make install'. - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out all VERSION=$(VERSION) DESTDIR=dummy - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation O=$(CURDIR)/out man VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all VERSION=$(VERSION) DESTDIR=dummy + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man VERSION=$(VERSION) # Check that perf didn't get linked against libbfd type ldd - ! ldd $(CURDIR)/out/perf | grep '\blibbfd' + ! ldd $(CURDIR)/perf | grep '\blibbfd' # Check that it includes cplus_demangle from libiberty - grep cplus_demangle $(CURDIR)/out/perf + grep cplus_demangle $(CURDIR)/perf endif install: ifdef KERNEL_ARCH_PERF - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out install VERSION=$(VERSION) + +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf install VERSION=$(VERSION) # Don't install a 'trace' alias yet: # - We need a wrapper for it anyway, so there's little point adding a # versioned link @@ -71,10 +70,3 @@ endif mv $(DESTDIR)/etc/bash_completion.d \ $(DESTDIR)/usr/share/bash-completion/completions rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc - -clean: -ifdef KERNEL_ARCH_PERF - mkdir -p out - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf O=$(CURDIR)/out clean - rm -rf out -endif diff --git a/debian/build/tools/usb/usbip/Makefile b/debian/rules.d/tools/usb/usbip/Makefile similarity index 88% rename from debian/build/tools/usb/usbip/Makefile rename to debian/rules.d/tools/usb/usbip/Makefile index 75e5705bb..11d1db4ca 100644 --- a/debian/build/tools/usb/usbip/Makefile +++ b/debian/rules.d/tools/usb/usbip/Makefile @@ -7,19 +7,16 @@ unexport MAKEFLAGS all: cd $(srcdir) && ./autogen.sh - mkdir -p out - cd out && \ $(shell dpkg-buildflags --export=cmdline) $(srcdir)/configure \ --prefix=/usr \ --with-tcp-wrappers \ --with-usbids-dir=/usr/share/misc \ --disable-shared - $(MAKE) -C out + $(MAKE) install: - $(MAKE) -C out install + $(MAKE) install clean: rm -rf $(addprefix $(srcdir)/,autom4te.cache aclocal.m4 compile config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing) find $(srcdir)/ -name Makefile.in -delete - rm -rf out diff --git a/debian/rules.real b/debian/rules.real index 4294a84d7..34b0ebc2f 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -4,7 +4,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs define submake -+$(MAKE) -C $(BUILD_DIR)/$(1) top_srcdir=$(CURDIR) OUTDIR=$(1) ++mkdir -p $(BUILD_DIR)/$(1) && $(MAKE) -C $(BUILD_DIR)/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1) endef binary-arch: install-kbuild install-usbip install-liblockdep @@ -70,7 +70,7 @@ install-perf: $(STAMPS_DIR)/build install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip install-usbip: DIR = $(CURDIR)/debian/usbip-tmp -install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/out/config.h) +install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/tools/usb/usbip/config.h) install-usbip: $(STAMPS_DIR)/build dh_testdir dh_testroot @@ -145,7 +145,7 @@ install-lockdep: dh_prep dh_installdirs # Upstream lockdep preload script is not suitable for installation - sed 's/@VERSION@/$(VERSION)/' $(BUILD_DIR)/tools/lib/lockdep/lockdep.in \ + sed 's/@VERSION@/$(VERSION)/' debian/rules.d/tools/lib/lockdep/lockdep.in \ > $(DIR)/usr/bin/lockdep chmod 755 $(DIR)/usr/bin/lockdep dh_installchangelogs From 0bd35d792a96d5fe1ffbca9d46fe6c2d45d12233 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 2 Feb 2016 16:54:54 +0000 Subject: [PATCH 452/487] hyperv-daemons: Add init scripts Also add a helper executable that implements the check for Hyper-V (like ConditionVirtualization=microsoft in the systemd units). (cherry picked from commit 50747480c882dae7d3c8f7b4d0df5cf3276c4ee5) --- debian/build/tools/hv/.gitignore | 1 + debian/build/tools/hv/Makefile | 6 +- debian/build/tools/hv/check-hyperv.c | 103 +++++++++++++++++++ debian/changelog | 6 ++ debian/copyright | 19 ++++ debian/hyperv-daemons.hv-fcopy-daemon.init | 110 +++++++++++++++++++++ debian/hyperv-daemons.hv-kvp-daemon.init | 109 ++++++++++++++++++++ debian/hyperv-daemons.hv-vss-daemon.init | 109 ++++++++++++++++++++ debian/rules.real | 10 ++ debian/templates/control.main.in | 2 +- 10 files changed, 472 insertions(+), 3 deletions(-) create mode 100644 debian/build/tools/hv/check-hyperv.c create mode 100755 debian/hyperv-daemons.hv-fcopy-daemon.init create mode 100755 debian/hyperv-daemons.hv-kvp-daemon.init create mode 100755 debian/hyperv-daemons.hv-vss-daemon.init diff --git a/debian/build/tools/hv/.gitignore b/debian/build/tools/hv/.gitignore index b6961eb1b..568499933 100644 --- a/debian/build/tools/hv/.gitignore +++ b/debian/build/tools/hv/.gitignore @@ -1 +1,2 @@ /hv_*_daemon +/check-hyperv diff --git a/debian/build/tools/hv/Makefile b/debian/build/tools/hv/Makefile index a1fddeb49..fb3ff37a2 100644 --- a/debian/build/tools/hv/Makefile +++ b/debian/build/tools/hv/Makefile @@ -1,7 +1,8 @@ PROGS = \ hv_fcopy_daemon \ hv_kvp_daemon \ - hv_vss_daemon + hv_vss_daemon \ + check-hyperv OUTDIR = tools/hv prefix = /usr/sbin @@ -9,7 +10,8 @@ prefix = /usr/sbin include ../../Makefile.inc install-local-progs: $(PROGS) - @for p in $^; do \ + @for p in $(filter-out check-hyperv,$^); do \ echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)'"; \ install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$$(basename $$p)"; \ done + install -D -m755 check-hyperv '$(DESTDIR)/lib/hyperv-daemons/check-hyperv' diff --git a/debian/build/tools/hv/check-hyperv.c b/debian/build/tools/hv/check-hyperv.c new file mode 100644 index 000000000..4d2b6f515 --- /dev/null +++ b/debian/build/tools/hv/check-hyperv.c @@ -0,0 +1,103 @@ +/* + * This program is derived from systemd. + * + * Copyright 2011 Lennart Poettering + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; If not, see . + */ + +#include +#include +#include + +#define streq(a, b) (!strcmp(a, b)) +#define ELEMENTSOF(a) (sizeof(a) / sizeof((a)[0])) + +enum { + VIRTUALIZATION_NONE, + VIRTUALIZATION_VM_OTHER, + VIRTUALIZATION_MICROSOFT, +}; + +static int detect_vm_cpuid(void) { + + static const struct { + const char *cpuid; + int id; + } cpuid_vendor_table[] = { + /* http://msdn.microsoft.com/en-us/library/ff542428.aspx */ + { "Microsoft Hv", VIRTUALIZATION_MICROSOFT }, + }; + + uint32_t eax, ecx; + bool hypervisor; + + /* http://lwn.net/Articles/301888/ */ + +#if defined (__i386__) +#define REG_a "eax" +#define REG_b "ebx" +#elif defined (__amd64__) +#define REG_a "rax" +#define REG_b "rbx" +#endif + + /* First detect whether there is a hypervisor */ + eax = 1; + __asm__ __volatile__ ( + /* ebx/rbx is being used for PIC! */ + " push %%"REG_b" \n\t" + " cpuid \n\t" + " pop %%"REG_b" \n\t" + + : "=a" (eax), "=c" (ecx) + : "0" (eax) + ); + + hypervisor = !!(ecx & 0x80000000U); + + if (hypervisor) { + union { + uint32_t sig32[3]; + char text[13]; + } sig = {}; + unsigned j; + + /* There is a hypervisor, see what it is */ + eax = 0x40000000U; + __asm__ __volatile__ ( + /* ebx/rbx is being used for PIC! */ + " push %%"REG_b" \n\t" + " cpuid \n\t" + " mov %%ebx, %1 \n\t" + " pop %%"REG_b" \n\t" + + : "=a" (eax), "=r" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2]) + : "0" (eax) + ); + + for (j = 0; j < ELEMENTSOF(cpuid_vendor_table); j ++) + if (streq(sig.text, cpuid_vendor_table[j].cpuid)) + return cpuid_vendor_table[j].id; + + return VIRTUALIZATION_VM_OTHER; + } + + return VIRTUALIZATION_NONE; +} + +int main(void) +{ + return detect_vm_cpuid() != VIRTUALIZATION_MICROSOFT; +} diff --git a/debian/changelog b/debian/changelog index 886434600..76e72f7a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4-3) UNRELEASED; urgency=medium + + * hyperv-daemons: Add init scripts + + -- Ben Hutchings Sun, 21 Feb 2016 15:03:44 +0000 + linux-tools (4.4-2) unstable; urgency=medium * linux-perf: Include version number in strace groups installation directory diff --git a/debian/copyright b/debian/copyright index 1e7200f61..7ba027e84 100644 --- a/debian/copyright +++ b/debian/copyright @@ -30,3 +30,22 @@ License: GPL-2 Files: debian/* Copyright: 2006-2012 Debian kernel team License: GPL-2 + +Files: debian/build/tools/hv/check-hyperv.c +Copyright: 2011 Lennart Poettering +License: LGPL-2.1 + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public License + along with this program; If not, see . + . + On Debian systems, the complete text of the GNU Lesser General Public + License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. diff --git a/debian/hyperv-daemons.hv-fcopy-daemon.init b/debian/hyperv-daemons.hv-fcopy-daemon.init new file mode 100755 index 000000000..24d944d01 --- /dev/null +++ b/debian/hyperv-daemons.hv-fcopy-daemon.init @@ -0,0 +1,110 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: hyperv-daemons.hv-fcopy-daemon +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Hyper-V file copy service (FCOPY) daemon +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Hyper-V file copy service (FCOPY) daemon" +NAME=hv_fcopy_daemon +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-fcopy-daemon + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Exit if we are not running under Hyper-V or the kernel device does not exist +/lib/hyperv-daemons/check-hyperv || exit 0 +[ -e "/dev/vmbus/hv_fcopy" ] || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + [ "$?" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + RETVAL=$? + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/hyperv-daemons.hv-kvp-daemon.init b/debian/hyperv-daemons.hv-kvp-daemon.init new file mode 100755 index 000000000..e5908ec28 --- /dev/null +++ b/debian/hyperv-daemons.hv-kvp-daemon.init @@ -0,0 +1,109 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: hyperv-daemons.hv-kvp-daemon +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Hyper-V key-value pair (KVP) daemon +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Hyper-V key-value pair (KVP) daemon" +NAME=hv_kvp_daemon +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-kvp-daemon + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Exit if we are not running under Hyper-V +/lib/hyperv-daemons/check-hyperv || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + [ "$?" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + RETVAL=$? + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/hyperv-daemons.hv-vss-daemon.init b/debian/hyperv-daemons.hv-vss-daemon.init new file mode 100755 index 000000000..aff28fcbe --- /dev/null +++ b/debian/hyperv-daemons.hv-vss-daemon.init @@ -0,0 +1,109 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: hyperv-daemons.hv-vss-daemon +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Hyper-V volume shadow copy service (VSS) daemon +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Hyper-V volume shadow copy service (VSS) daemon" +NAME=hv_vss_daemon +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/hyperv-daemons.hv-vss-daemon + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Exit if we are not running under Hyper-V +/lib/hyperv-daemons/check-hyperv || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile -- -n \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + [ "$?" = 2 ] && return 2 + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + RETVAL=$? + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/rules.real b/debian/rules.real index 1eb2cf8e4..ca34334c8 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -95,9 +95,19 @@ install-hyperv-daemons: $(STAMPS_DIR)/build dh_prep $(MAKE) -C $(BUILD_DIR)/tools/hv install top_srcdir=$(CURDIR) DESTDIR=$(DIR) dh_install + for service in fcopy kvp vss; do \ + install -D -m755 debian/hyperv-daemons.hv-$$service-daemon.init \ + $(DIR)/etc/init.d/hyperv-daemons.hv-$$service-daemon \ + || break; \ + done dh_installchangelogs dh_installdocs dh_systemd_enable + for service in fcopy kvp vss; do \ + dh_installinit --name hyperv-daemons.hv-$$service-daemon \ + --onlyscripts \ + || break; \ + done dh_systemd_start dh_lintian dh_strip diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 6106752f6..9da6d26ef 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -55,7 +55,7 @@ Description: USB device sharing system over IP network Package: hyperv-daemons Architecture: i386 amd64 x32 -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: lsb-base (>= 3.2-14), ${shlibs:Depends}, ${misc:Depends} Section: admin Description: Support daemons for Linux running on Hyper-V Suite of daemons for Linux guests running on Hyper-V, consisting of From 896447317887f3616a0b506dd7e78734bd560f28 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 15:07:55 +0000 Subject: [PATCH 453/487] Prepare to release linux-tools (4.4-3). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 76e72f7a6..fecf5bb31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -linux-tools (4.4-3) UNRELEASED; urgency=medium +linux-tools (4.4-3) unstable; urgency=medium * hyperv-daemons: Add init scripts - -- Ben Hutchings Sun, 21 Feb 2016 15:03:44 +0000 + -- Ben Hutchings Sun, 21 Feb 2016 15:07:55 +0000 linux-tools (4.4-2) unstable; urgency=medium From 38cac7323909c738135f376cadc36209481afc06 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 15:30:51 +0000 Subject: [PATCH 454/487] Update patches to upstream versions --- ...ling-kernel-only-linux-nvme.h-as-uap.patch | 2 +- ...behaviour-of-shift-tab-with-nothing.patch} | 18 ++++-- ...remove-wrong-semicolon-in-while-loop.patch | 16 +++-- ...ls-fix-reading-of-build-id-from-vdso.patch | 2 +- debian/patches/series | 4 +- ...d-use-fixdep-with-output-path-prefix.patch | 59 +++++++++++++++++++ ...tools-stop-building-fixdep-in-source.patch | 20 ------- 7 files changed, 88 insertions(+), 33 deletions(-) rename debian/patches/{perf-add-missing-braces-to-if-statement.patch => perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch} (59%) create mode 100644 debian/patches/tools-build-use-fixdep-with-output-path-prefix.patch delete mode 100644 debian/patches/tools-stop-building-fixdep-in-source.patch diff --git a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch index 633b219e6..66a08d4ea 100644 --- a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch +++ b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch @@ -1,7 +1,7 @@ From: Ben Hutchings Date: Mon, 14 Dec 2015 01:09:32 +0000 Subject: nvme: Stop installing kernel-only as UAPI -Forwarded: http://mid.gmane.org/20151214011442.GL28542@decadent.org.uk +Forwarded: not-needed Fixes: 9d99a8dda154 ("nvme: move hardware structures out of the uapi ...") Signed-off-by: Ben Hutchings diff --git a/debian/patches/perf-add-missing-braces-to-if-statement.patch b/debian/patches/perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch similarity index 59% rename from debian/patches/perf-add-missing-braces-to-if-statement.patch rename to debian/patches/perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch index e56236650..911cc53a8 100644 --- a/debian/patches/perf-add-missing-braces-to-if-statement.patch +++ b/debian/patches/perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch @@ -1,15 +1,23 @@ From: Markus Trippelsdorf -Subject: Add missing braces to if statement Date: Mon, 14 Dec 2015 16:44:03 +0100 -Origin: http://article.gmane.org/gmane.linux.kernel/2108038 - -Add missing braces to if statement. +Subject: perf annotate browser: Fix behaviour of Shift-Tab with nothing + focussed +Origin: https://git.kernel.org/linus/d4913cbd05bab685e49c8174896e563b2487d054 The issue was pointed out by gcc-6's -Wmisleading-indentation. -Acked-by: Ingo Molnar Signed-off-by: Markus Trippelsdorf +Acked-by: Ingo Molnar +Cc: Ben Hutchings +Cc: Matt Fleming +Cc: Peter Zijlstra +Fixes: c97cf42219b7 ("perf top: Live TUI Annotation") +Link: http://lkml.kernel.org/r/20151214154403.GB1409@x4 +Signed-off-by: Arnaldo Carvalho de Melo --- + tools/perf/ui/browsers/annotate.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index d4d7cc27252f..718bd46d47fa 100644 --- a/tools/perf/ui/browsers/annotate.c diff --git a/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch b/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch index 9a8c03722..616e14277 100644 --- a/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch +++ b/debian/patches/perf-remove-wrong-semicolon-in-while-loop.patch @@ -1,18 +1,26 @@ From: Markus Trippelsdorf -Subject: Remove wrong semicolon in while loop Date: Mon, 14 Dec 2015 16:43:35 +0100 -Origin: http://article.gmane.org/gmane.linux.kernel/2108037 +Subject: perf tests: Remove wrong semicolon in while loop in CQM test +Origin: https://git.kernel.org/linus/cf89813a5b514bff9b3b5e7eaf2090f22fba62e0 The while loop was spinning. Fix by removing a semicolon. The issue was pointed out by gcc-6's -Wmisleading-indentation. +Signed-off-by: Markus Trippelsdorf Reviewed-by: Matt Fleming Acked-by: Ingo Molnar -Signed-off-by: Markus Trippelsdorf +Cc: Ben Hutchings +Cc: Peter Zijlstra +Fixes: 035827e9f2bd ("perf tests: Add Intel CQM test") +Link: http://lkml.kernel.org/r/20151214154335.GA1409@x4 +Signed-off-by: Arnaldo Carvalho de Melo --- + tools/perf/arch/x86/tests/intel-cqm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c -index d28c1b6a3b54..fa5d17af88b7 100644 +index 3e89ba825f6b..7f064eb37158 100644 --- a/tools/perf/arch/x86/tests/intel-cqm.c +++ b/tools/perf/arch/x86/tests/intel-cqm.c @@ -17,7 +17,7 @@ static pid_t spawn(void) diff --git a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch index 7ca7c0c57..198a87556 100644 --- a/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch +++ b/debian/patches/perf-tools-fix-reading-of-build-id-from-vdso.patch @@ -1,7 +1,7 @@ From: Ben Hutchings Date: Wed, 13 Jan 2016 15:16:30 +0000 Subject: perf tools: Fix reading of build-id from vDSO -Forwarded: http://mid.gmane.org/20160113172301.GT28542@decadent.org.uk +Origin: https://git.kernel.org/linus/40c4a0f92aed570cc529a1e5c24c7e04a0ce8b85 We need to use the long name (the filename) when reading the build-id from a DSO. Using the short name doesn't work for (at least) vDSOs. diff --git a/debian/patches/series b/debian/patches/series index a845fe63a..1f4f8c538 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -17,9 +17,9 @@ alpha-uapi-add-support-for-__sane_userspace_types__.patch nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch perf-tools-fix-reading-of-build-id-from-vdso.patch perf-fix-misleadingly-indented-assignment-whitespace.patch -perf-add-missing-braces-to-if-statement.patch +perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch perf-remove-wrong-semicolon-in-while-loop.patch revert-perf-tools-x86-build-perf-on-older-user-space.patch perf-tools-fix-bpf-feature-check.patch -tools-stop-building-fixdep-in-source.patch +tools-build-use-fixdep-with-output-path-prefix.patch diff --git a/debian/patches/tools-build-use-fixdep-with-output-path-prefix.patch b/debian/patches/tools-build-use-fixdep-with-output-path-prefix.patch new file mode 100644 index 000000000..4d11bbba5 --- /dev/null +++ b/debian/patches/tools-build-use-fixdep-with-output-path-prefix.patch @@ -0,0 +1,59 @@ +From: Jiri Olsa +Date: Thu, 26 Nov 2015 19:50:55 +0100 +Subject: tools build: Use fixdep with OUTPUT path prefix +Origin: https://git.kernel.org/linus/5e50426d5d9049dfdb8b2b18e761717e7e80a6ad + +Adding OUTPUT path prefix for fixdep target so we use it properly in out +of tree builds. + +If the fixdep already existed in the tree, the out of tree build would +see it already exist and did not build the out of tree version, as +reported by Arnaldo: + + [acme@zoo linux]$ make O=/tmp/build/perf -C tools/perf + make: Entering directory '/home/git/linux/tools/perf' + BUILD: Doing 'make -j4' parallel build + make[2]: Nothing to be done for 'fixdep'. + make: Leaving directory '/home/git/linux/tools/perf' + +Reported-and-Tested-by: Arnaldo Carvalho de Melo +Signed-off-by: Jiri Olsa +Cc: David Ahern +Cc: Namhyung Kim +Cc: Peter Zijlstra +Cc: Wang Nan +Link: http://lkml.kernel.org/r/20151126185055.GC19410@krava.brq.redhat.com +[ Fixed conflict with 5725dd8fa888 ("tools build: Clean CFLAGS and LDFLAGS for fixdep") ] +Signed-off-by: Arnaldo Carvalho de Melo +[bwh: Backported to 4.4: adjust context] +--- + tools/build/Makefile | 2 +- + tools/build/Makefile.include | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/build/Makefile b/tools/build/Makefile +index a93036272d43..0d5a0e3a8fa9 100644 +--- a/tools/build/Makefile ++++ b/tools/build/Makefile +@@ -25,7 +25,7 @@ export Q srctree CC LD + MAKEFLAGS := --no-print-directory + build := -f $(srctree)/tools/build/Makefile.build dir=. obj + +-all: fixdep ++all: $(OUTPUT)fixdep + + clean: + $(call QUIET_CLEAN, fixdep) +diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include +index 6254760290c9..be630bed66d2 100644 +--- a/tools/build/Makefile.include ++++ b/tools/build/Makefile.include +@@ -4,7 +4,7 @@ ifdef CROSS_COMPILE + fixdep: + else + fixdep: +- $(Q)$(MAKE) -C $(srctree)/tools/build fixdep ++ $(Q)$(MAKE) -C $(srctree)/tools/build $(OUTPUT)fixdep + endif + + .PHONY: fixdep diff --git a/debian/patches/tools-stop-building-fixdep-in-source.patch b/debian/patches/tools-stop-building-fixdep-in-source.patch deleted file mode 100644 index aae97ba39..000000000 --- a/debian/patches/tools-stop-building-fixdep-in-source.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Ben Hutchings -Date: Fri, 19 Feb 2016 01:14:05 +0000 -Subject: tools: Stop building fixdep in the source directory - -Use the proper target, $(OUTPUT)fixdep, not fixdep. - -Reported-by: Mattia Dongili -Signed-off-by: Ben Hutchings ---- ---- a/tools/build/Makefile.include -+++ b/tools/build/Makefile.include -@@ -4,7 +4,7 @@ ifdef CROSS_COMPILE - fixdep: - else - fixdep: -- $(Q)$(MAKE) -C $(srctree)/tools/build fixdep -+ $(Q)$(MAKE) -C $(srctree)/tools/build $(OUTPUT)fixdep - endif - - .PHONY: fixdep From 7d90293de344205a24969b291f5c0615f2303071 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 16:32:09 +0000 Subject: [PATCH 455/487] Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper) --- debian/rules.d/Makefile.inc | 2 +- debian/rules.d/scripts/mod/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc index acdcf71cd..a79e85b95 100644 --- a/debian/rules.d/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -1,7 +1,7 @@ # Normalise OUTDIR to avoid triggering rebuilds override OUTDIR := $(patsubst ./%,%,$(OUTDIR)) -VPATH = $(top_srcdir)/$(OUTDIR) +VPATH = $(top_rulesdir)/$(OUTDIR) $(top_srcdir)/$(OUTDIR) SHELL = /bin/sh -e diff --git a/debian/rules.d/scripts/mod/Makefile b/debian/rules.d/scripts/mod/Makefile index 728afaa3b..e57e262aa 100644 --- a/debian/rules.d/scripts/mod/Makefile +++ b/debian/rules.d/scripts/mod/Makefile @@ -18,5 +18,5 @@ modpost.real-%: modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c python $(wrapperdir)/gendef.py $< > $@ -modpost.o: $(wrapperdir)/modpost.c modpost-opts.h +modpost.o: modpost.c modpost-opts.h $(CC) $(CFLAGS) -I $(CURDIR) -c -o $@ $< From ff20c40839c039468bac486df3c9603de1f7146f Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 16:44:28 +0000 Subject: [PATCH 456/487] Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper) --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 06ac6ecae..d0115ef56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * lockdep: Add missing macros + * Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper) -- Ben Hutchings Thu, 18 Feb 2016 03:19:14 +0000 From c31998793f0f2cb515b903829fef8bc1585bae47 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 15:36:15 +0000 Subject: [PATCH 457/487] tools/build: Remove bpf() run-time check at build time --- debian/changelog | 1 + debian/patches/series | 1 + ...ove-bpf-run-time-check-at-build-time.patch | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch diff --git a/debian/changelog b/debian/changelog index d0115ef56..7329ff611 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * lockdep: Add missing macros * Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper) + * tools/build: Remove bpf() run-time check at build time -- Ben Hutchings Thu, 18 Feb 2016 03:19:14 +0000 diff --git a/debian/patches/series b/debian/patches/series index 1d7e9974d..59c555c35 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -18,3 +18,4 @@ perf-fix-misleadingly-indented-assignment-whitespace.patch perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch revert-perf-tools-x86-build-perf-on-older-user-space.patch lockdep-add-missing-macros.patch +tools-build-remove-bpf-run-time-check-at-build-time.patch diff --git a/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch new file mode 100644 index 000000000..3a570b351 --- /dev/null +++ b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch @@ -0,0 +1,24 @@ +From: Ben Hutchings +Date: Sun, 21 Feb 2016 15:33:15 +0000 +Subject: tools/build: Remove bpf() run-time check at build time + +It is not correct to test that a syscall works on the build system's +kernel. We might be building on an earlier kernel version or with +security restrictions that block bpf(). + +Signed-off-by: Ben Hutchings +--- +--- a/tools/build/feature/test-bpf.c ++++ b/tools/build/feature/test-bpf.c +@@ -27,10 +27,5 @@ int main(void) + attr.log_level = 0; + attr.kern_version = 0; + +- attr = attr; +- /* +- * Test existence of __NR_bpf and BPF_PROG_LOAD. +- * This call should fail if we run the testcase. +- */ +- return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr)); ++ return 0; + } From 1a34b4993d480b965dbe04ca001c250c916c3dab Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 16:21:18 +0000 Subject: [PATCH 458/487] Update to 4.5-rc5 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7329ff611..5d642d4d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.5~rc5-1~exp1) UNRELEASED; urgency=medium * New upstream release candidate From 47698bd67a85ad4919f6b855c0c766b3aadd1e78 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 16:45:52 +0000 Subject: [PATCH 459/487] Prepare to release linux-tools (4.5~rc5-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d642d4d9..4087f25a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.5~rc5-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.5~rc5-1~exp1) experimental; urgency=medium * New upstream release candidate @@ -7,7 +7,7 @@ linux-tools (4.5~rc5-1~exp1) UNRELEASED; urgency=medium * Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper) * tools/build: Remove bpf() run-time check at build time - -- Ben Hutchings Thu, 18 Feb 2016 03:19:14 +0000 + -- Ben Hutchings Sun, 21 Feb 2016 16:45:52 +0000 linux-tools (4.4-3) unstable; urgency=medium From 68b1d566ae480617872c21a5efc2de8323c8776a Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 21 Feb 2016 16:58:27 +0000 Subject: [PATCH 460/487] hyperv-daemons: Only build the progarams on x86 (fixes FTBFS) The daemons themselves can be built for any architecture, although on !x86 they are useless and won't be included in any package. However, the newly introduced check-hyperv.c include inline assembly which breaks the build. --- debian/build/tools/hv/Makefile | 9 +++++++++ debian/changelog | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/debian/build/tools/hv/Makefile b/debian/build/tools/hv/Makefile index fb3ff37a2..c958962cb 100644 --- a/debian/build/tools/hv/Makefile +++ b/debian/build/tools/hv/Makefile @@ -1,3 +1,10 @@ +ifeq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) + +# Build nothing +include ../../Makefile.inc + +else + PROGS = \ hv_fcopy_daemon \ hv_kvp_daemon \ @@ -15,3 +22,5 @@ install-local-progs: $(PROGS) install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$$(basename $$p)"; \ done install -D -m755 check-hyperv '$(DESTDIR)/lib/hyperv-daemons/check-hyperv' + +endif diff --git a/debian/changelog b/debian/changelog index fecf5bb31..3a35e5065 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.4-4) unstable; urgency=medium + + * hyperv-daemons: Only build the progarams on x86 (fixes FTBFS) + + -- Ben Hutchings Sun, 21 Feb 2016 16:57:55 +0000 + linux-tools (4.4-3) unstable; urgency=medium * hyperv-daemons: Add init scripts From 1add1327961bf3529fd8c6e0ca4a289369929b67 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 00:00:49 +0000 Subject: [PATCH 461/487] Adjust build fix from unstable The inclusion of Makefile.inc for a !x86 build of tools/hv needed adjusting to the new makefile hierarchy. --- debian/changelog | 6 ++++++ debian/rules.d/tools/hv/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 427c8d186..97a5554f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.5~rc5-1~exp3) experimental; urgency=medium + + * Adjust build fix from unstable + + -- Ben Hutchings Sun, 21 Feb 2016 23:45:04 +0000 + linux-tools (4.5~rc5-1~exp2) experimental; urgency=medium * Merge build fix from unstable diff --git a/debian/rules.d/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile index 393d64007..6e59751ab 100644 --- a/debian/rules.d/tools/hv/Makefile +++ b/debian/rules.d/tools/hv/Makefile @@ -1,7 +1,7 @@ ifeq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) # Build nothing -include ../../Makefile.inc +include $(top_rulesdir)/Makefile.inc else From 6ace6a80c11334d4af4d34444d280a07f59ac67c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 23:20:34 +0000 Subject: [PATCH 462/487] Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) This can't be done for $(PROGS) as by definition those don't exist until we build them. --- debian/changelog | 6 ++++++ debian/rules.d/Makefile.inc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 97a5554f5..ed0ba6b86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium + + * Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) + + -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 + linux-tools (4.5~rc5-1~exp3) experimental; urgency=medium * Adjust build fix from unstable diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc index a79e85b95..b7c8dd2c5 100644 --- a/debian/rules.d/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -36,7 +36,7 @@ install-local-progs: $(PROGS) install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done -SCRIPTS_REAL = $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS)) +SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS))) install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ @@ -44,7 +44,7 @@ install-local-scripts: $(SCRIPTS_REAL) install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done -DATA_REAL = $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA)) +DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA))) install-local-data: $(DATA_REAL) @for p in $^; do \ From 0de4f2c89db01e9cb8b1b7e6daabce2811bb16ea Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 23:26:51 +0000 Subject: [PATCH 463/487] linux-kbuild: Include scripts/Makefile.* (Closes: #815593) --- debian/changelog | 1 + debian/rules.d/scripts/Makefile | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index ed0ba6b86..692c257b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) + * linux-kbuild: Include scripts/Makefile.* (Closes: #815593) -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/rules.d/scripts/Makefile b/debian/rules.d/scripts/Makefile index 8d9708771..a3e09ad5d 100644 --- a/debian/rules.d/scripts/Makefile +++ b/debian/rules.d/scripts/Makefile @@ -6,14 +6,7 @@ PROGS = \ DATA = \ Kbuild.include \ - Makefile.build \ - Makefile.clean \ - Makefile.extrawarn \ - Makefile.host \ - Makefile.kasan \ - Makefile.lib \ - Makefile.modinst \ - Makefile.modpost \ + Makefile.* \ mkversion \ module-common.lds From 9d68385e9d79258d24d3924346d6468e624fb414 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 23:27:10 +0000 Subject: [PATCH 464/487] linux-kbuild: Include scripts/gcc-*.sh This makes no functional difference at present but should catch any new gcc feature test scripts. --- debian/rules.d/scripts/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/debian/rules.d/scripts/Makefile b/debian/rules.d/scripts/Makefile index a3e09ad5d..63cc4be87 100644 --- a/debian/rules.d/scripts/Makefile +++ b/debian/rules.d/scripts/Makefile @@ -15,10 +15,7 @@ SCRIPTS = \ checkstack.pl \ checkversion.pl \ depmod.sh \ - gcc-goto.sh \ - gcc-version.sh \ - gcc-x86_32-has-stack-protector.sh \ - gcc-x86_64-has-stack-protector.sh \ + gcc-*.sh \ gen_initramfs_list.sh \ kernel-doc \ Lindent \ From 014aa495112276cd40a450b9f9b90e6346b39d8c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 23:39:54 +0000 Subject: [PATCH 465/487] Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) --- debian/changelog | 1 + debian/rules.d/Makefile.inc | 12 ++++++------ debian/rules.real | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 692c257b4..babd0475d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) * linux-kbuild: Include scripts/Makefile.* (Closes: #815593) + * Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc index b7c8dd2c5..48194af62 100644 --- a/debian/rules.d/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -32,23 +32,23 @@ install-local: install-local-progs install-local-scripts install-local-data install-local-progs: $(PROGS) @for p in $^; do \ - echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS))) install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ - echo " install -m755 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -D -m755 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA))) install-local-data: $(DATA_REAL) @for p in $^; do \ - echo " install -m644 '$$p' '$(prefix)/$(OUTDIR)'"; \ - install -D -m644 "$$p" "$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m644 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ + install -D -m644 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ done diff --git a/debian/rules.real b/debian/rules.real index adf4520d7..08391bae9 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -28,14 +28,14 @@ $(STAMPS_DIR)/build: install-kbuild: PACKAGE_NAME = linux-kbuild-$(VERSION) install-kbuild: DH_OPTIONS = -p$(PACKAGE_NAME) -install-kbuild: BASE_DIR = /usr/lib/$(PACKAGE_NAME) -install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)/$(BASE_DIR) +install-kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME) +install-kbuild: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) install-kbuild: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(call submake,scripts) install prefix=$(DIR) - dh_link $(BASE_DIR) /usr/src/$(PACKAGE_NAME) + $(call submake,scripts) install DESTDIR=$(DIR) prefix=$(PREFIX_DIR) + dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME) dh_installchangelogs dh_installdocs dh_strip From 910e14869d5b281c187a9ce358abbd00d012498b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 22 Feb 2016 23:58:52 +0000 Subject: [PATCH 466/487] hyperv-daemons: Fix rule redefinition that 'make' warns about --- debian/changelog | 1 + debian/rules.d/tools/hv/Makefile | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index babd0475d..6300cc358 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) * linux-kbuild: Include scripts/Makefile.* (Closes: #815593) * Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) + * hyperv-daemons: Fix rule redefinition that 'make' warns about -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/rules.d/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile index 6e59751ab..13315da4f 100644 --- a/debian/rules.d/tools/hv/Makefile +++ b/debian/rules.d/tools/hv/Makefile @@ -8,18 +8,15 @@ else PROGS = \ hv_fcopy_daemon \ hv_kvp_daemon \ - hv_vss_daemon \ - check-hyperv + hv_vss_daemon prefix = /usr/sbin include $(top_rulesdir)/Makefile.inc -install-local-progs: $(PROGS) - @for p in $(filter-out check-hyperv,$^); do \ - echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)'"; \ - install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$$(basename $$p)"; \ - done +# Handle check-hyperv separately since it's installed in a different directory +all-local: check-hyperv +install-local: install -D -m755 check-hyperv '$(DESTDIR)/lib/hyperv-daemons/check-hyperv' endif From a5f3e6ab8c5293cb6f2e0390e20d655b8ecee437 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Feb 2016 00:54:38 +0000 Subject: [PATCH 467/487] Fix setting of installation directory for tools/hv Add installdir variable that defaults to $(prefix)/$(OUTDIR) as used in scripts/, but can be set directly in tools/hv which doesn't want to mirror the source hierarchy. --- debian/rules.d/Makefile.inc | 14 ++++++++------ debian/rules.d/tools/hv/Makefile | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc index 48194af62..3da8eae56 100644 --- a/debian/rules.d/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -14,6 +14,8 @@ CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \ CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) +installdir ?= $(prefix)/$(OUTDIR) + all: all-local all-recursive clean: clean-recursive install: install-local install-recursive @@ -32,23 +34,23 @@ install-local: install-local-progs install-local-scripts install-local-data install-local-progs: $(PROGS) @for p in $^; do \ - echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ - install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS))) install-local-scripts: $(SCRIPTS_REAL) @for p in $^; do \ - echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ - install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA))) install-local-data: $(DATA_REAL) @for p in $^; do \ - echo " install -m644 '$$p' '$(DESTDIR)/$(prefix)/$(OUTDIR)'"; \ - install -D -m644 "$$p" "$(DESTDIR)/$(prefix)/$(OUTDIR)/$$(basename $$p)"; \ + echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done diff --git a/debian/rules.d/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile index 13315da4f..339a8b1ab 100644 --- a/debian/rules.d/tools/hv/Makefile +++ b/debian/rules.d/tools/hv/Makefile @@ -10,7 +10,7 @@ PROGS = \ hv_kvp_daemon \ hv_vss_daemon -prefix = /usr/sbin +installdir = /usr/sbin include $(top_rulesdir)/Makefile.inc From 1d94112d6c9cad1b474de83279adb466c910e3eb Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Feb 2016 01:03:43 +0000 Subject: [PATCH 468/487] debian/control: Build-Depend on dh-python, as dh_python2 warns we should --- debian/changelog | 1 + debian/templates/control.source.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6300cc358..0b9a53fc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * linux-kbuild: Include scripts/Makefile.* (Closes: #815593) * Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) * hyperv-daemons: Fix rule redefinition that 'make' warns about + * debian/control: Build-Depend on dh-python, as dh_python2 warns we should -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 761bf9b6a..791ec51ca 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -8,6 +8,6 @@ Build-Depends: debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, - dh-systemd + dh-python, dh-systemd Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git From ad25e86edbea9e2cdc9e2e9b2289861890cb07dc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Feb 2016 01:06:56 +0000 Subject: [PATCH 469/487] lockdep: Add '+' prefix to make invocation, so it can be parallelised This enables coordination with the top-level job server. Without this, the child 'make' will be limited to serial operation. --- debian/changelog | 1 + debian/rules.d/tools/lib/lockdep/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0b9a53fc1..316760540 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) * hyperv-daemons: Fix rule redefinition that 'make' warns about * debian/control: Build-Depend on dh-python, as dh_python2 warns we should + * lockdep: Add '+' prefix to make invocation, so it can be parallelised -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/rules.d/tools/lib/lockdep/Makefile b/debian/rules.d/tools/lib/lockdep/Makefile index c3980200e..cb8c122f8 100644 --- a/debian/rules.d/tools/lib/lockdep/Makefile +++ b/debian/rules.d/tools/lib/lockdep/Makefile @@ -2,7 +2,7 @@ include $(top_rulesdir)/Makefile.inc DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -MAKE_LOCKDEP := $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \ +MAKE_LOCKDEP := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \ prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \ LIBLOCKDEP_VERSION=$(VERSION) \ CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)' From 50f3a5b708aec2d291260d4c769c815238deb228 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Feb 2016 01:14:08 +0000 Subject: [PATCH 470/487] tools/build: Fix 'unused variable' warning in the bpf() feature check I deleted slightly too much when removing the run-time check. --- debian/changelog | 1 + ...tools-build-remove-bpf-run-time-check-at-build-time.patch | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 316760540..0cba8873d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * hyperv-daemons: Fix rule redefinition that 'make' warns about * debian/control: Build-Depend on dh-python, as dh_python2 warns we should * lockdep: Add '+' prefix to make invocation, so it can be parallelised + * tools/build: Fix 'unused variable' warning in the bpf() feature check -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch index 3a570b351..2db71eaf2 100644 --- a/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch +++ b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch @@ -10,11 +10,10 @@ Signed-off-by: Ben Hutchings --- --- a/tools/build/feature/test-bpf.c +++ b/tools/build/feature/test-bpf.c -@@ -27,10 +27,5 @@ int main(void) - attr.log_level = 0; +@@ -28,9 +28,5 @@ int main(void) attr.kern_version = 0; -- attr = attr; + attr = attr; - /* - * Test existence of __NR_bpf and BPF_PROG_LOAD. - * This call should fail if we run the testcase. From 53b6b7a14387b3360661f38563ab29f603fb4d21 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Feb 2016 01:28:10 +0000 Subject: [PATCH 471/487] lockdep: Add more missing macros --- debian/changelog | 1 + debian/patches/lockdep-add-missing-macros.patch | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0cba8873d..05a55a9ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium * debian/control: Build-Depend on dh-python, as dh_python2 warns we should * lockdep: Add '+' prefix to make invocation, so it can be parallelised * tools/build: Fix 'unused variable' warning in the bpf() feature check + * lockdep: Add more missing macros -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 diff --git a/debian/patches/lockdep-add-missing-macros.patch b/debian/patches/lockdep-add-missing-macros.patch index c5691a19e..e45a3e7db 100644 --- a/debian/patches/lockdep-add-missing-macros.patch +++ b/debian/patches/lockdep-add-missing-macros.patch @@ -17,8 +17,10 @@ doesn't have substitutes for. #define container_of(ptr, type, member) ({ \ --- a/tools/lib/lockdep/uinclude/linux/list.h +++ b/tools/lib/lockdep/uinclude/linux/list.h -@@ -1 +1,2 @@ +@@ -1 +1,4 @@ #include "../../../include/linux/list.h" ++#define hlist_add_head_rcu hlist_add_head ++#define hlist_del_rcu hlist_del +#define hlist_for_each_entry_rcu hlist_for_each_entry --- a/tools/lib/lockdep/uinclude/linux/compiler.h +++ b/tools/lib/lockdep/uinclude/linux/compiler.h From aa53058525dccfbe95c33ab1b4c1adb930d5bfe9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 7 Mar 2016 03:06:37 +0000 Subject: [PATCH 472/487] Update to 4.5-rc7 --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 05a55a9ca..43fc35b49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ -linux-tools (4.5~rc5-1~exp4) UNRELEASED; urgency=medium +linux-tools (4.5~rc7-1~exp1) UNRELEASED; urgency=medium + * New upstream release candidate + + [ Ben Hutchings ] * Makefile.inc: Add support for wildcards in $(SCRIPTS) and $(DATA) * linux-kbuild: Include scripts/Makefile.* (Closes: #815593) * Makefile.inc, rules.real: Fix conflation of $(DESTDIR) and $(prefix) From 77d39a9764558a6889a7463c1fd16052e4af5cfc Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 7 Mar 2016 03:07:00 +0000 Subject: [PATCH 473/487] Prepare to release linux-tools (4.5~rc7-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 43fc35b49..fc07fe261 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.5~rc7-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.5~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate @@ -12,7 +12,7 @@ linux-tools (4.5~rc7-1~exp1) UNRELEASED; urgency=medium * tools/build: Fix 'unused variable' warning in the bpf() feature check * lockdep: Add more missing macros - -- Ben Hutchings Mon, 22 Feb 2016 23:21:57 +0000 + -- Ben Hutchings Mon, 07 Mar 2016 03:07:00 +0000 linux-tools (4.5~rc5-1~exp3) experimental; urgency=medium From 545a89a7a3886e6c3a13da07c2cbb5944d4deed6 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 15:33:22 +0000 Subject: [PATCH 474/487] Update to 4.5 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index fc07fe261..be3315833 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.5-1~exp1) UNRELEASED; urgency=medium + + * New upstream release + + -- Ben Hutchings Sun, 20 Mar 2016 15:31:39 +0000 + linux-tools (4.5~rc7-1~exp1) experimental; urgency=medium * New upstream release candidate From 8c0226951b5e613d0e2922bad7270f123a150ea3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 15:40:05 +0000 Subject: [PATCH 475/487] Update to 4.4.6 --- debian/changelog | 14 +++++++++++ ...ling-kernel-only-linux-nvme.h-as-uap.patch | 23 ------------------- debian/patches/series | 1 - 3 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch diff --git a/debian/changelog b/debian/changelog index 3a35e5065..726613e6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +linux-tools (4.4.6-1) UNRELEASED; urgency=medium + + * New upstream stable update: + - tools lib traceevent: Fix output of %llu for 64 bit values read on + 32 bit machines + - perf tools: tracepoint_error() can receive e=NULL, robustify it + - perf kvm record/report: 'unprocessable sample' error while + recording/reporting guest data + - tools: hv: vss: fix the write()'s argument: error -> vss_msg + - uapi: update install list after nvme.h rename + - perf stat: Do not clean event's private stats + + -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 + linux-tools (4.4-4) unstable; urgency=medium * hyperv-daemons: Only build the progarams on x86 (fixes FTBFS) diff --git a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch b/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch deleted file mode 100644 index 66a08d4ea..000000000 --- a/debian/patches/nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Ben Hutchings -Date: Mon, 14 Dec 2015 01:09:32 +0000 -Subject: nvme: Stop installing kernel-only as UAPI -Forwarded: not-needed - -Fixes: 9d99a8dda154 ("nvme: move hardware structures out of the uapi ...") -Signed-off-by: Ben Hutchings ---- - include/uapi/linux/Kbuild | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild -index 628e6e6..41652af 100644 ---- a/include/uapi/linux/Kbuild -+++ b/include/uapi/linux/Kbuild -@@ -306,7 +306,6 @@ header-y += nfs_mount.h - header-y += nl80211.h - header-y += n_r3964.h - header-y += nubus.h --header-y += nvme.h - header-y += nvram.h - header-y += omap3isp.h - header-y += omapfb.h diff --git a/debian/patches/series b/debian/patches/series index 1f4f8c538..c1383d0b6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,7 +14,6 @@ tools-lib-lockdep-use-ldflags.patch tools-hv-fix-fortify-format-warning.patch revert-perf-build-fix-libunwind-feature-detection-on.patch alpha-uapi-add-support-for-__sane_userspace_types__.patch -nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch perf-tools-fix-reading-of-build-id-from-vdso.patch perf-fix-misleadingly-indented-assignment-whitespace.patch perf-annotate-browser-fix-behaviour-of-shift-tab-with-nothing.patch From 96559e9c4c52d4c36de89c5a18ea8bbbaead2352 Mon Sep 17 00:00:00 2001 From: Mattia Dongili Date: Fri, 11 Mar 2016 06:55:41 -0800 Subject: [PATCH 476/487] Build tools from power/cpupower They'll eventually replace cpufrequtils and libcpufreq{0,-dev} so the structure of the packages is the same. --- debian/build/tools/Makefile | 1 + debian/build/tools/power/cpupower/Makefile | 20 ++++++ debian/changelog | 3 + debian/libcpupower-dev.install | 2 + debian/libcpupower0.install | 1 + debian/libcpupower0.symbols | 44 +++++++++++++ debian/linux-cpupower.install | 2 + ...-cpupower-fix-incorrect-if-statement.patch | 21 +++++++ .../power-cpupower-fix-manpages-NAME.patch | 63 +++++++++++++++++++ debian/patches/series | 2 + debian/rules.real | 23 ++++++- debian/templates/control.main.in | 29 +++++++++ debian/templates/control.source.in | 2 +- 13 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 debian/build/tools/power/cpupower/Makefile create mode 100644 debian/libcpupower-dev.install create mode 100644 debian/libcpupower0.install create mode 100644 debian/libcpupower0.symbols create mode 100644 debian/linux-cpupower.install create mode 100644 debian/patches/power-cpupower-fix-incorrect-if-statement.patch create mode 100644 debian/patches/power-cpupower-fix-manpages-NAME.patch diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile index a3cdd8728..1ea9cf3d2 100644 --- a/debian/build/tools/Makefile +++ b/debian/build/tools/Makefile @@ -2,6 +2,7 @@ SUBDIRS = \ hv \ lib/lockdep \ perf \ + power/cpupower \ usb/usbip include ../Makefile.inc diff --git a/debian/build/tools/power/cpupower/Makefile b/debian/build/tools/power/cpupower/Makefile new file mode 100644 index 000000000..66e2c75aa --- /dev/null +++ b/debian/build/tools/power/cpupower/Makefile @@ -0,0 +1,20 @@ +OUTDIR = tools/power/cpupower +prefix = /usr/sbin + +include ../../../Makefile.inc + +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + DEBUG = true +endif + +all: + mkdir out + $(shell dpkg-buildflags --export=cmdline) $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out DEBUG=$(DEBUG) CPUFREQ_BENCH=false V=true + +install: + $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false + +clean: + mkdir -p out + $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out clean + rm -rf out diff --git a/debian/changelog b/debian/changelog index 726613e6a..a6b12f4a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ linux-tools (4.4.6-1) UNRELEASED; urgency=medium - uapi: update install list after nvme.h rename - perf stat: Do not clean event's private stats + [ Mattia Dongili ] + * Build linux-cpupower. + -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 linux-tools (4.4-4) unstable; urgency=medium diff --git a/debian/libcpupower-dev.install b/debian/libcpupower-dev.install new file mode 100644 index 000000000..b34190552 --- /dev/null +++ b/debian/libcpupower-dev.install @@ -0,0 +1,2 @@ +usr/include/* +usr/lib/lib*.so diff --git a/debian/libcpupower0.install b/debian/libcpupower0.install new file mode 100644 index 000000000..d0dbfd18a --- /dev/null +++ b/debian/libcpupower0.install @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff --git a/debian/libcpupower0.symbols b/debian/libcpupower0.symbols new file mode 100644 index 000000000..a356760d1 --- /dev/null +++ b/debian/libcpupower0.symbols @@ -0,0 +1,44 @@ +libcpupower.so.0 libcpupower0 #MINVER# + cpufreq_cpu_exists@Base 4.4 + cpufreq_get_affected_cpus@Base 4.4 + cpufreq_get_available_frequencies@Base 4.4 + cpufreq_get_available_governors@Base 4.4 + cpufreq_get_driver@Base 4.4 + cpufreq_get_freq_hardware@Base 4.4 + cpufreq_get_freq_kernel@Base 4.4 + cpufreq_get_hardware_limits@Base 4.4 + cpufreq_get_policy@Base 4.4 + cpufreq_get_related_cpus@Base 4.4 + cpufreq_get_stats@Base 4.4 + cpufreq_get_transition_latency@Base 4.4 + cpufreq_get_transitions@Base 4.4 + cpufreq_modify_policy_governor@Base 4.4 + cpufreq_modify_policy_max@Base 4.4 + cpufreq_modify_policy_min@Base 4.4 + cpufreq_put_affected_cpus@Base 4.4 + cpufreq_put_available_frequencies@Base 4.4 + cpufreq_put_available_governors@Base 4.4 + cpufreq_put_driver@Base 4.4 + cpufreq_put_policy@Base 4.4 + cpufreq_put_related_cpus@Base 4.4 + cpufreq_put_stats@Base 4.4 + cpufreq_set_frequency@Base 4.4 + cpufreq_set_policy@Base 4.4 + sysfs_cpu_exists@Base 4.4 + sysfs_get_available_frequencies@Base 4.4 + sysfs_get_freq_affected_cpus@Base 4.4 + sysfs_get_freq_available_governors@Base 4.4 + sysfs_get_freq_driver@Base 4.4 + sysfs_get_freq_hardware@Base 4.4 + sysfs_get_freq_hardware_limits@Base 4.4 + sysfs_get_freq_kernel@Base 4.4 + sysfs_get_freq_policy@Base 4.4 + sysfs_get_freq_related_cpus@Base 4.4 + sysfs_get_freq_stats@Base 4.4 + sysfs_get_freq_transition_latency@Base 4.4 + sysfs_get_freq_transitions@Base 4.4 + sysfs_modify_freq_policy_governor@Base 4.4 + sysfs_modify_freq_policy_max@Base 4.4 + sysfs_modify_freq_policy_min@Base 4.4 + sysfs_set_freq_policy@Base 4.4 + sysfs_set_frequency@Base 4.4 diff --git a/debian/linux-cpupower.install b/debian/linux-cpupower.install new file mode 100644 index 000000000..21cca7cd9 --- /dev/null +++ b/debian/linux-cpupower.install @@ -0,0 +1,2 @@ +usr/bin +usr/share/ diff --git a/debian/patches/power-cpupower-fix-incorrect-if-statement.patch b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch new file mode 100644 index 000000000..f9ea8613a --- /dev/null +++ b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch @@ -0,0 +1,21 @@ +commit 2fecc6ec4961703ea2c8936f3e37154399a56a68 +Author: Mattia Dongili +Date: Sun Feb 14 11:55:43 2016 -0800 + + warning: comparison of constant ‘-1’ with boolean expression is always false + + Signed-off-by: Mattia Dongili + +diff --git a/tools/power/cpupower/utils/helpers/topology.c b/tools/power/cpupower/utils/helpers/topology.c +index 9cbb7fd..771ec60 100644 +--- a/tools/power/cpupower/utils/helpers/topology.c ++++ b/tools/power/cpupower/utils/helpers/topology.c +@@ -106,7 +106,7 @@ int get_cpu_topology(struct cpupower_topology *cpu_top) + cpu_top->pkgs++; + } + } +- if (!cpu_top->core_info[0].pkg == -1) ++ if (cpu_top->core_info[0].pkg != -1) + cpu_top->pkgs++; + + /* Intel's cores count is not consecutively numbered, there may diff --git a/debian/patches/power-cpupower-fix-manpages-NAME.patch b/debian/patches/power-cpupower-fix-manpages-NAME.patch new file mode 100644 index 000000000..491e0bce2 --- /dev/null +++ b/debian/patches/power-cpupower-fix-manpages-NAME.patch @@ -0,0 +1,63 @@ +commit 33104a54437ff182a3541d6c0089e5b8d89c25cd +Author: Mattia Dongili +Date: Fri Feb 19 07:46:32 2016 -0800 + + Fix cpupower manpages "NAME" section + + The token before "-" should be the program name, no spaces allowed. + See man(7) and lexgrog(1). + + Signed-off-by: Mattia Dongili + +diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1 +index 9c85a38..6aa8d23 100644 +--- a/tools/power/cpupower/man/cpupower-frequency-info.1 ++++ b/tools/power/cpupower/man/cpupower-frequency-info.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER\-FREQUENCY\-INFO" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower frequency\-info \- Utility to retrieve cpufreq kernel information ++cpupower\-frequency\-info \- Utility to retrieve cpufreq kernel information + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] frequency\-info [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-frequency-set.1 b/tools/power/cpupower/man/cpupower-frequency-set.1 +index 3eacc8d..b505702 100644 +--- a/tools/power/cpupower/man/cpupower-frequency-set.1 ++++ b/tools/power/cpupower/man/cpupower-frequency-set.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER\-FREQUENCY\-SET" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower frequency\-set \- A small tool which allows to modify cpufreq settings. ++cpupower\-frequency\-set \- A small tool which allows to modify cpufreq settings. + .SH "SYNTAX" + .LP + cpupower [ \-c cpu ] frequency\-set [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1 +index 7b3646a..80a1311 100644 +--- a/tools/power/cpupower/man/cpupower-idle-info.1 ++++ b/tools/power/cpupower/man/cpupower-idle-info.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER-IDLE-INFO" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower idle\-info \- Utility to retrieve cpu idle kernel information ++cpupower\-idle\-info \- Utility to retrieve cpu idle kernel information + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP] +diff --git a/tools/power/cpupower/man/cpupower-idle-set.1 b/tools/power/cpupower/man/cpupower-idle-set.1 +index 580c4e3..21916cf 100644 +--- a/tools/power/cpupower/man/cpupower-idle-set.1 ++++ b/tools/power/cpupower/man/cpupower-idle-set.1 +@@ -1,7 +1,7 @@ + .TH "CPUPOWER-IDLE-SET" "1" "0.1" "" "cpupower Manual" + .SH "NAME" + .LP +-cpupower idle\-set \- Utility to set cpu idle state specific kernel options ++cpupower\-idle\-set \- Utility to set cpu idle state specific kernel options + .SH "SYNTAX" + .LP + cpupower [ \-c cpulist ] idle\-info [\fIoptions\fP] diff --git a/debian/patches/series b/debian/patches/series index c1383d0b6..b1dd533e7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -22,3 +22,5 @@ perf-remove-wrong-semicolon-in-while-loop.patch revert-perf-tools-x86-build-perf-on-older-user-space.patch perf-tools-fix-bpf-feature-check.patch tools-build-use-fixdep-with-output-path-prefix.patch +power-cpupower-fix-incorrect-if-statement.patch +power-cpupower-fix-manpages-NAME.patch diff --git a/debian/rules.real b/debian/rules.real index ca34334c8..891c39ba1 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -3,7 +3,7 @@ export KBUILD_BUILD_TIMESTAMP := $(shell dpkg-parsechangelog | sed -ne 's,^Date: include debian/rules.defs -binary-arch: install-kbuild install-usbip install-liblockdep +binary-arch: install-kbuild install-usbip install-liblockdep install-cpupower ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) binary-arch: install-perf endif @@ -43,6 +43,27 @@ install-kbuild: $(STAMPS_DIR)/build dh_md5sums dh_builddeb + +install-cpupower: DH_OPTIONS = -plinux-cpupower -plibcpupower0 -plibcpupower-dev +install-cpupower: DIR = $(CURDIR)/debian/cpupower-tmp +install-cpupower: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_prep + $(MAKE) -C $(BUILD_DIR)/tools/power/cpupower install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_install --sourcedir=$(DIR) + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + install-perf: PACKAGE_NAME = linux-perf-$(VERSION) install-perf: DH_OPTIONS = -p$(PACKAGE_NAME) install-perf: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 9da6d26ef..a64794b27 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -5,6 +5,35 @@ Multi-Arch: foreign Description: Kbuild infrastructure for Linux @version@ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. +Package: linux-cpupower +Section: admin +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPU frequency and voltage scaling tools for Linux + This package contains the 'power/cpupower' tools for Linux. + . + This set of userspace tools allow inspection and control of cpufreq and + cpuidle tunables for hardware that support these features. + The "cpupower" command replaces "cpufreq-info" and "cpufreq-set" in + cpufrequtils. + +Package: libcpupower0 +Section: libs +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPU frequency and voltage scaling tools for Linux (libraries) + This package contains the shared library. + +Package: libcpupower-dev +Section: libdevel +Architecture: linux-any +Depends: ${shlibs:Depends} +Provides: libcpufreq-dev +Conflicts: libcpufreq-dev +Replaces: libcpufreq-dev +Description: CPU frequency and voltage scaling tools for Linux (development files) + This package contains the 'power/cpupower' headers and library shared objects. + Package: linux-perf-@version@ Section: devel Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 761bf9b6a..109be7b49 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,7 +7,7 @@ Standards-Version: 3.9.6 Build-Depends: debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, + autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, libpci-dev, dh-systemd Vcs-Git: https://anonscm.debian.org/git/kernel/linux-tools.git Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-tools.git From ef781efeb9999d53dc48afa0a69005c996d5c2ed Mon Sep 17 00:00:00 2001 From: Mattia Dongili Date: Fri, 11 Mar 2016 08:07:19 -0800 Subject: [PATCH 477/487] W: linux-tools source: debhelper-but-no-misc-depends libcpupower-dev --- debian/templates/control.main.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index a64794b27..3b9372292 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -27,7 +27,7 @@ Description: CPU frequency and voltage scaling tools for Linux (libraries) Package: libcpupower-dev Section: libdevel Architecture: linux-any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Provides: libcpufreq-dev Conflicts: libcpufreq-dev Replaces: libcpufreq-dev From 6996e3594c7c895202fc09aa41af3ee99b8600e2 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 15:57:16 +0000 Subject: [PATCH 478/487] Fix header format and add Forwarded fields for cpupower patches --- ...er-cpupower-fix-incorrect-if-statement.patch | 13 ++++++------- .../power-cpupower-fix-manpages-NAME.patch | 17 ++++++++--------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/debian/patches/power-cpupower-fix-incorrect-if-statement.patch b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch index f9ea8613a..7773fa756 100644 --- a/debian/patches/power-cpupower-fix-incorrect-if-statement.patch +++ b/debian/patches/power-cpupower-fix-incorrect-if-statement.patch @@ -1,11 +1,10 @@ -commit 2fecc6ec4961703ea2c8936f3e37154399a56a68 -Author: Mattia Dongili -Date: Sun Feb 14 11:55:43 2016 -0800 - - warning: comparison of constant ‘-1’ with boolean expression is always false - - Signed-off-by: Mattia Dongili +From: Mattia Dongili +Date: Sun, 14 Feb 2016 19:55:43 +0000 +Subject: warning: comparison of constant ‘-1’ with boolean expression is always false +Forwarded: http://article.gmane.org/gmane.linux.power-management.general/73193 +Signed-off-by: Mattia Dongili +--- diff --git a/tools/power/cpupower/utils/helpers/topology.c b/tools/power/cpupower/utils/helpers/topology.c index 9cbb7fd..771ec60 100644 --- a/tools/power/cpupower/utils/helpers/topology.c diff --git a/debian/patches/power-cpupower-fix-manpages-NAME.patch b/debian/patches/power-cpupower-fix-manpages-NAME.patch index 491e0bce2..ee9534a8b 100644 --- a/debian/patches/power-cpupower-fix-manpages-NAME.patch +++ b/debian/patches/power-cpupower-fix-manpages-NAME.patch @@ -1,14 +1,13 @@ -commit 33104a54437ff182a3541d6c0089e5b8d89c25cd -Author: Mattia Dongili -Date: Fri Feb 19 07:46:32 2016 -0800 +From: Mattia Dongili +Date: Fri, 19 Feb 2016 07:46:32 -0800 +Subject: Fix cpupower manpages "NAME" section +Forwarded: http://article.gmane.org/gmane.linux.power-management.general/73191 - Fix cpupower manpages "NAME" section - - The token before "-" should be the program name, no spaces allowed. - See man(7) and lexgrog(1). - - Signed-off-by: Mattia Dongili +The token before "-" should be the program name, no spaces allowed. +See man(7) and lexgrog(1). +Signed-off-by: Mattia Dongili +--- diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1 index 9c85a38..6aa8d23 100644 --- a/tools/power/cpupower/man/cpupower-frequency-info.1 From cf4f32ccd156d2d35cf20fb13814c74c93b891a3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 16:06:01 +0000 Subject: [PATCH 479/487] debian/control: Update policy version to 3.9.7; no changes required --- debian/changelog | 3 +++ debian/templates/control.source.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a6b12f4a7..7674e585b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ linux-tools (4.4.6-1) UNRELEASED; urgency=medium [ Mattia Dongili ] * Build linux-cpupower. + [ Ben Hutchings ] + * debian/control: Update policy version to 3.9.7; no changes required + -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 linux-tools (4.4-4) unstable; urgency=medium diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 109be7b49..4e9f714ed 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -3,7 +3,7 @@ Section: kernel Priority: optional Maintainer: Debian Kernel Team Uploaders: Bastian Blank , Ben Hutchings , Jonathan Nieder -Standards-Version: 3.9.6 +Standards-Version: 3.9.7 Build-Depends: debhelper (>> 7), python3, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, From 466e99f39753af7b4dd3fc0fe444efc44a1e1c58 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 16:19:25 +0000 Subject: [PATCH 480/487] linux-perf: Override lintian errors for perf-read-vdso{,x}32 in 64-bit packages --- debian/bin/gencontrol.py | 7 +++++++ debian/changelog | 2 ++ debian/rules.real | 1 + debian/templates/lintian-overrides.perf.in | 3 +++ 4 files changed, 13 insertions(+) create mode 100644 debian/templates/lintian-overrides.perf.in diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index d299ef252..33f4241fd 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -51,6 +51,13 @@ class gencontrol(Gencontrol): main = self.templates["control.main"] packages.extend(self.process_packages(main, self.vars)) + def substitute_file(template, target): + with codecs.open(target, 'w', 'utf-8') as f: + f.write(self.substitute(self.templates[template], self.vars)) + substitute_file('lintian-overrides.perf', + 'debian/linux-perf-%s.lintian-overrides' % + self.vars['version']) + def process_changelog(self): changelog = Changelog(version = VersionLinux) self.version = version = changelog[0].version diff --git a/debian/changelog b/debian/changelog index 7674e585b..b09489845 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ linux-tools (4.4.6-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * debian/control: Update policy version to 3.9.7; no changes required + * linux-perf: Override lintian errors for perf-read-vdso{,x}32 in + 64-bit packages -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 diff --git a/debian/rules.real b/debian/rules.real index 891c39ba1..dd3980a64 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -76,6 +76,7 @@ install-perf: $(STAMPS_DIR)/build dh_python2 /usr/share/perf_$(VERSION)-core/scripts/python/Perf-Trace-Util/lib/ dh_installchangelogs dh_installdocs + dh_lintian dh_strip dh_compress dh_fixperms diff --git a/debian/templates/lintian-overrides.perf.in b/debian/templates/lintian-overrides.perf.in new file mode 100644 index 000000000..858faa782 --- /dev/null +++ b/debian/templates/lintian-overrides.perf.in @@ -0,0 +1,3 @@ +# These executables are needed to handle processes running in compat mode +linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdso32 +linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdsox32 From cb4117a268832a5b2df44b10c7cbd98debf82028 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 16:22:21 +0000 Subject: [PATCH 481/487] debian/copyright: Move GPL-2 boilerplate to its own paragraph It is apparently valid to refer to licenses by short name alone only if the full text is placed in a standalone License paragraph, not as part of an earlier Files paragraph. --- debian/changelog | 1 + debian/copyright | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index b09489845..4d89242b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ linux-tools (4.4.6-1) UNRELEASED; urgency=medium * debian/control: Update policy version to 3.9.7; no changes required * linux-perf: Override lintian errors for perf-read-vdso{,x}32 in 64-bit packages + * debian/copyright: Move GPL-2 boilerplate to its own paragraph -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 diff --git a/debian/copyright b/debian/copyright index 7ba027e84..6016868e6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,21 +11,6 @@ Comment: Files: * Copyright: 1991-2012 Linus Torvalds and many others License: GPL-2 - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the complete text of the GNU General Public License version - 2 can be found in `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: 2006-2012 Debian kernel team @@ -49,3 +34,20 @@ License: LGPL-2.1 . On Debian systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. + +License: GPL-2 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General Public License version + 2 can be found in `/usr/share/common-licenses/GPL-2'. From 6e8c2c9ccde6047bcdc91f4af1657811d1cf70cf Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 16:23:48 +0000 Subject: [PATCH 482/487] Prepare to release linux-tools (4.4.6-1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4d89242b3..54bfd6245 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linux-tools (4.4.6-1) UNRELEASED; urgency=medium +linux-tools (4.4.6-1) unstable; urgency=medium * New upstream stable update: - tools lib traceevent: Fix output of %llu for 64 bit values read on @@ -19,7 +19,7 @@ linux-tools (4.4.6-1) UNRELEASED; urgency=medium 64-bit packages * debian/copyright: Move GPL-2 boilerplate to its own paragraph - -- Ben Hutchings Sun, 20 Mar 2016 15:35:32 +0000 + -- Ben Hutchings Sun, 20 Mar 2016 16:23:48 +0000 linux-tools (4.4-4) unstable; urgency=medium From 85aba07cc0f005b3af210fb64e2dafe6e93c2c17 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 20:08:08 +0000 Subject: [PATCH 483/487] Simplify make rules for cpupower --- debian/rules.d/tools/power/cpupower/Makefile | 14 ++++---------- debian/rules.real | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile index 66e2c75aa..79b131430 100644 --- a/debian/rules.d/tools/power/cpupower/Makefile +++ b/debian/rules.d/tools/power/cpupower/Makefile @@ -1,20 +1,14 @@ -OUTDIR = tools/power/cpupower -prefix = /usr/sbin - -include ../../../Makefile.inc +include $(top_rulesdir)/Makefile.inc ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) DEBUG = true endif all: - mkdir out - $(shell dpkg-buildflags --export=cmdline) $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out DEBUG=$(DEBUG) CPUFREQ_BENCH=false V=true + $(shell dpkg-buildflags --export=cmdline) $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) DEBUG=$(DEBUG) CPUFREQ_BENCH=false V=true install: - $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false + $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) install mandir=/usr/share/man DESTDIR=$(DESTDIR) CPUFREQ_BENCH=false clean: - mkdir -p out - $(MAKE) -C $(top_srcdir)/tools/power/cpupower -f Makefile O=$(CURDIR)/out clean - rm -rf out + $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) clean diff --git a/debian/rules.real b/debian/rules.real index 6338c7091..52833514c 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -54,7 +54,7 @@ install-cpupower: $(STAMPS_DIR)/build dh_testdir dh_testroot dh_prep - $(MAKE) -C $(BUILD_DIR)/tools/power/cpupower install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + $(call submake,tools/power/cpupower) install DESTDIR=$(DIR) dh_install --sourcedir=$(DIR) dh_installchangelogs dh_installdocs From 6e0082081c6f7b1bad2d316e1fc9ef8db52cada0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 20:09:28 +0000 Subject: [PATCH 484/487] Add cpupower package build directories to .gitignore --- debian/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/.gitignore b/debian/.gitignore index 6c99239ff..97d738ced 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -13,8 +13,10 @@ /control.md5sum /files /hyperv-daemons/ +/libcpupower*/ /liblockdep*/ /libusbip-dev/ +/linux-cpupower/ /linux-kbuild-* /linux-perf-* /lockdep/ From fd89731014ea14efd990ae39a2c3b5a5a8678bb1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 21:20:16 +0000 Subject: [PATCH 485/487] linux-perf: Fix use of uninitialized variables --- debian/changelog | 3 + debian/patches/series | 1 + ...fix-use-of-uninitialized-variables.patches | 69 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 debian/patches/tools-lib-traceevent-fix-use-of-uninitialized-variables.patches diff --git a/debian/changelog b/debian/changelog index b6602c184..f6f85ba56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ linux-tools (4.5-1~exp1) UNRELEASED; urgency=medium * New upstream release + [ Ben Hutchings ] + * linux-perf: Fix use of uninitialized variables + -- Ben Hutchings Sun, 20 Mar 2016 15:31:39 +0000 linux-tools (4.5~rc7-1~exp1) experimental; urgency=medium diff --git a/debian/patches/series b/debian/patches/series index 57f129f18..c78eff88a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,3 +20,4 @@ revert-perf-tools-x86-build-perf-on-older-user-space.patch lockdep-add-missing-macros.patch tools-build-remove-bpf-run-time-check-at-build-time.patch power-cpupower-fix-manpages-NAME.patch +tools-lib-traceevent-fix-use-of-uninitialized-variables.patches diff --git a/debian/patches/tools-lib-traceevent-fix-use-of-uninitialized-variables.patches b/debian/patches/tools-lib-traceevent-fix-use-of-uninitialized-variables.patches new file mode 100644 index 000000000..82a841845 --- /dev/null +++ b/debian/patches/tools-lib-traceevent-fix-use-of-uninitialized-variables.patches @@ -0,0 +1,69 @@ +From: Ben Hutchings +Date: Sun, 20 Mar 2016 21:09:02 +0000 +Subject: tools lib traceevent: Fix use of uninitialized variables + +Fix a number of correct warnings from gcc: + +> plugin_function.c:133:6: warning: 'index' may be used uninitialized in this function [-Wmaybe-uninitialized] +> int index; +> ^ + +'index' is initialized only if indentation is wanted. Move the +printing of indentation using 'index' into the same if-statement. + +> kbuffer-parse.c:339:27: warning: 'length' may be used uninitialized in this function [-Wmaybe-uninitialized] +> kbuf->next = kbuf->index + length; +> ^ +> kbuffer-parse.c:297:15: note: 'length' was declared here +> unsigned int length; +> ^ + +'length' is not initialized when handling an OLD_RINGBUF_TYPE_TIME_EXTEND +record. Based on what trace-cmd does, set length = 0 in this case. + +> kbuffer-parse.c: In function 'kbuffer_read_at_offset': +> kbuffer-parse.c:632:9: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] +> return data; +> ^ + +'data' is not initialized if the offset is too small. Initialize it +to NULL so that the behaviour is the same as when the offset is too +large. + +Signed-off-by: Ben Hutchings +--- +--- a/tools/lib/traceevent/kbuffer-parse.c ++++ b/tools/lib/traceevent/kbuffer-parse.c +@@ -314,6 +314,7 @@ static unsigned int old_update_pointers( + extend <<= TS_SHIFT; + extend += delta; + delta = extend; ++ length = 0; + ptr += 4; + break; + +@@ -613,7 +614,7 @@ unsigned long long kbuffer_timestamp(str + void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset, + unsigned long long *ts) + { +- void *data; ++ void *data = NULL; + + if (offset < kbuf->start) + offset = 0; +--- a/tools/lib/traceevent/plugin_function.c ++++ b/tools/lib/traceevent/plugin_function.c +@@ -142,10 +142,10 @@ static int function_handler(struct trace + + parent = pevent_find_function(pevent, pfunction); + +- if (parent && ftrace_indent->set) ++ if (parent && ftrace_indent->set) { + index = add_and_get_index(parent, func, record->cpu); +- +- trace_seq_printf(s, "%*s", index*3, ""); ++ trace_seq_printf(s, "%*s", index*3, ""); ++ } + + if (func) + trace_seq_printf(s, "%s", func); From 4263a6e85d0aba1781a5464dc469671f3d340785 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 21:20:22 +0000 Subject: [PATCH 486/487] Prepare to release linux-tools (4.5-1~exp1). --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f6f85ba56..b1f16698d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -linux-tools (4.5-1~exp1) UNRELEASED; urgency=medium +linux-tools (4.5-1~exp1) experimental; urgency=medium * New upstream release [ Ben Hutchings ] * linux-perf: Fix use of uninitialized variables - -- Ben Hutchings Sun, 20 Mar 2016 15:31:39 +0000 + -- Ben Hutchings Sun, 20 Mar 2016 21:20:22 +0000 linux-tools (4.5~rc7-1~exp1) experimental; urgency=medium From 8f3922a3c7b5a7bb3e1d66f5db5b4e90f8825fb7 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 20 Mar 2016 21:59:06 +0000 Subject: [PATCH 487/487] Fix architecture filtering to use DEB_HOST_ARCH not DEB_BUILD_ARCH Should make cross-builds work properly. --- debian/rules.d/tools/hv/Makefile | 2 +- debian/rules.real | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules.d/tools/hv/Makefile b/debian/rules.d/tools/hv/Makefile index 339a8b1ab..3393517f5 100644 --- a/debian/rules.d/tools/hv/Makefile +++ b/debian/rules.d/tools/hv/Makefile @@ -1,4 +1,4 @@ -ifeq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) +ifeq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) # Build nothing include $(top_rulesdir)/Makefile.inc diff --git a/debian/rules.real b/debian/rules.real index 52833514c..9bcea29f6 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -8,10 +8,10 @@ define submake endef binary-arch: install-kbuild install-usbip install-liblockdep install-cpupower -ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),) +ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_HOST_ARCH)),) binary-arch: install-perf endif -ifneq ($(filter i386 amd64 x32,$(DEB_BUILD_ARCH)),) +ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) binary-arch: install-hyperv-daemons endif