public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-tree-sitter-loader] f44: Update to version 0.26.9; Fixes RHBZ#2420891
@ 2026-06-03 8:05 Aleksei Bavshin
0 siblings, 0 replies; only message in thread
From: Aleksei Bavshin @ 2026-06-03 8:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rust-tree-sitter-loader
Branch : f44
Commit : d5efc19c86f3188ab20bef96c72af59816d37c98
Author : Aleksei Bavshin <alebastr@fedoraproject.org>
Date : 2026-05-28T23:17:31-07:00
Stats : +79/-58 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/rust-tree-sitter-loader/c/d5efc19c86f3188ab20bef96c72af59816d37c98?branch=f44
Log:
Update to version 0.26.9; Fixes RHBZ#2420891
---
diff --git a/LICENSE.upstream b/LICENSE.upstream
deleted file mode 100644
index 451fe1d..0000000
--- a/LICENSE.upstream
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2018-2024 Max Brunsfeld
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/loader-replace-fs4-with-std-file-locking.patch b/loader-replace-fs4-with-std-file-locking.patch
new file mode 100644
index 0000000..a200382
--- /dev/null
+++ b/loader-replace-fs4-with-std-file-locking.patch
@@ -0,0 +1,52 @@
+From 929062432fc1168dc19b81ac8d7dd7bb9d6fa18f Mon Sep 17 00:00:00 2001
+From: Amaan Qureshi <git@amaanq.com>
+Date: Tue, 10 Feb 2026 02:35:28 -0500
+Subject: [PATCH] loader: replace fs4 with std file locking
+
+diff --git a/src/loader.rs b/src/loader.rs
+index 178aa2d1..2e4c725e 100644
+--- a/src/loader.rs
++++ b/src/loader.rs
+@@ -21,7 +21,6 @@ use std::{
+ };
+
+ use etcetera::BaseStrategy as _;
+-use fs4::fs_std::FileExt;
+ use libloading::{Library, Symbol};
+ use log::{error, info, warn};
+ use once_cell::unsync::OnceCell;
+@@ -1030,11 +1029,11 @@ impl Loader {
+
+ if let Ok(lock_file) = fs::OpenOptions::new().write(true).open(&lock_path) {
+ recompile = false;
+- if lock_file.try_lock_exclusive().is_err() {
++ if lock_file.try_lock().is_err() {
+ // if we can't acquire the lock, another process is compiling the parser, wait for
+ // it and don't recompile
+ lock_file
+- .lock_exclusive()
++ .lock()
+ .map_err(|e| LoaderError::IO(IoError::new(e, Some(lock_path.as_path()))))?;
+ recompile = false;
+ } else {
+@@ -1067,7 +1066,7 @@ impl Loader {
+ .open(&lock_path)
+ .map_err(|e| LoaderError::IO(IoError::new(e, Some(lock_path.as_path()))))?;
+ lock_file
+- .lock_exclusive()
++ .lock()
+ .map_err(|e| LoaderError::IO(IoError::new(e, Some(lock_path.as_path()))))?;
+
+ self.compile_parser_to_dylib(&config, &lock_file, &lock_path)?;
+@@ -1216,7 +1215,8 @@ impl Loader {
+ let _ = fs::remove_dir_all(temp_dir);
+ }
+
+- FileExt::unlock(lock_file)
++ lock_file
++ .unlock()
+ .map_err(|e| LoaderError::IO(IoError::new(e, Some(lock_path))))?;
+ fs::remove_file(lock_path)
+ .map_err(|e| LoaderError::IO(IoError::new(e, Some(lock_path))))?;
+--
+2.54.0
diff --git a/rust-tree-sitter-loader.spec b/rust-tree-sitter-loader.spec
index 3cb11f0..abc630e 100644
--- a/rust-tree-sitter-loader.spec
+++ b/rust-tree-sitter-loader.spec
@@ -1,26 +1,24 @@
-# Generated by rust2rpm 27
+# Generated by rust2rpm 28
%bcond check 1
%global debug_package %{nil}
%global crate tree-sitter-loader
Name: rust-tree-sitter-loader
-Version: 0.25.10
+Version: 0.26.9
Release: %autorelease
Summary: Locates, builds, and loads tree-sitter grammars at runtime
License: MIT
URL: https://crates.io/crates/tree-sitter-loader
Source: %{crates_source}
-# * Upstream license file - tree-sitter/tree-sitter#1520
-Source2: https://github.com/tree-sitter/tree-sitter/raw/v%{version}/LICENSE#/LICENSE.upstream
# Manually created patch for downstream crate metadata changes
+# * Allow libloading 0.8
+# * Remove dependency 'fs4'
# * Disable feature 'wasm'
-# * Update etcetera to 0.10:
-# https://github.com/tree-sitter/tree-sitter/pull/4392; allow etcetera 0.11,
-# downstream for now because updating upstream would increase MSRV to 1.87
-# * Update fs4 to 0.13
Patch: tree-sitter-loader-fix-metadata.diff
+# * Replace fs4 with std file locking (tree-sitter/tree-sitter#5326)
+Patch2: loader-replace-fs4-with-std-file-locking.patch
BuildRequires: cargo-rpm-macros >= 24
@@ -82,7 +80,6 @@ use the "tree-sitter-tags" feature of the "%{crate}" crate.
%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
-cp -pav %{SOURCE2} LICENSE
%generate_buildrequires
%cargo_generate_buildrequires
diff --git a/rust2rpm.toml b/rust2rpm.toml
index b808afb..02d1363 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -1,24 +1,14 @@
[package]
cargo-toml-patch-comments = [
+ "Allow libloading 0.8",
+ "Remove dependency 'fs4'",
"Disable feature 'wasm'",
- """\
- Update etcetera to 0.10: \
- https://github.com/tree-sitter/tree-sitter/pull/4392; allow etcetera 0.11, \
- downstream for now because updating upstream would increase MSRV to 1.87\
- """,
- "Update fs4 to 0.13",
]
-license-files = { include = ["LICENSE"] }
-[[package.extra-sources]]
-comments = ["Upstream license file - tree-sitter/tree-sitter#1520"]
-file = "https://github.com/tree-sitter/tree-sitter/raw/v%{version}/LICENSE#/LICENSE.upstream"
+[[package.extra-patches]]
+comments = ["Replace fs4 with std file locking (tree-sitter/tree-sitter#5326)"]
+file = "loader-replace-fs4-with-std-file-locking.patch"
number = 2
[features]
hide = ["wasm"]
-
-[scripts.prep]
-post = [
- "cp -pav %{SOURCE2} LICENSE"
-]
diff --git a/sources b/sources
index 99428a0..d3a2927 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tree-sitter-loader-0.25.10.crate) = 8dcdca87404428a79c639d85423b2e9ce5eb066faeaa9ed251aa406c17e61882f40723cf8c053543ded668345e51c07fd42fd9fa3c3f9468ffd5c0c678c48379
+SHA512 (tree-sitter-loader-0.26.9.crate) = b909ae47ef8e86c8d48760c1b5dd60fa75e5f8df3be4a9ccdeb0d064ba91cf976f025f848f1438aacc7535f0c86b793982a0c48a60d04de6aabdea880926a99a
diff --git a/tree-sitter-loader-fix-metadata.diff b/tree-sitter-loader-fix-metadata.diff
index 27e6ce9..f2f40d5 100644
--- a/tree-sitter-loader-fix-metadata.diff
+++ b/tree-sitter-loader-fix-metadata.diff
@@ -1,6 +1,6 @@
---- tree-sitter-loader-0.25.10/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ tree-sitter-loader-0.25.10/Cargo.toml 2025-11-01T21:14:56.216668+00:00
-@@ -50,7 +50,7 @@
+--- tree-sitter-loader-0.26.9/Cargo.toml 2006-07-24T01:21:28+00:00
++++ tree-sitter-loader-0.26.9/Cargo.toml 2026-05-29T06:16:53.254695+00:00
+@@ -51,7 +51,7 @@
"tree-sitter-highlight",
"tree-sitter-tags",
]
@@ -9,16 +9,19 @@
[lib]
name = "tree_sitter_loader"
-@@ -63,10 +63,10 @@
- version = "1.2.10"
-
+@@ -63,14 +63,11 @@
[dependencies.etcetera]
--version = "0.8.0"
-+version = ">=0.10.0, <0.12.0"
+ version = "0.11.0"
- [dependencies.fs4]
+-[dependencies.fs4]
-version = "0.12.0"
-+version = "0.13.0"
-
+-
[dependencies.indoc]
- version = "2.0.5"
+ version = "2.0.6"
+
+ [dependencies.libloading]
+-version = "0.9.0"
++version = ">=0.8.9,<0.10"
+
+ [dependencies.log]
+ version = "0.4.28"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-03 8:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03 8:05 [rpms/rust-tree-sitter-loader] f44: Update to version 0.26.9; Fixes RHBZ#2420891 Aleksei Bavshin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox