From e4674cd7b5f01d79b38539cf1f18abd8414ea734 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sun, 12 Jan 2025 10:26:20 +0800 Subject: [PATCH] .cargo/config.toml: exclude from tarball Various commits have added bits to .cargo/config.toml. Unfortunately, this file needs to be changed by the Linux package builds (debuild, RPM, OBS etc) with the results of `cargo vendor`, to support building in isolated environments. These environments - especially Debian's dpkg-buildpackage/debuild - do not make it easy to alter a file which already exists in the tarball in an automatic way. dpkg-buildpackage in particular requires all changes to be made in the form of patches. Just exclude .cargo/config.toml from the tarballs for now. This means that the stanzas it includes _will not apply_ to builds made from tarballs, which includes releases and development builds made using the OBS/Launchpad PPAs. --- .cargo/config.toml | 5 +++++ .gitattributes | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 0e9cb46b2..9f639eaf6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,8 @@ +# This file is _not_ included in the tarballs for now +# Binary builds on Linux packaging infrastructure need to overwrite it to make `cargo vendor` work +# Releases and development builds made using OBS/Launchpad will _not_ reflect the contents of this +# file + [resolver] # Make cargo 1.84+ respect MSRV (rust-version in Cargo.toml) incompatible-rust-versions = "fallback" diff --git a/.gitattributes b/.gitattributes index 93ae94673..5328a94eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,6 +21,8 @@ /.github/* export-ignore /.builds export-ignore /.builds/* export-ignore +# to make cargo vendor work correctly +/.cargo/config.toml # for linguist; let github identify our project as C++ instead of C due to pcre2 pcre2/** linguist-vendored