commit:     0ae9bfd139bdc03f0ef70d6d0ce5b608f4ad8731
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 18 18:18:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 18 18:19:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae9bfd1

dev-vcs/git: Rust fixes for >=2.52.0

* Improve the cargo wrapper script that Meson calls by respecting $CARGO
  and not passing --quiet.

  These could go upstream but the Rust discussions haven't been a great
  atmosphere so I don't really want to do that at this time.

* Actually call rust_pkg_setup

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ....52.0-0001-rust-don-t-pass-quiet-to-cargo.patch | 32 ++++++++++++++++++++++
 ...2-rust-respect-CARGO-environment-variable.patch | 32 ++++++++++++++++++++++
 dev-vcs/git/git-2.52.0.ebuild                      |  7 +++++
 dev-vcs/git/git-9999-r1.ebuild                     |  7 +++++
 dev-vcs/git/git-9999-r2.ebuild                     |  7 +++++
 dev-vcs/git/git-9999-r3.ebuild                     |  7 +++++
 dev-vcs/git/git-9999.ebuild                        |  7 +++++
 7 files changed, 99 insertions(+)

diff --git 
a/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch 
b/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
new file mode 100644
index 000000000000..f2af164e6f42
--- /dev/null
+++ b/dev-vcs/git/files/git-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
@@ -0,0 +1,32 @@
+From 35f637fbabb3b8181a29ba7d96a505b49ea0ba0d Mon Sep 17 00:00:00 2001
+Message-ID: 
<35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Tue, 18 Nov 2025 18:10:03 +0000
+Subject: [PATCH 1/2] rust: don't pass --quiet to cargo
+
+This obscures that cargo is being invoked at all and it means even
+ninja --verbose has no mention of it other than invoking the target.
+
+Signed-off-by: Sam James <[email protected]>
+---
+ src/cargo-meson.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh
+index 3998db0435..63a5e7c6ac 100755
+--- a/src/cargo-meson.sh
++++ b/src/cargo-meson.sh
+@@ -19,7 +19,7 @@ do
+       esac
+ done
+ 
+-cargo build --lib --quiet --manifest-path="$SOURCE_DIR/Cargo.toml" 
--target-dir="$BUILD_DIR" "$@"
++cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" 
--target-dir="$BUILD_DIR" "$@"
+ RET=$?
+ if test $RET -ne 0
+ then
+
+base-commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
+-- 
+2.51.2
+

diff --git 
a/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 
b/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
new file mode 100644
index 000000000000..351786312a8d
--- /dev/null
+++ 
b/dev-vcs/git/files/git-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
@@ -0,0 +1,32 @@
+From 1eba2788aab9f63ff55ac453b0d885aaa60c77af Mon Sep 17 00:00:00 2001
+Message-ID: 
<1eba2788aab9f63ff55ac453b0d885aaa60c77af.1763489487.git....@gentoo.org>
+In-Reply-To: 
<35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git....@gentoo.org>
+References: 
<35f637fbabb3b8181a29ba7d96a505b49ea0ba0d.1763489487.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Tue, 18 Nov 2025 18:10:47 +0000
+Subject: [PATCH 2/2] rust: respect $CARGO environment variable
+
+Respect the CARGO environment variable if set. Gentoo uses this to
+control the version of rust/cargo for a build.
+
+Signed-off-by: Sam James <[email protected]>
+---
+ src/cargo-meson.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cargo-meson.sh b/src/cargo-meson.sh
+index 63a5e7c6ac..bbf3f91178 100755
+--- a/src/cargo-meson.sh
++++ b/src/cargo-meson.sh
+@@ -19,7 +19,7 @@ do
+       esac
+ done
+ 
+-cargo build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" 
--target-dir="$BUILD_DIR" "$@"
++${CARGO:-cargo} build --lib --manifest-path="$SOURCE_DIR/Cargo.toml" 
--target-dir="$BUILD_DIR" "$@"
+ RET=$?
+ if test $RET -ne 0
+ then
+-- 
+2.51.2
+

