public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mattias Ellert <mattias.ellert@physics.uu.se>
To: git-commits@fedoraproject.org
Subject: [rpms/xrootd] epel8: Update to version 5.9.8
Date: Tue, 06 Oct 2026 19:44:08 GMT	[thread overview]
Message-ID: <179131584830.1.4751589292115021072.rpms-xrootd-b5f451ecaf74@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/xrootd
Branch : epel8
Commit : b5f451ecaf74410edd397da748c4dc935b7d25e6
Author : Mattias Ellert <mattias.ellert@physics.uu.se>
Date   : 2026-10-06T21:36:53+02:00
Stats  : +333/-2 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/xrootd/c/b5f451ecaf74410edd397da748c4dc935b7d25e6?branch=epel8

Log:
Update to version 5.9.8

---
diff --git a/0001-Python-Fix-parsing-of-enum-arguments-in-python-bindi.patch b/0001-Python-Fix-parsing-of-enum-arguments-in-python-bindi.patch
new file mode 100644
index 0000000..2d11691
--- /dev/null
+++ b/0001-Python-Fix-parsing-of-enum-arguments-in-python-bindi.patch
@@ -0,0 +1,243 @@
+From d4005e057943ad73e831b26300151f628ec5fb51 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Sat, 3 Oct 2026 23:51:59 +0200
+Subject: [PATCH 1/2] [Python] Fix parsing of enum arguments in python bindings
+
+The underlying type of an enum is not mandated by the C++ standard, so
+which format character to use when parsing an enum argument in the
+python bindings is not obvious. The code used 'H' (unsigned short int)
+for most of them. This does not match what is actually used by gcc -
+which is a 32 bit integer. For a little endian architecture it does
+not matter to much as long as the value fits in the 16 bit range since
+ignoring the last bytes in a little endian representation doesn't
+matter if the value is small enough (which is true for most enum
+values). However, for big endian architecture getting the size of the
+underlyimh type wrong results in parsing completely wrong values.
+
+This commit parses all enum arguments as 'I' (unsigned int) using a
+temporary unsigned int variable which is then cast to the enum type.
+
+This is a backport of the corresponding fix in XRootD 6.
+---
+ bindings/python/src/PyXRootDFile.cc       | 17 +++--
+ bindings/python/src/PyXRootDFileSystem.cc | 90 +++++++++++++++--------
+ 2 files changed, 73 insertions(+), 34 deletions(-)
+
+diff --git a/bindings/python/src/PyXRootDFile.cc b/bindings/python/src/PyXRootDFile.cc
+index 74faea96a..ef0f31d1e 100644
+--- a/bindings/python/src/PyXRootDFile.cc
++++ b/bindings/python/src/PyXRootDFile.cc
+@@ -40,17 +40,24 @@ namespace PyXRootD
+   {
+     static const char      *kwlist[] = { "url", "flags", "mode",
+                                          "timeout", "callback", NULL };
+-    const  char            *url;
+-    XrdCl::OpenFlags::Flags flags    = XrdCl::OpenFlags::None;
+-    XrdCl::Access::Mode     mode     = XrdCl::Access::None;
++    const char             *url;
++    unsigned int            flags_val =
++      static_cast<unsigned int>(XrdCl::OpenFlags::None);
++    unsigned int            mode_val =
++      static_cast<unsigned int>(XrdCl::Access::None);
+     uint16_t                timeout  = 0;
+     PyObject               *callback = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus     status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|HHHO:open",
+-         (char**) kwlist, &url, &flags, &mode, &timeout, &callback ) )
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|IIHO:open",
++         (char**) kwlist, &url, &flags_val, &mode_val, &timeout, &callback ) )
+       return NULL;
+ 
++    XrdCl::OpenFlags::Flags flags =
++      static_cast<XrdCl::OpenFlags::Flags>(flags_val);
++    XrdCl::Access::Mode mode =
++      static_cast<XrdCl::Access::Mode>(mode_val);
++
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::AnyObject>( callback );
+       if ( !handler ) return NULL;
+diff --git a/bindings/python/src/PyXRootDFileSystem.cc b/bindings/python/src/PyXRootDFileSystem.cc
+index a21148328..c507e6b4e 100644
+--- a/bindings/python/src/PyXRootDFileSystem.cc
++++ b/bindings/python/src/PyXRootDFileSystem.cc
+@@ -82,14 +82,19 @@ namespace PyXRootD
+   {
+     static const char      *kwlist[] = { "path", "flags", "timeout", "callback",
+                                          NULL };
+-    const  char            *path;
+-    XrdCl::OpenFlags::Flags flags    = XrdCl::OpenFlags::None;
++    const char             *path;
++    unsigned int            flags_val =
++      static_cast<unsigned int>(XrdCl::OpenFlags::None);
+     uint16_t                timeout  = 0;
+     PyObject               *callback = NULL, *pyresponse = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus     status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sH|HO:locate",
+-         (char**) kwlist, &path, &flags, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sI|HO:locate",
++         (char**) kwlist, &path, &flags_val, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::OpenFlags::Flags flags =
++      static_cast<XrdCl::OpenFlags::Flags>(flags_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::LocationInfo>( callback );
+@@ -120,14 +125,19 @@ namespace PyXRootD
+   {
+     static const char      *kwlist[] = { "path", "flags", "timeout", "callback",
+                                          NULL };
+-    const  char            *path;
+-    XrdCl::OpenFlags::Flags flags    = XrdCl::OpenFlags::PrefName;
++    const char             *path;
++    unsigned int            flags_val =
++      static_cast<unsigned int>(XrdCl::OpenFlags::PrefName);
+     uint16_t                timeout  = 0;
+     PyObject               *callback = NULL, *pyresponse = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus     status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sH|HO:deeplocate",
+-         (char**) kwlist, &path, &flags, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sI|HO:deeplocate",
++         (char**) kwlist, &path, &flags_val, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::OpenFlags::Flags flags =
++      static_cast<XrdCl::OpenFlags::Flags>(flags_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::LocationInfo>( callback );
+@@ -192,15 +202,19 @@ namespace PyXRootD
+   {
+     static const char     *kwlist[] = { "querycode", "arg", "timeout",
+                                         "callback", NULL };
+-    const  char           *arg;
++    unsigned int           queryCode_val;
++    const char            *arg;
+     uint16_t               timeout  = 0;
+     PyObject              *callback = NULL, *pyresponse = NULL, *pystatus = NULL;
+-    XrdCl::QueryCode::Code queryCode;
+     XrdCl::XRootDStatus    status;
+     XrdCl::Buffer          argbuffer;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "is|HO:query",
+-         (char**) kwlist, &queryCode, &arg, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "Is|HO:query",
++         (char**) kwlist, &queryCode_val, &arg, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::QueryCode::Code queryCode =
++      static_cast<XrdCl::QueryCode::Code>(queryCode_val);
+ 
+     argbuffer.FromString(arg);
+ 
+@@ -298,15 +312,23 @@ namespace PyXRootD
+   {
+     static const char       *kwlist[] = { "path", "flags", "mode", "timeout",
+                                           "callback", NULL };
+-    const  char             *path;
+-    XrdCl::MkDirFlags::Flags flags    = XrdCl::MkDirFlags::None;
+-    XrdCl::Access::Mode      mode     = XrdCl::Access::None;
++    const char              *path;
++    unsigned int             flags_val =
++      static_cast<unsigned int>(XrdCl::MkDirFlags::None);
++    unsigned int             mode_val =
++      static_cast<unsigned int>(XrdCl::Access::None);
+     uint16_t                 timeout  = 0;
+     PyObject                *callback = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus      status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|HHHO:mkdir", (char**) kwlist,
+-        &path, &flags, &mode, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|IIHO:mkdir",
++         (char**) kwlist, &path, &flags_val, &mode_val, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::MkDirFlags::Flags flags =
++      static_cast<XrdCl::MkDirFlags::Flags>(flags_val);
++    XrdCl::Access::Mode mode =
++      static_cast<XrdCl::Access::Mode>(mode_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::AnyObject>( callback );
+@@ -365,13 +387,18 @@ namespace PyXRootD
+   {
+     static const char  *kwlist[] = { "path", "mode", "timeout", "callback", NULL };
+     const  char        *path;
+-    XrdCl::Access::Mode mode     = XrdCl::Access::None;
++    unsigned int        mode_val =
++      static_cast<unsigned int>(XrdCl::Access::None);
+     uint16_t            timeout  = 0;
+     PyObject           *callback = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sH|HO:chmod", (char**) kwlist,
+-        &path, &mode, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "sI|HO:chmod",
++         (char**) kwlist, &path, &mode_val, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::Access::Mode mode =
++      static_cast<XrdCl::Access::Mode>(mode_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::AnyObject>( callback );
+@@ -536,14 +563,19 @@ namespace PyXRootD
+   {
+     static const char         *kwlist[] = { "path", "flags", "timeout",
+                                             "callback", NULL };
+-    const  char               *path;
+-    XrdCl::DirListFlags::Flags flags = XrdCl::DirListFlags::None;
++    const char                *path;
++    unsigned int               flags_val =
++      static_cast<unsigned int>(XrdCl::DirListFlags::None);
+     uint16_t                   timeout  = 0;
+     PyObject                  *callback = NULL, *pyresponse = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus        status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|bHO:dirlist",
+-         (char**) kwlist, &path, &flags, &timeout, &callback ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "s|IHO:dirlist",
++         (char**) kwlist, &path, &flags_val, &timeout, &callback ) )
++      return NULL;
++
++    XrdCl::DirListFlags::Flags flags =
++      static_cast<XrdCl::DirListFlags::Flags>(flags_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::DirectoryList>( callback );
+@@ -610,15 +642,15 @@ namespace PyXRootD
+   {
+     static const char         *kwlist[] = { "files", "flags", "priority",
+                                             "timeout", "callback", NULL };
+-    uint16_t                   flagval  = 0;
++    unsigned int               flags_val = 0;
+     uint8_t                    priority = 0;
+     uint16_t                   timeout  = 0;
+     PyObject                  *pyfiles = NULL, *callback = NULL;
+     PyObject                  *pyresponse = NULL, *pystatus = NULL;
+     XrdCl::XRootDStatus        status;
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "OH|bHO:prepare",
+-         (char**) kwlist, &pyfiles, &flagval, &priority, &timeout, &callback ) )
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "OI|bHO:prepare",
++         (char**) kwlist, &pyfiles, &flags_val, &priority, &timeout, &callback ) )
+       return NULL;
+ 
+     if ( !PyList_Check( pyfiles ) ) {
+@@ -639,8 +671,8 @@ namespace PyXRootD
+       files.emplace_back(PyUnicode_AsUTF8(item));
+     }
+ 
+-    XrdCl::PrepareFlags::Flags flags;
+-    flags = static_cast<XrdCl::PrepareFlags::Flags>(flagval);
++    XrdCl::PrepareFlags::Flags flags =
++      static_cast<XrdCl::PrepareFlags::Flags>(flags_val);
+ 
+     if ( callback && callback != Py_None ) {
+       XrdCl::ResponseHandler *handler = GetHandler<XrdCl::Buffer>( callback );
+-- 
+2.55.0
+

diff --git a/0002-Python-Fix-parsing-of-uint64_t-arguments-in-python-b.patch b/0002-Python-Fix-parsing-of-uint64_t-arguments-in-python-b.patch
new file mode 100644
index 0000000..5ed4da5
--- /dev/null
+++ b/0002-Python-Fix-parsing-of-uint64_t-arguments-in-python-b.patch
@@ -0,0 +1,78 @@
+From c6601f0961f6aedeb9616cc25e27553d2c21f12b Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert@physics.uu.se>
+Date: Tue, 6 Oct 2026 08:13:49 +0200
+Subject: [PATCH 2/2] [Python] Fix parsing of uint64_t arguments in python
+ bindings
+
+Previously the format "k" (unsigned long) was used for parsing
+uint64_t values. This is not correct on 32 bit architectures where
+unsigned long is 32 bits wide. This commit uses format "K" (unsigned
+long long) which is 64 bits wide on both 32 and 64 bit architectures.
+
+This is a backport of the corresponding fix in XRootD 6.
+---
+ bindings/python/src/Conversions.hh  | 8 ++++----
+ bindings/python/src/PyXRootDFile.cc | 6 +++---
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/bindings/python/src/Conversions.hh b/bindings/python/src/Conversions.hh
+index 5c52ab28e..862fb44ad 100644
+--- a/bindings/python/src/Conversions.hh
++++ b/bindings/python/src/Conversions.hh
+@@ -127,9 +127,9 @@ namespace PyXRootD
+       {
+         return Py_BuildValue("{sNsNsNsNsN}",
+             "id",         Py_BuildValue("s", info->GetId().c_str()),
+-            "size",       Py_BuildValue("k", info->GetSize()),
++            "size",       Py_BuildValue("K", info->GetSize()),
+             "flags",      Py_BuildValue("I", info->GetFlags()),
+-            "modtime",    Py_BuildValue("k", info->GetModTime()),
++            "modtime",    Py_BuildValue("K", info->GetModTime()),
+             "modtimestr", Py_BuildValue("s",
+                                         info->GetModTimeAsString().c_str()));
+       }
+@@ -139,7 +139,7 @@ namespace PyXRootD
+   {
+       static PyObject* Convert( XrdCl::StatInfoVFS *info )
+       {
+-        return Py_BuildValue( "{sksksksksbsb}",
++        return Py_BuildValue( "{sKsKsKsKsbsb}",
+             "nodes_rw",            info->GetNodesRW(),
+             "nodes_staging",       info->GetNodesStaging(),
+             "free_rw",             info->GetFreeRW(),
+@@ -275,7 +275,7 @@ namespace PyXRootD
+ 
+           PyList_SET_ITEM( pychunks, i,
+               Py_BuildValue( "{sNsNsO}",
+-                  "offset", Py_BuildValue( "k", chunk.offset ),
++                  "offset", Py_BuildValue( "K", chunk.offset ),
+                   "length", Py_BuildValue( "I", chunk.length ),
+                   "buffer", buffer ) );
+           Py_DECREF( buffer );
+diff --git a/bindings/python/src/PyXRootDFile.cc b/bindings/python/src/PyXRootDFile.cc
+index ef0f31d1e..790491776 100644
+--- a/bindings/python/src/PyXRootDFile.cc
++++ b/bindings/python/src/PyXRootDFile.cc
+@@ -325,8 +325,8 @@ namespace PyXRootD
+ 
+     if ( !self->file->IsOpen() ) return FileClosedError();
+ 
+-    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "|kII:readlines",
+-          (char**) kwlist, &offset, &size, &chunksize ) ) return NULL;
++    if ( !PyArg_ParseTupleAndKeywords( args, kwds, "|OOO:readlines",
++          (char**) kwlist, &py_offset, &py_size, &py_chunksize ) ) return NULL;
+ 
+     unsigned long long tmp_offset = 0;
+     unsigned int tmp_size = 0, tmp_chunksize = 0;
+@@ -412,7 +412,7 @@ namespace PyXRootD
+ 
+     if ( PyType_Ready( &ChunkIteratorType ) < 0 ) return NULL;
+ 
+-    args = Py_BuildValue( "ONN", self, Py_BuildValue("k", offset),
++    args = Py_BuildValue( "ONN", self, Py_BuildValue("K", offset),
+                                        Py_BuildValue("I", chunksize) );
+     iterator = (ChunkIterator*)
+                PyObject_CallObject( (PyObject *) &ChunkIteratorType, args );
+-- 
+2.55.0
+

diff --git a/sources b/sources
index ba3c8b5..16c3ed2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (xrootd-5.9.7.tar.gz) = f6a118a556b87881c821d32546e3a9d784578ffba99327821f0dec8de6b29360756cfd99bdc1adf4611490baee24bf9667657519be3a70efbd86345f9ed6a8a7
+SHA512 (xrootd-5.9.8.tar.gz) = ff6e4f4e8ea4bfba5770717280051d30fe55347c3c03010a80503d5d40a408fb09d50a5b16ed66001c7765a84ea3a9499f108907c442ed1bb24193a0279d6e21

diff --git a/xrootd.spec b/xrootd.spec
index 7960894..e663ed9 100644
--- a/xrootd.spec
+++ b/xrootd.spec
@@ -13,7 +13,7 @@
 
 Name:		xrootd
 Epoch:		1
-Version:	5.9.7
+Version:	5.9.8
 Release:	1%{?dist}
 Summary:	Extended ROOT file server
 License:	LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib AND Apache-2.0 AND MPL-2.0
@@ -21,6 +21,10 @@ URL:		https://xrootd.web.cern.ch
 Source0:	%{url}/download/v%{version}/%{name}-%{version}.tar.gz
 Source1:	%{name}-sysusers.conf
 
+#		https://github.com/xrootd/xrootd/pull/2971
+Patch0:		0001-Python-Fix-parsing-of-enum-arguments-in-python-bindi.patch
+Patch1:		0002-Python-Fix-parsing-of-uint64_t-arguments-in-python-b.patch
+
 BuildRequires:	cmake
 BuildRequires:	gcc-c++
 BuildRequires:	make
@@ -268,6 +272,9 @@ This package contains the API documentation of the xrootd libraries.
 %prep
 %setup -q
 
+%patch -P0 -p1
+%patch -P1 -p1
+
 # Delete bundled dependencies
 rm src/XrdXml/tinyxml/tiny*
 %if %{?fedora}%{!?fedora:0}
@@ -669,6 +676,9 @@ fi
 %doc %{_pkgdocdir}
 
 %changelog
+* Tue Oct 06 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 1:5.9.8-1
+- Update to version 5.9.8
+
 * Wed Aug 12 2026 Mattias Ellert <mattias.ellert@physics.uu.se> - 1:5.9.7-1
 - Update to version 5.9.7
 

                 reply	other threads:[~2026-10-06 19:44 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=179131584830.1.4751589292115021072.rpms-xrootd-b5f451ecaf74@fedoraproject.org \
    --to=mattias.ellert@physics.uu.se \
    --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