...
 
Commits (400)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

!/patches
!/patches*
!*.patch
!*.diff
!series
*.debhelper*
*.local
*.pyc
*.substvars
*-di
......@@ -13,6 +13,7 @@
/control.md5sum
/files
/hyperv-daemons/
/libbpf*/
/libcpupower*/
/liblockdep*/
/libusbip-dev/
......
......@@ -6,7 +6,9 @@ Patches
Debian applies small changes to the kernel source. These are split up into
separated patches addressing individual problems. Each of the patch files
contains a description and mentions the author. The patches can be found
at https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/patches.
in the source package or at
https://sources.debian.org/src/linux/<version>/debian/patches/
(with the package version substituted).
Config Files
------------
......@@ -47,10 +49,17 @@ Berkeley Database (libdb-dev) installed.
Non-free bits removed
---------------------
See the patches under debian/patches/debian/dfsg.
See the Files-Excluded field in debian/copyright.
Changelog
---------
Older Debian changelog entries are no longer included in binary
packages, but can be found in debian/changelog.old in the source
package.
Further information
-------------------
Debian Linux Kernel Handbook: https://kernel-handbook.alioth.debian.org
or debian-kernel-handbook package
Debian Linux Kernel Handbook:
https://kernel-team.pages.debian.net/kernel-handbook/
or debian-kernel-handbook package
Debian Wiki: https://wiki.debian.org/DebianKernel
Updating the upstream source
============================
In addition to the build-dependencies, you will need the rsync and
unifdef packages installed.
In addition to the build-dependencies, you will need the rsync package
installed.
1) It is recommended to fetch the release tag from the relevant upstream git
repository, one of:
......@@ -43,9 +43,8 @@ unifdef packages installed.
This will produce ../orig/linux_<version>.orig.tar.xz
(e.g. linux_3.5~rc1.orig.tar.xz).
It involves applying several patches and file deletions for DFSG
compliance, as listed in debian/patches/series-orig. Occasionally
you will need to refresh these.
It involves deleting files for DFSG compliance, as listed in the
Files-Excluded field in debian/copyright.
3) Run: make -f debian/rules orig
......@@ -79,9 +78,6 @@ Aside from those general rules:
version and inserts the list of changes. It doesn't attempt to
filter out irrelevant or unimportant changes.
- The script debian/bin/ckt-stable-update.sh does the same for
stable updates by the Canonical Kernel Team.
- If you have time, please delete irrelevant changes such as:
+ Fixes for architectures not supported by the package
+ Fixes for drivers that aren't enabled in any of our configurations
......@@ -102,8 +98,8 @@ features/ and debian/. Patches are in the standard kernel patch
format (unified diff to be applied with patch -p1) and generally have
DEP-3 headers.
The series file 'series' is used for all configurations and a series
file 'series-<featureset>' is used for each optional featureset.
For each optional featureset there is an additional patch directory
debian/patches-<featureset>.
If you want to generate a source tree with all patches applied, run
make -f debian/rules source
......@@ -193,6 +189,14 @@ into the templates:
Normally, the arch-specific contents should be controlled by
adjusting the corresponding defines file.
Build-dependencies that relate to specific binary packages can be
specified in a Build-Depends field in the template for that binary
package. gencontrol.py will append the value to the source package's
Build-Depends-Arch or Build-Depends-Indep field, as appropriate. It
will also use the binary package's Architecture and Build-Profile as
the architecture-qualification and/or restriction for each build-
dependency that doesn't already have them.
TODO:
- Patches applied to the upstream source
- How to define a flavour
......
#!/usr/bin/env python3
#!/usr/bin/python3
import sys
sys.path.append(sys.path[0] + "/../lib/python")
import optparse
import os
import shutil
......@@ -12,8 +10,8 @@ from urllib.request import urlopen
from urllib.error import HTTPError
from debian_linux.abi import Symbols
from debian_linux.config import *
from debian_linux.debian import *
from debian_linux.config import ConfigCoreDump
from debian_linux.debian import Changelog, VersionLinux
default_url_base = "http://deb.debian.org/debian/"
default_url_base_incoming = "http://incoming.debian.org/debian-buildd/"
......@@ -35,25 +33,29 @@ class url_debian_pool(object):
self.base = base
def __call__(self, source, filename, arch):
return self.base + "pool/main/" + source[0] + "/" + source + "/" + filename
return (self.base + "pool/main/" + source[0] + "/" + source + "/" +
filename)
class url_debian_ports_pool(url_debian_pool):
def __call__(self, source, filename, arch):
if arch == 'all':
return url_debian_pool.__call__(self, source, filename, arch)
return self.base + "pool-" + arch + "/main/" + source[0] + "/" + source + "/" + filename
return (self.base + "pool-" + arch + "/main/" + source[0] + "/" +
source + "/" + filename)
class url_debian_security_pool(url_debian_pool):
def __call__(self, source, filename, arch):
return self.base + "pool/updates/main/" + source[0] + "/" + source + "/" + filename
return (self.base + "pool/updates/main/" + source[0] + "/" + source +
"/" + filename)
class Main(object):
dir = None
def __init__(self, url, url_config=None, arch=None, featureset=None, flavour=None):
def __init__(self, url, url_config=None, arch=None, featureset=None,
flavour=None):
self.log = sys.stdout.write
self.url = self.url_config = url
......@@ -72,7 +74,8 @@ class Main(object):
self.version = changelog.version.linux_version
self.version_source = changelog.version.complete
self.config = ConfigCoreDump(fp=open("debian/config.defines.dump", "rb"))
self.config = ConfigCoreDump(fp=open("debian/config.defines.dump",
"rb"))
self.version_abi = self.config['version', ]['abiname']
......@@ -104,14 +107,16 @@ class Main(object):
def get_abi(self, arch, prefix):
try:
version_abi = (self.config['version',]['abiname_base'] + '-' +
version_abi = (self.config[('version',)]['abiname_base'] + '-' +
self.config['abi', arch]['abiname'])
except KeyError:
version_abi = self.version_abi
filename = "linux-headers-%s-%s_%s_%s.deb" % (version_abi, prefix, self.version_source, arch)
filename = ("linux-headers-%s-%s_%s_%s.deb" %
(version_abi, prefix, self.version_source, arch))
f = self.retrieve_package(self.url, filename, arch)
d = self.extract_package(f, "linux-headers-%s_%s" % (prefix, arch))
f1 = d + "/usr/src/linux-headers-%s-%s/Module.symvers" % (version_abi, prefix)
f1 = d + ("/usr/src/linux-headers-%s-%s/Module.symvers" %
(version_abi, prefix))
s = Symbols(open(f1))
shutil.rmtree(d)
return version_abi, s
......@@ -164,9 +169,8 @@ class Main(object):
self.update_flavour(config, arch, featureset, flavour)
def update_flavour(self, config, arch, featureset, flavour):
config_base = config.merge('base', arch, featureset, flavour)
self.log("Updating ABI for arch %s, featureset %s, flavour %s: " % (arch, featureset, flavour))
self.log("Updating ABI for arch %s, featureset %s, flavour %s: " %
(arch, featureset, flavour))
try:
if featureset == 'none':
localversion = flavour
......@@ -183,17 +187,26 @@ class Main(object):
import traceback
traceback.print_exc(None, sys.stdout)
if __name__ == '__main__':
options = optparse.OptionParser()
options.add_option("-i", "--incoming", action="store_true", dest="incoming")
options.add_option("--incoming-config", action="store_true", dest="incoming_config")
options.add_option("-i", "--incoming", action="store_true",
dest="incoming")
options.add_option("--incoming-config", action="store_true",
dest="incoming_config")
options.add_option("--ports", action="store_true", dest="ports")
options.add_option("--security", action="store_true", dest="security")
options.add_option("-u", "--url-base", dest="url_base", default=default_url_base)
options.add_option("--url-base-incoming", dest="url_base_incoming", default=default_url_base_incoming)
options.add_option("--url-base-ports", dest="url_base_ports", default=default_url_base_ports)
options.add_option("--url-base-ports-incoming", dest="url_base_ports_incoming", default=default_url_base_ports_incoming)
options.add_option("--url-base-security", dest="url_base_security", default=default_url_base_security)
options.add_option("-u", "--url-base", dest="url_base",
default=default_url_base)
options.add_option("--url-base-incoming", dest="url_base_incoming",
default=default_url_base_incoming)
options.add_option("--url-base-ports", dest="url_base_ports",
default=default_url_base_ports)
options.add_option("--url-base-ports-incoming",
dest="url_base_ports_incoming",
default=default_url_base_ports_incoming)
options.add_option("--url-base-security", dest="url_base_security",
default=default_url_base_security)
opts, args = options.parse_args()
......
#!/usr/bin/python3
import sys
sys.path.append('debian/lib/python')
import fnmatch
import glob
import stat
import os
import re
from debian_linux.abi import Symbols
from debian_linux.config import ConfigCoreDump
from debian_linux.debian import *
from debian_linux.debian import Changelog, VersionLinux
class CheckAbi(object):
......@@ -46,19 +44,22 @@ class CheckAbi(object):
self.filename_new = "%s/Module.symvers" % dir
try:
version_abi = (self.config['version',]['abiname_base'] + '-' +
version_abi = (self.config[('version',)]['abiname_base'] + '-' +
self.config['abi', arch]['abiname'])
except KeyError:
version_abi = self.config['version',]['abiname']
self.filename_ref = "debian/abi/%s/%s_%s_%s" % (version_abi, arch, featureset, flavour)
version_abi = self.config[('version',)]['abiname']
self.filename_ref = ("debian/abi/%s/%s_%s_%s" %
(version_abi, arch, featureset, flavour))
def __call__(self, out):
ret = 0
new = Symbols(open(self.filename_new))
unversioned = [name for name in new if new[name].version == '0x00000000']
unversioned = [name for name in new
if new[name].version == '0x00000000']
if unversioned:
out.write("ABI is not completely versioned! Refusing to continue.\n")
out.write("ABI is not completely versioned! "
"Refusing to continue.\n")
out.write("\nUnversioned symbols:\n")
for name in sorted(unversioned):
self.SymbolInfo(new[name]).write(out, False)
......@@ -82,11 +83,13 @@ class CheckAbi(object):
out.write("ABI has changed! Refusing to continue.\n")
ret = 1
elif change or remove:
out.write("ABI has changed but all changes have been ignored. Continuing.\n")
out.write("ABI has changed but all changes have been ignored. "
"Continuing.\n")
elif add_effective:
out.write("New symbols have been added. Continuing.\n")
elif add:
out.write("New symbols have been added but have been ignored. Continuing.\n")
out.write("New symbols have been added but have been ignored. "
"Continuing.\n")
else:
out.write("No ABI changes.\n")
......@@ -149,9 +152,12 @@ class CheckAbi(object):
def _ignore(self, symbols):
# TODO: let config merge this lists
configs = []
configs.append(self.config.get(('abi', self.arch, self.featureset, self.flavour), {}))
configs.append(self.config.get(('abi', self.arch, None, self.flavour), {}))
configs.append(self.config.get(('abi', self.arch, self.featureset), {}))
configs.append(self.config.get(('abi', self.arch, self.featureset,
self.flavour), {}))
configs.append(self.config.get(('abi', self.arch, None, self.flavour),
{}))
configs.append(self.config.get(('abi', self.arch, self.featureset),
{}))
configs.append(self.config.get(('abi', self.arch), {}))
configs.append(self.config.get(('abi', None, self.featureset), {}))
configs.append(self.config.get(('abi',), {}))
......@@ -183,13 +189,17 @@ class CheckImage(object):
self.changelog = Changelog(version=VersionLinux)[0]
self.config_entry_base = config.merge('base', arch, featureset, flavour)
self.config_entry_build = config.merge('build', arch, featureset, flavour)
self.config_entry_image = config.merge('image', arch, featureset, flavour)
self.config_entry_base = config.merge('base', arch, featureset,
flavour)
self.config_entry_build = config.merge('build', arch, featureset,
flavour)
self.config_entry_image = config.merge('image', arch, featureset,
flavour)
def __call__(self, out):
image = self.config_entry_build.get('image-file')
uncompressed_image = self.config_entry_build.get('uncompressed-image-file')
uncompressed_image = self.config_entry_build \
.get('uncompressed-image-file')
if not image:
# TODO: Bail out
......@@ -236,16 +246,19 @@ class CheckImage(object):
out.write('Continuing.\n')
# Also check the uncompressed image
if uncompressed_image and self.config_entry_image.get('check-uncompressed-size'):
if uncompressed_image and \
self.config_entry_image.get('check-uncompressed-size'):
value = self.config_entry_image.get('check-uncompressed-size')
size = os.stat(uncompressed_image).st_size
usage = (float(size)/value) * 100.0
out.write('Uncompressed Image size %d/%d, using %.2f%%. ' % (size, value, usage))
out.write('Uncompressed Image size %d/%d, using %.2f%%. ' %
(size, value, usage))
if size > value:
out.write('Too large. Refusing to continue.\n')
return 1
elif usage >= 99.0:
out.write('Uncompressed Image Under 1%% space in %s. ' % self.changelog.distribution)
out.write('Uncompressed Image Under 1%% space in %s. ' %
self.changelog.distribution)
else:
out.write('Uncompressed Image fits. ')
out.write('Continuing.\n')
......
......@@ -2,8 +2,10 @@
TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,debian/patches/,' debian/patches/series* | sort -u > $TMPDIR/used
find debian/patches ! -path '*/series*' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
for patchdir in debian/patches*; do
sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series
done | sort -u > $TMPDIR/used
find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail
echo "Used patches"
echo "=============="
cat $TMPDIR/used
......
../lib/python/debian_linux/
\ No newline at end of file
#!/usr/bin/perl -pi
# Change "#!/usr/bin/env perl" to "#!/usr/bin/perl" (policy §10.4).
# Other uses of /usr/bin/env should probably be converted as well, but
# policy doesn't specify what to do.
if ($. == 1 && m|^\#!\s*/usr/bin/env\s+(.+)|) {
if ($1 eq "perl") {
$_ = "#!/usr/bin/perl\n";
} else {
print STDERR "W: Found #!/usr/bin/env $1 and don't know what to substitute\n";
}
}
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python3
#!/usr/bin/python3
import sys
sys.path.append("debian/lib/python")
import deb822
import glob
import os
import os.path
import re
import shutil
import subprocess
import time
import warnings
from debian_linux.debian import Changelog, VersionLinux
from debian_linux.patches import PatchSeries
class Main(object):
......@@ -31,7 +31,8 @@ class Main(object):
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.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.xz' % (source, version.upstream)
......@@ -49,7 +50,7 @@ class Main(object):
if len(self.input_files) > 1:
self.upstream_patch(self.input_files[1])