The package rpms/xrootd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/xrootd.git/commit/?id=d3dab6243eb...
https://src.fedoraproject.org/cgit/rpms/xrootd.git/commit/?id=9c466e1ca18...
https://src.fedoraproject.org/cgit/rpms/xrootd.git/commit/?id=3c4a5ea8217....
Change:
-%ifarch %{ix86} %{arm}
-%ifarch %{arm}
+%ifarch %{arm}
Thanks.
Full change:
============
commit d3dab6243eb07372049f599cba21d2eda4ac37f3
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Thu Feb 24 21:42:50 2022 +0100
Update to version 5.4.1
Drop patches accepted upstream
diff --git a/0001-Add-missing-include.patch b/0001-Add-missing-include.patch
deleted file mode 100644
index c65da09..0000000
--- a/0001-Add-missing-include.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From fa7b5bd944771a986e0160afa0252427f9bd084e Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Sun, 12 Dec 2021 22:33:44 +0100
-Subject: [PATCH] Add missing include
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes GNU/Hurd build
-
-/<<PKGBUILDDIR>>/src/XrdApps/XrdPrep.cc: In function ‘int main(int,
char**)’:
-/<<PKGBUILDDIR>>/src/XrdApps/XrdPrep.cc:109:34: error: ‘MAXPATHLEN’ was not
declared in this scope
- 109 | static const int MaxPathLen = MAXPATHLEN+1;
- | ^~~~~~~~~~
-/<<PKGBUILDDIR>>/src/XrdApps/XrdPrep.cc:213:24: error: size of array ‘fBuff’
is not an integral constant-expression
- 213 | char *sP, fBuff[MaxPathLen];
- | ^~~~~~~~~~
-src/CMakeFiles/xrdprep.dir/build.make:78: recipe for target
'src/CMakeFiles/xrdprep.dir/XrdApps/XrdPrep.cc.o' failed
----
- src/XrdApps/XrdPrep.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/XrdApps/XrdPrep.cc b/src/XrdApps/XrdPrep.cc
-index b90c521c8..1f2d15af2 100644
---- a/src/XrdApps/XrdPrep.cc
-+++ b/src/XrdApps/XrdPrep.cc
-@@ -42,6 +42,7 @@
-
- #include "XrdOuc/XrdOucEnv.hh"
- #include "XrdSys/XrdSysE2T.hh"
-+#include "XrdSys/XrdSysPlatform.hh"
- #include "XrdCl/XrdClFileSystem.hh"
-
- using namespace XrdCl;
---
-2.33.1
-
diff --git a/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch
b/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch
new file mode 100644
index 0000000..06010de
--- /dev/null
+++ b/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch
@@ -0,0 +1,27 @@
+From fdb74096242e76427b64c0f82dba77b05e611ad9 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Thu, 24 Feb 2022 18:58:20 +0100
+Subject: [PATCH] Disable LTO for XrdPosix on 32 bit architectures
+
+---
+ src/XrdPosix.cmake | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/XrdPosix.cmake b/src/XrdPosix.cmake
+index cf3247818..453c20379 100644
+--- a/src/XrdPosix.cmake
++++ b/src/XrdPosix.cmake
+@@ -60,6 +60,10 @@ add_library(
+ XrdPosix/XrdPosixExtern.hh
+ XrdPosix/XrdPosixOsDep.hh )
+
++if(CMAKE_SIZEOF_VOID_P EQUAL 4)
++ target_compile_options(XrdPosixPreload PRIVATE -fno-lto)
++endif()
++
+ target_link_libraries(
+ XrdPosixPreload
+ XrdPosix
+--
+2.35.1
+
diff --git a/0001-Fix-compilation-on-GCC-4.8.patch
b/0001-Fix-compilation-on-GCC-4.8.patch
deleted file mode 100644
index ec41f60..0000000
--- a/0001-Fix-compilation-on-GCC-4.8.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From e7cf71c11f6504c6ff7a504a9e134ae66d923aa6 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Tue, 14 Dec 2021 16:33:13 +0100
-Subject: [PATCH] Fix compilation on GCC 4.8
-
-../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc: In member function 'bool
XrdAccSciTokens::GenerateAcls(const string&, uint64_t&,
{anonymous}::AccessRulesRaw&, std::string&, std::string&, std::string&,
std::vector<{anonymous}::MapRule>&, std::vector<std::basic_string<char>
>&)':
-../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:652:83: error: no matching
function for call to 'regex_replace(std::string&, std::regex, const char
[2])'
- std::regex("//"),
"/");
- ^
-../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:652:83: note: candidates are:
-In file included from /usr/include/c++/4.8.2/regex:62:0,
- from ../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:18:
-/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class
_Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter,
_Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const
std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
- regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
- ^
-/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument
deduction/substitution failed:
-../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:652:83: note: deduced
conflicting types for parameter '_Bi_iter' ('std::basic_regex<char>'
and 'const char*')
- std::regex("//"),
"/");
- ^
-In file included from /usr/include/c++/4.8.2/regex:62:0,
- from ../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:18:
-/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class
_Ch_type> std::basic_string<_Ch_type> std::regex_replace(const
std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type,
_Rx_traits>&, const std::basic_string<_Ch_type>&,
std::regex_constants::match_flag_type)
- regex_replace(const basic_string<_Ch_type>& __s,
- ^
-/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument
deduction/substitution failed:
-../xrootd-5.4.0/src/XrdSciTokens/XrdSciTokensAccess.cc:652:83: note: mismatched types
'const std::basic_string<_Ch_type>' and 'const char [2]'
- std::regex("//"),
"/");
- ^
----
- src/XrdMacaroons/XrdMacaroonsHandler.cc | 1 -
- src/XrdSciTokens/XrdSciTokensAccess.cc | 7 ++++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/XrdMacaroons/XrdMacaroonsHandler.cc
b/src/XrdMacaroons/XrdMacaroonsHandler.cc
-index 42bda11ff..767505fd7 100644
---- a/src/XrdMacaroons/XrdMacaroonsHandler.cc
-+++ b/src/XrdMacaroons/XrdMacaroonsHandler.cc
-@@ -1,5 +1,4 @@
-
--#include <regex>
- #include <cstring>
- #include <string>
- #include <iostream>
-diff --git a/src/XrdSciTokens/XrdSciTokensAccess.cc
b/src/XrdSciTokens/XrdSciTokensAccess.cc
-index 29dcfacfb..cf1abd406 100644
---- a/src/XrdSciTokens/XrdSciTokensAccess.cc
-+++ b/src/XrdSciTokens/XrdSciTokensAccess.cc
-@@ -15,7 +15,6 @@
- #include <fstream>
- #include <unordered_map>
- #include <tuple>
--#include <regex>
-
- #include "INIReader.h"
- #include "picojson.h"
-@@ -648,8 +647,10 @@ private:
- for (auto path : config.m_base_paths) {
- auto path_rule = rule;
- path_rule.m_path_prefix = path + rule.m_path_prefix;
-- path_rule.m_path_prefix = std::regex_replace(path_rule.m_path_prefix,
-- std::regex("//"),
"/");
-+ auto pos = path_rule.m_path_prefix.find("//");
-+ if (pos != std::string::npos) {
-+ path_rule.m_path_prefix.erase(pos + 1, 1);
-+ }
- map_rules.emplace_back(path_rule);
- }
- }
---
-2.33.1
-
diff --git a/0001-Fix-compilation-when-char-is-unsigned.patch
b/0001-Fix-compilation-when-char-is-unsigned.patch
deleted file mode 100644
index b7c76e9..0000000
--- a/0001-Fix-compilation-when-char-is-unsigned.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b29d0f021275d105f719dbefb07c8dfe17b95809 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Sat, 11 Dec 2021 07:39:20 +0100
-Subject: [PATCH] Fix compilation when char is unsigned (armv7hl, aarch64,
- ppc64le, s390x)
-
-../xrootd-5.4.0/src/XrdNet/XrdNetPMarkCfg.cc: In static member function 'static
XrdNetPMark* XrdNetPMarkCfg::Config(XrdSysError*, XrdScheduler*, XrdSysTrace*,
bool&)':
-../xrootd-5.4.0/src/XrdNet/XrdNetPMarkCfg.cc:271:16: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
- 271 | if (useFFly < 0)
- | ~~~~~~~~^~~
-../xrootd-5.4.0/src/XrdNet/XrdNetPMarkCfg.cc: In static member function 'static int
XrdNetPMarkCfg::Parse(XrdSysError*, XrdOucStream&)':
-../xrootd-5.4.0/src/XrdNet/XrdNetPMarkCfg.cc:1037:20: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
- 1037 | if (useFFly < 0) useFFly = 1;
- | ~~~~~~~~^~~
----
- src/XrdNet/XrdNetPMarkCfg.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/XrdNet/XrdNetPMarkCfg.cc b/src/XrdNet/XrdNetPMarkCfg.cc
-index d82b2938b..e7cb00ed5 100644
---- a/src/XrdNet/XrdNetPMarkCfg.cc
-+++ b/src/XrdNet/XrdNetPMarkCfg.cc
-@@ -132,7 +132,7 @@ bool tryVO = false;
- bool useDefs = false;
-
- bool useFLbl = false;
--char useFFly = -1;
-+signed char useFFly = -1;
- bool addFLFF = false;
- bool useSTag = true;
-
---
-2.33.1
-
diff --git a/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
b/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
deleted file mode 100644
index 513fff6..0000000
--- a/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 654133bc1158e4815a45dc8dd70023e5fff82424 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Thu, 20 Jan 2022 00:19:08 +0100
-Subject: [PATCH] Fix compiler warnings about pointers used after free:
-
-.../src/XrdCms/XrdCmsUtils.cc: In function 'XrdCmsUtils::ParseMan(XrdSysError*,
XrdOucTList**, char*, char*, int*, bool)':
-.../src/XrdCms/XrdCmsUtils.cc:226:43: error: pointer 'newMans_175' may be used
after 'operator delete(void*, unsigned long)' [-Werror=use-after-free]
- 226 | if (!plus || strcmp(hSpec, newP->text)) isBad = false;
- | ~~~~~~^~~~
-.../src/XrdCms/XrdCmsUtils.cc:221:27: note: call to 'operator delete(void*, unsigned
long)' here
- 221 | delete newP;
- | ^~~~
-
-.../src/XrdCl/XrdClCopy.cc: In function 'IndexRemote(XrdCl::FileSystem*,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, unsigned short)':
-.../src/XrdCl/XrdClCopy.cc:442:17: error: pointer used after 'operator delete(void*,
unsigned long)' [-Werror=use-after-free]
- 442 | log->Error( AppMsg, "Bad URL: %s", current->Path );
- | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.../src/XrdCl/XrdClCopy.cc:441:14: note: call to 'operator delete(void*, unsigned
long)' here
- 441 | delete current;
- | ^~~~~~~
----
- src/XrdCl/XrdClCopy.cc | 2 +-
- src/XrdCms/XrdCmsUtils.cc | 18 +++++++++---------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/src/XrdCl/XrdClCopy.cc b/src/XrdCl/XrdClCopy.cc
-index 78d27589c..c2b754bf5 100644
---- a/src/XrdCl/XrdClCopy.cc
-+++ b/src/XrdCl/XrdClCopy.cc
-@@ -438,8 +438,8 @@ XrdCpFile *IndexRemote( XrdCl::FileSystem *fs,
- current = new XrdCpFile( path.c_str(), badUrl );
- if( badUrl )
- {
-- delete current;
- log->Error( AppMsg, "Bad URL: %s", current->Path );
-+ delete current;
- return 0;
- }
-
-diff --git a/src/XrdCms/XrdCmsUtils.cc b/src/XrdCms/XrdCmsUtils.cc
-index 49c448849..8d25973bc 100644
---- a/src/XrdCms/XrdCmsUtils.cc
-+++ b/src/XrdCms/XrdCmsUtils.cc
-@@ -223,15 +223,15 @@ bool XrdCmsUtils::ParseMan(XrdSysError *eDest, XrdOucTList
**oldMans,
- }
- oldP = oldP->next;
- }
-- if (!plus || strcmp(hSpec, newP->text)) isBad = false;
-- else {eDest->Say("Config warning: "
-- "Cyclic DNS registration for
",newP->text,"\n"
-- "Config warning: This cluster will exhibit "
-- "undefined behaviour!!!");
-- isBad = true;
-- }
-- if (!oldP)
-- {appList = SInsert(appList, newP);
-+ if (!oldP)
-+ {if (!plus || strcmp(hSpec, newP->text)) isBad = false;
-+ else {eDest->Say("Config warning: "
-+ "Cyclic DNS registration for
",newP->text,"\n"
-+ "Config warning: This cluster will exhibit "
-+ "undefined behaviour!!!");
-+ isBad = true;
-+ }
-+ appList = SInsert(appList, newP);
- if (plus && !hush) Display(eDest, hSpec, newP->text, isBad);
- }
- }
---
-2.34.1
-
diff --git a/0001-Fix-warning-about-uninitialized-variable.patch
b/0001-Fix-warning-about-uninitialized-variable.patch
deleted file mode 100644
index fe72398..0000000
--- a/0001-Fix-warning-about-uninitialized-variable.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 0898ed380a457ff1c0c2547953d0fd36eaeaeebe Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Mon, 17 Jan 2022 09:14:08 +0100
-Subject: [PATCH 1/4] Fix warning about uninitialized variable
-
-The cond variable is initialized using the mutex before the mutex is
-initialized. Changing the order of the members in the class ensures
-the mutex is initialized first.
-
-.../src/./XrdXrootd/XrdXrootdAioTask.hh:70:51: error: member
'XrdXrootdAioTask::aioMutex' is used uninitialized [-Werror=uninitialized]
- 70 | : XrdJob(what), aioReady(aioMutex) {}
- | ^~~~~~~~
-cc1plus: all warnings being treated as errors
----
- src/XrdXrootd/XrdXrootdAioTask.hh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/XrdXrootd/XrdXrootdAioTask.hh b/src/XrdXrootd/XrdXrootdAioTask.hh
-index 2c49ff7d1..c04858bba 100644
---- a/src/XrdXrootd/XrdXrootdAioTask.hh
-+++ b/src/XrdXrootd/XrdXrootdAioTask.hh
-@@ -83,8 +83,8 @@ virtual bool CopyL2F(XrdXrootdAioBuff *aioP) = 0;
-
- static const char* TraceID;
-
-- XrdSysCondVar2 aioReady;
- XrdSysMutex aioMutex; // Locks private data
-+ XrdSysCondVar2 aioReady;
- XrdXrootdAioBuff* pendQ;
- XrdXrootdAioBuff* pendQEnd; // -> Last element in pendQ
-
---
-2.34.1
-
diff --git a/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
b/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
deleted file mode 100644
index 7b7cf1d..0000000
--- a/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 0dc292fbf63d25c6a9e000a2e66d7e3e0b8db735 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Mon, 24 Jan 2022 06:56:43 +0100
-Subject: [PATCH] Fix warnings about allocations exceeding maximum object size
-
-In member function 'Init',
- inlined from 'Init' at .../src/Xrd/XrdBuffXL.cc:64:6:
-.../src/Xrd/XrdBuffXL.cc:90:30: warning: argument 1 value '18446744073709551615'
exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
- 90 | bucket = new BuckVec[lg2+1];
- | ^
-/usr/include/c++/12/new: In member function 'Init':
-/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
- 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
- | ^
-
-.../src/XrdOuc/XrdOucBuffer.cc: In member function '__ct_base ':
-.../src/XrdOuc/XrdOucBuffer.cc:79:30: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
- 79 | bSlot = new BuffSlot[slots];
- | ^
-/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
- 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
- | ^
-
-.../src/XrdNet/XrdNetUtils.cc: In function 'GetAddrs':
-.../src/XrdNet/XrdNetUtils.cc:262:35: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
- 262 | *aVec = new XrdNetAddr[aVsz];
- | ^
-/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
- 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
- | ^
-
-In member function '__ct ',
- inlined from '__ct_base ' at .../src/XrdXrootd/XrdXrootdJob.cc:459:29:
-.../src/./XrdOuc/XrdOucTable.hh:43:30: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
- 43 | Table = new OucTable[maxe];
- | ^
-/usr/include/c++/12/new: In member function '__ct_base ':
-/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
- 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
- | ^
-
-.../src/XrdPosix/XrdPosixAdmin.cc: In member function 'FanOut':
-.../src/XrdPosix/XrdPosixAdmin.cc:69:27: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
- 69 | uVec = new XrdCl::URL[i];
- | ^
-/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
- 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
- | ^
----
- src/Xrd/XrdBuffXL.cc | 3 ++-
- src/XrdNet/XrdNetUtils.cc | 2 +-
- src/XrdOuc/XrdOucBuffer.cc | 2 +-
- src/XrdOuc/XrdOucTable.hh | 2 +-
- src/XrdPosix/XrdPosixAdmin.cc | 2 +-
- 5 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/src/Xrd/XrdBuffXL.cc b/src/Xrd/XrdBuffXL.cc
-index f84ef77cb..f769522af 100644
---- a/src/Xrd/XrdBuffXL.cc
-+++ b/src/Xrd/XrdBuffXL.cc
-@@ -63,7 +63,8 @@ XrdBuffXL::XrdBuffXL() : bucket(0), totalo(0), pagsz(getpagesize()),
slots(0),
-
- void XrdBuffXL::Init(int maxMSZ)
- {
-- int lg2, chunksz;
-+ unsigned int lg2;
-+ int chunksz;
-
- // If this is a duplicate call, delete the previous setup
- //
-diff --git a/src/XrdNet/XrdNetUtils.cc b/src/XrdNet/XrdNetUtils.cc
-index 0f5eac348..fbc6c5ff7 100644
---- a/src/XrdNet/XrdNetUtils.cc
-+++ b/src/XrdNet/XrdNetUtils.cc
-@@ -259,7 +259,7 @@ const char *XrdNetUtils::GetAddrs(const char *hSpec,
- //
- if (aInfo.aNum4 || aInfo.aNum6)
- {aVsz = aInfo.aNum4 + aInfo.aNum6;
-- *aVec = new XrdNetAddr[aVsz];
-+ *aVec = new XrdNetAddr[(unsigned int)aVsz];
- FillAddr(aInfo, *aVec);
- }
-
-diff --git a/src/XrdOuc/XrdOucBuffer.cc b/src/XrdOuc/XrdOucBuffer.cc
-index 2faee1d51..10f79d999 100644
---- a/src/XrdOuc/XrdOucBuffer.cc
-+++ b/src/XrdOuc/XrdOucBuffer.cc
-@@ -76,7 +76,7 @@ XrdOucBuffPool::XrdOucBuffPool(int minsz, int maxsz,
-
- // Allocate a slot vector for this
- //
-- bSlot = new BuffSlot[slots];
-+ bSlot = new BuffSlot[(unsigned int)slots];
-
- // Complete initializing the slot vector
- //
-diff --git a/src/XrdOuc/XrdOucTable.hh b/src/XrdOuc/XrdOucTable.hh
-index 92058c42b..2805a259c 100644
---- a/src/XrdOuc/XrdOucTable.hh
-+++ b/src/XrdOuc/XrdOucTable.hh
-@@ -40,7 +40,7 @@ public:
-
- XrdOucTable(int maxe)
- {int i;
-- Table = new OucTable[maxe];
-+ Table = new OucTable[(unsigned int)maxe];
- maxnum = maxe; curnum = 0; avlnum = 0;
- for (i = 1; i < maxe; i++) Table[i-1].Fnum = i;
- Table[maxe-1].Fnum = -1;
-diff --git a/src/XrdPosix/XrdPosixAdmin.cc b/src/XrdPosix/XrdPosixAdmin.cc
-index c26571394..2cad5517e 100644
---- a/src/XrdPosix/XrdPosixAdmin.cc
-+++ b/src/XrdPosix/XrdPosixAdmin.cc
-@@ -49,7 +49,7 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num)
- XrdCl::URL *uVec;
- XrdNetAddr netLoc;
- const char *hName;
-- int i;
-+ unsigned int i;
-
- // Make sure admin is ok
- //
---
-2.34.1
-
diff --git a/0001-Ignore-Warray-bounds-warnings-from-stricter-check-in.patch
b/0001-Ignore-Warray-bounds-warnings-from-stricter-check-in.patch
new file mode 100644
index 0000000..de803fc
--- /dev/null
+++ b/0001-Ignore-Warray-bounds-warnings-from-stricter-check-in.patch
@@ -0,0 +1,94 @@
+From 8095e021588150a584371ffbbf50e5b0bb7d4ede Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Fri, 4 Feb 2022 21:20:47 +0100
+Subject: [PATCH] Ignore -Warray-bounds warnings from stricter check in gcc 12.
+
+.../src/XrdFrm/XrdFrmMonitor.cc: In function 'XrdFrmMonitor::Init(char const*, char
const*, char const*)':
+.../src/XrdFrm/XrdFrmMonitor.cc:158:12: warning: array subscript 'struct
XrdXrootdMonMap[0]' is partly outside array bounds of 'unsigned char[1036]'
[-Warray-bounds]
+ 158 | mP->hdr.pseq = 0;
+ | ~~~~~~~~^~~~
+.../src/XrdFrm/XrdFrmMonitor.cc:155:26: note: object of size [13, 1036] allocated by
'malloc'
+ 155 | idRec = (char *)malloc(idLen+1);
+ | ~~~~~~^~~~~~~~~
+.../src/XrdFrm/XrdFrmMonitor.cc:159:8: warning: array subscript 'struct
XrdXrootdMonMap[0]' is partly outside array bounds of 'unsigned char[1036]'
[-Warray-bounds]
+ 159 | mP->dictid = 0;
+ | ~~~~^~~~~~
+.../src/XrdFrm/XrdFrmMonitor.cc:155:26: note: object of size [13, 1036] allocated by
'malloc'
+ 155 | idRec = (char *)malloc(idLen+1);
+ | ~~~~~~^~~~~~~~~
+
+.../src/XrdXrootd/XrdXrootdMonitor.cc: In function
'XrdXrootdMonitor::Init(XrdScheduler*, XrdSysError*, char const*, char const*, char
const*, int)':
+.../src/XrdXrootd/XrdXrootdMonitor.cc:634:12: warning: array subscript 'struct
XrdXrootdMonMap[0]' is partly outside array bounds of 'unsigned char[1036]'
[-Warray-bounds]
+ 634 | mP->hdr.pseq = 0;
+ | ~~~~~~~~^~~~
+.../src/XrdXrootd/XrdXrootdMonitor.cc:631:26: note: object of size [13, 1036] allocated
by 'malloc'
+ 631 | idRec = (char *)malloc(idLen+1);
+ | ~~~~~~^~~~~~~~~
+.../src/XrdXrootd/XrdXrootdMonitor.cc:635:8: warning: array subscript 'struct
XrdXrootdMonMap[0]' is partly outside array bounds of 'unsigned char[1036]'
[-Warray-bounds]
+ 635 | mP->dictid = 0;
+ | ~~~~^~~~~~
+.../src/XrdXrootd/XrdXrootdMonitor.cc:631:26: note: object of size [13, 1036] allocated
by 'malloc'
+ 631 | idRec = (char *)malloc(idLen+1);
+ | ~~~~~~^~~~~~~~~
+---
+ src/XrdFrm/XrdFrmMonitor.cc | 9 +++++++++
+ src/XrdXrootd/XrdXrootdMonitor.cc | 9 +++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/src/XrdFrm/XrdFrmMonitor.cc b/src/XrdFrm/XrdFrmMonitor.cc
+index a453617a6..5abe5ff31 100644
+--- a/src/XrdFrm/XrdFrmMonitor.cc
++++ b/src/XrdFrm/XrdFrmMonitor.cc
+@@ -149,6 +149,12 @@ int XrdFrmMonitor::Init(const char *iHost, const char *iProg, const
char *iName)
+ //
+ if (!isEnabled) return 1;
+
++// Ignore array bounds warning from gcc 12 triggered because the allocated
++// memory for the XrdXrootdMonMap is smaller than sizeof(XrdXrootdMonMap)
++#if defined(__GNUC__) && __GNUC__ >= 12
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Warray-bounds"
++#endif
+ // Create identification record
+ //
+ idLen = strlen(iBuff) + sizeof(XrdXrootdMonHeader) + sizeof(kXR_int32);
+@@ -158,6 +164,9 @@ int XrdFrmMonitor::Init(const char *iHost, const char *iProg, const
char *iName)
+ mP->hdr.pseq = 0;
+ mP->dictid = 0;
+ strcpy(mP->info, iBuff);
++#if defined(__GNUC__) && __GNUC__ >= 12
++#pragma GCC diagnostic pop
++#endif
+
+ // Setup the primary destination
+ //
+diff --git a/src/XrdXrootd/XrdXrootdMonitor.cc b/src/XrdXrootd/XrdXrootdMonitor.cc
+index 2926bae75..bb0f0a242 100644
+--- a/src/XrdXrootd/XrdXrootdMonitor.cc
++++ b/src/XrdXrootd/XrdXrootdMonitor.cc
+@@ -625,6 +625,12 @@ void XrdXrootdMonitor::Init(XrdScheduler *sp, XrdSysError *errp,
+ kySIDSZ = strlen(kySID);
+ monHost = strdup(iHost);
+
++// Ignore array bounds warning from gcc 12 triggered because the allocated
++// memory for the XrdXrootdMonMap is smaller than sizeof(XrdXrootdMonMap)
++#if defined(__GNUC__) && __GNUC__ >= 12
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Warray-bounds"
++#endif
+ // Create identification record
+ //
+ idLen = strlen(iBuff) + sizeof(XrdXrootdMonHeader) + sizeof(kXR_int32);
+@@ -634,6 +640,9 @@ void XrdXrootdMonitor::Init(XrdScheduler *sp, XrdSysError *errp,
+ mP->hdr.pseq = 0;
+ mP->dictid = 0;
+ strcpy(mP->info, iBuff);
++#if defined(__GNUC__) && __GNUC__ >= 12
++#pragma GCC diagnostic pop
++#endif
+
+ // Generate a CGI version of all the variations
+ //
+--
+2.34.1
+
diff --git a/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
b/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
deleted file mode 100644
index 34f0cab..0000000
--- a/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From 7615d866986131f3548b5863b38872a2e4dc58d9 Mon Sep 17 00:00:00 2001
-From: Andrew Hanushevsky <abh(a)stanford.edu>
-Date: Thu, 20 Jan 2022 23:22:09 -0800
-Subject: [PATCH] [Server] Prevent SEGV on busy systems due to missing lock
- call for background jobs.
-
----
- src/XrdXrootd/XrdXrootdJob.cc | 50 +++++++++++++++++++++++++++++------
- 1 file changed, 42 insertions(+), 8 deletions(-)
-
-diff --git a/src/XrdXrootd/XrdXrootdJob.cc b/src/XrdXrootd/XrdXrootdJob.cc
-index 1b2703d96..467323de5 100644
---- a/src/XrdXrootd/XrdXrootdJob.cc
-+++ b/src/XrdXrootd/XrdXrootdJob.cc
-@@ -37,6 +37,7 @@
- #include "Xrd/XrdScheduler.hh"
- #include "XrdOuc/XrdOucProg.hh"
- #include "XrdOuc/XrdOucStream.hh"
-+#include "XrdSys/XrdSysError.hh"
- #include "XrdSys/XrdSysPlatform.hh"
- #include "XrdSys/XrdSysRAtomic.hh"
- #include "XrdXrootd/XrdXrootdJob.hh"
-@@ -99,6 +100,12 @@ static const int argvnum =
sizeof(theArgs)/sizeof(theArgs[0]);
- /* G l o b a l F u n c t i o n s */
- /******************************************************************************/
-
-+namespace XrdXrootd
-+{
-+extern XrdSysError eLog;
-+}
-+using namespace XrdXrootd;
-+
- extern XrdSysTrace XrdXrootdTrace;
-
- int XrdXrootdJobWaiting(XrdXrootdJob2Do *item, void *arg)
-@@ -152,10 +159,15 @@ XrdXrootdJob2Do::~XrdXrootdJob2Do()
- /******************************************************************************/
- /* D o I t */
- /******************************************************************************/
-+
-+#define jobInfo theJob->JobName<<' '<<(theArgs[1] ? theArgs[1] :
"")\
-+ <<(theArgs[2] ? " " : "")<<(theArgs[2] ?
theArgs[2] : "")
-
- void XrdXrootdJob2Do::DoIt()
- {
-+ static const char *TraceID = "jobXeq";
- XrdXrootdJob2Do *jp = 0;
-+ const char *endStat = " completed";
- char *lp = 0;
- int i, rc = 0;
-
-@@ -163,9 +175,11 @@ void XrdXrootdJob2Do::DoIt()
- // perform the actual function and get the result and send to any async clients
- //
- if (Status != Job_Cancel)
-- {if ((rc = theJob->theProg->Run(&jobStream, theArgs[1], theArgs[2],
-+ {TRACE(REQ, "Job "<<jobInfo<<" started");
-+ if ((rc = theJob->theProg->Run(&jobStream, theArgs[1], theArgs[2],
- theArgs[3], theArgs[4])))
- {Status = Job_Cancel;
-+ endStat= " failed";
- lp = jobStream.GetLine();
- theJob->myMutex.Lock();
- }
-@@ -173,15 +187,22 @@ void XrdXrootdJob2Do::DoIt()
- rc = theJob->theProg->RunDone(jobStream);
- theJob->myMutex.Lock();
- if ((rc && rc != -EPIPE) || (rc == -EPIPE && (!lp ||
!(*lp))))
-- Status = Job_Cancel;
-+ {Status = Job_Cancel; endStat = " failed";}
- else if (Status != Job_Cancel)
- {Status = Job_Done;
- for (i = 0; i < numClients; i++)
- if (!Client[i].isSync) {sendResult(lp); break;}
- }
- }
-+ } else {
-+ endStat = " cancelled";
-+ theJob->myMutex.Lock();
- }
-
-+// Produce a trace record
-+//
-+ TRACE(REQ, "Job "<<jobInfo<<endStat);
-+
- // If the number of jobs > than the max allowed, then redrive a waiting job
- // if in fact we represent a legitimate job slot (this could a phantom slot
- // due to ourselves being cancelled.
-@@ -313,7 +334,7 @@ XrdOucTList *XrdXrootdJob2Do::lstClient()
- /* v e r C l i e n t */
- /******************************************************************************/
-
--int XrdXrootdJob2Do::verClient(int dodel)
-+int XrdXrootdJob2Do::verClient(int dodel) // Caller must have theJob->myMutex
- {
- int i, j, k;
-
-@@ -330,9 +351,16 @@ int XrdXrootdJob2Do::verClient(int dodel)
- //
- if (!numClients && dodel)
- {XrdXrootdJob2Do *jp = theJob->JobTable.Remove(JobNum);
-- if (jp->Status == XrdXrootdJob2Do::Job_Waiting) theJob->numJobs--;
-- delete jp;
-- return 0;
-+ if (jp)
-+ {if (jp->Status == XrdXrootdJob2Do::Job_Waiting) theJob->numJobs--;
-+ delete jp;
-+ return 0;
-+ } else {
-+ char ebuff[80];
-+ snprintf(ebuff, sizeof(ebuff), "Unable to find %s job %d;",
-+ theJob->JobName, JobNum);
-+ eLog.Emsg("Job2Do", ebuff, "job slot disabled!");
-+ }
- }
- return numClients;
- }
-@@ -341,7 +369,7 @@ int XrdXrootdJob2Do::verClient(int dodel)
- /* R e d r i v e */
- /******************************************************************************/
-
--void XrdXrootdJob2Do::Redrive()
-+void XrdXrootdJob2Do::Redrive() // Caller must have theJob->myMutex held
- {
- XrdXrootdJob2Do *jp;
- int Start = 0;
-@@ -364,10 +392,12 @@ void XrdXrootdJob2Do::Redrive()
- /******************************************************************************/
- /* s e n d R e s u l t */
- /******************************************************************************/
-+
-+// Caller must have theJob->myMutex locked.
-
- void XrdXrootdJob2Do::sendResult(char *lp, int caned, int jrc)
- {
-- static const char *TraceID = "sendResult";
-+ static const char *TraceID = "jobSendResult";
- static const kXR_int32 Xcan = static_cast<kXR_int32>(htonl(kXR_Cancelled));
- XrdXrootdReqID ReqID;
- struct iovec jobVec[6];
-@@ -619,6 +649,8 @@ int XrdXrootdJob::Schedule(const char *jkey,
- /* C l e a n U p */
- /******************************************************************************/
-
-+// The caller must have myMutex locked
-+
- void XrdXrootdJob::CleanUp(XrdXrootdJob2Do *jp)
- {
- int theStatus = jp->Status;
-@@ -641,6 +673,8 @@ void XrdXrootdJob::CleanUp(XrdXrootdJob2Do *jp)
- /* s e n d R e s u l t */
- /******************************************************************************/
-
-+// Caller must have myMutex locked.
-+
- int XrdXrootdJob::sendResult(XrdXrootdResponse *resp,
- const char *rpfx,
- XrdXrootdJob2Do *job)
---
-2.34.1
-
diff --git a/0002-Fix-warning-about-dereferncing-null-pointer.patch
b/0002-Fix-warning-about-dereferncing-null-pointer.patch
deleted file mode 100644
index 09c04e2..0000000
--- a/0002-Fix-warning-about-dereferncing-null-pointer.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 1780fc12fb947a2bda22007a715527a18621a6cb Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Mon, 17 Jan 2022 09:21:23 +0100
-Subject: [PATCH 2/4] Fix warning about dereferncing null pointer
-
-In member function 'XrdCl::ChunkHandler::ToPgInfo(XrdCl::AnyObject*,
XrdCl::PageInfo*&)',
- inlined from 'XrdCl::ChunkHandler::HandleResponse(XrdCl::XRootDStatus*,
XrdCl::AnyObject*)' at .../src/XrdCl/XrdClXCpSrc.cc:58:17:
-.../src/XrdCl/XrdClXCpSrc.cc:97:66: error: 'this' pointer is null
[-Werror=nonnull]
- 97 | *chunk = PageInfo( rsp->offset, rsp->length, rsp->buffer );
- | ^
-In file included from .../src/./XrdCl/XrdClFileSystem.hh:32,
- from .../src/./XrdCl/XrdClFile.hh:28,
- from .../src/./XrdCl/XrdClXCpSrc.hh:28,
- from .../src/XrdCl/XrdClXCpSrc.cc:25:
-.../src/./XrdCl/XrdClXRootDResponses.hh: In member function
'XrdCl::ChunkHandler::HandleResponse(XrdCl::XRootDStatus*, XrdCl::AnyObject*)':
-.../src/./XrdCl/XrdClXRootDResponses.hh:962:15: note: in a call to non-static member
function 'XrdCl::PageInfo::operator=(XrdCl::PageInfo&&)'
- 962 | PageInfo& operator=( PageInfo &&pginf );
- | ^~~~~~~~
-cc1plus: all warnings being treated as errors
----
- src/XrdCl/XrdClXCpSrc.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/XrdCl/XrdClXCpSrc.cc b/src/XrdCl/XrdClXCpSrc.cc
-index 532df79a4..c68fbc499 100644
---- a/src/XrdCl/XrdClXCpSrc.cc
-+++ b/src/XrdCl/XrdClXCpSrc.cc
-@@ -94,7 +94,7 @@ class ChunkHandler: public ResponseHandler
- {
- ChunkInfo *rsp = nullptr;
- response->Get( rsp );
-- *chunk = PageInfo( rsp->offset, rsp->length, rsp->buffer );
-+ chunk = new PageInfo( rsp->offset, rsp->length, rsp->buffer );
- response->Set( ( int* )0 );
- }
- }
---
-2.34.1
-
diff --git a/0003-Fix-warning-about-comparing-arrays.patch
b/0003-Fix-warning-about-comparing-arrays.patch
deleted file mode 100644
index 33c8bcf..0000000
--- a/0003-Fix-warning-about-comparing-arrays.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 62337be8ada4692bfd10eceaa042e3c4a553ece8 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Mon, 17 Jan 2022 09:24:46 +0100
-Subject: [PATCH 3/4] Fix warning about comparing arrays
-
-Cast the arrays to pointers to avoid the warning
-
-.../src/XrdPosix/XrdPosixXrootd.cc:955:22: error: comparison between two arrays
[-Werror=array-compare]
- 955 | if (dp32->d_name != dp64->d_name)
- | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
----
- src/XrdPosix/XrdPosixXrootd.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/XrdPosix/XrdPosixXrootd.cc b/src/XrdPosix/XrdPosixXrootd.cc
-index 517dc07ec..cedb3ca40 100644
---- a/src/XrdPosix/XrdPosixXrootd.cc
-+++ b/src/XrdPosix/XrdPosixXrootd.cc
-@@ -952,7 +952,7 @@ struct dirent* XrdPosixXrootd::Readdir(DIR *dirp)
- if (!(dp64 = Readdir64(dirp))) return 0;
-
- dp32 = (struct dirent *)dp64;
-- if (dp32->d_name != dp64->d_name)
-+ if ((char*)dp32->d_name != (char*)dp64->d_name)
- {dp32->d_ino = dp64->d_ino;
- #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__GNU__)
&& !(defined(__FreeBSD_kernel__) && defined(__GLIBC__))
- dp32->d_off = dp64->d_off;
---
-2.34.1
-
diff --git a/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
b/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
deleted file mode 100644
index 0d88bab..0000000
--- a/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 86d40e79b4ece53d9e5c2dfb6b40ff77888ebad6 Mon Sep 17 00:00:00 2001
-From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
-Date: Tue, 18 Jan 2022 16:01:34 +0100
-Subject: [PATCH 4/4] Do not give up ownership of ChunkInfo
-
----
- src/XrdCl/XrdClXCpSrc.cc | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/XrdCl/XrdClXCpSrc.cc b/src/XrdCl/XrdClXCpSrc.cc
-index c68fbc499..c19332c74 100644
---- a/src/XrdCl/XrdClXCpSrc.cc
-+++ b/src/XrdCl/XrdClXCpSrc.cc
-@@ -95,7 +95,6 @@ class ChunkHandler: public ResponseHandler
- ChunkInfo *rsp = nullptr;
- response->Get( rsp );
- chunk = new PageInfo( rsp->offset, rsp->length, rsp->buffer );
-- response->Set( ( int* )0 );
- }
- }
-
---
-2.34.1
-
diff --git a/xrootd.spec b/xrootd.spec
index 4266a0b..89d82a4 100644
--- a/xrootd.spec
+++ b/xrootd.spec
@@ -1,8 +1,3 @@
-%ifarch %{ix86} %{arm}
-# LTO does not work for the POSIX preload code on 32 bit architectures
-%define _lto_cflags %{nil}
-%endif
-
%if %{?fedora}%{!?fedora:0}
%ifarch %{ix86} %{arm}
%global ceph 0
@@ -18,32 +13,19 @@
Name: xrootd
Epoch: 1
-Version: 5.4.0
-Release: 5%{?dist}
+Version: 5.4.1
+Release: 1%{?dist}
Summary: Extended ROOT file server
License: LGPLv3+
URL:
https://xrootd.slac.stanford.edu/
Source0:
https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}....
-#
https://github.com/xrootd/xrootd/pull/1570
-Patch0: 0001-Fix-compilation-when-char-is-unsigned.patch
-#
https://github.com/xrootd/xrootd/pull/1571
-Patch1: 0001-Fix-compilation-on-GCC-4.8.patch
-#
https://github.com/xrootd/xrootd/pull/1573
-Patch2: 0001-Add-missing-include.patch
#
https://github.com/xrootd/xrootd/pull/1575
-Patch3: 0001-Define-ENODATA-if-not-defined.patch
-#
https://github.com/xrootd/xrootd/pull/1592
-Patch4: 0001-Fix-warning-about-uninitialized-variable.patch
-Patch5: 0002-Fix-warning-about-dereferncing-null-pointer.patch
-Patch6: 0003-Fix-warning-about-comparing-arrays.patch
-Patch7: 0004-Do-not-give-up-ownership-of-ChunkInfo.patch
-#
https://github.com/xrootd/xrootd/pull/1598
-Patch8: 0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
-#
https://github.com/xrootd/xrootd/pull/1600
-Patch9: 0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
-# Backport from upstream - fixes a gcc 12 compiler warning
-Patch10: 0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
+Patch0: 0001-Define-ENODATA-if-not-defined.patch
+#
https://github.com/xrootd/xrootd/pull/1620
+Patch1: 0001-Ignore-Warray-bounds-warnings-from-stricter-check-in.patch
+# Disable LTO for XrdPosix on 32 bit architectures
+Patch2: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch
BuildRequires: gcc-c++
%if %{?rhel}%{!?rhel:0} == 7
@@ -302,21 +284,13 @@ This package contains the API documentation of the xrootd
libraries.
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
%build
%if %{?fedora}%{!?fedora:0} >= 36
# Mark some warnings from gcc 12 as not errors
# These are likely bogus - hopefully they can be fixed in gcc updates
%set_build_flags
-CXXFLAGS="${CXXFLAGS} -Wno-error=array-bounds -Wno-error=restrict"
+CXXFLAGS="${CXXFLAGS} -Wno-error=restrict"
%endif
%cmake3 \
@@ -684,6 +658,10 @@ fi
%doc %{_pkgdocdir}
%changelog
+* Thu Feb 24 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.1-1
+- Update to version 5.4.1
+- Drop patches accepted upstream
+
* Mon Jan 31 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.0-5
- Use openssl 3 compatible code on EPEL 9
commit 9c466e1ca188cd34d84d43c6f1197e06682cac49
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Mon Jan 31 20:14:06 2022 +0100
Use openssl 3 compatible code on EPEL 9
diff --git a/xrootd.spec b/xrootd.spec
index aeab40b..4266a0b 100644
--- a/xrootd.spec
+++ b/xrootd.spec
@@ -19,7 +19,7 @@
Name: xrootd
Epoch: 1
Version: 5.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Extended ROOT file server
License: LGPLv3+
@@ -317,13 +317,10 @@ This package contains the API documentation of the xrootd
libraries.
# These are likely bogus - hopefully they can be fixed in gcc updates
%set_build_flags
CXXFLAGS="${CXXFLAGS} -Wno-error=array-bounds -Wno-error=restrict"
-%ifarch %{arm}
-CXXFLAGS="${CXXFLAGS} -Wno-error=use-after-free"
-%endif
%endif
%cmake3 \
-%if %{?fedora}%{!?fedora:0} >= 36
+%if %{?fedora}%{!?fedora:0} >= 36 || %{?rhel}%{!?rhel:0} >= 9
-DWITH_OPENSSL3:BOOL=ON \
%endif
%if %{ceph}
@@ -687,6 +684,9 @@ fi
%doc %{_pkgdocdir}
%changelog
+* Mon Jan 31 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.0-5
+- Use openssl 3 compatible code on EPEL 9
+
* Mon Jan 24 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.0-4
- Fix compiler warnings from gcc 12
commit 3c4a5ea82176c86adc3219942a033a8ba673a089
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Mon Jan 24 10:05:25 2022 +0100
Fix compiler warnings from gcc 12
diff --git a/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
b/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
new file mode 100644
index 0000000..513fff6
--- /dev/null
+++ b/0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
@@ -0,0 +1,71 @@
+From 654133bc1158e4815a45dc8dd70023e5fff82424 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Thu, 20 Jan 2022 00:19:08 +0100
+Subject: [PATCH] Fix compiler warnings about pointers used after free:
+
+.../src/XrdCms/XrdCmsUtils.cc: In function 'XrdCmsUtils::ParseMan(XrdSysError*,
XrdOucTList**, char*, char*, int*, bool)':
+.../src/XrdCms/XrdCmsUtils.cc:226:43: error: pointer 'newMans_175' may be used
after 'operator delete(void*, unsigned long)' [-Werror=use-after-free]
+ 226 | if (!plus || strcmp(hSpec, newP->text)) isBad = false;
+ | ~~~~~~^~~~
+.../src/XrdCms/XrdCmsUtils.cc:221:27: note: call to 'operator delete(void*, unsigned
long)' here
+ 221 | delete newP;
+ | ^~~~
+
+.../src/XrdCl/XrdClCopy.cc: In function 'IndexRemote(XrdCl::FileSystem*,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, unsigned short)':
+.../src/XrdCl/XrdClCopy.cc:442:17: error: pointer used after 'operator delete(void*,
unsigned long)' [-Werror=use-after-free]
+ 442 | log->Error( AppMsg, "Bad URL: %s", current->Path );
+ | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.../src/XrdCl/XrdClCopy.cc:441:14: note: call to 'operator delete(void*, unsigned
long)' here
+ 441 | delete current;
+ | ^~~~~~~
+---
+ src/XrdCl/XrdClCopy.cc | 2 +-
+ src/XrdCms/XrdCmsUtils.cc | 18 +++++++++---------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/XrdCl/XrdClCopy.cc b/src/XrdCl/XrdClCopy.cc
+index 78d27589c..c2b754bf5 100644
+--- a/src/XrdCl/XrdClCopy.cc
++++ b/src/XrdCl/XrdClCopy.cc
+@@ -438,8 +438,8 @@ XrdCpFile *IndexRemote( XrdCl::FileSystem *fs,
+ current = new XrdCpFile( path.c_str(), badUrl );
+ if( badUrl )
+ {
+- delete current;
+ log->Error( AppMsg, "Bad URL: %s", current->Path );
++ delete current;
+ return 0;
+ }
+
+diff --git a/src/XrdCms/XrdCmsUtils.cc b/src/XrdCms/XrdCmsUtils.cc
+index 49c448849..8d25973bc 100644
+--- a/src/XrdCms/XrdCmsUtils.cc
++++ b/src/XrdCms/XrdCmsUtils.cc
+@@ -223,15 +223,15 @@ bool XrdCmsUtils::ParseMan(XrdSysError *eDest, XrdOucTList
**oldMans,
+ }
+ oldP = oldP->next;
+ }
+- if (!plus || strcmp(hSpec, newP->text)) isBad = false;
+- else {eDest->Say("Config warning: "
+- "Cyclic DNS registration for
",newP->text,"\n"
+- "Config warning: This cluster will exhibit "
+- "undefined behaviour!!!");
+- isBad = true;
+- }
+- if (!oldP)
+- {appList = SInsert(appList, newP);
++ if (!oldP)
++ {if (!plus || strcmp(hSpec, newP->text)) isBad = false;
++ else {eDest->Say("Config warning: "
++ "Cyclic DNS registration for
",newP->text,"\n"
++ "Config warning: This cluster will exhibit "
++ "undefined behaviour!!!");
++ isBad = true;
++ }
++ appList = SInsert(appList, newP);
+ if (plus && !hush) Display(eDest, hSpec, newP->text, isBad);
+ }
+ }
+--
+2.34.1
+
diff --git a/0001-Fix-warning-about-uninitialized-variable.patch
b/0001-Fix-warning-about-uninitialized-variable.patch
new file mode 100644
index 0000000..fe72398
--- /dev/null
+++ b/0001-Fix-warning-about-uninitialized-variable.patch
@@ -0,0 +1,34 @@
+From 0898ed380a457ff1c0c2547953d0fd36eaeaeebe Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Mon, 17 Jan 2022 09:14:08 +0100
+Subject: [PATCH 1/4] Fix warning about uninitialized variable
+
+The cond variable is initialized using the mutex before the mutex is
+initialized. Changing the order of the members in the class ensures
+the mutex is initialized first.
+
+.../src/./XrdXrootd/XrdXrootdAioTask.hh:70:51: error: member
'XrdXrootdAioTask::aioMutex' is used uninitialized [-Werror=uninitialized]
+ 70 | : XrdJob(what), aioReady(aioMutex) {}
+ | ^~~~~~~~
+cc1plus: all warnings being treated as errors
+---
+ src/XrdXrootd/XrdXrootdAioTask.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/XrdXrootd/XrdXrootdAioTask.hh b/src/XrdXrootd/XrdXrootdAioTask.hh
+index 2c49ff7d1..c04858bba 100644
+--- a/src/XrdXrootd/XrdXrootdAioTask.hh
++++ b/src/XrdXrootd/XrdXrootdAioTask.hh
+@@ -83,8 +83,8 @@ virtual bool CopyL2F(XrdXrootdAioBuff *aioP) = 0;
+
+ static const char* TraceID;
+
+- XrdSysCondVar2 aioReady;
+ XrdSysMutex aioMutex; // Locks private data
++ XrdSysCondVar2 aioReady;
+ XrdXrootdAioBuff* pendQ;
+ XrdXrootdAioBuff* pendQEnd; // -> Last element in pendQ
+
+--
+2.34.1
+
diff --git a/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
b/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
new file mode 100644
index 0000000..7b7cf1d
--- /dev/null
+++ b/0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
@@ -0,0 +1,125 @@
+From 0dc292fbf63d25c6a9e000a2e66d7e3e0b8db735 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Mon, 24 Jan 2022 06:56:43 +0100
+Subject: [PATCH] Fix warnings about allocations exceeding maximum object size
+
+In member function 'Init',
+ inlined from 'Init' at .../src/Xrd/XrdBuffXL.cc:64:6:
+.../src/Xrd/XrdBuffXL.cc:90:30: warning: argument 1 value '18446744073709551615'
exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
+ 90 | bucket = new BuckVec[lg2+1];
+ | ^
+/usr/include/c++/12/new: In member function 'Init':
+/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
+ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
+ | ^
+
+.../src/XrdOuc/XrdOucBuffer.cc: In member function '__ct_base ':
+.../src/XrdOuc/XrdOucBuffer.cc:79:30: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
+ 79 | bSlot = new BuffSlot[slots];
+ | ^
+/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
+ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
+ | ^
+
+.../src/XrdNet/XrdNetUtils.cc: In function 'GetAddrs':
+.../src/XrdNet/XrdNetUtils.cc:262:35: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
+ 262 | *aVec = new XrdNetAddr[aVsz];
+ | ^
+/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
+ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
+ | ^
+
+In member function '__ct ',
+ inlined from '__ct_base ' at .../src/XrdXrootd/XrdXrootdJob.cc:459:29:
+.../src/./XrdOuc/XrdOucTable.hh:43:30: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
+ 43 | Table = new OucTable[maxe];
+ | ^
+/usr/include/c++/12/new: In member function '__ct_base ':
+/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
+ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
+ | ^
+
+.../src/XrdPosix/XrdPosixAdmin.cc: In member function 'FanOut':
+.../src/XrdPosix/XrdPosixAdmin.cc:69:27: warning: argument 1 value
'18446744073709551615' exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]
+ 69 | uVec = new XrdCl::URL[i];
+ | ^
+/usr/include/c++/12/new:128:26: note: in a call to allocation function 'operator new
[]' declared here
+ 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW
(std::bad_alloc)
+ | ^
+---
+ src/Xrd/XrdBuffXL.cc | 3 ++-
+ src/XrdNet/XrdNetUtils.cc | 2 +-
+ src/XrdOuc/XrdOucBuffer.cc | 2 +-
+ src/XrdOuc/XrdOucTable.hh | 2 +-
+ src/XrdPosix/XrdPosixAdmin.cc | 2 +-
+ 5 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/Xrd/XrdBuffXL.cc b/src/Xrd/XrdBuffXL.cc
+index f84ef77cb..f769522af 100644
+--- a/src/Xrd/XrdBuffXL.cc
++++ b/src/Xrd/XrdBuffXL.cc
+@@ -63,7 +63,8 @@ XrdBuffXL::XrdBuffXL() : bucket(0), totalo(0), pagsz(getpagesize()),
slots(0),
+
+ void XrdBuffXL::Init(int maxMSZ)
+ {
+- int lg2, chunksz;
++ unsigned int lg2;
++ int chunksz;
+
+ // If this is a duplicate call, delete the previous setup
+ //
+diff --git a/src/XrdNet/XrdNetUtils.cc b/src/XrdNet/XrdNetUtils.cc
+index 0f5eac348..fbc6c5ff7 100644
+--- a/src/XrdNet/XrdNetUtils.cc
++++ b/src/XrdNet/XrdNetUtils.cc
+@@ -259,7 +259,7 @@ const char *XrdNetUtils::GetAddrs(const char *hSpec,
+ //
+ if (aInfo.aNum4 || aInfo.aNum6)
+ {aVsz = aInfo.aNum4 + aInfo.aNum6;
+- *aVec = new XrdNetAddr[aVsz];
++ *aVec = new XrdNetAddr[(unsigned int)aVsz];
+ FillAddr(aInfo, *aVec);
+ }
+
+diff --git a/src/XrdOuc/XrdOucBuffer.cc b/src/XrdOuc/XrdOucBuffer.cc
+index 2faee1d51..10f79d999 100644
+--- a/src/XrdOuc/XrdOucBuffer.cc
++++ b/src/XrdOuc/XrdOucBuffer.cc
+@@ -76,7 +76,7 @@ XrdOucBuffPool::XrdOucBuffPool(int minsz, int maxsz,
+
+ // Allocate a slot vector for this
+ //
+- bSlot = new BuffSlot[slots];
++ bSlot = new BuffSlot[(unsigned int)slots];
+
+ // Complete initializing the slot vector
+ //
+diff --git a/src/XrdOuc/XrdOucTable.hh b/src/XrdOuc/XrdOucTable.hh
+index 92058c42b..2805a259c 100644
+--- a/src/XrdOuc/XrdOucTable.hh
++++ b/src/XrdOuc/XrdOucTable.hh
+@@ -40,7 +40,7 @@ public:
+
+ XrdOucTable(int maxe)
+ {int i;
+- Table = new OucTable[maxe];
++ Table = new OucTable[(unsigned int)maxe];
+ maxnum = maxe; curnum = 0; avlnum = 0;
+ for (i = 1; i < maxe; i++) Table[i-1].Fnum = i;
+ Table[maxe-1].Fnum = -1;
+diff --git a/src/XrdPosix/XrdPosixAdmin.cc b/src/XrdPosix/XrdPosixAdmin.cc
+index c26571394..2cad5517e 100644
+--- a/src/XrdPosix/XrdPosixAdmin.cc
++++ b/src/XrdPosix/XrdPosixAdmin.cc
+@@ -49,7 +49,7 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num)
+ XrdCl::URL *uVec;
+ XrdNetAddr netLoc;
+ const char *hName;
+- int i;
++ unsigned int i;
+
+ // Make sure admin is ok
+ //
+--
+2.34.1
+
diff --git a/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
b/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
new file mode 100644
index 0000000..34f0cab
--- /dev/null
+++ b/0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
@@ -0,0 +1,161 @@
+From 7615d866986131f3548b5863b38872a2e4dc58d9 Mon Sep 17 00:00:00 2001
+From: Andrew Hanushevsky <abh(a)stanford.edu>
+Date: Thu, 20 Jan 2022 23:22:09 -0800
+Subject: [PATCH] [Server] Prevent SEGV on busy systems due to missing lock
+ call for background jobs.
+
+---
+ src/XrdXrootd/XrdXrootdJob.cc | 50 +++++++++++++++++++++++++++++------
+ 1 file changed, 42 insertions(+), 8 deletions(-)
+
+diff --git a/src/XrdXrootd/XrdXrootdJob.cc b/src/XrdXrootd/XrdXrootdJob.cc
+index 1b2703d96..467323de5 100644
+--- a/src/XrdXrootd/XrdXrootdJob.cc
++++ b/src/XrdXrootd/XrdXrootdJob.cc
+@@ -37,6 +37,7 @@
+ #include "Xrd/XrdScheduler.hh"
+ #include "XrdOuc/XrdOucProg.hh"
+ #include "XrdOuc/XrdOucStream.hh"
++#include "XrdSys/XrdSysError.hh"
+ #include "XrdSys/XrdSysPlatform.hh"
+ #include "XrdSys/XrdSysRAtomic.hh"
+ #include "XrdXrootd/XrdXrootdJob.hh"
+@@ -99,6 +100,12 @@ static const int argvnum =
sizeof(theArgs)/sizeof(theArgs[0]);
+ /* G l o b a l F u n c t i o n s */
+ /******************************************************************************/
+
++namespace XrdXrootd
++{
++extern XrdSysError eLog;
++}
++using namespace XrdXrootd;
++
+ extern XrdSysTrace XrdXrootdTrace;
+
+ int XrdXrootdJobWaiting(XrdXrootdJob2Do *item, void *arg)
+@@ -152,10 +159,15 @@ XrdXrootdJob2Do::~XrdXrootdJob2Do()
+ /******************************************************************************/
+ /* D o I t */
+ /******************************************************************************/
++
++#define jobInfo theJob->JobName<<' '<<(theArgs[1] ? theArgs[1] :
"")\
++ <<(theArgs[2] ? " " : "")<<(theArgs[2] ?
theArgs[2] : "")
+
+ void XrdXrootdJob2Do::DoIt()
+ {
++ static const char *TraceID = "jobXeq";
+ XrdXrootdJob2Do *jp = 0;
++ const char *endStat = " completed";
+ char *lp = 0;
+ int i, rc = 0;
+
+@@ -163,9 +175,11 @@ void XrdXrootdJob2Do::DoIt()
+ // perform the actual function and get the result and send to any async clients
+ //
+ if (Status != Job_Cancel)
+- {if ((rc = theJob->theProg->Run(&jobStream, theArgs[1], theArgs[2],
++ {TRACE(REQ, "Job "<<jobInfo<<" started");
++ if ((rc = theJob->theProg->Run(&jobStream, theArgs[1], theArgs[2],
+ theArgs[3], theArgs[4])))
+ {Status = Job_Cancel;
++ endStat= " failed";
+ lp = jobStream.GetLine();
+ theJob->myMutex.Lock();
+ }
+@@ -173,15 +187,22 @@ void XrdXrootdJob2Do::DoIt()
+ rc = theJob->theProg->RunDone(jobStream);
+ theJob->myMutex.Lock();
+ if ((rc && rc != -EPIPE) || (rc == -EPIPE && (!lp ||
!(*lp))))
+- Status = Job_Cancel;
++ {Status = Job_Cancel; endStat = " failed";}
+ else if (Status != Job_Cancel)
+ {Status = Job_Done;
+ for (i = 0; i < numClients; i++)
+ if (!Client[i].isSync) {sendResult(lp); break;}
+ }
+ }
++ } else {
++ endStat = " cancelled";
++ theJob->myMutex.Lock();
+ }
+
++// Produce a trace record
++//
++ TRACE(REQ, "Job "<<jobInfo<<endStat);
++
+ // If the number of jobs > than the max allowed, then redrive a waiting job
+ // if in fact we represent a legitimate job slot (this could a phantom slot
+ // due to ourselves being cancelled.
+@@ -313,7 +334,7 @@ XrdOucTList *XrdXrootdJob2Do::lstClient()
+ /* v e r C l i e n t */
+ /******************************************************************************/
+
+-int XrdXrootdJob2Do::verClient(int dodel)
++int XrdXrootdJob2Do::verClient(int dodel) // Caller must have theJob->myMutex
+ {
+ int i, j, k;
+
+@@ -330,9 +351,16 @@ int XrdXrootdJob2Do::verClient(int dodel)
+ //
+ if (!numClients && dodel)
+ {XrdXrootdJob2Do *jp = theJob->JobTable.Remove(JobNum);
+- if (jp->Status == XrdXrootdJob2Do::Job_Waiting) theJob->numJobs--;
+- delete jp;
+- return 0;
++ if (jp)
++ {if (jp->Status == XrdXrootdJob2Do::Job_Waiting) theJob->numJobs--;
++ delete jp;
++ return 0;
++ } else {
++ char ebuff[80];
++ snprintf(ebuff, sizeof(ebuff), "Unable to find %s job %d;",
++ theJob->JobName, JobNum);
++ eLog.Emsg("Job2Do", ebuff, "job slot disabled!");
++ }
+ }
+ return numClients;
+ }
+@@ -341,7 +369,7 @@ int XrdXrootdJob2Do::verClient(int dodel)
+ /* R e d r i v e */
+ /******************************************************************************/
+
+-void XrdXrootdJob2Do::Redrive()
++void XrdXrootdJob2Do::Redrive() // Caller must have theJob->myMutex held
+ {
+ XrdXrootdJob2Do *jp;
+ int Start = 0;
+@@ -364,10 +392,12 @@ void XrdXrootdJob2Do::Redrive()
+ /******************************************************************************/
+ /* s e n d R e s u l t */
+ /******************************************************************************/
++
++// Caller must have theJob->myMutex locked.
+
+ void XrdXrootdJob2Do::sendResult(char *lp, int caned, int jrc)
+ {
+- static const char *TraceID = "sendResult";
++ static const char *TraceID = "jobSendResult";
+ static const kXR_int32 Xcan = static_cast<kXR_int32>(htonl(kXR_Cancelled));
+ XrdXrootdReqID ReqID;
+ struct iovec jobVec[6];
+@@ -619,6 +649,8 @@ int XrdXrootdJob::Schedule(const char *jkey,
+ /* C l e a n U p */
+ /******************************************************************************/
+
++// The caller must have myMutex locked
++
+ void XrdXrootdJob::CleanUp(XrdXrootdJob2Do *jp)
+ {
+ int theStatus = jp->Status;
+@@ -641,6 +673,8 @@ void XrdXrootdJob::CleanUp(XrdXrootdJob2Do *jp)
+ /* s e n d R e s u l t */
+ /******************************************************************************/
+
++// Caller must have myMutex locked.
++
+ int XrdXrootdJob::sendResult(XrdXrootdResponse *resp,
+ const char *rpfx,
+ XrdXrootdJob2Do *job)
+--
+2.34.1
+
diff --git a/0002-Fix-warning-about-dereferncing-null-pointer.patch
b/0002-Fix-warning-about-dereferncing-null-pointer.patch
new file mode 100644
index 0000000..09c04e2
--- /dev/null
+++ b/0002-Fix-warning-about-dereferncing-null-pointer.patch
@@ -0,0 +1,39 @@
+From 1780fc12fb947a2bda22007a715527a18621a6cb Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Mon, 17 Jan 2022 09:21:23 +0100
+Subject: [PATCH 2/4] Fix warning about dereferncing null pointer
+
+In member function 'XrdCl::ChunkHandler::ToPgInfo(XrdCl::AnyObject*,
XrdCl::PageInfo*&)',
+ inlined from 'XrdCl::ChunkHandler::HandleResponse(XrdCl::XRootDStatus*,
XrdCl::AnyObject*)' at .../src/XrdCl/XrdClXCpSrc.cc:58:17:
+.../src/XrdCl/XrdClXCpSrc.cc:97:66: error: 'this' pointer is null
[-Werror=nonnull]
+ 97 | *chunk = PageInfo( rsp->offset, rsp->length, rsp->buffer );
+ | ^
+In file included from .../src/./XrdCl/XrdClFileSystem.hh:32,
+ from .../src/./XrdCl/XrdClFile.hh:28,
+ from .../src/./XrdCl/XrdClXCpSrc.hh:28,
+ from .../src/XrdCl/XrdClXCpSrc.cc:25:
+.../src/./XrdCl/XrdClXRootDResponses.hh: In member function
'XrdCl::ChunkHandler::HandleResponse(XrdCl::XRootDStatus*, XrdCl::AnyObject*)':
+.../src/./XrdCl/XrdClXRootDResponses.hh:962:15: note: in a call to non-static member
function 'XrdCl::PageInfo::operator=(XrdCl::PageInfo&&)'
+ 962 | PageInfo& operator=( PageInfo &&pginf );
+ | ^~~~~~~~
+cc1plus: all warnings being treated as errors
+---
+ src/XrdCl/XrdClXCpSrc.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/XrdCl/XrdClXCpSrc.cc b/src/XrdCl/XrdClXCpSrc.cc
+index 532df79a4..c68fbc499 100644
+--- a/src/XrdCl/XrdClXCpSrc.cc
++++ b/src/XrdCl/XrdClXCpSrc.cc
+@@ -94,7 +94,7 @@ class ChunkHandler: public ResponseHandler
+ {
+ ChunkInfo *rsp = nullptr;
+ response->Get( rsp );
+- *chunk = PageInfo( rsp->offset, rsp->length, rsp->buffer );
++ chunk = new PageInfo( rsp->offset, rsp->length, rsp->buffer );
+ response->Set( ( int* )0 );
+ }
+ }
+--
+2.34.1
+
diff --git a/0003-Fix-warning-about-comparing-arrays.patch
b/0003-Fix-warning-about-comparing-arrays.patch
new file mode 100644
index 0000000..33c8bcf
--- /dev/null
+++ b/0003-Fix-warning-about-comparing-arrays.patch
@@ -0,0 +1,30 @@
+From 62337be8ada4692bfd10eceaa042e3c4a553ece8 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Mon, 17 Jan 2022 09:24:46 +0100
+Subject: [PATCH 3/4] Fix warning about comparing arrays
+
+Cast the arrays to pointers to avoid the warning
+
+.../src/XrdPosix/XrdPosixXrootd.cc:955:22: error: comparison between two arrays
[-Werror=array-compare]
+ 955 | if (dp32->d_name != dp64->d_name)
+ | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
+---
+ src/XrdPosix/XrdPosixXrootd.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/XrdPosix/XrdPosixXrootd.cc b/src/XrdPosix/XrdPosixXrootd.cc
+index 517dc07ec..cedb3ca40 100644
+--- a/src/XrdPosix/XrdPosixXrootd.cc
++++ b/src/XrdPosix/XrdPosixXrootd.cc
+@@ -952,7 +952,7 @@ struct dirent* XrdPosixXrootd::Readdir(DIR *dirp)
+ if (!(dp64 = Readdir64(dirp))) return 0;
+
+ dp32 = (struct dirent *)dp64;
+- if (dp32->d_name != dp64->d_name)
++ if ((char*)dp32->d_name != (char*)dp64->d_name)
+ {dp32->d_ino = dp64->d_ino;
+ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__GNU__)
&& !(defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+ dp32->d_off = dp64->d_off;
+--
+2.34.1
+
diff --git a/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
b/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
new file mode 100644
index 0000000..0d88bab
--- /dev/null
+++ b/0004-Do-not-give-up-ownership-of-ChunkInfo.patch
@@ -0,0 +1,24 @@
+From 86d40e79b4ece53d9e5c2dfb6b40ff77888ebad6 Mon Sep 17 00:00:00 2001
+From: Mattias Ellert <mattias.ellert(a)physics.uu.se>
+Date: Tue, 18 Jan 2022 16:01:34 +0100
+Subject: [PATCH 4/4] Do not give up ownership of ChunkInfo
+
+---
+ src/XrdCl/XrdClXCpSrc.cc | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/XrdCl/XrdClXCpSrc.cc b/src/XrdCl/XrdClXCpSrc.cc
+index c68fbc499..c19332c74 100644
+--- a/src/XrdCl/XrdClXCpSrc.cc
++++ b/src/XrdCl/XrdClXCpSrc.cc
+@@ -95,7 +95,6 @@ class ChunkHandler: public ResponseHandler
+ ChunkInfo *rsp = nullptr;
+ response->Get( rsp );
+ chunk = new PageInfo( rsp->offset, rsp->length, rsp->buffer );
+- response->Set( ( int* )0 );
+ }
+ }
+
+--
+2.34.1
+
diff --git a/xrootd.spec b/xrootd.spec
index 5e4f370..aeab40b 100644
--- a/xrootd.spec
+++ b/xrootd.spec
@@ -19,7 +19,7 @@
Name: xrootd
Epoch: 1
Version: 5.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Extended ROOT file server
License: LGPLv3+
@@ -33,6 +33,17 @@ Patch1: 0001-Fix-compilation-on-GCC-4.8.patch
Patch2: 0001-Add-missing-include.patch
#
https://github.com/xrootd/xrootd/pull/1575
Patch3: 0001-Define-ENODATA-if-not-defined.patch
+#
https://github.com/xrootd/xrootd/pull/1592
+Patch4: 0001-Fix-warning-about-uninitialized-variable.patch
+Patch5: 0002-Fix-warning-about-dereferncing-null-pointer.patch
+Patch6: 0003-Fix-warning-about-comparing-arrays.patch
+Patch7: 0004-Do-not-give-up-ownership-of-ChunkInfo.patch
+#
https://github.com/xrootd/xrootd/pull/1598
+Patch8: 0001-Fix-compiler-warnings-about-pointers-used-after-free.patch
+#
https://github.com/xrootd/xrootd/pull/1600
+Patch9: 0001-Fix-warnings-about-allocations-exceeding-maximum-obj.patch
+# Backport from upstream - fixes a gcc 12 compiler warning
+Patch10: 0001-Server-Prevent-SEGV-on-busy-systems-due-to-missing-l.patch
BuildRequires: gcc-c++
%if %{?rhel}%{!?rhel:0} == 7
@@ -292,8 +303,25 @@ This package contains the API documentation of the xrootd libraries.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%build
+%if %{?fedora}%{!?fedora:0} >= 36
+# Mark some warnings from gcc 12 as not errors
+# These are likely bogus - hopefully they can be fixed in gcc updates
+%set_build_flags
+CXXFLAGS="${CXXFLAGS} -Wno-error=array-bounds -Wno-error=restrict"
+%ifarch %{arm}
+CXXFLAGS="${CXXFLAGS} -Wno-error=use-after-free"
+%endif
+%endif
+
%cmake3 \
%if %{?fedora}%{!?fedora:0} >= 36
-DWITH_OPENSSL3:BOOL=ON \
@@ -659,6 +687,9 @@ fi
%doc %{_pkgdocdir}
%changelog
+* Mon Jan 24 2022 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.0-4
+- Fix compiler warnings from gcc 12
+
* Sat Jan 22 2022 Fedora Release Engineering <releng(a)fedoraproject.org> -
1:5.4.0-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 8573f1201109554385158a3d41111776edfdd0f8
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jan 22 05:30:09 2022 +0000
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/xrootd.spec b/xrootd.spec
index 665b6ac..5e4f370 100644
--- a/xrootd.spec
+++ b/xrootd.spec
@@ -19,7 +19,7 @@
Name: xrootd
Epoch: 1
Version: 5.4.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Extended ROOT file server
License: LGPLv3+
@@ -659,6 +659,9 @@ fi
%doc %{_pkgdocdir}
%changelog
+* Sat Jan 22 2022 Fedora Release Engineering <releng(a)fedoraproject.org> -
1:5.4.0-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
* Tue Dec 14 2021 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 1:5.4.0-2
- Don't use unimplemented regex functions on EPEL 7.
- Add missing include (GNU/Hurd)