From 60461f50b17ace1391dfd157c0f493e3bdea1d92 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 3 Jun 2024 20:13:18 +0200 Subject: [PATCH 01/37] Reduce socket path lengths used by tests for rpm 4.20 compatibility Avoid test failures due to using the same port numbers in different tests --- 0001-Minor-test-fixes.patch | 69 +++++++++++++++++++++++++++++++++ 0001-Ports.patch | 77 +++++++++++++++++++++++++++++++++++++ xrootd.spec | 25 +++++++++++- 3 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 0001-Minor-test-fixes.patch create mode 100644 0001-Ports.patch diff --git a/0001-Minor-test-fixes.patch b/0001-Minor-test-fixes.patch new file mode 100644 index 0000000..17d2927 --- /dev/null +++ b/0001-Minor-test-fixes.patch @@ -0,0 +1,69 @@ +From 484cae5d60ffcb2d02623409f1a6e7b04e3b0529 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 25 Mar 2024 20:36:01 +0100 +Subject: [PATCH] Minor test fixes + +--- + tests/XrdCl/XrdClFileCopyTest.cc | 4 ++-- + tests/XrdCl/XrdClPoller.cc | 7 +++++-- + tests/XrdCl/XrdClSocket.cc | 4 ++-- + 3 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/tests/XrdCl/XrdClFileCopyTest.cc b/tests/XrdCl/XrdClFileCopyTest.cc +index d991b358e..deb452495 100644 +--- a/tests/XrdCl/XrdClFileCopyTest.cc ++++ b/tests/XrdCl/XrdClFileCopyTest.cc +@@ -616,8 +616,8 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) + // Copy from a non-existent source + //---------------------------------------------------------------------------- + results.Clear(); +- properties.Set( "source", "root://localhost:9999//test" ); +- properties.Set( "target", targetURL ); ++ properties.Set( "source", "root://localhost:9997//test" ); // was 9999, this change allows for ++ properties.Set( "target", targetURL ); // parallel testing + properties.Set( "initTimeout", 10 ); + properties.Set( "thirdParty", "only" ); + GTEST_ASSERT_XRDST( process3.AddJob( properties, &results ) ); +diff --git a/tests/XrdCl/XrdClPoller.cc b/tests/XrdCl/XrdClPoller.cc +index 5569c6479..d30874170 100644 +--- a/tests/XrdCl/XrdClPoller.cc ++++ b/tests/XrdCl/XrdClPoller.cc +@@ -216,7 +216,10 @@ TEST(PollerTest, FunctionTest) + //---------------------------------------------------------------------------- + Server server( Server::Both ); + Socket s[3]; +- EXPECT_TRUE( server.Setup( 9999, 3, new RandomPumpHandlerFactory() ) ); ++ uint16_t port = 9996; // was 9999, but we need to change ports from other ++ // tests so that we can run all of them in parallel. ++ // Will find another, better way to ensure this in the future ++ EXPECT_TRUE( server.Setup( port, 3, new RandomPumpHandlerFactory() ) ); + EXPECT_TRUE( server.Start() ); + EXPECT_TRUE( poller->Initialize() ); + EXPECT_TRUE( poller->Start() ); +@@ -228,7 +231,7 @@ TEST(PollerTest, FunctionTest) + for( int i = 0; i < 3; ++i ) + { + GTEST_ASSERT_XRDST( s[i].Initialize() ); +- GTEST_ASSERT_XRDST( s[i].Connect( "localhost", 9999 ) ); ++ GTEST_ASSERT_XRDST( s[i].Connect( "localhost", port ) ); + EXPECT_TRUE( poller->AddSocket( &s[i], handler ) ); + EXPECT_TRUE( poller->EnableReadNotification( &s[i], true, 60 ) ); + EXPECT_TRUE( poller->IsRegistered( &s[i] ) ); +diff --git a/tests/XrdCl/XrdClSocket.cc b/tests/XrdCl/XrdClSocket.cc +index df8f433bf..c2e42a424 100644 +--- a/tests/XrdCl/XrdClSocket.cc ++++ b/tests/XrdCl/XrdClSocket.cc +@@ -223,8 +223,8 @@ TEST(SocketTest, TransferTest) + // Start up the server and connect to it + //---------------------------------------------------------------------------- + uint16_t port = 9998; // was 9999, but we need to change ports from other +- // tests so that we can run all of them in parallel. +- // Will find another, better way to ensure this in the future ++ // tests so that we can run all of them in parallel. ++ // Will find another, better way to ensure this in the future + EXPECT_TRUE( serv.Setup( port, 1, new RandomHandlerFactory() ) ); + EXPECT_TRUE( serv.Start() ); + +-- +2.44.0 + diff --git a/0001-Ports.patch b/0001-Ports.patch new file mode 100644 index 0000000..f176389 --- /dev/null +++ b/0001-Ports.patch @@ -0,0 +1,77 @@ +From d85c0df653ad6e6df6d0038d37c5cc143d3e6587 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 25 Mar 2024 19:38:55 +0100 +Subject: [PATCH] Ports + +--- + tests/XrdClTests/FileCopyTest.cc | 4 ++-- + tests/XrdClTests/PollerTest.cc | 4 ++-- + tests/XrdClTests/SocketTest.cc | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/XrdClTests/FileCopyTest.cc b/tests/XrdClTests/FileCopyTest.cc +index 90e6845e7..d75389ce3 100644 +--- a/tests/XrdClTests/FileCopyTest.cc ++++ b/tests/XrdClTests/FileCopyTest.cc +@@ -611,7 +611,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) + // Copy from a non-existent source + //---------------------------------------------------------------------------- + results.Clear(); +- properties.Set( "source", "root://localhost:9999//test" ); ++ properties.Set( "source", "root://localhost:9997//test" ); + properties.Set( "target", targetURL ); + properties.Set( "initTimeout", 10 ); + properties.Set( "thirdParty", "only" ); +@@ -625,7 +625,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) + //---------------------------------------------------------------------------- + results.Clear(); + properties.Set( "source", sourceURL ); +- properties.Set( "target", "root://localhost:9999//test" ); ++ properties.Set( "target", "root://localhost:9997//test" ); + properties.Set( "initTimeout", 10 ); + properties.Set( "thirdParty", "only" ); + CPPUNIT_ASSERT_XRDST( process4.AddJob( properties, &results ) ); +diff --git a/tests/XrdClTests/PollerTest.cc b/tests/XrdClTests/PollerTest.cc +index cb5ecfb7b..2421ba348 100644 +--- a/tests/XrdClTests/PollerTest.cc ++++ b/tests/XrdClTests/PollerTest.cc +@@ -221,7 +221,7 @@ void PollerTest::FunctionTest( XrdCl::Poller *poller ) + //---------------------------------------------------------------------------- + Server server( Server::Both ); + Socket s[3]; +- CPPUNIT_ASSERT( server.Setup( 9999, 3, new RandomPumpHandlerFactory() ) ); ++ CPPUNIT_ASSERT( server.Setup( 9995, 3, new RandomPumpHandlerFactory() ) ); + CPPUNIT_ASSERT( server.Start() ); + CPPUNIT_ASSERT( poller->Initialize() ); + CPPUNIT_ASSERT( poller->Start() ); +@@ -233,7 +233,7 @@ void PollerTest::FunctionTest( XrdCl::Poller *poller ) + for( int i = 0; i < 3; ++i ) + { + CPPUNIT_ASSERT_XRDST( s[i].Initialize() ); +- CPPUNIT_ASSERT_XRDST( s[i].Connect( "localhost", 9999 ) ); ++ CPPUNIT_ASSERT_XRDST( s[i].Connect( "localhost", 9995 ) ); + CPPUNIT_ASSERT( poller->AddSocket( &s[i], handler ) ); + CPPUNIT_ASSERT( poller->EnableReadNotification( &s[i], true, 60 ) ); + CPPUNIT_ASSERT( poller->IsRegistered( &s[i] ) ); +diff --git a/tests/XrdClTests/SocketTest.cc b/tests/XrdClTests/SocketTest.cc +index e6a4516aa..39b693de3 100644 +--- a/tests/XrdClTests/SocketTest.cc ++++ b/tests/XrdClTests/SocketTest.cc +@@ -231,12 +231,12 @@ void SocketTest::TransferTest() + //---------------------------------------------------------------------------- + // Start up the server and connect to it + //---------------------------------------------------------------------------- +- CPPUNIT_ASSERT( serv.Setup( 9999, 1, new RandomHandlerFactory() ) ); ++ CPPUNIT_ASSERT( serv.Setup( 9994, 1, new RandomHandlerFactory() ) ); + CPPUNIT_ASSERT( serv.Start() ); + + CPPUNIT_ASSERT( sock.GetStatus() == Socket::Disconnected ); + CPPUNIT_ASSERT( sock.Initialize( AF_INET6 ).IsOK() ); +- CPPUNIT_ASSERT( sock.Connect( "localhost", 9999 ).IsOK() ); ++ CPPUNIT_ASSERT( sock.Connect( "localhost", 9994 ).IsOK() ); + CPPUNIT_ASSERT( sock.GetStatus() == Socket::Connected ); + + //---------------------------------------------------------------------------- +-- +2.44.0 + diff --git a/xrootd.spec b/xrootd.spec index bbc684d..252a023 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.6.9 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.slac.stanford.edu/ @@ -22,6 +22,11 @@ Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz # https://github.com/xrootd/xrootd/pull/2213 Patch0: 0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch +# https://github.com/xrootd/xrootd/pull/2225 +Patch1: 0001-Minor-test-fixes.patch +# Not reported upstream since these tests are removed from +# the devel branch +Patch2: 0001-Ports.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 @@ -300,7 +305,9 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P 0 -p 1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -443,6 +450,14 @@ cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo %check +# Reduce socket path lengths used during tests +# rpm 4.20 uses a longer path to the build directory than earlier versions +# Tests fail with sockets in the build directory with rpm 4.20 +adminpath=$(mktemp -d -p /var/tmp) +sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ + -i %{_vpath_builddir}/tests/cluster/common.cfg \ + %{_vpath_builddir}/tests/XRootD/xrootd.cfg + touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then %ctest3 @@ -466,6 +481,8 @@ XRootD::cluster::test" fi rm testfile +rm -rf ${adminpath} + %ldconfig_scriptlets libs %ldconfig_scriptlets client-libs @@ -734,6 +751,10 @@ fi %doc %{_pkgdocdir} %changelog +* Mon Jun 03 2024 Mattias Ellert - 1:5.6.9-2 +- Reduce socket path lengths used by tests for rpm 4.20 compatibility +- Avoid test failures due to using the same port numbers in different tests + * Sat Mar 16 2024 Mattias Ellert - 1:5.6.9-1 - Update to version 5.6.9 From 1f974eeaf8cbc6362f9ed3ba242d0370abd973c5 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 18:58:09 +0200 Subject: [PATCH 02/37] Rebuilt for Python 3.13 --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 252a023..0537e4d 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.6.9 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.slac.stanford.edu/ @@ -751,6 +751,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Jun 07 2024 Python Maint - 1:5.6.9-3 +- Rebuilt for Python 3.13 + * Mon Jun 03 2024 Mattias Ellert - 1:5.6.9-2 - Reduce socket path lengths used by tests for rpm 4.20 compatibility - Avoid test failures due to using the same port numbers in different tests From e4c1b948726bd1adea10b5a201978eeb1a65d206 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 4 Jul 2024 06:27:53 +0200 Subject: [PATCH 03/37] Update to version 5.7.0 Drop patches accepted upstream Drop EPEL 7 support from spec file (EOL) --- ...-for-64-bit-time_t-on-32-bit-systems.patch | 151 ------------------ 0001-Minor-test-fixes.patch | 69 -------- 0001-Ports.patch | 77 --------- sources | 2 +- xrootd.spec | 151 ++++-------------- 5 files changed, 28 insertions(+), 422 deletions(-) delete mode 100644 0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch delete mode 100644 0001-Minor-test-fixes.patch delete mode 100644 0001-Ports.patch diff --git a/0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch b/0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch deleted file mode 100644 index 8ce0b8a..0000000 --- a/0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 0b99a31c5813a34ea3a09c067203f7802291b42e Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 16 Mar 2024 21:43:38 +0100 -Subject: [PATCH] Fixes for 64 bit time_t on 32 bit systems - ---- - src/XrdApps/Xrdadler32.cc | 2 +- - src/XrdBwm/XrdBwmLogger.cc | 5 +++-- - src/XrdHttp/XrdHttpReq.cc | 2 +- - src/XrdPfc/XrdPfcConfiguration.cc | 2 +- - src/XrdPosix/XrdPosixPreload32.cc | 4 ++++ - src/XrdSecsss/XrdSecsssKT.cc | 5 +++-- - src/XrdXrootd/XrdXrootdPrepare.cc | 3 ++- - src/XrdXrootd/XrdXrootdProtocol.cc | 9 +++++---- - 8 files changed, 20 insertions(+), 12 deletions(-) - -diff --git a/src/XrdApps/Xrdadler32.cc b/src/XrdApps/Xrdadler32.cc -index 4c4e0068b..ab333656e 100644 ---- a/src/XrdApps/Xrdadler32.cc -+++ b/src/XrdApps/Xrdadler32.cc -@@ -88,7 +88,7 @@ int fGetXattrAdler32(int fd, const char* attr, char *value) - int rc; - - if (fstat(fd, &st)) return 0; -- sprintf(mtime, "%ld", st.st_mtime); -+ sprintf(mtime, "%lld", (long long) st.st_mtime); - - #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) - rc = fgetxattr(fd, attr, attr_val, 25); -diff --git a/src/XrdBwm/XrdBwmLogger.cc b/src/XrdBwm/XrdBwmLogger.cc -index 0064f8b7e..ee0788396 100644 ---- a/src/XrdBwm/XrdBwmLogger.cc -+++ b/src/XrdBwm/XrdBwmLogger.cc -@@ -146,11 +146,12 @@ void XrdBwmLogger::Event(Info &eInfo) - tp->Tlen = snprintf(tp->Text, XrdBwmLoggerMsg::msgSize, - "%s%s" - "%s%s%c" -- "%ld%ld%ld" -+ "%lld%lld%lld" - "%d%d%d" - "%lld%d%c", - eInfo.Tident, eInfo.Lfn, eInfo.lclNode, eInfo.rmtNode, -- eInfo.Flow, eInfo.ATime, eInfo.BTime, eInfo.CTime, -+ eInfo.Flow, (long long) eInfo.ATime, -+ (long long) eInfo.BTime, (long long) eInfo.CTime, - eInfo.numqIn, eInfo.numqOut, eInfo.numqXeq, eInfo.Size, - eInfo.ESec, theEOL); - -diff --git a/src/XrdHttp/XrdHttpReq.cc b/src/XrdHttp/XrdHttpReq.cc -index 9a54293b5..b61587118 100644 ---- a/src/XrdHttp/XrdHttpReq.cc -+++ b/src/XrdHttp/XrdHttpReq.cc -@@ -656,7 +656,7 @@ void XrdHttpReq::appendOpaque(XrdOucString &s, XrdSecEntity *secent, char *hash, - - s += "&xrdhttptime="; - char buf[256]; -- sprintf(buf, "%ld", tnow); -+ sprintf(buf, "%lld", (long long) tnow); - s += buf; - - if (secent) { -diff --git a/src/XrdPfc/XrdPfcConfiguration.cc b/src/XrdPfc/XrdPfcConfiguration.cc -index 8f4bcd064..2cdb58693 100644 ---- a/src/XrdPfc/XrdPfcConfiguration.cc -+++ b/src/XrdPfc/XrdPfcConfiguration.cc -@@ -477,7 +477,7 @@ bool Cache::Config(const char *config_filename, const char *parameters) - if (m_configuration.m_cs_UVKeep < 0) - strcpy(uvk, "lru"); - else -- sprintf(uvk, "%ld", m_configuration.m_cs_UVKeep); -+ sprintf(uvk, "%lld", (long long) m_configuration.m_cs_UVKeep); - float rg = (m_configuration.m_RamAbsAvailable) / float(1024*1024*1024); - loff = snprintf(buff, sizeof(buff), "Config effective %s pfc configuration:\n" - " pfc.cschk %s uvkeep %s\n" -diff --git a/src/XrdPosix/XrdPosixPreload32.cc b/src/XrdPosix/XrdPosixPreload32.cc -index 3d99ba9d2..28c0cacef 100644 ---- a/src/XrdPosix/XrdPosixPreload32.cc -+++ b/src/XrdPosix/XrdPosixPreload32.cc -@@ -44,6 +44,10 @@ - #ifdef _FILE_OFFSET_BITS - #undef _FILE_OFFSET_BITS - #endif -+ -+#ifdef _TIME_BITS -+#undef _TIME_BITS -+#endif - #endif - - #define XRDPOSIXPRELOAD32 -diff --git a/src/XrdSecsss/XrdSecsssKT.cc b/src/XrdSecsss/XrdSecsssKT.cc -index 38b1ada15..0071b20f1 100644 ---- a/src/XrdSecsss/XrdSecsssKT.cc -+++ b/src/XrdSecsss/XrdSecsssKT.cc -@@ -371,10 +371,11 @@ int XrdSecsssKT::Rewrite(int Keep, int &numKeys, int &numTot, int &numExp) - if (ktP->Data.Exp && ktP->Data.Exp <= time(0)) {numExp++; continue;} - if (!isKey(ktCurr, ktP, 0)) {ktCurr.NUG(ktP); numID = 0;} - else if (Keep && numID >= Keep) continue; -- n = sprintf(buff, "%s0 u:%s g:%s n:%s N:%lld c:%ld e:%ld f:%lld k:", -+ n = sprintf(buff, "%s0 u:%s g:%s n:%s N:%lld c:%lld e:%lld f:%lld k:", - (numKeys ? "\n" : ""), - ktP->Data.User,ktP->Data.Grup,ktP->Data.Name,ktP->Data.ID, -- ktP->Data.Crt, ktP->Data.Exp, ktP->Data.Flags); -+ (long long) ktP->Data.Crt, (long long) ktP->Data.Exp, -+ ktP->Data.Flags); - numID++; numKeys++; keyB2X(ktP, kbuff); - if (write(ktFD, buff, n) < 0 - || write(ktFD, kbuff, ktP->Data.Len*2) < 0) break; -diff --git a/src/XrdXrootd/XrdXrootdPrepare.cc b/src/XrdXrootd/XrdXrootdPrepare.cc -index 8ce494c07..947009362 100644 ---- a/src/XrdXrootd/XrdXrootdPrepare.cc -+++ b/src/XrdXrootd/XrdXrootdPrepare.cc -@@ -129,7 +129,8 @@ int XrdXrootdPrepare::List(XrdXrootdPrepArgs &pargs, char *resp, int resplen) - else continue; - if ((up = (char *) index((const char *)(up+1), (int)'_'))) *up = ' '; - else continue; -- return snprintf(resp, resplen-1, "%s %ld", dp->d_name, buf.st_mtime); -+ return snprintf(resp, resplen-1, "%s %lld", -+ dp->d_name, (long long) buf.st_mtime); - } - - // Completed -diff --git a/src/XrdXrootd/XrdXrootdProtocol.cc b/src/XrdXrootd/XrdXrootdProtocol.cc -index e0e50e75d..ec98d7d1e 100644 ---- a/src/XrdXrootd/XrdXrootdProtocol.cc -+++ b/src/XrdXrootd/XrdXrootdProtocol.cc -@@ -798,8 +798,8 @@ int XrdXrootdProtocol::StatGen(struct stat &buf, char *xxBuff, int xxLen, - - // Format the default response: - // -- m = snprintf(xxBuff, xxLen, "%lld %lld %d %ld", -- Dev.uuid, fsz, flags, buf.st_mtime); -+ m = snprintf(xxBuff, xxLen, "%lld %lld %d %lld", -+ Dev.uuid, fsz, flags, (long long) buf.st_mtime); - // if (!xtnd || m >= xxLen) return xxLen; - // - -@@ -808,8 +808,9 @@ int XrdXrootdProtocol::StatGen(struct stat &buf, char *xxBuff, int xxLen, - char *origP = xxBuff; - char *nullP = xxBuff + m++; - xxBuff += m; xxLen -= m; -- n = snprintf(xxBuff, xxLen, "%ld %ld %04o ", -- buf.st_ctime, buf.st_atime, buf.st_mode&07777); -+ n = snprintf(xxBuff, xxLen, "%lld %lld %04o ", -+ (long long) buf.st_ctime, (long long) buf.st_atime, -+ buf.st_mode&07777); - if (n >= xxLen) return m; - xxBuff += n; xxLen -= n; - --- -2.44.0 - diff --git a/0001-Minor-test-fixes.patch b/0001-Minor-test-fixes.patch deleted file mode 100644 index 17d2927..0000000 --- a/0001-Minor-test-fixes.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 484cae5d60ffcb2d02623409f1a6e7b04e3b0529 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 25 Mar 2024 20:36:01 +0100 -Subject: [PATCH] Minor test fixes - ---- - tests/XrdCl/XrdClFileCopyTest.cc | 4 ++-- - tests/XrdCl/XrdClPoller.cc | 7 +++++-- - tests/XrdCl/XrdClSocket.cc | 4 ++-- - 3 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/tests/XrdCl/XrdClFileCopyTest.cc b/tests/XrdCl/XrdClFileCopyTest.cc -index d991b358e..deb452495 100644 ---- a/tests/XrdCl/XrdClFileCopyTest.cc -+++ b/tests/XrdCl/XrdClFileCopyTest.cc -@@ -616,8 +616,8 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) - // Copy from a non-existent source - //---------------------------------------------------------------------------- - results.Clear(); -- properties.Set( "source", "root://localhost:9999//test" ); -- properties.Set( "target", targetURL ); -+ properties.Set( "source", "root://localhost:9997//test" ); // was 9999, this change allows for -+ properties.Set( "target", targetURL ); // parallel testing - properties.Set( "initTimeout", 10 ); - properties.Set( "thirdParty", "only" ); - GTEST_ASSERT_XRDST( process3.AddJob( properties, &results ) ); -diff --git a/tests/XrdCl/XrdClPoller.cc b/tests/XrdCl/XrdClPoller.cc -index 5569c6479..d30874170 100644 ---- a/tests/XrdCl/XrdClPoller.cc -+++ b/tests/XrdCl/XrdClPoller.cc -@@ -216,7 +216,10 @@ TEST(PollerTest, FunctionTest) - //---------------------------------------------------------------------------- - Server server( Server::Both ); - Socket s[3]; -- EXPECT_TRUE( server.Setup( 9999, 3, new RandomPumpHandlerFactory() ) ); -+ uint16_t port = 9996; // was 9999, but we need to change ports from other -+ // tests so that we can run all of them in parallel. -+ // Will find another, better way to ensure this in the future -+ EXPECT_TRUE( server.Setup( port, 3, new RandomPumpHandlerFactory() ) ); - EXPECT_TRUE( server.Start() ); - EXPECT_TRUE( poller->Initialize() ); - EXPECT_TRUE( poller->Start() ); -@@ -228,7 +231,7 @@ TEST(PollerTest, FunctionTest) - for( int i = 0; i < 3; ++i ) - { - GTEST_ASSERT_XRDST( s[i].Initialize() ); -- GTEST_ASSERT_XRDST( s[i].Connect( "localhost", 9999 ) ); -+ GTEST_ASSERT_XRDST( s[i].Connect( "localhost", port ) ); - EXPECT_TRUE( poller->AddSocket( &s[i], handler ) ); - EXPECT_TRUE( poller->EnableReadNotification( &s[i], true, 60 ) ); - EXPECT_TRUE( poller->IsRegistered( &s[i] ) ); -diff --git a/tests/XrdCl/XrdClSocket.cc b/tests/XrdCl/XrdClSocket.cc -index df8f433bf..c2e42a424 100644 ---- a/tests/XrdCl/XrdClSocket.cc -+++ b/tests/XrdCl/XrdClSocket.cc -@@ -223,8 +223,8 @@ TEST(SocketTest, TransferTest) - // Start up the server and connect to it - //---------------------------------------------------------------------------- - uint16_t port = 9998; // was 9999, but we need to change ports from other -- // tests so that we can run all of them in parallel. -- // Will find another, better way to ensure this in the future -+ // tests so that we can run all of them in parallel. -+ // Will find another, better way to ensure this in the future - EXPECT_TRUE( serv.Setup( port, 1, new RandomHandlerFactory() ) ); - EXPECT_TRUE( serv.Start() ); - --- -2.44.0 - diff --git a/0001-Ports.patch b/0001-Ports.patch deleted file mode 100644 index f176389..0000000 --- a/0001-Ports.patch +++ /dev/null @@ -1,77 +0,0 @@ -From d85c0df653ad6e6df6d0038d37c5cc143d3e6587 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 25 Mar 2024 19:38:55 +0100 -Subject: [PATCH] Ports - ---- - tests/XrdClTests/FileCopyTest.cc | 4 ++-- - tests/XrdClTests/PollerTest.cc | 4 ++-- - tests/XrdClTests/SocketTest.cc | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/tests/XrdClTests/FileCopyTest.cc b/tests/XrdClTests/FileCopyTest.cc -index 90e6845e7..d75389ce3 100644 ---- a/tests/XrdClTests/FileCopyTest.cc -+++ b/tests/XrdClTests/FileCopyTest.cc -@@ -611,7 +611,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) - // Copy from a non-existent source - //---------------------------------------------------------------------------- - results.Clear(); -- properties.Set( "source", "root://localhost:9999//test" ); -+ properties.Set( "source", "root://localhost:9997//test" ); - properties.Set( "target", targetURL ); - properties.Set( "initTimeout", 10 ); - properties.Set( "thirdParty", "only" ); -@@ -625,7 +625,7 @@ void FileCopyTest::CopyTestFunc( bool thirdParty ) - //---------------------------------------------------------------------------- - results.Clear(); - properties.Set( "source", sourceURL ); -- properties.Set( "target", "root://localhost:9999//test" ); -+ properties.Set( "target", "root://localhost:9997//test" ); - properties.Set( "initTimeout", 10 ); - properties.Set( "thirdParty", "only" ); - CPPUNIT_ASSERT_XRDST( process4.AddJob( properties, &results ) ); -diff --git a/tests/XrdClTests/PollerTest.cc b/tests/XrdClTests/PollerTest.cc -index cb5ecfb7b..2421ba348 100644 ---- a/tests/XrdClTests/PollerTest.cc -+++ b/tests/XrdClTests/PollerTest.cc -@@ -221,7 +221,7 @@ void PollerTest::FunctionTest( XrdCl::Poller *poller ) - //---------------------------------------------------------------------------- - Server server( Server::Both ); - Socket s[3]; -- CPPUNIT_ASSERT( server.Setup( 9999, 3, new RandomPumpHandlerFactory() ) ); -+ CPPUNIT_ASSERT( server.Setup( 9995, 3, new RandomPumpHandlerFactory() ) ); - CPPUNIT_ASSERT( server.Start() ); - CPPUNIT_ASSERT( poller->Initialize() ); - CPPUNIT_ASSERT( poller->Start() ); -@@ -233,7 +233,7 @@ void PollerTest::FunctionTest( XrdCl::Poller *poller ) - for( int i = 0; i < 3; ++i ) - { - CPPUNIT_ASSERT_XRDST( s[i].Initialize() ); -- CPPUNIT_ASSERT_XRDST( s[i].Connect( "localhost", 9999 ) ); -+ CPPUNIT_ASSERT_XRDST( s[i].Connect( "localhost", 9995 ) ); - CPPUNIT_ASSERT( poller->AddSocket( &s[i], handler ) ); - CPPUNIT_ASSERT( poller->EnableReadNotification( &s[i], true, 60 ) ); - CPPUNIT_ASSERT( poller->IsRegistered( &s[i] ) ); -diff --git a/tests/XrdClTests/SocketTest.cc b/tests/XrdClTests/SocketTest.cc -index e6a4516aa..39b693de3 100644 ---- a/tests/XrdClTests/SocketTest.cc -+++ b/tests/XrdClTests/SocketTest.cc -@@ -231,12 +231,12 @@ void SocketTest::TransferTest() - //---------------------------------------------------------------------------- - // Start up the server and connect to it - //---------------------------------------------------------------------------- -- CPPUNIT_ASSERT( serv.Setup( 9999, 1, new RandomHandlerFactory() ) ); -+ CPPUNIT_ASSERT( serv.Setup( 9994, 1, new RandomHandlerFactory() ) ); - CPPUNIT_ASSERT( serv.Start() ); - - CPPUNIT_ASSERT( sock.GetStatus() == Socket::Disconnected ); - CPPUNIT_ASSERT( sock.Initialize( AF_INET6 ).IsOK() ); -- CPPUNIT_ASSERT( sock.Connect( "localhost", 9999 ).IsOK() ); -+ CPPUNIT_ASSERT( sock.Connect( "localhost", 9994 ).IsOK() ); - CPPUNIT_ASSERT( sock.GetStatus() == Socket::Connected ); - - //---------------------------------------------------------------------------- --- -2.44.0 - diff --git a/sources b/sources index c940a38..f615f4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.9.tar.gz) = 9ba15524451ebe7ee12d689f9c56d85508996285d01885236d396b7742ff6cc03036a6b4bd1424b0e1553cbf382c0954c10cec76fa1a99a7dfff330686bad0cd +SHA512 (xrootd-5.7.0.tar.gz) = 2103d453e8d655a19c58beb050158b08f6e36ce5d1a6cc9181881af3cae06938222a00af5cad102d1e2df4408d61ea364e54a0d2d41c71f1f2e07641a618effe diff --git a/xrootd.spec b/xrootd.spec index 0537e4d..11f82a8 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -8,33 +8,20 @@ %global ceph 0 %endif +# Needed for EPEL 8 %undefine __cmake_in_source_build -%undefine __cmake3_in_source_build Name: xrootd Epoch: 1 -Version: 5.6.9 -Release: 3%{?dist} +Version: 5.7.0 +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 URL: https://xrootd.slac.stanford.edu/ Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz -# https://github.com/xrootd/xrootd/pull/2213 -Patch0: 0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch -# https://github.com/xrootd/xrootd/pull/2225 -Patch1: 0001-Minor-test-fixes.patch -# Not reported upstream since these tests are removed from -# the devel branch -Patch2: 0001-Ports.patch - -%if %{?rhel}%{!?rhel:0} == 7 -BuildRequires: cmake3 -BuildRequires: devtoolset-7-toolchain -%else BuildRequires: cmake BuildRequires: gcc-c++ -%endif BuildRequires: make BuildRequires: pkgconfig BuildRequires: fuse-devel @@ -52,25 +39,11 @@ BuildRequires: graphviz BuildRequires: selinux-policy-devel BuildRequires: systemd-rpm-macros BuildRequires: systemd-devel -%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-sphinx -%endif -%if %{?rhel}%{!?rhel:0} == 7 -BuildRequires: python2-devel -BuildRequires: python2-pip -BuildRequires: python2-setuptools -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-pip -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_other_pkgversion}-devel -BuildRequires: python%{python3_other_pkgversion}-pip -BuildRequires: python%{python3_other_pkgversion}-setuptools -BuildRequires: python2-sphinx -%endif BuildRequires: json-c-devel BuildRequires: libmacaroons-devel BuildRequires: libuuid-devel @@ -85,7 +58,6 @@ BuildRequires: libradosstriper-devel BuildRequires: isa-l-devel %endif BuildRequires: attr -BuildRequires: cppunit-devel BuildRequires: gtest-devel BuildRequires: openssl @@ -262,19 +234,6 @@ The xrootd-ceph is an OSS layer plugin for the XRootD server for interfacing with the Ceph storage platform. %endif -%if %{?rhel}%{!?rhel:0} == 7 -%package -n python2-%{name} -Summary: Python 2 bindings for xrootd -%py_provides python2-%{name} -Provides: %{name}-python = %{epoch}:%{version}-%{release} -Obsoletes: %{name}-python < 1:4.6.1-6 -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} - -%description -n python2-%{name} -This package contains Python 2 bindings for xrootd. -%endif - %package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for xrootd %py_provides python%{python3_pkgversion}-%{name} @@ -284,17 +243,6 @@ Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} %description -n python%{python3_pkgversion}-%{name} This package contains Python 3 bindings for xrootd. -%if %{?rhel}%{!?rhel:0} == 7 -%package -n python%{?python3_other_pkgversion}-%{name} -Summary: Python 3 bindings for xrootd -%py_provides python%{python3_other_pkgversion}-%{name} -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} - -%description -n python%{?python3_other_pkgversion}-%{name} -This package contains Python 3 bindings for xrootd. -%endif - %package doc Summary: Developer documentation for the xrootd libraries BuildArch: noarch @@ -305,57 +253,37 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 - %build -%if %{?rhel}%{!?rhel:0} == 7 -. /opt/rh/devtoolset-7/enable -%endif - -%cmake3 \ +%cmake \ -DFORCE_ENABLED:BOOL=ON \ -DENABLE_TESTS:BOOL=ON \ %if %{ceph} - -DXRDCEPH_SUBMODULE:BOOL=ON \ + -DENABLE_CEPH:BOOL=ON \ %endif -%ifnarch %{ix86} - -DENABLE_XRDEC:BOOL=ON \ - -DUSE_SYSTEM_ISAL:BOOL=ON \ +%ifarch %{ix86} + -DENABLE_XRDEC:BOOL=OFF \ %endif %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 9 -DPIP_OPTIONS="--no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --verbose" \ %else -DPIP_OPTIONS="--no-deps --disable-pip-version-check --verbose" \ %endif -%if %{?rhel}%{!?rhel:0} == 7 - -DXRD_PYTHON_REQ_VERSION=%{python2_version} -%else -DXRD_PYTHON_REQ_VERSION=%{python3_version} -%endif -%cmake3_build +%cmake_build make -C packaging/common -f /usr/share/selinux/devel/Makefile doxygen Doxyfile +sed 's!src=".*/xrootd-logo.png"!src="xrootd-logo.png"!' \ + -i doxydoc/html/index.html +cp -p docs/images/xrootd-logo.png doxydoc/html %install -%if %{?rhel}%{!?rhel:0} == 7 -. /opt/rh/devtoolset-7/enable -%endif - -%cmake3_install +%cmake_install rm -f %{buildroot}%{_libdir}/libXrdCephPosix.so -rm -f %{buildroot}%{_bindir}/test-runner rm -f %{buildroot}%{_bindir}/xrdshmap -rm -f %{buildroot}%{_libdir}/libXrdCephTests.so -rm -f %{buildroot}%{_libdir}/libXrdClTestMonitor-5.so -rm -f %{buildroot}%{_libdir}/libXrdClTests.so -rm -f %{buildroot}%{_libdir}/libXrdClTestsHelper.so -rm -f %{buildroot}%{_libdir}/libXrdEcTests.so rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/direct_url.json rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/RECORD @@ -363,27 +291,10 @@ rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/RECORD sed s/pip/rpm/ \ -i %{buildroot}%{python3_sitearch}/xrootd-*.*-info/INSTALLER -%if %{?rhel}%{!?rhel:0} == 7 -%{__python3} -m pip install \ - --no-deps --disable-pip-version-check --verbose \ - --prefix %{buildroot}%{_prefix} %{_vpath_builddir}/bindings/python -%{__python3_other} -m pip install \ - --no-deps --disable-pip-version-check --verbose \ - --prefix %{buildroot}%{_prefix} %{_vpath_builddir}/bindings/python -%endif - -%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ PYTHONPATH=%{buildroot}%{python3_sitearch} \ PYTHONDONTWRITEBYTECODE=1 \ -make -C bindings/python/docs html SPHINXBUILD=sphinx-build-3 -%endif -%if %{?rhel}%{!?rhel:0} == 7 -LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ -PYTHONPATH=%{buildroot}%{python2_sitearch} \ -PYTHONDONTWRITEBYTECODE=1 \ make -C bindings/python/docs html -%endif # Service unit files mkdir -p %{buildroot}%{_unitdir} @@ -460,7 +371,7 @@ sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then - %ctest3 + %ctest else echo "Extended file attributes not supported by file system" echo "Don't run tests that require them" @@ -468,27 +379,28 @@ else XrdCl::FileCopyTest|\ XrdCl::FileSystemTest.PlugInTest|\ XrdCl::FileSystemTest.ServerQueryTest|\ +XrdCl::FileSystemTest.TruncateRmTest|\ XrdCl::FileSystemTest.XAttrTest|\ +XrdCl::FileTest.PlugInTest|\ +XrdCl::FileTest.VectorWriteTest|\ +XrdCl::FileTest.WriteTest|\ +XrdCl::FileTest.WriteVTest|\ XrdCl::FileTest.XAttrTest|\ XrdCl::LocalFileHandlerTest.XAttrTest|\ XrdCl::ThreadingTest|\ XrdCl::WorkflowTest.CheckpointTest|\ +XrdCl::WorkflowTest.MixedWorkflowTest|\ +XrdCl::WorkflowTest.ParallelTest|\ +XrdCl::WorkflowTest.WritingWorkflowTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ -XrdCl::XrdEcTests|\ XrdEc::|\ XRootD::cluster::test" - %ctest3 -- -E $exclude + %ctest -- -E $exclude fi rm testfile rm -rf ${adminpath} -%ldconfig_scriptlets libs - -%ldconfig_scriptlets client-libs - -%ldconfig_scriptlets server-libs - %pre server getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || useradd -r -g %{name} -s /sbin/nologin \ @@ -728,29 +640,20 @@ fi %{_libdir}/libXrdCephPosix.so.* %endif -%if %{?rhel}%{!?rhel:0} == 7 -%files -n python2-%{name} -%{python2_sitearch}/xrootd-*.*-info -%{python2_sitearch}/pyxrootd -%{python2_sitearch}/XRootD -%endif - %files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/xrootd-*.*-info %{python3_sitearch}/pyxrootd %{python3_sitearch}/XRootD -%if %{?rhel}%{!?rhel:0} == 7 -%files -n python%{?python3_other_pkgversion}-%{name} -%{python3_other_sitearch}/xrootd-*.*-info -%{python3_other_sitearch}/pyxrootd -%{python3_other_sitearch}/XRootD -%endif - %files doc %doc %{_pkgdocdir} %changelog +* Wed Jul 03 2024 Mattias Ellert - 1:5.7.0-1 +- Update to version 5.7.0 +- Drop patches accepted upstream +- Drop EPEL 7 support from spec file (EOL) + * Fri Jun 07 2024 Python Maint - 1:5.6.9-3 - Rebuilt for Python 3.13 From b996dc7685ad43c5bfa5830ecf7e723c87fe31e5 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 5 Jul 2024 07:29:41 +0200 Subject: [PATCH 04/37] Fix compilation error due to hidden overloaded virtual Make documentation package not noarch due to non-reproducible filenames --- ...-overloaded-virtual-compilation-erro.patch | 34 +++++++++++++++++++ xrootd.spec | 23 ++++++++++--- 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch diff --git a/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch b/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch new file mode 100644 index 0000000..e9024b3 --- /dev/null +++ b/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch @@ -0,0 +1,34 @@ +From c53f6a6caf10cbd290dc943cac95c60c7f114666 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 4 Jul 2024 09:56:39 +0200 +Subject: [PATCH] [XrdCl] Fix hidden overloaded virtual compilation error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +/builddir/build/BUILD/xrootd-5.7.0/src/XrdCl/XrdClClassicCopyJob.cc:722:35: error: ‘virtual XrdCl::XRootDStatus {anonymous}::XRootDSource::GetXAttr(std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > > >&)’ was hidden [-Werror=overloaded-virtual=] + 722 | virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) + | ^~~~~~~~ +/builddir/build/BUILD/xrootd-5.7.0/src/XrdCl/XrdClClassicCopyJob.cc:1153:35: note: by ‘virtual XrdCl::XRootDStatus {anonymous}::XRootDSourceZip::GetXAttr(std::vector&)’ + 1153 | virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) + | ^~~~~~~~ +--- + src/XrdCl/XrdClClassicCopyJob.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XrdCl/XrdClClassicCopyJob.cc b/src/XrdCl/XrdClClassicCopyJob.cc +index ab431dcb1..ef0ffcd3c 100644 +--- a/src/XrdCl/XrdClClassicCopyJob.cc ++++ b/src/XrdCl/XrdClClassicCopyJob.cc +@@ -1150,7 +1150,7 @@ namespace + //------------------------------------------------------------------------ + //! Get extended attributes + //------------------------------------------------------------------------ +- virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) ++ virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) + { + return XrdCl::XRootDStatus(); + } +-- +2.45.2 + diff --git a/xrootd.spec b/xrootd.spec index 11f82a8..40455f7 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,11 +14,14 @@ Name: xrootd Epoch: 1 Version: 5.7.0 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.slac.stanford.edu/ Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz +# Fix compilation error due to hidden overloaded virtual +# https://github.com/xrootd/xrootd/pull/2291 +Patch0: 0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -234,24 +237,29 @@ The xrootd-ceph is an OSS layer plugin for the XRootD server for interfacing with the Ceph storage platform. %endif -%package -n python%{python3_pkgversion}-%{name} +%package -n python3-%{name} Summary: Python 3 bindings for xrootd -%py_provides python%{python3_pkgversion}-%{name} +%py_provides python3-%{name} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} -%description -n python%{python3_pkgversion}-%{name} +%description -n python3-%{name} This package contains Python 3 bindings for xrootd. %package doc Summary: Developer documentation for the xrootd libraries +# Doxygen non-reproducible filenames - breaks noarch rpm package +# See: https://bugzilla.redhat.com/show_bug.cgi?id=2295788 +%if %{?rhel}%{!?rhel:0} == 8 BuildArch: noarch +%endif %description doc This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P0 -p1 %build %cmake \ @@ -274,6 +282,7 @@ This package contains the API documentation of the xrootd libraries. make -C packaging/common -f /usr/share/selinux/devel/Makefile doxygen Doxyfile +# Use local image instead of remote sed 's!src=".*/xrootd-logo.png"!src="xrootd-logo.png"!' \ -i doxydoc/html/index.html cp -p docs/images/xrootd-logo.png doxydoc/html @@ -640,7 +649,7 @@ fi %{_libdir}/libXrdCephPosix.so.* %endif -%files -n python%{python3_pkgversion}-%{name} +%files -n python3-%{name} %{python3_sitearch}/xrootd-*.*-info %{python3_sitearch}/pyxrootd %{python3_sitearch}/XRootD @@ -649,6 +658,10 @@ fi %doc %{_pkgdocdir} %changelog +* Thu Jul 04 2024 Mattias Ellert - 1:5.7.0-2 +- Fix compilation error due to hidden overloaded virtual +- Make documentation package not noarch due to non-reproducible filenames + * Wed Jul 03 2024 Mattias Ellert - 1:5.7.0-1 - Update to version 5.7.0 - Drop patches accepted upstream From 16309d34416c40b8a7cbb404305ed8f0def8f858 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:27:46 +0000 Subject: [PATCH 05/37] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 40455f7..6264421 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.7.0 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.slac.stanford.edu/ @@ -658,6 +658,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1:5.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jul 04 2024 Mattias Ellert - 1:5.7.0-2 - Fix compilation error due to hidden overloaded virtual - Make documentation package not noarch due to non-reproducible filenames From bb8882e8c4de88573e58662b5cfb6060a346caea Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 6 Sep 2024 21:49:23 +0200 Subject: [PATCH 06/37] Update to version 5.7.1 Drop patches accepted upstream --- ...orrect-spelling-permision-permission.patch | 29 ++++++++++++++++ ...-overloaded-virtual-compilation-erro.patch | 34 ------------------- sources | 2 +- xrootd.spec | 30 +++++++--------- 4 files changed, 43 insertions(+), 52 deletions(-) create mode 100644 0001-Server-Correct-spelling-permision-permission.patch delete mode 100644 0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch diff --git a/0001-Server-Correct-spelling-permision-permission.patch b/0001-Server-Correct-spelling-permision-permission.patch new file mode 100644 index 0000000..e850439 --- /dev/null +++ b/0001-Server-Correct-spelling-permision-permission.patch @@ -0,0 +1,29 @@ +From bdd966dba0b2ad0757811b0b53d5540ae403f16b Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 5 Sep 2024 22:05:34 +0200 +Subject: [PATCH] =?UTF-8?q?[Server]=20Correct=20spelling=20(permision=20?= + =?UTF-8?q?=E2=86=92=20permission)?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/Xrd/XrdConfig.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc +index e5b51eb59..55b31b841 100644 +--- a/src/Xrd/XrdConfig.cc ++++ b/src/Xrd/XrdConfig.cc +@@ -1432,7 +1432,7 @@ int XrdConfig::SetupAPath() + // + #ifndef WIN32 + if (chmod(AdminPath, AdminMode & ~S_IWGRP)) +- {Log.Emsg("Config", errno, "set permision for admin path", AdminPath); ++ {Log.Emsg("Config", errno, "set permission for admin path", AdminPath); + return 1; + } + #endif +-- +2.46.0 + diff --git a/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch b/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch deleted file mode 100644 index e9024b3..0000000 --- a/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c53f6a6caf10cbd290dc943cac95c60c7f114666 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 4 Jul 2024 09:56:39 +0200 -Subject: [PATCH] [XrdCl] Fix hidden overloaded virtual compilation error -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -/builddir/build/BUILD/xrootd-5.7.0/src/XrdCl/XrdClClassicCopyJob.cc:722:35: error: ‘virtual XrdCl::XRootDStatus {anonymous}::XRootDSource::GetXAttr(std::vector, std::allocator >, std::__cxx11::basic_string, std::allocator > > >&)’ was hidden [-Werror=overloaded-virtual=] - 722 | virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) - | ^~~~~~~~ -/builddir/build/BUILD/xrootd-5.7.0/src/XrdCl/XrdClClassicCopyJob.cc:1153:35: note: by ‘virtual XrdCl::XRootDStatus {anonymous}::XRootDSourceZip::GetXAttr(std::vector&)’ - 1153 | virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) - | ^~~~~~~~ ---- - src/XrdCl/XrdClClassicCopyJob.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdCl/XrdClClassicCopyJob.cc b/src/XrdCl/XrdClClassicCopyJob.cc -index ab431dcb1..ef0ffcd3c 100644 ---- a/src/XrdCl/XrdClClassicCopyJob.cc -+++ b/src/XrdCl/XrdClClassicCopyJob.cc -@@ -1150,7 +1150,7 @@ namespace - //------------------------------------------------------------------------ - //! Get extended attributes - //------------------------------------------------------------------------ -- virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) -+ virtual XrdCl::XRootDStatus GetXAttr( std::vector &xattrs ) - { - return XrdCl::XRootDStatus(); - } --- -2.45.2 - diff --git a/sources b/sources index f615f4a..bbc28a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.7.0.tar.gz) = 2103d453e8d655a19c58beb050158b08f6e36ce5d1a6cc9181881af3cae06938222a00af5cad102d1e2df4408d61ea364e54a0d2d41c71f1f2e07641a618effe +SHA512 (xrootd-5.7.1.tar.gz) = 7b6e802d808950332dd2f99c45f6befbf557a33962e97f6e0846c657fd7ef20001b2b116bd7e235d542cbc7433e6afbe2d4006c92c12e370a7dd4389600e3a27 diff --git a/xrootd.spec b/xrootd.spec index 6264421..03197a3 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,15 +13,14 @@ Name: xrootd Epoch: 1 -Version: 5.7.0 -Release: 3%{?dist} +Version: 5.7.1 +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 -URL: https://xrootd.slac.stanford.edu/ +URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz -# Fix compilation error due to hidden overloaded virtual -# https://github.com/xrootd/xrootd/pull/2291 -Patch0: 0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch +# https://github.com/xrootd/xrootd/pull/2328 +Patch0: 0001-Server-Correct-spelling-permision-permission.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -61,8 +60,10 @@ BuildRequires: libradosstriper-devel BuildRequires: isa-l-devel %endif BuildRequires: attr +BuildRequires: davix BuildRequires: gtest-devel BuildRequires: openssl +BuildRequires: procps Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-selinux = %{epoch}:%{version}-%{release} @@ -376,7 +377,7 @@ rm %{buildroot}%{_pkgdocdir}/python/.buildinfo adminpath=$(mktemp -d -p /var/tmp) sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ -i %{_vpath_builddir}/tests/cluster/common.cfg \ - %{_vpath_builddir}/tests/XRootD/xrootd.cfg + tests/XRootD/common.cfg touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then @@ -388,19 +389,10 @@ else XrdCl::FileCopyTest|\ XrdCl::FileSystemTest.PlugInTest|\ XrdCl::FileSystemTest.ServerQueryTest|\ -XrdCl::FileSystemTest.TruncateRmTest|\ XrdCl::FileSystemTest.XAttrTest|\ -XrdCl::FileTest.PlugInTest|\ -XrdCl::FileTest.VectorWriteTest|\ -XrdCl::FileTest.WriteTest|\ -XrdCl::FileTest.WriteVTest|\ XrdCl::FileTest.XAttrTest|\ XrdCl::LocalFileHandlerTest.XAttrTest|\ XrdCl::ThreadingTest|\ -XrdCl::WorkflowTest.CheckpointTest|\ -XrdCl::WorkflowTest.MixedWorkflowTest|\ -XrdCl::WorkflowTest.ParallelTest|\ -XrdCl::WorkflowTest.WritingWorkflowTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::|\ XRootD::cluster::test" @@ -416,7 +408,7 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -s /sbin/nologin \ -d %{_localstatedir}/spool/%{name} -c "XRootD runtime user" %{name} %post server -%tmpfiles_create %{_tmpfilesdir}/%{name}.conf +%tmpfiles_create %{name}.conf if [ $1 -eq 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : @@ -658,6 +650,10 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Sep 04 2024 Mattias Ellert - 1:5.7.1-1 +- Update to version 5.7.1 +- Drop patches accepted upstream + * Sat Jul 20 2024 Fedora Release Engineering - 1:5.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e528e0f40da059e95afed97a2945233c0e02d743 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 17 Sep 2024 07:32:39 +0200 Subject: [PATCH 07/37] Workaround doxygen non-reproducibility - make doc package noarch again Increase client timeouts for XRootD server tests --- ...ype-in-XrdSutCacheArg_t-to-long-long.patch | 40 +++++++++++++ ...ent-timeouts-for-XRootD-server-tests.patch | 54 +++++++++++++++++ ...ct-against-array-index-out-of-bounds.patch | 59 +++++++++++++++++++ 0001-Reproducible-doxygen-output.patch | 34 +++++++++++ ...g-to-e2sMap-if-EBADE-is-out-of-range.patch | 26 ++++++++ xrootd.spec | 26 ++++++-- 6 files changed, 234 insertions(+), 5 deletions(-) create mode 100644 0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch create mode 100644 0001-Increase-client-timeouts-for-XRootD-server-tests.patch create mode 100644 0001-Protect-against-array-index-out-of-bounds.patch create mode 100644 0001-Reproducible-doxygen-output.patch create mode 100644 0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch diff --git a/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch b/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch new file mode 100644 index 0000000..5a56632 --- /dev/null +++ b/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch @@ -0,0 +1,40 @@ +From ca9c703a58c9f3332cfca592481c5f1e694cf536 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 9 Sep 2024 06:58:29 +0200 +Subject: [PATCH] Change type in XrdSutCacheArg_t to long long + +The XrdSutCacheArg_t type is used to pass arguments of different +types. The type used must be wide enough to fit the widest of the +types passed. One of the types passed is time_t, which can be 64 bits +wide also on 32-bit systems. So a long, which is 32 bits wide on a +32-bit system is not sufficient. + +This commit changes the type to long long. + +Fixes: #2272 +--- + src/XrdSut/XrdSutCache.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/XrdSut/XrdSutCache.hh b/src/XrdSut/XrdSutCache.hh +index b9635d4e1..6c39f87e8 100644 +--- a/src/XrdSut/XrdSutCache.hh ++++ b/src/XrdSut/XrdSutCache.hh +@@ -40,10 +40,10 @@ + + typedef bool (*XrdSutCacheGet_t)(XrdSutCacheEntry *, void *); + typedef struct { +- long arg1; +- long arg2; +- long arg3; +- long arg4; ++ long long arg1; ++ long long arg2; ++ long long arg3; ++ long long arg4; + } XrdSutCacheArg_t; + + class XrdSutCache { +-- +2.46.0 + diff --git a/0001-Increase-client-timeouts-for-XRootD-server-tests.patch b/0001-Increase-client-timeouts-for-XRootD-server-tests.patch new file mode 100644 index 0000000..0477d69 --- /dev/null +++ b/0001-Increase-client-timeouts-for-XRootD-server-tests.patch @@ -0,0 +1,54 @@ +From ce836985eed0f6e496113b9e5c65c8d4a53a112d Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 17 Sep 2024 05:08:21 +0200 +Subject: [PATCH] Increase client timeouts for XRootD server tests + +The XRootD server tests currently uses very short settings for the +client timeouts: + + - XRD_REQUESTTIMEOUT: 2 + - XRD_STREAMTIMEOUT: 2 + - XRD_TIMEOUTRESOLUTION: 1 + +This is a major reduction from the default values: + + - XRD_REQUESTTIMEOUT: 1800 + - XRD_STREAMTIMEOUT: 60 + - XRD_TIMEOUTRESOLUTION: 15 + +According to the comment in the test script, this is done in order to +"catch errors quickly and prevent the test suite from getting stuck +waiting for timeouts while running". + +However, the very short timeouts make some tests fail with timeout +errors when run on small or slow systems. + +This commit increases the timeout values to avoid errors: + + - XRD_REQUESTTIMEOUT: 180 + - XRD_STREAMTIMEOUT: 30 + - XRD_TIMEOUTRESOLUTION: 10 +--- + tests/XRootD/test.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/XRootD/test.sh b/tests/XRootD/test.sh +index 60a402920..fe001a029 100755 +--- a/tests/XRootD/test.sh ++++ b/tests/XRootD/test.sh +@@ -47,9 +47,9 @@ export XRD_LOGLEVEL XRD_LOGFILE + # Reduce default timeouts to catch errors quickly and prevent the test + # suite from getting stuck waiting for timeouts while running. + +-: "${XRD_REQUESTTIMEOUT:=2}" +-: "${XRD_STREAMTIMEOUT:=2}" +-: "${XRD_TIMEOUTRESOLUTION:=1}" ++: "${XRD_REQUESTTIMEOUT:=180}" ++: "${XRD_STREAMTIMEOUT:=30}" ++: "${XRD_TIMEOUTRESOLUTION:=10}" + + export XRD_REQUESTTIMEOUT XRD_STREAMTIMEOUT XRD_TIMEOUTRESOLUTION + +-- +2.46.0 + diff --git a/0001-Protect-against-array-index-out-of-bounds.patch b/0001-Protect-against-array-index-out-of-bounds.patch new file mode 100644 index 0000000..cacee0a --- /dev/null +++ b/0001-Protect-against-array-index-out-of-bounds.patch @@ -0,0 +1,59 @@ +From 7836a0f2d778b082c632a92846ecf756e78fbb24 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 7 Sep 2024 18:04:26 +0200 +Subject: [PATCH 1/2] Protect against array index out of bounds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Seen on hppa Linux where EBADE is 160. + +In function ‘int {anonymous}::initErrTable()’, + inlined from ‘void __static_initialization_and_destruction_0()’ at /<>/src/XrdSys/XrdSysE2T.cc:92:28, + inlined from ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’ at /<>/src/XrdSys/XrdSysE2T.cc:128:1: +/<>/src/XrdSys/XrdSysE2T.cc:70:26: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=] + 70 | if (Errno2String[EBADE]) { + | ~~~~~~~~~~~~~~~~~~^ +/<>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’: +/<>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’ + 48 | const char* Errno2String[errSlots] = {0}; + | ^~~~~~~~~~~~ +In function ‘int {anonymous}::initErrTable()’, + inlined from ‘void __static_initialization_and_destruction_0()’ at /<>/src/XrdSys/XrdSysE2T.cc:92:28, + inlined from ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’ at /<>/src/XrdSys/XrdSysE2T.cc:128:1: +/<>/src/XrdSys/XrdSysE2T.cc:74:22: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=] + 74 | Errno2String[EBADE] = "authentication failed - possible invalid exchange"; + | ~~~~~~~~~~~~~~~~~~^ +/<>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’: +/<>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’ + 48 | const char* Errno2String[errSlots] = {0}; + | ^~~~~~~~~~~~ +--- + src/XrdSys/XrdSysE2T.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/XrdSys/XrdSysE2T.cc b/src/XrdSys/XrdSysE2T.cc +index 83b62e317..9f615a911 100644 +--- a/src/XrdSys/XrdSysE2T.cc ++++ b/src/XrdSys/XrdSysE2T.cc +@@ -67,11 +67,13 @@ int initErrTable() + // EAUTH is remapped to EBADE ('invalid exchange'). Given there's no current XRootD use of a + // syscall that can return EBADE, we assume EBADE really means authentication denied. + #if defined(EBADE) +- if (Errno2String[EBADE]) { +- free((char*)Errno2String[EBADE]); ++ if (EBADE - ERRNOBASE > 0 && EBADE - ERRNOBASE < errSlots) { ++ if (Errno2String[EBADE - ERRNOBASE]) ++ free((char*)Errno2String[EBADE - ERRNOBASE]); ++ Errno2String[EBADE - ERRNOBASE] = "authentication failed - possible invalid exchange"; ++ if (EBADE - ERRNOBASE > lastGood) ++ lastGood = EBADE - ERRNOBASE; + } +- +- Errno2String[EBADE] = "authentication failed - possible invalid exchange"; + #endif + + // Supply generic message for missing ones +-- +2.46.0 + diff --git a/0001-Reproducible-doxygen-output.patch b/0001-Reproducible-doxygen-output.patch new file mode 100644 index 0000000..477a01b --- /dev/null +++ b/0001-Reproducible-doxygen-output.patch @@ -0,0 +1,34 @@ +From 6372f261574a13f7a14bd8b55c45d2bedfd5e4c8 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Fri, 13 Sep 2024 16:24:54 +0200 +Subject: [PATCH] Reproducible doxygen output. + +The files generated by doxygen whose file names contain the string +unnamedN where N is a number are not generated using predictable +names. + +This happens when running doxygen using multiple threads. + +Set NUM_PROC_THREADS=1 to work around this issue. + +See: https://github.com/doxygen/doxygen/issues/11138 +--- + Doxyfile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Doxyfile b/Doxyfile +index a85babb7c..f3bc4c524 100644 +--- a/Doxyfile ++++ b/Doxyfile +@@ -492,7 +492,7 @@ LOOKUP_CACHE_SIZE = 2 + # DOT_NUM_THREADS setting. + # Minimum value: 0, maximum value: 32, default value: 1. + +-NUM_PROC_THREADS = 0 ++NUM_PROC_THREADS = 1 + + # If the TIMESTAMP tag is set different from NO then each generated page will + # contain the date or date and time when the page was generated. Setting this to +-- +2.46.0 + diff --git a/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch b/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch new file mode 100644 index 0000000..3473cd4 --- /dev/null +++ b/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch @@ -0,0 +1,26 @@ +From f633e0faf13baee78625cf7085bd1442fab39d9c Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 10 Sep 2024 15:29:18 +0200 +Subject: [PATCH 2/2] Add error string to e2sMap if EBADE is out of range + +--- + src/XrdSys/XrdSysE2T.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/XrdSys/XrdSysE2T.cc b/src/XrdSys/XrdSysE2T.cc +index 9f615a911..64daa9827 100644 +--- a/src/XrdSys/XrdSysE2T.cc ++++ b/src/XrdSys/XrdSysE2T.cc +@@ -74,6 +74,9 @@ int initErrTable() + if (EBADE - ERRNOBASE > lastGood) + lastGood = EBADE - ERRNOBASE; + } ++ else { ++ e2sMap[EBADE] = "authentication failed - possible invalid exchange"; ++ } + #endif + + // Supply generic message for missing ones +-- +2.46.0 + diff --git a/xrootd.spec b/xrootd.spec index 03197a3..d2e5736 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,13 +14,23 @@ Name: xrootd Epoch: 1 Version: 5.7.1 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz # https://github.com/xrootd/xrootd/pull/2328 Patch0: 0001-Server-Correct-spelling-permision-permission.patch +# https://github.com/xrootd/xrootd/pull/2329 +Patch1: 0001-Protect-against-array-index-out-of-bounds.patch +Patch2: 0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch +# https://github.com/xrootd/xrootd/pull/2330 +Patch3: 0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch +# https://github.com/xrootd/xrootd/pull/2337 +# https://github.com/doxygen/doxygen/issues/11138 +Patch4: 0001-Reproducible-doxygen-output.patch +# https://github.com/xrootd/xrootd/pull/2340 +Patch5: 0001-Increase-client-timeouts-for-XRootD-server-tests.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -249,11 +259,7 @@ This package contains Python 3 bindings for xrootd. %package doc Summary: Developer documentation for the xrootd libraries -# Doxygen non-reproducible filenames - breaks noarch rpm package -# See: https://bugzilla.redhat.com/show_bug.cgi?id=2295788 -%if %{?rhel}%{!?rhel:0} == 8 BuildArch: noarch -%endif %description doc This package contains the API documentation of the xrootd libraries. @@ -261,6 +267,11 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 %build %cmake \ @@ -393,6 +404,7 @@ XrdCl::FileSystemTest.XAttrTest|\ XrdCl::FileTest.XAttrTest|\ XrdCl::LocalFileHandlerTest.XAttrTest|\ XrdCl::ThreadingTest|\ +XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::|\ XRootD::cluster::test" @@ -650,6 +662,10 @@ fi %doc %{_pkgdocdir} %changelog +* Mon Sep 16 2024 Mattias Ellert - 1:5.7.1-2 +- Workaround doxygen non-reproducibility - make doc package noarch again +- Increase client timeouts for XRootD server tests + * Wed Sep 04 2024 Mattias Ellert - 1:5.7.1-1 - Update to version 5.7.1 - Drop patches accepted upstream From fc28d9f969af7d71366bc178c54b9017dbd32979 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 30 Nov 2024 10:40:50 +0100 Subject: [PATCH 08/37] Update to version 5.7.2 Drop patches accepted upstream --- ...ype-in-XrdSutCacheArg_t-to-long-long.patch | 40 ------------- ...ent-timeouts-for-XRootD-server-tests.patch | 54 ----------------- ...ct-against-array-index-out-of-bounds.patch | 59 ------------------- 0001-Reproducible-doxygen-output.patch | 34 ----------- ...orrect-spelling-permision-permission.patch | 29 --------- ...g-to-e2sMap-if-EBADE-is-out-of-range.patch | 26 -------- sources | 2 +- xrootd.spec | 27 +++------ 8 files changed, 8 insertions(+), 263 deletions(-) delete mode 100644 0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch delete mode 100644 0001-Increase-client-timeouts-for-XRootD-server-tests.patch delete mode 100644 0001-Protect-against-array-index-out-of-bounds.patch delete mode 100644 0001-Reproducible-doxygen-output.patch delete mode 100644 0001-Server-Correct-spelling-permision-permission.patch delete mode 100644 0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch diff --git a/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch b/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch deleted file mode 100644 index 5a56632..0000000 --- a/0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ca9c703a58c9f3332cfca592481c5f1e694cf536 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 9 Sep 2024 06:58:29 +0200 -Subject: [PATCH] Change type in XrdSutCacheArg_t to long long - -The XrdSutCacheArg_t type is used to pass arguments of different -types. The type used must be wide enough to fit the widest of the -types passed. One of the types passed is time_t, which can be 64 bits -wide also on 32-bit systems. So a long, which is 32 bits wide on a -32-bit system is not sufficient. - -This commit changes the type to long long. - -Fixes: #2272 ---- - src/XrdSut/XrdSutCache.hh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/XrdSut/XrdSutCache.hh b/src/XrdSut/XrdSutCache.hh -index b9635d4e1..6c39f87e8 100644 ---- a/src/XrdSut/XrdSutCache.hh -+++ b/src/XrdSut/XrdSutCache.hh -@@ -40,10 +40,10 @@ - - typedef bool (*XrdSutCacheGet_t)(XrdSutCacheEntry *, void *); - typedef struct { -- long arg1; -- long arg2; -- long arg3; -- long arg4; -+ long long arg1; -+ long long arg2; -+ long long arg3; -+ long long arg4; - } XrdSutCacheArg_t; - - class XrdSutCache { --- -2.46.0 - diff --git a/0001-Increase-client-timeouts-for-XRootD-server-tests.patch b/0001-Increase-client-timeouts-for-XRootD-server-tests.patch deleted file mode 100644 index 0477d69..0000000 --- a/0001-Increase-client-timeouts-for-XRootD-server-tests.patch +++ /dev/null @@ -1,54 +0,0 @@ -From ce836985eed0f6e496113b9e5c65c8d4a53a112d Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 17 Sep 2024 05:08:21 +0200 -Subject: [PATCH] Increase client timeouts for XRootD server tests - -The XRootD server tests currently uses very short settings for the -client timeouts: - - - XRD_REQUESTTIMEOUT: 2 - - XRD_STREAMTIMEOUT: 2 - - XRD_TIMEOUTRESOLUTION: 1 - -This is a major reduction from the default values: - - - XRD_REQUESTTIMEOUT: 1800 - - XRD_STREAMTIMEOUT: 60 - - XRD_TIMEOUTRESOLUTION: 15 - -According to the comment in the test script, this is done in order to -"catch errors quickly and prevent the test suite from getting stuck -waiting for timeouts while running". - -However, the very short timeouts make some tests fail with timeout -errors when run on small or slow systems. - -This commit increases the timeout values to avoid errors: - - - XRD_REQUESTTIMEOUT: 180 - - XRD_STREAMTIMEOUT: 30 - - XRD_TIMEOUTRESOLUTION: 10 ---- - tests/XRootD/test.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/XRootD/test.sh b/tests/XRootD/test.sh -index 60a402920..fe001a029 100755 ---- a/tests/XRootD/test.sh -+++ b/tests/XRootD/test.sh -@@ -47,9 +47,9 @@ export XRD_LOGLEVEL XRD_LOGFILE - # Reduce default timeouts to catch errors quickly and prevent the test - # suite from getting stuck waiting for timeouts while running. - --: "${XRD_REQUESTTIMEOUT:=2}" --: "${XRD_STREAMTIMEOUT:=2}" --: "${XRD_TIMEOUTRESOLUTION:=1}" -+: "${XRD_REQUESTTIMEOUT:=180}" -+: "${XRD_STREAMTIMEOUT:=30}" -+: "${XRD_TIMEOUTRESOLUTION:=10}" - - export XRD_REQUESTTIMEOUT XRD_STREAMTIMEOUT XRD_TIMEOUTRESOLUTION - --- -2.46.0 - diff --git a/0001-Protect-against-array-index-out-of-bounds.patch b/0001-Protect-against-array-index-out-of-bounds.patch deleted file mode 100644 index cacee0a..0000000 --- a/0001-Protect-against-array-index-out-of-bounds.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 7836a0f2d778b082c632a92846ecf756e78fbb24 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 7 Sep 2024 18:04:26 +0200 -Subject: [PATCH 1/2] Protect against array index out of bounds -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Seen on hppa Linux where EBADE is 160. - -In function ‘int {anonymous}::initErrTable()’, - inlined from ‘void __static_initialization_and_destruction_0()’ at /<>/src/XrdSys/XrdSysE2T.cc:92:28, - inlined from ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’ at /<>/src/XrdSys/XrdSysE2T.cc:128:1: -/<>/src/XrdSys/XrdSysE2T.cc:70:26: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=] - 70 | if (Errno2String[EBADE]) { - | ~~~~~~~~~~~~~~~~~~^ -/<>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’: -/<>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’ - 48 | const char* Errno2String[errSlots] = {0}; - | ^~~~~~~~~~~~ -In function ‘int {anonymous}::initErrTable()’, - inlined from ‘void __static_initialization_and_destruction_0()’ at /<>/src/XrdSys/XrdSysE2T.cc:92:28, - inlined from ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’ at /<>/src/XrdSys/XrdSysE2T.cc:128:1: -/<>/src/XrdSys/XrdSysE2T.cc:74:22: warning: array subscript 160 is above array bounds of ‘const char* [144]’ [-Warray-bounds=] - 74 | Errno2String[EBADE] = "authentication failed - possible invalid exchange"; - | ~~~~~~~~~~~~~~~~~~^ -/<>/src/XrdSys/XrdSysE2T.cc: In function ‘(static initializers for /<>/src/XrdSys/XrdSysE2T.cc)’: -/<>/src/XrdSys/XrdSysE2T.cc:48:28: note: while referencing ‘{anonymous}::Errno2String’ - 48 | const char* Errno2String[errSlots] = {0}; - | ^~~~~~~~~~~~ ---- - src/XrdSys/XrdSysE2T.cc | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/src/XrdSys/XrdSysE2T.cc b/src/XrdSys/XrdSysE2T.cc -index 83b62e317..9f615a911 100644 ---- a/src/XrdSys/XrdSysE2T.cc -+++ b/src/XrdSys/XrdSysE2T.cc -@@ -67,11 +67,13 @@ int initErrTable() - // EAUTH is remapped to EBADE ('invalid exchange'). Given there's no current XRootD use of a - // syscall that can return EBADE, we assume EBADE really means authentication denied. - #if defined(EBADE) -- if (Errno2String[EBADE]) { -- free((char*)Errno2String[EBADE]); -+ if (EBADE - ERRNOBASE > 0 && EBADE - ERRNOBASE < errSlots) { -+ if (Errno2String[EBADE - ERRNOBASE]) -+ free((char*)Errno2String[EBADE - ERRNOBASE]); -+ Errno2String[EBADE - ERRNOBASE] = "authentication failed - possible invalid exchange"; -+ if (EBADE - ERRNOBASE > lastGood) -+ lastGood = EBADE - ERRNOBASE; - } -- -- Errno2String[EBADE] = "authentication failed - possible invalid exchange"; - #endif - - // Supply generic message for missing ones --- -2.46.0 - diff --git a/0001-Reproducible-doxygen-output.patch b/0001-Reproducible-doxygen-output.patch deleted file mode 100644 index 477a01b..0000000 --- a/0001-Reproducible-doxygen-output.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6372f261574a13f7a14bd8b55c45d2bedfd5e4c8 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Fri, 13 Sep 2024 16:24:54 +0200 -Subject: [PATCH] Reproducible doxygen output. - -The files generated by doxygen whose file names contain the string -unnamedN where N is a number are not generated using predictable -names. - -This happens when running doxygen using multiple threads. - -Set NUM_PROC_THREADS=1 to work around this issue. - -See: https://github.com/doxygen/doxygen/issues/11138 ---- - Doxyfile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Doxyfile b/Doxyfile -index a85babb7c..f3bc4c524 100644 ---- a/Doxyfile -+++ b/Doxyfile -@@ -492,7 +492,7 @@ LOOKUP_CACHE_SIZE = 2 - # DOT_NUM_THREADS setting. - # Minimum value: 0, maximum value: 32, default value: 1. - --NUM_PROC_THREADS = 0 -+NUM_PROC_THREADS = 1 - - # If the TIMESTAMP tag is set different from NO then each generated page will - # contain the date or date and time when the page was generated. Setting this to --- -2.46.0 - diff --git a/0001-Server-Correct-spelling-permision-permission.patch b/0001-Server-Correct-spelling-permision-permission.patch deleted file mode 100644 index e850439..0000000 --- a/0001-Server-Correct-spelling-permision-permission.patch +++ /dev/null @@ -1,29 +0,0 @@ -From bdd966dba0b2ad0757811b0b53d5540ae403f16b Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 5 Sep 2024 22:05:34 +0200 -Subject: [PATCH] =?UTF-8?q?[Server]=20Correct=20spelling=20(permision=20?= - =?UTF-8?q?=E2=86=92=20permission)?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - src/Xrd/XrdConfig.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Xrd/XrdConfig.cc b/src/Xrd/XrdConfig.cc -index e5b51eb59..55b31b841 100644 ---- a/src/Xrd/XrdConfig.cc -+++ b/src/Xrd/XrdConfig.cc -@@ -1432,7 +1432,7 @@ int XrdConfig::SetupAPath() - // - #ifndef WIN32 - if (chmod(AdminPath, AdminMode & ~S_IWGRP)) -- {Log.Emsg("Config", errno, "set permision for admin path", AdminPath); -+ {Log.Emsg("Config", errno, "set permission for admin path", AdminPath); - return 1; - } - #endif --- -2.46.0 - diff --git a/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch b/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch deleted file mode 100644 index 3473cd4..0000000 --- a/0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f633e0faf13baee78625cf7085bd1442fab39d9c Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 10 Sep 2024 15:29:18 +0200 -Subject: [PATCH 2/2] Add error string to e2sMap if EBADE is out of range - ---- - src/XrdSys/XrdSysE2T.cc | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/XrdSys/XrdSysE2T.cc b/src/XrdSys/XrdSysE2T.cc -index 9f615a911..64daa9827 100644 ---- a/src/XrdSys/XrdSysE2T.cc -+++ b/src/XrdSys/XrdSysE2T.cc -@@ -74,6 +74,9 @@ int initErrTable() - if (EBADE - ERRNOBASE > lastGood) - lastGood = EBADE - ERRNOBASE; - } -+ else { -+ e2sMap[EBADE] = "authentication failed - possible invalid exchange"; -+ } - #endif - - // Supply generic message for missing ones --- -2.46.0 - diff --git a/sources b/sources index bbc28a7..b6c7026 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.7.1.tar.gz) = 7b6e802d808950332dd2f99c45f6befbf557a33962e97f6e0846c657fd7ef20001b2b116bd7e235d542cbc7433e6afbe2d4006c92c12e370a7dd4389600e3a27 +SHA512 (xrootd-5.7.2.tar.gz) = a117b2e239695ac243ada3e1a0339d20057645b9e22753c32d44f3949e9ca0eab262397a8264e11293676e512b5cda921392f6ae52b935f93c60ea7247ac4f02 diff --git a/xrootd.spec b/xrootd.spec index d2e5736..f272e14 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,24 +13,12 @@ Name: xrootd Epoch: 1 -Version: 5.7.1 -Release: 2%{?dist} +Version: 5.7.2 +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 URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz -# https://github.com/xrootd/xrootd/pull/2328 -Patch0: 0001-Server-Correct-spelling-permision-permission.patch -# https://github.com/xrootd/xrootd/pull/2329 -Patch1: 0001-Protect-against-array-index-out-of-bounds.patch -Patch2: 0002-Add-error-string-to-e2sMap-if-EBADE-is-out-of-range.patch -# https://github.com/xrootd/xrootd/pull/2330 -Patch3: 0001-Change-type-in-XrdSutCacheArg_t-to-long-long.patch -# https://github.com/xrootd/xrootd/pull/2337 -# https://github.com/doxygen/doxygen/issues/11138 -Patch4: 0001-Reproducible-doxygen-output.patch -# https://github.com/xrootd/xrootd/pull/2340 -Patch5: 0001-Increase-client-timeouts-for-XRootD-server-tests.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -70,6 +58,7 @@ BuildRequires: libradosstriper-devel BuildRequires: isa-l-devel %endif BuildRequires: attr +BuildRequires: curl BuildRequires: davix BuildRequires: gtest-devel BuildRequires: openssl @@ -266,12 +255,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 -%patch -P4 -p1 -%patch -P5 -p1 %build %cmake \ @@ -662,6 +645,10 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Nov 29 2024 Mattias Ellert - 1:5.7.2-1 +- Update to version 5.7.2 +- Drop patches accepted upstream + * Mon Sep 16 2024 Mattias Ellert - 1:5.7.1-2 - Workaround doxygen non-reproducibility - make doc package noarch again - Increase client timeouts for XRootD server tests From ccc05e4af5f4ddc0fcda16b369c03f283de0c27c Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 9 Dec 2024 08:52:11 +0100 Subject: [PATCH 09/37] Fix errors in format strings --- 0001-Use-correct-format-for-size_t.patch | 193 ++++++++ ...library-logging-routines-with-__attr.patch | 71 +++ ...-format-errors-found-by-the-compiler.patch | 418 ++++++++++++++++++ xrootd.spec | 16 +- 4 files changed, 696 insertions(+), 2 deletions(-) create mode 100644 0001-Use-correct-format-for-size_t.patch create mode 100644 0002-Mark-the-client-library-logging-routines-with-__attr.patch create mode 100644 0003-Fix-format-errors-found-by-the-compiler.patch diff --git a/0001-Use-correct-format-for-size_t.patch b/0001-Use-correct-format-for-size_t.patch new file mode 100644 index 0000000..1c485d5 --- /dev/null +++ b/0001-Use-correct-format-for-size_t.patch @@ -0,0 +1,193 @@ +From e6f75e2386fdf3b7978a55a9cedb59364dc80596 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sun, 1 Dec 2024 10:24:56 +0100 +Subject: [PATCH 1/3] Use correct format for size_t + +The format for some size_t variables were recently changed from %d to +%llu. This fixed a problem on 64 bit architectures, since there size_t +is 64 bits wide and %d is the format for a 32 bit type and %llu is the +format for a 64 bit type. However, this change introduced a regression +on 32 bit architectures where size_t is 32 bits wide. + +This change caused some of the tests to fail with a segmentation fault +on the Debian armhf architecture: + +The following tests FAILED: + 108 - XRootD::noauth::test (Failed) + 111 - XRootD::host::test (Failed) + 114 - XRootD::unix::test (Failed) + 117 - XRootD::sss::test (Failed) + 120 - XRootD::http::test (Failed) + +This commit adds a type cast so that the new format works for all +architectures. +--- + src/XrdCl/XrdClCopyProcess.cc | 2 +- + src/XrdCl/XrdClFileStateHandler.cc | 14 ++++++++------ + src/XrdCl/XrdClJobManager.cc | 2 +- + src/XrdCl/XrdClStream.cc | 2 +- + src/XrdCl/XrdClUtils.cc | 2 +- + src/XrdEc/XrdEcReader.cc | 10 +++++----- + 6 files changed, 17 insertions(+), 15 deletions(-) + +diff --git a/src/XrdCl/XrdClCopyProcess.cc b/src/XrdCl/XrdClCopyProcess.cc +index 816268a20..c6e669de5 100644 +--- a/src/XrdCl/XrdClCopyProcess.cc ++++ b/src/XrdCl/XrdClCopyProcess.cc +@@ -369,7 +369,7 @@ namespace XrdCl + std::vector::iterator it; + + log->Debug( UtilityMsg, "CopyProcess: %llu jobs to prepare", +- pImpl->pJobProperties.size() ); ++ (unsigned long long) pImpl->pJobProperties.size() ); + + std::map targetFlags; + int i = 0; +diff --git a/src/XrdCl/XrdClFileStateHandler.cc b/src/XrdCl/XrdClFileStateHandler.cc +index 1688a3da8..2560bb856 100644 +--- a/src/XrdCl/XrdClFileStateHandler.cc ++++ b/src/XrdCl/XrdClFileStateHandler.cc +@@ -167,7 +167,7 @@ namespace + { + Log *log = DefaultEnv::GetLog(); + log->Info( FileMsg, "[%p@%s] Received corrupted page, will retry page #%llu.", +- this, stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); ++ this, stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); + + XRootDStatus st = XrdCl::FileStateHandler::PgReadRetry( stateHandler, pgoff, pgsize, pgnb, buffer, this, 0 ); + if( !st.IsOK()) +@@ -258,7 +258,7 @@ namespace + { + Log *log = DefaultEnv::GetLog(); + log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", +- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); ++ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); + pgReadHandler->HandleResponseWithHosts( status, response, hostList ); + delete this; + return; +@@ -270,7 +270,7 @@ namespace + { + Log *log = DefaultEnv::GetLog(); + log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", +- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); ++ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); + // we retry a page at a time so the length cannot exceed 4KB + DeleteArgs( status, response, hostList ); + pgReadHandler->HandleResponseWithHosts( new XRootDStatus( stError, errDataError ), 0, 0 ); +@@ -283,7 +283,7 @@ namespace + { + Log *log = DefaultEnv::GetLog(); + log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", +- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); ++ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); + DeleteArgs( status, response, hostList ); + pgReadHandler->HandleResponseWithHosts( new XRootDStatus( stError, errDataError ), 0, 0 ); + delete this; +@@ -292,7 +292,7 @@ namespace + + Log *log = DefaultEnv::GetLog(); + log->Info( FileMsg, "[%p@%s] Successfully recovered page #%llu.", +- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); ++ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); + + DeleteArgs( 0, response, hostList ); + pgReadHandler->UpdateCksum( pgnb, crcval ); +@@ -2460,7 +2460,9 @@ namespace XrdCl + status->ToStr().c_str() ); + + log->Dump(FileMsg, "[%p@%s] Items in the fly %llu, queued for recovery %llu", +- this, pFileUrl->GetObfuscatedURL().c_str(), pInTheFly.size(), pToBeRecovered.size() ); ++ this, pFileUrl->GetObfuscatedURL().c_str(), ++ (unsigned long long) pInTheFly.size(), ++ (unsigned long long) pToBeRecovered.size() ); + + MonitorClose( status ); + ResetMonitoringVars(); +diff --git a/src/XrdCl/XrdClJobManager.cc b/src/XrdCl/XrdClJobManager.cc +index d34246065..60e9eca90 100644 +--- a/src/XrdCl/XrdClJobManager.cc ++++ b/src/XrdCl/XrdClJobManager.cc +@@ -83,7 +83,7 @@ namespace XrdCl + } + } + pRunning = true; +- log->Debug( JobMgrMsg, "Job manager started, %llu workers", pWorkers.size() ); ++ log->Debug( JobMgrMsg, "Job manager started, %llu workers", (unsigned long long) pWorkers.size() ); + return true; + } + +diff --git a/src/XrdCl/XrdClStream.cc b/src/XrdCl/XrdClStream.cc +index 97f260099..a80f8e1d0 100644 +--- a/src/XrdCl/XrdClStream.cc ++++ b/src/XrdCl/XrdClStream.cc +@@ -648,7 +648,7 @@ namespace XrdCl + if( pSubStreams.size() > 1 ) + { + log->Debug( PostMasterMsg, "[%s] Attempting to connect %llu additional streams.", +- pStreamName.c_str(), pSubStreams.size()-1 ); ++ pStreamName.c_str(), (unsigned long long) (pSubStreams.size() - 1) ); + for( size_t i = 1; i < pSubStreams.size(); ++i ) + { + pSubStreams[i]->socket->SetAddress( pSubStreams[0]->socket->GetAddress() ); +diff --git a/src/XrdCl/XrdClUtils.cc b/src/XrdCl/XrdClUtils.cc +index ec1c67bae..9546c595b 100644 +--- a/src/XrdCl/XrdClUtils.cc ++++ b/src/XrdCl/XrdClUtils.cc +@@ -247,7 +247,7 @@ namespace XrdCl + } + addrStr.erase( addrStr.length()-2, 2 ); + log->Debug( type, "[%s] Found %llu address(es): %s", +- hostId.c_str(), addresses.size(), addrStr.c_str() ); ++ hostId.c_str(), (unsigned long long) addresses.size(), addrStr.c_str() ); + } + + //---------------------------------------------------------------------------- +diff --git a/src/XrdEc/XrdEcReader.cc b/src/XrdEc/XrdEcReader.cc +index bebf65023..ccba6bae6 100644 +--- a/src/XrdEc/XrdEcReader.cc ++++ b/src/XrdEc/XrdEcReader.cc +@@ -980,7 +980,7 @@ namespace XrdEc + + if(!st.IsOK()) + { +- log->Dump(XrdCl::XRootDMsg, "EC Vector Read of host %llu failed entirely.", i); ++ log->Dump(XrdCl::XRootDMsg, "EC Vector Read of host %llu failed entirely.", (unsigned long long) i); + MissingVectorRead(currentBlock, blkid, strpid, timeout); + } + else{ +@@ -1002,7 +1002,7 @@ namespace XrdEc + uint32_t cksum = objcfg.digest( 0, currentBlock->stripes[strpid].data(), currentBlock->stripes[strpid].size() ); + if( orgcksum != cksum ) + { +- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Wrong checksum for block %llu stripe %llu.", blkid, strpid); ++ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Wrong checksum for block %llu stripe %llu.", (unsigned long long) blkid, (unsigned long long) strpid); + MissingVectorRead(currentBlock, blkid, strpid, timeout); + continue; + } +@@ -1010,7 +1010,7 @@ namespace XrdEc + currentBlock->state[strpid] = block_t::Valid; + bool recoverable = currentBlock->error_correction( currentBlock ); + if(!recoverable) +- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Couldn't recover block %llu.", blkid); ++ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Couldn't recover block %llu.", (unsigned long long) blkid); + } + } + } +@@ -1045,12 +1045,12 @@ namespace XrdEc + + // put received data into given buffers + if(blockMap.find(blkid) == blockMap.end() || blockMap[blkid] == nullptr){ +- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Missing block %llu.", blkid); ++ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Missing block %llu.", (unsigned long long) blkid); + failed = true; + break; + } + if(blockMap[blkid]->state[strpid] != block_t::Valid){ +- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Invalid stripe in block %llu stripe %llu.", blkid, strpid); ++ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Invalid stripe in block %llu stripe %llu.", (unsigned long long) blkid, (unsigned long long) strpid); + failed = true; + break; + } +-- +2.47.1 + diff --git a/0002-Mark-the-client-library-logging-routines-with-__attr.patch b/0002-Mark-the-client-library-logging-routines-with-__attr.patch new file mode 100644 index 0000000..9e7bee5 --- /dev/null +++ b/0002-Mark-the-client-library-logging-routines-with-__attr.patch @@ -0,0 +1,71 @@ +From 0dfc8513fd8179cb33194bf0f2c8d0446c74dc17 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 2 Dec 2024 14:59:01 +0100 +Subject: [PATCH 2/3] Mark the client library logging routines with + __attribute__((format)) so that the compiler can do type checking for format + strings + +--- + src/XrdCl/XrdClLog.hh | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) + +diff --git a/src/XrdCl/XrdClLog.hh b/src/XrdCl/XrdClLog.hh +index bd06d4277..c1d3c32fb 100644 +--- a/src/XrdCl/XrdClLog.hh ++++ b/src/XrdCl/XrdClLog.hh +@@ -135,27 +135,47 @@ namespace XrdCl + //------------------------------------------------------------------------ + //! Report an error + //------------------------------------------------------------------------ +- void Error( uint64_t topic, const char *format, ... ); ++ void Error( uint64_t topic, const char *format, ... ) ++#if defined(__GNUC__) ++ __attribute__ ((__format__ (__printf__, 3, 4))) ++#endif ++ ; + + //------------------------------------------------------------------------ + //! Report a warning + //------------------------------------------------------------------------ +- void Warning( uint64_t topic, const char *format, ... ); ++ void Warning( uint64_t topic, const char *format, ... ) ++#if defined(__GNUC__) ++ __attribute__ ((__format__ (__printf__, 3, 4))) ++#endif ++ ; + + //------------------------------------------------------------------------ + //! Print an info + //------------------------------------------------------------------------ +- void Info( uint64_t topic, const char *format, ... ); ++ void Info( uint64_t topic, const char *format, ... ) ++#if defined(__GNUC__) ++ __attribute__ ((__format__ (__printf__, 3, 4))) ++#endif ++ ; + + //------------------------------------------------------------------------ + //! Print a debug message + //------------------------------------------------------------------------ +- void Debug( uint64_t topic, const char *format, ... ); ++ void Debug( uint64_t topic, const char *format, ... ) ++#if defined(__GNUC__) ++ __attribute__ ((__format__ (__printf__, 3, 4))) ++#endif ++ ; + + //------------------------------------------------------------------------ + //! Print a dump message + //------------------------------------------------------------------------ +- void Dump( uint64_t topic, const char *format, ... ); ++ void Dump( uint64_t topic, const char *format, ... ) ++#if defined(__GNUC__) ++ __attribute__ ((__format__ (__printf__, 3, 4))) ++#endif ++ ; + + //------------------------------------------------------------------------ + //! Always print the message +-- +2.47.1 + diff --git a/0003-Fix-format-errors-found-by-the-compiler.patch b/0003-Fix-format-errors-found-by-the-compiler.patch new file mode 100644 index 0000000..4186a4c --- /dev/null +++ b/0003-Fix-format-errors-found-by-the-compiler.patch @@ -0,0 +1,418 @@ +From e954073730f5ef5f5a1b125366f3c3ee99122b37 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 2 Dec 2024 14:59:49 +0100 +Subject: [PATCH 3/3] Fix format errors found by the compiler + +--- + src/XrdCl/XrdClAsyncVectorReader.hh | 4 ++-- + src/XrdCl/XrdClClassicCopyJob.cc | 20 ++++++++++---------- + src/XrdCl/XrdClFileStateHandler.cc | 16 ++++++++-------- + src/XrdCl/XrdClFileSystem.cc | 4 ++-- + src/XrdCl/XrdClLocalFileHandler.cc | 2 +- + src/XrdCl/XrdClPollerBuiltIn.cc | 6 +++--- + src/XrdCl/XrdClStream.cc | 10 +++++----- + src/XrdCl/XrdClXRootDMsgHandler.cc | 4 ++-- + src/XrdCl/XrdClXRootDTransport.cc | 8 ++++---- + src/XrdCl/XrdClZipArchive.cc | 24 ++++++++++++------------ + src/XrdClHttp/XrdClHttpFilePlugIn.cc | 4 ++-- + tests/XrdCl/XrdClFileTest.cc | 4 ++-- + 12 files changed, 53 insertions(+), 53 deletions(-) + +diff --git a/src/XrdCl/XrdClAsyncVectorReader.hh b/src/XrdCl/XrdClAsyncVectorReader.hh +index 50676b534..caf6a8267 100644 +--- a/src/XrdCl/XrdClAsyncVectorReader.hh ++++ b/src/XrdCl/XrdClAsyncVectorReader.hh +@@ -135,7 +135,7 @@ namespace XrdCl + if( !chfound ) + { + log->Error( XRootDMsg, "[%s] VectorReader: Impossible to find chunk " +- "buffer corresponding to %d bytes at %ld", ++ "buffer corresponding to %d bytes at %lld", + url.GetHostId().c_str(), rdlst.rlen, rdlst.offset ); + readstage = ReadDiscard; + continue; +@@ -181,7 +181,7 @@ namespace XrdCl + if( !st.IsOK() || st.code == suRetry ) + return st; + +- log->Dump( XRootDMsg, "[%s] VectorReader: read buffer for chunk %d@%ld", ++ log->Dump( XRootDMsg, "[%s] VectorReader: read buffer for chunk %d@%lld", + url.GetHostId().c_str(), rdlst.rlen, rdlst.offset ); + + //---------------------------------------------------------------- +diff --git a/src/XrdCl/XrdClClassicCopyJob.cc b/src/XrdCl/XrdClClassicCopyJob.cc +index 7b1d028a8..60a946ee7 100644 +--- a/src/XrdCl/XrdClClassicCopyJob.cc ++++ b/src/XrdCl/XrdClClassicCopyJob.cc +@@ -890,8 +890,8 @@ namespace + + if( !ch->status.IsOK() ) + { +- log->Debug( UtilityMsg, "Unable read %d bytes at %ld from %s: %s", +- ch->chunk.GetLength(), ch->chunk.GetOffset(), ++ log->Debug( UtilityMsg, "Unable read %d bytes at %llu from %s: %s", ++ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), + pUrl->GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); + delete [] (char *)ch->chunk.GetBuffer(); + CleanUpChunks(); +@@ -1458,7 +1458,7 @@ namespace + { + ss << *itr << ", "; + } +- log->Debug( XrdCl::UtilityMsg, ss.str().c_str() ); ++ log->Debug( XrdCl::UtilityMsg, "%s", ss.str().c_str() ); + + pXCpCtx = new XrdCl::XCpCtx( pReplicas, pBlockSize, pNbSrc, pChunkSize, pParallelChunks, fileSize ); + +@@ -1619,7 +1619,7 @@ namespace + if( pCurrentOffset != ci.GetOffset() ) + { + log->Error( UtilityMsg, "Got out-of-bounds chunk, expected offset:" +- " %ld, got %ld", pCurrentOffset, ci.GetOffset() ); ++ " %llu, got %llu", (unsigned long long) pCurrentOffset, (unsigned long long) ci.GetOffset() ); + return XRootDStatus( stError, errInternal ); + } + +@@ -1860,8 +1860,8 @@ namespace + if( !ch->status.IsOK() ) + { + Log *log = DefaultEnv::GetLog(); +- log->Debug( UtilityMsg, "Unable write %d bytes at %ld from %s: %s", +- ch->chunk.GetLength(), ch->chunk.GetOffset(), ++ log->Debug( UtilityMsg, "Unable write %d bytes at %llu from %s: %s", ++ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), + pUrl.GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); + delete[] (char*)ci.GetBuffer(); // we took the ownership of the buffer + CleanUpChunks(); +@@ -2190,8 +2190,8 @@ namespace + if( !ch->status.IsOK() ) + { + Log *log = DefaultEnv::GetLog(); +- log->Debug( UtilityMsg, "Unable write %d bytes at %ld from %s: %s", +- ch->chunk.GetLength(), ch->chunk.GetOffset(), ++ log->Debug( UtilityMsg, "Unable write %d bytes at %llu from %s: %s", ++ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), + pUrl.GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); + CleanUpChunks(); + +@@ -2702,8 +2702,8 @@ namespace XrdCl + //-------------------------------------------------------------------------- + if( src->GetSize() >= 0 && size != total_processed ) + { +- log->Error( UtilityMsg, "The declared source size is %ld bytes, but " +- "received %ld bytes.", size, total_processed ); ++ log->Error( UtilityMsg, "The declared source size is %llu bytes, but " ++ "received %llu bytes.", (unsigned long long) size, (unsigned long long) total_processed ); + return SetResult( stError, errDataError ); + } + pResults->Set( "size", total_processed ); +diff --git a/src/XrdCl/XrdClFileStateHandler.cc b/src/XrdCl/XrdClFileStateHandler.cc +index 2560bb856..d7067e653 100644 +--- a/src/XrdCl/XrdClFileStateHandler.cc ++++ b/src/XrdCl/XrdClFileStateHandler.cc +@@ -1415,21 +1415,21 @@ namespace XrdCl + if( inf->NeedRetry() ) // so we failed in the end + { + DefaultEnv::GetLog()->Warning( FileMsg, "[%p@%s] Failed retransmitting corrupted " +- "page: pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), +- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); ++ "page: pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), ++ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); + pgwrt->SetStatus( new XRootDStatus( stError, errDataError, 0, + "Failed to retransmit corrupted page" ) ); + } + else + DefaultEnv::GetLog()->Info( FileMsg, "[%p@%s] Succesfuly retransmitted corrupted " +- "page: pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), +- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); ++ "page: pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), ++ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); + } ); + auto st = PgWriteRetry( self, pgoff, pglen, pgbuf, pgdigest, h, timeout ); + if( !st.IsOK() ) pgwrt->SetStatus( new XRootDStatus( st ) ); + DefaultEnv::GetLog()->Info( FileMsg, "[%p@%s] Retransmitting corrupted page: " +- "pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), +- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); ++ "pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), ++ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); + } + } ); + +@@ -2420,9 +2420,9 @@ namespace XrdCl + } + + log->Debug( FileMsg, "[%p@%s] successfully opened at %s, handle: %#x, " +- "session id: %ld", this, pFileUrl->GetObfuscatedURL().c_str(), ++ "session id: %llu", this, pFileUrl->GetObfuscatedURL().c_str(), + pDataServer->GetHostId().c_str(), *((uint32_t*)pFileHandle), +- pSessionId ); ++ (unsigned long long) pSessionId ); + + //------------------------------------------------------------------------ + // Inform the monitoring about opening success +diff --git a/src/XrdCl/XrdClFileSystem.cc b/src/XrdCl/XrdClFileSystem.cc +index 2f0a14c62..f2694dcff 100644 +--- a/src/XrdCl/XrdClFileSystem.cc ++++ b/src/XrdCl/XrdClFileSystem.cc +@@ -75,7 +75,7 @@ namespace + std::ostringstream data; + data << ssp.st_dev << " " << ssp.st_size << " " << flags << " " + << ssp.st_mtime; +- log->Debug( FileMsg, data.str().c_str() ); ++ log->Debug( FileMsg, "%s", data.str().c_str() ); + + StatInfo *statInfo = new StatInfo(); + if( !statInfo->ParseServerResponse( data.str().c_str() ) ) +@@ -641,7 +641,7 @@ namespace + XRootDStatus st = pCtx->fs->DirList( child, flags, handler, timeout ); + if( !st.IsOK() ) + { +- log->Error( FileMsg, "Recursive directory list operation for %s failed: ", ++ log->Error( FileMsg, "Recursive directory list operation for %s failed: %s", + child.c_str(), st.ToString().c_str() ); + pCtx->UpdateStatus( st ); + continue; +diff --git a/src/XrdCl/XrdClLocalFileHandler.cc b/src/XrdCl/XrdClLocalFileHandler.cc +index db82d6c47..2c0111ccb 100644 +--- a/src/XrdCl/XrdClLocalFileHandler.cc ++++ b/src/XrdCl/XrdClLocalFileHandler.cc +@@ -298,7 +298,7 @@ namespace XrdCl + std::ostringstream data; + data << ssp.st_dev << " " << ssp.st_size << " " << ssp.st_mode << " " + << ssp.st_mtime; +- log->Debug( FileMsg, data.str().c_str() ); ++ log->Debug( FileMsg, "%s", data.str().c_str() ); + + StatInfo *statInfo = new StatInfo(); + if( !statInfo->ParseServerResponse( data.str().c_str() ) ) +diff --git a/src/XrdCl/XrdClPollerBuiltIn.cc b/src/XrdCl/XrdClPollerBuiltIn.cc +index 34f832908..804438da9 100644 +--- a/src/XrdCl/XrdClPollerBuiltIn.cc ++++ b/src/XrdCl/XrdClPollerBuiltIn.cc +@@ -142,7 +142,7 @@ namespace XrdCl + XrdSys::IOEvents::Poller* poller = IOEvents::Poller::Create( errNum, &errMsg ); + if( !poller ) + { +- log->Error( PollerMsg, "Unable to create the internal poller object: ", ++ log->Error( PollerMsg, "Unable to create the internal poller object: " + "%s (%s)", XrdSysE2T( errno ), errMsg ); + return false; + } +@@ -170,7 +170,7 @@ namespace XrdCl + helper->readTimeout, &errMsg ); + if( !status ) + { +- log->Error( PollerMsg, "Unable to enable read notifications ", ++ log->Error( PollerMsg, "Unable to enable read notifications " + "while re-starting %s (%s)", XrdSysE2T( errno ), errMsg ); + + return false; +@@ -183,7 +183,7 @@ namespace XrdCl + helper->writeTimeout, &errMsg ); + if( !status ) + { +- log->Error( PollerMsg, "Unable to enable write notifications ", ++ log->Error( PollerMsg, "Unable to enable write notifications " + "while re-starting %s (%s)", XrdSysE2T( errno ), errMsg ); + + return false; +diff --git a/src/XrdCl/XrdClStream.cc b/src/XrdCl/XrdClStream.cc +index a80f8e1d0..e8177c111 100644 +--- a/src/XrdCl/XrdClStream.cc ++++ b/src/XrdCl/XrdClStream.cc +@@ -598,7 +598,7 @@ namespace XrdCl + { + Log *log = DefaultEnv::GetLog(); + log->Warning( PostMasterMsg, "[%s] Removed a leftover msg from the in-queue.", +- pStreamName.c_str(), subStream ); ++ pStreamName.c_str() ); + } + } + pSubStreams[subStream]->outMsgHelper.Reset(); +@@ -745,8 +745,8 @@ namespace XrdCl + // Check if we still have time to try and do something in the current window + //-------------------------------------------------------------------------- + time_t elapsed = now-pConnectionInitTime; +- log->Error( PostMasterMsg, "[%s] elapsed = %ld, pConnectionWindow = %d seconds.", +- pStreamName.c_str(), elapsed, pConnectionWindow ); ++ log->Error( PostMasterMsg, "[%s] elapsed = %lld, pConnectionWindow = %d seconds.", ++ pStreamName.c_str(), (long long) elapsed, pConnectionWindow ); + + //------------------------------------------------------------------------ + // If we have some IP addresses left we try them +@@ -775,8 +775,8 @@ namespace XrdCl + else if( elapsed < pConnectionWindow && pConnectionCount < pConnectionRetry + && !status.IsFatal() ) + { +- log->Info( PostMasterMsg, "[%s] Attempting reconnection in %ld seconds.", +- pStreamName.c_str(), pConnectionWindow-elapsed ); ++ log->Info( PostMasterMsg, "[%s] Attempting reconnection in %lld seconds.", ++ pStreamName.c_str(), (long long) (pConnectionWindow - elapsed) ); + + Task *task = new ::StreamConnectorTask( *pUrl, pStreamName ); + pTaskManager->RegisterTask( task, pConnectionInitTime+pConnectionWindow ); +diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc +index 0e93e2cd5..cc9504944 100644 +--- a/src/XrdCl/XrdClXRootDMsgHandler.cc ++++ b/src/XrdCl/XrdClXRootDMsgHandler.cc +@@ -2438,9 +2438,9 @@ namespace XrdCl + + Log *log = DefaultEnv::GetLog(); + if( warn ) +- log->Warning( XRootDMsg, sstrm.str().c_str() ); ++ log->Warning( XRootDMsg, "%s", sstrm.str().c_str() ); + else +- log->Debug( XRootDMsg, sstrm.str().c_str() ); ++ log->Debug( XRootDMsg, "%s", sstrm.str().c_str() ); + } + + // Read data from buffer +diff --git a/src/XrdCl/XrdClXRootDTransport.cc b/src/XrdCl/XrdClXRootDTransport.cc +index b98e0695f..99f329576 100644 +--- a/src/XrdCl/XrdClXRootDTransport.cc ++++ b/src/XrdCl/XrdClXRootDTransport.cc +@@ -764,9 +764,9 @@ namespace XrdCl + //-------------------------------------------------------------------------- + XrdSysMutexHelper scopedLock( info->mutex ); + uint16_t allocatedSIDs = info->sidManager->GetNumberOfAllocatedSIDs(); +- log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %ld seconds, " ++ log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %lld seconds, " + "TTL: %d, allocated SIDs: %d, open files: %d, bound file objects: %d", +- info->streamName.c_str(), inactiveTime, ttl, allocatedSIDs, ++ info->streamName.c_str(), (long long) inactiveTime, ttl, allocatedSIDs, + info->openFiles, info->finstcnt.load( std::memory_order_relaxed ) ); + + if( info->openFiles != 0 && info->finstcnt.load( std::memory_order_relaxed ) != 0 ) +@@ -799,9 +799,9 @@ namespace XrdCl + const bool anySID = + info->sidManager->IsAnySIDOldAs( now - streamTimeout ); + +- log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %ld seconds, " ++ log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %lld seconds, " + "stream timeout: %d, any SID: %d, wait barrier: %s", +- info->streamName.c_str(), inactiveTime, streamTimeout, ++ info->streamName.c_str(), (long long) inactiveTime, streamTimeout, + anySID, Utils::TimeToString(info->waitBarrier).c_str() ); + + if( inactiveTime < streamTimeout ) +diff --git a/src/XrdCl/XrdClZipArchive.cc b/src/XrdCl/XrdClZipArchive.cc +index d6e6b5219..0a648a8b3 100644 +--- a/src/XrdCl/XrdClZipArchive.cc ++++ b/src/XrdCl/XrdClZipArchive.cc +@@ -156,8 +156,8 @@ namespace XrdCl + [relativeOffset, rdbuff, &cache, &me]( XRootDStatus &st, RSP &rsp ) + { + Log *log = DefaultEnv::GetLog(); +- log->Dump( ZipMsg, "[%p] Read %d bytes of remote data at offset %llu.", +- &me, rsp.GetLength(), rsp.GetOffset() ); ++ log->Dump( ZipMsg, "[%p] Read %u bytes of remote data at offset %llu.", ++ &me, rsp.GetLength(), (unsigned long long) rsp.GetOffset() ); + cache.QueueRsp( st, relativeOffset, std::move( *rdbuff ) ); + }; + Async( std::move( p ), timeout ); +@@ -187,8 +187,8 @@ namespace XrdCl + Pipeline p = XrdCl::RdWithRsp( me.archive, offset, size, usrbuff ) >> + [=, &me]( XRootDStatus &st, RSP &r ) + { +- log->Dump( ZipMsg, "[%p] Read %d bytes of remote data at " +- "offset %llu.", &me, r.GetLength(), r.GetOffset() ); ++ log->Dump( ZipMsg, "[%p] Read %u bytes of remote data at " ++ "offset %llu.", &me, r.GetLength(), (unsigned long long) r.GetOffset() ); + if( usrHandler ) + { + XRootDStatus *status = ZipArchive::make_status( st ); +@@ -298,7 +298,7 @@ namespace XrdCl + rdbuff = buffer.get(); + openstage = HaveEocdBlk; + log->Dump( ZipMsg, "[%p] Opened a ZIP archive, reading " +- "Central Directory at offset: %llu.", this, *rdoff ); ++ "Central Directory at offset: %llu.", this, (unsigned long long) *rdoff ); + } + // read the Central Directory (in several stages if necessary) + | XrdCl::Read( archive, rdoff, rdsize, rdbuff ) >> +@@ -327,12 +327,12 @@ namespace XrdCl + log->Dump( ZipMsg, "[%p] EOCD record parsed: %s", this, + eocd->ToString().c_str() ); + if(eocd->cdOffset > archsize || eocd->cdOffset + eocd->cdSize > archsize) +- throw bad_data(); ++ throw bad_data(); + } + catch(const bad_data &ex){ +- XRootDStatus error( stError, errDataError, 0, +- "End-of-central-directory signature corrupted." ); +- Pipeline::Stop( error ); ++ XRootDStatus error( stError, errDataError, 0, ++ "End-of-central-directory signature corrupted." ); ++ Pipeline::Stop( error ); + } + // Do we have the whole archive? + if( chunk.length == archsize ) +@@ -372,7 +372,7 @@ namespace XrdCl + rdbuff = buffer.get(); + openstage = HaveCdRecords; + log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", +- this, *rdoff ); ++ this, (unsigned long long) *rdoff ); + Pipeline::Repeat(); break; // the break is really not needed ... + } + +@@ -391,7 +391,7 @@ namespace XrdCl + rdbuff = buffer.get(); + openstage = HaveZip64EocdBlk; + log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", +- this, *rdoff ); ++ this, (unsigned long long) *rdoff ); + Pipeline::Repeat(); + } + +@@ -423,7 +423,7 @@ namespace XrdCl + rdbuff = buffer.get(); + openstage = HaveCdRecords; + log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", +- this, *rdoff ); ++ this, (unsigned long long) *rdoff ); + Pipeline::Repeat(); break; // the break is really not needed ... + } + +diff --git a/src/XrdClHttp/XrdClHttpFilePlugIn.cc b/src/XrdClHttp/XrdClHttpFilePlugIn.cc +index e23f8ec16..c64b4ea30 100644 +--- a/src/XrdClHttp/XrdClHttpFilePlugIn.cc ++++ b/src/XrdClHttp/XrdClHttpFilePlugIn.cc +@@ -273,7 +273,7 @@ XRootDStatus HttpFilePlugIn::Read(uint64_t offset, uint32_t size, void *buffer, + if (avoid_pread_) offset_locker.unlock(); + + logger_->Debug(kLogXrdClHttp, "Read %d bytes, at offset %llu, from URL: %s", +- num_bytes_read, offset, url_.c_str()); ++ num_bytes_read, (unsigned long long) offset, url_.c_str()); + + auto status = new XRootDStatus(); + auto chunk_info = new ChunkInfo(offset, num_bytes_read, buffer); +@@ -370,7 +370,7 @@ XRootDStatus HttpFilePlugIn::Write(uint64_t offset, uint32_t size, + filesize += res.first; + + logger_->Debug(kLogXrdClHttp, "Wrote %d bytes, at offset %llu, to URL: %s", +- res.first, offset, url_.c_str()); ++ res.first, (unsigned long long) offset, url_.c_str()); + + handler->HandleResponse(new XRootDStatus(), nullptr); + +diff --git a/tests/XrdCl/XrdClFileTest.cc b/tests/XrdCl/XrdClFileTest.cc +index b30411b82..9ca92c3a2 100644 +--- a/tests/XrdCl/XrdClFileTest.cc ++++ b/tests/XrdCl/XrdClFileTest.cc +@@ -643,10 +643,10 @@ void FileTest::VectorWriteTest() + const uint32_t MB = 1024*1024; + const uint32_t limit = 10*MB; + +- time_t seed = time( 0 ); ++ unsigned int seed = (unsigned int) time( 0 ); + srand( seed ); + DefaultEnv::GetLog()->Info( UtilityMsg, +- "Carrying out the VectorWrite test with seed: %d", seed ); ++ "Carrying out the VectorWrite test with seed: %u", seed ); + + // figure out how many chunks are we going to write/read + size_t nbChunks = rand() % 100 + 1; +-- +2.47.1 + diff --git a/xrootd.spec b/xrootd.spec index f272e14..35e953b 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,11 +14,16 @@ Name: xrootd Epoch: 1 Version: 5.7.2 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz +# Fix errors in format strings +# https://github.com/xrootd/xrootd/pull/2380 +Patch0: 0001-Use-correct-format-for-size_t.patch +Patch1: 0002-Mark-the-client-library-logging-routines-with-__attr.patch +Patch2: 0003-Fix-format-errors-found-by-the-compiler.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -255,6 +260,9 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 %build %cmake \ @@ -390,7 +398,8 @@ XrdCl::ThreadingTest|\ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::|\ -XRootD::cluster::test" +XRootD::cluster::test|\ +XRootD::http::test" %ctest -- -E $exclude fi rm testfile @@ -645,6 +654,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sun Dec 08 2024 Mattias Ellert - 1:5.7.2-2 +- Fix errors in format strings + * Fri Nov 29 2024 Mattias Ellert - 1:5.7.2-1 - Update to version 5.7.2 - Drop patches accepted upstream From d77792cf7c75179fe6dc862d85b70e0cecdd9b34 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 19 Jan 2025 06:57:55 +0100 Subject: [PATCH 10/37] Fix compilation errors with GCC 15 --- 0001-Fix-compilation-errors-with-GCC-15.patch | 67 +++++++++++++++++++ xrootd.spec | 8 ++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-compilation-errors-with-GCC-15.patch diff --git a/0001-Fix-compilation-errors-with-GCC-15.patch b/0001-Fix-compilation-errors-with-GCC-15.patch new file mode 100644 index 0000000..711f431 --- /dev/null +++ b/0001-Fix-compilation-errors-with-GCC-15.patch @@ -0,0 +1,67 @@ +From 0a6d26c8dfd8e2598d8b720c5eadc24f050e0349 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sun, 19 Jan 2025 06:52:57 +0100 +Subject: [PATCH] Fix compilation errors with GCC 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In file included from /usr/include/features.h:524, + from /usr/include/c++/15/x86_64-redhat-linux/bits/os_defines.h:39, + from /usr/include/c++/15/x86_64-redhat-linux/bits/c++config.h:2622, + from /usr/include/c++/15/cstdio:46, + from /builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/XrdSut/XrdSutPFile.cc:29: +In function ‘read’, + inlined from ‘XrdSutPFile::ReadInd(int, XrdSutPFEntInd&)’ at /builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/XrdSut/XrdSutPFile.cc:1525:24: +/usr/include/bits/unistd.h:32:10: error: ‘*read’ specified size 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] + 32 | return __glibc_fortify (read, __nbytes, sizeof (char), + | ^~~~~~~~~~~~~~~ +/usr/include/bits/unistd-decl.h: In member function ‘XrdSutPFile::ReadInd(int, XrdSutPFEntInd&)’: +/usr/include/bits/unistd-decl.h:29:16: note: in a call to function ‘*read’ declared with attribute ‘access (write_only, 2, 3)’ + 29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void *__buf, + | ^~~~~~~~~~~~~~~~~~ + +/builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/Xrd/XrdLinkCtl.cc: In function ‘Alloc’: +/builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/Xrd/XrdLinkCtl.cc:130:59: error: argument 1 value ‘4294967295’ exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=] + 130 | XrdLinkCtl **blp, *nlp = new XrdLinkCtl[LinkAlloc](); + | ^ +/usr/include/c++/15/new:140:26: note: in a call to allocation function ‘operator new []’ declared here + 140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) + | ^ +--- + src/Xrd/XrdLinkCtl.cc | 4 +++- + src/XrdSut/XrdSutPFile.cc | 3 ++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/Xrd/XrdLinkCtl.cc b/src/Xrd/XrdLinkCtl.cc +index 351c28561..ec65c4733 100644 +--- a/src/Xrd/XrdLinkCtl.cc ++++ b/src/Xrd/XrdLinkCtl.cc +@@ -127,7 +127,9 @@ XrdLink *XrdLinkCtl::Alloc(XrdNetAddr &peer, int opts) + // + if (!(lp = LinkTab[peerFD])) + {unsigned int i; +- XrdLinkCtl **blp, *nlp = new XrdLinkCtl[LinkAlloc](); ++ XrdLinkCtl **blp, *nlp = 0; ++ if (LinkAlloc <= std::size_t(-1) / 2 / sizeof(XrdLinkCtl)) ++ nlp = new XrdLinkCtl[LinkAlloc](); + if (!nlp) + {LTMutex.UnLock(); + Log.Emsg("Link", ENOMEM, "create link"); +diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc +index b07648dc5..50d293f1b 100644 +--- a/src/XrdSut/XrdSutPFile.cc ++++ b/src/XrdSut/XrdSutPFile.cc +@@ -1520,7 +1520,8 @@ kXR_int32 XrdSutPFile::ReadInd(kXR_int32 ofs, XrdSutPFEntInd &ind) + ind.name = 0; + } + if (lnam) { +- ind.name = new char[lnam+1]; ++ if (lnam > 0) ++ ind.name = new char[lnam+1]; + if (ind.name) { + if ((nr = read(fFd,ind.name,lnam)) != lnam) + return Err(kPFErrRead,"ReadInd",(const char *)&fFd); +-- +2.48.0 + diff --git a/xrootd.spec b/xrootd.spec index 35e953b..1207497 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.7.2 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.web.cern.ch @@ -24,6 +24,8 @@ Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz Patch0: 0001-Use-correct-format-for-size_t.patch Patch1: 0002-Mark-the-client-library-logging-routines-with-__attr.patch Patch2: 0003-Fix-format-errors-found-by-the-compiler.patch +# https://github.com/xrootd/xrootd/pull/2411 +Patch3: 0001-Fix-compilation-errors-with-GCC-15.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -263,6 +265,7 @@ This package contains the API documentation of the xrootd libraries. %patch -P0 -p1 %patch -P1 -p1 %patch -P2 -p1 +%patch -P3 -p1 %build %cmake \ @@ -654,6 +657,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sun Jan 19 2025 Mattias Ellert - 1:5.7.2-3 +- Fix compilation errors with GCC 15 + * Sun Dec 08 2024 Mattias Ellert - 1:5.7.2-2 - Fix errors in format strings From c279cfe4c032fb2f757fc382d90208cafd9dfb9f Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 24 Jan 2025 08:47:32 +0100 Subject: [PATCH 11/37] Use CMAKE_BUILD_TYPE RelWithDebInfo to avoid -Werror in compiler flags --- xrootd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 1207497..86a173d 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.7.2 -Release: 3%{?dist} +Release: 4%{?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 URL: https://xrootd.web.cern.ch @@ -269,6 +269,7 @@ This package contains the API documentation of the xrootd libraries. %build %cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DFORCE_ENABLED:BOOL=ON \ -DENABLE_TESTS:BOOL=ON \ %if %{ceph} @@ -657,6 +658,9 @@ fi %doc %{_pkgdocdir} %changelog +* Thu Jan 23 2025 Mattias Ellert - 1:5.7.2-4 +- Use CMAKE_BUILD_TYPE RelWithDebInfo to avoid -Werror in compiler flags + * Sun Jan 19 2025 Mattias Ellert - 1:5.7.2-3 - Fix compilation errors with GCC 15 From 546174db8d32f17da17c95e56420c6edc429dbac Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 30 Jan 2025 13:11:38 +0100 Subject: [PATCH 12/37] Update to version 5.7.3 Drop patches accepted upstream --- 0001-Fix-compilation-errors-with-GCC-15.patch | 67 --- 0001-Use-correct-format-for-size_t.patch | 193 -------- ...library-logging-routines-with-__attr.patch | 71 --- ...-format-errors-found-by-the-compiler.patch | 418 ------------------ sources | 2 +- xrootd.spec | 19 +- 6 files changed, 7 insertions(+), 763 deletions(-) delete mode 100644 0001-Fix-compilation-errors-with-GCC-15.patch delete mode 100644 0001-Use-correct-format-for-size_t.patch delete mode 100644 0002-Mark-the-client-library-logging-routines-with-__attr.patch delete mode 100644 0003-Fix-format-errors-found-by-the-compiler.patch diff --git a/0001-Fix-compilation-errors-with-GCC-15.patch b/0001-Fix-compilation-errors-with-GCC-15.patch deleted file mode 100644 index 711f431..0000000 --- a/0001-Fix-compilation-errors-with-GCC-15.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0a6d26c8dfd8e2598d8b720c5eadc24f050e0349 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sun, 19 Jan 2025 06:52:57 +0100 -Subject: [PATCH] Fix compilation errors with GCC 15 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In file included from /usr/include/features.h:524, - from /usr/include/c++/15/x86_64-redhat-linux/bits/os_defines.h:39, - from /usr/include/c++/15/x86_64-redhat-linux/bits/c++config.h:2622, - from /usr/include/c++/15/cstdio:46, - from /builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/XrdSut/XrdSutPFile.cc:29: -In function ‘read’, - inlined from ‘XrdSutPFile::ReadInd(int, XrdSutPFEntInd&)’ at /builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/XrdSut/XrdSutPFile.cc:1525:24: -/usr/include/bits/unistd.h:32:10: error: ‘*read’ specified size 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] - 32 | return __glibc_fortify (read, __nbytes, sizeof (char), - | ^~~~~~~~~~~~~~~ -/usr/include/bits/unistd-decl.h: In member function ‘XrdSutPFile::ReadInd(int, XrdSutPFEntInd&)’: -/usr/include/bits/unistd-decl.h:29:16: note: in a call to function ‘*read’ declared with attribute ‘access (write_only, 2, 3)’ - 29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void *__buf, - | ^~~~~~~~~~~~~~~~~~ - -/builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/Xrd/XrdLinkCtl.cc: In function ‘Alloc’: -/builddir/build/BUILD/xrootd-5.7.2-build/xrootd-5.7.2/src/Xrd/XrdLinkCtl.cc:130:59: error: argument 1 value ‘4294967295’ exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=] - 130 | XrdLinkCtl **blp, *nlp = new XrdLinkCtl[LinkAlloc](); - | ^ -/usr/include/c++/15/new:140:26: note: in a call to allocation function ‘operator new []’ declared here - 140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) - | ^ ---- - src/Xrd/XrdLinkCtl.cc | 4 +++- - src/XrdSut/XrdSutPFile.cc | 3 ++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/Xrd/XrdLinkCtl.cc b/src/Xrd/XrdLinkCtl.cc -index 351c28561..ec65c4733 100644 ---- a/src/Xrd/XrdLinkCtl.cc -+++ b/src/Xrd/XrdLinkCtl.cc -@@ -127,7 +127,9 @@ XrdLink *XrdLinkCtl::Alloc(XrdNetAddr &peer, int opts) - // - if (!(lp = LinkTab[peerFD])) - {unsigned int i; -- XrdLinkCtl **blp, *nlp = new XrdLinkCtl[LinkAlloc](); -+ XrdLinkCtl **blp, *nlp = 0; -+ if (LinkAlloc <= std::size_t(-1) / 2 / sizeof(XrdLinkCtl)) -+ nlp = new XrdLinkCtl[LinkAlloc](); - if (!nlp) - {LTMutex.UnLock(); - Log.Emsg("Link", ENOMEM, "create link"); -diff --git a/src/XrdSut/XrdSutPFile.cc b/src/XrdSut/XrdSutPFile.cc -index b07648dc5..50d293f1b 100644 ---- a/src/XrdSut/XrdSutPFile.cc -+++ b/src/XrdSut/XrdSutPFile.cc -@@ -1520,7 +1520,8 @@ kXR_int32 XrdSutPFile::ReadInd(kXR_int32 ofs, XrdSutPFEntInd &ind) - ind.name = 0; - } - if (lnam) { -- ind.name = new char[lnam+1]; -+ if (lnam > 0) -+ ind.name = new char[lnam+1]; - if (ind.name) { - if ((nr = read(fFd,ind.name,lnam)) != lnam) - return Err(kPFErrRead,"ReadInd",(const char *)&fFd); --- -2.48.0 - diff --git a/0001-Use-correct-format-for-size_t.patch b/0001-Use-correct-format-for-size_t.patch deleted file mode 100644 index 1c485d5..0000000 --- a/0001-Use-correct-format-for-size_t.patch +++ /dev/null @@ -1,193 +0,0 @@ -From e6f75e2386fdf3b7978a55a9cedb59364dc80596 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sun, 1 Dec 2024 10:24:56 +0100 -Subject: [PATCH 1/3] Use correct format for size_t - -The format for some size_t variables were recently changed from %d to -%llu. This fixed a problem on 64 bit architectures, since there size_t -is 64 bits wide and %d is the format for a 32 bit type and %llu is the -format for a 64 bit type. However, this change introduced a regression -on 32 bit architectures where size_t is 32 bits wide. - -This change caused some of the tests to fail with a segmentation fault -on the Debian armhf architecture: - -The following tests FAILED: - 108 - XRootD::noauth::test (Failed) - 111 - XRootD::host::test (Failed) - 114 - XRootD::unix::test (Failed) - 117 - XRootD::sss::test (Failed) - 120 - XRootD::http::test (Failed) - -This commit adds a type cast so that the new format works for all -architectures. ---- - src/XrdCl/XrdClCopyProcess.cc | 2 +- - src/XrdCl/XrdClFileStateHandler.cc | 14 ++++++++------ - src/XrdCl/XrdClJobManager.cc | 2 +- - src/XrdCl/XrdClStream.cc | 2 +- - src/XrdCl/XrdClUtils.cc | 2 +- - src/XrdEc/XrdEcReader.cc | 10 +++++----- - 6 files changed, 17 insertions(+), 15 deletions(-) - -diff --git a/src/XrdCl/XrdClCopyProcess.cc b/src/XrdCl/XrdClCopyProcess.cc -index 816268a20..c6e669de5 100644 ---- a/src/XrdCl/XrdClCopyProcess.cc -+++ b/src/XrdCl/XrdClCopyProcess.cc -@@ -369,7 +369,7 @@ namespace XrdCl - std::vector::iterator it; - - log->Debug( UtilityMsg, "CopyProcess: %llu jobs to prepare", -- pImpl->pJobProperties.size() ); -+ (unsigned long long) pImpl->pJobProperties.size() ); - - std::map targetFlags; - int i = 0; -diff --git a/src/XrdCl/XrdClFileStateHandler.cc b/src/XrdCl/XrdClFileStateHandler.cc -index 1688a3da8..2560bb856 100644 ---- a/src/XrdCl/XrdClFileStateHandler.cc -+++ b/src/XrdCl/XrdClFileStateHandler.cc -@@ -167,7 +167,7 @@ namespace - { - Log *log = DefaultEnv::GetLog(); - log->Info( FileMsg, "[%p@%s] Received corrupted page, will retry page #%llu.", -- this, stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); -+ this, stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); - - XRootDStatus st = XrdCl::FileStateHandler::PgReadRetry( stateHandler, pgoff, pgsize, pgnb, buffer, this, 0 ); - if( !st.IsOK()) -@@ -258,7 +258,7 @@ namespace - { - Log *log = DefaultEnv::GetLog(); - log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", -- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); -+ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); - pgReadHandler->HandleResponseWithHosts( status, response, hostList ); - delete this; - return; -@@ -270,7 +270,7 @@ namespace - { - Log *log = DefaultEnv::GetLog(); - log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", -- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); -+ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); - // we retry a page at a time so the length cannot exceed 4KB - DeleteArgs( status, response, hostList ); - pgReadHandler->HandleResponseWithHosts( new XRootDStatus( stError, errDataError ), 0, 0 ); -@@ -283,7 +283,7 @@ namespace - { - Log *log = DefaultEnv::GetLog(); - log->Info( FileMsg, "[%p@%s] Failed to recover page #%llu.", -- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); -+ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); - DeleteArgs( status, response, hostList ); - pgReadHandler->HandleResponseWithHosts( new XRootDStatus( stError, errDataError ), 0, 0 ); - delete this; -@@ -292,7 +292,7 @@ namespace - - Log *log = DefaultEnv::GetLog(); - log->Info( FileMsg, "[%p@%s] Successfully recovered page #%llu.", -- this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), pgnb ); -+ this, pgReadHandler->stateHandler->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgnb ); - - DeleteArgs( 0, response, hostList ); - pgReadHandler->UpdateCksum( pgnb, crcval ); -@@ -2460,7 +2460,9 @@ namespace XrdCl - status->ToStr().c_str() ); - - log->Dump(FileMsg, "[%p@%s] Items in the fly %llu, queued for recovery %llu", -- this, pFileUrl->GetObfuscatedURL().c_str(), pInTheFly.size(), pToBeRecovered.size() ); -+ this, pFileUrl->GetObfuscatedURL().c_str(), -+ (unsigned long long) pInTheFly.size(), -+ (unsigned long long) pToBeRecovered.size() ); - - MonitorClose( status ); - ResetMonitoringVars(); -diff --git a/src/XrdCl/XrdClJobManager.cc b/src/XrdCl/XrdClJobManager.cc -index d34246065..60e9eca90 100644 ---- a/src/XrdCl/XrdClJobManager.cc -+++ b/src/XrdCl/XrdClJobManager.cc -@@ -83,7 +83,7 @@ namespace XrdCl - } - } - pRunning = true; -- log->Debug( JobMgrMsg, "Job manager started, %llu workers", pWorkers.size() ); -+ log->Debug( JobMgrMsg, "Job manager started, %llu workers", (unsigned long long) pWorkers.size() ); - return true; - } - -diff --git a/src/XrdCl/XrdClStream.cc b/src/XrdCl/XrdClStream.cc -index 97f260099..a80f8e1d0 100644 ---- a/src/XrdCl/XrdClStream.cc -+++ b/src/XrdCl/XrdClStream.cc -@@ -648,7 +648,7 @@ namespace XrdCl - if( pSubStreams.size() > 1 ) - { - log->Debug( PostMasterMsg, "[%s] Attempting to connect %llu additional streams.", -- pStreamName.c_str(), pSubStreams.size()-1 ); -+ pStreamName.c_str(), (unsigned long long) (pSubStreams.size() - 1) ); - for( size_t i = 1; i < pSubStreams.size(); ++i ) - { - pSubStreams[i]->socket->SetAddress( pSubStreams[0]->socket->GetAddress() ); -diff --git a/src/XrdCl/XrdClUtils.cc b/src/XrdCl/XrdClUtils.cc -index ec1c67bae..9546c595b 100644 ---- a/src/XrdCl/XrdClUtils.cc -+++ b/src/XrdCl/XrdClUtils.cc -@@ -247,7 +247,7 @@ namespace XrdCl - } - addrStr.erase( addrStr.length()-2, 2 ); - log->Debug( type, "[%s] Found %llu address(es): %s", -- hostId.c_str(), addresses.size(), addrStr.c_str() ); -+ hostId.c_str(), (unsigned long long) addresses.size(), addrStr.c_str() ); - } - - //---------------------------------------------------------------------------- -diff --git a/src/XrdEc/XrdEcReader.cc b/src/XrdEc/XrdEcReader.cc -index bebf65023..ccba6bae6 100644 ---- a/src/XrdEc/XrdEcReader.cc -+++ b/src/XrdEc/XrdEcReader.cc -@@ -980,7 +980,7 @@ namespace XrdEc - - if(!st.IsOK()) - { -- log->Dump(XrdCl::XRootDMsg, "EC Vector Read of host %llu failed entirely.", i); -+ log->Dump(XrdCl::XRootDMsg, "EC Vector Read of host %llu failed entirely.", (unsigned long long) i); - MissingVectorRead(currentBlock, blkid, strpid, timeout); - } - else{ -@@ -1002,7 +1002,7 @@ namespace XrdEc - uint32_t cksum = objcfg.digest( 0, currentBlock->stripes[strpid].data(), currentBlock->stripes[strpid].size() ); - if( orgcksum != cksum ) - { -- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Wrong checksum for block %llu stripe %llu.", blkid, strpid); -+ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Wrong checksum for block %llu stripe %llu.", (unsigned long long) blkid, (unsigned long long) strpid); - MissingVectorRead(currentBlock, blkid, strpid, timeout); - continue; - } -@@ -1010,7 +1010,7 @@ namespace XrdEc - currentBlock->state[strpid] = block_t::Valid; - bool recoverable = currentBlock->error_correction( currentBlock ); - if(!recoverable) -- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Couldn't recover block %llu.", blkid); -+ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Couldn't recover block %llu.", (unsigned long long) blkid); - } - } - } -@@ -1045,12 +1045,12 @@ namespace XrdEc - - // put received data into given buffers - if(blockMap.find(blkid) == blockMap.end() || blockMap[blkid] == nullptr){ -- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Missing block %llu.", blkid); -+ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Missing block %llu.", (unsigned long long) blkid); - failed = true; - break; - } - if(blockMap[blkid]->state[strpid] != block_t::Valid){ -- log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Invalid stripe in block %llu stripe %llu.", blkid, strpid); -+ log->Dump(XrdCl::XRootDMsg, "EC Vector Read: Invalid stripe in block %llu stripe %llu.", (unsigned long long) blkid, (unsigned long long) strpid); - failed = true; - break; - } --- -2.47.1 - diff --git a/0002-Mark-the-client-library-logging-routines-with-__attr.patch b/0002-Mark-the-client-library-logging-routines-with-__attr.patch deleted file mode 100644 index 9e7bee5..0000000 --- a/0002-Mark-the-client-library-logging-routines-with-__attr.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0dfc8513fd8179cb33194bf0f2c8d0446c74dc17 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 2 Dec 2024 14:59:01 +0100 -Subject: [PATCH 2/3] Mark the client library logging routines with - __attribute__((format)) so that the compiler can do type checking for format - strings - ---- - src/XrdCl/XrdClLog.hh | 30 +++++++++++++++++++++++++----- - 1 file changed, 25 insertions(+), 5 deletions(-) - -diff --git a/src/XrdCl/XrdClLog.hh b/src/XrdCl/XrdClLog.hh -index bd06d4277..c1d3c32fb 100644 ---- a/src/XrdCl/XrdClLog.hh -+++ b/src/XrdCl/XrdClLog.hh -@@ -135,27 +135,47 @@ namespace XrdCl - //------------------------------------------------------------------------ - //! Report an error - //------------------------------------------------------------------------ -- void Error( uint64_t topic, const char *format, ... ); -+ void Error( uint64_t topic, const char *format, ... ) -+#if defined(__GNUC__) -+ __attribute__ ((__format__ (__printf__, 3, 4))) -+#endif -+ ; - - //------------------------------------------------------------------------ - //! Report a warning - //------------------------------------------------------------------------ -- void Warning( uint64_t topic, const char *format, ... ); -+ void Warning( uint64_t topic, const char *format, ... ) -+#if defined(__GNUC__) -+ __attribute__ ((__format__ (__printf__, 3, 4))) -+#endif -+ ; - - //------------------------------------------------------------------------ - //! Print an info - //------------------------------------------------------------------------ -- void Info( uint64_t topic, const char *format, ... ); -+ void Info( uint64_t topic, const char *format, ... ) -+#if defined(__GNUC__) -+ __attribute__ ((__format__ (__printf__, 3, 4))) -+#endif -+ ; - - //------------------------------------------------------------------------ - //! Print a debug message - //------------------------------------------------------------------------ -- void Debug( uint64_t topic, const char *format, ... ); -+ void Debug( uint64_t topic, const char *format, ... ) -+#if defined(__GNUC__) -+ __attribute__ ((__format__ (__printf__, 3, 4))) -+#endif -+ ; - - //------------------------------------------------------------------------ - //! Print a dump message - //------------------------------------------------------------------------ -- void Dump( uint64_t topic, const char *format, ... ); -+ void Dump( uint64_t topic, const char *format, ... ) -+#if defined(__GNUC__) -+ __attribute__ ((__format__ (__printf__, 3, 4))) -+#endif -+ ; - - //------------------------------------------------------------------------ - //! Always print the message --- -2.47.1 - diff --git a/0003-Fix-format-errors-found-by-the-compiler.patch b/0003-Fix-format-errors-found-by-the-compiler.patch deleted file mode 100644 index 4186a4c..0000000 --- a/0003-Fix-format-errors-found-by-the-compiler.patch +++ /dev/null @@ -1,418 +0,0 @@ -From e954073730f5ef5f5a1b125366f3c3ee99122b37 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 2 Dec 2024 14:59:49 +0100 -Subject: [PATCH 3/3] Fix format errors found by the compiler - ---- - src/XrdCl/XrdClAsyncVectorReader.hh | 4 ++-- - src/XrdCl/XrdClClassicCopyJob.cc | 20 ++++++++++---------- - src/XrdCl/XrdClFileStateHandler.cc | 16 ++++++++-------- - src/XrdCl/XrdClFileSystem.cc | 4 ++-- - src/XrdCl/XrdClLocalFileHandler.cc | 2 +- - src/XrdCl/XrdClPollerBuiltIn.cc | 6 +++--- - src/XrdCl/XrdClStream.cc | 10 +++++----- - src/XrdCl/XrdClXRootDMsgHandler.cc | 4 ++-- - src/XrdCl/XrdClXRootDTransport.cc | 8 ++++---- - src/XrdCl/XrdClZipArchive.cc | 24 ++++++++++++------------ - src/XrdClHttp/XrdClHttpFilePlugIn.cc | 4 ++-- - tests/XrdCl/XrdClFileTest.cc | 4 ++-- - 12 files changed, 53 insertions(+), 53 deletions(-) - -diff --git a/src/XrdCl/XrdClAsyncVectorReader.hh b/src/XrdCl/XrdClAsyncVectorReader.hh -index 50676b534..caf6a8267 100644 ---- a/src/XrdCl/XrdClAsyncVectorReader.hh -+++ b/src/XrdCl/XrdClAsyncVectorReader.hh -@@ -135,7 +135,7 @@ namespace XrdCl - if( !chfound ) - { - log->Error( XRootDMsg, "[%s] VectorReader: Impossible to find chunk " -- "buffer corresponding to %d bytes at %ld", -+ "buffer corresponding to %d bytes at %lld", - url.GetHostId().c_str(), rdlst.rlen, rdlst.offset ); - readstage = ReadDiscard; - continue; -@@ -181,7 +181,7 @@ namespace XrdCl - if( !st.IsOK() || st.code == suRetry ) - return st; - -- log->Dump( XRootDMsg, "[%s] VectorReader: read buffer for chunk %d@%ld", -+ log->Dump( XRootDMsg, "[%s] VectorReader: read buffer for chunk %d@%lld", - url.GetHostId().c_str(), rdlst.rlen, rdlst.offset ); - - //---------------------------------------------------------------- -diff --git a/src/XrdCl/XrdClClassicCopyJob.cc b/src/XrdCl/XrdClClassicCopyJob.cc -index 7b1d028a8..60a946ee7 100644 ---- a/src/XrdCl/XrdClClassicCopyJob.cc -+++ b/src/XrdCl/XrdClClassicCopyJob.cc -@@ -890,8 +890,8 @@ namespace - - if( !ch->status.IsOK() ) - { -- log->Debug( UtilityMsg, "Unable read %d bytes at %ld from %s: %s", -- ch->chunk.GetLength(), ch->chunk.GetOffset(), -+ log->Debug( UtilityMsg, "Unable read %d bytes at %llu from %s: %s", -+ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), - pUrl->GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); - delete [] (char *)ch->chunk.GetBuffer(); - CleanUpChunks(); -@@ -1458,7 +1458,7 @@ namespace - { - ss << *itr << ", "; - } -- log->Debug( XrdCl::UtilityMsg, ss.str().c_str() ); -+ log->Debug( XrdCl::UtilityMsg, "%s", ss.str().c_str() ); - - pXCpCtx = new XrdCl::XCpCtx( pReplicas, pBlockSize, pNbSrc, pChunkSize, pParallelChunks, fileSize ); - -@@ -1619,7 +1619,7 @@ namespace - if( pCurrentOffset != ci.GetOffset() ) - { - log->Error( UtilityMsg, "Got out-of-bounds chunk, expected offset:" -- " %ld, got %ld", pCurrentOffset, ci.GetOffset() ); -+ " %llu, got %llu", (unsigned long long) pCurrentOffset, (unsigned long long) ci.GetOffset() ); - return XRootDStatus( stError, errInternal ); - } - -@@ -1860,8 +1860,8 @@ namespace - if( !ch->status.IsOK() ) - { - Log *log = DefaultEnv::GetLog(); -- log->Debug( UtilityMsg, "Unable write %d bytes at %ld from %s: %s", -- ch->chunk.GetLength(), ch->chunk.GetOffset(), -+ log->Debug( UtilityMsg, "Unable write %d bytes at %llu from %s: %s", -+ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), - pUrl.GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); - delete[] (char*)ci.GetBuffer(); // we took the ownership of the buffer - CleanUpChunks(); -@@ -2190,8 +2190,8 @@ namespace - if( !ch->status.IsOK() ) - { - Log *log = DefaultEnv::GetLog(); -- log->Debug( UtilityMsg, "Unable write %d bytes at %ld from %s: %s", -- ch->chunk.GetLength(), ch->chunk.GetOffset(), -+ log->Debug( UtilityMsg, "Unable write %d bytes at %llu from %s: %s", -+ ch->chunk.GetLength(), (unsigned long long) ch->chunk.GetOffset(), - pUrl.GetObfuscatedURL().c_str(), ch->status.ToStr().c_str() ); - CleanUpChunks(); - -@@ -2702,8 +2702,8 @@ namespace XrdCl - //-------------------------------------------------------------------------- - if( src->GetSize() >= 0 && size != total_processed ) - { -- log->Error( UtilityMsg, "The declared source size is %ld bytes, but " -- "received %ld bytes.", size, total_processed ); -+ log->Error( UtilityMsg, "The declared source size is %llu bytes, but " -+ "received %llu bytes.", (unsigned long long) size, (unsigned long long) total_processed ); - return SetResult( stError, errDataError ); - } - pResults->Set( "size", total_processed ); -diff --git a/src/XrdCl/XrdClFileStateHandler.cc b/src/XrdCl/XrdClFileStateHandler.cc -index 2560bb856..d7067e653 100644 ---- a/src/XrdCl/XrdClFileStateHandler.cc -+++ b/src/XrdCl/XrdClFileStateHandler.cc -@@ -1415,21 +1415,21 @@ namespace XrdCl - if( inf->NeedRetry() ) // so we failed in the end - { - DefaultEnv::GetLog()->Warning( FileMsg, "[%p@%s] Failed retransmitting corrupted " -- "page: pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), -- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); -+ "page: pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), -+ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); - pgwrt->SetStatus( new XRootDStatus( stError, errDataError, 0, - "Failed to retransmit corrupted page" ) ); - } - else - DefaultEnv::GetLog()->Info( FileMsg, "[%p@%s] Succesfuly retransmitted corrupted " -- "page: pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), -- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); -+ "page: pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), -+ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); - } ); - auto st = PgWriteRetry( self, pgoff, pglen, pgbuf, pgdigest, h, timeout ); - if( !st.IsOK() ) pgwrt->SetStatus( new XRootDStatus( st ) ); - DefaultEnv::GetLog()->Info( FileMsg, "[%p@%s] Retransmitting corrupted page: " -- "pgoff=%llu, pglen=%du, pgdigest=%du", self.get(), -- self->pFileUrl->GetObfuscatedURL().c_str(), pgoff, pglen, pgdigest ); -+ "pgoff=%llu, pglen=%u, pgdigest=%u", self.get(), -+ self->pFileUrl->GetObfuscatedURL().c_str(), (unsigned long long) pgoff, pglen, pgdigest ); - } - } ); - -@@ -2420,9 +2420,9 @@ namespace XrdCl - } - - log->Debug( FileMsg, "[%p@%s] successfully opened at %s, handle: %#x, " -- "session id: %ld", this, pFileUrl->GetObfuscatedURL().c_str(), -+ "session id: %llu", this, pFileUrl->GetObfuscatedURL().c_str(), - pDataServer->GetHostId().c_str(), *((uint32_t*)pFileHandle), -- pSessionId ); -+ (unsigned long long) pSessionId ); - - //------------------------------------------------------------------------ - // Inform the monitoring about opening success -diff --git a/src/XrdCl/XrdClFileSystem.cc b/src/XrdCl/XrdClFileSystem.cc -index 2f0a14c62..f2694dcff 100644 ---- a/src/XrdCl/XrdClFileSystem.cc -+++ b/src/XrdCl/XrdClFileSystem.cc -@@ -75,7 +75,7 @@ namespace - std::ostringstream data; - data << ssp.st_dev << " " << ssp.st_size << " " << flags << " " - << ssp.st_mtime; -- log->Debug( FileMsg, data.str().c_str() ); -+ log->Debug( FileMsg, "%s", data.str().c_str() ); - - StatInfo *statInfo = new StatInfo(); - if( !statInfo->ParseServerResponse( data.str().c_str() ) ) -@@ -641,7 +641,7 @@ namespace - XRootDStatus st = pCtx->fs->DirList( child, flags, handler, timeout ); - if( !st.IsOK() ) - { -- log->Error( FileMsg, "Recursive directory list operation for %s failed: ", -+ log->Error( FileMsg, "Recursive directory list operation for %s failed: %s", - child.c_str(), st.ToString().c_str() ); - pCtx->UpdateStatus( st ); - continue; -diff --git a/src/XrdCl/XrdClLocalFileHandler.cc b/src/XrdCl/XrdClLocalFileHandler.cc -index db82d6c47..2c0111ccb 100644 ---- a/src/XrdCl/XrdClLocalFileHandler.cc -+++ b/src/XrdCl/XrdClLocalFileHandler.cc -@@ -298,7 +298,7 @@ namespace XrdCl - std::ostringstream data; - data << ssp.st_dev << " " << ssp.st_size << " " << ssp.st_mode << " " - << ssp.st_mtime; -- log->Debug( FileMsg, data.str().c_str() ); -+ log->Debug( FileMsg, "%s", data.str().c_str() ); - - StatInfo *statInfo = new StatInfo(); - if( !statInfo->ParseServerResponse( data.str().c_str() ) ) -diff --git a/src/XrdCl/XrdClPollerBuiltIn.cc b/src/XrdCl/XrdClPollerBuiltIn.cc -index 34f832908..804438da9 100644 ---- a/src/XrdCl/XrdClPollerBuiltIn.cc -+++ b/src/XrdCl/XrdClPollerBuiltIn.cc -@@ -142,7 +142,7 @@ namespace XrdCl - XrdSys::IOEvents::Poller* poller = IOEvents::Poller::Create( errNum, &errMsg ); - if( !poller ) - { -- log->Error( PollerMsg, "Unable to create the internal poller object: ", -+ log->Error( PollerMsg, "Unable to create the internal poller object: " - "%s (%s)", XrdSysE2T( errno ), errMsg ); - return false; - } -@@ -170,7 +170,7 @@ namespace XrdCl - helper->readTimeout, &errMsg ); - if( !status ) - { -- log->Error( PollerMsg, "Unable to enable read notifications ", -+ log->Error( PollerMsg, "Unable to enable read notifications " - "while re-starting %s (%s)", XrdSysE2T( errno ), errMsg ); - - return false; -@@ -183,7 +183,7 @@ namespace XrdCl - helper->writeTimeout, &errMsg ); - if( !status ) - { -- log->Error( PollerMsg, "Unable to enable write notifications ", -+ log->Error( PollerMsg, "Unable to enable write notifications " - "while re-starting %s (%s)", XrdSysE2T( errno ), errMsg ); - - return false; -diff --git a/src/XrdCl/XrdClStream.cc b/src/XrdCl/XrdClStream.cc -index a80f8e1d0..e8177c111 100644 ---- a/src/XrdCl/XrdClStream.cc -+++ b/src/XrdCl/XrdClStream.cc -@@ -598,7 +598,7 @@ namespace XrdCl - { - Log *log = DefaultEnv::GetLog(); - log->Warning( PostMasterMsg, "[%s] Removed a leftover msg from the in-queue.", -- pStreamName.c_str(), subStream ); -+ pStreamName.c_str() ); - } - } - pSubStreams[subStream]->outMsgHelper.Reset(); -@@ -745,8 +745,8 @@ namespace XrdCl - // Check if we still have time to try and do something in the current window - //-------------------------------------------------------------------------- - time_t elapsed = now-pConnectionInitTime; -- log->Error( PostMasterMsg, "[%s] elapsed = %ld, pConnectionWindow = %d seconds.", -- pStreamName.c_str(), elapsed, pConnectionWindow ); -+ log->Error( PostMasterMsg, "[%s] elapsed = %lld, pConnectionWindow = %d seconds.", -+ pStreamName.c_str(), (long long) elapsed, pConnectionWindow ); - - //------------------------------------------------------------------------ - // If we have some IP addresses left we try them -@@ -775,8 +775,8 @@ namespace XrdCl - else if( elapsed < pConnectionWindow && pConnectionCount < pConnectionRetry - && !status.IsFatal() ) - { -- log->Info( PostMasterMsg, "[%s] Attempting reconnection in %ld seconds.", -- pStreamName.c_str(), pConnectionWindow-elapsed ); -+ log->Info( PostMasterMsg, "[%s] Attempting reconnection in %lld seconds.", -+ pStreamName.c_str(), (long long) (pConnectionWindow - elapsed) ); - - Task *task = new ::StreamConnectorTask( *pUrl, pStreamName ); - pTaskManager->RegisterTask( task, pConnectionInitTime+pConnectionWindow ); -diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc -index 0e93e2cd5..cc9504944 100644 ---- a/src/XrdCl/XrdClXRootDMsgHandler.cc -+++ b/src/XrdCl/XrdClXRootDMsgHandler.cc -@@ -2438,9 +2438,9 @@ namespace XrdCl - - Log *log = DefaultEnv::GetLog(); - if( warn ) -- log->Warning( XRootDMsg, sstrm.str().c_str() ); -+ log->Warning( XRootDMsg, "%s", sstrm.str().c_str() ); - else -- log->Debug( XRootDMsg, sstrm.str().c_str() ); -+ log->Debug( XRootDMsg, "%s", sstrm.str().c_str() ); - } - - // Read data from buffer -diff --git a/src/XrdCl/XrdClXRootDTransport.cc b/src/XrdCl/XrdClXRootDTransport.cc -index b98e0695f..99f329576 100644 ---- a/src/XrdCl/XrdClXRootDTransport.cc -+++ b/src/XrdCl/XrdClXRootDTransport.cc -@@ -764,9 +764,9 @@ namespace XrdCl - //-------------------------------------------------------------------------- - XrdSysMutexHelper scopedLock( info->mutex ); - uint16_t allocatedSIDs = info->sidManager->GetNumberOfAllocatedSIDs(); -- log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %ld seconds, " -+ log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %lld seconds, " - "TTL: %d, allocated SIDs: %d, open files: %d, bound file objects: %d", -- info->streamName.c_str(), inactiveTime, ttl, allocatedSIDs, -+ info->streamName.c_str(), (long long) inactiveTime, ttl, allocatedSIDs, - info->openFiles, info->finstcnt.load( std::memory_order_relaxed ) ); - - if( info->openFiles != 0 && info->finstcnt.load( std::memory_order_relaxed ) != 0 ) -@@ -799,9 +799,9 @@ namespace XrdCl - const bool anySID = - info->sidManager->IsAnySIDOldAs( now - streamTimeout ); - -- log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %ld seconds, " -+ log->Dump( XRootDTransportMsg, "[%s] Stream inactive since %lld seconds, " - "stream timeout: %d, any SID: %d, wait barrier: %s", -- info->streamName.c_str(), inactiveTime, streamTimeout, -+ info->streamName.c_str(), (long long) inactiveTime, streamTimeout, - anySID, Utils::TimeToString(info->waitBarrier).c_str() ); - - if( inactiveTime < streamTimeout ) -diff --git a/src/XrdCl/XrdClZipArchive.cc b/src/XrdCl/XrdClZipArchive.cc -index d6e6b5219..0a648a8b3 100644 ---- a/src/XrdCl/XrdClZipArchive.cc -+++ b/src/XrdCl/XrdClZipArchive.cc -@@ -156,8 +156,8 @@ namespace XrdCl - [relativeOffset, rdbuff, &cache, &me]( XRootDStatus &st, RSP &rsp ) - { - Log *log = DefaultEnv::GetLog(); -- log->Dump( ZipMsg, "[%p] Read %d bytes of remote data at offset %llu.", -- &me, rsp.GetLength(), rsp.GetOffset() ); -+ log->Dump( ZipMsg, "[%p] Read %u bytes of remote data at offset %llu.", -+ &me, rsp.GetLength(), (unsigned long long) rsp.GetOffset() ); - cache.QueueRsp( st, relativeOffset, std::move( *rdbuff ) ); - }; - Async( std::move( p ), timeout ); -@@ -187,8 +187,8 @@ namespace XrdCl - Pipeline p = XrdCl::RdWithRsp( me.archive, offset, size, usrbuff ) >> - [=, &me]( XRootDStatus &st, RSP &r ) - { -- log->Dump( ZipMsg, "[%p] Read %d bytes of remote data at " -- "offset %llu.", &me, r.GetLength(), r.GetOffset() ); -+ log->Dump( ZipMsg, "[%p] Read %u bytes of remote data at " -+ "offset %llu.", &me, r.GetLength(), (unsigned long long) r.GetOffset() ); - if( usrHandler ) - { - XRootDStatus *status = ZipArchive::make_status( st ); -@@ -298,7 +298,7 @@ namespace XrdCl - rdbuff = buffer.get(); - openstage = HaveEocdBlk; - log->Dump( ZipMsg, "[%p] Opened a ZIP archive, reading " -- "Central Directory at offset: %llu.", this, *rdoff ); -+ "Central Directory at offset: %llu.", this, (unsigned long long) *rdoff ); - } - // read the Central Directory (in several stages if necessary) - | XrdCl::Read( archive, rdoff, rdsize, rdbuff ) >> -@@ -327,12 +327,12 @@ namespace XrdCl - log->Dump( ZipMsg, "[%p] EOCD record parsed: %s", this, - eocd->ToString().c_str() ); - if(eocd->cdOffset > archsize || eocd->cdOffset + eocd->cdSize > archsize) -- throw bad_data(); -+ throw bad_data(); - } - catch(const bad_data &ex){ -- XRootDStatus error( stError, errDataError, 0, -- "End-of-central-directory signature corrupted." ); -- Pipeline::Stop( error ); -+ XRootDStatus error( stError, errDataError, 0, -+ "End-of-central-directory signature corrupted." ); -+ Pipeline::Stop( error ); - } - // Do we have the whole archive? - if( chunk.length == archsize ) -@@ -372,7 +372,7 @@ namespace XrdCl - rdbuff = buffer.get(); - openstage = HaveCdRecords; - log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", -- this, *rdoff ); -+ this, (unsigned long long) *rdoff ); - Pipeline::Repeat(); break; // the break is really not needed ... - } - -@@ -391,7 +391,7 @@ namespace XrdCl - rdbuff = buffer.get(); - openstage = HaveZip64EocdBlk; - log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", -- this, *rdoff ); -+ this, (unsigned long long) *rdoff ); - Pipeline::Repeat(); - } - -@@ -423,7 +423,7 @@ namespace XrdCl - rdbuff = buffer.get(); - openstage = HaveCdRecords; - log->Dump( ZipMsg, "[%p] Reading additional data at offset: %llu.", -- this, *rdoff ); -+ this, (unsigned long long) *rdoff ); - Pipeline::Repeat(); break; // the break is really not needed ... - } - -diff --git a/src/XrdClHttp/XrdClHttpFilePlugIn.cc b/src/XrdClHttp/XrdClHttpFilePlugIn.cc -index e23f8ec16..c64b4ea30 100644 ---- a/src/XrdClHttp/XrdClHttpFilePlugIn.cc -+++ b/src/XrdClHttp/XrdClHttpFilePlugIn.cc -@@ -273,7 +273,7 @@ XRootDStatus HttpFilePlugIn::Read(uint64_t offset, uint32_t size, void *buffer, - if (avoid_pread_) offset_locker.unlock(); - - logger_->Debug(kLogXrdClHttp, "Read %d bytes, at offset %llu, from URL: %s", -- num_bytes_read, offset, url_.c_str()); -+ num_bytes_read, (unsigned long long) offset, url_.c_str()); - - auto status = new XRootDStatus(); - auto chunk_info = new ChunkInfo(offset, num_bytes_read, buffer); -@@ -370,7 +370,7 @@ XRootDStatus HttpFilePlugIn::Write(uint64_t offset, uint32_t size, - filesize += res.first; - - logger_->Debug(kLogXrdClHttp, "Wrote %d bytes, at offset %llu, to URL: %s", -- res.first, offset, url_.c_str()); -+ res.first, (unsigned long long) offset, url_.c_str()); - - handler->HandleResponse(new XRootDStatus(), nullptr); - -diff --git a/tests/XrdCl/XrdClFileTest.cc b/tests/XrdCl/XrdClFileTest.cc -index b30411b82..9ca92c3a2 100644 ---- a/tests/XrdCl/XrdClFileTest.cc -+++ b/tests/XrdCl/XrdClFileTest.cc -@@ -643,10 +643,10 @@ void FileTest::VectorWriteTest() - const uint32_t MB = 1024*1024; - const uint32_t limit = 10*MB; - -- time_t seed = time( 0 ); -+ unsigned int seed = (unsigned int) time( 0 ); - srand( seed ); - DefaultEnv::GetLog()->Info( UtilityMsg, -- "Carrying out the VectorWrite test with seed: %d", seed ); -+ "Carrying out the VectorWrite test with seed: %u", seed ); - - // figure out how many chunks are we going to write/read - size_t nbChunks = rand() % 100 + 1; --- -2.47.1 - diff --git a/sources b/sources index b6c7026..52b6a93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.7.2.tar.gz) = a117b2e239695ac243ada3e1a0339d20057645b9e22753c32d44f3949e9ca0eab262397a8264e11293676e512b5cda921392f6ae52b935f93c60ea7247ac4f02 +SHA512 (xrootd-5.7.3.tar.gz) = 3e9eb692d1836d5bebd64742fd145b5ffcd1e096f4bf007694dc1a1131118cb752316e291e626743c80af6a576791aa6cca31bd482a47c8774c4a01b2e599f4e diff --git a/xrootd.spec b/xrootd.spec index 86a173d..231c287 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,19 +13,12 @@ Name: xrootd Epoch: 1 -Version: 5.7.2 -Release: 4%{?dist} +Version: 5.7.3 +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 URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz -# Fix errors in format strings -# https://github.com/xrootd/xrootd/pull/2380 -Patch0: 0001-Use-correct-format-for-size_t.patch -Patch1: 0002-Mark-the-client-library-logging-routines-with-__attr.patch -Patch2: 0003-Fix-format-errors-found-by-the-compiler.patch -# https://github.com/xrootd/xrootd/pull/2411 -Patch3: 0001-Fix-compilation-errors-with-GCC-15.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -262,10 +255,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 %build %cmake \ @@ -658,6 +647,10 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Jan 29 2025 Mattias Ellert - 1:5.7.3-1 +- Update to version 5.7.3 +- Drop patches accepted upstream + * Thu Jan 23 2025 Mattias Ellert - 1:5.7.2-4 - Use CMAKE_BUILD_TYPE RelWithDebInfo to avoid -Werror in compiler flags From acdcf3a99d02fc30dbba20e93aab98c5a321291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 1 Feb 2025 19:58:19 +0100 Subject: [PATCH 13/37] Add explicit BR: libxcrypt-devel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- xrootd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 231c287..9596105 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.7.3 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -50,6 +50,7 @@ BuildRequires: libuuid-devel BuildRequires: voms-devel BuildRequires: scitokens-cpp-devel BuildRequires: davix-devel +BuildRequires: libxcrypt-devel %if %{ceph} BuildRequires: librados-devel BuildRequires: libradosstriper-devel @@ -647,6 +648,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Feb 01 2025 Björn Esser - 1:5.7.3-2 +- Add explicit BR: libxcrypt-devel + * Wed Jan 29 2025 Mattias Ellert - 1:5.7.3-1 - Update to version 5.7.3 - Drop patches accepted upstream From 18f68e3bba390a0bf0a6ed03ab88dfb581b4e624 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 19 Feb 2025 07:26:00 +0100 Subject: [PATCH 14/37] Set HOSTNAME to localhost during testing --- xrootd.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xrootd.spec b/xrootd.spec index 9596105..7622c28 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.7.3 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.web.cern.ch @@ -50,7 +50,7 @@ BuildRequires: libuuid-devel BuildRequires: voms-devel BuildRequires: scitokens-cpp-devel BuildRequires: davix-devel -BuildRequires: libxcrypt-devel +BuildRequires: libxcrypt-devel %if %{ceph} BuildRequires: librados-devel BuildRequires: libradosstriper-devel @@ -367,6 +367,8 @@ cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo %check +export HOSTNAME=localhost + # Reduce socket path lengths used during tests # rpm 4.20 uses a longer path to the build directory than earlier versions # Tests fail with sockets in the build directory with rpm 4.20 @@ -648,6 +650,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Feb 19 2025 Mattias Ellert - 1:5.7.3-3 +- Set HOSTNAME to localhost during testing + * Sat Feb 01 2025 Björn Esser - 1:5.7.3-2 - Add explicit BR: libxcrypt-devel From 8fc3e7a48d1a5b76000943e3dbee547769dd5843 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 9 Mar 2025 12:24:50 +0100 Subject: [PATCH 15/37] Move user/group creation logic to sysusers.d fragment --- xrootd-sysusers.conf | 2 ++ xrootd.spec | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 xrootd-sysusers.conf diff --git a/xrootd-sysusers.conf b/xrootd-sysusers.conf new file mode 100644 index 0000000..44e07b4 --- /dev/null +++ b/xrootd-sysusers.conf @@ -0,0 +1,2 @@ +# Name ID GECOS Home directory Shell +u xrootd - "XRootD runtime user" /var/spool/xrootd - diff --git a/xrootd.spec b/xrootd.spec index 7622c28..acab7a4 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,11 +14,12 @@ Name: xrootd Epoch: 1 Version: 5.7.3 -Release: 3%{?dist} +Release: 4%{?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 URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz +Source1: %{name}-sysusers.conf BuildRequires: cmake BuildRequires: gcc-c++ @@ -88,7 +89,7 @@ Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: expect Requires: logrotate -Requires(pre): shadow-utils +%{?sysusers_requires_compat} %{?systemd_requires} %description server @@ -304,14 +305,16 @@ make -C bindings/python/docs html # Service unit files mkdir -p %{buildroot}%{_unitdir} -install -m 644 packaging/common/xrootd@.service %{buildroot}%{_unitdir} -install -m 644 packaging/common/xrootd@.socket %{buildroot}%{_unitdir} -install -m 644 packaging/common/xrdhttp@.socket %{buildroot}%{_unitdir} -install -m 644 packaging/common/cmsd@.service %{buildroot}%{_unitdir} -install -m 644 packaging/common/frm_xfrd@.service %{buildroot}%{_unitdir} -install -m 644 packaging/common/frm_purged@.service %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/xrootd@.service %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/xrootd@.socket %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/xrdhttp@.socket %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/cmsd@.service %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/frm_xfrd@.service %{buildroot}%{_unitdir} +install -m 644 -p packaging/common/frm_purged@.service %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_tmpfilesdir} -install -m 644 packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf +install -m 644 -p packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf +mkdir -p %{buildroot}%{_sysusersdir} +install -m 644 -p %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf # Server config mkdir -p %{buildroot}%{_sysconfdir}/%{name} @@ -403,9 +406,7 @@ rm testfile rm -rf ${adminpath} %pre server -getent group %{name} >/dev/null || groupadd -r %{name} -getent passwd %{name} >/dev/null || useradd -r -g %{name} -s /sbin/nologin \ - -d %{_localstatedir}/spool/%{name} -c "XRootD runtime user" %{name} +%sysusers_create_compat %{SOURCE1} %post server %tmpfiles_create %{name}.conf @@ -473,6 +474,7 @@ fi %{_datadir}/%{name}/utils %{_unitdir}/* %{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %{_sysconfdir}/%{name}/config.d %attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/*.cfg @@ -650,6 +652,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Mar 08 2025 Mattias Ellert - 1:5.7.3-4 +- Move user/group creation logic to sysusers.d fragment + * Wed Feb 19 2025 Mattias Ellert - 1:5.7.3-3 - Set HOSTNAME to localhost during testing From 83ce3e63cec093c335ba21b053aab5af6075e846 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 25 Mar 2025 17:48:43 +0100 Subject: [PATCH 16/37] Update to version 5.8.0 --- sources | 2 +- xrootd.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 52b6a93..c8246cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.7.3.tar.gz) = 3e9eb692d1836d5bebd64742fd145b5ffcd1e096f4bf007694dc1a1131118cb752316e291e626743c80af6a576791aa6cca31bd482a47c8774c4a01b2e599f4e +SHA512 (xrootd-5.8.0.tar.gz) = 235fccda0495970c6fb142a6baf368d3784a9a9fa1100a7750e4af00fc3b2340e563048d66bb92d80a70a1b9948f58cc81077e00e91fde27d2abd01d19c69d90 diff --git a/xrootd.spec b/xrootd.spec index acab7a4..69c3e8c 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,8 +13,8 @@ Name: xrootd Epoch: 1 -Version: 5.7.3 -Release: 4%{?dist} +Version: 5.8.0 +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 URL: https://xrootd.web.cern.ch @@ -396,7 +396,7 @@ XrdCl::LocalFileHandlerTest.XAttrTest|\ XrdCl::ThreadingTest|\ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ -XrdEc::|\ +XrdEc::XrdEcTests|\ XRootD::cluster::test|\ XRootD::http::test" %ctest -- -E $exclude @@ -569,6 +569,7 @@ fi %{_libdir}/libXrdOfsPrepGPI-5.so %{_libdir}/libXrdOssCsi-5.so %{_libdir}/libXrdOssSIgpfsT-5.so +%{_libdir}/libXrdOssStats-5.so %{_libdir}/libXrdPfc-5.so %{_libdir}/libXrdPss-5.so %{_libdir}/libXrdSsi-5.so @@ -652,6 +653,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Mar 22 2025 Mattias Ellert - 1:5.8.0-1 +- Update to version 5.8.0 + * Sat Mar 08 2025 Mattias Ellert - 1:5.7.3-4 - Move user/group creation logic to sysusers.d fragment From 51e5176cee5d02d5785a32d9aa854155a04c949e Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 17 Apr 2025 02:33:51 +0200 Subject: [PATCH 17/37] Update to version 5.8.1 --- sources | 2 +- xrootd.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index c8246cf..79fe617 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.8.0.tar.gz) = 235fccda0495970c6fb142a6baf368d3784a9a9fa1100a7750e4af00fc3b2340e563048d66bb92d80a70a1b9948f58cc81077e00e91fde27d2abd01d19c69d90 +SHA512 (xrootd-5.8.1.tar.gz) = 08f05dc381b22d55a49f89ab2b4bdea99631836df719fb7087a4a06ba37e34c81caa37c6b5c7b919253b13200cf8f416b4946dea4ed4488a682883c528052be3 diff --git a/xrootd.spec b/xrootd.spec index 69c3e8c..d116eba 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.8.0 +Version: 5.8.1 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 @@ -571,6 +571,7 @@ fi %{_libdir}/libXrdOssSIgpfsT-5.so %{_libdir}/libXrdOssStats-5.so %{_libdir}/libXrdPfc-5.so +%{_libdir}/libXrdPfcPurgeQuota-5.so %{_libdir}/libXrdPss-5.so %{_libdir}/libXrdSsi-5.so %{_libdir}/libXrdSsiLog-5.so @@ -653,6 +654,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Apr 16 2025 Mattias Ellert - 1:5.8.1-1 +- Update to version 5.8.1 + * Sat Mar 22 2025 Mattias Ellert - 1:5.8.0-1 - Update to version 5.8.0 From a1df29a8550367fb9ccac642dcabded90b46e2d5 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 14 May 2025 21:33:37 +0200 Subject: [PATCH 18/37] Update to version 5.8.2 Use reserved uid and gid 194 for the xrootd user https://pagure.io/packaging-committee/issue/1444 https://src.fedoraproject.org/rpms/setup/pull-request/27 --- sources | 2 +- xrootd-sysusers.conf | 4 ++-- xrootd.spec | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 79fe617..bf9da59 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.8.1.tar.gz) = 08f05dc381b22d55a49f89ab2b4bdea99631836df719fb7087a4a06ba37e34c81caa37c6b5c7b919253b13200cf8f416b4946dea4ed4488a682883c528052be3 +SHA512 (xrootd-5.8.2.tar.gz) = f6396e3c5353ceb3eed2a05b13832cd2650a57847a276e6f0ecbefce512c2bccb49268d28ac14e1b142581a8dcfa3ad4d26f49f0ec06d25e1fa180ad6a545c61 diff --git a/xrootd-sysusers.conf b/xrootd-sysusers.conf index 44e07b4..e5e19f0 100644 --- a/xrootd-sysusers.conf +++ b/xrootd-sysusers.conf @@ -1,2 +1,2 @@ -# Name ID GECOS Home directory Shell -u xrootd - "XRootD runtime user" /var/spool/xrootd - +# Name ID GECOS Home directory Shell +u xrootd 194 "XRootD runtime user" /var/spool/xrootd - diff --git a/xrootd.spec b/xrootd.spec index d116eba..346b164 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.8.1 +Version: 5.8.2 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 @@ -654,6 +654,12 @@ fi %doc %{_pkgdocdir} %changelog +* Sun May 11 2025 Mattias Ellert - 1:5.8.2-1 +- Update to version 5.8.2 +- Use reserved uid and gid 194 for the xrootd user + - https://pagure.io/packaging-committee/issue/1444 + - https://src.fedoraproject.org/rpms/setup/pull-request/27 + * Wed Apr 16 2025 Mattias Ellert - 1:5.8.1-1 - Update to version 5.8.1 From 337a27ddf3f56445fb8acb9a7cbe85c7956caad0 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 12:22:33 +0200 Subject: [PATCH 19/37] Rebuilt for Python 3.14 --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 346b164..b745a90 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.8.2 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -654,6 +654,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Jun 03 2025 Python Maint - 1:5.8.2-2 +- Rebuilt for Python 3.14 + * Sun May 11 2025 Mattias Ellert - 1:5.8.2-1 - Update to version 5.8.2 - Use reserved uid and gid 194 for the xrootd user From 6a14539323462c20c666e0b0c7b9f05c5be080ad Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 6 Jun 2025 21:21:15 +0200 Subject: [PATCH 20/37] Update to version 5.8.3 --- sources | 2 +- xrootd.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources b/sources index bf9da59..7b07855 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.8.2.tar.gz) = f6396e3c5353ceb3eed2a05b13832cd2650a57847a276e6f0ecbefce512c2bccb49268d28ac14e1b142581a8dcfa3ad4d26f49f0ec06d25e1fa180ad6a545c61 +SHA512 (xrootd-5.8.3.tar.gz) = 4b5e03e4ffc088fe2a13a29dcc03e276df3664a5df95a8d8f0166cea98065508a1aef3499f7f0f3cb0d63880e1a3e88308bc20fc7eeb98b1e4672ebf0b5cefd2 diff --git a/xrootd.spec b/xrootd.spec index b745a90..f00799a 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,8 +13,8 @@ Name: xrootd Epoch: 1 -Version: 5.8.2 -Release: 2%{?dist} +Version: 5.8.3 +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 URL: https://xrootd.web.cern.ch @@ -398,7 +398,8 @@ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::XrdEcTests|\ XRootD::cluster::test|\ -XRootD::http::test" +XRootD::http::test|\ +XRootD::tpc::test" %ctest -- -E $exclude fi rm testfile @@ -654,6 +655,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Jun 06 2025 Mattias Ellert - 1:5.8.3-1 +- Update to version 5.8.3 + * Tue Jun 03 2025 Python Maint - 1:5.8.2-2 - Rebuilt for Python 3.14 From e7d8ccb573735d89968e5b6eddbf45ed8cd4e3d3 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 17 Jul 2025 12:07:19 +0200 Subject: [PATCH 21/37] Update to version 5.8.4 --- sources | 2 +- xrootd.spec | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 7b07855..e761f28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.8.3.tar.gz) = 4b5e03e4ffc088fe2a13a29dcc03e276df3664a5df95a8d8f0166cea98065508a1aef3499f7f0f3cb0d63880e1a3e88308bc20fc7eeb98b1e4672ebf0b5cefd2 +SHA512 (xrootd-5.8.4.tar.gz) = e743f9ff190bf5df64a3aab29a02114255513a78c5cc71209a85be21a061c8fae35240e53325888b074bd5494ba23da3334be8fe222bc454ddb95fc9eca654d9 diff --git a/xrootd.spec b/xrootd.spec index f00799a..65a357a 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.8.3 +Version: 5.8.4 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 @@ -378,11 +378,21 @@ export HOSTNAME=localhost adminpath=$(mktemp -d -p /var/tmp) sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ -i %{_vpath_builddir}/tests/cluster/common.cfg \ + %{_vpath_builddir}/tests/badredir/common.cfg \ tests/XRootD/common.cfg +# Use a separate directory for TPC test due to name clash (srv1, srv2) +adminpath2=$(mktemp -d -p /var/tmp) +sed "s!all.adminpath .*!all.adminpath ${adminpath2}!" \ + -i %{_vpath_builddir}/tests/TPCTests/common.cfg + +trap "rm -rf ${adminpath} ${adminpath2}" EXIT + +# The badredir test fails when there is no network - exclude + touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then - %ctest + %ctest -- -E XRootD::badredir else echo "Extended file attributes not supported by file system" echo "Don't run tests that require them" @@ -397,15 +407,15 @@ XrdCl::ThreadingTest|\ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::XrdEcTests|\ +XRootD::badredir|\ XRootD::cluster::test|\ XRootD::http::test|\ +XRootD::posix::test|\ XRootD::tpc::test" %ctest -- -E $exclude fi rm testfile -rm -rf ${adminpath} - %pre server %sysusers_create_compat %{SOURCE1} @@ -655,6 +665,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sun Jul 13 2025 Mattias Ellert - 1:5.8.4-1 +- Update to version 5.8.4 + * Fri Jun 06 2025 Mattias Ellert - 1:5.8.3-1 - Update to version 5.8.3 From 7410fb1c04ec9c0f903fdc57f9c6ecc1fb2f7cb8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 21:04:23 +0000 Subject: [PATCH 22/37] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 65a357a..cc38cd7 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.8.4 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -665,6 +665,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1:5.8.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jul 13 2025 Mattias Ellert - 1:5.8.4-1 - Update to version 5.8.4 From c6772173e1ed1f47abc5bb1505fbbcc1a35e5353 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:23:27 +0200 Subject: [PATCH 23/37] Rebuilt for Python 3.14.0rc2 bytecode --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index cc38cd7..c9d54e9 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.8.4 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.web.cern.ch @@ -665,6 +665,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Aug 15 2025 Python Maint - 1:5.8.4-3 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 1:5.8.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 2f40bdab19440b70efb04c1b795c906aa1445309 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 15:04:04 +0200 Subject: [PATCH 24/37] Rebuilt for Python 3.14.0rc3 bytecode --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index c9d54e9..92bc2b2 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.8.4 -Release: 3%{?dist} +Release: 4%{?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 URL: https://xrootd.web.cern.ch @@ -665,6 +665,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Sep 19 2025 Python Maint - 1:5.8.4-4 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 1:5.8.4-3 - Rebuilt for Python 3.14.0rc2 bytecode From d990e6af598f7aba3228395689a50c4480dbf614 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 16 Oct 2025 14:26:54 +0200 Subject: [PATCH 25/37] Update to version 5.9.0 --- ...Fix-spelling-errors-found-by-lintian.patch | 39 +++++++++++++++++++ 0001-Tests-Fix-xcache-test-failure.patch | 37 ++++++++++++++++++ sources | 2 +- xrootd.spec | 33 ++++++++++------ 4 files changed, 99 insertions(+), 12 deletions(-) create mode 100644 0001-Fix-spelling-errors-found-by-lintian.patch create mode 100644 0001-Tests-Fix-xcache-test-failure.patch diff --git a/0001-Fix-spelling-errors-found-by-lintian.patch b/0001-Fix-spelling-errors-found-by-lintian.patch new file mode 100644 index 0000000..040676c --- /dev/null +++ b/0001-Fix-spelling-errors-found-by-lintian.patch @@ -0,0 +1,39 @@ +From 84a9758260fb3c0642dfd9e18cd7bc24b42586e3 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 16 Oct 2025 11:26:07 +0200 +Subject: [PATCH] Fix spelling errors (found by lintian) + +--- + src/XrdNet/XrdNetMsg.cc | 2 +- + src/XrdThrottle/XrdThrottleFileSystemConfig.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/XrdNet/XrdNetMsg.cc b/src/XrdNet/XrdNetMsg.cc +index 2581e394c..765603442 100644 +--- a/src/XrdNet/XrdNetMsg.cc ++++ b/src/XrdNet/XrdNetMsg.cc +@@ -86,7 +86,7 @@ XrdNetMsg::XrdNetMsg(XrdSysError *erp, const char *dest, bool *aOK, bool refr) + + // Save the relevant information + // +- dfltDest = strdup(myPeer.InetName ? myPeer.InetName : "Unknow!"); ++ dfltDest = strdup(myPeer.InetName ? myPeer.InetName : "Unknown!"); + FD = myPeer.fd; + destOK = true; + +diff --git a/src/XrdThrottle/XrdThrottleFileSystemConfig.cc b/src/XrdThrottle/XrdThrottleFileSystemConfig.cc +index 8a321ab3f..c110fa369 100644 +--- a/src/XrdThrottle/XrdThrottleFileSystemConfig.cc ++++ b/src/XrdThrottle/XrdThrottleFileSystemConfig.cc +@@ -64,7 +64,7 @@ XrdSfsGetFileSystem_Internal(XrdSfsFileSystem *native_fs, + if (envP && envP->GetInt("XrdOssThrottle") == 1) { + XrdSysError eDest(lp, "XrdOssThrottle"); + eDest.Emsg("Config", "XrdOssThrottle is loaded; not stacking XrdThrottle on OFS. " +- "This is a warning for backward compatability; this configuration may generate an " ++ "This is a warning for backward compatibility; this configuration may generate an " + "error in the future."); + return native_fs; + } +-- +2.51.0 + diff --git a/0001-Tests-Fix-xcache-test-failure.patch b/0001-Tests-Fix-xcache-test-failure.patch new file mode 100644 index 0000000..b610f5f --- /dev/null +++ b/0001-Tests-Fix-xcache-test-failure.patch @@ -0,0 +1,37 @@ +From 7b2facf80d1b103c741f2b15b0bf7a3c36b8a142 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 14 Oct 2025 23:15:55 +0200 +Subject: [PATCH] [Tests] Fix xcache test failure + +The test checks that the return code is 54 and that the error message +matches "Run: [ERROR] Server responded with an error: [3019]" in case +of a corrupted cached file. + +However, occasionally the return code is 50 and the error message is +"Run: [ERROR] Received corrupted data" in this case instead. + +This commit modifies the test so that the test succeeds when this +happens. +--- + tests/xcachewithcsi/test.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/xcachewithcsi/test.sh b/tests/xcachewithcsi/test.sh +index 9aa110f30..3e45cde29 100755 +--- a/tests/xcachewithcsi/test.sh ++++ b/tests/xcachewithcsi/test.sh +@@ -58,8 +58,10 @@ XRD_CONNECTIONRETRY=0 ${TIMEOUTCMD} 10 ${XRDCP} -f ${HOST_SRV2}//file1 /dev/null + ret1=$? + grep -q "Run: \[ERROR\] Server responded with an error: \[3019\]" /tmp/err.txt + ret2=$? ++grep -q "Run: \[ERROR\] Received corrupted data" /tmp/err.txt ++ret3=$? + cat /tmp/err.txt +-if [ $ret1 -ne 54 -o $ret2 -ne 0 ]; then ++if [ $ret1 -ne 54 -o $ret2 -ne 0 ] && [ $ret1 -ne 50 -o $ret3 -ne 0 ] ; then + echo "${host}: did not get the expected error on corrupted file" + exit 1 + fi +-- +2.51.0 + diff --git a/sources b/sources index e761f28..86797bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.8.4.tar.gz) = e743f9ff190bf5df64a3aab29a02114255513a78c5cc71209a85be21a061c8fae35240e53325888b074bd5494ba23da3334be8fe222bc454ddb95fc9eca654d9 +SHA512 (xrootd-5.9.0.tar.gz) = e692303f60cb8f73af5141ae7f58e3f45cfb5755b6708732cf8c8177ebda7a51f234ca8e1636fea3bbdeb0603950e373c0abd971b413944d8823ef4172112048 diff --git a/xrootd.spec b/xrootd.spec index 92bc2b2..79fe073 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,13 +13,17 @@ Name: xrootd Epoch: 1 -Version: 5.8.4 -Release: 4%{?dist} +Version: 5.9.0 +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 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/2615 +Patch0: 0001-Tests-Fix-xcache-test-failure.patch +# https://github.com/xrootd/xrootd/pull/2617 +Patch1: 0001-Fix-spelling-errors-found-by-lintian.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -257,6 +261,8 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P0 -p1 +%patch -P1 -p1 %build %cmake \ @@ -298,6 +304,8 @@ rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/RECORD sed s/pip/rpm/ \ -i %{buildroot}%{python3_sitearch}/xrootd-*.*-info/INSTALLER +rm -f %{buildroot}%{_libdir}/cmake/XRootD/uninstall.cmake + LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ PYTHONPATH=%{buildroot}%{python3_sitearch} \ PYTHONDONTWRITEBYTECODE=1 \ @@ -376,17 +384,15 @@ export HOSTNAME=localhost # rpm 4.20 uses a longer path to the build directory than earlier versions # Tests fail with sockets in the build directory with rpm 4.20 adminpath=$(mktemp -d -p /var/tmp) -sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ - -i %{_vpath_builddir}/tests/cluster/common.cfg \ - %{_vpath_builddir}/tests/badredir/common.cfg \ - tests/XRootD/common.cfg +trap "rm -rf ${adminpath}" EXIT -# Use a separate directory for TPC test due to name clash (srv1, srv2) -adminpath2=$(mktemp -d -p /var/tmp) -sed "s!all.adminpath .*!all.adminpath ${adminpath2}!" \ - -i %{_vpath_builddir}/tests/TPCTests/common.cfg +sed "s!all.adminpath .*!all.adminpath ${adminpath}/XRootD!" \ + -i tests/XRootD/common.cfg -trap "rm -rf ${adminpath} ${adminpath2}" EXIT +for x in authenticated_cluster badredir cluster TPCTests xcachewithcsi ; do + sed "s!all.adminpath .*!all.adminpath ${adminpath}/${x}!" \ + -i %{_vpath_builddir}/tests/${x}/common.cfg +done # The badredir test fails when there is no network - exclude @@ -407,6 +413,7 @@ XrdCl::ThreadingTest|\ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdEc::XrdEcTests|\ +XRootD::authenticated_cluster::test|\ XRootD::badredir|\ XRootD::cluster::test|\ XRootD::http::test|\ @@ -574,6 +581,7 @@ fi %{_libdir}/libXrdCmsRedirectLocal-5.so %{_libdir}/libXrdFileCache-5.so %{_libdir}/libXrdHttp-5.so +%{_libdir}/libXrdHttpCors-5.so %{_libdir}/libXrdHttpTPC-5.so %{_libdir}/libXrdMacaroons-5.so %{_libdir}/libXrdN2No2p-5.so @@ -665,6 +673,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Oct 10 2025 Mattias Ellert - 1:5.9.0-1 +- Update to version 5.9.0 + * Fri Sep 19 2025 Python Maint - 1:5.8.4-4 - Rebuilt for Python 3.14.0rc3 bytecode From db5cfc13328511fd39f9e6e0f8a0ea2ee3a455d8 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 21 Nov 2025 13:08:42 +0100 Subject: [PATCH 26/37] Update to version 5.9.1 --- ...Fix-spelling-errors-found-by-lintian.patch | 39 ----------------- ...est-segfault-on-32-bit-architectures.patch | 42 +++++++++++++++++++ ...ra-test-fixtures-are-ready-before-se.patch | 27 ++++++++++++ 0001-Tests-Fix-xcache-test-failure.patch | 37 ---------------- sources | 2 +- xrootd.spec | 13 +++--- 6 files changed, 78 insertions(+), 82 deletions(-) delete mode 100644 0001-Fix-spelling-errors-found-by-lintian.patch create mode 100644 0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch create mode 100644 0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch delete mode 100644 0001-Tests-Fix-xcache-test-failure.patch diff --git a/0001-Fix-spelling-errors-found-by-lintian.patch b/0001-Fix-spelling-errors-found-by-lintian.patch deleted file mode 100644 index 040676c..0000000 --- a/0001-Fix-spelling-errors-found-by-lintian.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 84a9758260fb3c0642dfd9e18cd7bc24b42586e3 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 16 Oct 2025 11:26:07 +0200 -Subject: [PATCH] Fix spelling errors (found by lintian) - ---- - src/XrdNet/XrdNetMsg.cc | 2 +- - src/XrdThrottle/XrdThrottleFileSystemConfig.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/XrdNet/XrdNetMsg.cc b/src/XrdNet/XrdNetMsg.cc -index 2581e394c..765603442 100644 ---- a/src/XrdNet/XrdNetMsg.cc -+++ b/src/XrdNet/XrdNetMsg.cc -@@ -86,7 +86,7 @@ XrdNetMsg::XrdNetMsg(XrdSysError *erp, const char *dest, bool *aOK, bool refr) - - // Save the relevant information - // -- dfltDest = strdup(myPeer.InetName ? myPeer.InetName : "Unknow!"); -+ dfltDest = strdup(myPeer.InetName ? myPeer.InetName : "Unknown!"); - FD = myPeer.fd; - destOK = true; - -diff --git a/src/XrdThrottle/XrdThrottleFileSystemConfig.cc b/src/XrdThrottle/XrdThrottleFileSystemConfig.cc -index 8a321ab3f..c110fa369 100644 ---- a/src/XrdThrottle/XrdThrottleFileSystemConfig.cc -+++ b/src/XrdThrottle/XrdThrottleFileSystemConfig.cc -@@ -64,7 +64,7 @@ XrdSfsGetFileSystem_Internal(XrdSfsFileSystem *native_fs, - if (envP && envP->GetInt("XrdOssThrottle") == 1) { - XrdSysError eDest(lp, "XrdOssThrottle"); - eDest.Emsg("Config", "XrdOssThrottle is loaded; not stacking XrdThrottle on OFS. " -- "This is a warning for backward compatability; this configuration may generate an " -+ "This is a warning for backward compatibility; this configuration may generate an " - "error in the future."); - return native_fs; - } --- -2.51.0 - diff --git a/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch b/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch new file mode 100644 index 0000000..dc7e8a6 --- /dev/null +++ b/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch @@ -0,0 +1,42 @@ +From b9340240764bf209fcfbc342ebd0d82947157a15 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 20 Nov 2025 09:54:34 +0100 +Subject: [PATCH] [Tests] Avoid test segfault on 32 bit architectures + +--- + tests/XrdCl/XrdClFileTest.cc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/tests/XrdCl/XrdClFileTest.cc b/tests/XrdCl/XrdClFileTest.cc +index f1ffe64b6..98ca7b543 100644 +--- a/tests/XrdCl/XrdClFileTest.cc ++++ b/tests/XrdCl/XrdClFileTest.cc +@@ -584,6 +584,16 @@ void FileTest::VectorReadTest() + constexpr size_t ior_max = 2*1024*1024 - 16; + char *buffer3 = static_cast(malloc(0x80000000ul)); /* 2 GB */ + ++ // The requested memory allocation size above (0x80000000) is larger ++ // than the maximum allowed memory allocation size on a 32 bit Linux ++ // system (0x7FFFFFFF). On these systems the allocation will fail ++ // and a NULL pointer will be returned, resulting in a segmentation ++ // fault when the test code tries to writ to the allocated memory. ++ // ++ // Skip the test in such cases instead. ++ ++ if (buffer3) { ++ + for(size_t i = 0; i < iov_max; ++i) + chunkList3.emplace_back(i*ior_max, ior_max); + +@@ -608,6 +618,8 @@ void FileTest::VectorReadTest() + free(buffer3); + delete info; + ++ } ++ + // local vread2 + info = 0; + EXPECT_XRDST_OK( f.VectorRead( chunkList2, buffer2Comp, info ) ); +-- +2.51.1 + diff --git a/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch b/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch new file mode 100644 index 0000000..a2d6a3b --- /dev/null +++ b/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch @@ -0,0 +1,27 @@ +From c18db2ab460c7b863171083f7ec4982dbebd1050 Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Tue, 18 Nov 2025 21:46:24 +0100 +Subject: [PATCH] [Tests] Ensure extra test fixtures are ready before server + setup + +This is needed in case test fixtures create files which are used +in the configuration of a server/cluster. +--- + tests/XRootD/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/XRootD/CMakeLists.txt b/tests/XRootD/CMakeLists.txt +index 6e8f9e874..7b5c1531b 100644 +--- a/tests/XRootD/CMakeLists.txt ++++ b/tests/XRootD/CMakeLists.txt +@@ -28,6 +28,7 @@ foreach(CONFIG ${XROOTD_CONFIGS}) + set_tests_properties(XRootD::${CONFIG}::setup + PROPERTIES + FIXTURES_SETUP XRootD::${CONFIG} ++ FIXTURES_REQUIRED "${${CONFIG}_FIXTURES}" + ENVIRONMENT "BINARY_DIR=${CMAKE_BINARY_DIR}" + ) + +-- +2.51.1 + diff --git a/0001-Tests-Fix-xcache-test-failure.patch b/0001-Tests-Fix-xcache-test-failure.patch deleted file mode 100644 index b610f5f..0000000 --- a/0001-Tests-Fix-xcache-test-failure.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7b2facf80d1b103c741f2b15b0bf7a3c36b8a142 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 14 Oct 2025 23:15:55 +0200 -Subject: [PATCH] [Tests] Fix xcache test failure - -The test checks that the return code is 54 and that the error message -matches "Run: [ERROR] Server responded with an error: [3019]" in case -of a corrupted cached file. - -However, occasionally the return code is 50 and the error message is -"Run: [ERROR] Received corrupted data" in this case instead. - -This commit modifies the test so that the test succeeds when this -happens. ---- - tests/xcachewithcsi/test.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/xcachewithcsi/test.sh b/tests/xcachewithcsi/test.sh -index 9aa110f30..3e45cde29 100755 ---- a/tests/xcachewithcsi/test.sh -+++ b/tests/xcachewithcsi/test.sh -@@ -58,8 +58,10 @@ XRD_CONNECTIONRETRY=0 ${TIMEOUTCMD} 10 ${XRDCP} -f ${HOST_SRV2}//file1 /dev/null - ret1=$? - grep -q "Run: \[ERROR\] Server responded with an error: \[3019\]" /tmp/err.txt - ret2=$? -+grep -q "Run: \[ERROR\] Received corrupted data" /tmp/err.txt -+ret3=$? - cat /tmp/err.txt --if [ $ret1 -ne 54 -o $ret2 -ne 0 ]; then -+if [ $ret1 -ne 54 -o $ret2 -ne 0 ] && [ $ret1 -ne 50 -o $ret3 -ne 0 ] ; then - echo "${host}: did not get the expected error on corrupted file" - exit 1 - fi --- -2.51.0 - diff --git a/sources b/sources index 86797bd..70d3d58 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.9.0.tar.gz) = e692303f60cb8f73af5141ae7f58e3f45cfb5755b6708732cf8c8177ebda7a51f234ca8e1636fea3bbdeb0603950e373c0abd971b413944d8823ef4172112048 +SHA512 (xrootd-5.9.1.tar.gz) = 8806475adb8458646ad9fc75c6d877f86f969115451295fce4a1d2aa116dd4ee06a5b27c06d8112d4667996dbbcec8d5e6cb28b2b2b56620ff503dfe5b842be0 diff --git a/xrootd.spec b/xrootd.spec index 79fe073..3fc84be 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,17 +13,17 @@ Name: xrootd Epoch: 1 -Version: 5.9.0 +Version: 5.9.1 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 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/2615 -Patch0: 0001-Tests-Fix-xcache-test-failure.patch -# https://github.com/xrootd/xrootd/pull/2617 -Patch1: 0001-Fix-spelling-errors-found-by-lintian.patch +# https://github.com/xrootd/xrootd/pull/2649 +Patch0: 0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch +# Backport from upstream git +Patch1: 0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -673,6 +673,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Nov 18 2025 Mattias Ellert - 1:5.9.1-1 +- Update to version 5.9.1 + * Fri Oct 10 2025 Mattias Ellert - 1:5.9.0-1 - Update to version 5.9.0 From 1ded0f02fbeae98976a83d489edad3975e456868 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:53:34 +0000 Subject: [PATCH 27/37] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 3fc84be..b8b58db 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.9.1 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -673,6 +673,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 1:5.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Tue Nov 18 2025 Mattias Ellert - 1:5.9.1-1 - Update to version 5.9.1 From 1bf67be74a14a745dd738c19a6d877f67ce2bf51 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 28 Mar 2026 10:00:55 +0100 Subject: [PATCH 28/37] Update to version 5.9.2 Drop patches accepted upstream or previously backported --- ...est-segfault-on-32-bit-architectures.patch | 42 ------------------- ...ra-test-fixtures-are-ready-before-se.patch | 27 ------------ sources | 2 +- xrootd.spec | 17 ++++---- 4 files changed, 10 insertions(+), 78 deletions(-) delete mode 100644 0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch delete mode 100644 0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch diff --git a/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch b/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch deleted file mode 100644 index dc7e8a6..0000000 --- a/0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b9340240764bf209fcfbc342ebd0d82947157a15 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 20 Nov 2025 09:54:34 +0100 -Subject: [PATCH] [Tests] Avoid test segfault on 32 bit architectures - ---- - tests/XrdCl/XrdClFileTest.cc | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/tests/XrdCl/XrdClFileTest.cc b/tests/XrdCl/XrdClFileTest.cc -index f1ffe64b6..98ca7b543 100644 ---- a/tests/XrdCl/XrdClFileTest.cc -+++ b/tests/XrdCl/XrdClFileTest.cc -@@ -584,6 +584,16 @@ void FileTest::VectorReadTest() - constexpr size_t ior_max = 2*1024*1024 - 16; - char *buffer3 = static_cast(malloc(0x80000000ul)); /* 2 GB */ - -+ // The requested memory allocation size above (0x80000000) is larger -+ // than the maximum allowed memory allocation size on a 32 bit Linux -+ // system (0x7FFFFFFF). On these systems the allocation will fail -+ // and a NULL pointer will be returned, resulting in a segmentation -+ // fault when the test code tries to writ to the allocated memory. -+ // -+ // Skip the test in such cases instead. -+ -+ if (buffer3) { -+ - for(size_t i = 0; i < iov_max; ++i) - chunkList3.emplace_back(i*ior_max, ior_max); - -@@ -608,6 +618,8 @@ void FileTest::VectorReadTest() - free(buffer3); - delete info; - -+ } -+ - // local vread2 - info = 0; - EXPECT_XRDST_OK( f.VectorRead( chunkList2, buffer2Comp, info ) ); --- -2.51.1 - diff --git a/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch b/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch deleted file mode 100644 index a2d6a3b..0000000 --- a/0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c18db2ab460c7b863171083f7ec4982dbebd1050 Mon Sep 17 00:00:00 2001 -From: Guilherme Amadio -Date: Tue, 18 Nov 2025 21:46:24 +0100 -Subject: [PATCH] [Tests] Ensure extra test fixtures are ready before server - setup - -This is needed in case test fixtures create files which are used -in the configuration of a server/cluster. ---- - tests/XRootD/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/XRootD/CMakeLists.txt b/tests/XRootD/CMakeLists.txt -index 6e8f9e874..7b5c1531b 100644 ---- a/tests/XRootD/CMakeLists.txt -+++ b/tests/XRootD/CMakeLists.txt -@@ -28,6 +28,7 @@ foreach(CONFIG ${XROOTD_CONFIGS}) - set_tests_properties(XRootD::${CONFIG}::setup - PROPERTIES - FIXTURES_SETUP XRootD::${CONFIG} -+ FIXTURES_REQUIRED "${${CONFIG}_FIXTURES}" - ENVIRONMENT "BINARY_DIR=${CMAKE_BINARY_DIR}" - ) - --- -2.51.1 - diff --git a/sources b/sources index 70d3d58..55d9300 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.9.1.tar.gz) = 8806475adb8458646ad9fc75c6d877f86f969115451295fce4a1d2aa116dd4ee06a5b27c06d8112d4667996dbbcec8d5e6cb28b2b2b56620ff503dfe5b842be0 +SHA512 (xrootd-5.9.2.tar.gz) = 4d904ba6e10dc4f6b8a3e3bfa306744376c0428f2ed0754d913dfaa6339a46d75711c53b44286d532fe6a0f0db6f1dbeaa6d2f723dc4a556b31c7c691e3f90c3 diff --git a/xrootd.spec b/xrootd.spec index b8b58db..7ade4a9 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,17 +13,13 @@ Name: xrootd Epoch: 1 -Version: 5.9.1 -Release: 2%{?dist} +Version: 5.9.2 +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 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/2649 -Patch0: 0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch -# Backport from upstream git -Patch1: 0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -63,10 +59,13 @@ BuildRequires: libradosstriper-devel %ifnarch %{ix86} BuildRequires: isa-l-devel %endif +# For tests BuildRequires: attr BuildRequires: curl BuildRequires: davix BuildRequires: gtest-devel +BuildRequires: krb5-server +BuildRequires: krb5-workstation BuildRequires: openssl BuildRequires: procps @@ -261,8 +260,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P0 -p1 -%patch -P1 -p1 %build %cmake \ @@ -673,6 +670,10 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Mar 27 2026 Mattias Ellert - 1:5.9.2-1 +- Update to version 5.9.2 +- Drop patches accepted upstream or previously backported + * Sat Jan 17 2026 Fedora Release Engineering - 1:5.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 5ee6a46add24318e3076375d858f492df6ba3504 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 21 Apr 2026 18:03:25 +0200 Subject: [PATCH 29/37] Update to version 6.0.0 --- ...Sys-XrdSysPlatform.hh-for-MAXPATHLEN.patch | 37 ++++ ...se-timeouts-for-slow-debian-builders.patch | 71 +++++++ 0001-Unbundle-tinyxml.patch | 62 ++++++ ...h-all-work-around-for-missing-gettid.patch | 39 ++++ 0003-Also-check-for-GNU-in-statx.patch | 39 ++++ ...s-tests-when-usr-sbin-is-not-in-PATH.patch | 45 ++++ 0005-Fix-typo-conent-content.patch | 28 +++ ...nge-file-to-avoid-sed-during-install.patch | 25 +++ sources | 2 +- xrootd.spec | 192 ++++++++++-------- 10 files changed, 450 insertions(+), 90 deletions(-) create mode 100644 0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch create mode 100644 0001-Increase-timeouts-for-slow-debian-builders.patch create mode 100644 0001-Unbundle-tinyxml.patch create mode 100644 0002-Add-catch-all-work-around-for-missing-gettid.patch create mode 100644 0003-Also-check-for-GNU-in-statx.patch create mode 100644 0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch create mode 100644 0005-Fix-typo-conent-content.patch create mode 100644 0006-Change-file-to-avoid-sed-during-install.patch diff --git a/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch b/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch new file mode 100644 index 0000000..849c380 --- /dev/null +++ b/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch @@ -0,0 +1,37 @@ +From f0cb3ce78d9e1bd2bcac7c43e8b272b9350ec3f6 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 21:16:11 +0200 +Subject: [PATCH 1/6] Add #include "XrdSys/XrdSysPlatform.hh" for MAXPATHLEN + +--- + src/XrdOssArc/XrdOssArcBackup.cc | 1 + + src/XrdOssArc/XrdOssArcConfig.cc | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/XrdOssArc/XrdOssArcBackup.cc b/src/XrdOssArc/XrdOssArcBackup.cc +index f24912cb9..f49e7bdab 100644 +--- a/src/XrdOssArc/XrdOssArcBackup.cc ++++ b/src/XrdOssArc/XrdOssArcBackup.cc +@@ -47,6 +47,7 @@ + #include "XrdOuc/XrdOucStream.hh" + + #include "XrdSys/XrdSysError.hh" ++#include "XrdSys/XrdSysPlatform.hh" + #include "XrdSys/XrdSysPthread.hh" + + /******************************************************************************/ +diff --git a/src/XrdOssArc/XrdOssArcConfig.cc b/src/XrdOssArc/XrdOssArcConfig.cc +index 7f6ee0ac8..620c0bed1 100644 +--- a/src/XrdOssArc/XrdOssArcConfig.cc ++++ b/src/XrdOssArc/XrdOssArcConfig.cc +@@ -61,6 +61,7 @@ + #include "XrdOuc/XrdOucUtils.hh" + + #include "XrdSys/XrdSysError.hh" ++#include "XrdSys/XrdSysPlatform.hh" + + /******************************************************************************/ + /* G l o b a l O b j e c t s */ +-- +2.53.0 + diff --git a/0001-Increase-timeouts-for-slow-debian-builders.patch b/0001-Increase-timeouts-for-slow-debian-builders.patch new file mode 100644 index 0000000..ed0ec85 --- /dev/null +++ b/0001-Increase-timeouts-for-slow-debian-builders.patch @@ -0,0 +1,71 @@ +From 461010b0811ae5013de534befd89c4c6dbd58037 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 23:14:11 +0200 +Subject: [PATCH] Increase timeouts for slow debian builders + +--- + tests/XRootD/test.sh | 2 +- + tests/XrdClHttp/setup.sh | 4 ++-- + tests/XrdClS3/s3-setup.sh | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/tests/XRootD/test.sh b/tests/XRootD/test.sh +index be160a2cf..e85c09053 100755 +--- a/tests/XRootD/test.sh ++++ b/tests/XRootD/test.sh +@@ -58,7 +58,7 @@ export XRD_LOGLEVEL XRD_LOGFILE + # Reduce default timeouts to catch errors quickly and prevent the test + # suite from getting stuck waiting for timeouts while running. + +-: "${XRD_REQUESTTIMEOUT:=15}" ++: "${XRD_REQUESTTIMEOUT:=60}" + : "${XRD_STREAMTIMEOUT:=10}" + : "${XRD_TIMEOUTRESOLUTION:=1}" + +diff --git a/tests/XrdClHttp/setup.sh b/tests/XrdClHttp/setup.sh +index d3f4ca901..df49308f9 100755 +--- a/tests/XrdClHttp/setup.sh ++++ b/tests/XrdClHttp/setup.sh +@@ -445,7 +445,7 @@ echo "Cache started at port $CACHE_PORT" + + if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ + issuer_public.pem issuer_private.pem test_key \ +- https://localhost:9443 storage.read:/ 600 > "$RUNDIR/token"; then ++ https://localhost:9443 storage.read:/ 3600 > "$RUNDIR/token"; then + echo "Failed to generate read token" + exit 1 + fi +@@ -453,7 +453,7 @@ echo "Sample read token available at $RUNDIR/token" + + if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ + issuer_public.pem issuer_private.pem test_key \ +- https://localhost:9443 storage.modify:/ 600 > "$RUNDIR/write.token"; then ++ https://localhost:9443 storage.modify:/ 3600 > "$RUNDIR/write.token"; then + echo "Failed to generate write token" + exit 1 + fi +diff --git a/tests/XrdClS3/s3-setup.sh b/tests/XrdClS3/s3-setup.sh +index 962824936..4c1d356a2 100755 +--- a/tests/XrdClS3/s3-setup.sh ++++ b/tests/XrdClS3/s3-setup.sh +@@ -267,7 +267,7 @@ fi + + if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ + "$RUNDIR/issuer/issuer_public.pem" "$RUNDIR/issuer/issuer_private.pem" test_key \ +- https://localhost:9443 storage.read:/ 600 > "$RUNDIR/token"; then ++ https://localhost:9443 storage.read:/ 3600 > "$RUNDIR/token"; then + echo "Failed to generate read token" + exit 1 + fi +@@ -275,7 +275,7 @@ echo "Sample read token available at $RUNDIR/token" + + if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ + "$RUNDIR/issuer/issuer_public.pem" "$RUNDIR/issuer/issuer_private.pem" test_key \ +- https://localhost:9443 storage.modify:/ 600 > "$RUNDIR/write.token"; then ++ https://localhost:9443 storage.modify:/ 3600 > "$RUNDIR/write.token"; then + echo "Failed to generate write token" + exit 1 + fi +-- +2.53.0 + diff --git a/0001-Unbundle-tinyxml.patch b/0001-Unbundle-tinyxml.patch new file mode 100644 index 0000000..9c98c2c --- /dev/null +++ b/0001-Unbundle-tinyxml.patch @@ -0,0 +1,62 @@ +From bd81e2e922bd44c755ad77cf29ca45570cc934ec Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 21 Apr 2026 00:38:07 +0200 +Subject: [PATCH] Unbundle tinyxml + +--- + cmake/FindTinyXml.cmake | 18 ++++++++++++++++++ + src/XrdXml/tinyxml/CMakeLists.txt | 12 ++++++++++++ + 2 files changed, 30 insertions(+) + create mode 100644 cmake/FindTinyXml.cmake + +diff --git a/cmake/FindTinyXml.cmake b/cmake/FindTinyXml.cmake +new file mode 100644 +index 000000000..75c752707 +--- /dev/null ++++ b/cmake/FindTinyXml.cmake +@@ -0,0 +1,18 @@ ++FIND_PATH(TINYXML_INCLUDE_DIR tinyxml.h ++ HINTS ++ ${TINYXML_DIR} ++ $ENV{TINYXML_DIR} ++ /usr ++ PATH_SUFFIXES include ++) ++ ++FIND_LIBRARY(TINYXML_LIBRARIES tinyxml ++ HINTS ++ ${TINYXML_DIR} ++ $ENV{TINYXML_DIR} ++ /usr ++ PATH_SUFFIXES lib ++) ++ ++INCLUDE(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(TinyXml DEFAULT_MSG TINYXML_LIBRARIES TINYXML_INCLUDE_DIR) +diff --git a/src/XrdXml/tinyxml/CMakeLists.txt b/src/XrdXml/tinyxml/CMakeLists.txt +index db7d4924e..f87ed8f46 100644 +--- a/src/XrdXml/tinyxml/CMakeLists.txt ++++ b/src/XrdXml/tinyxml/CMakeLists.txt +@@ -1,3 +1,13 @@ ++find_package(TinyXml) ++ ++if(TINYXML_FOUND) ++ ++add_library(XrdTinyXml INTERFACE IMPORTED GLOBAL) ++set_property(TARGET XrdTinyXml PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${TINYXML_INCLUDE_DIR}") ++set_property(TARGET XrdTinyXml PROPERTY INTERFACE_LINK_LIBRARIES "${TINYXML_LIBRARIES}") ++ ++else() ++ + add_library(XrdTinyXml OBJECT + tinystr.cpp tinystr.h + tinyxml.cpp tinyxml.h +@@ -13,3 +23,5 @@ set_target_properties(XrdTinyXml + target_include_directories(XrdTinyXml + PUBLIC $ + ) ++ ++endif() +-- +2.53.0 + diff --git a/0002-Add-catch-all-work-around-for-missing-gettid.patch b/0002-Add-catch-all-work-around-for-missing-gettid.patch new file mode 100644 index 0000000..0a208f7 --- /dev/null +++ b/0002-Add-catch-all-work-around-for-missing-gettid.patch @@ -0,0 +1,39 @@ +From 0ef5b1a97d1ca0d8258384353165b8545463876a Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 21:20:48 +0200 +Subject: [PATCH 2/6] Add catch-all work-around for missing gettid + +Possibly there are better solutions, but this is consistent with the +implementation in src/XrdSys/XrdSysPthread.cc +--- + src/XrdClHttp/XrdClHttpUtil.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/XrdClHttp/XrdClHttpUtil.cc b/src/XrdClHttp/XrdClHttpUtil.cc +index a1597b200..7bedb4373 100644 +--- a/src/XrdClHttp/XrdClHttpUtil.cc ++++ b/src/XrdClHttp/XrdClHttpUtil.cc +@@ -86,16 +86,18 @@ struct WaitingForBroker { + namespace { + + pid_t getthreadid() { +-#ifdef __APPLE__ ++#if defined(__APPLE__) + uint64_t pth_threadid; + pthread_threadid_np(pthread_self(), &pth_threadid); + return pth_threadid; +-#else ++#elif defined(__linux__) + // NOTE: glibc 2.30 finally provides a gettid() wrapper; however, + // we currently support RHEL 8, which is based on glibc 2.28. Until + // we drop that platform, it's easier to do the syscall directly on Linux + // instead of additional ifdef calls. + return syscall(SYS_gettid); ++#else ++ return getpid(); + #endif + } + +-- +2.53.0 + diff --git a/0003-Also-check-for-GNU-in-statx.patch b/0003-Also-check-for-GNU-in-statx.patch new file mode 100644 index 0000000..487ec14 --- /dev/null +++ b/0003-Also-check-for-GNU-in-statx.patch @@ -0,0 +1,39 @@ +From 0492078b60e7ffc50ee8fd2282b5960e264a17b4 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 21:53:38 +0200 +Subject: [PATCH 3/6] Also check for GNU in statx + +--- + src/XrdSys/XrdSysStatx.hh | 2 +- + tests/XrdSysTests/XrdSysStatxTests.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/XrdSys/XrdSysStatx.hh b/src/XrdSys/XrdSysStatx.hh +index 13b4894e0..dfaa3f7be 100644 +--- a/src/XrdSys/XrdSysStatx.hh ++++ b/src/XrdSys/XrdSysStatx.hh +@@ -35,7 +35,7 @@ + #include + #include + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__GNU__) + #include + using XrdSysStatx = struct statx; + #define HAVE_STATX +diff --git a/tests/XrdSysTests/XrdSysStatxTests.cc b/tests/XrdSysTests/XrdSysStatxTests.cc +index d2d7e729f..23d2aaac6 100644 +--- a/tests/XrdSysTests/XrdSysStatxTests.cc ++++ b/tests/XrdSysTests/XrdSysStatxTests.cc +@@ -27,7 +27,7 @@ TEST_F(XrdSysStatxTests, Stat2StatxBasicFields) { + + EXPECT_EQ(stx.stx_mask, (uint32_t)STATX_BASIC_STATS); + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__GNU__) + EXPECT_EQ(stx.stx_mode, (uint16_t)(S_IFREG | 0755)); + EXPECT_EQ(stx.stx_nlink, (uint32_t)3); + EXPECT_EQ(stx.stx_uid, (uint32_t)1000); +-- +2.53.0 + diff --git a/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch b/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch new file mode 100644 index 0000000..67dd202 --- /dev/null +++ b/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch @@ -0,0 +1,45 @@ +From e079b7cb1af1410ed15c7958e089ece6b36c5900 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 21:55:56 +0200 +Subject: [PATCH 4/6] Fix kerberos tests when /usr/sbin is not in PATH + +--- + tests/krb5/kerberos.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/krb5/kerberos.sh b/tests/krb5/kerberos.sh +index b4af5e102..5b6405cd9 100755 +--- a/tests/krb5/kerberos.sh ++++ b/tests/krb5/kerberos.sh +@@ -36,16 +36,16 @@ function setup() { + popd >/dev/null || exit 1 + + # Create the KDC database +- kdb5_util create -s -r XROOTD.ORG -P xrootd ++ /usr/sbin/kdb5_util create -s -r XROOTD.ORG -P xrootd + + # Start the KDC daemons +- krb5kdc -P "${PWD}"/krb5kdc.pid ++ /usr/sbin/krb5kdc -P "${PWD}"/krb5kdc.pid + + # Not really needed, since we use kadmin.local + # kadmind -P ${PWD}/kadmind.pid + + # Add principals for the server and client to KDC database +- kadmin.local -r XROOTD.ORG <<-EOF ++ /usr/sbin/kadmin.local -r XROOTD.ORG <<-EOF + add_principal -randkey -kvno 1 host/localhost@XROOTD.ORG + ktadd -k krb5.keytab host/localhost + add_principal xrootd@XROOTD.ORG +@@ -54,7 +54,7 @@ function setup() { + EOF + + # Display KDC database entries +- kdb5_util tabdump -o - keyinfo ++ /usr/sbin/kdb5_util tabdump -o - keyinfo + + # Display contents of server keytab + klist -kte krb5.keytab +-- +2.53.0 + diff --git a/0005-Fix-typo-conent-content.patch b/0005-Fix-typo-conent-content.patch new file mode 100644 index 0000000..3307ead --- /dev/null +++ b/0005-Fix-typo-conent-content.patch @@ -0,0 +1,28 @@ +From 2c5be32cc7afed2c3f67a1bfbc25877f5233cb11 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 22:04:23 +0200 +Subject: [PATCH 5/6] =?UTF-8?q?Fix=20typo=20conent=20=E2=86=92=20content?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/XrdClHttp/XrdClHttpFile.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XrdClHttp/XrdClHttpFile.cc b/src/XrdClHttp/XrdClHttpFile.cc +index 3a15470e8..196e4d99c 100644 +--- a/src/XrdClHttp/XrdClHttpFile.cc ++++ b/src/XrdClHttp/XrdClHttpFile.cc +@@ -557,7 +557,7 @@ File::Fcntl(const XrdCl::Buffer &arg, XrdCl::ResponseHandler *handler, + } + } + XrdCl::Buffer *respBuff = new XrdCl::Buffer(); +- m_logger->Debug(kLogXrdClHttp, "Fcntl conent %s", xatt.dump().c_str()); ++ m_logger->Debug(kLogXrdClHttp, "Fcntl content %s", xatt.dump().c_str()); + respBuff->FromString(xatt.dump()); + obj->Set(respBuff); + } +-- +2.53.0 + diff --git a/0006-Change-file-to-avoid-sed-during-install.patch b/0006-Change-file-to-avoid-sed-during-install.patch new file mode 100644 index 0000000..fa7fb1f --- /dev/null +++ b/0006-Change-file-to-avoid-sed-during-install.patch @@ -0,0 +1,25 @@ +From 216526c32b894a5bad7b85897decef711f121018 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 20 Apr 2026 22:42:06 +0200 +Subject: [PATCH 6/6] Change file to avoid sed during install + +--- + config/xrootd-http.cfg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/xrootd-http.cfg b/config/xrootd-http.cfg +index cb707bf84..341f3316c 100644 +--- a/config/xrootd-http.cfg ++++ b/config/xrootd-http.cfg +@@ -33,7 +33,7 @@ all.pidpath /run/xrootd + # In order to start the xrdhttp.socket run: + # systemctl start xrdhttp@http.socket + # +-xrd.protocol XrdHttp:80 /usr/lib64/libXrdHttp.so ++xrd.protocol XrdHttp:80 libXrdHttp.so + # More configuration files can be added in /etc/xrootd/config.d/ + # For example /etc/xrootd/config.d/10-mygrid.cfg and + # /etc/xrootd/config.d/98-mysite-specifics.cfg +-- +2.53.0 + diff --git a/sources b/sources index 55d9300..a0d612c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.9.2.tar.gz) = 4d904ba6e10dc4f6b8a3e3bfa306744376c0428f2ed0754d913dfaa6339a46d75711c53b44286d532fe6a0f0db6f1dbeaa6d2f723dc4a556b31c7c691e3f90c3 +SHA512 (xrootd-6.0.0.tar.gz) = 1fac24c56464e76c104deabcef0a8910dbdc18f62d93275bf1048142beb0453e05aecddaaf41abe9d183c9bafb015067994a15ae0ffeecdc2875626791d76905 diff --git a/xrootd.spec b/xrootd.spec index 7ade4a9..78a689d 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.9.2 +Version: 6.0.0 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 @@ -21,6 +21,16 @@ 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/2769 +Patch0: 0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch +Patch1: 0002-Add-catch-all-work-around-for-missing-gettid.patch +Patch2: 0003-Also-check-for-GNU-in-statx.patch +Patch3: 0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch +Patch4: 0005-Fix-typo-conent-content.patch +Patch5: 0006-Change-file-to-avoid-sed-during-install.patch +# Unbundle tinyxml library +Patch6: 0001-Unbundle-tinyxml.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: make @@ -30,13 +40,12 @@ BuildRequires: krb5-devel BuildRequires: libcurl-devel BuildRequires: tinyxml-devel BuildRequires: libxml2-devel +BuildRequires: libzip-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: perl-generators BuildRequires: readline-devel BuildRequires: zlib-devel -BuildRequires: doxygen -BuildRequires: graphviz BuildRequires: selinux-policy-devel BuildRequires: systemd-rpm-macros BuildRequires: systemd-devel @@ -44,13 +53,12 @@ BuildRequires: python3-devel BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel -BuildRequires: python3-sphinx BuildRequires: json-c-devel +BuildRequires: json-devel BuildRequires: libmacaroons-devel BuildRequires: libuuid-devel BuildRequires: voms-devel BuildRequires: scitokens-cpp-devel -BuildRequires: davix-devel BuildRequires: libxcrypt-devel %if %{ceph} BuildRequires: librados-devel @@ -59,15 +67,19 @@ BuildRequires: libradosstriper-devel %ifnarch %{ix86} BuildRequires: isa-l-devel %endif +# For documentation +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: python3-sphinx # For tests BuildRequires: attr BuildRequires: curl -BuildRequires: davix BuildRequires: gtest-devel BuildRequires: krb5-server BuildRequires: krb5-workstation BuildRequires: openssl BuildRequires: procps +BuildRequires: sqlite Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-selinux = %{epoch}:%{version}-%{release} @@ -129,6 +141,8 @@ development. %package client-libs Summary: Libraries used by xrootd clients +Provides: xrdcl-http = %{epoch}:%{version}-%{release} +Obsoletes: xrdcl-http < 1:6.0.0 Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} %description client-libs @@ -223,15 +237,6 @@ SciToken passed during a transfer. Configured appropriately, this allows the XRootD server admin to delegate authorization decisions for a subset of the namespace to an external issuer. -%package -n xrdcl-http -Summary: HTTP client plugin for XRootD -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} - -%description -n xrdcl-http -xrdcl-http is an XRootD client plugin which allows XRootD to interact -with HTTP repositories. - %if %{ceph} %package ceph Summary: XRootD plugin for interfacing with the Ceph storage platform @@ -261,6 +266,14 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 + %build %cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -269,8 +282,8 @@ This package contains the API documentation of the xrootd libraries. %if %{ceph} -DENABLE_CEPH:BOOL=ON \ %endif -%ifarch %{ix86} - -DENABLE_XRDEC:BOOL=OFF \ +%ifnarch %{ix86} + -DENABLE_XRDEC:BOOL=ON \ %endif %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 9 -DPIP_OPTIONS="--no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --verbose" \ @@ -280,7 +293,7 @@ This package contains the API documentation of the xrootd libraries. -DXRD_PYTHON_REQ_VERSION=%{python3_version} %cmake_build -make -C packaging/common -f /usr/share/selinux/devel/Makefile +make -C config -f /usr/share/selinux/devel/Makefile doxygen Doxyfile # Use local image instead of remote @@ -306,44 +319,43 @@ rm -f %{buildroot}%{_libdir}/cmake/XRootD/uninstall.cmake LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ PYTHONPATH=%{buildroot}%{python3_sitearch} \ PYTHONDONTWRITEBYTECODE=1 \ -make -C bindings/python/docs html +make -C python/docs html # Service unit files mkdir -p %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/xrootd@.service %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/xrootd@.socket %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/xrdhttp@.socket %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/cmsd@.service %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/frm_xfrd@.service %{buildroot}%{_unitdir} -install -m 644 -p packaging/common/frm_purged@.service %{buildroot}%{_unitdir} -mkdir -p %{buildroot}%{_tmpfilesdir} -install -m 644 -p packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf +install -m 644 -p systemd/xrootd@.service %{buildroot}%{_unitdir} +install -m 644 -p systemd/xrootd@.socket %{buildroot}%{_unitdir} +install -m 644 -p systemd/xrdhttp@.socket %{buildroot}%{_unitdir} +install -m 644 -p systemd/cmsd@.service %{buildroot}%{_unitdir} +install -m 644 -p systemd/frm_xfrd@.service %{buildroot}%{_unitdir} +install -m 644 -p systemd/frm_purged@.service %{buildroot}%{_unitdir} + mkdir -p %{buildroot}%{_sysusersdir} install -m 644 -p %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf # Server config mkdir -p %{buildroot}%{_sysconfdir}/%{name} -install -m 644 -p packaging/common/%{name}-clustered.cfg \ +install -m 644 -p config/%{name}-clustered.cfg \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-clustered.cfg -install -m 644 -p packaging/common/%{name}-standalone.cfg \ +install -m 644 -p config/%{name}-standalone.cfg \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-standalone.cfg -install -m 644 -p packaging/common/%{name}-filecache-clustered.cfg \ +install -m 644 -p config/%{name}-filecache-clustered.cfg \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-filecache-clustered.cfg -install -m 644 -p packaging/common/%{name}-filecache-standalone.cfg \ +install -m 644 -p config/%{name}-filecache-standalone.cfg \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-filecache-standalone.cfg -sed 's!/usr/lib64/!!' packaging/common/%{name}-http.cfg > \ +install -m 644 -p config/%{name}-http.cfg \ %{buildroot}%{_sysconfdir}/%{name}/%{name}-http.cfg # Client config mkdir -p %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d -install -m 644 -p packaging/common/client.conf \ +install -m 644 -p config/client.conf \ %{buildroot}%{_sysconfdir}/%{name}/client.conf -sed 's!/usr/lib/!!' packaging/common/client-plugin.conf.example > \ - %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/client-plugin.conf.example -sed -e 's!/usr/lib64/!!' -e 's!-5!!' packaging/common/recorder.conf > \ +install -m 644 -p config/client.plugins.d/http.conf \ + %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/http.conf +install -m 644 -p config/client.plugins.d/recorder.conf \ %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/recorder.conf -sed 's!/usr/lib64/!!' packaging/common/http.client.conf.example > \ - %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/xrdcl-http-plugin.conf +install -m 644 -p config/client.plugins.d/s3.conf \ + %{buildroot}%{_sysconfdir}/%{name}/client.plugins.d/s3.conf chmod 644 %{buildroot}%{_datadir}/%{name}/utils/XrdCmsNotify.pm @@ -358,20 +370,21 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/config.d mkdir -p %{buildroot}%{_localstatedir}/log/%{name} mkdir -p %{buildroot}%{_localstatedir}/spool/%{name} +mkdir -p %{buildroot}%{_rundir}/%{name} mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d -install -m 644 -p packaging/common/%{name}.logrotate \ +install -m 644 -p config/%{name}.logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/%{name} mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{name} -install -m 644 -p packaging/common/%{name}.pp \ +install -m 644 -p config/%{name}.pp \ %{buildroot}%{_datadir}/selinux/packages/%{name} # Documentation mkdir -p %{buildroot}%{_pkgdocdir} cp -pr doxydoc/html %{buildroot}%{_pkgdocdir} -cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python +cp -pr python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo %check @@ -424,8 +437,6 @@ rm testfile %sysusers_create_compat %{SOURCE1} %post server -%tmpfiles_create %{name}.conf - if [ $1 -eq 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : fi @@ -488,7 +499,6 @@ fi %dir %{_datadir}/%{name} %{_datadir}/%{name}/utils %{_unitdir}/* -%{_tmpfilesdir}/%{name}.conf %{_sysusersdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %{_sysconfdir}/%{name}/config.d @@ -508,18 +518,18 @@ fi %{_libdir}/libXrdUtils.so.* %{_libdir}/libXrdXml.so.* # Plugins -%{_libdir}/libXrdCksCalczcrc32-5.so -%{_libdir}/libXrdCryptossl-5.so -%{_libdir}/libXrdSec-5.so -%{_libdir}/libXrdSecProt-5.so -%{_libdir}/libXrdSecgsi-5.so -%{_libdir}/libXrdSecgsiAUTHZVO-5.so -%{_libdir}/libXrdSecgsiGMAPDN-5.so -%{_libdir}/libXrdSeckrb5-5.so -%{_libdir}/libXrdSecpwd-5.so -%{_libdir}/libXrdSecsss-5.so -%{_libdir}/libXrdSecunix-5.so -%{_libdir}/libXrdSecztn-5.so +%{_libdir}/libXrdCksCalczcrc32-6.so +%{_libdir}/libXrdCryptossl-6.so +%{_libdir}/libXrdSec-6.so +%{_libdir}/libXrdSecProt-6.so +%{_libdir}/libXrdSecgsi-6.so +%{_libdir}/libXrdSecgsiAUTHZVO-6.so +%{_libdir}/libXrdSecgsiGMAPDN-6.so +%{_libdir}/libXrdSeckrb5-6.so +%{_libdir}/libXrdSecpwd-6.so +%{_libdir}/libXrdSecsss-6.so +%{_libdir}/libXrdSecunix-6.so +%{_libdir}/libXrdSecztn-6.so %license COPYING* LICENSE %files devel @@ -554,16 +564,20 @@ fi %{_libdir}/libXrdSsiLib.so.* %{_libdir}/libXrdSsiShMap.so.* # Plugins -%{_libdir}/libXrdClProxyPlugin-5.so -%{_libdir}/libXrdClRecorder-5.so +%{_libdir}/libXrdClHttp-6.so +%{_libdir}/libXrdClProxyPlugin-6.so +%{_libdir}/libXrdClRecorder-6.so +%{_libdir}/libXrdClS3-6.so %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/client.conf %dir %{_sysconfdir}/%{name}/client.plugins.d -%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/client-plugin.conf.example +%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/http.conf %config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/recorder.conf +%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/s3.conf %files client-devel %{_includedir}/%{name}/XrdCl +%{_includedir}/%{name}/XrdClHttp %{_includedir}/%{name}/XrdPosix %{_libdir}/libXrdCl.so %{_libdir}/libXrdFfs.so @@ -573,26 +587,27 @@ fi %{_libdir}/libXrdHttpUtils.so.* %{_libdir}/libXrdServer.so.* # Plugins -%{_libdir}/libXrdBlacklistDecision-5.so -%{_libdir}/libXrdBwm-5.so -%{_libdir}/libXrdCmsRedirectLocal-5.so -%{_libdir}/libXrdFileCache-5.so -%{_libdir}/libXrdHttp-5.so -%{_libdir}/libXrdHttpCors-5.so -%{_libdir}/libXrdHttpTPC-5.so -%{_libdir}/libXrdMacaroons-5.so -%{_libdir}/libXrdN2No2p-5.so -%{_libdir}/libXrdOfsPrepGPI-5.so -%{_libdir}/libXrdOssCsi-5.so -%{_libdir}/libXrdOssSIgpfsT-5.so -%{_libdir}/libXrdOssStats-5.so -%{_libdir}/libXrdPfc-5.so -%{_libdir}/libXrdPfcPurgeQuota-5.so -%{_libdir}/libXrdPss-5.so -%{_libdir}/libXrdSsi-5.so -%{_libdir}/libXrdSsiLog-5.so -%{_libdir}/libXrdThrottle-5.so -%{_libdir}/libXrdXrootd-5.so +%{_libdir}/libXrdBlacklistDecision-6.so +%{_libdir}/libXrdBwm-6.so +%{_libdir}/libXrdCmsRedirectLocal-6.so +%{_libdir}/libXrdFileCache-6.so +%{_libdir}/libXrdHttp-6.so +%{_libdir}/libXrdHttpCors-6.so +%{_libdir}/libXrdHttpTPC-6.so +%{_libdir}/libXrdMacaroons-6.so +%{_libdir}/libXrdN2No2p-6.so +%{_libdir}/libXrdOfsPrepGPI-6.so +%{_libdir}/libXrdOssArc-6.so +%{_libdir}/libXrdOssCsi-6.so +%{_libdir}/libXrdOssSIgpfsT-6.so +%{_libdir}/libXrdOssStats-6.so +%{_libdir}/libXrdPfc-6.so +%{_libdir}/libXrdPfcPurgeQuota-6.so +%{_libdir}/libXrdPss-6.so +%{_libdir}/libXrdSsi-6.so +%{_libdir}/libXrdSsiLog-6.so +%{_libdir}/libXrdThrottle-6.so +%{_libdir}/libXrdXrootd-6.so %files server-devel %{_includedir}/%{name}/XrdAcc @@ -639,25 +654,21 @@ fi %{_mandir}/man1/xrootdfs.1* %files voms -%{_libdir}/libXrdVoms-5.so -%{_libdir}/libXrdHttpVOMS-5.so -%{_libdir}/libXrdSecgsiVOMS-5.so +%{_libdir}/libXrdVoms-6.so +%{_libdir}/libXrdHttpVOMS-6.so +%{_libdir}/libXrdSecgsiVOMS-6.so %doc %{_mandir}/man1/libXrdVoms.1* %doc %{_mandir}/man1/libXrdSecgsiVOMS.1* %doc src/XrdVoms/README.md %files scitokens -%{_libdir}/libXrdAccSciTokens-5.so +%{_libdir}/libXrdAccSciTokens-6.so %doc src/XrdSciTokens/README.md -%files -n xrdcl-http -%{_libdir}/libXrdClHttp-5.so -%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/xrdcl-http-plugin.conf - %if %{ceph} %files ceph -%{_libdir}/libXrdCeph-5.so -%{_libdir}/libXrdCephXattr-5.so +%{_libdir}/libXrdCeph-6.so +%{_libdir}/libXrdCephXattr-6.so %{_libdir}/libXrdCephPosix.so.* %endif @@ -670,6 +681,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Apr 11 2026 Mattias Ellert - 1:6.0.0-1 +- Update to version 6.0.0 + * Fri Mar 27 2026 Mattias Ellert - 1:5.9.2-1 - Update to version 5.9.2 - Drop patches accepted upstream or previously backported From 8acacae375b0e25f539031b7d654e99d0f717145 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 1 Jun 2026 04:22:36 +0200 Subject: [PATCH 30/37] Update to version 6.0.2 Adapt to OpenSSL 4.0 Drop patches accepted upstream --- ...Sys-XrdSysPlatform.hh-for-MAXPATHLEN.patch | 37 -- ...se-timeouts-for-slow-debian-builders.patch | 71 --- ...g-preventing-the-configuration-of-th.patch | 28 + ...-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch | 566 ++++++++++++++++++ ...h-all-work-around-for-missing-gettid.patch | 39 -- 0002-XrdCrypto-Preserve-ABI.patch | 30 + 0003-Also-check-for-GNU-in-statx.patch | 39 -- ...s-tests-when-usr-sbin-is-not-in-PATH.patch | 45 -- 0005-Fix-typo-conent-content.patch | 28 - ...nge-file-to-avoid-sed-during-install.patch | 25 - sources | 2 +- xrootd.spec | 55 +- 12 files changed, 647 insertions(+), 318 deletions(-) delete mode 100644 0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch delete mode 100644 0001-Increase-timeouts-for-slow-debian-builders.patch create mode 100644 0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch create mode 100644 0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch delete mode 100644 0002-Add-catch-all-work-around-for-missing-gettid.patch create mode 100644 0002-XrdCrypto-Preserve-ABI.patch delete mode 100644 0003-Also-check-for-GNU-in-statx.patch delete mode 100644 0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch delete mode 100644 0005-Fix-typo-conent-content.patch delete mode 100644 0006-Change-file-to-avoid-sed-during-install.patch diff --git a/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch b/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch deleted file mode 100644 index 849c380..0000000 --- a/0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f0cb3ce78d9e1bd2bcac7c43e8b272b9350ec3f6 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 21:16:11 +0200 -Subject: [PATCH 1/6] Add #include "XrdSys/XrdSysPlatform.hh" for MAXPATHLEN - ---- - src/XrdOssArc/XrdOssArcBackup.cc | 1 + - src/XrdOssArc/XrdOssArcConfig.cc | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/XrdOssArc/XrdOssArcBackup.cc b/src/XrdOssArc/XrdOssArcBackup.cc -index f24912cb9..f49e7bdab 100644 ---- a/src/XrdOssArc/XrdOssArcBackup.cc -+++ b/src/XrdOssArc/XrdOssArcBackup.cc -@@ -47,6 +47,7 @@ - #include "XrdOuc/XrdOucStream.hh" - - #include "XrdSys/XrdSysError.hh" -+#include "XrdSys/XrdSysPlatform.hh" - #include "XrdSys/XrdSysPthread.hh" - - /******************************************************************************/ -diff --git a/src/XrdOssArc/XrdOssArcConfig.cc b/src/XrdOssArc/XrdOssArcConfig.cc -index 7f6ee0ac8..620c0bed1 100644 ---- a/src/XrdOssArc/XrdOssArcConfig.cc -+++ b/src/XrdOssArc/XrdOssArcConfig.cc -@@ -61,6 +61,7 @@ - #include "XrdOuc/XrdOucUtils.hh" - - #include "XrdSys/XrdSysError.hh" -+#include "XrdSys/XrdSysPlatform.hh" - - /******************************************************************************/ - /* G l o b a l O b j e c t s */ --- -2.53.0 - diff --git a/0001-Increase-timeouts-for-slow-debian-builders.patch b/0001-Increase-timeouts-for-slow-debian-builders.patch deleted file mode 100644 index ed0ec85..0000000 --- a/0001-Increase-timeouts-for-slow-debian-builders.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 461010b0811ae5013de534befd89c4c6dbd58037 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 23:14:11 +0200 -Subject: [PATCH] Increase timeouts for slow debian builders - ---- - tests/XRootD/test.sh | 2 +- - tests/XrdClHttp/setup.sh | 4 ++-- - tests/XrdClS3/s3-setup.sh | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tests/XRootD/test.sh b/tests/XRootD/test.sh -index be160a2cf..e85c09053 100755 ---- a/tests/XRootD/test.sh -+++ b/tests/XRootD/test.sh -@@ -58,7 +58,7 @@ export XRD_LOGLEVEL XRD_LOGFILE - # Reduce default timeouts to catch errors quickly and prevent the test - # suite from getting stuck waiting for timeouts while running. - --: "${XRD_REQUESTTIMEOUT:=15}" -+: "${XRD_REQUESTTIMEOUT:=60}" - : "${XRD_STREAMTIMEOUT:=10}" - : "${XRD_TIMEOUTRESOLUTION:=1}" - -diff --git a/tests/XrdClHttp/setup.sh b/tests/XrdClHttp/setup.sh -index d3f4ca901..df49308f9 100755 ---- a/tests/XrdClHttp/setup.sh -+++ b/tests/XrdClHttp/setup.sh -@@ -445,7 +445,7 @@ echo "Cache started at port $CACHE_PORT" - - if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ - issuer_public.pem issuer_private.pem test_key \ -- https://localhost:9443 storage.read:/ 600 > "$RUNDIR/token"; then -+ https://localhost:9443 storage.read:/ 3600 > "$RUNDIR/token"; then - echo "Failed to generate read token" - exit 1 - fi -@@ -453,7 +453,7 @@ echo "Sample read token available at $RUNDIR/token" - - if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ - issuer_public.pem issuer_private.pem test_key \ -- https://localhost:9443 storage.modify:/ 600 > "$RUNDIR/write.token"; then -+ https://localhost:9443 storage.modify:/ 3600 > "$RUNDIR/write.token"; then - echo "Failed to generate write token" - exit 1 - fi -diff --git a/tests/XrdClS3/s3-setup.sh b/tests/XrdClS3/s3-setup.sh -index 962824936..4c1d356a2 100755 ---- a/tests/XrdClS3/s3-setup.sh -+++ b/tests/XrdClS3/s3-setup.sh -@@ -267,7 +267,7 @@ fi - - if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ - "$RUNDIR/issuer/issuer_public.pem" "$RUNDIR/issuer/issuer_private.pem" test_key \ -- https://localhost:9443 storage.read:/ 600 > "$RUNDIR/token"; then -+ https://localhost:9443 storage.read:/ 3600 > "$RUNDIR/token"; then - echo "Failed to generate read token" - exit 1 - fi -@@ -275,7 +275,7 @@ echo "Sample read token available at $RUNDIR/token" - - if ! "$BINARY_DIR/bin/xrdscitokens-create-token" \ - "$RUNDIR/issuer/issuer_public.pem" "$RUNDIR/issuer/issuer_private.pem" test_key \ -- https://localhost:9443 storage.modify:/ 600 > "$RUNDIR/write.token"; then -+ https://localhost:9443 storage.modify:/ 3600 > "$RUNDIR/write.token"; then - echo "Failed to generate write token" - exit 1 - fi --- -2.53.0 - diff --git a/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch b/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch new file mode 100644 index 0000000..9526c32 --- /dev/null +++ b/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch @@ -0,0 +1,28 @@ +From 71ea4b5b2c68937500f4c7b70a9d775781776eb5 Mon Sep 17 00:00:00 2001 +From: Brian Bockelman +Date: Thu, 21 May 2026 08:44:03 -0500 +Subject: [PATCH] [XrdClHttp] Fix bug preventing the configuration of threads + +Appears a prior refactoring caused the thread configuration to use +the wrong variable, causing 8 worker threads to be used regardless +of the current configuration. +--- + src/XrdClHttp/XrdClHttpFactory.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XrdClHttp/XrdClHttpFactory.cc b/src/XrdClHttp/XrdClHttpFactory.cc +index 81413eff4..08d8ef8bd 100644 +--- a/src/XrdClHttp/XrdClHttpFactory.cc ++++ b/src/XrdClHttp/XrdClHttpFactory.cc +@@ -194,7 +194,7 @@ Factory::Initialize() + auto &cache = XrdClHttp::VerbsCache::Instance(); + + // Startup curl workers after we've set the configs to avoid race conditions +- for (unsigned idx=0; idx(m_queue, cache, m_log); + auto wkp = wk.get(); + std::thread t(XrdClHttp::CurlWorker::RunStatic, wkp); +-- +2.54.0 + diff --git a/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch b/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch new file mode 100644 index 0000000..e46ad9e --- /dev/null +++ b/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch @@ -0,0 +1,566 @@ +From 534e1aa2efd8e59271d2410dc4a4d33ab7bc8ed9 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 23 May 2026 18:57:54 +0200 +Subject: [PATCH 1/2] [XrdCrypto/XrdTls/XrdVoms] Adapt to OpenSSL 4.0 + +--- + src/XrdCrypto/XrdCryptosslAux.cc | 6 +- + src/XrdCrypto/XrdCryptosslAux.hh | 2 +- + src/XrdCrypto/XrdCryptosslX509.cc | 48 +++++---- + src/XrdCrypto/XrdCryptosslX509Crl.cc | 2 +- + src/XrdCrypto/XrdCryptosslgsiAux.cc | 140 ++++++++++++++++++++------- + src/XrdTls/XrdTlsNotaryUtils.icc | 4 +- + src/XrdVoms/XrdVomsFun.cc | 2 +- + src/XrdVoms/XrdVomsFun.hh | 2 +- + 8 files changed, 145 insertions(+), 61 deletions(-) + +diff --git a/src/XrdCrypto/XrdCryptosslAux.cc b/src/XrdCrypto/XrdCryptosslAux.cc +index 3893bc2b4..a44283985 100644 +--- a/src/XrdCrypto/XrdCryptosslAux.cc ++++ b/src/XrdCrypto/XrdCryptosslAux.cc +@@ -691,13 +691,13 @@ time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1) + // Our result is in agreement with 'date +%s`. + struct tm ltm; + char zz; +- if ((sscanf((const char *)(tsn1->data), ++ if ((sscanf((const char *) ASN1_STRING_get0_data(tsn1), + "%02d%02d%02d%02d%02d%02d%c", + &(ltm.tm_year), &(ltm.tm_mon), &(ltm.tm_mday), + &(ltm.tm_hour), &(ltm.tm_min), &(ltm.tm_sec), + &zz) != 7) || (zz != 'Z')) { + // Try GeneralizedTime +- if ((sscanf((const char *)(tsn1->data), ++ if ((sscanf((const char *) ASN1_STRING_get0_data(tsn1), + "%04d%02d%02d%02d%02d%02d%c", + &(ltm.tm_year), &(ltm.tm_mon), &(ltm.tm_mday), + &(ltm.tm_hour), &(ltm.tm_min), &(ltm.tm_sec), +@@ -733,7 +733,7 @@ time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1) + } + + //____________________________________________________________________________ +-void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s) ++void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s) + { + // Function to convert X509_NAME into a one-line human readable string + +diff --git a/src/XrdCrypto/XrdCryptosslAux.hh b/src/XrdCrypto/XrdCryptosslAux.hh +index 36f3aad1b..de852be3f 100644 +--- a/src/XrdCrypto/XrdCryptosslAux.hh ++++ b/src/XrdCrypto/XrdCryptosslAux.hh +@@ -74,7 +74,7 @@ int XrdCryptosslX509ParseStack(XrdTlsPeerCerts* pc, XrdCryptoX509Chain *chain); + time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1); + + // Function to convert X509_NAME into a one-line human readable string +-void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s); ++void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s); + + // + // X509 proxy auxilliary functions +diff --git a/src/XrdCrypto/XrdCryptosslX509.cc b/src/XrdCrypto/XrdCryptosslX509.cc +index bcc79c89c..d9d2b182f 100644 +--- a/src/XrdCrypto/XrdCryptosslX509.cc ++++ b/src/XrdCrypto/XrdCryptosslX509.cc +@@ -340,7 +340,11 @@ void XrdCryptosslX509::CertType() + + bool done = 0; + // Check the extensions ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *ext = 0; ++#else ++ const X509_EXTENSION *ext = 0; ++#endif + int idx = -1; + + // For CAs we are looking for a "basicConstraints" +@@ -684,7 +688,11 @@ XrdCryptoX509data XrdCryptosslX509::GetExtension(const char *oid) + + // Loop to identify the one we would like + int i = 0; ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *wext = 0; ++#else ++ const X509_EXTENSION *wext = 0; ++#endif + for (i = 0; i< numext; i++) { + wext = X509_get_ext(cert, i); + if (usenid) { +@@ -821,7 +829,11 @@ int XrdCryptosslX509::DumpExtensions(bool dumpunknown) + + rc = 1; + // Go through the extensions ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *xpiext = 0; ++#else ++ const X509_EXTENSION *xpiext = 0; ++#endif + int npiext = X509_get_ext_count(xpi); + PRINT("found "<data; +- long length = X509_EXTENSION_get_data(xpiext)->length; ++ const unsigned char *pp = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); ++ long length = ASN1_STRING_length(X509_EXTENSION_get_data(xpiext)); + int ret = FillUnknownExt(&pp, length, dumpunknown); + PRINT("ret: " << ret); + } +@@ -957,10 +969,10 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool + int i, printable = 1; + opp = op; + os = d2i_ASN1_OCTET_STRING(0, &opp, len + hl); +- if (os && os->length > 0) { +- opp = os->data; ++ if (os && ASN1_STRING_length(os) > 0) { ++ opp = ASN1_STRING_get0_data(os); + /* testing whether the octet string is * printable */ +- for (i=0; ilength; i++) { ++ for (i=0; i < ASN1_STRING_length(os); i++) { + if (( (opp[i] < ' ') && (opp[i] != '\n') && + (opp[i] != '\r') && (opp[i] != '\t')) || (opp[i] > '~')) { + printable = 0; +@@ -969,16 +981,16 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool + } + if (printable) { + /* printable string */ +- char *s = new char[os->length + 1]; +- memcpy(s, opp, os->length); +- s[os->length] = 0; +- if (dump) PRINT("OBJS:" << s << " (len: "<length<<")"); ++ char *s = new char[ASN1_STRING_length(os) + 1]; ++ memcpy(s, opp, ASN1_STRING_length(os)); ++ s[ASN1_STRING_length(os)] = 0; ++ if (dump) PRINT("OBJS:" << s << " (len: " << ASN1_STRING_length(os) << ")"); + delete [] s; + } else { + /* print the normal dump */ + if (!nl) PRINT("OBJS:"); + BIO *mem = BIO_new(BIO_s_mem()); +- if (BIO_dump_indent(mem, (const char *)opp, os->length, dump_indent) <= 0) { ++ if (BIO_dump_indent(mem, (const char *)opp, ASN1_STRING_length(os), dump_indent) <= 0) { + if (dump) PRINT("ERROR:OBJS: problems dumping to BIO"); + BIO_free(mem); + goto end; +@@ -999,18 +1011,18 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool + bs = d2i_ASN1_INTEGER(0, &opp, len+hl); + if (bs) { + if (dump) PRINT("AINT:"); +- if (bs->type == V_ASN1_NEG_INTEGER) ++ if (ASN1_STRING_type(bs) == V_ASN1_NEG_INTEGER) + if (dump) PRINT("-"); + BIO *mem = BIO_new(BIO_s_mem()); +- for (i = 0; i < bs->length; i++) { +- if (BIO_printf(mem, "%02X", bs->data[i]) <= 0) { ++ for (i = 0; i < ASN1_STRING_length(bs); i++) { ++ if (BIO_printf(mem, "%02X", ASN1_STRING_get0_data(bs)[i]) <= 0) { + if (dump) PRINT("ERROR:AINT: problems printf-ing to BIO"); + BIO_free(mem); + goto end; + } + } + if (dump) { BIO_PRINT(mem, "AINT:"); } +- if (bs->length == 0) PRINT("00"); ++ if (ASN1_STRING_length(bs) == 0) PRINT("00"); + } else { + if (dump) PRINT("ERROR:AINT: BAD INTEGER"); + } +@@ -1023,18 +1035,18 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool + bs = d2i_ASN1_ENUMERATED(0, &opp, len+hl); + if (bs) { + if (dump) PRINT("AENU:"); +- if (bs->type == V_ASN1_NEG_ENUMERATED) ++ if (ASN1_STRING_type(bs) == V_ASN1_NEG_ENUMERATED) + if (dump) PRINT("-"); + BIO *mem = BIO_new(BIO_s_mem()); +- for (i = 0; i < bs->length; i++) { +- if (BIO_printf(mem, "%02X", bs->data[i]) <= 0) { ++ for (i = 0; i < ASN1_STRING_length(bs); i++) { ++ if (BIO_printf(mem, "%02X", ASN1_STRING_get0_data(bs)[i]) <= 0) { + if (dump) PRINT("ERROR:AENU: problems printf-ing to BIO"); + BIO_free(mem); + goto end; + } + } + if (dump) { BIO_PRINT(mem, "AENU:"); } +- if (bs->length == 0) PRINT("00"); ++ if (ASN1_STRING_length(bs) == 0) PRINT("00"); + } else { + if (dump) PRINT("ERROR:AENU: BAD ENUMERATED"); + } +diff --git a/src/XrdCrypto/XrdCryptosslX509Crl.cc b/src/XrdCrypto/XrdCryptosslX509Crl.cc +index 61ddaf83c..cc9f324bb 100644 +--- a/src/XrdCrypto/XrdCryptosslX509Crl.cc ++++ b/src/XrdCrypto/XrdCryptosslX509Crl.cc +@@ -105,7 +105,7 @@ XrdCryptosslX509Crl::XrdCryptosslX509Crl(XrdCryptoX509 *cacert) + + // Bio for exporting the extension + BIO *bext = BIO_new(BIO_s_mem()); +- ASN1_OBJECT *obj = X509_EXTENSION_get_object(crlext); ++ const ASN1_OBJECT *obj = X509_EXTENSION_get_object(crlext); + i2a_ASN1_OBJECT(bext, obj); + X509V3_EXT_print(bext, crlext, 0, 4); + // data length +diff --git a/src/XrdCrypto/XrdCryptosslgsiAux.cc b/src/XrdCrypto/XrdCryptosslgsiAux.cc +index 8f4b929c1..a5d20e1af 100644 +--- a/src/XrdCrypto/XrdCryptosslgsiAux.cc ++++ b/src/XrdCrypto/XrdCryptosslgsiAux.cc +@@ -165,12 +165,12 @@ bool XrdCryptosslProxyCertInfo(const void *extdata, int &pathlen, bool *haspolic + OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ext), 1); + + // Now extract the path length constraint, if any +- unsigned char *p = X509_EXTENSION_get_data(ext)->data; ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); + PROXY_CERT_INFO_EXTENSION *pci = 0; + if (!strcmp(s, gsiProxyCertInfo_OID)) +- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + else if (!strcmp(s, gsiProxyCertInfo_OLD_OID)) +- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + if (!pci) { + return 0; + } +@@ -208,12 +208,12 @@ void XrdCryptosslSetPathLenConstraint(void *extdata, int pathlen) + OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ext), 1); + + // Now extract the path length constraint, if any +- unsigned char *p = X509_EXTENSION_get_data(ext)->data; ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); + PROXY_CERT_INFO_EXTENSION *pci = 0; + if (!strcmp(s, gsiProxyCertInfo_OID)) +- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + else if (!strcmp(s, gsiProxyCertInfo_OLD_OID)) +- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + if (!pci) + return; + +@@ -419,16 +419,32 @@ int XrdCryptosslX509CreateProxy(const char *fnc, const char *fnk, + return -kErrPX_SetAttribute; + } + // Extract data in format for extension +- X509_EXTENSION_get_data(ext)->length = i2d_PROXY_CERT_INFO_EXTENSION(pci, 0); +- if (!(X509_EXTENSION_get_data(ext)->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext)->length+1))) { ++ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci, 0); ++ unsigned char *data = (unsigned char *) malloc(len); ++ if (!data) { + PRINT("could not allocate data field for extension"); + return -kErrPX_NoResources; + } +- unsigned char *pp = X509_EXTENSION_get_data(ext)->data; ++ unsigned char *pp = data; + if ((i2d_PROXY_CERT_INFO_EXTENSION(pci, &pp)) <= 0) { + PRINT("problem converting data for extension"); + return -kErrPX_Error; + } ++ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); ++ if (!os) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ free(data); ++ if (X509_EXTENSION_set_data(ext, os) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ ASN1_STRING_free(os); + // Create a stack + STACK_OF(X509_EXTENSION) *esk = sk_X509_EXTENSION_new_null(); + if (!esk) { +@@ -504,7 +520,11 @@ int XrdCryptosslX509CreateProxy(const char *fnc, const char *fnk, + } + + // First duplicate the extensions of the EE certificate ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *xEECext = 0; ++#else ++ const X509_EXTENSION *xEECext = 0; ++#endif + int nEECext = X509_get_ext_count(xEEC); + DEBUG("number of extensions found in the original certificate: "<< nEECext); + int i = 0; +@@ -756,7 +776,11 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, + } + // + // Get signature path depth from present proxy ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *xpiext = 0; ++#else ++ const X509_EXTENSION *xpiext = 0; ++#endif + int npiext = X509_get_ext_count(xpi); + int i = 0; + bool haskeyusage = 0; +@@ -772,12 +796,12 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, + // Get signature path depth from present proxy + if (!strcmp(s, gsiProxyCertInfo_OID) || + !strcmp(s, gsiProxyCertInfo_OLD_OID)) { +- unsigned char *p = X509_EXTENSION_get_data(xpiext)->data; ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); + PROXY_CERT_INFO_EXTENSION *inpci = 0; + if (!strcmp(s, gsiProxyCertInfo_OID)) +- inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); ++ inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); + else +- inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); ++ inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); + if (inpci && + inpci->pcPathLengthConstraint) + indepthlen = ASN1_INTEGER_get(inpci->pcPathLengthConstraint); +@@ -823,16 +847,32 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, + return -kErrPX_NoResources; + } + // Extract data in format for extension +- X509_EXTENSION_get_data(ext.get())->length = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); +- if (!(X509_EXTENSION_get_data(ext.get())->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext.get())->length+1))) { ++ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); ++ unsigned char *data = (unsigned char *) malloc(len); ++ if (!data) { + PRINT("could not allocate data field for extension"); + return -kErrPX_NoResources; + } +- unsigned char *pp = X509_EXTENSION_get_data(ext.get())->data; ++ unsigned char *pp = data; + if ((i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), &pp)) <= 0) { + PRINT("problem converting data for extension"); + return -kErrPX_Error; + } ++ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); ++ if (!os) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ free(data); ++ if (X509_EXTENSION_set_data(ext.get(), os) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ ASN1_STRING_free(os); + pci = nullptr; + + // Set extension name. +@@ -1030,7 +1070,11 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, + + // + // Get signature path depth from input proxy ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *xpiext = 0, *xriext = 0; ++#else ++ const X509_EXTENSION *xpiext = 0, *xriext = 0; ++#endif + int npiext = X509_get_ext_count(xpi); + int i = 0; + bool haskeyusage = 0; +@@ -1038,17 +1082,17 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, + for (i = 0; i< npiext; i++) { + xpiext = X509_get_ext(xpi, i); + char s[256] = {0}; +- ASN1_OBJECT *obj = X509_EXTENSION_get_object(xpiext); ++ const ASN1_OBJECT *obj = X509_EXTENSION_get_object(xpiext); + if (obj) + OBJ_obj2txt(s, sizeof(s), obj, 1); + if (!strcmp(s, gsiProxyCertInfo_OID) || + !strcmp(s, gsiProxyCertInfo_OLD_OID)) { +- unsigned char *p = X509_EXTENSION_get_data(xpiext)->data; ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); + PROXY_CERT_INFO_EXTENSION *inpci = 0; + if (!strcmp(s, gsiProxyCertInfo_OID)) +- inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); ++ inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); + else +- inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); ++ inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); + if (inpci && + inpci->pcPathLengthConstraint) + indepthlen = ASN1_INTEGER_get(inpci->pcPathLengthConstraint); +@@ -1101,9 +1145,9 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, + // Get the content + int reqdepthlen = -1; + if (xriext) { +- unsigned char *p = X509_EXTENSION_get_data(xriext)->data; ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xriext)); + PROXY_CERT_INFO_EXTENSION *reqpci = +- d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xriext)->length); ++ d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xriext))); + if (reqpci && + reqpci->pcPathLengthConstraint) + reqdepthlen = ASN1_INTEGER_get(reqpci->pcPathLengthConstraint); +@@ -1140,16 +1184,32 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, + return -kErrPX_NoResources; + } + // Extract data in format for extension +- X509_EXTENSION_get_data(ext.get())->length = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); +- if (!(X509_EXTENSION_get_data(ext.get())->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext.get())->length+1))) { ++ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); ++ unsigned char *data = (unsigned char *) malloc(len); ++ if (!data) { + PRINT("could not allocate data field for extension"); + return -kErrPX_NoResources; + } +- unsigned char *pp = X509_EXTENSION_get_data(ext.get())->data; ++ unsigned char *pp = data; + if ((i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), &pp)) <= 0) { + PRINT("problem converting data for extension"); + return -kErrPX_Error; + } ++ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); ++ if (!os) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ free(data); ++ if (X509_EXTENSION_set_data(ext.get(), os) == 0) { ++ PRINT("could not allocate data field for extension"); ++ return -kErrPX_NoResources; ++ } ++ ASN1_STRING_free(os); + pci = nullptr; + + // Set extension name. +@@ -1215,7 +1275,11 @@ int XrdCryptosslX509GetVOMSAttr(XrdCryptoX509 *xcpi, XrdOucString &vat) + rc = 1; + bool getvat = 0; + // Go through the extensions ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + X509_EXTENSION *xpiext = 0; ++#else ++ const X509_EXTENSION *xpiext = 0; ++#endif + int npiext = X509_get_ext_count(xpi); + int i = 0; + for (i = 0; i< npiext; i++) { +@@ -1227,8 +1291,8 @@ int XrdCryptosslX509GetVOMSAttr(XrdCryptoX509 *xcpi, XrdOucString &vat) + if (strcmp(s, XRDGSI_VOMS_ACSEQ_OID)) continue; + // This is the VOMS extension we are interested for + rc = 0; +- const unsigned char *pp = (const unsigned char *) X509_EXTENSION_get_data(xpiext)->data; +- long length = X509_EXTENSION_get_data(xpiext)->length; ++ const unsigned char *pp = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); ++ long length = ASN1_STRING_length(X509_EXTENSION_get_data(xpiext)); + int ret = XrdCryptosslX509FillVOMS(&pp, length, getvat, vat); + DEBUG("ret: " << ret << " - vat: " << vat); + } +@@ -1316,10 +1380,10 @@ int XrdCryptosslX509FillVOMS(const unsigned char **pp, + int i, printable = 1; + opp = op; + os = d2i_ASN1_OCTET_STRING(0, &opp, len + hl); +- if (os && os->length > 0) { +- opp = os->data; ++ if (os && ASN1_STRING_length(os) > 0) { ++ opp = ASN1_STRING_get0_data(os); + // Testing whether the octet string is printable +- for (i=0; ilength; i++) { ++ for (i=0; i < ASN1_STRING_length(os); i++) { + if (( (opp[i] < ' ') && (opp[i] != '\n') && + (opp[i] != '\r') && (opp[i] != '\t')) || (opp[i] > '~')) { + printable = 0; +@@ -1333,7 +1397,7 @@ int XrdCryptosslX509FillVOMS(const unsigned char **pp, + vat += (const char *)opp; + gotvat = 1; + } +- DEBUG("OBJS:" << (const char *)opp << " (len: "<length<<")"); ++ DEBUG("OBJS:" << (const char *)opp << " (len: " << ASN1_STRING_length(os) << ")"); + } + } + if (os) { +@@ -1385,11 +1449,19 @@ int XrdCryptosslX509CheckProxy3(XrdCryptoX509 *xcpi, XrdOucString &emsg) { + } + TRACE(ALL,"certificate has "<data; +- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + } else { + PRINT("WARNING: multiple proxyCertInfo extensions found: taking the first"); + } +@@ -1408,8 +1480,8 @@ int XrdCryptosslX509CheckProxy3(XrdCryptoX509 *xcpi, XrdOucString &emsg) { + if (ext == 0) { + ext = xext; + // Now get the extension +- unsigned char *p = X509_EXTENSION_get_data(ext)->data; +- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); ++ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); ++ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); + } else { + PRINT("WARNING: multiple proxyCertInfo extensions found: taking the first"); + } +diff --git a/src/XrdTls/XrdTlsNotaryUtils.icc b/src/XrdTls/XrdTlsNotaryUtils.icc +index 44125d988..3ded4f993 100644 +--- a/src/XrdTls/XrdTlsNotaryUtils.icc ++++ b/src/XrdTls/XrdTlsNotaryUtils.icc +@@ -56,8 +56,8 @@ SOFTWARE. + */ + static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { + int common_name_loc = -1; +- X509_NAME_ENTRY *common_name_entry = NULL; +- ASN1_STRING *common_name_asn1 = NULL; ++ const X509_NAME_ENTRY *common_name_entry = NULL; ++ const ASN1_STRING *common_name_asn1 = NULL; + char *common_name_str = NULL; + + // Find the position of the CN field in the Subject field of the certificate +diff --git a/src/XrdVoms/XrdVomsFun.cc b/src/XrdVoms/XrdVomsFun.cc +index a4bc9b8b7..fe6e8ebb7 100644 +--- a/src/XrdVoms/XrdVomsFun.cc ++++ b/src/XrdVoms/XrdVomsFun.cc +@@ -110,7 +110,7 @@ XrdVomsFun::XrdVomsFun(XrdSysError &erp) + + // Function to convert X509_NAME into a one-line human readable string + // +-void XrdVomsFun::NameOneLine(X509_NAME *nm, XrdOucString &s) ++void XrdVomsFun::NameOneLine(const X509_NAME *nm, XrdOucString &s) + { + BIO *mbio = BIO_new(BIO_s_mem()); + X509_NAME_print_ex(mbio, nm, 0, XN_FLAG_COMPAT); +diff --git a/src/XrdVoms/XrdVomsFun.hh b/src/XrdVoms/XrdVomsFun.hh +index ff5df58ef..5c1129ab8 100644 +--- a/src/XrdVoms/XrdVomsFun.hh ++++ b/src/XrdVoms/XrdVomsFun.hh +@@ -65,7 +65,7 @@ int VOMSInit(const char *cfg); + private: + + void FmtExtract(XrdOucString &out, XrdOucString in, const char *tag); +-void NameOneLine(X509_NAME *nm, XrdOucString &s); ++void NameOneLine(const X509_NAME *nm, XrdOucString &s); + void FmtReplace(XrdSecEntity &ent); + + // These settings are configurable +-- +2.54.0 + diff --git a/0002-Add-catch-all-work-around-for-missing-gettid.patch b/0002-Add-catch-all-work-around-for-missing-gettid.patch deleted file mode 100644 index 0a208f7..0000000 --- a/0002-Add-catch-all-work-around-for-missing-gettid.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0ef5b1a97d1ca0d8258384353165b8545463876a Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 21:20:48 +0200 -Subject: [PATCH 2/6] Add catch-all work-around for missing gettid - -Possibly there are better solutions, but this is consistent with the -implementation in src/XrdSys/XrdSysPthread.cc ---- - src/XrdClHttp/XrdClHttpUtil.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/XrdClHttp/XrdClHttpUtil.cc b/src/XrdClHttp/XrdClHttpUtil.cc -index a1597b200..7bedb4373 100644 ---- a/src/XrdClHttp/XrdClHttpUtil.cc -+++ b/src/XrdClHttp/XrdClHttpUtil.cc -@@ -86,16 +86,18 @@ struct WaitingForBroker { - namespace { - - pid_t getthreadid() { --#ifdef __APPLE__ -+#if defined(__APPLE__) - uint64_t pth_threadid; - pthread_threadid_np(pthread_self(), &pth_threadid); - return pth_threadid; --#else -+#elif defined(__linux__) - // NOTE: glibc 2.30 finally provides a gettid() wrapper; however, - // we currently support RHEL 8, which is based on glibc 2.28. Until - // we drop that platform, it's easier to do the syscall directly on Linux - // instead of additional ifdef calls. - return syscall(SYS_gettid); -+#else -+ return getpid(); - #endif - } - --- -2.53.0 - diff --git a/0002-XrdCrypto-Preserve-ABI.patch b/0002-XrdCrypto-Preserve-ABI.patch new file mode 100644 index 0000000..02aa7a5 --- /dev/null +++ b/0002-XrdCrypto-Preserve-ABI.patch @@ -0,0 +1,30 @@ +From 09a98373bc442d515f347593c113842733ea60b7 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 23 May 2026 20:59:04 +0200 +Subject: [PATCH 2/2] [XrdCrypto] Preserve ABI + +Add back now unused non-const version of function +--- + src/XrdCrypto/XrdCryptosslAux.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/XrdCrypto/XrdCryptosslAux.cc b/src/XrdCrypto/XrdCryptosslAux.cc +index a44283985..e0ce35285 100644 +--- a/src/XrdCrypto/XrdCryptosslAux.cc ++++ b/src/XrdCrypto/XrdCryptosslAux.cc +@@ -755,3 +755,12 @@ void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s) + // Done + return; + } ++ ++//____________________________________________________________________________ ++void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s) ++{ ++ // Copy of above function with non-const first argument ++ // This function is unused -- only added to preserve old ABI ++ // Can be removed if soname changes ++ XrdCryptosslNameOneLine(const_cast(nm), s); ++} +-- +2.54.0 + diff --git a/0003-Also-check-for-GNU-in-statx.patch b/0003-Also-check-for-GNU-in-statx.patch deleted file mode 100644 index 487ec14..0000000 --- a/0003-Also-check-for-GNU-in-statx.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0492078b60e7ffc50ee8fd2282b5960e264a17b4 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 21:53:38 +0200 -Subject: [PATCH 3/6] Also check for GNU in statx - ---- - src/XrdSys/XrdSysStatx.hh | 2 +- - tests/XrdSysTests/XrdSysStatxTests.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/XrdSys/XrdSysStatx.hh b/src/XrdSys/XrdSysStatx.hh -index 13b4894e0..dfaa3f7be 100644 ---- a/src/XrdSys/XrdSysStatx.hh -+++ b/src/XrdSys/XrdSysStatx.hh -@@ -35,7 +35,7 @@ - #include - #include - --#ifdef __linux__ -+#if defined(__linux__) || defined(__GNU__) - #include - using XrdSysStatx = struct statx; - #define HAVE_STATX -diff --git a/tests/XrdSysTests/XrdSysStatxTests.cc b/tests/XrdSysTests/XrdSysStatxTests.cc -index d2d7e729f..23d2aaac6 100644 ---- a/tests/XrdSysTests/XrdSysStatxTests.cc -+++ b/tests/XrdSysTests/XrdSysStatxTests.cc -@@ -27,7 +27,7 @@ TEST_F(XrdSysStatxTests, Stat2StatxBasicFields) { - - EXPECT_EQ(stx.stx_mask, (uint32_t)STATX_BASIC_STATS); - --#ifdef __linux__ -+#if defined(__linux__) || defined(__GNU__) - EXPECT_EQ(stx.stx_mode, (uint16_t)(S_IFREG | 0755)); - EXPECT_EQ(stx.stx_nlink, (uint32_t)3); - EXPECT_EQ(stx.stx_uid, (uint32_t)1000); --- -2.53.0 - diff --git a/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch b/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch deleted file mode 100644 index 67dd202..0000000 --- a/0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e079b7cb1af1410ed15c7958e089ece6b36c5900 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 21:55:56 +0200 -Subject: [PATCH 4/6] Fix kerberos tests when /usr/sbin is not in PATH - ---- - tests/krb5/kerberos.sh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/krb5/kerberos.sh b/tests/krb5/kerberos.sh -index b4af5e102..5b6405cd9 100755 ---- a/tests/krb5/kerberos.sh -+++ b/tests/krb5/kerberos.sh -@@ -36,16 +36,16 @@ function setup() { - popd >/dev/null || exit 1 - - # Create the KDC database -- kdb5_util create -s -r XROOTD.ORG -P xrootd -+ /usr/sbin/kdb5_util create -s -r XROOTD.ORG -P xrootd - - # Start the KDC daemons -- krb5kdc -P "${PWD}"/krb5kdc.pid -+ /usr/sbin/krb5kdc -P "${PWD}"/krb5kdc.pid - - # Not really needed, since we use kadmin.local - # kadmind -P ${PWD}/kadmind.pid - - # Add principals for the server and client to KDC database -- kadmin.local -r XROOTD.ORG <<-EOF -+ /usr/sbin/kadmin.local -r XROOTD.ORG <<-EOF - add_principal -randkey -kvno 1 host/localhost@XROOTD.ORG - ktadd -k krb5.keytab host/localhost - add_principal xrootd@XROOTD.ORG -@@ -54,7 +54,7 @@ function setup() { - EOF - - # Display KDC database entries -- kdb5_util tabdump -o - keyinfo -+ /usr/sbin/kdb5_util tabdump -o - keyinfo - - # Display contents of server keytab - klist -kte krb5.keytab --- -2.53.0 - diff --git a/0005-Fix-typo-conent-content.patch b/0005-Fix-typo-conent-content.patch deleted file mode 100644 index 3307ead..0000000 --- a/0005-Fix-typo-conent-content.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2c5be32cc7afed2c3f67a1bfbc25877f5233cb11 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 22:04:23 +0200 -Subject: [PATCH 5/6] =?UTF-8?q?Fix=20typo=20conent=20=E2=86=92=20content?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - src/XrdClHttp/XrdClHttpFile.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdClHttp/XrdClHttpFile.cc b/src/XrdClHttp/XrdClHttpFile.cc -index 3a15470e8..196e4d99c 100644 ---- a/src/XrdClHttp/XrdClHttpFile.cc -+++ b/src/XrdClHttp/XrdClHttpFile.cc -@@ -557,7 +557,7 @@ File::Fcntl(const XrdCl::Buffer &arg, XrdCl::ResponseHandler *handler, - } - } - XrdCl::Buffer *respBuff = new XrdCl::Buffer(); -- m_logger->Debug(kLogXrdClHttp, "Fcntl conent %s", xatt.dump().c_str()); -+ m_logger->Debug(kLogXrdClHttp, "Fcntl content %s", xatt.dump().c_str()); - respBuff->FromString(xatt.dump()); - obj->Set(respBuff); - } --- -2.53.0 - diff --git a/0006-Change-file-to-avoid-sed-during-install.patch b/0006-Change-file-to-avoid-sed-during-install.patch deleted file mode 100644 index fa7fb1f..0000000 --- a/0006-Change-file-to-avoid-sed-during-install.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 216526c32b894a5bad7b85897decef711f121018 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 20 Apr 2026 22:42:06 +0200 -Subject: [PATCH 6/6] Change file to avoid sed during install - ---- - config/xrootd-http.cfg | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/xrootd-http.cfg b/config/xrootd-http.cfg -index cb707bf84..341f3316c 100644 ---- a/config/xrootd-http.cfg -+++ b/config/xrootd-http.cfg -@@ -33,7 +33,7 @@ all.pidpath /run/xrootd - # In order to start the xrdhttp.socket run: - # systemctl start xrdhttp@http.socket - # --xrd.protocol XrdHttp:80 /usr/lib64/libXrdHttp.so -+xrd.protocol XrdHttp:80 libXrdHttp.so - # More configuration files can be added in /etc/xrootd/config.d/ - # For example /etc/xrootd/config.d/10-mygrid.cfg and - # /etc/xrootd/config.d/98-mysite-specifics.cfg --- -2.53.0 - diff --git a/sources b/sources index a0d612c..8c2cb71 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-6.0.0.tar.gz) = 1fac24c56464e76c104deabcef0a8910dbdc18f62d93275bf1048142beb0453e05aecddaaf41abe9d183c9bafb015067994a15ae0ffeecdc2875626791d76905 +SHA512 (xrootd-6.0.2.tar.gz) = 29fe0138b06e03210ece9c3130785967016f1e076be888c1f3147e8c9ade7e506eb2047364c76f251bbae3bf8a067abc16f6929c3d8e7f615ee41c8f6f8a8263 diff --git a/xrootd.spec b/xrootd.spec index 78a689d..88f128a 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,23 +13,23 @@ Name: xrootd Epoch: 1 -Version: 6.0.0 +Version: 6.0.2 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 +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 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/2769 -Patch0: 0001-Add-include-XrdSys-XrdSysPlatform.hh-for-MAXPATHLEN.patch -Patch1: 0002-Add-catch-all-work-around-for-missing-gettid.patch -Patch2: 0003-Also-check-for-GNU-in-statx.patch -Patch3: 0004-Fix-kerberos-tests-when-usr-sbin-is-not-in-PATH.patch -Patch4: 0005-Fix-typo-conent-content.patch -Patch5: 0006-Change-file-to-avoid-sed-during-install.patch # Unbundle tinyxml library -Patch6: 0001-Unbundle-tinyxml.patch +Patch0: 0001-Unbundle-tinyxml.patch +# Adapt to OpenSSL 4 +# https://github.com/xrootd/xrootd/pull/2802 +Patch1: 0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch +Patch2: 0002-XrdCrypto-Preserve-ABI.patch +# Backport fix from upstream +# https://github.com/xrootd/xrootd/pull/2799 +Patch3: 0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -241,6 +241,7 @@ a subset of the namespace to an external issuer. %package ceph Summary: XRootD plugin for interfacing with the Ceph storage platform Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release} %description ceph The xrootd-ceph is an OSS layer plugin for the XRootD server for @@ -270,9 +271,6 @@ This package contains the API documentation of the xrootd libraries. %patch -P1 -p1 %patch -P2 -p1 %patch -P3 -p1 -%patch -P4 -p1 -%patch -P5 -p1 -%patch -P6 -p1 %build %cmake \ @@ -408,28 +406,14 @@ done touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then - %ctest -- -E XRootD::badredir +%ifarch %{ix86} %{arm} + %ctest -- -E 'XRootD::badredir|XRootD::posix' +%else + %ctest -- -E 'XRootD::badredir' +%endif else echo "Extended file attributes not supported by file system" - echo "Don't run tests that require them" - exclude="\ -XrdCl::FileCopyTest|\ -XrdCl::FileSystemTest.PlugInTest|\ -XrdCl::FileSystemTest.ServerQueryTest|\ -XrdCl::FileSystemTest.XAttrTest|\ -XrdCl::FileTest.XAttrTest|\ -XrdCl::LocalFileHandlerTest.XAttrTest|\ -XrdCl::ThreadingTest|\ -XrdCl::WorkflowTest.CheckpointTest|\ -XrdCl::WorkflowTest.XAttrWorkflowTest|\ -XrdEc::XrdEcTests|\ -XRootD::authenticated_cluster::test|\ -XRootD::badredir|\ -XRootD::cluster::test|\ -XRootD::http::test|\ -XRootD::posix::test|\ -XRootD::tpc::test" - %ctest -- -E $exclude + echo "*** NOT RUNNING TESTS ***" fi rm testfile @@ -681,6 +665,11 @@ fi %doc %{_pkgdocdir} %changelog +* Thu May 21 2026 Mattias Ellert - 1:6.0.2-1 +- Update to version 6.0.2 +- Adapt to OpenSSL 4.0 +- Drop patches accepted upstream + * Sat Apr 11 2026 Mattias Ellert - 1:6.0.0-1 - Update to version 6.0.0 From c0cfe0cb194b7e79052a464eeb97433341acc61b Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 2 Jun 2026 13:02:41 +0200 Subject: [PATCH 31/37] Update to version 6.0.3 --- ...g-preventing-the-configuration-of-th.patch | 28 ------------------- sources | 2 +- xrootd.spec | 9 +++--- 3 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch diff --git a/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch b/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch deleted file mode 100644 index 9526c32..0000000 --- a/0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 71ea4b5b2c68937500f4c7b70a9d775781776eb5 Mon Sep 17 00:00:00 2001 -From: Brian Bockelman -Date: Thu, 21 May 2026 08:44:03 -0500 -Subject: [PATCH] [XrdClHttp] Fix bug preventing the configuration of threads - -Appears a prior refactoring caused the thread configuration to use -the wrong variable, causing 8 worker threads to be used regardless -of the current configuration. ---- - src/XrdClHttp/XrdClHttpFactory.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdClHttp/XrdClHttpFactory.cc b/src/XrdClHttp/XrdClHttpFactory.cc -index 81413eff4..08d8ef8bd 100644 ---- a/src/XrdClHttp/XrdClHttpFactory.cc -+++ b/src/XrdClHttp/XrdClHttpFactory.cc -@@ -194,7 +194,7 @@ Factory::Initialize() - auto &cache = XrdClHttp::VerbsCache::Instance(); - - // Startup curl workers after we've set the configs to avoid race conditions -- for (unsigned idx=0; idx(m_queue, cache, m_log); - auto wkp = wk.get(); - std::thread t(XrdClHttp::CurlWorker::RunStatic, wkp); --- -2.54.0 - diff --git a/sources b/sources index 8c2cb71..21816ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-6.0.2.tar.gz) = 29fe0138b06e03210ece9c3130785967016f1e076be888c1f3147e8c9ade7e506eb2047364c76f251bbae3bf8a067abc16f6929c3d8e7f615ee41c8f6f8a8263 +SHA512 (xrootd-6.0.3.tar.gz) = 9f0517dcecc679f5aa385831184c9eb93ad7ad2d42bda1340a9cada7f444998fed0a212738142beaf3de6c2f26670137839ca48ca9ac5ab7d5834feb5d309aa8 diff --git a/xrootd.spec b/xrootd.spec index 88f128a..11d07d4 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 6.0.2 +Version: 6.0.3 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 @@ -27,9 +27,6 @@ Patch0: 0001-Unbundle-tinyxml.patch # https://github.com/xrootd/xrootd/pull/2802 Patch1: 0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch Patch2: 0002-XrdCrypto-Preserve-ABI.patch -# Backport fix from upstream -# https://github.com/xrootd/xrootd/pull/2799 -Patch3: 0001-XrdClHttp-Fix-bug-preventing-the-configuration-of-th.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -270,7 +267,6 @@ This package contains the API documentation of the xrootd libraries. %patch -P0 -p1 %patch -P1 -p1 %patch -P2 -p1 -%patch -P3 -p1 %build %cmake \ @@ -665,6 +661,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Jun 02 2026 Mattias Ellert - 1:6.0.3-1 +- Update to version 6.0.3 + * Thu May 21 2026 Mattias Ellert - 1:6.0.2-1 - Update to version 6.0.2 - Adapt to OpenSSL 4.0 From ecd1ba1adf318a6858ad0e9c29a71b1aad645c9a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 5 Jun 2026 00:05:44 +0200 Subject: [PATCH 32/37] Rebuilt for Python 3.15 --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 11d07d4..493ec25 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 6.0.3 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -661,6 +661,9 @@ fi %doc %{_pkgdocdir} %changelog +* Thu Jun 04 2026 Python Maint - 1:6.0.3-2 +- Rebuilt for Python 3.15 + * Tue Jun 02 2026 Mattias Ellert - 1:6.0.3-1 - Update to version 6.0.3 From 11db6b2e2b7b84207e2a1f4b0c41336740445178 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 12 Jun 2026 20:09:07 -0400 Subject: [PATCH 33/37] Rebuilt for openssl 4.0 --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 493ec25..9215d80 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 6.0.3 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.web.cern.ch @@ -661,6 +661,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Jun 13 2026 Yaakov Selkowitz - 1:6.0.3-3 +- Rebuilt for openssl 4.0 + * Thu Jun 04 2026 Python Maint - 1:6.0.3-2 - Rebuilt for Python 3.15 From fac6715ea9dd0e1faf8422f146d1275eeed6d0e7 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 24 Jun 2026 07:04:28 +0200 Subject: [PATCH 34/37] Update to version 6.1.0 Drop patches accepted upstream --- ...-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch | 566 ------------------ 0002-XrdCrypto-Preserve-ABI.patch | 30 - sources | 2 +- xrootd.spec | 16 +- 4 files changed, 9 insertions(+), 605 deletions(-) delete mode 100644 0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch delete mode 100644 0002-XrdCrypto-Preserve-ABI.patch diff --git a/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch b/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch deleted file mode 100644 index e46ad9e..0000000 --- a/0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch +++ /dev/null @@ -1,566 +0,0 @@ -From 534e1aa2efd8e59271d2410dc4a4d33ab7bc8ed9 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 23 May 2026 18:57:54 +0200 -Subject: [PATCH 1/2] [XrdCrypto/XrdTls/XrdVoms] Adapt to OpenSSL 4.0 - ---- - src/XrdCrypto/XrdCryptosslAux.cc | 6 +- - src/XrdCrypto/XrdCryptosslAux.hh | 2 +- - src/XrdCrypto/XrdCryptosslX509.cc | 48 +++++---- - src/XrdCrypto/XrdCryptosslX509Crl.cc | 2 +- - src/XrdCrypto/XrdCryptosslgsiAux.cc | 140 ++++++++++++++++++++------- - src/XrdTls/XrdTlsNotaryUtils.icc | 4 +- - src/XrdVoms/XrdVomsFun.cc | 2 +- - src/XrdVoms/XrdVomsFun.hh | 2 +- - 8 files changed, 145 insertions(+), 61 deletions(-) - -diff --git a/src/XrdCrypto/XrdCryptosslAux.cc b/src/XrdCrypto/XrdCryptosslAux.cc -index 3893bc2b4..a44283985 100644 ---- a/src/XrdCrypto/XrdCryptosslAux.cc -+++ b/src/XrdCrypto/XrdCryptosslAux.cc -@@ -691,13 +691,13 @@ time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1) - // Our result is in agreement with 'date +%s`. - struct tm ltm; - char zz; -- if ((sscanf((const char *)(tsn1->data), -+ if ((sscanf((const char *) ASN1_STRING_get0_data(tsn1), - "%02d%02d%02d%02d%02d%02d%c", - &(ltm.tm_year), &(ltm.tm_mon), &(ltm.tm_mday), - &(ltm.tm_hour), &(ltm.tm_min), &(ltm.tm_sec), - &zz) != 7) || (zz != 'Z')) { - // Try GeneralizedTime -- if ((sscanf((const char *)(tsn1->data), -+ if ((sscanf((const char *) ASN1_STRING_get0_data(tsn1), - "%04d%02d%02d%02d%02d%02d%c", - &(ltm.tm_year), &(ltm.tm_mon), &(ltm.tm_mday), - &(ltm.tm_hour), &(ltm.tm_min), &(ltm.tm_sec), -@@ -733,7 +733,7 @@ time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1) - } - - //____________________________________________________________________________ --void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s) -+void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s) - { - // Function to convert X509_NAME into a one-line human readable string - -diff --git a/src/XrdCrypto/XrdCryptosslAux.hh b/src/XrdCrypto/XrdCryptosslAux.hh -index 36f3aad1b..de852be3f 100644 ---- a/src/XrdCrypto/XrdCryptosslAux.hh -+++ b/src/XrdCrypto/XrdCryptosslAux.hh -@@ -74,7 +74,7 @@ int XrdCryptosslX509ParseStack(XrdTlsPeerCerts* pc, XrdCryptoX509Chain *chain); - time_t XrdCryptosslASN1toUTC(const ASN1_TIME *tsn1); - - // Function to convert X509_NAME into a one-line human readable string --void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s); -+void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s); - - // - // X509 proxy auxilliary functions -diff --git a/src/XrdCrypto/XrdCryptosslX509.cc b/src/XrdCrypto/XrdCryptosslX509.cc -index bcc79c89c..d9d2b182f 100644 ---- a/src/XrdCrypto/XrdCryptosslX509.cc -+++ b/src/XrdCrypto/XrdCryptosslX509.cc -@@ -340,7 +340,11 @@ void XrdCryptosslX509::CertType() - - bool done = 0; - // Check the extensions -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *ext = 0; -+#else -+ const X509_EXTENSION *ext = 0; -+#endif - int idx = -1; - - // For CAs we are looking for a "basicConstraints" -@@ -684,7 +688,11 @@ XrdCryptoX509data XrdCryptosslX509::GetExtension(const char *oid) - - // Loop to identify the one we would like - int i = 0; -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *wext = 0; -+#else -+ const X509_EXTENSION *wext = 0; -+#endif - for (i = 0; i< numext; i++) { - wext = X509_get_ext(cert, i); - if (usenid) { -@@ -821,7 +829,11 @@ int XrdCryptosslX509::DumpExtensions(bool dumpunknown) - - rc = 1; - // Go through the extensions -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *xpiext = 0; -+#else -+ const X509_EXTENSION *xpiext = 0; -+#endif - int npiext = X509_get_ext_count(xpi); - PRINT("found "<data; -- long length = X509_EXTENSION_get_data(xpiext)->length; -+ const unsigned char *pp = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); -+ long length = ASN1_STRING_length(X509_EXTENSION_get_data(xpiext)); - int ret = FillUnknownExt(&pp, length, dumpunknown); - PRINT("ret: " << ret); - } -@@ -957,10 +969,10 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool - int i, printable = 1; - opp = op; - os = d2i_ASN1_OCTET_STRING(0, &opp, len + hl); -- if (os && os->length > 0) { -- opp = os->data; -+ if (os && ASN1_STRING_length(os) > 0) { -+ opp = ASN1_STRING_get0_data(os); - /* testing whether the octet string is * printable */ -- for (i=0; ilength; i++) { -+ for (i=0; i < ASN1_STRING_length(os); i++) { - if (( (opp[i] < ' ') && (opp[i] != '\n') && - (opp[i] != '\r') && (opp[i] != '\t')) || (opp[i] > '~')) { - printable = 0; -@@ -969,16 +981,16 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool - } - if (printable) { - /* printable string */ -- char *s = new char[os->length + 1]; -- memcpy(s, opp, os->length); -- s[os->length] = 0; -- if (dump) PRINT("OBJS:" << s << " (len: "<length<<")"); -+ char *s = new char[ASN1_STRING_length(os) + 1]; -+ memcpy(s, opp, ASN1_STRING_length(os)); -+ s[ASN1_STRING_length(os)] = 0; -+ if (dump) PRINT("OBJS:" << s << " (len: " << ASN1_STRING_length(os) << ")"); - delete [] s; - } else { - /* print the normal dump */ - if (!nl) PRINT("OBJS:"); - BIO *mem = BIO_new(BIO_s_mem()); -- if (BIO_dump_indent(mem, (const char *)opp, os->length, dump_indent) <= 0) { -+ if (BIO_dump_indent(mem, (const char *)opp, ASN1_STRING_length(os), dump_indent) <= 0) { - if (dump) PRINT("ERROR:OBJS: problems dumping to BIO"); - BIO_free(mem); - goto end; -@@ -999,18 +1011,18 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool - bs = d2i_ASN1_INTEGER(0, &opp, len+hl); - if (bs) { - if (dump) PRINT("AINT:"); -- if (bs->type == V_ASN1_NEG_INTEGER) -+ if (ASN1_STRING_type(bs) == V_ASN1_NEG_INTEGER) - if (dump) PRINT("-"); - BIO *mem = BIO_new(BIO_s_mem()); -- for (i = 0; i < bs->length; i++) { -- if (BIO_printf(mem, "%02X", bs->data[i]) <= 0) { -+ for (i = 0; i < ASN1_STRING_length(bs); i++) { -+ if (BIO_printf(mem, "%02X", ASN1_STRING_get0_data(bs)[i]) <= 0) { - if (dump) PRINT("ERROR:AINT: problems printf-ing to BIO"); - BIO_free(mem); - goto end; - } - } - if (dump) { BIO_PRINT(mem, "AINT:"); } -- if (bs->length == 0) PRINT("00"); -+ if (ASN1_STRING_length(bs) == 0) PRINT("00"); - } else { - if (dump) PRINT("ERROR:AINT: BAD INTEGER"); - } -@@ -1023,18 +1035,18 @@ int XrdCryptosslX509::FillUnknownExt(const unsigned char **pp, long length, bool - bs = d2i_ASN1_ENUMERATED(0, &opp, len+hl); - if (bs) { - if (dump) PRINT("AENU:"); -- if (bs->type == V_ASN1_NEG_ENUMERATED) -+ if (ASN1_STRING_type(bs) == V_ASN1_NEG_ENUMERATED) - if (dump) PRINT("-"); - BIO *mem = BIO_new(BIO_s_mem()); -- for (i = 0; i < bs->length; i++) { -- if (BIO_printf(mem, "%02X", bs->data[i]) <= 0) { -+ for (i = 0; i < ASN1_STRING_length(bs); i++) { -+ if (BIO_printf(mem, "%02X", ASN1_STRING_get0_data(bs)[i]) <= 0) { - if (dump) PRINT("ERROR:AENU: problems printf-ing to BIO"); - BIO_free(mem); - goto end; - } - } - if (dump) { BIO_PRINT(mem, "AENU:"); } -- if (bs->length == 0) PRINT("00"); -+ if (ASN1_STRING_length(bs) == 0) PRINT("00"); - } else { - if (dump) PRINT("ERROR:AENU: BAD ENUMERATED"); - } -diff --git a/src/XrdCrypto/XrdCryptosslX509Crl.cc b/src/XrdCrypto/XrdCryptosslX509Crl.cc -index 61ddaf83c..cc9f324bb 100644 ---- a/src/XrdCrypto/XrdCryptosslX509Crl.cc -+++ b/src/XrdCrypto/XrdCryptosslX509Crl.cc -@@ -105,7 +105,7 @@ XrdCryptosslX509Crl::XrdCryptosslX509Crl(XrdCryptoX509 *cacert) - - // Bio for exporting the extension - BIO *bext = BIO_new(BIO_s_mem()); -- ASN1_OBJECT *obj = X509_EXTENSION_get_object(crlext); -+ const ASN1_OBJECT *obj = X509_EXTENSION_get_object(crlext); - i2a_ASN1_OBJECT(bext, obj); - X509V3_EXT_print(bext, crlext, 0, 4); - // data length -diff --git a/src/XrdCrypto/XrdCryptosslgsiAux.cc b/src/XrdCrypto/XrdCryptosslgsiAux.cc -index 8f4b929c1..a5d20e1af 100644 ---- a/src/XrdCrypto/XrdCryptosslgsiAux.cc -+++ b/src/XrdCrypto/XrdCryptosslgsiAux.cc -@@ -165,12 +165,12 @@ bool XrdCryptosslProxyCertInfo(const void *extdata, int &pathlen, bool *haspolic - OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ext), 1); - - // Now extract the path length constraint, if any -- unsigned char *p = X509_EXTENSION_get_data(ext)->data; -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); - PROXY_CERT_INFO_EXTENSION *pci = 0; - if (!strcmp(s, gsiProxyCertInfo_OID)) -- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - else if (!strcmp(s, gsiProxyCertInfo_OLD_OID)) -- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - if (!pci) { - return 0; - } -@@ -208,12 +208,12 @@ void XrdCryptosslSetPathLenConstraint(void *extdata, int pathlen) - OBJ_obj2txt(s, sizeof(s), X509_EXTENSION_get_object(ext), 1); - - // Now extract the path length constraint, if any -- unsigned char *p = X509_EXTENSION_get_data(ext)->data; -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); - PROXY_CERT_INFO_EXTENSION *pci = 0; - if (!strcmp(s, gsiProxyCertInfo_OID)) -- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - else if (!strcmp(s, gsiProxyCertInfo_OLD_OID)) -- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - if (!pci) - return; - -@@ -419,16 +419,32 @@ int XrdCryptosslX509CreateProxy(const char *fnc, const char *fnk, - return -kErrPX_SetAttribute; - } - // Extract data in format for extension -- X509_EXTENSION_get_data(ext)->length = i2d_PROXY_CERT_INFO_EXTENSION(pci, 0); -- if (!(X509_EXTENSION_get_data(ext)->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext)->length+1))) { -+ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci, 0); -+ unsigned char *data = (unsigned char *) malloc(len); -+ if (!data) { - PRINT("could not allocate data field for extension"); - return -kErrPX_NoResources; - } -- unsigned char *pp = X509_EXTENSION_get_data(ext)->data; -+ unsigned char *pp = data; - if ((i2d_PROXY_CERT_INFO_EXTENSION(pci, &pp)) <= 0) { - PRINT("problem converting data for extension"); - return -kErrPX_Error; - } -+ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); -+ if (!os) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ free(data); -+ if (X509_EXTENSION_set_data(ext, os) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ ASN1_STRING_free(os); - // Create a stack - STACK_OF(X509_EXTENSION) *esk = sk_X509_EXTENSION_new_null(); - if (!esk) { -@@ -504,7 +520,11 @@ int XrdCryptosslX509CreateProxy(const char *fnc, const char *fnk, - } - - // First duplicate the extensions of the EE certificate -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *xEECext = 0; -+#else -+ const X509_EXTENSION *xEECext = 0; -+#endif - int nEECext = X509_get_ext_count(xEEC); - DEBUG("number of extensions found in the original certificate: "<< nEECext); - int i = 0; -@@ -756,7 +776,11 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, - } - // - // Get signature path depth from present proxy -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *xpiext = 0; -+#else -+ const X509_EXTENSION *xpiext = 0; -+#endif - int npiext = X509_get_ext_count(xpi); - int i = 0; - bool haskeyusage = 0; -@@ -772,12 +796,12 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, - // Get signature path depth from present proxy - if (!strcmp(s, gsiProxyCertInfo_OID) || - !strcmp(s, gsiProxyCertInfo_OLD_OID)) { -- unsigned char *p = X509_EXTENSION_get_data(xpiext)->data; -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); - PROXY_CERT_INFO_EXTENSION *inpci = 0; - if (!strcmp(s, gsiProxyCertInfo_OID)) -- inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); -+ inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); - else -- inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); -+ inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); - if (inpci && - inpci->pcPathLengthConstraint) - indepthlen = ASN1_INTEGER_get(inpci->pcPathLengthConstraint); -@@ -823,16 +847,32 @@ int XrdCryptosslX509CreateProxyReq(XrdCryptoX509 *xcpi, - return -kErrPX_NoResources; - } - // Extract data in format for extension -- X509_EXTENSION_get_data(ext.get())->length = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); -- if (!(X509_EXTENSION_get_data(ext.get())->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext.get())->length+1))) { -+ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); -+ unsigned char *data = (unsigned char *) malloc(len); -+ if (!data) { - PRINT("could not allocate data field for extension"); - return -kErrPX_NoResources; - } -- unsigned char *pp = X509_EXTENSION_get_data(ext.get())->data; -+ unsigned char *pp = data; - if ((i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), &pp)) <= 0) { - PRINT("problem converting data for extension"); - return -kErrPX_Error; - } -+ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); -+ if (!os) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ free(data); -+ if (X509_EXTENSION_set_data(ext.get(), os) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ ASN1_STRING_free(os); - pci = nullptr; - - // Set extension name. -@@ -1030,7 +1070,11 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, - - // - // Get signature path depth from input proxy -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *xpiext = 0, *xriext = 0; -+#else -+ const X509_EXTENSION *xpiext = 0, *xriext = 0; -+#endif - int npiext = X509_get_ext_count(xpi); - int i = 0; - bool haskeyusage = 0; -@@ -1038,17 +1082,17 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, - for (i = 0; i< npiext; i++) { - xpiext = X509_get_ext(xpi, i); - char s[256] = {0}; -- ASN1_OBJECT *obj = X509_EXTENSION_get_object(xpiext); -+ const ASN1_OBJECT *obj = X509_EXTENSION_get_object(xpiext); - if (obj) - OBJ_obj2txt(s, sizeof(s), obj, 1); - if (!strcmp(s, gsiProxyCertInfo_OID) || - !strcmp(s, gsiProxyCertInfo_OLD_OID)) { -- unsigned char *p = X509_EXTENSION_get_data(xpiext)->data; -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); - PROXY_CERT_INFO_EXTENSION *inpci = 0; - if (!strcmp(s, gsiProxyCertInfo_OID)) -- inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); -+ inpci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); - else -- inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xpiext)->length); -+ inpci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xpiext))); - if (inpci && - inpci->pcPathLengthConstraint) - indepthlen = ASN1_INTEGER_get(inpci->pcPathLengthConstraint); -@@ -1101,9 +1145,9 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, - // Get the content - int reqdepthlen = -1; - if (xriext) { -- unsigned char *p = X509_EXTENSION_get_data(xriext)->data; -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xriext)); - PROXY_CERT_INFO_EXTENSION *reqpci = -- d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(xriext)->length); -+ d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(xriext))); - if (reqpci && - reqpci->pcPathLengthConstraint) - reqdepthlen = ASN1_INTEGER_get(reqpci->pcPathLengthConstraint); -@@ -1140,16 +1184,32 @@ int XrdCryptosslX509SignProxyReq(XrdCryptoX509 *xcpi, XrdCryptoRSA *kcpi, - return -kErrPX_NoResources; - } - // Extract data in format for extension -- X509_EXTENSION_get_data(ext.get())->length = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); -- if (!(X509_EXTENSION_get_data(ext.get())->data = (unsigned char *)malloc(X509_EXTENSION_get_data(ext.get())->length+1))) { -+ int len = i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), 0); -+ unsigned char *data = (unsigned char *) malloc(len); -+ if (!data) { - PRINT("could not allocate data field for extension"); - return -kErrPX_NoResources; - } -- unsigned char *pp = X509_EXTENSION_get_data(ext.get())->data; -+ unsigned char *pp = data; - if ((i2d_PROXY_CERT_INFO_EXTENSION(pci.get(), &pp)) <= 0) { - PRINT("problem converting data for extension"); - return -kErrPX_Error; - } -+ ASN1_OCTET_STRING *os = ASN1_OCTET_STRING_new(); -+ if (!os) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ if (ASN1_OCTET_STRING_set(os, data, len) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ free(data); -+ if (X509_EXTENSION_set_data(ext.get(), os) == 0) { -+ PRINT("could not allocate data field for extension"); -+ return -kErrPX_NoResources; -+ } -+ ASN1_STRING_free(os); - pci = nullptr; - - // Set extension name. -@@ -1215,7 +1275,11 @@ int XrdCryptosslX509GetVOMSAttr(XrdCryptoX509 *xcpi, XrdOucString &vat) - rc = 1; - bool getvat = 0; - // Go through the extensions -+#if OPENSSL_VERSION_NUMBER < 0x40000000L - X509_EXTENSION *xpiext = 0; -+#else -+ const X509_EXTENSION *xpiext = 0; -+#endif - int npiext = X509_get_ext_count(xpi); - int i = 0; - for (i = 0; i< npiext; i++) { -@@ -1227,8 +1291,8 @@ int XrdCryptosslX509GetVOMSAttr(XrdCryptoX509 *xcpi, XrdOucString &vat) - if (strcmp(s, XRDGSI_VOMS_ACSEQ_OID)) continue; - // This is the VOMS extension we are interested for - rc = 0; -- const unsigned char *pp = (const unsigned char *) X509_EXTENSION_get_data(xpiext)->data; -- long length = X509_EXTENSION_get_data(xpiext)->length; -+ const unsigned char *pp = ASN1_STRING_get0_data(X509_EXTENSION_get_data(xpiext)); -+ long length = ASN1_STRING_length(X509_EXTENSION_get_data(xpiext)); - int ret = XrdCryptosslX509FillVOMS(&pp, length, getvat, vat); - DEBUG("ret: " << ret << " - vat: " << vat); - } -@@ -1316,10 +1380,10 @@ int XrdCryptosslX509FillVOMS(const unsigned char **pp, - int i, printable = 1; - opp = op; - os = d2i_ASN1_OCTET_STRING(0, &opp, len + hl); -- if (os && os->length > 0) { -- opp = os->data; -+ if (os && ASN1_STRING_length(os) > 0) { -+ opp = ASN1_STRING_get0_data(os); - // Testing whether the octet string is printable -- for (i=0; ilength; i++) { -+ for (i=0; i < ASN1_STRING_length(os); i++) { - if (( (opp[i] < ' ') && (opp[i] != '\n') && - (opp[i] != '\r') && (opp[i] != '\t')) || (opp[i] > '~')) { - printable = 0; -@@ -1333,7 +1397,7 @@ int XrdCryptosslX509FillVOMS(const unsigned char **pp, - vat += (const char *)opp; - gotvat = 1; - } -- DEBUG("OBJS:" << (const char *)opp << " (len: "<length<<")"); -+ DEBUG("OBJS:" << (const char *)opp << " (len: " << ASN1_STRING_length(os) << ")"); - } - } - if (os) { -@@ -1385,11 +1449,19 @@ int XrdCryptosslX509CheckProxy3(XrdCryptoX509 *xcpi, XrdOucString &emsg) { - } - TRACE(ALL,"certificate has "<data; -- pci = d2i_PROXY_CERT_INFO_EXTENSION(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - } else { - PRINT("WARNING: multiple proxyCertInfo extensions found: taking the first"); - } -@@ -1408,8 +1480,8 @@ int XrdCryptosslX509CheckProxy3(XrdCryptoX509 *xcpi, XrdOucString &emsg) { - if (ext == 0) { - ext = xext; - // Now get the extension -- unsigned char *p = X509_EXTENSION_get_data(ext)->data; -- pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, (const unsigned char **)(&p), X509_EXTENSION_get_data(ext)->length); -+ const unsigned char *p = ASN1_STRING_get0_data(X509_EXTENSION_get_data(ext)); -+ pci = d2i_PROXY_CERT_INFO_EXTENSION_OLD(0, &p, ASN1_STRING_length(X509_EXTENSION_get_data(ext))); - } else { - PRINT("WARNING: multiple proxyCertInfo extensions found: taking the first"); - } -diff --git a/src/XrdTls/XrdTlsNotaryUtils.icc b/src/XrdTls/XrdTlsNotaryUtils.icc -index 44125d988..3ded4f993 100644 ---- a/src/XrdTls/XrdTlsNotaryUtils.icc -+++ b/src/XrdTls/XrdTlsNotaryUtils.icc -@@ -56,8 +56,8 @@ SOFTWARE. - */ - static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { - int common_name_loc = -1; -- X509_NAME_ENTRY *common_name_entry = NULL; -- ASN1_STRING *common_name_asn1 = NULL; -+ const X509_NAME_ENTRY *common_name_entry = NULL; -+ const ASN1_STRING *common_name_asn1 = NULL; - char *common_name_str = NULL; - - // Find the position of the CN field in the Subject field of the certificate -diff --git a/src/XrdVoms/XrdVomsFun.cc b/src/XrdVoms/XrdVomsFun.cc -index a4bc9b8b7..fe6e8ebb7 100644 ---- a/src/XrdVoms/XrdVomsFun.cc -+++ b/src/XrdVoms/XrdVomsFun.cc -@@ -110,7 +110,7 @@ XrdVomsFun::XrdVomsFun(XrdSysError &erp) - - // Function to convert X509_NAME into a one-line human readable string - // --void XrdVomsFun::NameOneLine(X509_NAME *nm, XrdOucString &s) -+void XrdVomsFun::NameOneLine(const X509_NAME *nm, XrdOucString &s) - { - BIO *mbio = BIO_new(BIO_s_mem()); - X509_NAME_print_ex(mbio, nm, 0, XN_FLAG_COMPAT); -diff --git a/src/XrdVoms/XrdVomsFun.hh b/src/XrdVoms/XrdVomsFun.hh -index ff5df58ef..5c1129ab8 100644 ---- a/src/XrdVoms/XrdVomsFun.hh -+++ b/src/XrdVoms/XrdVomsFun.hh -@@ -65,7 +65,7 @@ int VOMSInit(const char *cfg); - private: - - void FmtExtract(XrdOucString &out, XrdOucString in, const char *tag); --void NameOneLine(X509_NAME *nm, XrdOucString &s); -+void NameOneLine(const X509_NAME *nm, XrdOucString &s); - void FmtReplace(XrdSecEntity &ent); - - // These settings are configurable --- -2.54.0 - diff --git a/0002-XrdCrypto-Preserve-ABI.patch b/0002-XrdCrypto-Preserve-ABI.patch deleted file mode 100644 index 02aa7a5..0000000 --- a/0002-XrdCrypto-Preserve-ABI.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 09a98373bc442d515f347593c113842733ea60b7 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 23 May 2026 20:59:04 +0200 -Subject: [PATCH 2/2] [XrdCrypto] Preserve ABI - -Add back now unused non-const version of function ---- - src/XrdCrypto/XrdCryptosslAux.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/XrdCrypto/XrdCryptosslAux.cc b/src/XrdCrypto/XrdCryptosslAux.cc -index a44283985..e0ce35285 100644 ---- a/src/XrdCrypto/XrdCryptosslAux.cc -+++ b/src/XrdCrypto/XrdCryptosslAux.cc -@@ -755,3 +755,12 @@ void XrdCryptosslNameOneLine(const X509_NAME *nm, XrdOucString &s) - // Done - return; - } -+ -+//____________________________________________________________________________ -+void XrdCryptosslNameOneLine(X509_NAME *nm, XrdOucString &s) -+{ -+ // Copy of above function with non-const first argument -+ // This function is unused -- only added to preserve old ABI -+ // Can be removed if soname changes -+ XrdCryptosslNameOneLine(const_cast(nm), s); -+} --- -2.54.0 - diff --git a/sources b/sources index 21816ab..f669827 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-6.0.3.tar.gz) = 9f0517dcecc679f5aa385831184c9eb93ad7ad2d42bda1340a9cada7f444998fed0a212738142beaf3de6c2f26670137839ca48ca9ac5ab7d5834feb5d309aa8 +SHA512 (xrootd-6.1.0.tar.gz) = bd471f3267de4aa520d091caca5c630adc42481da1ad4de534b515ec3cb7f4c3b428dbdfd92ed05ba8897811153b29eb425bc4a002546c81996aeafd1385d0c2 diff --git a/xrootd.spec b/xrootd.spec index 9215d80..872661c 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,8 +13,8 @@ Name: xrootd Epoch: 1 -Version: 6.0.3 -Release: 3%{?dist} +Version: 6.1.0 +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 URL: https://xrootd.web.cern.ch @@ -23,10 +23,6 @@ Source1: %{name}-sysusers.conf # Unbundle tinyxml library Patch0: 0001-Unbundle-tinyxml.patch -# Adapt to OpenSSL 4 -# https://github.com/xrootd/xrootd/pull/2802 -Patch1: 0001-XrdCrypto-XrdTls-XrdVoms-Adapt-to-OpenSSL-4.0.patch -Patch2: 0002-XrdCrypto-Preserve-ABI.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -72,6 +68,7 @@ BuildRequires: python3-sphinx BuildRequires: attr BuildRequires: curl BuildRequires: gtest-devel +BuildRequires: jq BuildRequires: krb5-server BuildRequires: krb5-workstation BuildRequires: openssl @@ -265,8 +262,6 @@ This package contains the API documentation of the xrootd libraries. %setup -q %patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 %build %cmake \ @@ -579,6 +574,7 @@ fi %{_libdir}/libXrdOfsPrepGPI-6.so %{_libdir}/libXrdOssArc-6.so %{_libdir}/libXrdOssCsi-6.so +%{_libdir}/libXrdOssMirage-6.so %{_libdir}/libXrdOssSIgpfsT-6.so %{_libdir}/libXrdOssStats-6.so %{_libdir}/libXrdPfc-6.so @@ -661,6 +657,10 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Jun 23 2026 Mattias Ellert - 1:6.1.0-1 +- Update to version 6.1.0 +- Drop patches accepted upstream + * Sat Jun 13 2026 Yaakov Selkowitz - 1:6.0.3-3 - Rebuilt for openssl 4.0 From f904ae3077ef6a0e670c6318a2b31ac7cdea18b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:26:15 +0000 Subject: [PATCH 35/37] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 872661c..3d52e26 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 6.1.0 -Release: 1%{?dist} +Release: 2%{?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 URL: https://xrootd.web.cern.ch @@ -657,6 +657,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1:6.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Tue Jun 23 2026 Mattias Ellert - 1:6.1.0-1 - Update to version 6.1.0 - Drop patches accepted upstream From 532cdeacb7787ada4b6b047dceb789f737944d64 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:11:56 +0200 Subject: [PATCH 36/37] Rebuilt for Python 3.15.0b4 ABI change --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 3d52e26..7a7fdd3 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 6.1.0 -Release: 2%{?dist} +Release: 3%{?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 URL: https://xrootd.web.cern.ch @@ -657,6 +657,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Jul 22 2026 Python Maint - 1:6.1.0-3 +- Rebuilt for Python 3.15.0b4 ABI change + * Fri Jul 17 2026 Fedora Release Engineering - 1:6.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From e4ad3a28d2c1d0ecbdcd9cefa05f05dc8c8b5faa Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 13 Aug 2026 07:56:03 +0200 Subject: [PATCH 37/37] Update to version 6.1.1 --- 0001-Make-documentation-self-contained.patch | 30 +++++++++++++ 0001-Unbundle-gtest.patch | 25 +++++++++++ sources | 2 +- xrootd.spec | 44 +++++++++++++++----- 4 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 0001-Make-documentation-self-contained.patch create mode 100644 0001-Unbundle-gtest.patch diff --git a/0001-Make-documentation-self-contained.patch b/0001-Make-documentation-self-contained.patch new file mode 100644 index 0000000..bba4217 --- /dev/null +++ b/0001-Make-documentation-self-contained.patch @@ -0,0 +1,30 @@ +From 8b924dbc92d3cce474421fbd7974f3d22d64d51c Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Wed, 12 Aug 2026 17:00:45 +0200 +Subject: [PATCH] Make documentation self-contained + +--- + README.md | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/README.md b/README.md +index bafd1112d..167d476e0 100644 +--- a/README.md ++++ b/README.md +@@ -1,12 +1,5 @@ +-[![Repology](https://img.shields.io/badge/repology-xrootd-blue)](https://repology.org/project/xrootd/packages) +-[![CDash](https://img.shields.io/badge/CDash-XRootD-limegreen)](https://my.cdash.org/index.php?project=XRootD) +-[![ABI](https://github.com/xrootd/xrootd/actions/workflows/ABI.yml/badge.svg)](https://github.com/xrootd/xrootd/actions/workflows/ABI.yml) +-[![CI](https://github.com/xrootd/xrootd/actions/workflows/CI.yml/badge.svg)](https://github.com/xrootd/xrootd/actions/workflows/CI.yml) +-[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/11900/badge)](https://www.bestpractices.dev/projects/11900) +-[![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=xrootd)](https://insights.linuxfoundation.org/project/xrootd) +- +

