[kernel] r6832 - in dists/sid/linux-2.6.16: . debian
debian/lib/python/debian_linux debian/modules debian/templates
Bastian Blank
waldi at costa.debian.org
Mon Jun 19 18:31:32 UTC 2006
Author: waldi
Date: Mon Jun 19 18:31:29 2006
New Revision: 6832
Added:
dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesextra.in
dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesinline.in
dists/sid/linux-2.6.16/debian/templates/control.image.type-standalone.in
Removed:
dists/sid/linux-2.6.16/debian/templates/control.image.in
dists/sid/linux-2.6.16/debian/templates/control.modules.in
Modified:
dists/sid/linux-2.6.16/ (props changed)
dists/sid/linux-2.6.16/debian/bin/abicheck.py
dists/sid/linux-2.6.16/debian/bin/gencontrol.py
dists/sid/linux-2.6.16/debian/lib/python/debian_linux/config.py
dists/sid/linux-2.6.16/debian/lib/python/debian_linux/debian.py
dists/sid/linux-2.6.16/debian/lib/python/debian_linux/gencontrol.py
dists/sid/linux-2.6.16/debian/lib/python/debian_linux/utils.py
dists/sid/linux-2.6.16/debian/modules/gencontrol.py
dists/sid/linux-2.6.16/debian/modules/rules.include
dists/sid/linux-2.6.16/debian/rules
dists/sid/linux-2.6.16/debian/rules.real
dists/sid/linux-2.6.16/debian/templates/control.headers.in
dists/sid/linux-2.6.16/debian/templates/control.main.in
dists/sid/linux-2.6.16/debian/templates/control.source.in
Log:
Merge /dists/trunk/linux-2.6 excluding
- debian/arch,
- debian/patches and
- parts of debian/templates.
Modified: dists/sid/linux-2.6.16/debian/bin/abicheck.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/bin/abicheck.py (original)
+++ dists/sid/linux-2.6.16/debian/bin/abicheck.py Mon Jun 19 18:31:29 2006
@@ -6,7 +6,7 @@
class checker(object):
def __init__(self, dir, arch, subarch, flavour):
- self.config = config_reader(["debian/arch"])
+ self.config = config_reader_arch(["debian/arch"])
self.filename_new = "%s/Module.symvers" % dir
abiname = self.config['abi',]['abiname']
if subarch == 'none':
Modified: dists/sid/linux-2.6.16/debian/bin/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/bin/gencontrol.py (original)
+++ dists/sid/linux-2.6.16/debian/bin/gencontrol.py Mon Jun 19 18:31:29 2006
@@ -8,13 +8,14 @@
def __init__(self):
super(gencontrol, self).__init__()
self.changelog = read_changelog()
- self.version, self.abiname, self.changelog_vars = self.process_changelog({})
+ self.process_changelog()
def do_main_setup(self, vars, makeflags):
vars.update(self.config['image',])
+ makeflags['REVISIONS'] = ' '.join([i['Version']['debian'] for i in self.changelog[::-1]])
def do_main_packages(self, packages):
- vars = self.changelog_vars
+ vars = self.vars
main = self.templates["control.main"]
packages.extend(self.process_packages(main, vars))
@@ -103,37 +104,44 @@
makeflags[i[1]] = vars[i[0]]
def do_flavour_packages(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra):
- image = self.templates["control.image"]
+ image_type_modulesextra = self.templates["control.image.type-modulesextra"]
+ image_type_modulesinline = self.templates["control.image.type-modulesinline"]
+ image_type_standalone = self.templates["control.image.type-standalone"]
headers = self.templates["control.headers"]
- modules = self.templates["control.modules"]
image_latest = self.templates["control.image.latest"]
headers_latest = self.templates["control.headers.latest"]
+ config_entry_relations = self.config.merge('relations', arch, subarch, flavour)
+
image_depends = package_relation_list()
if vars.get('initramfs', True):
generators = vars['initramfs-generators']
config_entry_commands_initramfs = self.config.merge('commands-image-initramfs-generators', arch, subarch, flavour)
- config_entry_relations = self.config.merge('relations', arch, subarch, flavour)
commands = [config_entry_commands_initramfs[i] for i in generators if config_entry_commands_initramfs.has_key(i)]
makeflags['INITRD_CMD'] = ' '.join(commands)
l = package_relation_group()
- l.extend([package_relation(config_entry_relations[i]) for i in generators])
- l.append(package_relation(config_entry_relations['initramfs-fallback']))
+ l.extend(generators + ['initramfs-fallback'])
image_depends.append(l)
packages_own = []
packages_dummy = []
- if vars['type'] == 'plain-xen':
- p = self.process_package(modules[0], vars)
- image_depends.extend(p['Reverse-Depends'])
- del p['Reverse-Depends']
- packages_own.append(p)
+ if vars['type'] == 'plain-s390-tape':
+ image = image_type_standalone
+ elif vars['type'] == 'plain-xen':
+ image = image_type_modulesextra
+ else:
+ image = image_type_modulesinline
- packages_own.append(self.process_real_image(image[0], image_depends, vars))
- packages_own.append(self.process_package(headers[0], vars))
+ for i in image:
+ packages_own.append(self.process_real_image(i, {'depends': image_depends}, config_entry_relations, vars))
packages_dummy.extend(self.process_packages(image_latest, vars))
- packages_dummy.append(self.process_package(headers_latest[0], vars))
+
+ if image in (image_type_modulesextra, image_type_modulesinline):
+ makeflags['MODULES'] = True
+ packages_own.append(self.process_package(headers[0], vars))
+ packages_dummy.append(self.process_package(headers_latest[0], vars))
+ extra['headers_arch_depends'].append('%s (= ${Source-Version})' % packages_own[-1]['Package'])
for package in packages_own + packages_dummy:
name = package['Package']
@@ -144,13 +152,11 @@
package['Architecture'] = [arch]
packages.append(package)
- extra['headers_arch_depends'].append('%s (= ${Source-Version})' % packages_own[-1]['Package'])
-
makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
cmds_binary_arch = []
cmds_binary_arch.append(("$(MAKE) -f debian/rules.real binary-arch-flavour %s" % makeflags_string,))
- cmds_binary_arch.append(("$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='%s'" % ' '.join(["-p%s" % i['Package'] for i in packages_dummy]),))
+ cmds_binary_arch.append(("$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='%s' %s" % (' '.join(["-p%s" % i['Package'] for i in packages_dummy]), makeflags_string),))
cmds_build = []
cmds_build.append(("$(MAKE) -f debian/rules.real build %s" % makeflags_string,))
cmds_setup = []
@@ -160,7 +166,15 @@
makefile.append(("setup-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_setup))
makefile.append(("source-%s-%s-%s-real:" % (arch, subarch, flavour)))
- def process_real_image(self, in_entry, depends, vars):
+ def process_changelog(self):
+ version = self.changelog[0]['Version']
+ self.process_version(version)
+ if version['modifier'] is not None:
+ self.abiname = self.vars['abiname'] = ''
+ else:
+ self.abiname = self.vars['abiname'] = '-%s' % self.config['abi',]['abiname']
+
+ def process_real_image(self, in_entry, relations, config, vars):
entry = self.process_package(in_entry, vars)
if vars.has_key('desc'):
entry['Description'].long[1:1] = [vars['desc']]
@@ -168,8 +182,9 @@
value = entry.get(field, package_relation_list())
t = vars.get(field.lower(), [])
value.extend(t)
- if depends and field == 'Depends':
- value.append(depends)
+ t = relations.get(field.lower(), [])
+ value.extend(t)
+ value.config(config)
entry[field] = value
return entry
Modified: dists/sid/linux-2.6.16/debian/lib/python/debian_linux/config.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/lib/python/debian_linux/config.py (original)
+++ dists/sid/linux-2.6.16/debian/lib/python/debian_linux/config.py Mon Jun 19 18:31:29 2006
@@ -3,34 +3,65 @@
__all__ = [
'config_parser',
'config_reader',
+ 'config_reader_arch',
]
_marker = object()
+class schema_item_boolean(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 schema_item_list(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 config_reader(dict):
- """
- Read configs in debian/arch and in the underlay directory.
- """
-
- class schema_item_boolean(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 schema_item_list(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)]
+ config_name = "defines"
+
+ def __init__(self, dirs = []):
+ self._dirs = dirs
+
+ def __getitem__(self, key):
+ return self.get(key)
+
+ def _get_files(self, name):
+ return [os.path.join(i, name) for i in self._dirs if i]
+
+ def _update(self, ret, inputkey):
+ for key, value in super(config_reader, self).get(tuple(inputkey), {}).iteritems():
+ ret[key] = value
+
+ def get(self, key, default = _marker):
+ if isinstance(key, basestring):
+ key = key,
+
+ ret = super(config_reader, self).get(tuple(key), default)
+ if ret == _marker:
+ raise KeyError, key
+ return ret
+
+ def merge(self, section, *args):
+ ret = {}
+ for i in xrange(0, len(args) + 1):
+ ret.update(self.get(tuple([section] + list(args[:i])), {}))
+ return ret
+
+ def sections(self):
+ return super(config_reader, self).keys()
+class config_reader_arch(config_reader):
schema = {
'arches': schema_item_list(),
'available': schema_item_boolean(),
@@ -40,18 +71,10 @@
'subarches': schema_item_list(),
}
- config_name = "defines"
-
def __init__(self, dirs = []):
- self._dirs = dirs
+ super(config_reader_arch, self).__init__(dirs)
self._read_base()
- def __getitem__(self, key):
- return self.get(key)
-
- def _get_files(self, name):
- return [os.path.join(i, name) for i in self._dirs if i]
-
def _read_arch(self, arch):
files = self._get_files("%s/%s" % (arch, self.config_name))
config = config_parser(self.schema, files)
@@ -143,28 +166,6 @@
for flavour in flavours:
self._read_flavour(arch, subarch, flavour)
- def _update(self, ret, inputkey):
- for key, value in super(config_reader, self).get(tuple(inputkey), {}).iteritems():
- ret[key] = value
-
- def get(self, key, default = _marker):
- if isinstance(key, basestring):
- key = key,
-
- ret = super(config_reader, self).get(tuple(key), default)
- if ret == _marker:
- raise KeyError, key
- return ret
-
- def merge(self, section, *args):
- ret = {}
- for i in xrange(0, len(args) + 1):
- ret.update(self.get(tuple([section] + list(args[:i])), {}))
- return ret
-
- def sections(self):
- return super(config_reader, self).keys()
-
class config_parser(object):
__slots__ = 'configs', 'schema'
Modified: dists/sid/linux-2.6.16/debian/lib/python/debian_linux/debian.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/lib/python/debian_linux/debian.py (original)
+++ dists/sid/linux-2.6.16/debian/lib/python/debian_linux/debian.py Mon Jun 19 18:31:29 2006
@@ -107,16 +107,7 @@
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 +121,29 @@
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 +155,37 @@
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 +199,25 @@
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 +236,6 @@
('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 +248,29 @@
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]
Modified: dists/sid/linux-2.6.16/debian/lib/python/debian_linux/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/lib/python/debian_linux/gencontrol.py (original)
+++ dists/sid/linux-2.6.16/debian/lib/python/debian_linux/gencontrol.py Mon Jun 19 18:31:29 2006
@@ -15,7 +15,7 @@
makefile_targets = ('binary-arch', 'build', 'setup', 'source')
def __init__(self, underlay = None):
- self.config = config_reader([underlay, "debian/arch"])
+ self.config = config_reader_arch([underlay, "debian/arch"])
self.templates = templates()
def __call__(self):
@@ -31,9 +31,13 @@
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):
+ config_entry = self.config['base',]
+ vars = self.vars.copy()
+ vars.update(config_entry)
+
makeflags = {
'MAJOR': self.version['major'],
'VERSION': self.version['version'],
@@ -41,12 +45,8 @@
'SOURCEVERSION': self.version['source'],
'UPSTREAMVERSION': self.version['upstream'],
'ABINAME': self.abiname,
- # TODO: Don't read this here, this is linux-2.6 specific
- 'REVISIONS': ' '.join([i['Version']['debian'] for i in self.changelog[::-1]]),
}
- vars = self.changelog_vars.copy()
-
self.do_main_setup(vars, makeflags)
self.do_main_packages(packages)
self.do_main_makefile(makefile, makeflags)
@@ -202,22 +202,6 @@
def do_flavour_packages(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra):
pass
- # TODO: Move away, linux-2.6 specific; unify with modules process_config_version
- def process_changelog(self, in_vars):
- ret = [None, None, None]
- ret[0] = version = self.changelog[0]['Version']
- vars = in_vars.copy()
- if version['modifier'] is not None:
- ret[1] = vars['abiname'] = ''
- else:
- ret[1] = vars['abiname'] = '-%s' % self.config['abi',]['abiname']
- vars['upstreamversion'] = version['upstream']
- vars['version'] = version['version']
- vars['source_upstream'] = version['source_upstream']
- vars['major'] = version['major']
- ret[2] = vars
- return ret
-
def process_relation(self, key, e, in_e, vars):
in_dep = in_e[key]
dep = package_relation_list()
@@ -260,6 +244,15 @@
entries.append(self.process_package(i, vars))
return entries
+ def process_version(self, version):
+ self.version = version
+ self.vars = {
+ 'upstreamversion': version['upstream'],
+ 'version': version['version'],
+ 'source_upstream': version['source_upstream'],
+ 'major': version['major'],
+ }
+
def substitute(self, s, vars):
if isinstance(s, (list, tuple)):
for i in xrange(len(s)):
Modified: dists/sid/linux-2.6.16/debian/lib/python/debian_linux/utils.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/lib/python/debian_linux/utils.py (original)
+++ dists/sid/linux-2.6.16/debian/lib/python/debian_linux/utils.py Mon Jun 19 18:31:29 2006
@@ -75,11 +75,8 @@
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 __init__(self, dir = "debian/templates"):
+ self.dir = dir
def __getitem__(self, key):
try:
@@ -92,10 +89,17 @@
def __setitem__(self, key, value):
raise NotImplemented()
- def _read(self, filename):
- entries = []
+ def _read(self, name):
+ prefix, id = name.split('.', 1)
+ f = file("%s/%s.in" % (self.dir, name))
+
+ if prefix == 'control':
+ return self._read_control(f)
- f = file("%s/%s.in" % (self.dir, filename))
+ return f.read()
+
+ def _read_control(self, f):
+ entries = []
while True:
e = debian.package()
Modified: dists/sid/linux-2.6.16/debian/modules/gencontrol.py
==============================================================================
--- dists/sid/linux-2.6.16/debian/modules/gencontrol.py (original)
+++ dists/sid/linux-2.6.16/debian/modules/gencontrol.py Mon Jun 19 18:31:29 2006
@@ -6,25 +6,23 @@
from debian_linux.debian import *
class gencontrol(debian_linux.gencontrol.gencontrol):
- # TODO: workaround
- changelog = []
-
def __init__(self, config):
super(gencontrol, self).__init__(config)
- self.config_version = config_parser({}, [sys.path[0] + "/../version"])
- self.version, self.abiname, self.changelog_vars = self.process_config_version()
+ self.process_config_version(config_parser({}, [sys.path[0] + "/../version"]))
def do_main_packages(self, packages):
- vars = self.changelog_vars
+ vars = self.vars
main = self.templates["control.main"]
packages.extend(self.process_packages(main, vars))
- # TODO
- l1 = ['linux-support-%s%s' % (self.version['upstream'], self.abiname)]
- packages['source']['Build-Depends'].extend(l1)
- l = ['linux-headers-%s%s-all-%s [%s]' % (self.version['upstream'], self.abiname, arch, arch) for arch in self.config['base',]['arches']]
- packages['source']['Build-Depends'].extend(l)
+ packages['source']['Build-Depends'].extend(
+ ['linux-support-%s%s' % (self.version['upstream'], self.abiname)]
+ )
+ packages['source']['Build-Depends'].extend(
+ ['linux-headers-%s%s-all-%s [%s]' % (self.version['upstream'], self.abiname, arch, arch)
+ for arch in self.config['base',]['arches']],
+ )
def do_flavour_packages(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra):
modules = self.templates["control.modules"]
@@ -53,15 +51,10 @@
makefile.append(("build-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_build))
makefile.append(("setup-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_setup))
- def process_config_version(self):
- # TODO: unify with process_changelog
- vars = self.config_version['version',]
- version = parse_version(vars['source'])
- vars['upstreamversion'] = version['upstream']
- vars['version'] = version['version']
- vars['source_upstream'] = version['source_upstream']
- vars['major'] = version['major']
- return version, vars['abiname'], vars
+ def process_config_version(self, config):
+ entry = config['version',]
+ self.process_version(parse_version(entry['source']))
+ self.vars['abiname'] = self.abiname = entry['abiname']
if __name__ == '__main__':
gencontrol(sys.path[0] + "/../arch")()
Modified: dists/sid/linux-2.6.16/debian/modules/rules.include
==============================================================================
--- dists/sid/linux-2.6.16/debian/modules/rules.include (original)
+++ dists/sid/linux-2.6.16/debian/modules/rules.include Mon Jun 19 18:31:29 2006
@@ -31,6 +31,7 @@
CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*)
CONTROL_FILES += $(wildcard debian/arch/defines) $(wildcard debian/arch/*/defines) $(wildcard debian/arch/*/*/defines)
+GENCONTROL = $(__MODULES_DIR)gencontrol.py
debian/control debian/rules.gen: $(CONTROL_FILES)
if [ -f debian/control.md5sum ]; then \
if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \
@@ -41,7 +42,7 @@
fi
debian/control-real: $(CONTROL_FILES)
- $(__MODULES_DIR)gencontrol.py
+ $(GENCONTROL)
md5sum $^ > debian/control.md5sum
@echo
@echo This target is made to fail intentionally, to make sure
Modified: dists/sid/linux-2.6.16/debian/rules
==============================================================================
--- dists/sid/linux-2.6.16/debian/rules (original)
+++ dists/sid/linux-2.6.16/debian/rules Mon Jun 19 18:31:29 2006
@@ -22,13 +22,13 @@
$(MAKE) -f debian/rules.gen source
setup: debian/control $(STAMPS_DIR)/setup-base
-$(STAMPS_DIR)/setup-base: $(BUILD_DIR) $(STAMPS_DIR) $(STAMPS_DIR)/source-base
+$(STAMPS_DIR)/setup-base: $(STAMPS_DIR)/source-base
dh_testdir
$(MAKE) -f debian/rules.gen setup-$(DEB_HOST_ARCH)
touch $@
build: debian/control $(STAMPS_DIR)/build-base
-$(STAMPS_DIR)/build-base: $(BUILD_DIR) $(STAMPS_DIR) $(STAMPS_DIR)/setup-base
+$(STAMPS_DIR)/build-base: $(STAMPS_DIR)/setup-base
dh_testdir
$(MAKE) -f debian/rules.gen build-$(DEB_HOST_ARCH)
touch $@
@@ -36,19 +36,23 @@
$(BUILD_DIR) $(STAMPS_DIR):
@[ -d $@ ] || mkdir $@
-orig: ../orig/linux-$(MAJOR)-$(VERSION)
- rsync --delete --exclude debian --exclude .svn --link-dest=../orig/linux-$(MAJOR)-$(VERSION)/ -a ../orig/linux-$(MAJOR)-$(VERSION)/ .
+DIR_ORIG = ../orig/linux-$(MAJOR)-$(VERSION)
+TAR_ORIG = ../linux-$(MAJOR)_$(VERSION).orig.tar.gz
-../orig/linux-$(MAJOR)-$(VERSION):
- if [ -f "../linux-$(MAJOR)_$(VERSION).orig.tar.gz" ]; then \
+orig: $(DIR_ORIG)
+ rsync --delete --exclude debian --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
+
+$(DIR_ORIG):
+ if [ -f $(TAR_ORIG) ]; then \
mkdir -p ../orig; \
- tar -C ../orig -xzf ../linux-$(MAJOR)_$(VERSION).orig.tar.gz; \
+ tar -C ../orig -xzf $(TAR_ORIG); \
else \
echo "Can't find orig tarball." >&2; \
exit 1; \
fi
maintainerclean:
+ -rm debian/control debian/control.md5sum debian/rules.gen
rm -rf $(filter-out debian .svn, $(wildcard * .[^.]*))
clean: debian/control
@@ -56,11 +60,11 @@
rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/debian_linux/*.pyc
dh_clean
-binary-indep:
+binary-indep: $(STAMPS_DIR)/source-base
dh_testdir
$(MAKE) -f debian/rules.gen binary-indep
-binary-arch:
+binary-arch: $(STAMPS_DIR)/build-base
dh_testdir
$(MAKE) -f debian/rules.gen binary-arch-$(DEB_HOST_ARCH)
Modified: dists/sid/linux-2.6.16/debian/rules.real
==============================================================================
--- dists/sid/linux-2.6.16/debian/rules.real (original)
+++ dists/sid/linux-2.6.16/debian/rules.real Mon Jun 19 18:31:29 2006
@@ -47,14 +47,7 @@
setup_makeflags =
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
setup_makeflags += CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
- ifdef COMPILER
- setup_makeflags += CC=$(DEB_HOST_GNU_TYPE)-$(COMPILER)
- endif
kpkg_image += --cross-compile='$(DEB_HOST_GNU_TYPE)'
-else
- ifdef COMPILER
- setup_makeflags += CC=$(COMPILER)
- endif
endif
setup_env += MAKEFLAGS='$(setup_makeflags)'
@@ -68,10 +61,16 @@
#
binary-arch-arch: install-headers-$(ARCH)
binary-arch-subarch: install-header-$(ARCH)-$(SUBARCH)
-binary-arch-flavour: install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE) install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+binary-arch-flavour: install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
+ifeq ($(MODULES),True)
+ binary-arch-flavour: install-header-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+endif
-binary-indep: install-doc install-patch install-source install-tree
+binary-indep: install-doc
+binary-indep: install-patch
+binary-indep: install-source
binary-indep: install-support
+binary-indep: install-tree
build: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
@@ -128,41 +127,53 @@
touch '$(DIR)/debian/official'
$(patch_cmd) -a $(ARCH) -s $(SUBARCH)
touch '$@'
-#
-# This target performs a build for a particular flavour. Note
-# that in this file it should be always placed *before* the
-# build-$(subarch)-% target, which creates the build directory.
-#
-$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
-
-$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
- cd '$(DIR)'; $(setup_env) $(setup_env_kpkg_jobs) PATH='$(CURDIR)/build:$(CURDIR)/bin:$(PATH)' $(kpkg_image) build
- python2.4 debian/bin/abicheck.py $(DIR) $(ARCH) $(SUBARCH) $(FLAVOUR)
- touch '$@'
-
-$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
- cd '$(DIR)'; $(setup_env) make ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
- touch '$@'
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): CONFIG=$(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): SOURCE_DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
-$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package: $(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
+define SETUP_DIR
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
- cp '$<' '$(DIR)/.config'
+ cp '$(CONFIG)' '$(DIR)/.config'
echo '$(ABINAME)$(LOCALVERSION)' > '$(DIR)/localversion'
+ echo 'CCACHE = ccache' >> '$(DIR)/.kernelvariables'
+ echo 'CC = $$(if $$(DEBIAN_KERNEL_USE_CCACHE),$$(CCACHE)) $$(CROSS_COMPILE)$(COMPILER)' >> '$(DIR)/.kernelvariables'
+endef
+
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
+ $(SETUP_DIR)
cd '$(DIR)'; $(setup_env) $(kpkg_image) configure
touch '$@'
-$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: $(BUILD_DIR)/config.$(ARCH)-$(SUBARCH)-$(FLAVOUR) $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH)
- rm -rf '$(DIR)'
- cp -al '$(SOURCE_DIR)' '$(DIR)'
- cp '$<' '$(DIR)/.config'
- echo '$(ABINAME)$(LOCALVERSION)' > '$(DIR)/localversion'
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
+ $(SETUP_DIR)
cd '$(DIR)'; $(setup_env) make prepare ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
touch '$@'
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
+ $(SETUP_DIR)
+ cd '$(DIR)'; $(setup_env) make prepare ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
+ touch '$@'
+
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
+
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
+ cd '$(DIR)'; $(setup_env) $(setup_env_kpkg_jobs) PATH='$(CURDIR)/build:$(CURDIR)/bin:$(PATH)' $(kpkg_image) build
+ python2.4 debian/bin/abicheck.py $(DIR) $(ARCH) $(SUBARCH) $(FLAVOUR)
+ touch '$@'
+
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
+ cd '$(DIR)'; $(setup_env) make ARCH=$(KERNEL_ARCH) $(JOBS_ARG) image
+ touch '$@'
+
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
+ cd '$(DIR)'; $(setup_env) make ARCH=$(KERNEL_ARCH) $(JOBS_ARG)
+ python2.4 debian/bin/abicheck.py $(DIR) $(ARCH) $(SUBARCH) $(FLAVOUR)
+ touch '$@'
+
install-base:
dh_installchangelogs
dh_installdocs
@@ -173,26 +184,31 @@
dh_md5sums
dh_builddeb
+install-doc: PACKAGE_NAME_DOC = linux-doc-$(VERSION)
+install-doc: PACKAGE_NAME_MANUAL = linux-manual-$(VERSION)
install-doc: SOURCE_DIR=$(BUILD_DIR)/source
install-doc: DIR=$(BUILD_DIR)/$@
+install-doc: PACKAGE_DIR_DOC = $(CURDIR)/debian/$(PACKAGE_NAME_DOC)
+install-doc: PACKAGE_DIR_MANUAL = $(CURDIR)/debian/$(PACKAGE_NAME_MANUAL)
+install-doc: OUT_DIR_DOC = $(PACKAGE_DIR_DOC)/usr/share/doc/$(PACKAGE_NAME_DOC)
+install-doc: DH_OPTIONS = -p$(PACKAGE_NAME_DOC) -p$(PACKAGE_NAME_MANUAL)
install-doc: $(STAMPS_DIR)/source
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
- mkdir -p '$(DIR)/debian'
- cp debian/changelog '$(DIR)/debian'
- cp debian/copyright '$(DIR)/debian'
- cp debian/control '$(DIR)/debian/control'
- touch '$(DIR)/debian/official'
- rm '$(DIR)/Makefile'
- sed -e 's,^EXTRAVERSION.*$$,EXTRAVERSION =,' < '$(SOURCE_DIR)/Makefile' > '$(DIR)/Makefile'
- cd '$(DIR)' && $(setup_env) make-kpkg --stem linux \
- --config defconfig kernel-manual
- cat '$(DIR)/debian/files' >> debian/files
- @for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
- echo "mv \"$(BUILD_DIR)/$$i\" .."; \
- mv "$(BUILD_DIR)/$$i" ..; \
- done
- rm -rf '$(DIR)'
+ dh_clean -d -k
+ cd '$(DIR)'; $(setup_env) make $(JOBS_ARG) htmldocs mandocs
+ DH_OPTIONS= dh_installman -p$(PACKAGE_NAME_MANUAL) '$(DIR)/Documentation/DocBook/'*.9 '$(DIR)/Documentation/DocBook/man/'*.9
+ cd $(DIR)/Documentation; \
+ find . \
+ -path './DocBook/man/*' -prune -o \
+ -path './DocBook/*' -a \( -name '*.tmpl' -o -name '*.xml' -o -name '*.9' \) -prune -o \
+ \( -name 'Makefile*' -o -name '.*.cmd' -o -name '.gitignore' \) -prune -o \
+ -print \
+ | \
+ cpio -pd --preserve-modification-time '$(OUT_DIR_DOC)/Documentation'
+ mv '$(OUT_DIR_DOC)/Documentation/DocBook' '$(OUT_DIR_DOC)/html'
+ -gzip -9qfr '$(OUT_DIR_DOC)/Documentation'
+ $(MAKE) -f debian/rules.real install-base
install-dummy:
dh_testdir
@@ -252,7 +268,7 @@
mkdir -p "${DIR}/arch/${KERNEL_ARCH}/kernel"
mkdir -p "${DIR}/include"
- cp -a ${SOURCE_DIR}/{.config,.kernelrelease,Module.symvers} "${DIR}"
+ cp -a ${SOURCE_DIR}/{.config,.kernel*,Module.symvers} "${DIR}"
cd ${SOURCE_DIR}; \
find . -mindepth 1 -maxdepth 1 \
@@ -300,7 +316,7 @@
mkdir -p "${PACKAGE_DIR}/lib/modules/${REAL_VERSION}"
ln -s "/usr/src/${PACKAGE_NAME}" "${PACKAGE_DIR}/lib/modules/${REAL_VERSION}/build"
-
+
# Populate the scripts directory. The strategy here is to specify what
# *not* to copy, to make things a little bit more robust. We first create
# a file with exclude patterns, then copy everything minus excluded files.
@@ -308,7 +324,7 @@
cd $(SOURCE_DIR); \
tar $(foreach t, *.c *.cc *.h *.l *.o *.y *.cmd *.glade *.gperf *POTFILES.in .gitignore *lxdialog* *package* *_shipped, --exclude=$(t)) -chf - scripts | \
(cd "${DIR}"; umask 000; tar -xvsf -)
-
+
$(MAKE) -f debian/rules.real install-base
install-support: PACKAGE_NAME = linux-support-$(UPSTREAMVERSION)$(ABINAME)
@@ -329,8 +345,9 @@
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): PACKAGE_DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): INSTALL_DIR = $(PACKAGE_DIR)/boot
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
-install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-kernel-package:
ifdef IMAGE_POSTPROC
# Install the postproc script into the hook directory
install -d '$(DIR)/debian/image.d'
@@ -343,10 +360,19 @@
mv "$(BUILD_DIR)/$$i" ..; \
done
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape: DH_OPTIONS = -p$(PACKAGE_NAME)
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-s390-tape:
+ dh_testdir
+ dh_testroot
+ dh_clean -d -k
+ dh_installdirs 'boot'
+ cp '$(DIR)/arch/s390/boot/image' $(PACKAGE_DIR)/boot/vmlinuz-$(REAL_VERSION)
+ $(MAKE) -f debian/rules.real install-base
+
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: MODULES_PACKAGE_NAME = linux-modules-$(REAL_VERSION)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: MODULES_PACKAGE_DIR = $(CURDIR)/debian/$(MODULES_PACKAGE_NAME)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: DH_OPTIONS = -p$(PACKAGE_NAME) -p$(MODULES_PACKAGE_NAME)
-install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-$(TYPE)
+install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR)-plain-xen:
dh_testdir
dh_testroot
dh_clean -d -k
@@ -391,3 +417,4 @@
install-tree:
$(MAKE) -f debian/rules.real install-dummy DH_OPTIONS='$(DH_OPTIONS)'
+# vim: filetype=make
Modified: dists/sid/linux-2.6.16/debian/templates/control.headers.in
==============================================================================
--- dists/sid/linux-2.6.16/debian/templates/control.headers.in (original)
+++ dists/sid/linux-2.6.16/debian/templates/control.headers.in Mon Jun 19 18:31:29 2006
@@ -10,6 +10,3 @@
installed into /usr/src/linux-headers- at upstreamversion@@abiname@@localversion@, and can
be used for building modules that load into the kernel provided by the
linux-image- at upstreamversion@@abiname@@localversion@ package.
- .
- This packages is produced using an updated kernel packaging system
- and replaces older kernel-headers packages
Added: dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesextra.in
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesextra.in Mon Jun 19 18:31:29 2006
@@ -0,0 +1,17 @@
+Package: linux-image- at upstreamversion@@abiname@@localversion@
+Section: base
+Priority: optional
+Provides: linux-image, linux-image- at major@
+Depends: linux-modules- at upstreamversion@@abiname@@localversion@ (= ${Source-Version})
+Suggests: linux-doc- at version@ | linux-source- at version@
+Description: Linux kernel @upstreamversion@ image on @class@ machines
+ This package provides the binary image for
+ Linux kernel @upstreamversion@ on @longclass@ machines.
+
+Package: linux-modules- at upstreamversion@@abiname@@localversion@
+Section: base
+Priority: optional
+Depends: module-init-tools (>= 0.9.13)
+Description: Linux kernel modules @upstreamversion@ image on @class@ machines
+ This package provides pre-built loadable modules for
+ Linux kernel @version@ on @longclass@ machines.
Added: dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesinline.in
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6.16/debian/templates/control.image.type-modulesinline.in Mon Jun 19 18:31:29 2006
@@ -0,0 +1,9 @@
+Package: linux-image- at upstreamversion@@abiname@@localversion@
+Section: base
+Priority: optional
+Provides: linux-image, linux-image- at major@
+Depends: module-init-tools (>= 0.9.13)
+Suggests: linux-doc- at version@ | linux-source- at version@
+Description: Linux kernel @upstreamversion@ image on @class@ machines
+ This package provides the binary image and pre-built loadable modules for
+ Linux kernel @upstreamversion@ on @longclass@ machines.
Added: dists/sid/linux-2.6.16/debian/templates/control.image.type-standalone.in
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6.16/debian/templates/control.image.type-standalone.in Mon Jun 19 18:31:29 2006
@@ -0,0 +1,8 @@
+Package: linux-image- at upstreamversion@@abiname@@localversion@
+Section: base
+Priority: optional
+Provides: linux-image, linux-image- at major@
+Suggests: linux-doc- at version@ | linux-source- at version@
+Description: Linux kernel @upstreamversion@ image on @class@ machines
+ This package provides the binary image for
+ Linux kernel @upstreamversion@ on @longclass@ machines.
Modified: dists/sid/linux-2.6.16/debian/templates/control.main.in
==============================================================================
--- dists/sid/linux-2.6.16/debian/templates/control.main.in (original)
+++ dists/sid/linux-2.6.16/debian/templates/control.main.in Mon Jun 19 18:31:29 2006
@@ -32,9 +32,6 @@
/usr/share/doc/linux-doc- at version@/Documentation/00-INDEX
.
for the detailed description of the contents.
- .
- This packages is produced using an updated kernel packaging system
- and replaces older kernel-doc packages
Package: linux-manual- at version@
Architecture: all
Modified: dists/sid/linux-2.6.16/debian/templates/control.source.in
==============================================================================
--- dists/sid/linux-2.6.16/debian/templates/control.source.in (original)
+++ dists/sid/linux-2.6.16/debian/templates/control.source.in Mon Jun 19 18:31:29 2006
@@ -2,7 +2,7 @@
Section: devel
Priority: optional
Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
-Uploaders: Andres Salomon <dilinger at debian.org>, Bastian Blank <waldi at debian.org>, Simon Horman <horms at debian.org>, Sven Luther <luther at debian.org>, Jonas Smedegaard <dr at jones.dk>, Norbert Tretkowski <nobse at debian.org>, Frederik Schüler <fs at debian.org>, maximilian attems <maks at sternwelten.at>
+Uploaders: Andres Salomon <dilinger at debian.org>, Bastian Blank <waldi at debian.org>, Simon Horman <horms at debian.org>, Sven Luther <luther at debian.org>, Jonas Smedegaard <dr at jones.dk>, Norbert Tretkowski <nobse at debian.org>, Frederik Schüler <fs at debian.org>
Standards-Version: 3.6.1.0
Build-Depends: debhelper (>= 4.1.0), module-init-tools, dpkg-dev (>= 1.10.23), debianutils (>= 1.6), bzip2, sparc-utils [sparc], kernel-package (>= 10.047), ocaml-interp, python, python2.4-minimal
Build-Depends-Indep: docbook-utils, gs, transfig, xmlto
More information about the Kernel-svn-changes
mailing list