Skip to content

Commit

Permalink
Sync with Debian's debian/4.17.8-1 as of commit 95ecb7bab0ce4beaea7aa…
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed Aug 15, 2018
1 parent 359acda commit 501abe7
Show file tree
Hide file tree
Showing 94 changed files with 2,617 additions and 2,247 deletions.
29 changes: 0 additions & 29 deletions linux/debian/.gitignore

This file was deleted.

24 changes: 15 additions & 9 deletions linux/debian/bin/gencontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class Gencontrol(Base):
'headers-all': config.SchemaItemBoolean(),
'installer': config.SchemaItemBoolean(),
'libc-dev': config.SchemaItemBoolean(),
'tools': config.SchemaItemBoolean(),
'tools-unversioned': config.SchemaItemBoolean(),
'tools-versioned': config.SchemaItemBoolean(),
'source': config.SchemaItemBoolean(),
}
}

Expand Down Expand Up @@ -75,6 +77,10 @@ def do_main_setup(self, vars, makeflags, extra):
'ABINAME': self.abiname_version + self.abiname_part,
'SOURCEVERSION': self.version.complete,
})
if not self.config.merge('packages').get('tools-unversioned', True):
makeflags['DO_TOOLS_UNVERSIONED'] = False
if not self.config.merge('packages').get('tools-versioned', True):
makeflags['DO_TOOLS_VERSIONED'] = False

# Prepare to generate debian/tests/control
self.tests_control = None
Expand Down Expand Up @@ -104,10 +110,11 @@ def do_main_makefile(self, makefile, makeflags, extra):
makeflags = makeflags.copy()
makeflags['ALL_FEATURESETS'] = ' '.join(fs_enabled)
makeflags['ALL_TRIPLETS'] = ' '.join(triplet_enabled)
makeflags['SOURCE_BASENAME'] = self.vars['source_basename']
if not self.config.merge('packages').get('docs', True):
makeflags['DO_DOCS'] = False
if not self.config.merge('packages').get('tools', True):
makeflags['DO_TOOLS'] = False
if not self.config.merge('packages').get('source', True):
makeflags['DO_SOURCE'] = False
super(Gencontrol, self).do_main_makefile(makefile, makeflags, extra)

# linux-source-$UPSTREAMVERSION will contain all kconfig files
Expand All @@ -117,8 +124,10 @@ def do_main_packages(self, packages, vars, makeflags, extra):
packages.extend(self.process_packages(self.templates["control.main"], self.vars))
if self.config.merge('packages').get('docs', True):
packages.extend(self.process_packages(self.templates["control.docs"], self.vars))
if self.config.merge('packages').get('tools', True):
packages.extend(self.process_packages(self.templates["control.tools"], self.vars))
if self.config.merge('packages').get('tools-unversioned', True):
packages.extend(self.process_packages(self.templates["control.tools-unversioned"], self.vars))
if self.config.merge('packages').get('tools-versioned', True):
packages.extend(self.process_packages(self.templates["control.tools-versioned"], self.vars))

self._substitute_file('perf.lintian-overrides', self.vars,
'debian/linux-perf-%s.lintian-overrides' %
Expand Down Expand Up @@ -199,10 +208,6 @@ def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
else:
makeflags['DO_LIBC'] = False

if not self.config.merge('packages').get('tools', True):
makeflags['DO_TOOLS'] = False


merge_packages(packages, packages_headers_arch, arch)

cmds_build_arch = ["$(MAKE) -f debian/rules.real build-arch-arch %s" % makeflags]
Expand Down Expand Up @@ -547,6 +552,7 @@ def process_changelog(self):
self.vars = {
'upstreamversion': self.version.linux_upstream,
'version': self.version.linux_version,
'source_basename': re.sub(r'-[\d.]+$', '', self.changelog[0].source),
'source_upstream': self.version.upstream,
'source_package': self.changelog[0].source,
'abiname': self.abiname_version + self.abiname_part,
Expand Down
26 changes: 12 additions & 14 deletions linux/debian/bin/gencontrol_signed.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,33 +176,31 @@ def write(self, packages, makefile):
self.write_files_json()

def write_changelog(self):
changelog_text = self.substitute(self.templates['changelog.in'],
self.vars)
changelog = Changelog(file=io.StringIO(changelog_text))

# We need to insert a new version entry.
# Take the distribution and urgency from the linux changelog, and
# the base version from the changelog template.
vars = self.vars.copy()
vars['source'] = self.changelog[0].source
vars['distribution'] = self.changelog[0].distribution
vars['urgency'] = self.changelog[0].urgency
vars['maintainer'] = self.changelog[0].maintainer
vars['date'] = self.changelog[0].date
vars['signedsourceversion'] = (changelog[0].version.complete + '+' +
re.sub(r'-', r'+',
vars['imagebinaryversion']))
vars['signedsourceversion'] = (re.sub(r'-', r'+', vars['imagebinaryversion']))

with codecs.open(self.template_debian_dir + '/changelog', 'w', 'utf-8') as f:
f.write(self.substitute('''\
linux-signed-@arch@ (@signedsourceversion@) @distribution@; urgency=@urgency@
* Update to linux @imagebinaryversion@
-- @maintainer@ @date@
* Sign kernel from @source@ @imagebinaryversion@
''',
vars))
f.write(changelog_text)
vars))

with codecs.open('debian/changelog', 'r', 'utf-8') as changelog_in:
# Ignore first two header lines
changelog_in.readline()
changelog_in.readline()

for d in changelog_in.read():
f.write(d)

def write_files_json(self):
# Can't raise from a lambda function :-(
Expand Down
24 changes: 18 additions & 6 deletions linux/debian/bin/genorig.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,25 @@ def tar(self, orig_date):
except OSError:
pass
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' --owner root --group root -caf '%s'
''' % (self.dir, self.orig, self.dir, orig_date, out)

env = os.environ.copy()
env.update({
'LC_ALL': 'C',
})
cmd = [
'tar',
'-C', self.dir,
'--sort=name',
'--mtime={}'.format(orig_date),
'--owner=root',
'--group=root',
'--use-compress-program=xz -T0',
'-cf',
out, self.orig,
]

try:
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', cmdline]):
raise RuntimeError("Can't patch source")
subprocess.run(cmd, env=env, check=True)
os.chmod(out, 0o644)
except:
try:
Expand Down
5 changes: 5 additions & 0 deletions linux/debian/config/amd64/config
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ CONFIG_SIGNED_PE_FILE_VERIFICATION=y
##
CONFIG_ACPI_BGRT=y

##
## file: drivers/android/Kconfig
##
CONFIG_ANDROID=y

##
## file: drivers/block/Kconfig
##
Expand Down
69 changes: 61 additions & 8 deletions linux/debian/config/amd64/config.cloud-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
##
# CONFIG_EARLY_PRINTK_EFI is not set

##
## file: arch/x86/kvm/Kconfig
##
# CONFIG_VIRTUALIZATION is not set

##
## file: arch/x86/xen/Kconfig
##
Expand All @@ -41,6 +36,7 @@
##
CONFIG_IOSCHED_CFQ=m
## choice: Default I/O scheduler
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_NOOP=y
## end choice
CONFIG_MQ_IOSCHED_DEADLINE=m
Expand Down Expand Up @@ -961,7 +957,6 @@ CONFIG_HYPERV_STORAGE=m
# CONFIG_LIBFC is not set
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
Expand Down Expand Up @@ -1234,6 +1229,66 @@ CONFIG_HYPERV_STORAGE=m
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set

##
## file: fs/adfs/Kconfig
##
# CONFIG_ADFS_FS is not set

##
## file: fs/affs/Kconfig
##
# CONFIG_AFFS_FS is not set

##
## file: fs/afs/Kconfig
##
# CONFIG_AFS_FS is not set

##
## file: fs/befs/Kconfig
##
# CONFIG_BEFS_FS is not set

##
## file: fs/bfs/Kconfig
##
# CONFIG_BFS_FS is not set

##
## file: fs/efs/Kconfig
##
# CONFIG_EFS_FS is not set

##
## file: fs/f2fs/Kconfig
##
# CONFIG_F2FS_FS is not set

##
## file: fs/freevxfs/Kconfig
##
# CONFIG_VXFS_FS is not set

##
## file: fs/omfs/Kconfig
##
# CONFIG_OMFS_FS is not set

##
## file: fs/qnx4/Kconfig
##
# CONFIG_QNX4FS_FS is not set

##
## file: fs/qnx6/Kconfig
##
# CONFIG_QNX6FS_FS is not set

##
## file: fs/ufs/Kconfig
##
# CONFIG_UFS_FS is not set

##
## file: kernel/power/Kconfig
##
Expand All @@ -1254,8 +1309,6 @@ CONFIG_HYPERV_STORAGE=m
##
## file: mm/Kconfig
##
#. XXX
# CONFIG_MEMORY_HOTPLUG is not set
# CONFIG_KSM is not set
# CONFIG_ZSWAP is not set

Expand Down
5 changes: 5 additions & 0 deletions linux/debian/config/amd64/defines
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ vdso: true

[image]
bootloaders: grub-pc grub-efi-amd64 extlinux
configs:
# to end up with: debian/config/config debian/config/kernelarch-x86/config debian/config/amd64/config debian/config/kernelarch-x86/config-grml
# see debian/rules.gen after `fakeroot ./debian/rules debian/control`
amd64/config
kernelarch-x86/config-grml
install-stem: vmlinuz
breaks: xserver-xorg-input-vmmouse (<< 1:13.0.99)

Expand Down
Loading

0 comments on commit 501abe7

Please sign in to comment.