diff --git a/debian/README.source b/debian/README.source index b768379761..78502b6309 100644 --- a/debian/README.source +++ b/debian/README.source @@ -241,6 +241,7 @@ Several build profiles are understood and supported: - pkg.linux.nokerneldbg: Exclude kernel debug packages - pkg.linux.nokerneldbginfo: Build kernel without debug symbols (also disables BTF) +- pkg.linux.norust: Build without a Rust compiler - pkg.linux.nosource: Exclude source binary package (linux-source-) - cross: Needed when cross-building. - nopython: Disable Python bindings. This currently disables building the diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 8fd0a09e48..7dec6b5c2c 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -316,6 +316,15 @@ linux-signed-{vars['arch']} (@signedtemplate_sourceversion@) {dist}; urgency={ur restrictions='', ) ]) + if config.build.enable_rust: + for group in config.build.rust_build_depends: + self.bundle.source.build_depends_arch.merge( + PackageRelationGroup( + group, + arches={arch}, + restrictions='', + ) + ) # Generate compiler build-depends for kernel: # gcc-N-hppa64-linux-gnu [hppa] diff --git a/debian/changelog b/debian/changelog index c255d15f7c..0f77444a5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ linux (6.18~rc7-1~exp1) experimental; urgency=medium * module: Disable MODVERSIONS, MODULE_ALLOW_BTF_MISMATCH * d/l/p/debian_linux/debian.py: Allow adding restrictions to PackageRelationGroup + * Implement configuration for Rust compiler and other build-dependencies -- Salvatore Bonaccorso Mon, 24 Nov 2025 17:51:01 +0100 diff --git a/debian/lib/python/debian_linux/config_v2.py b/debian/lib/python/debian_linux/config_v2.py index c96ce1331b..520b7fffb9 100644 --- a/debian/lib/python/debian_linux/config_v2.py +++ b/debian/lib/python/debian_linux/config_v2.py @@ -45,6 +45,8 @@ class ConfigBuild: c_compiler: Optional[str] = None compiler_gnutype: Optional[str] = None compiler_gnutype_compat: Optional[str] = None + rust_build_depends: list[PackageRelationGroup] = dataclasses.field(default_factory=list) + enable_rust: Optional[bool] = None config: list[Path] = dataclasses.field(default_factory=list) config_default: list[Path] = dataclasses.field(default_factory=list, repr=False) enable_signed: Optional[bool] = None diff --git a/debian/rules.real b/debian/rules.real index 2cd2a6ac49..b7b652f661 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -78,7 +78,8 @@ $(BUILD_DIR)/config.$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(KCONFIG) mkdir -p '$(dir $@)' debian/bin/kconfig.py '$@' $(KCONFIG) $(KCONFIG_OPTIONS) \ -o MODULE_SIG_KEY=\"output/signing_key.pem\" \ - $(call if_profile, pkg.linux.nokerneldbginfo pkg.linux.quick,-o DEBUG_INFO_NONE=y -o DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=n) + $(call if_profile, pkg.linux.nokerneldbginfo pkg.linux.quick,-o DEBUG_INFO_NONE=y -o DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=n) \ + $(call if_profile, pkg.linux.norust,-o RUST=n) define copy_source mkdir -p '$(1)'