public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-ripgrep] rawhide: Fix tests for Rust 1.100 (ripgrep#3501)
@ 2026-11-14 22:40 Josh Stone
  0 siblings, 0 replies; only message in thread
From: Josh Stone @ 2026-11-14 22:40 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-ripgrep
Branch : rawhide
Commit : 4d29be34e7f5cd125cde83a6bbc8d8e2221249d5
Author : Josh Stone <jistone@redhat.com>
Date   : 2026-11-14T14:38:22-08:00
Stats  : +34/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-ripgrep/c/4d29be34e7f5cd125cde83a6bbc8d8e2221249d5?branch=rawhide

Log:
Fix tests for Rust 1.100 (ripgrep#3501)

---
diff --git a/0001-ci-fix-binary-discovery.patch b/0001-ci-fix-binary-discovery.patch
new file mode 100644
index 0000000..1f6bfd4
--- /dev/null
+++ b/0001-ci-fix-binary-discovery.patch
@@ -0,0 +1,32 @@
+From 7525479a9576f1ca4c2d04339d78e47ff5ae9b05 Mon Sep 17 00:00:00 2001
+From: Andrew Gallant <jamslam@gmail.com>
+Date: Mon, 3 Aug 2026 07:28:10 -0400
+Subject: [PATCH] ci: fix binary discovery
+
+It looks like the location of executables is changing in Cargo's test
+runner, so use the blessed way of discovering an executable. That is,
+for ripgrep, consult the `CARGO_BIN_EXE_rg` environment variable.
+---
+ tests/util.rs | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/util.rs b/tests/util.rs
+index db7331c27ecd..c0aa59cf91e6 100644
+--- a/tests/util.rs
++++ b/tests/util.rs
+@@ -177,7 +177,11 @@ impl Dir {
+ 
+     /// Returns the path to the ripgrep executable.
+     pub fn bin(&self) -> process::Command {
+-        let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX));
++        let rg = std::env::var_os("CARGO_BIN_EXE_rg")
++            .map(PathBuf::from)
++            .unwrap_or_else(|| {
++                self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX))
++            });
+         match cross_runner() {
+             None => process::Command::new(rg),
+             Some(runner) => {
+-- 
+2.56.0
+

diff --git a/rust-ripgrep.spec b/rust-ripgrep.spec
index 296bacc..13ca207 100644
--- a/rust-ripgrep.spec
+++ b/rust-ripgrep.spec
@@ -13,6 +13,8 @@ URL:            https://crates.io/crates/ripgrep
 Source:         %{crates_source}
 # Automatically generated patch to strip dependencies and normalize metadata
 Patch:          ripgrep-fix-metadata-auto.diff
+# https://github.com/BurntSushi/ripgrep/pull/3501
+Patch:          0001-ci-fix-binary-discovery.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-14 22:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 22:40 [rpms/rust-ripgrep] rawhide: Fix tests for Rust 1.100 (ripgrep#3501) Josh Stone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox