1
0

drop installer

This commit is contained in:
2024-10-29 05:12:06 +03:00
parent 2e85d42e92
commit cfb6102755
696 changed files with 2 additions and 2240 deletions

View File

@@ -33,11 +33,9 @@ locale.setlocale(locale.LC_CTYPE, "C.UTF-8")
class Gencontrol(Base):
disable_installer: bool
disable_signed: bool
env_flags = [
('DEBIAN_KERNEL_DISABLE_INSTALLER', 'disable_installer', 'installer modules'),
('DEBIAN_KERNEL_DISABLE_SIGNED', 'disable_signed', 'signed code'),
]
@@ -476,81 +474,6 @@ linux-signed-{vars['arch']} (@signedtemplate_sourceversion@) {dist}; urgency={ur
["$(MAKE) -f debian/rules.real %s %s" %
(merged_config, makeflags)])
if (
config.name_featureset == 'none'
and not self.disable_installer
and config.packages.installer
):
with tempfile.TemporaryDirectory(prefix='linux-gencontrol') as config_dir:
base_path = pathlib.Path('debian/installer').absolute()
config_path = pathlib.Path(config_dir)
(config_path / 'modules').symlink_to(base_path / 'modules')
(config_path / 'package-list').symlink_to(base_path / 'package-list')
with (config_path / 'kernel-versions').open('w') as versions:
versions.write(f'{arch} - {vars["flavour"]} - - -\n')
# Add udebs using kernel-wedge
kw_env = os.environ.copy()
kw_env['KW_DEFCONFIG_DIR'] = config_dir
kw_env['KW_CONFIG_DIR'] = config_dir
kw_proc = subprocess.Popen(
['kernel-wedge', 'gen-control', vars['abiname']],
stdout=subprocess.PIPE,
text=True,
env=kw_env)
assert kw_proc.stdout is not None
udeb_packages_base = list(read_deb822(BinaryPackage, kw_proc.stdout))
kw_proc.wait()
if kw_proc.returncode != 0:
raise RuntimeError('kernel-wedge exited with code %d' %
kw_proc.returncode)
udeb_packages = [
dataclasses.replace(
package_base,
# kernel-wedge currently chokes on Build-Profiles so add it now
build_profiles=PackageBuildprofile.parse(
'<!noudeb !pkg.linux.nokernel !pkg.linux.quick>',
),
meta_rules_target='installer',
)
for package_base in udeb_packages_base
]
makeflags_local = makeflags.copy()
makeflags_local['IMAGE_PACKAGE_NAME'] = udeb_packages[0].name
bundle_signed.add_packages(
udeb_packages,
(config.name_debianarch, config.name_featureset, config.name_flavour),
makeflags_local, arch=arch,
)
if build_signed:
# XXX This is a hack to exclude the udebs from
# the package list while still being able to
# convince debhelper and kernel-wedge to go
# part way to building them.
udeb_packages = [
dataclasses.replace(
package_base,
# kernel-wedge currently chokes on Build-Profiles so add it now
build_profiles=PackageBuildprofile.parse(
'<pkg.linux.udeb-unsigned-test-build !noudeb'
' !pkg.linux.nokernel !pkg.linux.quick>',
),
meta_rules_target='installer-test',
)
for package_base in udeb_packages_base
]
self.bundle.add_packages(
udeb_packages,
(config.name_debianarch, config.name_featureset, config.name_flavour),
makeflags_local, arch=arch, check_packages=False,
)
def process_changelog(self) -> None:
version = self.version = self.changelog[0].version