Add flag to disable signed code

This commit is contained in:
Bastian Blank 2020-08-20 10:22:25 +02:00 committed by Salvatore Bonaccorso
parent 413fadb4aa
commit 57f0533e9a
1 changed files with 15 additions and 5 deletions

View File

@ -61,6 +61,7 @@ class Gencontrol(Base):
env_flags = [
('DEBIAN_KERNEL_DISABLE_DEBUG', 'disable_debug', 'debug infos'),
('DEBIAN_KERNEL_DISABLE_INSTALLER', 'disable_installer', 'installer modules'),
('DEBIAN_KERNEL_DISABLE_SIGNED', 'disable_signed', 'signed code'),
]
def __init__(self, config_dirs=["debian/config"],
@ -139,8 +140,11 @@ class Gencontrol(Base):
# configuration errors before building linux-signed.
build_signed = {}
for arch in arches:
if not self.disable_signed:
build_signed[arch] = self.config.merge('build', arch) \
.get('signed-code', False)
else:
build_signed[arch] = False
for package in udeb_packages:
# kernel-wedge currently chokes on Build-Profiles so add it now
@ -253,8 +257,11 @@ class Gencontrol(Base):
makeflags['ABINAME'] = vars['abiname'] = \
self.abiname_version + abiname_part
if not self.disable_signed:
build_signed = self.config.merge('build', arch) \
.get('signed-code', False)
else:
build_signed = False
# Some userland architectures require kernels from another
# (Debian) architecture, e.g. x32/amd64.
@ -464,7 +471,10 @@ class Gencontrol(Base):
packages_own = []
if not self.disable_signed:
build_signed = config_entry_build.get('signed-code')
else:
build_signed = False
image = self.templates[build_signed and "control.image-unsigned"
or "control.image"]