From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Gerd Hoffmann" <kraxel@redhat.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Alexandre Ratchov" <alex@caoua.org>,
dirty.ice.hu@gmail.com,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Volker Rümelin" <vr_qemu@t-online.de>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [RFC 01/24] rust: patch thiserror to work with meson
Date: Mon, 1 Dec 2025 15:22:42 +0400 [thread overview]
Message-ID: <20251201112309.4163921-2-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20251201112309.4163921-1-marcandre.lureau@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Some dependencies introduced in the following patches require thiserror.
Since 2.0.17, it "Use differently named __private module per patch
release", using build.rs time generated code. This is not handled by meson.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
.../packagefiles/syn-2-rs/meson/meson.build | 3 +++
.../packagefiles/thiserror-2.0.17-include.patch | 14 ++++++++++++++
.../thiserror-impl-2.0.17-include.patch | 13 +++++++++++++
subprojects/syn-2-rs.wrap | 11 ++++++-----
subprojects/thiserror-2-rs.wrap | 10 ++++++++++
subprojects/thiserror-impl-2-rs.wrap | 10 ++++++++++
6 files changed, 56 insertions(+), 5 deletions(-)
create mode 100644 subprojects/packagefiles/syn-2-rs/meson/meson.build
create mode 100644 subprojects/packagefiles/thiserror-2.0.17-include.patch
create mode 100644 subprojects/packagefiles/thiserror-impl-2.0.17-include.patch
create mode 100644 subprojects/thiserror-2-rs.wrap
create mode 100644 subprojects/thiserror-impl-2-rs.wrap
diff --git a/subprojects/packagefiles/syn-2-rs/meson/meson.build b/subprojects/packagefiles/syn-2-rs/meson/meson.build
new file mode 100644
index 0000000000..02439c2b58
--- /dev/null
+++ b/subprojects/packagefiles/syn-2-rs/meson/meson.build
@@ -0,0 +1,3 @@
+extra_args += [
+ '--cfg', 'feature="full"',
+]
diff --git a/subprojects/packagefiles/thiserror-2.0.17-include.patch b/subprojects/packagefiles/thiserror-2.0.17-include.patch
new file mode 100644
index 0000000000..a061aeea57
--- /dev/null
+++ b/subprojects/packagefiles/thiserror-2.0.17-include.patch
@@ -0,0 +1,14 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 155272d..7683f4c 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -288,4 +288,8 @@ pub use thiserror_impl::*;
+
+ mod private;
+
+-include!(concat!(env!("OUT_DIR"), "/private.rs"));
++#[doc(hidden)]
++pub mod __private_MESON {
++ #[doc(hidden)]
++ pub use crate::private::*;
++}
diff --git a/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch b/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch
new file mode 100644
index 0000000000..372862dffa
--- /dev/null
+++ b/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch
@@ -0,0 +1,13 @@
+diff --git a/impl/src/lib.rs b/impl/src/lib.rs
+index 25890f2..1559a41 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -48,7 +48,7 @@ struct private;
+ impl ToTokens for private {
+ fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
+ tokens.append(Ident::new(
+- concat!("__private", env!("CARGO_PKG_VERSION_PATCH")),
++ concat!("__private", "_MESON"),
+ Span::call_site(),
+ ));
+ }
diff --git a/subprojects/syn-2-rs.wrap b/subprojects/syn-2-rs.wrap
index 8ec7fd0052..82675e8723 100644
--- a/subprojects/syn-2-rs.wrap
+++ b/subprojects/syn-2-rs.wrap
@@ -1,9 +1,10 @@
[wrap-file]
-directory = syn-2.0.104
-source_url = https://crates.io/api/v1/crates/syn/2.0.104/download
-source_filename = syn-2.0.104.0.tar.gz
-source_hash = 17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40
+directory = syn-2.0.110
+source_url = https://crates.io/api/v1/crates/syn/2.0.110/download
+source_filename = syn-2.0.110.tar.gz
+source_hash = a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea
method = cargo
+patch_directory = syn-2-rs
# bump this version number on every change to meson.build or the patches:
-# v3
+# v4
diff --git a/subprojects/thiserror-2-rs.wrap b/subprojects/thiserror-2-rs.wrap
new file mode 100644
index 0000000000..432d99d937
--- /dev/null
+++ b/subprojects/thiserror-2-rs.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = thiserror-2.0.17
+source_url = https://crates.io/api/v1/crates/thiserror/2.0.17/download
+source_filename = thiserror-2.0.17.tar.gz
+source_hash = f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8
+method = cargo
+diff_files = thiserror-2.0.17-include.patch
+
+# bump this version number on every change to meson.build or the patches:
+# v2
diff --git a/subprojects/thiserror-impl-2-rs.wrap b/subprojects/thiserror-impl-2-rs.wrap
new file mode 100644
index 0000000000..f0eb263607
--- /dev/null
+++ b/subprojects/thiserror-impl-2-rs.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = thiserror-impl-2.0.17
+source_url = https://crates.io/api/v1/crates/thiserror-impl/2.0.17/download
+source_filename = thiserror-impl-2.0.17.tar.gz
+source_hash = 3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913
+method = cargo
+diff_files = thiserror-impl-2.0.17-include.patch
+
+# bump this version number on every change to meson.build or the patches:
+# v2
--
2.51.1
next prev parent reply other threads:[~2025-12-01 11:24 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 11:22 [RFC 00/24] audio: add GStreamer backend marcandre.lureau
2025-12-01 11:22 ` marcandre.lureau [this message]
2025-12-01 11:22 ` [RFC 02/24] audio: remove obsolete/obscure functions marcandre.lureau
2025-12-10 14:02 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 03/24] audio/dbus: make "dbus" the default backend when using -display dbus marcandre.lureau
2025-12-10 14:03 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 04/24] qemu-options.hx: clarify default audio backend selection marcandre.lureau
2025-12-01 11:22 ` [RFC 05/24] audio: introduce AudioDriver marcandre.lureau
2025-12-11 5:22 ` Akihiko Odaki
2025-12-01 11:22 ` [RFC 06/24] audio: simplify audio_init() marcandre.lureau
2025-12-01 11:22 ` [RFC 07/24] audio: move object creation to audio_driver_init() marcandre.lureau
2025-12-01 11:22 ` [RFC 08/24] audio: add QOM module-objects for each backend marcandre.lureau
2025-12-01 13:20 ` BALATON Zoltan
2025-12-01 18:43 ` Marc-André Lureau
2025-12-01 11:22 ` [RFC 09/24] audio: remove set_dbus_server from audio_driver marcandre.lureau
2025-12-01 11:22 ` [RFC 10/24] audio: lookup "audio-" object types, and realize them marcandre.lureau
2025-12-01 11:22 ` [RFC 11/24] audio: switch to module-object, drop audio driver registration marcandre.lureau
2025-12-01 11:22 ` [RFC 12/24] module: remove audio module support marcandre.lureau
2025-12-01 11:22 ` [RFC 13/24] audio: keep a strong reference on the backend marcandre.lureau
2025-12-01 11:22 ` [RFC 14/24] audio: make list type declaration private marcandre.lureau
2025-12-01 11:22 ` [RFC 15/24] audio: make create_pdos() private marcandre.lureau
2025-12-01 11:22 ` [RFC 16/24] replay: remove dependency on audio/ marcandre.lureau
2025-12-01 11:22 ` [RFC 17/24] audio: make all the backend-specific APIs take the be marcandre.lureau
2025-12-01 11:22 ` [RFC 18/24] audio: make AudioBackend truely abstract marcandre.lureau
2025-12-01 11:23 ` [RFC 19/24] audio: split AudioBackend marcandre.lureau
2025-12-01 11:23 ` [RFC 20/24] audio: AUD_ -> audio_be_ marcandre.lureau
2025-12-01 11:23 ` [RFC 21/24] audio-be: add common pre-conditions marcandre.lureau
2025-12-01 11:23 ` [RFC 22/24] audio-be: add some state trace marcandre.lureau
2025-12-01 11:23 ` [RFC 23/24] audio: split AudioDriver code in audio-driver.c marcandre.lureau
2025-12-01 11:23 ` [RFC 24/24] WIP: rust/audio: add GStreamer backend marcandre.lureau
2025-12-01 13:12 ` Markus Armbruster
2025-12-01 18:26 ` Marc-André Lureau
2025-12-01 13:02 ` [RFC 00/24] audio: " BALATON Zoltan
2025-12-01 13:41 ` Christian Schoenebeck
2025-12-01 18:20 ` Marc-André Lureau
2025-12-01 19:30 ` BALATON Zoltan
2025-12-01 19:44 ` Daniel P. Berrangé
2025-12-02 12:01 ` BALATON Zoltan
2025-12-01 20:58 ` Alexandre Ratchov
2025-12-02 7:55 ` Paolo Bonzini
2025-12-02 12:03 ` BALATON Zoltan
2025-12-02 12:25 ` Geoffrey McRae
2025-12-02 12:44 ` Marc-André Lureau
2025-12-02 13:25 ` Geoffrey McRae
2025-12-02 14:14 ` Marc-André Lureau
2025-12-02 14:33 ` Neal Gompa
2025-12-02 14:43 ` Geoffrey McRae
2025-12-02 14:52 ` Markus Armbruster
2025-12-03 9:19 ` Akihiko Odaki
2025-12-02 15:39 ` Christian Schoenebeck
2025-12-03 8:06 ` Alexandre Ratchov
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=20251201112309.4163921-2-marcandre.lureau@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=alex@caoua.org \
--cc=dirty.ice.hu@gmail.com \
--cc=huth@tuxfamily.org \
--cc=kraxel@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=vr_qemu@t-online.de \
/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;
as well as URLs for NNTP newsgroup(s).