From 453125606cc376defcc268ad5044c28bd253fa06 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mar 16 2024 22:38:54 +0000 Subject: Update to version 5.6.9 --- 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 new file mode 100644 index 0000000..8ce0b8a --- /dev/null +++ b/0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch @@ -0,0 +1,151 @@ +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-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch b/0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch deleted file mode 100644 index c732080..0000000 --- a/0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 609f065a91c029f982061d019c7820dc594f1a0e Mon Sep 17 00:00:00 2001 -From: Guilherme Amadio -Date: Sat, 24 Feb 2024 12:51:49 +0100 -Subject: [PATCH 1/2] [XrdCl] Fix logic error when upgrading connections to TLS - -Fixes: be89ee0cb3aed0b8735fb65b3aacb365db9e9a7b ---- - src/XrdCl/XrdClXRootDTransport.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdCl/XrdClXRootDTransport.cc b/src/XrdCl/XrdClXRootDTransport.cc -index 60fb3e461..0be81f902 100644 ---- a/src/XrdCl/XrdClXRootDTransport.cc -+++ b/src/XrdCl/XrdClXRootDTransport.cc -@@ -1918,7 +1918,7 @@ namespace XrdCl - if (info->encrypted || InitTLS()) - request->flags |= ClientProtocolRequest::kXR_ableTLS; - -- if (info->encrypted || !(notlsok || tlsnodata)) -+ if (info->encrypted && !(notlsok || tlsnodata)) - request->flags |= ClientProtocolRequest::kXR_wantTLS; - - request->expect = expect; --- -2.43.2 - diff --git a/0002-XrdCl-Stop-Poller-before-TaskManager.patch b/0002-XrdCl-Stop-Poller-before-TaskManager.patch deleted file mode 100644 index 45c0fca..0000000 --- a/0002-XrdCl-Stop-Poller-before-TaskManager.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3a2fd5350b1e648df687cd5120f9a6987322df5a Mon Sep 17 00:00:00 2001 -From: Guilherme Amadio -Date: Mon, 26 Feb 2024 16:48:06 +0100 -Subject: [PATCH 2/2] [XrdCl] Stop Poller before TaskManager - -In 37b75132821e5ac9e9e5644590b7ef1b958850f3, stopping the poller was -(possibly inadvertently) moved to happen after stopping the task -manager. However, if the task manager is stopped first, an event may -become ready for read/write after the task manager has already been -destroyed, which may cause a socket callback to try to reinitialize -the poller by calling Poller->Init() while Poller->Stop() is running -on another thread, which may cause a crash. ---- - src/XrdCl/XrdClPostMaster.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/XrdCl/XrdClPostMaster.cc b/src/XrdCl/XrdClPostMaster.cc -index 0389ca270..f75dc911e 100644 ---- a/src/XrdCl/XrdClPostMaster.cc -+++ b/src/XrdCl/XrdClPostMaster.cc -@@ -192,10 +192,10 @@ namespace XrdCl - - if( !pImpl->pJobManager->Stop() ) - return false; -- if( !pImpl->pTaskManager->Stop() ) -- return false; - if( !pImpl->pPoller->Stop() ) - return false; -+ if( !pImpl->pTaskManager->Stop() ) -+ return false; - pImpl->pRunning = false; - return true; - } --- -2.43.2 - diff --git a/xrootd.spec b/xrootd.spec index bc6ed15..bbc684d 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,15 +13,15 @@ Name: xrootd Epoch: 1 -Version: 5.6.8 +Version: 5.6.9 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 -Patch0: 0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch -Patch1: 0002-XrdCl-Stop-Poller-before-TaskManager.patch +# https://github.com/xrootd/xrootd/pull/2213 +Patch0: 0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 @@ -301,7 +301,6 @@ This package contains the API documentation of the xrootd libraries. %setup -q %patch -P 0 -p 1 -%patch -P 1 -p 1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -450,7 +449,7 @@ if ( setfattr -n user.testattr -v testvalue testfile ) ; then else echo "Extended file attributes not supported by file system" echo "Don't run tests that require them" - %ctest3 -- -E "\ + exclude="\ XrdCl::FileCopyTest|\ XrdCl::FileSystemTest.PlugInTest|\ XrdCl::FileSystemTest.ServerQueryTest|\ @@ -462,7 +461,8 @@ XrdCl::WorkflowTest.CheckpointTest|\ XrdCl::WorkflowTest.XAttrWorkflowTest|\ XrdCl::XrdEcTests|\ XrdEc::|\ -XRootD::smoke-test-cluster" +XRootD::cluster::test" + %ctest3 -- -E $exclude fi rm testfile @@ -734,6 +734,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Mar 16 2024 Mattias Ellert - 1:5.6.9-1 +- Update to version 5.6.9 + * Sat Feb 24 2024 Mattias Ellert - 1:5.6.8-1 - Update to version 5.6.8 - Disable tests that require file attributes if the file system doesn't