[SRU][L][M][U][PATCH 1/1] UBUNTU: [Packaging] generate linux-lib-rust only on amd64

Tim Gardner tim.gardner at canonical.com
Tue May 23 13:34:33 UTC 2023


On 5/22/23 5:14 AM, Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/2020356
> 
> Rust is only supported by amd64 at the moment, so there is no reason to
> generate linux-lib-rust packages on the other architectures.
> 
> This can prevent generating empty packages or even build errors.
> 
> Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
> ---
>   debian/rules.d/2-binary-arch.mk | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 630a335616a74..b796e67dadb1f 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -132,7 +132,9 @@ $(stampdir)/stamp-install-%: $(stampdir)/stamp-build-% $(stampdir)/stamp-install
>   	dh_prep -p$(bin_pkg_name)-$*
>   	dh_prep -p$(mods_pkg_name)-$*
>   	dh_prep -p$(hdrs_pkg_name)-$*
> +ifeq ($(build_arch),x86)
>   	dh_prep -p$(rust_pkg_name)-$*
> +endif
>   	$(foreach _m,$(all_standalone_dkms_modules), \
>   	  $(if $(enable_$(_m)),dh_prep -p$(dkms_$(_m)_pkg_name)-$*;)\
>   	)
> @@ -675,7 +677,9 @@ endif
>   
>   	$(call dh_all,$(pkgbldinfo))
>   	$(call dh_all,$(pkghdr))
> +ifeq ($(build_arch),x86)
>   	$(call dh_all,$(pkgrust))
> +endif
>   
>   ifneq ($(skipsub),true)
>   	@set -e; for sub in $($(*)_sub); do		\

Instead of tying rust support to an arch, how about using the do_ macros 
like we use for other packaging decisions ?

debian.master/rules.d/amd64.mk: do_rust=true

rtg
-- 
-----------
Tim Gardner
Canonical, Inc




More information about the kernel-team mailing list