Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package tree-sitter-rpmspec for
openSUSE:Factory checked in at 2026-05-07 15:45:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tree-sitter-rpmspec (Old)
and /work/SRC/openSUSE:Factory/.tree-sitter-rpmspec.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tree-sitter-rpmspec"
Thu May 7 15:45:49 2026 rev:5 rq:1351384 version:0+20260218.12ca618
Changes:
--------
--- /work/SRC/openSUSE:Factory/tree-sitter-rpmspec/tree-sitter-rpmspec.changes
2026-04-30 20:33:35.354646055 +0200
+++
/work/SRC/openSUSE:Factory/.tree-sitter-rpmspec.new.1966/tree-sitter-rpmspec.changes
2026-05-07 15:47:23.857090001 +0200
@@ -1,0 +2,9 @@
+Mon May 4 21:17:42 UTC 2026 - Matej Cepl <[email protected]>
+
+- Add build-fix-bindings.patch (see
+ gl#cryptomilk/tree-sitter-rpmspec!85), which fixes
+ multi-grammar support in language bindings.
+- Install also tree-sitter queries for use by Neovim (among other
+ clients).
+
+-------------------------------------------------------------------
New:
----
build-fix-bindings.patch
----------(New B)----------
New:
- Add build-fix-bindings.patch (see
gl#cryptomilk/tree-sitter-rpmspec!85), which fixes
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tree-sitter-rpmspec.spec ++++++
--- /var/tmp/diff_new_pack.SjLMdv/_old 2026-05-07 15:47:24.465115057 +0200
+++ /var/tmp/diff_new_pack.SjLMdv/_new 2026-05-07 15:47:24.469115222 +0200
@@ -25,6 +25,9 @@
URL: https://gitlab.com/cryptomilk/tree-sitter-rpmspec
Source0: %{name}-%{version}.tar.gz
Patch1: 0001-fix-binding.gyp-correctly-list-source-files.patch
+# PATCH-FIX-UPSTREAM build-fix-bindings.patch
gl#cryptomilk/tree-sitter-rpmspec!85 [email protected]
+# multi-grammar support in language bindings
+Patch2: build-fix-bindings.patch
BuildRequires: tree-sitter
# For rpmbash grammar
BuildRequires: treesitter_grammar_src(tree-sitter-bash)
@@ -34,7 +37,7 @@
%{summary}.
%prep
-%autosetup
+%autosetup -p1
%build
%treesitter_configure
@@ -43,10 +46,17 @@
%install
%treesitter_install
%treesitter_devel_install
+# Manual installation of queries as the macros don't handle them for
sub-grammars
+for grammar in %{_name} rpmbash; do
+ install -d %{buildroot}%{_datadir}/tree-sitter/queries/$grammar
+ install -m 0644 $grammar/queries/*.scm
%{buildroot}%{_datadir}/tree-sitter/queries/$grammar/
+done
%files
%license LICENSE
%treesitter_files
+%dir %{_datadir}/tree-sitter
+%{_datadir}/tree-sitter/queries/
%treesitter_devel_package
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.SjLMdv/_old 2026-05-07 15:47:24.517117201 +0200
+++ /var/tmp/diff_new_pack.SjLMdv/_new 2026-05-07 15:47:24.525117530 +0200
@@ -1,6 +1,6 @@
-mtime: 1773944947
-commit: e5f98f3fe7cff72dc05ba79c7a509fb9664853f8d76065b43fec91b0f6589730
+mtime: 1777929582
+commit: 87ccc1a317351c19784e7d5549e8c05c1efc659cd38c8a17ec2e7f1d4e06974d
url: https://src.opensuse.org/tree-sitter/tree-sitter-rpmspec
-revision: e5f98f3fe7cff72dc05ba79c7a509fb9664853f8d76065b43fec91b0f6589730
+revision: 87ccc1a317351c19784e7d5549e8c05c1efc659cd38c8a17ec2e7f1d4e06974d
projectscmsync: https://src.opensuse.org/tree-sitter/_ObsPrj
++++++ build-fix-bindings.patch ++++++
---
Cargo.toml | 9 +++--
bindings/node/binding.cc | 16 +++++++-
bindings/python/tree_sitter_rpmspec/__init__.py | 4 +-
bindings/python/tree_sitter_rpmspec/binding.c | 13 ++++++-
bindings/rust/build.rs | 43 ++++++------------------
bindings/rust/lib.rs | 9 +++--
setup.py | 5 +-
7 files changed, 52 insertions(+), 47 deletions(-)
Index: tree-sitter-rpmspec-0+20260218.12ca618/Cargo.toml
===================================================================
--- tree-sitter-rpmspec-0+20260218.12ca618.orig/Cargo.toml 2026-02-18
00:10:58.000000000 +0100
+++ tree-sitter-rpmspec-0+20260218.12ca618/Cargo.toml 2026-05-01
22:28:34.652613389 +0200
@@ -11,9 +11,12 @@
build = "bindings/rust/build.rs"
include = [
"bindings/rust/*",
- "grammar.js",
- "queries/*",
- "src/*",
+ "rpmspec/grammar.js",
+ "rpmspec/queries/*",
+ "rpmspec/src/*",
+ "rpmbash/grammar.js",
+ "rpmbash/queries/*",
+ "rpmbash/src/*",
]
[lib]
Index: tree-sitter-rpmspec-0+20260218.12ca618/bindings/node/binding.cc
===================================================================
--- tree-sitter-rpmspec-0+20260218.12ca618.orig/bindings/node/binding.cc
2026-02-18 00:10:58.000000000 +0100
+++ tree-sitter-rpmspec-0+20260218.12ca618/bindings/node/binding.cc
2026-05-01 23:11:26.701650891 +0200
@@ -3,6 +3,7 @@
typedef struct TSLanguage TSLanguage;
extern "C" TSLanguage *tree_sitter_rpmspec();
+extern "C" TSLanguage *tree_sitter_rpmbash();
// "tree-sitter", "language" hashed with BLAKE2
const napi_type_tag LANGUAGE_TYPE_TAG = {
@@ -11,9 +12,18 @@
Napi::Object Init(Napi::Env env, Napi::Object exports) {
exports["name"] = Napi::String::New(env, "rpmspec");
- auto language = Napi::External<TSLanguage>::New(env,
tree_sitter_rpmspec());
- language.TypeTag(&LANGUAGE_TYPE_TAG);
- exports["language"] = language;
+
+ auto rpmspec = Napi::External<TSLanguage>::New(env, tree_sitter_rpmspec());
+ rpmspec.TypeTag(&LANGUAGE_TYPE_TAG);
+ exports["rpmspec"] = rpmspec;
+
+ auto rpmbash = Napi::External<TSLanguage>::New(env, tree_sitter_rpmbash());
+ rpmbash.TypeTag(&LANGUAGE_TYPE_TAG);
+ exports["rpmbash"] = rpmbash;
+
+ // For backward compatibility
+ exports["language"] = rpmspec;
+
return exports;
}
Index:
tree-sitter-rpmspec-0+20260218.12ca618/bindings/python/tree_sitter_rpmspec/__init__.py
===================================================================
---
tree-sitter-rpmspec-0+20260218.12ca618.orig/bindings/python/tree_sitter_rpmspec/__init__.py
2026-02-18 00:10:58.000000000 +0100
+++
tree-sitter-rpmspec-0+20260218.12ca618/bindings/python/tree_sitter_rpmspec/__init__.py
2026-05-01 23:11:26.702466461 +0200
@@ -1,5 +1,5 @@
"Rpmspec grammar for tree-sitter"
-from ._binding import language
+from ._binding import rpmspec, rpmbash, language
-__all__ = ["language"]
+__all__ = ["rpmspec", "rpmbash", "language"]
Index:
tree-sitter-rpmspec-0+20260218.12ca618/bindings/python/tree_sitter_rpmspec/binding.c
===================================================================
---
tree-sitter-rpmspec-0+20260218.12ca618.orig/bindings/python/tree_sitter_rpmspec/binding.c
2026-02-18 00:10:58.000000000 +0100
+++
tree-sitter-rpmspec-0+20260218.12ca618/bindings/python/tree_sitter_rpmspec/binding.c
2026-05-01 23:11:26.702559747 +0200
@@ -3,11 +3,16 @@
typedef struct TSLanguage TSLanguage;
TSLanguage *tree_sitter_rpmspec(void);
+TSLanguage *tree_sitter_rpmbash(void);
-static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject
*Py_UNUSED(args)) {
+static PyObject* _binding_language_rpmspec(PyObject *Py_UNUSED(self), PyObject
*Py_UNUSED(args)) {
return PyCapsule_New(tree_sitter_rpmspec(), "tree_sitter.Language", NULL);
}
+static PyObject* _binding_language_rpmbash(PyObject *Py_UNUSED(self), PyObject
*Py_UNUSED(args)) {
+ return PyCapsule_New(tree_sitter_rpmbash(), "tree_sitter.Language", NULL);
+}
+
static struct PyModuleDef_Slot slots[] = {
#ifdef Py_GIL_DISABLED
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
@@ -16,7 +21,11 @@
};
static PyMethodDef methods[] = {
- {"language", _binding_language, METH_NOARGS,
+ {"rpmspec", _binding_language_rpmspec, METH_NOARGS,
+ "Get the tree-sitter language for rpmspec."},
+ {"rpmbash", _binding_language_rpmbash, METH_NOARGS,
+ "Get the tree-sitter language for rpmbash."},
+ {"language", _binding_language_rpmspec, METH_NOARGS,
"Get the tree-sitter language for this grammar."},
{NULL, NULL, 0, NULL}
};
Index: tree-sitter-rpmspec-0+20260218.12ca618/bindings/rust/build.rs
===================================================================
--- tree-sitter-rpmspec-0+20260218.12ca618.orig/bindings/rust/build.rs
2026-02-18 00:10:58.000000000 +0100
+++ tree-sitter-rpmspec-0+20260218.12ca618/bindings/rust/build.rs
2026-05-01 22:28:34.652613389 +0200
@@ -1,8 +1,5 @@
fn main() {
- let src_dir = std::path::Path::new("src");
-
let mut c_config = cc::Build::new();
- c_config.include(&src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable")
@@ -10,34 +7,16 @@
#[cfg(target_env = "msvc")]
c_config.flag("-utf-8");
- let parser_path = src_dir.join("parser.c");
- c_config.file(&parser_path);
-
- // If your language uses an external scanner written in C,
- // then include this block of code:
-
- /*
- let scanner_path = src_dir.join("scanner.c");
- c_config.file(&scanner_path);
- println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
- */
+ for grammar in ["rpmspec", "rpmbash"] {
+ let src_dir = std::path::Path::new(grammar).join("src");
+ c_config.include(&src_dir);
+ let parser_path = src_dir.join("parser.c");
+ let scanner_path = src_dir.join("scanner.c");
+ c_config.file(&parser_path);
+ c_config.file(&scanner_path);
+ println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
+ println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
+ }
- c_config.compile("parser");
- println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
-
- // If your language uses an external scanner written in C++,
- // then include this block of code:
-
- /*
- let mut cpp_config = cc::Build::new();
- cpp_config.cpp(true);
- cpp_config.include(&src_dir);
- cpp_config
- .flag_if_supported("-Wno-unused-parameter")
- .flag_if_supported("-Wno-unused-but-set-variable");
- let scanner_path = src_dir.join("scanner.cc");
- cpp_config.file(&scanner_path);
- cpp_config.compile("scanner");
- println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
- */
+ c_config.compile("tree-sitter-rpmspec");
}
Index: tree-sitter-rpmspec-0+20260218.12ca618/bindings/rust/lib.rs
===================================================================
--- tree-sitter-rpmspec-0+20260218.12ca618.orig/bindings/rust/lib.rs
2026-02-18 00:10:58.000000000 +0100
+++ tree-sitter-rpmspec-0+20260218.12ca618/bindings/rust/lib.rs 2026-05-01
22:28:34.652613389 +0200
@@ -24,15 +24,18 @@
extern "C" {
fn tree_sitter_rpmspec() -> *const ();
+ fn tree_sitter_rpmbash() -> *const ();
}
-/// The tree-sitter [`LanguageFn`] for this grammar.
-pub const LANGUAGE: LanguageFn = unsafe {
LanguageFn::from_raw(tree_sitter_rpmspec) };
+pub const LANGUAGE_RPMSPEC: LanguageFn = unsafe {
LanguageFn::from_raw(tree_sitter_rpmspec) };
+pub const LANGUAGE_RPMBASH: LanguageFn = unsafe {
LanguageFn::from_raw(tree_sitter_rpmbash) };
+
+pub const LANGUAGE: LanguageFn = LANGUAGE_RPMSPEC;
/// The content of the [`node-types.json`][] file for this grammar.
///
/// [`node-types.json`]:
https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
-pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");
+pub const NODE_TYPES: &str = include_str!("../../rpmspec/src/node-types.json");
// NOTE: uncomment these to include any queries that this grammar contains:
Index: tree-sitter-rpmspec-0+20260218.12ca618/setup.py
===================================================================
--- tree-sitter-rpmspec-0+20260218.12ca618.orig/setup.py 2026-02-18
00:10:58.000000000 +0100
+++ tree-sitter-rpmspec-0+20260218.12ca618/setup.py 2026-05-01
23:11:26.702683540 +0200
@@ -57,13 +57,14 @@
name="_binding",
sources=[
"bindings/python/tree_sitter_rpmspec/binding.c",
- "src/parser.c",
+ "rpmspec/src/parser.c",
+ "rpmbash/src/parser.c",
],
define_macros=[
("PY_SSIZE_T_CLEAN", None),
("TREE_SITTER_HIDE_SYMBOLS", None),
],
- include_dirs=["src"],
+ include_dirs=["rpmspec/src", "rpmbash/src"],
py_limited_api=not get_config_var("Py_GIL_DISABLED"),
)
],
++++++ build.specials.obscpio ++++++
--- old/.gitignore 2026-03-20 11:01:54.000000000 +0100
+++ new/.gitignore 2026-05-04 23:19:42.000000000 +0200
@@ -2,3 +2,4 @@
*.osc
_build.*
.pbuild
+tree-sitter-rpmspec-*-build/
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-05-04 23:19:42.000000000 +0200
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild
+tree-sitter-rpmspec-*-build/