public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-onefetch] rawhide: Update to version 3.1.0; Fixes RHBZ#2555319
Date: Mon, 19 Oct 2026 06:54:29 GMT [thread overview]
Message-ID: <179239286948.1.9743996184154915110.rpms-rust-onefetch-bf0f88f918d5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rust-onefetch
Branch : rawhide
Commit : bf0f88f918d562e03264142daeb1eea720228006
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-10-19T07:45:48+01:00
Stats : +116/-43 in 7 file(s)
URL : https://src.fedoraproject.org/rpms/rust-onefetch/c/bf0f88f918d562e03264142daeb1eea720228006?branch=rawhide
Log:
Update to version 3.1.0; Fixes RHBZ#2555319
---
diff --git a/0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch b/0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch
index 18acd87..eeb271b 100644
--- a/0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch
+++ b/0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch
@@ -1,26 +1,27 @@
-From 4fde520c5d18217875b9c3e523db7dff2c8560b7 Mon Sep 17 00:00:00 2001
+From 0adabff3d6b3ae40428be54710a925e8ba1a5e3b Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 2 Sep 2026 11:45:37 +0100
-Subject: [PATCH] Revert "chore(deps): Update Rust crate gix to 0.86.0 (#1838)"
+Subject: [PATCH 1/2] Revert "chore(deps): Update Rust crate gix to 0.86.0
+ (#1838)"
This reverts commit f43b0cb3ad4076974e942b54751ee462ce2a6ca5.
---
- src/info/fields/project.rs | 2 +-
+ src/data/fields/project.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/info/fields/project.rs b/src/info/fields/project.rs
-index d947291..632a0ca 100644
---- a/src/info/fields/project.rs
-+++ b/src/info/fields/project.rs
-@@ -31,7 +31,7 @@ fn get_repo_name(repo_url: &str, manifest: Option<&Manifest>) -> Result<String>
+diff --git a/src/data/fields/project.rs b/src/data/fields/project.rs
+index 2cdeb7e..cc58818 100644
+--- a/src/data/fields/project.rs
++++ b/src/data/fields/project.rs
+@@ -29,7 +29,7 @@ fn get_repo_name(repo_url: &str, manifest: Option<&Manifest>) -> Result<String>
if repo_url.is_empty() {
return Ok(String::default());
}
- let url = gix::url::parse(repo_url)?;
+ let url = gix::url::parse(repo_url.into())?;
- let path = gix::path::from_bstr(url.path.as_bstr());
+ let path = gix::path::from_bstr(url.path.as_bstr())?;
let repo_name = path
.with_extension("")
--
-2.55.0
+2.56.0
diff --git a/0002-Patch-for-functions-that-were-infallible-before-gix-.patch b/0002-Patch-for-functions-that-were-infallible-before-gix-.patch
new file mode 100644
index 0000000..0f10087
--- /dev/null
+++ b/0002-Patch-for-functions-that-were-infallible-before-gix-.patch
@@ -0,0 +1,40 @@
+From 9cb6b918e519e582a57d99ccdeff987844ed9d1c Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Mon, 19 Oct 2026 07:13:14 +0100
+Subject: [PATCH 2/2] Patch for functions that were infallible before gix 0.89
+
+Previously, path::from_bstr and Repository::is_shallow were infallible.
+---
+ src/data/fields/project.rs | 2 +-
+ src/data/mod.rs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/data/fields/project.rs b/src/data/fields/project.rs
+index cc58818..a5033f4 100644
+--- a/src/data/fields/project.rs
++++ b/src/data/fields/project.rs
+@@ -30,7 +30,7 @@ fn get_repo_name(repo_url: &str, manifest: Option<&Manifest>) -> Result<String>
+ return Ok(String::default());
+ }
+ let url = gix::url::parse(repo_url.into())?;
+- let path = gix::path::from_bstr(url.path.as_bstr())?;
++ let path = gix::path::from_bstr(url.path.as_bstr());
+ let repo_name = path
+ .with_extension("")
+ .file_name()
+diff --git a/src/data/mod.rs b/src/data/mod.rs
+index 840ecee..44a0512 100644
+--- a/src/data/mod.rs
++++ b/src/data/mod.rs
+@@ -104,7 +104,7 @@ pub fn build_info(options: &InfoOptions) -> Result<Info> {
+ .last_change(&git_metrics)
+ .contributors(&git_metrics, options.number_of_authors)
+ .url(&repo_url)
+- .commits(&git_metrics, repo.is_shallow()?)
++ .commits(&git_metrics, repo.is_shallow())
+ .churn(
+ &git_metrics,
+ options.number_of_file_churns,
+--
+2.56.0
+
diff --git a/onefetch-fix-metadata-auto.diff b/onefetch-fix-metadata-auto.diff
index 90f0d2b..462491f 100644
--- a/onefetch-fix-metadata-auto.diff
+++ b/onefetch-fix-metadata-auto.diff
@@ -1,11 +1,17 @@
---- onefetch-3.0.0/Cargo.toml 2006-07-24T01:21:28+00:00
-+++ onefetch-3.0.0/Cargo.toml 2026-10-08T17:41:43.969681+00:00
-@@ -194,8 +194,3 @@
- version = "2.4.0"
- default-features = false
+--- onefetch-3.1.0/Cargo.toml 2006-07-24T01:21:28+00:00
++++ onefetch-3.1.0/Cargo.toml 2026-10-19T06:45:33.345766+00:00
+@@ -212,13 +212,8 @@
+ "event",
+ ]
-[target."cfg(windows)".dependencies.enable-ansi-support]
-version = "0.3.1"
-
--[target."cfg(windows)".build-dependencies.winres]
--version = "0.1.12"
+-[target."cfg(windows)".build-dependencies.winresource]
+-version = "0.1.34"
+-
+ [profile.release]
+ lto = true
+ codegen-units = 1
+ strip = true
++
diff --git a/onefetch-fix-metadata.diff b/onefetch-fix-metadata.diff
index 4560aac..5cbf368 100644
--- a/onefetch-fix-metadata.diff
+++ b/onefetch-fix-metadata.diff
@@ -1,8 +1,8 @@
---- onefetch-3.0.0/Cargo.toml 2006-07-24T01:21:28+00:00
-+++ onefetch-3.0.0/Cargo.toml 2026-10-08T17:41:43.971164+00:00
-@@ -69,10 +69,6 @@
- name = "onefetch"
- path = "src/main.rs"
+--- onefetch-3.1.0/Cargo.toml 2006-07-24T01:21:28+00:00
++++ onefetch-3.1.0/Cargo.toml 2026-10-19T06:45:33.347005+00:00
+@@ -73,10 +73,6 @@
+ name = "manifest"
+ path = "tests/manifest.rs"
-[[test]]
-name = "repo"
@@ -11,16 +11,16 @@
[[bench]]
name = "repo"
path = "benches/repo.rs"
-@@ -95,7 +91,7 @@
+@@ -102,7 +98,7 @@
version = "4.6.11"
[dependencies.gix]
--version = "0.88.0"
-+version = "0.85"
+-version = "0.89.0"
++version = "0.85.0"
features = [
"max-performance-safe",
"blob-diff",
-@@ -103,7 +99,6 @@
+@@ -110,7 +106,6 @@
"index",
"status",
"sha1",
@@ -28,25 +28,26 @@
]
default-features = false
-@@ -162,12 +157,6 @@
- [dependencies.typetag]
- version = "0.2.23"
+@@ -167,13 +162,6 @@
+ [dependencies.toml]
+ version = "1.1.8"
-[dev-dependencies.criterion]
-version = "0.8.2"
-
-[dev-dependencies.gix-testtools]
-version = "0.21.0"
+-features = ["sha1"]
-
[dev-dependencies.insta]
version = "1.49.0"
features = [
-@@ -176,7 +165,7 @@
+@@ -182,7 +170,7 @@
]
[dev-dependencies.rstest]
-version = "0.27.0"
+version = ">=0.26.0, <0.28.0"
- [build-dependencies.lazy_static]
- version = "1.5.1"
+ [build-dependencies.regex]
+ version = "1.13.1"
diff --git a/rust-onefetch.spec b/rust-onefetch.spec
index 35ea6a1..8b2557a 100644
--- a/rust-onefetch.spec
+++ b/rust-onefetch.spec
@@ -7,7 +7,7 @@
%global crate onefetch
Name: rust-onefetch
-Version: 3.0.0
+Version: 3.1.0
Release: %autorelease
Summary: Command-line Git information tool
@@ -18,7 +18,7 @@ Source: %{crates_source}
Patch: onefetch-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * Do not depend on criterion; it is needed only for benchmarks
-# * Use older gix 0.85 (upstream wants 0.88):
+# * Use older gix 0.85 (upstream wants 0.89):
# https://bugzilla.redhat.com/show_bug.cgi?id=2506441. We must carry a
# downstream patch reverting the source-code change from
# https://github.com/o2sh/onefetch/commit/f43b0cb3ad4076974e942b54751ee462ce2a6ca5;
@@ -33,9 +33,13 @@ Patch: onefetch-fix-metadata-auto.diff
# * Allow older rstest 0.26 for now,
# https://bugzilla.redhat.com/show_bug.cgi?id=2529211
Patch: onefetch-fix-metadata.diff
-# * Downstream-only: revert the source-code change for gix 0.86+ so we can
-# temporarily keep using gix 0.85.
+# * Revert the source-code change for gix 0.86+
+# * This allows us to temporarily keep using gix 0.85.
Patch10: 0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch
+# * Patch for functions that were infallible before gix 0.89
+# * Previously, path::from_bstr and Repository::is_shallow were infallible.
+# * We revert the changes to keep using older gix for now
+Patch11: 0002-Patch-for-functions-that-were-infallible-before-gix-.patch
BuildRequires: cargo-rpm-macros >= 26
BuildRequires: help2man
@@ -87,6 +91,7 @@ License: %{shrink:
%files -n %{crate}
%license LICENSE.md
%license LICENSE.dependencies
+%doc ARCHITECTURE.md
%doc CHANGELOG.md
%doc CONTRIBUTING.md
%doc README.md
@@ -128,7 +133,9 @@ install -Dpm 0644 _onefetch -t %{buildroot}/%{zsh_completions_dir}
%if %{with check}
%check
-%cargo_test
+# * Since tests/fixtures/cargo/ is not included in the released crate, we cannot
+# run tests that require it.
+%cargo_test -- -- --skip should_detect_and_parse_cargo_manifest
%endif
%changelog
diff --git a/rust2rpm.toml b/rust2rpm.toml
index 94ffb5b..5e17acc 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -2,7 +2,7 @@
cargo-toml-patch-comments = [
"Do not depend on criterion; it is needed only for benchmarks",
"""\
-Use older gix 0.85 (upstream wants 0.88): \
+Use older gix 0.85 (upstream wants 0.89): \
https://bugzilla.redhat.com/show_bug.cgi?id=2506441. We must carry a \
downstream patch reverting the source-code change from \
https://github.com/o2sh/onefetch/commit/f43b0cb3ad4076974e942b54751ee462ce2a6ca5; \
@@ -43,10 +43,17 @@ cargo-install-lib = false
number = 10
file = "0001-Revert-chore-deps-Update-Rust-crate-gix-to-0.86.0-18.patch"
comments = [
- """\
-Downstream-only: revert the source-code change for gix 0.86+ so we can \
-temporarily keep using gix 0.85.\
-""",
+ "Revert the source-code change for gix 0.86+",
+ "This allows us to temporarily keep using gix 0.85.",
+]
+
+[[package.extra-patches]]
+number = 11
+file = "0002-Patch-for-functions-that-were-infallible-before-gix-.patch"
+comments = [
+ "Patch for functions that were infallible before gix 0.89",
+ "Previously, path::from_bstr and Repository::is_shallow were infallible.",
+ "We revert the changes to keep using older gix for now",
]
[requires]
@@ -80,3 +87,14 @@ install -Dpm 0644 onefetch.fish -t %{buildroot}/%{fish_completions_dir}
install -Dpm 0644 _onefetch -t %{buildroot}/%{zsh_completions_dir}\
""",
]
+
+[tests]
+comments = [
+ """\
+Since tests/fixtures/cargo/ is not included in the released crate, we \
+cannot run tests that require it.\
+""",
+]
+skip = [
+ "should_detect_and_parse_cargo_manifest",
+]
diff --git a/sources b/sources
index f612083..2d63e61 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (onefetch-3.0.0.crate) = 3417a077acc4264c047cbc4309ddefa01ddc910954fb15a332540b5ccacf0d12abfa0be7b6c99998852a632f08c89088821720246740ccd13f3383821b64c2b1
+SHA512 (onefetch-3.1.0.crate) = f985c9a6227fbb34343dc964f2f5df595ae9508407502cd2a29ed270cd9f94d9ec3027a04b98419f5ba117fb312ad9eb9855af6761fb7ed1c6a7184eca3967a9
reply other threads:[~2026-10-19 6:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179239286948.1.9743996184154915110.rpms-rust-onefetch-bf0f88f918d5@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox