public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Fabio Valentini <decathorpe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-zvariant] rawhide: Backport fix for tests on big-endian architectures
Date: Wed, 23 Sep 2026 23:36:43 GMT [thread overview]
Message-ID: <179020660371.1.10523946460018857296.rpms-rust-zvariant-ef676cd8acb5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rust-zvariant
Branch : rawhide
Commit : ef676cd8acb500b604639bda7e5c23d99681a5d1
Author : Fabio Valentini <decathorpe@gmail.com>
Date : 2026-09-24T01:36:11+02:00
Stats : +52/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rust-zvariant/c/ef676cd8acb500b604639bda7e5c23d99681a5d1?branch=rawhide
Log:
Backport fix for tests on big-endian architectures
---
diff --git a/0001-backport-zv-Don-t-assume-little-endian-host-in-dict_.patch b/0001-backport-zv-Don-t-assume-little-endian-host-in-dict_.patch
new file mode 100644
index 0000000..85b3788
--- /dev/null
+++ b/0001-backport-zv-Don-t-assume-little-endian-host-in-dict_.patch
@@ -0,0 +1,50 @@
+From 7798676c131b1b18a2ca1070b7df50cfee5ce567 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Thu, 24 Sep 2026 01:17:46 +0200
+Subject: [PATCH] backport: zv: Don't assume little-endian host in dict_value
+ test
+
+Backport of upstream commit:
+https://github.com/z-galaxy/zbus/commit/5f32837
+---
+ tests/dict_value.rs | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/tests/dict_value.rs b/tests/dict_value.rs
+index fbc2914..65b37bf 100644
+--- a/tests/dict_value.rs
++++ b/tests/dict_value.rs
+@@ -4,8 +4,8 @@ use std::collections::{BTreeMap, HashMap};
+
+ use endi::NATIVE_ENDIAN;
+ use zvariant::{
+- DeserializeDict, Dict, OwnedObjectPath, SerializeDict, Str, Type, Value, as_value::optional,
+- serialized::Context, to_bytes,
++ DeserializeDict, Dict, LE, OwnedObjectPath, SerializeDict, Str, Type, Value,
++ as_value::optional, serialized::Context, to_bytes,
+ };
+
+ #[macro_use]
+@@ -119,7 +119,8 @@ fn dict_value() {
+ // Dict<u32, u8>
+ let mut map: HashMap<u32, u8> = HashMap::new();
+ map.insert(1, 2);
+- let encoded = to_bytes(ctxt, &map).unwrap();
++ // The byte order is explicit since the encoding is compared against hardcoded bytes.
++ let encoded = to_bytes(Context::new_dbus(LE, 0), &map).unwrap();
+ assert_eq!(
+ encoded.bytes(),
+ [
+@@ -132,7 +133,8 @@ fn dict_value() {
+ // GVariant format now
+ #[cfg(feature = "gvariant")]
+ {
+- let ctxt = Context::new_gvariant(NATIVE_ENDIAN, 0);
++ // Explicit byte order here too, for the same reason.
++ let ctxt = Context::new_gvariant(LE, 0);
+ let encoded = to_bytes(ctxt, &map).unwrap();
+ assert_eq!(
+ encoded.bytes(),
+--
+2.55.0
+
diff --git a/rust-zvariant.spec b/rust-zvariant.spec
index 57ade4a..1942194 100644
--- a/rust-zvariant.spec
+++ b/rust-zvariant.spec
@@ -15,6 +15,8 @@ Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * drop unused, benchmark-only codspeed-criterion-compat dev-dependency
Patch: zvariant-fix-metadata.diff
+# * https://github.com/z-galaxy/zbus/commit/5f32837
+Patch: 0001-backport-zv-Don-t-assume-little-endian-host-in-dict_.patch
BuildRequires: cargo-rpm-macros >= 24
reply other threads:[~2026-09-23 23:36 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=179020660371.1.10523946460018857296.rpms-rust-zvariant-ef676cd8acb5@fedoraproject.org \
--to=decathorpe@gmail.com \
--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