public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mattia Verga <mattia.verga@proton.me>
To: git-commits@fedoraproject.org
Subject: [rpms/libXISF] rawhide: Fix build on s390x
Date: Sun, 01 Nov 2026 07:59:52 GMT	[thread overview]
Message-ID: <179351999220.1.8764693856911931323.rpms-libXISF-9c3041beba06@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libXISF
Branch : rawhide
Commit : 9c3041beba061e4147107ab1f1eb24ed1d38130c
Author : Mattia Verga <mattia.verga@proton.me>
Date   : 2026-11-01T08:59:13+01:00
Stats  : +54/-3 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libXISF/c/9c3041beba061e4147107ab1f1eb24ed1d38130c?branch=rawhide

Log:
Fix build on s390x

---
diff --git a/053c794.patch b/053c794.patch
new file mode 100644
index 0000000..f88f77b
--- /dev/null
+++ b/053c794.patch
@@ -0,0 +1,47 @@
+From 053c794ce9f464aa478e64de664fa1d9048d5e5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Du=C5=A1an=20Poizl?= <nou.spiro@gmail.com>
+Date: Sat, 31 Oct 2026 21:00:18 +0100
+Subject: [PATCH] Read and write header size as little endian
+
+---
+ libxisf.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libxisf.cpp b/libxisf.cpp
+index d64b142..59a0a5a 100644
+--- a/libxisf.cpp
++++ b/libxisf.cpp
+@@ -904,6 +904,8 @@ void XISFReaderPrivate::readXISFHeader()
+ {
+     uint32_t headerLen[2] = {0};
+     _io->read((char*)&headerLen, sizeof(headerLen));
++    headerLen[0] = le32toh(headerLen[0]);
++    headerLen[1] = le32toh(headerLen[1]);
+ 
+     ByteArray xisfHeader(headerLen[0]);
+     _io->read(xisfHeader.data(), headerLen[0]);
+@@ -1249,6 +1251,7 @@ void XISFWriterPrivate::writeHeader()
+     }
+ 
+     uint32_t headerSize = header.size() - sizeof(signature);
++    headerSize = htole32(headerSize);
+     header.replace(8, sizeof(uint32_t), (const char*)&headerSize, sizeof(uint32_t));
+ 
+     _xisfHeader = ByteArray(header.c_str(), header.size());
+@@ -1605,6 +1608,7 @@ void XISFModifyPrivate::save(std::ostream &io)
+     }
+ 
+     uint32_t headerSize = header.size() - sizeof(signature);
++    headerSize = htole32(headerSize);
+     header.replace(8, sizeof(uint32_t), (const char*)&headerSize, sizeof(uint32_t));
+ 
+     io.write(header.c_str(), header.size());
+@@ -1753,6 +1757,8 @@ void XISFModifyPrivate::readXISFHeader()
+ 
+     uint32_t headerLen[2] = {0};
+     _io->read((char*)&headerLen, sizeof(headerLen));
++    headerLen[0] = le32toh(headerLen[0]);
++    headerLen[1] = le32toh(headerLen[1]);
+ 
+     ByteArray xisfHeader(headerLen[0]);
+     _io->read(xisfHeader.data(), headerLen[0]);

diff --git a/libXISF.spec b/libXISF.spec
index 88dfac0..a7ac740 100644
--- a/libXISF.spec
+++ b/libXISF.spec
@@ -2,8 +2,6 @@
 # all packages requiring libXISF are now disabled on i686
 ExcludeArch:    %{ix86}
 
-%global sover 0.2.14
-
 Name:           libXISF
 Version:        0.2.15
 Release:        %autorelease
@@ -12,6 +10,9 @@ License:        GPL-3.0-or-later
 URL:            https://gitea.nouspiro.space/nou/libXISF
 Source0:        %{url}/archive/v%{version}.tar.gz
 
+# Backport upstream patch to fix s390x build
+Patch:          053c794.patch
+
 BuildRequires:  cmake >= 3.14
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
@@ -39,6 +40,9 @@ developing applications that use %{name}.
 %prep
 %autosetup -p1 -n libxisf
 
+# Fix project version, upstream missed to update it
+sed -i 's/libXISF VERSION 0.2.14/libXISF VERSION 0.2.15/g' ./CMakeLists.txt
+
 # remove bundled libraries
 for d in "lz4" "pugixml" "zlib"
 do
@@ -65,7 +69,7 @@ done
 %license LICENSE
 %doc README.md
 %{_libdir}/%{name}.so.0
-%{_libdir}/%{name}.so.%{sover}
+%{_libdir}/%{name}.so.%{version}
 
 
 %files devel

                 reply	other threads:[~2026-11-01  7:59 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=179351999220.1.8764693856911931323.rpms-libXISF-9c3041beba06@fedoraproject.org \
    --to=mattia.verga@proton.me \
    --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