r4041 - in people/waldi/kernel: . linux-nonfree-2.6
linux-nonfree-2.6/debian linux-nonfree-2.6/debian/arch
linux-nonfree-2.6/debian/bin linux-nonfree-2.6/debian/templates
Bastian Blank
waldi at costa.debian.org
Tue Aug 23 21:15:47 UTC 2005
Author: waldi
Date: 2005-08-23 21:15:47 +0000 (Tue, 23 Aug 2005)
New Revision: 4041
Added:
people/waldi/kernel/linux-nonfree-2.6/
people/waldi/kernel/linux-nonfree-2.6/debian/
people/waldi/kernel/linux-nonfree-2.6/debian/arch/
people/waldi/kernel/linux-nonfree-2.6/debian/arch/defines
people/waldi/kernel/linux-nonfree-2.6/debian/bin/
people/waldi/kernel/linux-nonfree-2.6/debian/bin/gencontrol.py
people/waldi/kernel/linux-nonfree-2.6/debian/changelog
people/waldi/kernel/linux-nonfree-2.6/debian/rules
people/waldi/kernel/linux-nonfree-2.6/debian/rules.defs
people/waldi/kernel/linux-nonfree-2.6/debian/rules.real
people/waldi/kernel/linux-nonfree-2.6/debian/templates/
people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.modules.in
people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.source.in
Log:
Add preliminary linux-nonfree-2.6 package.
* ., debian, debian/arch, debian/bin, debian/templates: New directory.
* debian/arch/defines, debian/bin/gencontrol.py, debian/changelog, debian/rules,
debian/rules.defs, debian/rules.real, debian/templates/control.modules.in,
debian/templates/control.source.in: Add.
Property changes on: people/waldi/kernel/linux-nonfree-2.6
___________________________________________________________________
Name: svn:ignore
+ Makefile
*.c
*.h
Property changes on: people/waldi/kernel/linux-nonfree-2.6/debian
___________________________________________________________________
Name: svn:ignore
+ control
control.md5sum
rules.gen
Added: people/waldi/kernel/linux-nonfree-2.6/debian/arch/defines
===================================================================
--- people/waldi/kernel/linux-nonfree-2.6/debian/arch/defines 2005-08-23 21:13:33 UTC (rev 4040)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/arch/defines 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,4 @@
+[base]
+arches:
+ i386
+ powerpc
Copied: people/waldi/kernel/linux-nonfree-2.6/debian/bin/gencontrol.py (from rev 4037, people/waldi/kernel/linux-2.6/debian/bin/gencontrol.py)
===================================================================
--- people/waldi/kernel/linux-2.6/debian/bin/gencontrol.py 2005-08-23 20:05:05 UTC (rev 4037)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/bin/gencontrol.py 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,308 @@
+#!/usr/bin/env python
+import os, os.path, re, sys, textwrap, ConfigParser
+sys.path.append("debian/lib/python")
+from debian_linux 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
+
+def read_changelog():
+ r = re.compile(r"""
+^
+(
+(?P<header>
+ (?P<header_source>
+ \w[-+0-9a-z.]+
+ )
+ \
+ \(
+ (?P<header_version>
+ [^\(\)\ \t]+
+ )
+ \)
+ \s+
+ (?P<header_distribution>
+ [-0-9a-zA-Z]+
+ )
+ \;
+)
+)
+""", re.VERBOSE)
+ f = file("debian/changelog")
+ entries = []
+ 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 = entry()
+ e['Distribution'] = match.group('header_distribution')
+ e['Source'] = match.group('header_source')
+ e['Version'] = parse_version(match.group('header_version'))
+ entries.append(e)
+ return entries
+
+def read_rfc822(f):
+ entries = []
+
+ while True:
+ e = entry()
+ 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')
+ e[last] += '\n' + line.lstrip()
+ continue
+ i = line.find(':')
+ if i < 0:
+ raise ValueError("Not a header, not a continuation: ``%s''" % line)
+ last = line[:i]
+ e[last] = line[i+1:].lstrip()
+ if not e:
+ break
+
+ entries.append(e)
+
+ return entries
+
+def read_template(name):
+ return read_rfc822(file("debian/templates/control.%s.in" % name))
+
+def parse_version(version):
+ version_re = ur"""
+^
+(?P<source>
+ (?:
+ \d+\.\d+\.\d+\+
+ )?
+ (?P<upstream>
+ (?P<version>
+ (?P<major>\d+\.\d+)
+ \.
+ \d+
+ )
+ (?:
+ -
+ (?P<modifier>
+ .+?
+ )
+ )?
+ )
+ -
+ (?P<debian>[^-]+)
+)
+$
+"""
+ match = re.match(version_re, version, re.X)
+ return match.groupdict()
+
+def process_changelog(in_vars, changelog):
+ ret = [None, None, None, None]
+ ret[0] = version = changelog[0]['Version']
+ vars = in_vars.copy()
+ if version['modifier'] is not None:
+ ret[1] = vars['abiname'] = version['modifier']
+ ret[2] = ""
+ else:
+ ret[1] = vars['abiname'] = c['base']['abiname']
+ ret[2] = "-%s" % vars['abiname']
+ vars['version'] = version['version']
+ vars['major'] = version['major']
+ ret[3] = vars
+ return ret
+
+def process_depends(key, e, in_e, vars):
+ in_dep = in_e[key].split(',')
+ dep = []
+ for d in in_dep:
+ d = d.strip()
+ d = substitute(d, vars)
+ if d:
+ dep.append(d)
+ if dep:
+ t = ', '.join(dep)
+ e[key] = t
+
+def process_description(e, in_e, vars):
+ desc = in_e['Description']
+ desc_short, desc_long = desc.split ("\n", 1)
+ desc_pars = [substitute(i, vars) for i in desc_long.split ("\n.\n")]
+ desc_pars_wrapped = []
+ w = wrap(width = 74, fix_sentence_endings = True)
+ for i in desc_pars:
+ desc_pars_wrapped.append(w.fill(i))
+ e['Description'] = "%s\n%s" % (substitute(desc_short, vars), '\n.\n'.join(desc_pars_wrapped))
+
+def process_package(in_entry, vars):
+ e = entry()
+ for i in in_entry.iterkeys():
+ if i in (('Depends', 'Provides', 'Suggests')):
+ process_depends(i, e, in_entry, vars)
+ elif i == 'Description':
+ process_description(e, in_entry, vars)
+ elif i[:2] == 'X-':
+ pass
+ else:
+ e[i] = substitute(in_entry[i], vars)
+ return e
+
+def process_packages(in_entries, vars):
+ entries = []
+ for i in in_entries:
+ entries.append(process_package(i, vars))
+ return entries
+
+def substitute(s, vars):
+ def subst(match):
+ return vars[match.group(1)]
+ return re.sub(r'@([a-z_]+)@', subst, s)
+
+def write_control(list):
+ write_rfc822(file("debian/control", 'w'), list)
+
+def write_makefile(list):
+ f = file("debian/rules.gen", 'w')
+ for i in list:
+ f.write("%s\n" % i[0])
+ if i[1] is not None:
+ list = i[1]
+ if isinstance(list, basestring):
+ list = list.split('\n')
+ for j in list:
+ f.write("\t%s\n" % j)
+
+def write_rfc822(f, list):
+ for entry in list:
+ for key, value in entry.iteritems():
+ f.write("%s:" % key)
+ if isinstance(value, tuple):
+ value = value[0].join(value[1])
+ for k in value.split('\n'):
+ f.write(" %s\n" % k)
+ f.write('\n')
+
+def process_real_arch(packages, makefile, config, arch, vars, makeflags):
+ config_entry = config[arch]
+ vars.update(config_entry)
+
+ if not config_entry.get('available', True):
+ for i in ('binary-arch', 'build'):
+ makefile.append(("%s-%s:" % (i, arch), ["@echo Architecture %s is not available!" % arch, "@exit 1"]))
+ return
+
+ makeflags['ARCH'] = arch
+
+ for subarch in config_entry['subarches']:
+ process_real_subarch(packages, makefile, config, arch, subarch, vars.copy(), makeflags.copy())
+
+def process_real_flavour(packages, makefile, config, arch, subarch, flavour, vars, makeflags):
+ config_entry = config['-'.join((arch, subarch, flavour))]
+ vars.update(config_entry)
+
+ vars['flavour'] = flavour
+ if not vars.has_key('class'):
+ vars['class'] = '%s-class' % flavour
+ if not vars.has_key('longclass'):
+ vars['longclass'] = vars['class']
+
+ modules = read_template("modules")
+
+ package = process_package(modules[0], vars)
+
+ name = package['Package']
+ if packages.has_key(name):
+ package = packages.get(name)
+ package['Architecture'][1].append(arch)
+ else:
+ package['Architecture'] = (' ', [arch])
+ packages.append(package)
+
+ for i in ('binary-arch', 'build'):
+ makefile.append(("%s-%s-%s:: %s-%s-%s-%s" % (i, arch, subarch, i, arch, subarch, flavour), None))
+ makefile.append(("%s-%s-%s-%s:: %s-%s-%s-%s-real" % (i, arch, subarch, flavour, i, arch, subarch, flavour), None))
+
+ makeflags['FLAVOUR'] = flavour
+ if config_entry.has_key('kpkg-subarch'):
+ makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch']
+ 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_build = []
+ cmds_build.append(("$(MAKE) -f debian/rules.real build %s" % makeflags_string,))
+ makefile.append(("binary-arch-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_binary_arch))
+ makefile.append(("build-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_build))
+
+def process_real_main(packages, makefile, config, version, abiname, kpkg_abiname, changelog, vars):
+ source = read_template("source")
+ packages['source'] = process_package(source[0], vars)
+
+ makeflags = {
+ 'VERSION': version['version'],
+ 'SOURCE_VERSION': version['source'],
+ 'UPSTREAM_VERSION': version['upstream'],
+ 'ABINAME': abiname,
+ 'KPKG_ABINAME': kpkg_abiname,
+ }
+ makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
+
+ cmds_binary_indep = []
+ cmds_binary_indep.append(("$(MAKE) -f debian/rules.real binary-indep %s" % makeflags_string,))
+ makefile.append(("binary-indep:", cmds_binary_indep))
+
+ for arch in iter(config['base']['arches']):
+ process_real_arch(packages, makefile, config, arch, vars.copy(), makeflags.copy())
+
+def process_real_subarch(packages, makefile, config, arch, subarch, vars, makeflags):
+ if subarch == 'none':
+ vars['subarch'] = ''
+ config_entry = config[arch]
+ else:
+ vars['subarch'] = '%s-' % subarch
+ config_entry = config['%s-%s' % (arch, subarch)]
+ vars.update(config_entry)
+
+ for i in ('binary-arch', 'build'):
+ makefile.append(("%s-%s:: %s-%s-%s" % (i, arch, i, arch, subarch), None))
+ makefile.append(("%s-%s-%s::" % (i, arch, subarch), None))
+
+ makeflags['SUBARCH'] = subarch
+ if config_entry.has_key('kpkg-subarch'):
+ makeflags['KPKG_SUBARCH'] = config_entry['kpkg-subarch']
+
+ for flavour in config_entry['flavours']:
+ process_real_flavour(packages, makefile, config, arch, subarch, flavour, vars.copy(), makeflags.copy())
+
+def main():
+ changelog = read_changelog()
+
+ version, abiname, kpkg_abiname, vars = process_changelog({}, changelog)
+
+ c = config("/usr/src/linux-headers-%s" % version['version'])
+
+ packages = packages_list()
+ makefile = []
+
+ process_real_main(packages, makefile, c, version, abiname, kpkg_abiname, changelog, vars)
+
+ write_control(packages.itervalues())
+ write_makefile(makefile)
+
+
+if __name__ == '__main__':
+ main()
Added: people/waldi/kernel/linux-nonfree-2.6/debian/changelog
===================================================================
--- people/waldi/kernel/linux-nonfree-2.6/debian/changelog 2005-08-23 21:13:33 UTC (rev 4040)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/changelog 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,6 @@
+linux-nonfree-2.6 (2.6.12+2.6.13-rc6-1) UNRELEASED; urgency=low
+
+ *
+
+ -- Bastian Blank <waldi at debian.org> Tue, 23 Aug 2005 22:29:33 +0200
+
Copied: people/waldi/kernel/linux-nonfree-2.6/debian/rules (from rev 4002, people/waldi/kernel/linux-2.6/debian/rules)
===================================================================
--- people/waldi/kernel/linux-2.6/debian/rules 2005-08-21 15:28:27 UTC (rev 4002)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/rules 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+#
+# Generally nothing needs to be modified below this line
+#
+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-stamp
+$(STAMPS_DIR)/build-stamp: $(BUILD_DIR) $(STAMPS_DIR)
+ dh_testdir
+ $(MAKE) -f debian/rules.gen build-$(DEB_HOST_ARCH)
+ touch $@
+
+$(BUILD_DIR) $(STAMPS_DIR):
+ @[ -d $@ ] || mkdir $@
+
+orig: ../orig/linux-nonfree-$(MAJOR)-$(VERSION)
+ rsync --delete --exclude debian --exclude .svn -av ../orig/linux-nonfree-$(MAJOR)-$(VERSION)/ .
+
+../orig/linux-$(MAJOR)-$(VERSION):
+ if [ -f "../linux-nonfree-$(MAJOR)_$(VERSION).orig.tar.gz" ]; then \
+ mkdir -p ../orig; \
+ tar -C ../orig -xzf ../linux-nonfree-$(MAJOR)_$(VERSION).orig.tar.gz; \
+ else \
+ echo "Can't find orig tarball." >&2; \
+ exit 1; \
+ fi
+
+maintainerclean:
+ rm -rf $(filter-out debian, $(wildcard *))
+
+clean: unpatch
+ dh_testdir
+ rm -f version.Debian
+ cd debian; rm -f *.kpatches.arch
+ rm -rf $(BUILD_DIR) $(STAMPS_DIR) debian/lib/python/*.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-$(DEB_HOST_ARCH)
+
+binary: binary-indep binary-arch
+
+#
+# Makes the master debian/control file by substituting
+# variable values into the template.
+#
+CONTROL_FILES = debian/changelog $(wildcard debian/templates/control.*)
+CONTROL_FILES += debian/arch/defines $(wildcard debian/arch/*/defines) $(wildcard debian/arch/*/*/defines)
+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)
+ $<
+ 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 patch unpatch source tree
Copied: people/waldi/kernel/linux-nonfree-2.6/debian/rules.defs (from rev 3986, people/waldi/kernel/linux-2.6/debian/rules.defs)
Added: people/waldi/kernel/linux-nonfree-2.6/debian/rules.real
===================================================================
--- people/waldi/kernel/linux-nonfree-2.6/debian/rules.real 2005-08-23 21:13:33 UTC (rev 4040)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/rules.real 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,32 @@
+SHELL := sh -e
+DEB_HOST_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_ARCH := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH)
+
+ifneq ($(SUBARCH),none)
+ KPGK_SUBARCH := $(SUBARCH)-
+endif
+
+-include $(basedir)/Makefile.inc
+
+include debian/rules.defs
+
+#
+# Targets
+#
+binary-arch-flavour: install-modules-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+
+build: $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+$(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+ cd $(DIR); make DIR=/usr/src/linux-headers-$(KPGK_SUBARCH)$(UPSTREAM_VERSION)$(KPKG_ABINAME)-$(FLAVOUR)
+ touch $@
+
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
+$(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR):
+ rm -rf $(DIR)
+ mkdir -p $(DIR)
+ cp -al $(filter-out debian, $(wildcard *)) $(DIR)
+ touch $@
+
Added: people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.modules.in
===================================================================
--- people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.modules.in 2005-08-23 21:13:33 UTC (rev 4040)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.modules.in 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,6 @@
+Package: linux-modules-nonfree- at subarch@@version at -@abiname at -@flavour@
+Section: nonfree/base
+Priority: optional
+Description: Non-free modules for the Linux kernel version @version@
+ This package the nonfree modules for the Linux kernel version @version at .
+
Copied: people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.source.in (from rev 3986, people/waldi/kernel/linux-2.6/debian/templates/control.source.in)
===================================================================
--- people/waldi/kernel/linux-2.6/debian/templates/control.source.in 2005-08-19 14:11:49 UTC (rev 3986)
+++ people/waldi/kernel/linux-nonfree-2.6/debian/templates/control.source.in 2005-08-23 21:15:47 UTC (rev 4041)
@@ -0,0 +1,7 @@
+Source: linux-nonfree- at major@
+Section: non-free/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>
+Standards-Version: 3.6.1.0
+Build-Depends: gcc (>= 4:4.0) [!arm !sparc !alpha !m68k], gcc-3.3 [arm sparc alpha m68k], binutils-hppa64 [hppa], gcc-4.0-hppa64 [hppa], debhelper (>= 4.1.0), module-init-tools, dpkg-dev (>= 1.10.23), debianutils (>= 1.6), bzip2, console-tools [!s390], sparc-utils [sparc], kernel-package (>= 9.005)
More information about the Kernel-svn-changes
mailing list