+- ++ +

+ + ## XRootD: eXtended ROOT Daemon +-- +2.55.0 + diff --git a/0001-Unbundle-gtest.patch b/0001-Unbundle-gtest.patch new file mode 100644 index 0000000..1bbac2e --- /dev/null +++ b/0001-Unbundle-gtest.patch @@ -0,0 +1,25 @@ +From cd11f615e749a1fcdd353edd30505c4e8da897db Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 11 Aug 2026 23:53:15 +0200 +Subject: [PATCH] Unbundle gtest + +--- + cmake/XRootDFindLibs.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/XRootDFindLibs.cmake b/cmake/XRootDFindLibs.cmake +index e47dfb83e..3788f5ed4 100644 +--- a/cmake/XRootDFindLibs.cmake ++++ b/cmake/XRootDFindLibs.cmake +@@ -89,7 +89,7 @@ if( ENABLE_XRDOSSARC ) + endif() + + if( ENABLE_TESTS ) +- add_subdirectory(vendor/googletest EXCLUDE_FROM_ALL) ++ find_package( GTest REQUIRED ) + + set( BUILD_TESTS TRUE ) + +-- +2.55.0 + diff --git a/sources b/sources index f669827..a960b85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-6.1.0.tar.gz) = bd471f3267de4aa520d091caca5c630adc42481da1ad4de534b515ec3cb7f4c3b428dbdfd92ed05ba8897811153b29eb425bc4a002546c81996aeafd1385d0c2 +SHA512 (xrootd-6.1.1.tar.gz) = ac1286cc54c60611bf17b6140b8cd7ef17a8318a4082cae38e5da040199ce4405490e583b376074c3ed29cf2d87c9bbda5da15c6a3091c83c7877abdc3343ebf diff --git a/xrootd.spec b/xrootd.spec index 7a7fdd3..d2d55a4 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -8,13 +8,10 @@ %global ceph 0 %endif -# Needed for EPEL 8 -%undefine __cmake_in_source_build - Name: xrootd Epoch: 1 -Version: 6.1.0 -Release: 3%{?dist} +Version: 6.1.1 +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 URL: https://xrootd.web.cern.ch @@ -23,6 +20,10 @@ Source1: %{name}-sysusers.conf # Unbundle tinyxml library Patch0: 0001-Unbundle-tinyxml.patch +# Unbundle googletest/googlemock +Patch1: 0001-Unbundle-gtest.patch +# Make documentation self-contained +Patch2: 0001-Make-documentation-self-contained.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -37,6 +38,10 @@ BuildRequires: libzip-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: perl-generators +%if %{?fedora}%{!?fedora:0} +# picojson not in RHEL/EPEL +BuildRequires: picojson-devel +%endif BuildRequires: readline-devel BuildRequires: zlib-devel BuildRequires: selinux-policy-devel @@ -68,6 +73,7 @@ BuildRequires: python3-sphinx BuildRequires: attr BuildRequires: curl BuildRequires: gtest-devel +BuildRequires: gmock-devel BuildRequires: jq BuildRequires: krb5-server BuildRequires: krb5-workstation @@ -262,6 +268,17 @@ This package contains the API documentation of the xrootd libraries. %setup -q %patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 + +# Delete bundled dependencies +rm src/XrdXml/tinyxml/tiny* +rm -r vendor/bats +rm -r vendor/googletest +%if %{?fedora}%{!?fedora:0} +# picojson not in RHEL/EPEL +rm -r vendor/picojson +%endif %build %cmake \ @@ -285,9 +302,6 @@ This package contains the API documentation of the xrootd libraries. make -C config -f /usr/share/selinux/devel/Makefile doxygen Doxyfile -# Use local image instead of remote -sed 's!src=".*/xrootd-logo.png"!src="xrootd-logo.png"!' \ - -i doxydoc/html/index.html cp -p docs/images/xrootd-logo.png doxydoc/html %install @@ -394,14 +408,18 @@ for x in authenticated_cluster badredir cluster TPCTests xcachewithcsi ; do done # The badredir test fails when there is no network - exclude +# The posix test is broken for 32 bit archs ... +# https://github.com/xrootd/xrootd/issues/2559 touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then + %ctest -- -E \ +XRootD::badredir\|\ %ifarch %{ix86} %{arm} - %ctest -- -E 'XRootD::badredir|XRootD::posix' -%else - %ctest -- -E 'XRootD::badredir' +XRootD::posix\|\ %endif +XrdCl::FileSystemTest.PlugInTest\|\ +XrdCl::FileTest.PlugInTest else echo "Extended file attributes not supported by file system" echo "*** NOT RUNNING TESTS ***" @@ -525,6 +543,7 @@ fi %{_libdir}/libXrdUtils.so %{_libdir}/libXrdXml.so %{_libdir}/cmake/XRootD +%{_mandir}/man1/xrootd-config.1* %files client-libs %{_libdir}/libXrdCl.so.* @@ -657,6 +676,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Aug 12 2026 Mattias Ellert - 1:6.1.1-1 +- Update to version 6.1.1 + * Wed Jul 22 2026 Python Maint - 1:6.1.0-3 - Rebuilt for Python 3.15.0b4 ABI change