diff --git a/dev-vcs/git/git-2.52.0.ebuild b/dev-vcs/git/git-2.52.0.ebuild
index d83716458f02..9635a818b7e4 100644
--- a/dev-vcs/git/git-2.52.0.ebuild
+++ b/dev-vcs/git/git-2.52.0.ebuild
@@ -150,6 +150,9 @@ PATCHES=(
        # demand from developers. It's opt-in (needs a config option)
        # and the documentation mentions that it is a Gentoo addition.
        
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
+
+       "${FILESDIR}"/${PN}-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
+       
"${FILESDIR}"/${PN}-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 )
 
 pkg_setup() {
@@ -162,6 +165,10 @@ pkg_setup() {
        if use perforce ; then
                python-single-r1_pkg_setup
        fi
+
+       if use rust ; then
+               rust_pkg_setup
+       fi
 }
 
 src_unpack() {

diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild
index d83716458f02..9635a818b7e4 100644
--- a/dev-vcs/git/git-9999-r1.ebuild
+++ b/dev-vcs/git/git-9999-r1.ebuild
@@ -150,6 +150,9 @@ PATCHES=(
        # demand from developers. It's opt-in (needs a config option)
        # and the documentation mentions that it is a Gentoo addition.
        
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
+
+       "${FILESDIR}"/${PN}-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
+       
"${FILESDIR}"/${PN}-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 )
 
 pkg_setup() {
@@ -162,6 +165,10 @@ pkg_setup() {
        if use perforce ; then
                python-single-r1_pkg_setup
        fi
+
+       if use rust ; then
+               rust_pkg_setup
+       fi
 }
 
 src_unpack() {

diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild
index d83716458f02..9635a818b7e4 100644
--- a/dev-vcs/git/git-9999-r2.ebuild
+++ b/dev-vcs/git/git-9999-r2.ebuild
@@ -150,6 +150,9 @@ PATCHES=(
        # demand from developers. It's opt-in (needs a config option)
        # and the documentation mentions that it is a Gentoo addition.
        
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
+
+       "${FILESDIR}"/${PN}-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
+       
"${FILESDIR}"/${PN}-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 )
 
 pkg_setup() {
@@ -162,6 +165,10 @@ pkg_setup() {
        if use perforce ; then
                python-single-r1_pkg_setup
        fi
+
+       if use rust ; then
+               rust_pkg_setup
+       fi
 }
 
 src_unpack() {

diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
index d83716458f02..9635a818b7e4 100644
--- a/dev-vcs/git/git-9999-r3.ebuild
+++ b/dev-vcs/git/git-9999-r3.ebuild
@@ -150,6 +150,9 @@ PATCHES=(
        # demand from developers. It's opt-in (needs a config option)
        # and the documentation mentions that it is a Gentoo addition.
        
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
+
+       "${FILESDIR}"/${PN}-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
+       
"${FILESDIR}"/${PN}-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 )
 
 pkg_setup() {
@@ -162,6 +165,10 @@ pkg_setup() {
        if use perforce ; then
                python-single-r1_pkg_setup
        fi
+
+       if use rust ; then
+               rust_pkg_setup
+       fi
 }
 
 src_unpack() {

diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild
index d83716458f02..9635a818b7e4 100644
--- a/dev-vcs/git/git-9999.ebuild
+++ b/dev-vcs/git/git-9999.ebuild
@@ -150,6 +150,9 @@ PATCHES=(
        # demand from developers. It's opt-in (needs a config option)
        # and the documentation mentions that it is a Gentoo addition.
        
"${FILESDIR}"/${PN}-2.50.0-diff-implement-config.diff.renames-copies-harder.patch
+
+       "${FILESDIR}"/${PN}-2.52.0-0001-rust-don-t-pass-quiet-to-cargo.patch
+       
"${FILESDIR}"/${PN}-2.52.0-0002-rust-respect-CARGO-environment-variable.patch
 )
 
 pkg_setup() {
@@ -162,6 +165,10 @@ pkg_setup() {
        if use perforce ; then
                python-single-r1_pkg_setup
        fi
+
+       if use rust ; then
+               rust_pkg_setup
+       fi
 }
 
 src_unpack() {

Reply via email to