public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mark Wielaard <mjw@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix rpmfd_write on big endian arches.
Date: Mon, 23 Nov 2026 09:31:14 GMT	[thread overview]
Message-ID: <179542627483.1.16007091611879178040.rpms-rpm-ce3660feb692@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : ce3660feb692ab0e5271c9b627edce46843d75d5
Author : Mark Wielaard <mjw@fedoraproject.org>
Date   : 2017-07-23T23:53:57+02:00
Stats  : +54/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/ce3660feb692ab0e5271c9b627edce46843d75d5?branch=pmatilai-v6

Log:
Fix rpmfd_write on big endian arches.

---
diff --git a/0058-Define-PY_SSIZE_T_CLEAN.patch b/0058-Define-PY_SSIZE_T_CLEAN.patch
new file mode 100644
index 0000000..5e145c5
--- /dev/null
+++ b/0058-Define-PY_SSIZE_T_CLEAN.patch
@@ -0,0 +1,31 @@
+From ff1be07909a9e78295f416b3535dc6aaecbc0350 Mon Sep 17 00:00:00 2001
+From: Lubos Kardos <lkardos@redhat.com>
+Date: Fri, 18 Sep 2015 15:29:25 +0200
+Subject: [PATCH] Define PY_SSIZE_T_CLEAN
+
+When PyArg_ParseTupleAndKeywords() is used with format argument "s#"
+that means get a string and his length then the length is returned as
+as a Py_ssize_t in python3 but as an int in python2, which casues
+a problem because rpmfd_write() that uses PyArg_ParseTupleAndKeywords()
+expects the length as a Py_ssize_t always. This problem affects big
+endian systems with python2 as default. If PY_SSIZE_T_CLEAN is defined
+then PyArg_ParseTupleAndKeywords() returns the length as a Py_ssize_t
+in both python2 and python3.
+
+(cherry picked from commit f0a58d1dced6215b7caaa70db17d54834e0cd44e)
+---
+ python/rpmsystem-py.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h
+index 50e8770..c8423e3 100644
+--- a/python/rpmsystem-py.h
++++ b/python/rpmsystem-py.h
+@@ -5,6 +5,7 @@
+ #include <sys/types.h>
+ #endif
+ 
++#define PY_SSIZE_T_CLEAN
+ #include <Python.h>
+ #include <structmember.h>
+ 

diff --git a/0059-Fix-error-handling-in-rpmio-Python-binding-test-case.patch b/0059-Fix-error-handling-in-rpmio-Python-binding-test-case.patch
new file mode 100644
index 0000000..5c3df7a
--- /dev/null
+++ b/0059-Fix-error-handling-in-rpmio-Python-binding-test-case.patch
@@ -0,0 +1,23 @@
+From 788eaf73c9b09cc86724264f7558568374b6eb9f Mon Sep 17 00:00:00 2001
+From: Florian Festi <ffesti@redhat.com>
+Date: Wed, 23 Sep 2015 11:30:12 +0200
+Subject: [PATCH] Fix error handling in rpmio Python binding test case
+
+(cherry picked from commit 3c74e34e8d8c5b3db024dbe04a352e807ed2b627)
+---
+ tests/rpmpython.at | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/rpmpython.at b/tests/rpmpython.at
+index 949673b..eac31b2 100644
+--- a/tests/rpmpython.at
++++ b/tests/rpmpython.at
+@@ -53,7 +53,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'gzdio' ]:
+     fd = rpm.fd(fn, 'r', iot)
+     rdata = fd.read()
+     if rdata != data:
+-        myprint('%s read fail (got %d bytes)' % (iot, len(rdata), rdata))
++        myprint('%s read fail (got %d bytes)\n%s' % (iot, len(rdata), rdata))
+     # compressed io types can't seek
+     if iot == 'ufdio':
+         fd.seek(0)

                 reply	other threads:[~2026-11-23  9:31 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=179542627483.1.16007091611879178040.rpms-rpm-ce3660feb692@fedoraproject.org \
    --to=mjw@fedoraproject.org \
    --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