From 10dab32577dbf5960a96e80a688ea3fee52dc633 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 17 Jan 2023 07:17:06 +0100 Subject: [PATCH 01/62] Add missing include - fixes build failure with gcc 13 --- ...ude-causing-build-failure-with-gcc-1.patch | 56 +++++++++++++++++++ ...ools-over-setuptools._distutils.core.patch | 31 ++++++++++ ...-check-for-setuptools-over-distutils.patch | 56 +++++++++++++++++++ xrootd.spec | 32 ++++++++--- 4 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch create mode 100644 0001-feat-Use-setuptools-over-setuptools._distutils.core.patch create mode 100644 0002-chore-Remove-check-for-setuptools-over-distutils.patch diff --git a/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch b/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch new file mode 100644 index 0000000..5b4e80f --- /dev/null +++ b/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch @@ -0,0 +1,56 @@ +From 16d5c7a5b4106f0b1cff709f421762c9eadf5bce Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 17 Jan 2023 01:18:11 +0100 +Subject: [PATCH] Add missing include causing build failure with gcc 13 + +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:95:22: error: field 'fn_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} + 95 | const std::string fn_; + | ^~~ +In file included from /usr/include/c++/13/iosfwd:41, + from /usr/include/c++/13/bits/shared_ptr.h:52, + from /usr/include/c++/13/condition_variable:45, + from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.hh:38, + from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.cc:32: +/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} + 72 | class basic_string; + | ^~~~~~~~~~~~ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:96:22: error: field 'tident_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} + 96 | const std::string tident_; + | ^~~~~~~ +/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} + 72 | class basic_string; + | ^~~~~~~~~~~~ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:148:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 148 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:161:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 161 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:174:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 174 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:186:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 186 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:195:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 195 | { + | ^ +--- + src/XrdOssCsi/XrdOssCsiPages.hh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/XrdOssCsi/XrdOssCsiPages.hh b/src/XrdOssCsi/XrdOssCsiPages.hh +index 852a3add6..cd1c1b4a3 100644 +--- a/src/XrdOssCsi/XrdOssCsiPages.hh ++++ b/src/XrdOssCsi/XrdOssCsiPages.hh +@@ -38,6 +38,7 @@ + #include "XrdOssCsiRanges.hh" + #include + #include ++#include + #include + #include + #include +-- +2.39.0 + diff --git a/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch b/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch new file mode 100644 index 0000000..6a83384 --- /dev/null +++ b/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch @@ -0,0 +1,31 @@ +From bea744e8c1fe05e9aad12d8c86d550ef38e8bf14 Mon Sep 17 00:00:00 2001 +From: Matthew Feickert +Date: Wed, 30 Nov 2022 14:06:31 -0600 +Subject: [PATCH 1/2] feat: Use setuptools over setuptools._distutils.core + +Drop all usage of setuptools._distutils in favor of pure setuptools. +This effectively solves the problems that were present in the attempt +in https://github.com/xrootd/xrootd/pull/1585 and +https://github.com/xrootd/xrootd/pull/1700. + +Co-authored-by: Henry Schreiner +--- + bindings/python/setup.py.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in +index fbac3e6df..c5bbec503 100644 +--- a/bindings/python/setup.py.in ++++ b/bindings/python/setup.py.in +@@ -3,7 +3,7 @@ from __future__ import print_function + # setuptools._distutils added in setuptools v48.0.0 + # c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 + try: +- from setuptools._distutils.core import setup, Extension ++ from setuptools import setup, Extension + # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. + # Instead of checking setuptools.__version__ explicitly, use the knowledge that + # to get here in the 'try' block requires setuptools v48.0.0+. +-- +2.39.0 + diff --git a/0002-chore-Remove-check-for-setuptools-over-distutils.patch b/0002-chore-Remove-check-for-setuptools-over-distutils.patch new file mode 100644 index 0000000..99ee1c8 --- /dev/null +++ b/0002-chore-Remove-check-for-setuptools-over-distutils.patch @@ -0,0 +1,56 @@ +From 8c590658cf8cd93ae837a523f2666eb07cbbcbf5 Mon Sep 17 00:00:00 2001 +From: Matthew Feickert +Date: Wed, 30 Nov 2022 14:31:34 -0600 +Subject: [PATCH 2/2] chore: Remove check for setuptools over distutils + +* Now that setuptools._distutils.core usage has been dropped, it is + possible to go further and drop direct usage of distutils + in favor of setuptools. This has already happened with the removal + of setuptools._distutils as + + > from setuptools import setup, Extension + + should always pass, and so this commit just makes this explicitly + clear by removing the try/except block. +--- + bindings/python/setup.py.in | 24 ++++++++---------------- + 1 file changed, 8 insertions(+), 16 deletions(-) + +diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in +index c5bbec503..7fb8c53f6 100644 +--- a/bindings/python/setup.py.in ++++ b/bindings/python/setup.py.in +@@ -1,22 +1,14 @@ + from __future__ import print_function + +-# setuptools._distutils added in setuptools v48.0.0 +-# c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 +-try: +- from setuptools import setup, Extension +- # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. +- # Instead of checking setuptools.__version__ explicitly, use the knowledge that +- # to get here in the 'try' block requires setuptools v48.0.0+. +- # FIXME: When support for Python 3.6 is dropped simplify this +- import sys +- +- if sys.version_info < (3, 7): +- from distutils import sysconfig +- else: +- import sysconfig +-except ImportError: +- from distutils.core import setup, Extension ++from setuptools import setup, Extension ++# sysconfig with setuptools v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. ++# FIXME: When support for Python 3.6 is dropped simplify this ++import sys ++ ++if sys.version_info < (3, 7): + from distutils import sysconfig ++else: ++ import sysconfig + + from os import getenv, walk, path + import subprocess +-- +2.39.0 + diff --git a/xrootd.spec b/xrootd.spec index e02dec9..9dd6a02 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extended ROOT file server License: LGPLv3+ @@ -26,6 +26,12 @@ Patch0: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch # Check operator++ in check # https://github.com/xrootd/xrootd/pull/1806 Patch1: 0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch +# Backported from upstream +Patch2: 0001-feat-Use-setuptools-over-setuptools._distutils.core.patch +Patch3: 0002-chore-Remove-check-for-setuptools-over-distutils.patch +# Add missing include - fixes build failure with gcc 13 +# https://github.com/xrootd/xrootd/pull/1880 +Patch4: 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -49,21 +55,25 @@ BuildRequires: zlib-devel BuildRequires: doxygen BuildRequires: graphviz BuildRequires: selinux-policy-devel -BuildRequires: systemd +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 @@ -249,7 +259,7 @@ interfacing with the Ceph storage platform. %if %{?rhel}%{!?rhel:0} == 7 %package -n python2-%{name} Summary: Python 2 bindings for xrootd -%{?python_provide:%python_provide python2-%{name}} +%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} @@ -261,7 +271,7 @@ This package contains Python 2 bindings for xrootd. %package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for xrootd -%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +%py_provides python%{python3_pkgversion}-%{name} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -269,13 +279,13 @@ Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} This package contains Python 3 bindings for xrootd. %if %{?rhel}%{!?rhel:0} == 7 -%package -n python%{python3_other_pkgversion}-%{name} +%package -n python%{?python3_other_pkgversion}-%{name} Summary: Python 3 bindings for xrootd -%{?python_provide:%python_provide python%{?python3_other_pkgversion}-%{name}} +%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} +%description -n python%{?python3_other_pkgversion}-%{name} This package contains Python 3 bindings for xrootd. %endif @@ -290,6 +300,9 @@ This package contains the API documentation of the xrootd libraries. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -672,7 +685,7 @@ fi %{python3_sitearch}/XRootD %if %{?rhel}%{!?rhel:0} == 7 -%files -n python%{python3_other_pkgversion}-%{name} +%files -n python%{?python3_other_pkgversion}-%{name} %{python3_other_sitearch}/xrootd-*.*-info %{python3_other_sitearch}/pyxrootd %{python3_other_sitearch}/XRootD @@ -682,6 +695,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Jan 17 2023 Mattias Ellert - 1:5.5.1-2 +- Add missing include - fixes build failure with gcc 13 + * Wed Oct 19 2022 Mattias Ellert - 1:5.5.1-1 - Update to version 5.5.1 - Drop doxygen patch accepted upstream From f94c69aaa84218e2ba0bd7868004150739f1ffa7 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 17 Jan 2023 10:43:22 +0100 Subject: [PATCH 02/62] Fix build failure due to possible large memory allocation --- ...re-due-to-possible-large-memory-allo.patch | 40 +++++++++++++++++++ xrootd.spec | 5 +++ 2 files changed, 45 insertions(+) create mode 100644 0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch diff --git a/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch b/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch new file mode 100644 index 0000000..258909e --- /dev/null +++ b/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch @@ -0,0 +1,40 @@ +From 898534418eda931f9a5d697117cfb9b31ed728d0 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 17 Jan 2023 10:40:42 +0100 +Subject: [PATCH] Fix build failure due to possible large memory allocation + +/builddir/build/BUILD/xrootd-5.5.1/src/XrdPosix/XrdPosixAdmin.cc: In member function 'FanOut': +/builddir/build/BUILD/xrootd-5.5.1/src/XrdPosix/XrdPosixAdmin.cc:69:27: error: argument 1 value '4294967295' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=] + 69 | uVec = new XrdCl::URL[i]; + | ^ +/usr/include/c++/13/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 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/XrdPosix/XrdPosixAdmin.cc b/src/XrdPosix/XrdPosixAdmin.cc +index 2cad5517e..eb8ccdecd 100644 +--- a/src/XrdPosix/XrdPosixAdmin.cc ++++ b/src/XrdPosix/XrdPosixAdmin.cc +@@ -29,6 +29,7 @@ + /******************************************************************************/ + + #include ++#include + #include + #include + #include +@@ -66,6 +67,8 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num) + // Allocate an array large enough to hold this information + // + if (!(i = info->GetSize())) {delete info; return 0;} ++ if (i > std::numeric_limits::max() / sizeof(XrdCl::URL)) ++ {delete info; return 0;} + uVec = new XrdCl::URL[i]; + + // Now start filling out the array +-- +2.39.0 + diff --git a/xrootd.spec b/xrootd.spec index 9dd6a02..eb4e4b3 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -32,6 +32,9 @@ Patch3: 0002-chore-Remove-check-for-setuptools-over-distutils.patch # Add missing include - fixes build failure with gcc 13 # https://github.com/xrootd/xrootd/pull/1880 Patch4: 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch +# Fix build failure due to possible large memory allocation +# https://github.com/xrootd/xrootd/pull/1881 +Patch5: 0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -303,6 +306,7 @@ This package contains the API documentation of the xrootd libraries. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -697,6 +701,7 @@ fi %changelog * Tue Jan 17 2023 Mattias Ellert - 1:5.5.1-2 - Add missing include - fixes build failure with gcc 13 +- Fix build failure due to possible large memory allocation * Wed Oct 19 2022 Mattias Ellert - 1:5.5.1-1 - Update to version 5.5.1 From 669673f6cee7a0e6b5a094c19167a0ffdd0a267a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 07:51:41 +0000 Subject: [PATCH 03/62] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index eb4e4b3..87e9135 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Extended ROOT file server License: LGPLv3+ @@ -699,6 +699,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1:5.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Jan 17 2023 Mattias Ellert - 1:5.5.1-2 - Add missing include - fixes build failure with gcc 13 - Fix build failure due to possible large memory allocation From 51203b0d39a79a663ef848fa05ece2141a3dce69 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 10 Feb 2023 06:35:15 +0100 Subject: [PATCH 04/62] Update to version 5.5.2 Drop patches accepted upstream or previously backported --- ...ude-causing-build-failure-with-gcc-1.patch | 56 ------------------- ...all-sizes-8-16-32-64-in-atomic-check.patch | 50 ----------------- ...re-due-to-possible-large-memory-allo.patch | 40 ------------- ...ools-over-setuptools._distutils.core.patch | 31 ---------- ...-check-for-setuptools-over-distutils.patch | 56 ------------------- sources | 2 +- xrootd.spec | 31 +++------- 7 files changed, 10 insertions(+), 256 deletions(-) delete mode 100644 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch delete mode 100644 0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch delete mode 100644 0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch delete mode 100644 0001-feat-Use-setuptools-over-setuptools._distutils.core.patch delete mode 100644 0002-chore-Remove-check-for-setuptools-over-distutils.patch diff --git a/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch b/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch deleted file mode 100644 index 5b4e80f..0000000 --- a/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 16d5c7a5b4106f0b1cff709f421762c9eadf5bce Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 17 Jan 2023 01:18:11 +0100 -Subject: [PATCH] Add missing include causing build failure with gcc 13 - -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:95:22: error: field 'fn_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} - 95 | const std::string fn_; - | ^~~ -In file included from /usr/include/c++/13/iosfwd:41, - from /usr/include/c++/13/bits/shared_ptr.h:52, - from /usr/include/c++/13/condition_variable:45, - from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.hh:38, - from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.cc:32: -/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} - 72 | class basic_string; - | ^~~~~~~~~~~~ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:96:22: error: field 'tident_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} - 96 | const std::string tident_; - | ^~~~~~~ -/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} - 72 | class basic_string; - | ^~~~~~~~~~~~ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:148:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete - 148 | { - | ^ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:161:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete - 161 | { - | ^ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:174:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete - 174 | { - | ^ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:186:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete - 186 | { - | ^ -/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:195:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete - 195 | { - | ^ ---- - src/XrdOssCsi/XrdOssCsiPages.hh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/XrdOssCsi/XrdOssCsiPages.hh b/src/XrdOssCsi/XrdOssCsiPages.hh -index 852a3add6..cd1c1b4a3 100644 ---- a/src/XrdOssCsi/XrdOssCsiPages.hh -+++ b/src/XrdOssCsi/XrdOssCsiPages.hh -@@ -38,6 +38,7 @@ - #include "XrdOssCsiRanges.hh" - #include - #include -+#include - #include - #include - #include --- -2.39.0 - diff --git a/0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch b/0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch deleted file mode 100644 index e17997f..0000000 --- a/0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 98265bd6b743a542e448bbfdcc61c995cb69bbe6 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 20 Oct 2022 09:02:48 +0200 -Subject: [PATCH] Check all sizes (8, 16, 32, 64) in check Check - operator++ in check Add ${ATOMIC_LIBRARY} to libXrdServer - dependencies - ---- - cmake/XRootDSystemCheck.cmake | 12 +++++------- - src/XrdServer.cmake | 1 + - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/cmake/XRootDSystemCheck.cmake b/cmake/XRootDSystemCheck.cmake -index 52f9ba641..8af868863 100644 ---- a/cmake/XRootDSystemCheck.cmake -+++ b/cmake/XRootDSystemCheck.cmake -@@ -149,13 +149,11 @@ function(check_working_cxx_atomics varname) - #include - #include - int main() { -- std::atomic a1(0); -- int a1val = a1.load(); -- (void)a1val; -- std::atomic a2(0); -- uint64_t a2val = a2.load(std::memory_order_relaxed); -- (void)a2val; -- return 0; -+ std::atomic a1; -+ std::atomic a2; -+ std::atomic a3; -+ std::atomic a4; -+ return a1++ + a2++ + a3++ + a4++; - } - " ${varname}) - set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) -diff --git a/src/XrdServer.cmake b/src/XrdServer.cmake -index 4006976d5..d5d2e4533 100644 ---- a/src/XrdServer.cmake -+++ b/src/XrdServer.cmake -@@ -191,6 +191,7 @@ target_link_libraries( - XrdUtils - ${CMAKE_DL_LIBS} - ${CMAKE_THREAD_LIBS_INIT} -+ ${ATOMIC_LIBRARY} - ${EXTRA_LIBS} - ${SOCKET_LIBRARY} ) - --- -2.37.3 - diff --git a/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch b/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch deleted file mode 100644 index 258909e..0000000 --- a/0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 898534418eda931f9a5d697117cfb9b31ed728d0 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 17 Jan 2023 10:40:42 +0100 -Subject: [PATCH] Fix build failure due to possible large memory allocation - -/builddir/build/BUILD/xrootd-5.5.1/src/XrdPosix/XrdPosixAdmin.cc: In member function 'FanOut': -/builddir/build/BUILD/xrootd-5.5.1/src/XrdPosix/XrdPosixAdmin.cc:69:27: error: argument 1 value '4294967295' exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=] - 69 | uVec = new XrdCl::URL[i]; - | ^ -/usr/include/c++/13/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 | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/XrdPosix/XrdPosixAdmin.cc b/src/XrdPosix/XrdPosixAdmin.cc -index 2cad5517e..eb8ccdecd 100644 ---- a/src/XrdPosix/XrdPosixAdmin.cc -+++ b/src/XrdPosix/XrdPosixAdmin.cc -@@ -29,6 +29,7 @@ - /******************************************************************************/ - - #include -+#include - #include - #include - #include -@@ -66,6 +67,8 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num) - // Allocate an array large enough to hold this information - // - if (!(i = info->GetSize())) {delete info; return 0;} -+ if (i > std::numeric_limits::max() / sizeof(XrdCl::URL)) -+ {delete info; return 0;} - uVec = new XrdCl::URL[i]; - - // Now start filling out the array --- -2.39.0 - diff --git a/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch b/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch deleted file mode 100644 index 6a83384..0000000 --- a/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bea744e8c1fe05e9aad12d8c86d550ef38e8bf14 Mon Sep 17 00:00:00 2001 -From: Matthew Feickert -Date: Wed, 30 Nov 2022 14:06:31 -0600 -Subject: [PATCH 1/2] feat: Use setuptools over setuptools._distutils.core - -Drop all usage of setuptools._distutils in favor of pure setuptools. -This effectively solves the problems that were present in the attempt -in https://github.com/xrootd/xrootd/pull/1585 and -https://github.com/xrootd/xrootd/pull/1700. - -Co-authored-by: Henry Schreiner ---- - bindings/python/setup.py.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in -index fbac3e6df..c5bbec503 100644 ---- a/bindings/python/setup.py.in -+++ b/bindings/python/setup.py.in -@@ -3,7 +3,7 @@ from __future__ import print_function - # setuptools._distutils added in setuptools v48.0.0 - # c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 - try: -- from setuptools._distutils.core import setup, Extension -+ from setuptools import setup, Extension - # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. - # Instead of checking setuptools.__version__ explicitly, use the knowledge that - # to get here in the 'try' block requires setuptools v48.0.0+. --- -2.39.0 - diff --git a/0002-chore-Remove-check-for-setuptools-over-distutils.patch b/0002-chore-Remove-check-for-setuptools-over-distutils.patch deleted file mode 100644 index 99ee1c8..0000000 --- a/0002-chore-Remove-check-for-setuptools-over-distutils.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8c590658cf8cd93ae837a523f2666eb07cbbcbf5 Mon Sep 17 00:00:00 2001 -From: Matthew Feickert -Date: Wed, 30 Nov 2022 14:31:34 -0600 -Subject: [PATCH 2/2] chore: Remove check for setuptools over distutils - -* Now that setuptools._distutils.core usage has been dropped, it is - possible to go further and drop direct usage of distutils - in favor of setuptools. This has already happened with the removal - of setuptools._distutils as - - > from setuptools import setup, Extension - - should always pass, and so this commit just makes this explicitly - clear by removing the try/except block. ---- - bindings/python/setup.py.in | 24 ++++++++---------------- - 1 file changed, 8 insertions(+), 16 deletions(-) - -diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in -index c5bbec503..7fb8c53f6 100644 ---- a/bindings/python/setup.py.in -+++ b/bindings/python/setup.py.in -@@ -1,22 +1,14 @@ - from __future__ import print_function - --# setuptools._distutils added in setuptools v48.0.0 --# c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 --try: -- from setuptools import setup, Extension -- # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. -- # Instead of checking setuptools.__version__ explicitly, use the knowledge that -- # to get here in the 'try' block requires setuptools v48.0.0+. -- # FIXME: When support for Python 3.6 is dropped simplify this -- import sys -- -- if sys.version_info < (3, 7): -- from distutils import sysconfig -- else: -- import sysconfig --except ImportError: -- from distutils.core import setup, Extension -+from setuptools import setup, Extension -+# sysconfig with setuptools v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. -+# FIXME: When support for Python 3.6 is dropped simplify this -+import sys -+ -+if sys.version_info < (3, 7): - from distutils import sysconfig -+else: -+ import sysconfig - - from os import getenv, walk, path - import subprocess --- -2.39.0 - diff --git a/sources b/sources index cd781dc..407922a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.5.1.tar.gz) = e929db1026d4ae8016667be1c8a939a600ef6a67a9d34d811e89061d1972103aec226cb8d3a0e6bd7706d814c901b46b6d4d763f28e92358c924520e4e754982 +SHA512 (xrootd-5.5.2.tar.gz) = 7e8691d8df5dd0047702d9a4785b1fc3c5487210044de7f448e555cf89d170feee16899419fbc45d09d95751129b04c262600ab81f33703f5a28bef789071f3d diff --git a/xrootd.spec b/xrootd.spec index 87e9135..587e15a 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,8 +13,8 @@ Name: xrootd Epoch: 1 -Version: 5.5.1 -Release: 3%{?dist} +Version: 5.5.2 +Release: 1%{?dist} Summary: Extended ROOT file server License: LGPLv3+ @@ -22,19 +22,6 @@ URL: https://xrootd.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz # Disable LTO for XrdPosix on 32 bit architectures Patch0: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch -# Check all sizes (8, 16, 32, 64) in check -# Check operator++ in check -# https://github.com/xrootd/xrootd/pull/1806 -Patch1: 0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch -# Backported from upstream -Patch2: 0001-feat-Use-setuptools-over-setuptools._distutils.core.patch -Patch3: 0002-chore-Remove-check-for-setuptools-over-distutils.patch -# Add missing include - fixes build failure with gcc 13 -# https://github.com/xrootd/xrootd/pull/1880 -Patch4: 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch -# Fix build failure due to possible large memory allocation -# https://github.com/xrootd/xrootd/pull/1881 -Patch5: 0001-Fix-build-faildure-due-to-possible-large-memory-allo.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -190,6 +177,7 @@ Summary: Private xrootd headers Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-devel%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-server-devel%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} %description private-devel This package contains some private xrootd headers. Backward and forward @@ -233,6 +221,7 @@ The VOMS attribute extractor plugin for XRootD. %package scitokens Summary: SciTokens authorization support for XRootD Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} %description scitokens This ACC (authorization) plugin for the XRootD framework utilizes the @@ -302,11 +291,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -316,9 +300,8 @@ This package contains the API documentation of the xrootd libraries. %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=restrict" %ifarch %{arm} +%set_build_flags CXXFLAGS="${CXXFLAGS} -Wno-error=stringop-overflow" %endif %endif @@ -699,6 +682,10 @@ fi %doc %{_pkgdocdir} %changelog +* Thu Feb 09 2023 Mattias Ellert - 1:5.5.2-1 +- Update to version 5.5.2 +- Drop patches accepted upstream or previously backported + * Sat Jan 21 2023 Fedora Release Engineering - 1:5.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From be730e70367d94c3833d1e7826b69ff4e13a90f7 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 18 Feb 2023 13:57:45 +0100 Subject: [PATCH 05/62] Update to version 5.5.3 --- sources | 2 +- xrootd.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 407922a..0919d2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.5.2.tar.gz) = 7e8691d8df5dd0047702d9a4785b1fc3c5487210044de7f448e555cf89d170feee16899419fbc45d09d95751129b04c262600ab81f33703f5a28bef789071f3d +SHA512 (xrootd-5.5.3.tar.gz) = b34ba2e460f4d0ac0acf82ab7424d94df07a83396a7b3e4042af880e78703a4eafb4d2135cc7769140fdc2f08bfad6ed45aabc44bd986f862da7f4a05d2a15ee diff --git a/xrootd.spec b/xrootd.spec index 587e15a..e4161b7 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.5.2 +Version: 5.5.3 Release: 1%{?dist} Summary: Extended ROOT file server @@ -232,6 +232,7 @@ 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 @@ -682,6 +683,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Feb 18 2023 Mattias Ellert - 1:5.5.3-1 +- Update to version 5.5.3 + * Thu Feb 09 2023 Mattias Ellert - 1:5.5.2-1 - Update to version 5.5.2 - Drop patches accepted upstream or previously backported From 0da0854aeb437a43ba6c8d5887db732ce2f2b8f8 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 25 Mar 2023 11:55:58 +0100 Subject: [PATCH 06/62] Update to version 5.5.4 --- sources | 2 +- xrootd.spec | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 0919d2c..4321fcc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.5.3.tar.gz) = b34ba2e460f4d0ac0acf82ab7424d94df07a83396a7b3e4042af880e78703a4eafb4d2135cc7769140fdc2f08bfad6ed45aabc44bd986f862da7f4a05d2a15ee +SHA512 (xrootd-5.5.4.tar.gz) = 1bf8fec3e20950e1dfbb5a7914c2f2b1d7d1fc1ce6b419dda129bb6cfb083ae674a14732b7b7330dee2287635749d91f8ee7e16badd71c723d189a1a44c309dd diff --git a/xrootd.spec b/xrootd.spec index e4161b7..0e5533d 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,11 +13,10 @@ Name: xrootd Epoch: 1 -Version: 5.5.3 +Version: 5.5.4 Release: 1%{?dist} Summary: Extended ROOT file server - -License: LGPLv3+ +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: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz # Disable LTO for XrdPosix on 32 bit architectures @@ -220,6 +219,7 @@ The VOMS attribute extractor plugin for XRootD. %package scitokens Summary: SciTokens authorization support for XRootD +License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -452,6 +452,8 @@ if [ $1 -eq 0 ] ; then fi %postun server +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf + if [ $1 -ge 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : for DAEMON in xrootd cmsd frm_purged frm_xfrd; do @@ -505,6 +507,7 @@ fi %attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/*.cfg %attr(-,xrootd,xrootd) %{_localstatedir}/log/%{name} %attr(-,xrootd,xrootd) %{_localstatedir}/spool/%{name} +%ghost %attr(-,xrootd,xrootd) %{_rundir}/%{name} %files selinux %{_datadir}/selinux/packages/%{name}/%{name}.pp @@ -651,7 +654,7 @@ fi %files -n xrdcl-http %{_libdir}/libXrdClHttp-5.so -%{_sysconfdir}/xrootd/client.plugins.d/xrdcl-http-plugin.conf +%config(noreplace) %{_sysconfdir}/%{name}/client.plugins.d/xrdcl-http-plugin.conf %if %{ceph} %files ceph @@ -683,6 +686,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Mar 24 2023 Mattias Ellert - 1:5.5.4-1 +- Update to version 5.5.4 + * Sat Feb 18 2023 Mattias Ellert - 1:5.5.3-1 - Update to version 5.5.3 From 4a1d594f3f7298e4a2ff9ecfd662555925a8e89a Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 9 May 2023 13:27:27 +0200 Subject: [PATCH 07/62] Update to version 5.5.5 --- sources | 2 +- xrootd.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4321fcc..cf5449f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.5.4.tar.gz) = 1bf8fec3e20950e1dfbb5a7914c2f2b1d7d1fc1ce6b419dda129bb6cfb083ae674a14732b7b7330dee2287635749d91f8ee7e16badd71c723d189a1a44c309dd +SHA512 (xrootd-5.5.5.tar.gz) = 864b4fe686c0a618a2672b624b7c5a00a4e87b4bd97842f8e25666b48a23f01e7d91d926013e9f435fb439a9c464ebbca8818720ec6c067c04d0603d1381cdba diff --git a/xrootd.spec b/xrootd.spec index 0e5533d..d1c09ce 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.5.4 +Version: 5.5.5 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 @@ -686,6 +686,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue May 09 2023 Mattias Ellert - 1:5.5.5-1 +- Update to version 5.5.5 + * Fri Mar 24 2023 Mattias Ellert - 1:5.5.4-1 - Update to version 5.5.4 From 2f935113964e72cdaae5a5fc224af1cbfe520bb6 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 21 May 2023 12:39:10 +0200 Subject: [PATCH 08/62] Fix build failure with latest glibc --- ...es-to-glibc-headers-adds-__nonnull-t.patch | 71 +++++++++++++++++++ xrootd.spec | 9 ++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch diff --git a/0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch b/0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch new file mode 100644 index 0000000..6d9124c --- /dev/null +++ b/0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch @@ -0,0 +1,71 @@ +From 89c2857a45e789134d74ed07445cf33c6946ec9e Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sun, 21 May 2023 09:16:14 +0200 +Subject: [PATCH] The latest updates to glibc headers adds __nonnull to the + fclose() + +Declaration in old version: + +extern int fclose (FILE *__stream); + +Declaration in new version: + +extern int fclose (FILE *__stream) __nonnull ((1)); + +This change causes a compilation error in xrootd: + +/builddir/build/BUILD/xrootd-5.5.5/src/XrdTls/XrdTlsTempCA.cc:54:48: error: ignoring attributes on template argument 'int (*)(FILE*)' [-Werror=ignored-attributes] + 54 | typedef std::unique_ptr file_smart_ptr; + | ^ + +This commit rewrites the code so the error is not triggered. +--- + src/XrdTls/XrdTlsTempCA.cc | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/XrdTls/XrdTlsTempCA.cc b/src/XrdTls/XrdTlsTempCA.cc +index 37431dee9..f01938df9 100644 +--- a/src/XrdTls/XrdTlsTempCA.cc ++++ b/src/XrdTls/XrdTlsTempCA.cc +@@ -50,8 +50,9 @@ + #include + + namespace { +- +-typedef std::unique_ptr file_smart_ptr; ++ ++static void FClose(FILE *f) {fclose(f);} ++typedef std::unique_ptr file_smart_ptr; + + + static uint64_t monotonic_time_s() { +@@ -101,7 +102,7 @@ CASet::processFile(file_smart_ptr &fp, const std::string &fname) + XrdCryptosslX509ParseFile(fp.get(), &chain, fname.c_str()); + + auto ca = chain.Begin(); +- file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &fclose); ++ file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &FClose); + if (!outputfp.get()) { + m_log.Emsg("CAset", "Failed to reopen file for output", fname.c_str()); + chain.Cleanup(); +@@ -177,7 +178,7 @@ private: + bool + CRLSet::processFile(file_smart_ptr &fp, const std::string &fname) + { +- file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &fclose); ++ file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &FClose); + if (!outputfp.get()) { + m_log.Emsg("CAset", "Failed to reopen file for output", fname.c_str()); + return false; +@@ -399,7 +400,7 @@ XrdTlsTempCA::Maintenance() + closedir(dirp); + return false; + } +- file_smart_ptr fp(fdopen(fd, "r"), &fclose); ++ file_smart_ptr fp(fdopen(fd, "r"), &FClose); + + if (!ca_builder.processFile(fp, result->d_name)) { + m_log.Emsg("Maintenance", "Failed to process file for CAs", result->d_name); +-- +2.40.1 + diff --git a/xrootd.spec b/xrootd.spec index d1c09ce..f1359a0 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,13 +14,16 @@ Name: xrootd Epoch: 1 Version: 5.5.5 -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: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz # Disable LTO for XrdPosix on 32 bit architectures Patch0: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch +# Fix build failure with latest glibc +# https://github.com/xrootd/xrootd/pull/2012 +Patch1: 0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -292,6 +295,7 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -686,6 +690,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sun May 21 2023 Mattias Ellert - 1:5.5.5-2 +- Fix build failure with latest glibc + * Tue May 09 2023 Mattias Ellert - 1:5.5.5-1 - Update to version 5.5.5 From 218ba7242827d698cebceeed9f8bf13e2da746f1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 23:12:00 +0200 Subject: [PATCH 09/62] Rebuilt for Python 3.12 --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index f1359a0..a777292 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.5.5 -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/ @@ -690,6 +690,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Jun 14 2023 Python Maint - 1:5.5.5-3 +- Rebuilt for Python 3.12 + * Sun May 21 2023 Mattias Ellert - 1:5.5.5-2 - Fix build failure with latest glibc From 3f77bfd6e401bef0e30d1952c145575d0e7991f8 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 3 Jul 2023 11:17:30 +0200 Subject: [PATCH 10/62] Update to version 5.6.0 Drop patches (changes implemented upstream) --- ...for-XrdPosix-on-32-bit-architectures.patch | 27 ------- ...es-to-glibc-headers-adds-__nonnull-t.patch | 71 ------------------- sources | 2 +- xrootd.spec | 15 ++-- 4 files changed, 7 insertions(+), 108 deletions(-) delete mode 100644 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch delete mode 100644 0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch diff --git a/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch b/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch deleted file mode 100644 index 06010de..0000000 --- a/0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fdb74096242e76427b64c0f82dba77b05e611ad9 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -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-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch b/0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch deleted file mode 100644 index 6d9124c..0000000 --- a/0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 89c2857a45e789134d74ed07445cf33c6946ec9e Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sun, 21 May 2023 09:16:14 +0200 -Subject: [PATCH] The latest updates to glibc headers adds __nonnull to the - fclose() - -Declaration in old version: - -extern int fclose (FILE *__stream); - -Declaration in new version: - -extern int fclose (FILE *__stream) __nonnull ((1)); - -This change causes a compilation error in xrootd: - -/builddir/build/BUILD/xrootd-5.5.5/src/XrdTls/XrdTlsTempCA.cc:54:48: error: ignoring attributes on template argument 'int (*)(FILE*)' [-Werror=ignored-attributes] - 54 | typedef std::unique_ptr file_smart_ptr; - | ^ - -This commit rewrites the code so the error is not triggered. ---- - src/XrdTls/XrdTlsTempCA.cc | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/src/XrdTls/XrdTlsTempCA.cc b/src/XrdTls/XrdTlsTempCA.cc -index 37431dee9..f01938df9 100644 ---- a/src/XrdTls/XrdTlsTempCA.cc -+++ b/src/XrdTls/XrdTlsTempCA.cc -@@ -50,8 +50,9 @@ - #include - - namespace { -- --typedef std::unique_ptr file_smart_ptr; -+ -+static void FClose(FILE *f) {fclose(f);} -+typedef std::unique_ptr file_smart_ptr; - - - static uint64_t monotonic_time_s() { -@@ -101,7 +102,7 @@ CASet::processFile(file_smart_ptr &fp, const std::string &fname) - XrdCryptosslX509ParseFile(fp.get(), &chain, fname.c_str()); - - auto ca = chain.Begin(); -- file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &fclose); -+ file_smart_ptr outputfp(fdopen(XrdSysFD_Dup(m_output_fd), "w"), &FClose); - if (!outputfp.get()) { - m_log.Emsg("CAset", "Failed to reopen file for output", fname.c_str()); - chain.Cleanup(); -@@ -177,7 +178,7 @@ private: - bool - CRLSet::processFile(file_smart_ptr &fp, const std::string &fname) - { -- file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &fclose); -+ file_smart_ptr outputfp(fdopen(dup(m_output_fd), "w"), &FClose); - if (!outputfp.get()) { - m_log.Emsg("CAset", "Failed to reopen file for output", fname.c_str()); - return false; -@@ -399,7 +400,7 @@ XrdTlsTempCA::Maintenance() - closedir(dirp); - return false; - } -- file_smart_ptr fp(fdopen(fd, "r"), &fclose); -+ file_smart_ptr fp(fdopen(fd, "r"), &FClose); - - if (!ca_builder.processFile(fp, result->d_name)) { - m_log.Emsg("Maintenance", "Failed to process file for CAs", result->d_name); --- -2.40.1 - diff --git a/sources b/sources index cf5449f..8868478 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.5.5.tar.gz) = 864b4fe686c0a618a2672b624b7c5a00a4e87b4bd97842f8e25666b48a23f01e7d91d926013e9f435fb439a9c464ebbca8818720ec6c067c04d0603d1381cdba +SHA512 (xrootd-5.6.0.tar.gz) = 98119f51eecc16551c7f69147dd736df2632d77983bb6090c5452cb08faf6413bd1c3a54a8bd158af2ccff404b95e7e0b1ef1b2f65651b9d4a64b2dc5895dd12 diff --git a/xrootd.spec b/xrootd.spec index a777292..c93a819 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,17 +13,12 @@ Name: xrootd Epoch: 1 -Version: 5.5.5 -Release: 3%{?dist} +Version: 5.6.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: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz -# Disable LTO for XrdPosix on 32 bit architectures -Patch0: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch -# Fix build failure with latest glibc -# https://github.com/xrootd/xrootd/pull/2012 -Patch1: 0001-The-latest-updates-to-glibc-headers-adds-__nonnull-t.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -294,8 +289,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch0 -p1 -%patch1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -690,6 +683,10 @@ fi %doc %{_pkgdocdir} %changelog +* Sun Jul 02 2023 Mattias Ellert - 1:5.6.0-1 +- Update to version 5.6.0 +- Drop patches (changes implemented upstream) + * Wed Jun 14 2023 Python Maint - 1:5.5.5-3 - Rebuilt for Python 3.12 From 5b0f89fc4c700852f1271593a0f744014ff07ef4 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 12 Jul 2023 15:55:30 +0200 Subject: [PATCH 11/62] Update to version 5.6.1 Add --use-pep517 --no-build-isolation to pip options for Fedora and EPEL 9+ --- sources | 2 +- xrootd.spec | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8868478..94c58ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.0.tar.gz) = 98119f51eecc16551c7f69147dd736df2632d77983bb6090c5452cb08faf6413bd1c3a54a8bd158af2ccff404b95e7e0b1ef1b2f65651b9d4a64b2dc5895dd12 +SHA512 (xrootd-5.6.1.tar.gz) = dc4881a5122654c6dc54f40c99eb0794c0b493e1bbcb6e8574b82105e7c1a10e4dbc0fffb004e58c90cbe1da813856ea21e31aa07937e0f0bf0f58dc3a9c9752 diff --git a/xrootd.spec b/xrootd.spec index c93a819..00c5189 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.6.0 +Version: 5.6.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 @@ -308,8 +308,11 @@ CXXFLAGS="${CXXFLAGS} -Wno-error=stringop-overflow" %if %{ceph} -DXRDCEPH_SUBMODULE:BOOL=ON \ %endif - -DENABLE_XRDCLHTTP:BOOL=ON \ +%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 @@ -683,6 +686,10 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Jul 12 2023 Mattias Ellert - 1:5.6.1-1 +- Update to version 5.6.1 +- Add --use-pep517 --no-build-isolation to pip options for Fedora and EPEL 9+ + * Sun Jul 02 2023 Mattias Ellert - 1:5.6.0-1 - Update to version 5.6.0 - Drop patches (changes implemented upstream) From cc79f998e799aa470e3905ac4679590b0b69982a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 19:17:12 +0000 Subject: [PATCH 12/62] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xrootd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xrootd.spec b/xrootd.spec index 00c5189..72e9bca 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.6.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.slac.stanford.edu/ @@ -686,6 +686,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1:5.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 12 2023 Mattias Ellert - 1:5.6.1-1 - Update to version 5.6.1 - Add --use-pep517 --no-build-isolation to pip options for Fedora and EPEL 9+ From 952cde512cc9553f7708ef490c9118f6e9189604 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 16 Sep 2023 15:12:10 +0200 Subject: [PATCH 13/62] Update to version 5.6.2 --- ...-spelling-errors-reported-by-lintian.patch | 159 ++++++++++++++++++ sources | 2 +- xrootd.spec | 22 ++- 3 files changed, 177 insertions(+), 6 deletions(-) create mode 100644 0001-Fix-spelling-errors-reported-by-lintian.patch diff --git a/0001-Fix-spelling-errors-reported-by-lintian.patch b/0001-Fix-spelling-errors-reported-by-lintian.patch new file mode 100644 index 0000000..a23e1a2 --- /dev/null +++ b/0001-Fix-spelling-errors-reported-by-lintian.patch @@ -0,0 +1,159 @@ +From ec4946fad83a88f508bdb4b826ade88b73580e45 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 16 Sep 2023 13:19:23 +0200 +Subject: [PATCH] Fix spelling errors reported by lintian + +--- + src/XrdApps/XrdClRecordPlugin/README.md | 8 ++++---- + src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh | 2 +- + src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc | 8 ++++---- + src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh | 4 ++-- + src/XrdFfs/XrdFfsPosix.cc | 2 +- + src/XrdOuc/XrdOucProg.cc | 4 ++-- + 6 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/XrdApps/XrdClRecordPlugin/README.md b/src/XrdApps/XrdClRecordPlugin/README.md +index 8ba35867f..5e878a5c0 100644 +--- a/src/XrdApps/XrdClRecordPlugin/README.md ++++ b/src/XrdApps/XrdClRecordPlugin/README.md +@@ -32,7 +32,7 @@ _________________ + + The **xrdreplay** application provides the following operation modes: + * print mode (-p) : display runtime and IO statistics for a record file +-* verify mode (-v) : verify the existance of the required input files for a record file ++* verify mode (-v) : verify the existence of the required input files for a record file + * creation mode (-c,-t) : create the required input data using file creation and write the minimal required size (-c) or truncate files to the minimal required size (-t) + * playback mode (default) : replay a given record file + +@@ -113,7 +113,7 @@ xrdreplay -v recording.cvs + # size: 536.87 MB [ 0 B out of 536.87 MB ] ( 0.00% ) + # ---> info: file exists and has sufficient size + ``` +-On success the shell returns 0, if there was a missing, too small or inaccesible file it returns -5 (251). ++On success the shell returns 0, if there was a missing, too small or inaccessible file it returns -5 (251). + + ```bash + Warning: xrdreplay considers a file only as an input file if it has no bytes written. +@@ -250,12 +250,12 @@ usage: xrdreplay [-p|--print] [-c|--create-data] [t|--truncate-data] [-l|--long] + -p | --print : print only mode - shows all the IO for the given replay file without actually running any IO + -s | --summary : print summary - shows all the aggregated IO counter summed for all files + -l | --long : print long - show all file IO counter for each individual file +- -v | --verify : verify the existance of all input files ++ -v | --verify : verify the existence of all input files + -x | --speed : change playback speed by factor [ > 0.0 ] + -r | --replace := : replace in the argument list the string with + - option is usable several times e.g. to change storage prefixes or filenames + +- [recordfilename] : if a file is given, it will be used as record input otherwhise STDIN is used to read records! ++ [recordfilename] : if a file is given, it will be used as record input otherwise STDIN is used to read records! + example: ... --replace file:://localhost:=root://xrootd.eu/ : redirect local file to remote + ``` + +diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh b/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh +index e5802b771..6d7351257 100644 +--- a/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh ++++ b/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh +@@ -65,7 +65,7 @@ struct ActionMetrics + + std::string cnt = i + "::n"; // IOPS + std::string vol = i + "::b"; // number of bytes +- std::string err = i + "::e"; // number of unsuccessfull IOs ++ std::string err = i + "::e"; // number of unsuccessful IOs + std::string off = i + "::o"; // maximum offset seen + + ios[cnt] = 0; +diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc b/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc +index b5abbd7b3..4e884dcb4 100644 +--- a/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc ++++ b/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc +@@ -247,7 +247,7 @@ bool AssureFile(const std::string& url, uint64_t size, bool viatruncate, bool ve + + if (verify) + { +- std::cerr << "Verify: file is missing or inaccesible: " << url << std::endl; ++ std::cerr << "Verify: file is missing or inaccessible: " << url << std::endl; + return false; + } + +@@ -1079,7 +1079,7 @@ void usage() + << " -f | --suppress : force to run all IO with all successful result status - suppress all others" + << std::endl; + std::cerr +- << " - by default the player won't run with an unsuccessfull recorded IO" ++ << " - by default the player won't run with an unsuccessfully recorded IO" + << std::endl; + std::cerr << std::endl; + std::cerr +@@ -1145,10 +1145,10 @@ int main(int argc, char** argv) + + if (sampling_error) + { +- std::cerr << "Warning: IO file contains unsuccessfull samples!" << std::endl; ++ std::cerr << "Warning: IO file contains unsuccessful samples!" << std::endl; + if (!opt.suppress_error()) + { +- std::cerr << "... run with [-f] or [--suppress] option to suppress unsuccessfull IO events!" ++ std::cerr << "... run with [-f] or [--suppress] option to suppress unsuccessful IO events!" + << std::endl; + exit(-1); + } +diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh b/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh +index 04edb34fb..898386b93 100644 +--- a/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh ++++ b/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh +@@ -163,7 +163,7 @@ class ReplayArgs + std::cerr + << " -l | --long : print long - show all file IO counter for each individual file" + << std::endl; +- std::cerr << " -v | --verify : verify the existance of all input files" ++ std::cerr << " -v | --verify : verify the existence of all input files" + << std::endl; + std::cerr + << " -x | --speed : change playback speed by factor [ > 0.0 ]" +@@ -176,7 +176,7 @@ class ReplayArgs + << std::endl; + std::cerr << std::endl; + std::cerr +- << " [recordfilename] : if a file is given, it will be used as record input otherwhise STDIN is used to read records!" ++ << " [recordfilename] : if a file is given, it will be used as record input otherwise STDIN is used to read records!" + << std::endl; + std::cerr + << "example: ... --replace file:://localhost:=root://xrootd.eu/ : redirect local file to remote" +diff --git a/src/XrdFfs/XrdFfsPosix.cc b/src/XrdFfs/XrdFfsPosix.cc +index b6615db36..209734467 100644 +--- a/src/XrdFfs/XrdFfsPosix.cc ++++ b/src/XrdFfs/XrdFfsPosix.cc +@@ -439,7 +439,7 @@ struct XrdFfsPosixX_readdirall_args { + NULL in this case. + + Do we need some protection here? We are not in trouble so far +- because FUSE's _getattr will test the existance of the dir ++ because FUSE's _getattr will test the existence of the dir + so we know that at least one data server has the directory. + */ + void* XrdFfsPosix_x_readdirall(void* x) +diff --git a/src/XrdOuc/XrdOucProg.cc b/src/XrdOuc/XrdOucProg.cc +index 9a258d804..39a552932 100644 +--- a/src/XrdOuc/XrdOucProg.cc ++++ b/src/XrdOuc/XrdOucProg.cc +@@ -313,7 +313,7 @@ int XrdOucProg::Setup(const char *prog, XrdSysError *errP, + if (rc <= 0) + {if (errP) + {if (!rc || !argV[0]) +- {const char *pgm = (Proc ? "proceedure" : "program"); ++ {const char *pgm = (Proc ? "procedure" : "program"); + errP->Emsg("Run", pgm, "name not specified."); + } else errP->Emsg("Run", rc, "set up", argV[0]); + } +@@ -321,7 +321,7 @@ int XrdOucProg::Setup(const char *prog, XrdSysError *errP, + } + + // Record the arguments including the phamtom null pointer. We must have +-// atleast one, the program or proceedure name. ++// atleast one, the program or procedure name. + // + numArgs = rc; + Arg = new char*[rc+1]; +-- +2.41.0 + diff --git a/sources b/sources index 94c58ec..1f4ba16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.1.tar.gz) = dc4881a5122654c6dc54f40c99eb0794c0b493e1bbcb6e8574b82105e7c1a10e4dbc0fffb004e58c90cbe1da813856ea21e31aa07937e0f0bf0f58dc3a9c9752 +SHA512 (xrootd-5.6.2.tar.gz) = 53ee1f7eaf5bd61dcc6345be0193679daa76300cd5fc15e54e622e2c05cf5a312d924c6e7fe3bfb91e9d2aff8feeb9faee87259e9c2ff33bb52d1add7ec13394 diff --git a/xrootd.spec b/xrootd.spec index 72e9bca..a6cdb5b 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,18 +13,21 @@ Name: xrootd Epoch: 1 -Version: 5.6.1 -Release: 2%{?dist} +Version: 5.6.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.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz +# https://github.com/xrootd/xrootd/pull/2087 +Patch0: 0001-Fix-spelling-errors-reported-by-lintian.patch + %if %{?rhel}%{!?rhel:0} == 7 -BuildRequires: cmake3 >= 3.6 +BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain %else -BuildRequires: cmake >= 3.6 +BuildRequires: cmake BuildRequires: gcc-c++ %endif BuildRequires: make @@ -50,6 +53,11 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-sphinx +%if %{?fedora}%{!?fedora:0} +BuildRequires: python3-sphinx-mdinclude +%else +BuildRequires: python3-m2r +%endif %endif %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: python2-devel @@ -66,7 +74,7 @@ BuildRequires: python2-sphinx BuildRequires: json-c-devel BuildRequires: libmacaroons-devel BuildRequires: libuuid-devel -BuildRequires: voms-devel >= 2.0.6 +BuildRequires: voms-devel BuildRequires: scitokens-cpp-devel BuildRequires: davix-devel %if %{ceph} @@ -289,6 +297,7 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P 0 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -686,6 +695,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Sep 15 2023 Mattias Ellert - 1:5.6.2-1 +- Update to version 5.6.2 + * Sat Jul 22 2023 Fedora Release Engineering - 1:5.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From b887d840a625374d62b547e93cde984d1dc17348 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 18 Sep 2023 15:21:15 +0200 Subject: [PATCH 14/62] Backport fix for Authfile parsing regression --- ...rect-patch-for-authfile-that-made-5..patch | 27 +++++++++++++++++++ xrootd.spec | 8 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch diff --git a/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch b/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch new file mode 100644 index 0000000..7d0a3fb --- /dev/null +++ b/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch @@ -0,0 +1,27 @@ +From d5f600834da7fbbb47477a7267609eefc74f8033 Mon Sep 17 00:00:00 2001 +From: Andrew Hanushevsky +Date: Mon, 18 Sep 2023 00:39:29 -0700 +Subject: [PATCH 2/2] [Server] Fix incorrect patch for authfile that made 5.6.2 + fail. + +Fixes: #2088, 478ad4b4. +--- + src/XrdAcc/XrdAccAuthFile.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XrdAcc/XrdAccAuthFile.cc b/src/XrdAcc/XrdAccAuthFile.cc +index 1f4c45477..8b738baa7 100644 +--- a/src/XrdAcc/XrdAccAuthFile.cc ++++ b/src/XrdAcc/XrdAccAuthFile.cc +@@ -161,7 +161,7 @@ char XrdAccAuthFile::getID(char **id) + // two character specification but only validate the first to be backward + // compatible. + // +- if (strlen(pp) <= 2 || !index("ghoru", *pp)) ++ if (strlen(pp) > 2 || !index("ghoru", *pp)) + {Eroute->Emsg("AuthFile", "Invalid ID sprecifier -", pp); + flags = (DBflags)(flags | dbError); + return 0; +-- +2.41.0 + diff --git a/xrootd.spec b/xrootd.spec index a6cdb5b..40a5931 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.6.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.slac.stanford.edu/ @@ -22,6 +22,8 @@ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version # https://github.com/xrootd/xrootd/pull/2087 Patch0: 0001-Fix-spelling-errors-reported-by-lintian.patch +# https://github.com/xrootd/xrootd/issues/2088 +Patch1: 0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 @@ -298,6 +300,7 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch -P 0 -p1 +%patch -P 1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -695,6 +698,9 @@ fi %doc %{_pkgdocdir} %changelog +* Mon Sep 18 2023 Mattias Ellert - 1:5.6.2-2 +- Backport fix for Authfile parsing regression + * Fri Sep 15 2023 Mattias Ellert - 1:5.6.2-1 - Update to version 5.6.2 From 534722bfd519fd48f8d0592d06978791e31b3073 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 28 Oct 2023 09:21:11 +0200 Subject: [PATCH 15/62] Update to version 5.6.3 Drop patches accepted upstream or previously backported Enable tests and add check section --- ...-spelling-errors-reported-by-lintian.patch | 159 ------------------ ...rect-patch-for-authfile-that-made-5..patch | 27 --- sources | 2 +- xrootd.spec | 45 +++-- 4 files changed, 23 insertions(+), 210 deletions(-) delete mode 100644 0001-Fix-spelling-errors-reported-by-lintian.patch delete mode 100644 0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch diff --git a/0001-Fix-spelling-errors-reported-by-lintian.patch b/0001-Fix-spelling-errors-reported-by-lintian.patch deleted file mode 100644 index a23e1a2..0000000 --- a/0001-Fix-spelling-errors-reported-by-lintian.patch +++ /dev/null @@ -1,159 +0,0 @@ -From ec4946fad83a88f508bdb4b826ade88b73580e45 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 16 Sep 2023 13:19:23 +0200 -Subject: [PATCH] Fix spelling errors reported by lintian - ---- - src/XrdApps/XrdClRecordPlugin/README.md | 8 ++++---- - src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh | 2 +- - src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc | 8 ++++---- - src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh | 4 ++-- - src/XrdFfs/XrdFfsPosix.cc | 2 +- - src/XrdOuc/XrdOucProg.cc | 4 ++-- - 6 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/src/XrdApps/XrdClRecordPlugin/README.md b/src/XrdApps/XrdClRecordPlugin/README.md -index 8ba35867f..5e878a5c0 100644 ---- a/src/XrdApps/XrdClRecordPlugin/README.md -+++ b/src/XrdApps/XrdClRecordPlugin/README.md -@@ -32,7 +32,7 @@ _________________ - - The **xrdreplay** application provides the following operation modes: - * print mode (-p) : display runtime and IO statistics for a record file --* verify mode (-v) : verify the existance of the required input files for a record file -+* verify mode (-v) : verify the existence of the required input files for a record file - * creation mode (-c,-t) : create the required input data using file creation and write the minimal required size (-c) or truncate files to the minimal required size (-t) - * playback mode (default) : replay a given record file - -@@ -113,7 +113,7 @@ xrdreplay -v recording.cvs - # size: 536.87 MB [ 0 B out of 536.87 MB ] ( 0.00% ) - # ---> info: file exists and has sufficient size - ``` --On success the shell returns 0, if there was a missing, too small or inaccesible file it returns -5 (251). -+On success the shell returns 0, if there was a missing, too small or inaccessible file it returns -5 (251). - - ```bash - Warning: xrdreplay considers a file only as an input file if it has no bytes written. -@@ -250,12 +250,12 @@ usage: xrdreplay [-p|--print] [-c|--create-data] [t|--truncate-data] [-l|--long] - -p | --print : print only mode - shows all the IO for the given replay file without actually running any IO - -s | --summary : print summary - shows all the aggregated IO counter summed for all files - -l | --long : print long - show all file IO counter for each individual file -- -v | --verify : verify the existance of all input files -+ -v | --verify : verify the existence of all input files - -x | --speed : change playback speed by factor [ > 0.0 ] - -r | --replace := : replace in the argument list the string with - - option is usable several times e.g. to change storage prefixes or filenames - -- [recordfilename] : if a file is given, it will be used as record input otherwhise STDIN is used to read records! -+ [recordfilename] : if a file is given, it will be used as record input otherwise STDIN is used to read records! - example: ... --replace file:://localhost:=root://xrootd.eu/ : redirect local file to remote - ``` - -diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh b/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh -index e5802b771..6d7351257 100644 ---- a/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh -+++ b/src/XrdApps/XrdClRecordPlugin/XrdClActionMetrics.hh -@@ -65,7 +65,7 @@ struct ActionMetrics - - std::string cnt = i + "::n"; // IOPS - std::string vol = i + "::b"; // number of bytes -- std::string err = i + "::e"; // number of unsuccessfull IOs -+ std::string err = i + "::e"; // number of unsuccessful IOs - std::string off = i + "::o"; // maximum offset seen - - ios[cnt] = 0; -diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc b/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc -index b5abbd7b3..4e884dcb4 100644 ---- a/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc -+++ b/src/XrdApps/XrdClRecordPlugin/XrdClReplay.cc -@@ -247,7 +247,7 @@ bool AssureFile(const std::string& url, uint64_t size, bool viatruncate, bool ve - - if (verify) - { -- std::cerr << "Verify: file is missing or inaccesible: " << url << std::endl; -+ std::cerr << "Verify: file is missing or inaccessible: " << url << std::endl; - return false; - } - -@@ -1079,7 +1079,7 @@ void usage() - << " -f | --suppress : force to run all IO with all successful result status - suppress all others" - << std::endl; - std::cerr -- << " - by default the player won't run with an unsuccessfull recorded IO" -+ << " - by default the player won't run with an unsuccessfully recorded IO" - << std::endl; - std::cerr << std::endl; - std::cerr -@@ -1145,10 +1145,10 @@ int main(int argc, char** argv) - - if (sampling_error) - { -- std::cerr << "Warning: IO file contains unsuccessfull samples!" << std::endl; -+ std::cerr << "Warning: IO file contains unsuccessful samples!" << std::endl; - if (!opt.suppress_error()) - { -- std::cerr << "... run with [-f] or [--suppress] option to suppress unsuccessfull IO events!" -+ std::cerr << "... run with [-f] or [--suppress] option to suppress unsuccessful IO events!" - << std::endl; - exit(-1); - } -diff --git a/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh b/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh -index 04edb34fb..898386b93 100644 ---- a/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh -+++ b/src/XrdApps/XrdClRecordPlugin/XrdClReplayArgs.hh -@@ -163,7 +163,7 @@ class ReplayArgs - std::cerr - << " -l | --long : print long - show all file IO counter for each individual file" - << std::endl; -- std::cerr << " -v | --verify : verify the existance of all input files" -+ std::cerr << " -v | --verify : verify the existence of all input files" - << std::endl; - std::cerr - << " -x | --speed : change playback speed by factor [ > 0.0 ]" -@@ -176,7 +176,7 @@ class ReplayArgs - << std::endl; - std::cerr << std::endl; - std::cerr -- << " [recordfilename] : if a file is given, it will be used as record input otherwhise STDIN is used to read records!" -+ << " [recordfilename] : if a file is given, it will be used as record input otherwise STDIN is used to read records!" - << std::endl; - std::cerr - << "example: ... --replace file:://localhost:=root://xrootd.eu/ : redirect local file to remote" -diff --git a/src/XrdFfs/XrdFfsPosix.cc b/src/XrdFfs/XrdFfsPosix.cc -index b6615db36..209734467 100644 ---- a/src/XrdFfs/XrdFfsPosix.cc -+++ b/src/XrdFfs/XrdFfsPosix.cc -@@ -439,7 +439,7 @@ struct XrdFfsPosixX_readdirall_args { - NULL in this case. - - Do we need some protection here? We are not in trouble so far -- because FUSE's _getattr will test the existance of the dir -+ because FUSE's _getattr will test the existence of the dir - so we know that at least one data server has the directory. - */ - void* XrdFfsPosix_x_readdirall(void* x) -diff --git a/src/XrdOuc/XrdOucProg.cc b/src/XrdOuc/XrdOucProg.cc -index 9a258d804..39a552932 100644 ---- a/src/XrdOuc/XrdOucProg.cc -+++ b/src/XrdOuc/XrdOucProg.cc -@@ -313,7 +313,7 @@ int XrdOucProg::Setup(const char *prog, XrdSysError *errP, - if (rc <= 0) - {if (errP) - {if (!rc || !argV[0]) -- {const char *pgm = (Proc ? "proceedure" : "program"); -+ {const char *pgm = (Proc ? "procedure" : "program"); - errP->Emsg("Run", pgm, "name not specified."); - } else errP->Emsg("Run", rc, "set up", argV[0]); - } -@@ -321,7 +321,7 @@ int XrdOucProg::Setup(const char *prog, XrdSysError *errP, - } - - // Record the arguments including the phamtom null pointer. We must have --// atleast one, the program or proceedure name. -+// atleast one, the program or procedure name. - // - numArgs = rc; - Arg = new char*[rc+1]; --- -2.41.0 - diff --git a/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch b/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch deleted file mode 100644 index 7d0a3fb..0000000 --- a/0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch +++ /dev/null @@ -1,27 +0,0 @@ -From d5f600834da7fbbb47477a7267609eefc74f8033 Mon Sep 17 00:00:00 2001 -From: Andrew Hanushevsky -Date: Mon, 18 Sep 2023 00:39:29 -0700 -Subject: [PATCH 2/2] [Server] Fix incorrect patch for authfile that made 5.6.2 - fail. - -Fixes: #2088, 478ad4b4. ---- - src/XrdAcc/XrdAccAuthFile.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdAcc/XrdAccAuthFile.cc b/src/XrdAcc/XrdAccAuthFile.cc -index 1f4c45477..8b738baa7 100644 ---- a/src/XrdAcc/XrdAccAuthFile.cc -+++ b/src/XrdAcc/XrdAccAuthFile.cc -@@ -161,7 +161,7 @@ char XrdAccAuthFile::getID(char **id) - // two character specification but only validate the first to be backward - // compatible. - // -- if (strlen(pp) <= 2 || !index("ghoru", *pp)) -+ if (strlen(pp) > 2 || !index("ghoru", *pp)) - {Eroute->Emsg("AuthFile", "Invalid ID sprecifier -", pp); - flags = (DBflags)(flags | dbError); - return 0; --- -2.41.0 - diff --git a/sources b/sources index 1f4ba16..162c0f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.2.tar.gz) = 53ee1f7eaf5bd61dcc6345be0193679daa76300cd5fc15e54e622e2c05cf5a312d924c6e7fe3bfb91e9d2aff8feeb9faee87259e9c2ff33bb52d1add7ec13394 +SHA512 (xrootd-5.6.3.tar.gz) = 72a875064181225deef57eae89c651696a083896d7bd26099c7dd321097c2b90acef42dc1c4ef55334f0ff9b6d33bf0a82e3c9d92511b69b955fbdadeff4b625 diff --git a/xrootd.spec b/xrootd.spec index 40a5931..8d324e9 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,18 +13,13 @@ Name: xrootd Epoch: 1 -Version: 5.6.2 -Release: 2%{?dist} +Version: 5.6.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.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz -# https://github.com/xrootd/xrootd/pull/2087 -Patch0: 0001-Fix-spelling-errors-reported-by-lintian.patch -# https://github.com/xrootd/xrootd/issues/2088 -Patch1: 0002-Server-Fix-incorrect-patch-for-authfile-that-made-5..patch - %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain @@ -55,11 +50,6 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-sphinx -%if %{?fedora}%{!?fedora:0} -BuildRequires: python3-sphinx-mdinclude -%else -BuildRequires: python3-m2r -%endif %endif %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: python2-devel @@ -83,6 +73,9 @@ BuildRequires: davix-devel BuildRequires: librados-devel BuildRequires: libradosstriper-devel %endif +BuildRequires: cppunit-devel +BuildRequires: gtest-devel +BuildRequires: openssl Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-selinux = %{epoch}:%{version}-%{release} @@ -299,24 +292,15 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P 0 -p1 -%patch -P 1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 . /opt/rh/devtoolset-7/enable %endif -%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 -%ifarch %{arm} -%set_build_flags -CXXFLAGS="${CXXFLAGS} -Wno-error=stringop-overflow" -%endif -%endif - %cmake3 \ + -DFORCE_ENABLED:BOOL=ON \ + -DENABLE_TESTS:BOOL=ON \ %if %{ceph} -DXRDCEPH_SUBMODULE:BOOL=ON \ %endif @@ -345,6 +329,13 @@ doxygen Doxyfile 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}%{python3_sitearch}/xrootd-*.*-info/direct_url.json rm -f %{buildroot}%{python3_sitearch}/xrootd-*.*-info/RECORD [ -r %{buildroot}%{python3_sitearch}/xrootd-*.*-info/INSTALLER ] && \ @@ -437,6 +428,9 @@ cp -pr doxydoc/html %{buildroot}%{_pkgdocdir} cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo +%check +%ctest3 + %ldconfig_scriptlets libs %ldconfig_scriptlets client-libs @@ -698,6 +692,11 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Oct 27 2023 Mattias Ellert - 1:5.6.3-1 +- Update to version 5.6.3 +- Drop patches accepted upstream or previously backported +- Enable tests and add check section + * Mon Sep 18 2023 Mattias Ellert - 1:5.6.2-2 - Backport fix for Authfile parsing regression From 3aad3e6c6612b1ba722c458cee106854a5b0bd04 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 19 Nov 2023 21:55:18 +0100 Subject: [PATCH 16/62] Enable erasure code support (XrdEc) --- 0001-Fix-maybe-uninitialized-warning.patch | 34 ++++++++ ...open-called-with-wrong-flags-in-test.patch | 80 +++++++++++++++++++ ...ake-files-are-now-generated-and-cont.patch | 64 +++++++++++++++ ...TH_MAX-MAXPATHLEN-might-be-undefined.patch | 64 +++++++++++++++ ...t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch | 63 +++++++++++++++ xrootd.spec | 43 +++++++++- 6 files changed, 345 insertions(+), 3 deletions(-) create mode 100644 0001-Fix-maybe-uninitialized-warning.patch create mode 100644 0001-Posix-open-called-with-wrong-flags-in-test.patch create mode 100644 0001-The-installed-cmake-files-are-now-generated-and-cont.patch create mode 100644 0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch create mode 100644 0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch diff --git a/0001-Fix-maybe-uninitialized-warning.patch b/0001-Fix-maybe-uninitialized-warning.patch new file mode 100644 index 0000000..50c1084 --- /dev/null +++ b/0001-Fix-maybe-uninitialized-warning.patch @@ -0,0 +1,34 @@ +From b853ff8e86ecc82fc5be87d95fe6bcf28bfaa469 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sun, 19 Nov 2023 09:55:54 +0100 +Subject: [PATCH] Fix maybe-uninitialized warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +.../src/XrdEc/XrdEcReader.cc:934:72: error: ‘info’ may be used uninitialized [-Werror=maybe-uninitialized] + 934 | blockMap[blkid]->stripes[strpid].resize( info ->GetSize() ); + | ^ +.../src/XrdEc/XrdEcReader.cc:932:42: note: ‘info’ was declared here + 932 | XrdCl::StatInfo* info; + | ^ +--- + src/XrdEc/XrdEcReader.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/XrdEc/XrdEcReader.cc b/src/XrdEc/XrdEcReader.cc +index 62dcb0461..9ac55b538 100644 +--- a/src/XrdEc/XrdEcReader.cc ++++ b/src/XrdEc/XrdEcReader.cc +@@ -929,7 +929,7 @@ namespace XrdEc + } + + blockMap[blkid]->state[strpid] = block_t::Loading; +- XrdCl::StatInfo* info; ++ XrdCl::StatInfo* info = nullptr; + if(dataarchs[url]->Stat(objcfg.GetFileName(blkid, strpid), info).IsOK()) + blockMap[blkid]->stripes[strpid].resize( info ->GetSize() ); + +-- +2.42.0 + diff --git a/0001-Posix-open-called-with-wrong-flags-in-test.patch b/0001-Posix-open-called-with-wrong-flags-in-test.patch new file mode 100644 index 0000000..a347233 --- /dev/null +++ b/0001-Posix-open-called-with-wrong-flags-in-test.patch @@ -0,0 +1,80 @@ +From 190c09059122542971530169746effff769e583a Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 28 Oct 2023 15:54:24 +0200 +Subject: [PATCH 1/3] Posix open() called with wrong flags in test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +OpenFlags::Flags should not be used for the flags argument in a posix +open() call, since they use different values. + +The OpenFlags::Flags values are defined in src/XrdCl/XrdClFileSystem.hh: + + MakePath = kXR_mkpath, //!< Create directory path if it does not + //!< already exist + New = kXR_new, //!< Open the file only if it does not already + Update = kXR_open_updt, //!< Open for reading and writing + +The kXR_* values are defined in src/XProtocol/XProtocol.hh: + kXR_new = 0x0008, // 8 + kXR_mkpath = 0x0100, // 256 + kXR_open_updt= 0x0020, // 32 + +As can be seen these do not correspond to the O_* values used in the +posix open() call. What they actually mean depends on the system and +varies between architectures. + +On hppa Linux O_CREAT is defind in /usr/include/hppa-linux-gnu/asm/fcntl.h: + + #define O_CREAT 000000400 /* not fcntl */ + +Since 0o400 = 0x100 = 256 this by chance matches kXR_mkpath and +triggers the error below. On other architectures the wrong flags are +just silently accepted. + +In file included from /usr/include/fcntl.h:342, + from /<>/tests/XrdClTests/LocalFileHandlerTest.cc:25: +In function ‘int open(const char*, int, ...)’, + inlined from ‘void LocalFileHandlerTest::WriteMkdirTest()’ at /<>/tests/XrdClTests/LocalFileHandlerTest.cc:210:17: +/usr/include/hppa-linux-gnu/bits/fcntl2.h:50:31: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments + 50 | __open_missing_mode (); + | ~~~~~~~~~~~~~~~~~~~~^~ +--- + tests/XrdClTests/LocalFileHandlerTest.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/XrdClTests/LocalFileHandlerTest.cc b/tests/XrdClTests/LocalFileHandlerTest.cc +index 0a58ed6ef..f8618c14f 100644 +--- a/tests/XrdClTests/LocalFileHandlerTest.cc ++++ b/tests/XrdClTests/LocalFileHandlerTest.cc +@@ -142,7 +142,7 @@ void LocalFileHandlerTest::WriteTest(){ + //---------------------------------------------------------------------------- + // Read file with POSIX calls to confirm correct write + //---------------------------------------------------------------------------- +- int fd = open( targetURL.c_str(), flags ); ++ int fd = open( targetURL.c_str(), O_RDWR ); + int rc = read( fd, buffer, int( writeSize ) ); + CPPUNIT_ASSERT_EQUAL( rc, int( writeSize ) ); + std::string read( (char *)buffer, writeSize ); +@@ -176,7 +176,7 @@ void LocalFileHandlerTest::WriteWithOffsetTest(){ + //---------------------------------------------------------------------------- + // Read file with POSIX calls to confirm correct write + //---------------------------------------------------------------------------- +- int fd = open( targetURL.c_str(), flags ); ++ int fd = open( targetURL.c_str(), O_RDWR ); + int rc = read( fd, buffer, offset ); + CPPUNIT_ASSERT_EQUAL( rc, int( offset ) ); + std::string read( (char *)buffer, offset ); +@@ -207,7 +207,7 @@ void LocalFileHandlerTest::WriteMkdirTest(){ + //---------------------------------------------------------------------------- + // Read file with POSIX calls to confirm correct write + //---------------------------------------------------------------------------- +- int fd = open( targetURL.c_str(), flags ); ++ int fd = open( targetURL.c_str(), O_RDWR ); + int rc = read( fd, buffer, writeSize ); + CPPUNIT_ASSERT_EQUAL( rc, int( writeSize ) ); + std::string read( buffer, writeSize ); +-- +2.41.0 + diff --git a/0001-The-installed-cmake-files-are-now-generated-and-cont.patch b/0001-The-installed-cmake-files-are-now-generated-and-cont.patch new file mode 100644 index 0000000..01a4817 --- /dev/null +++ b/0001-The-installed-cmake-files-are-now-generated-and-cont.patch @@ -0,0 +1,64 @@ +From e00f462610c8d0b1798a79ebbab7bc7561b42d2b Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 31 Oct 2023 09:45:58 +0100 +Subject: [PATCH] The installed cmake files are now generated and contain + architecture dependent information. Installing them in datadir (/usr/share) + now results in conflicts if packages for more than one architecture is + installed in parallel. Move the installed cmake files to libdir + (/usr/lib(64)?, /usr/lib/). + +Found by Debian's MultiArch hinter. +--- + CMakeLists.txt | 4 ++-- + packaging/debian/libxrootd-dev.install | 2 +- + packaging/rhel/xrootd.spec.in | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 36a7f62b5..438ff5666 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,7 +68,7 @@ configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in cmake/${PROJE + INSTALL_PREFIX + ${CMAKE_INSTALL_PREFIX} + INSTALL_DESTINATION +- ${CMAKE_INSTALL_DATADIR}/xrootd/cmake ++ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + PATH_VARS + CMAKE_INSTALL_INCLUDEDIR + CMAKE_INSTALL_LIBDIR +@@ -76,7 +76,7 @@ configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in cmake/${PROJE + ) + + install(DIRECTORY ${PROJECT_BINARY_DIR}/cmake/ +- DESTINATION ${CMAKE_INSTALL_DATADIR}/xrootd/cmake) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + + #------------------------------------------------------------------------------- + # Configure an 'uninstall' target +diff --git a/packaging/debian/libxrootd-dev.install b/packaging/debian/libxrootd-dev.install +index c92412235..e6ffeaa6b 100644 +--- a/packaging/debian/libxrootd-dev.install ++++ b/packaging/debian/libxrootd-dev.install +@@ -13,4 +13,4 @@ usr/lib/*/libXrdCrypto.so + usr/lib/*/libXrdCryptoLite.so + usr/lib/*/libXrdUtils.so + usr/lib/*/libXrdXml.so +-usr/share/xrootd/cmake/XRootDConfig.cmake ++usr/lib/*/cmake/XRootD +diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in +index 449de06a3..4a6af8f18 100644 +--- a/packaging/rhel/xrootd.spec.in ++++ b/packaging/rhel/xrootd.spec.in +@@ -919,7 +919,7 @@ fi + %{_libdir}/libXrdUtils.so + %{_libdir}/libXrdXml.so + %{_includedir}/xrootd/XrdXml/XrdXmlReader.hh +-%{_datadir}/xrootd/cmake ++%{_libdir}/cmake/XRootD + + %files client-libs + %defattr(-,root,root,-) +-- +2.41.0 + diff --git a/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch b/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch new file mode 100644 index 0000000..739edc1 --- /dev/null +++ b/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch @@ -0,0 +1,64 @@ +From 08e2bede433a2f513aba0b28686a31cb0b769079 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Sat, 28 Oct 2023 17:55:58 +0200 +Subject: [PATCH 2/3] PATH_MAX / MAXPATHLEN might be undefined + +XrdSys/XrdSysPlatform.hh defines MAXPATHLEN if needed. + +/<>/tests/XrdCl/XrdClURL.cc: In member function 'virtual void URLTest_LocalURLs_Test::TestBody()': +/<>/tests/XrdCl/XrdClURL.cc:17:12: error: 'PATH_MAX' was not declared in this scope + 17 | char url[PATH_MAX]; + | ^~~~~~~~ +/<>/tests/XrdCl/XrdClURL.cc:21:18: error: 'url' was not declared in this scope + 21 | snprintf(url, sizeof(url), "%s%s%s", protocol, path, params); + | ^~~ +/<>/tests/XrdCl/XrdClURL.cc: In member function 'virtual void URLTest_RemoteURLs_Test::TestBody()': +/<>/tests/XrdCl/XrdClURL.cc:47:12: error: 'PATH_MAX' was not declared in this scope + 47 | char url[PATH_MAX]; + | ^~~~~~~~ +/<>/tests/XrdCl/XrdClURL.cc:57:26: error: 'url' was not declared in this scope + 57 | snprintf(url, sizeof(url), "%s%s%s%s%s%s%s%s%s%s%s%s", + | ^~~ +/<>/tests/XrdCl/XrdClURL.cc:63:26: error: 'path_params' was not declared in this scope + 63 | snprintf(path_params, sizeof(path_params), "%s%s", *path == '/' ? path+1 : path, params); + | ^~~~~~~~~~~ +--- + tests/XrdCl/XrdClURL.cc | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/tests/XrdCl/XrdClURL.cc b/tests/XrdCl/XrdClURL.cc +index 24e7fdc2a..046f41a8c 100644 +--- a/tests/XrdCl/XrdClURL.cc ++++ b/tests/XrdCl/XrdClURL.cc +@@ -1,6 +1,8 @@ + #undef NDEBUG + + #include ++#include "XrdSys/XrdSysPlatform.hh" ++ + #include + + #include +@@ -14,7 +16,7 @@ class URLTest : public ::testing::Test {}; + + TEST(URLTest, LocalURLs) + { +- char url[PATH_MAX]; ++ char url[MAXPATHLEN]; + for (const auto& protocol : { "", "file://" }) { + for (const auto& path : { "/dev", "/dev/", "/dev/null" }) { + for (const auto& params : { "", "?param=value", "?param1=value1¶m2=value2" }) { +@@ -44,8 +46,8 @@ TEST(URLTest, LocalURLs) + + TEST(URLTest, RemoteURLs) + { +- char url[PATH_MAX]; +- char path_params[PATH_MAX]; ++ char url[MAXPATHLEN]; ++ char path_params[MAXPATHLEN]; + for (const char *protocol : { "", "http", "root", "https", "roots" }) { + int default_port = *protocol == 'h' ? (strlen(protocol) == 4 ? 80 : 443) : 1094; + for (const char *user : { "", "alice", "bob", "user_123", "xrootd" }) { +-- +2.41.0 + diff --git a/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch b/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch new file mode 100644 index 0000000..c936cec --- /dev/null +++ b/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch @@ -0,0 +1,63 @@ +From 6a381c776976c21161fa279c75b6fa2c0ce4774f Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 31 Oct 2023 18:17:23 +0100 +Subject: [PATCH 3/3] Don't try to enable TCP_CORK in GNU/Hurd + +The "man tcp" says about TCP_CORK: "This option should not be used in +code intended to be portable". So, it should not be expected to be +working everywhere. + +The failure below is from Debian GNU/Hurd: + +test 22 + Start 22: XRootD::smoke-test + +22: Test command: /usr/bin/sh "-c" "/<>/tests/XRootD/smoke.sh" +22: Working Directory: /<>/obj-i686-gnu/tests/XRootD +22: Environment variables: +22: XRDCP=/<>/obj-i686-gnu/src/XrdCl/xrdcp +22: XRDFS=/<>/obj-i686-gnu/src/XrdCl/xrdfs +22: CRC32C=/<>/obj-i686-gnu/src/xrdcrc32c +22: ADLER32=/<>/obj-i686-gnu/src/xrdadler32 +22: HOST=root://localhost:10940 +22: Test timeout computed to be: 10000000 +22: Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023) +22: v5.6.3 +22: Using /<>/obj-i686-gnu/src/XrdCl/xrdcp: +22: [FATAL] Socket opt error: no message of desired type +21/22 Test #22: XRootD::smoke-test ........................................................***Failed 0.13 sec +Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023) +v5.6.3 +Using /<>/obj-i686-gnu/src/XrdCl/xrdcp: +[FATAL] Socket opt error: no message of desired type +--- + src/XrdCl/XrdClSocket.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/XrdCl/XrdClSocket.cc b/src/XrdCl/XrdClSocket.cc +index a94eb4b48..a2cb47c12 100644 +--- a/src/XrdCl/XrdClSocket.cc ++++ b/src/XrdCl/XrdClSocket.cc +@@ -781,7 +781,8 @@ namespace XrdCl + //------------------------------------------------------------------------ + XRootDStatus Socket::Cork() + { +-#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH ++#if defined(TCP_CORK) && !defined(__GNU__) ++ // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH + if( pCorked ) return XRootDStatus(); + + int state = 1; +@@ -798,7 +799,8 @@ namespace XrdCl + //------------------------------------------------------------------------ + XRootDStatus Socket::Uncork() + { +-#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH ++#if defined(TCP_CORK) && !defined(__GNU__) ++ // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH + if( !pCorked ) return XRootDStatus(); + + int state = 0; +-- +2.41.0 + diff --git a/xrootd.spec b/xrootd.spec index 8d324e9..6408af5 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,12 +14,26 @@ Name: xrootd Epoch: 1 Version: 5.6.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.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz +# Fixes for test issues +# https://github.com/xrootd/xrootd/pull/2115 +Patch0: 0001-Posix-open-called-with-wrong-flags-in-test.patch +Patch1: 0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch +Patch2: 0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch + +# Installed CMake files are architecture dependent +# https://github.com/xrootd/xrootd/pull/2116 +Patch3: 0001-The-installed-cmake-files-are-now-generated-and-cont.patch + +# Fix maybe-uninitialized warning +# https://github.com/xrootd/xrootd/pull/2124 +Patch4: 0001-Fix-maybe-uninitialized-warning.patch + %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain @@ -73,6 +87,9 @@ BuildRequires: davix-devel BuildRequires: librados-devel BuildRequires: libradosstriper-devel %endif +%ifnarch %{ix86} +BuildRequires: isa-l-devel +%endif BuildRequires: cppunit-devel BuildRequires: gtest-devel BuildRequires: openssl @@ -292,6 +309,11 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P 0 -p1 +%patch -P 1 -p1 +%patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -304,6 +326,10 @@ This package contains the API documentation of the xrootd libraries. %if %{ceph} -DXRDCEPH_SUBMODULE:BOOL=ON \ %endif +%ifnarch %{ix86} + -DENABLE_XRDEC:BOOL=ON \ + -DUSE_SYSTEM_ISAL: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" \ %else @@ -335,6 +361,7 @@ 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 @@ -516,6 +543,7 @@ fi %ghost %attr(-,xrootd,xrootd) %{_rundir}/%{name} %files selinux +%dir %{_datadir}/selinux/packages/%{name} %{_datadir}/selinux/packages/%{name}/%{name}.pp %files libs @@ -556,11 +584,13 @@ fi %{_libdir}/libXrdCryptoLite.so %{_libdir}/libXrdUtils.so %{_libdir}/libXrdXml.so -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/cmake +%{_libdir}/cmake/XRootD %files client-libs %{_libdir}/libXrdCl.so.* +%ifnarch %{ix86} +%{_libdir}/libXrdEc.so.* +%endif %{_libdir}/libXrdFfs.so.* %{_libdir}/libXrdPosix.so.* %{_libdir}/libXrdPosixPreload.so.* @@ -620,6 +650,9 @@ fi %files private-devel %{_includedir}/%{name}/private +%ifnarch %{ix86} +%{_libdir}/libXrdEc.so +%endif %{_libdir}/libXrdSsiLib.so %{_libdir}/libXrdSsiShMap.so @@ -653,6 +686,7 @@ fi %{_libdir}/libXrdSecgsiVOMS-5.so %doc %{_mandir}/man1/libXrdVoms.1* %doc %{_mandir}/man1/libXrdSecgsiVOMS.1* +%doc src/XrdVoms/README.md %files scitokens %{_libdir}/libXrdAccSciTokens-5.so @@ -692,6 +726,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sun Nov 19 2023 Mattias Ellert - 1:5.6.3-2 +- Enable erasure code support (XrdEc) + * Fri Oct 27 2023 Mattias Ellert - 1:5.6.3-1 - Update to version 5.6.3 - Drop patches accepted upstream or previously backported From 39ef4b71107236aa7638db8ea085df4a26c5edbe Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 5 Dec 2023 08:00:50 +0100 Subject: [PATCH 17/62] Avoid /tmp when running some tests Fail gracefully in case of unsupported extended file attributes Avoid null bytes in error message strings Fix include path in XRootDConfig.cmake Avoid dereferencing unaligned pointers Support big endian in XrdZip --- 0001-Avoid-bus-errors.patch | 171 ++++++++++++++++++ 0001-Avoid-tmp-when-running-some-tests.patch | 105 +++++++++++ 0001-CMake-Trace-actual-variables.patch | 27 +++ ...ibutes-are-not-supported-xattr-Get-r.patch | 34 ++++ ...ke-sure-error-message-does-not-inclu.patch | 36 ++++ ...clude-cstdint-for-standard-int-types.patch | 61 +++++++ 0001-XrdZip-Support-Big-Endian.patch | 102 +++++++++++ ...x-include-path-in-XRootDConfig.cmake.patch | 28 +++ xrootd.spec | 46 ++++- 9 files changed, 609 insertions(+), 1 deletion(-) create mode 100644 0001-Avoid-bus-errors.patch create mode 100644 0001-Avoid-tmp-when-running-some-tests.patch create mode 100644 0001-CMake-Trace-actual-variables.patch create mode 100644 0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch create mode 100644 0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch create mode 100644 0001-XrdZip-Include-cstdint-for-standard-int-types.patch create mode 100644 0001-XrdZip-Support-Big-Endian.patch create mode 100644 0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch diff --git a/0001-Avoid-bus-errors.patch b/0001-Avoid-bus-errors.patch new file mode 100644 index 0000000..1baa6b7 --- /dev/null +++ b/0001-Avoid-bus-errors.patch @@ -0,0 +1,171 @@ +From 9fddb12566049e6e89d06b94a28d60ff5409b27c Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 4 Dec 2023 13:00:07 +0100 +Subject: [PATCH] Avoid bus errors + +Do not dereference unaligned pointers. +--- + src/XProtocol/XProtocol.cc | 4 ++-- + src/XrdCl/XrdClXRootDMsgHandler.cc | 4 ++-- + src/XrdZip/XrdZipCDFH.hh | 32 +++++++++++++++--------------- + src/XrdZip/XrdZipEOCD.hh | 14 ++++++------- + src/XrdZip/XrdZipZIP64EOCD.hh | 18 ++++++++--------- + src/XrdZip/XrdZipZIP64EOCDL.hh | 6 +++--- + 6 files changed, 39 insertions(+), 39 deletions(-) + +diff --git a/src/XProtocol/XProtocol.cc b/src/XProtocol/XProtocol.cc +index e5a7df3dd..da9e74613 100644 +--- a/src/XProtocol/XProtocol.cc ++++ b/src/XProtocol/XProtocol.cc +@@ -204,7 +204,7 @@ char* ClientFattrRequest::VVecInsert( const char *value, char *buffer ) + // + char* ClientFattrRequest::NVecRead( char* buffer, kXR_unt16 &rc ) + { +- rc = *reinterpret_cast( buffer ); ++ memcpy(&rc, buffer, sizeof(kXR_unt16)); + rc = htons( rc ); + buffer += sizeof( kXR_unt16 ); + return buffer; +@@ -223,7 +223,7 @@ char* ClientFattrRequest::NVecRead( char* buffer, char *&name ) + // + char* ClientFattrRequest::VVecRead( char* buffer, kXR_int32 &len ) + { +- len = *reinterpret_cast( buffer ); ++ memcpy(&len, buffer, sizeof(kXR_int32)); + len = htonl( len ); + buffer += sizeof( kXR_int32 ); + return buffer; +diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc +index 81e41d21b..da6513872 100644 +--- a/src/XrdCl/XrdClXRootDMsgHandler.cc ++++ b/src/XrdCl/XrdClXRootDMsgHandler.cc +@@ -2445,10 +2445,10 @@ namespace XrdCl + { + if( sizeof( T ) > buflen ) return Status( stError, errDataError ); + +- result = *reinterpret_cast( buffer ); ++ memcpy(&result, buffer, sizeof(T)); + + buffer += sizeof( T ); +- buflen -= sizeof( T ); ++ buflen -= sizeof( T ); + + return Status(); + } +diff --git a/src/XrdZip/XrdZipCDFH.hh b/src/XrdZip/XrdZipCDFH.hh +index 96851ea35..e6dbb36f2 100644 +--- a/src/XrdZip/XrdZipCDFH.hh ++++ b/src/XrdZip/XrdZipCDFH.hh +@@ -194,22 +194,22 @@ namespace XrdZip + //------------------------------------------------------------------------- + CDFH( const char *buffer, const uint32_t maxSize = 0 ) + { +- zipVersion = *reinterpret_cast( buffer + 4 ); +- minZipVersion = *reinterpret_cast( buffer + 6 ); +- generalBitFlag = *reinterpret_cast( buffer + 8 ); +- compressionMethod = *reinterpret_cast( buffer + 10 ); +- timestmp.time = *reinterpret_cast( buffer + 12 ); +- timestmp.date = *reinterpret_cast( buffer + 14 ); +- ZCRC32 = *reinterpret_cast( buffer + 16 ); +- compressedSize = *reinterpret_cast( buffer + 20 ); +- uncompressedSize = *reinterpret_cast( buffer + 24 ); +- filenameLength = *reinterpret_cast( buffer + 28 ); +- extraLength = *reinterpret_cast( buffer + 30 ); +- commentLength = *reinterpret_cast( buffer + 32 ); +- nbDisk = *reinterpret_cast( buffer + 34 ); +- internAttr = *reinterpret_cast( buffer + 36 ); +- externAttr = *reinterpret_cast( buffer + 38 ); +- offset = *reinterpret_cast( buffer + 42 ); ++ zipVersion = to(buffer + 4); ++ minZipVersion = to(buffer + 6); ++ generalBitFlag = to(buffer + 8); ++ compressionMethod = to(buffer + 10); ++ timestmp.time = to(buffer + 12); ++ timestmp.date = to(buffer + 14); ++ ZCRC32 = to(buffer + 16); ++ compressedSize = to(buffer + 20); ++ uncompressedSize = to(buffer + 24); ++ filenameLength = to(buffer + 28); ++ extraLength = to(buffer + 30); ++ commentLength = to(buffer + 32); ++ nbDisk = to(buffer + 34); ++ internAttr = to(buffer + 36); ++ externAttr = to(buffer + 38); ++ offset = to(buffer + 42); + if(maxSize > 0 && (uint32_t)(cdfhBaseSize+filenameLength + extraLength + commentLength) > maxSize){ + throw bad_data(); + } +diff --git a/src/XrdZip/XrdZipEOCD.hh b/src/XrdZip/XrdZipEOCD.hh +index d38a6a1c8..575a300bc 100644 +--- a/src/XrdZip/XrdZipEOCD.hh ++++ b/src/XrdZip/XrdZipEOCD.hh +@@ -53,13 +53,13 @@ namespace XrdZip + //------------------------------------------------------------------------- + EOCD( const char *buffer, uint32_t maxSize = 0 ) + { +- nbDisk = *reinterpret_cast( buffer + 4 ); +- nbDiskCd = *reinterpret_cast( buffer + 6 ); +- nbCdRecD = *reinterpret_cast( buffer + 8 ); +- nbCdRec = *reinterpret_cast( buffer + 10 ); +- cdSize = *reinterpret_cast( buffer + 12 ); +- cdOffset = *reinterpret_cast( buffer + 16 ); +- commentLength = *reinterpret_cast( buffer + 20 ); ++ nbDisk = to(buffer + 4); ++ nbDiskCd = to(buffer + 6); ++ nbCdRecD = to(buffer + 8); ++ nbCdRec = to(buffer + 10); ++ cdSize = to(buffer + 12); ++ cdOffset = to(buffer + 16); ++ commentLength = to(buffer + 20); + if(maxSize > 0 && (uint32_t)(eocdBaseSize + commentLength) > maxSize) + throw bad_data(); + comment = std::string( buffer + 22, commentLength ); +diff --git a/src/XrdZip/XrdZipZIP64EOCD.hh b/src/XrdZip/XrdZipZIP64EOCD.hh +index c7ab0a3bb..09e5ecc4f 100644 +--- a/src/XrdZip/XrdZipZIP64EOCD.hh ++++ b/src/XrdZip/XrdZipZIP64EOCD.hh +@@ -28,15 +28,15 @@ namespace XrdZip + ZIP64_EOCD( const char* buffer ): + extensibleDataLength( 0 ) + { +- zip64EocdSize = *reinterpret_cast( buffer + 4 ); +- zipVersion = *reinterpret_cast( buffer + 12 ); +- minZipVersion = *reinterpret_cast( buffer + 14 ); +- nbDisk = *reinterpret_cast( buffer + 16 ); +- nbDiskCd = *reinterpret_cast( buffer + 20 ); +- nbCdRecD = *reinterpret_cast( buffer + 24 ); +- nbCdRec = *reinterpret_cast( buffer + 32 ); +- cdSize = *reinterpret_cast( buffer + 40 ); +- cdOffset = *reinterpret_cast( buffer + 48 ); ++ zip64EocdSize = to(buffer + 4); ++ zipVersion = to(buffer + 12); ++ minZipVersion = to(buffer + 14); ++ nbDisk = to(buffer + 16); ++ nbDiskCd = to(buffer + 20); ++ nbCdRecD = to(buffer + 24); ++ nbCdRec = to(buffer + 32); ++ cdSize = to(buffer + 40); ++ cdOffset = to(buffer + 48); + + zip64EocdTotalSize = zip64EocdBaseSize + extensibleDataLength; + } +diff --git a/src/XrdZip/XrdZipZIP64EOCDL.hh b/src/XrdZip/XrdZipZIP64EOCDL.hh +index d2cea2edc..cceca756a 100644 +--- a/src/XrdZip/XrdZipZIP64EOCDL.hh ++++ b/src/XrdZip/XrdZipZIP64EOCDL.hh +@@ -26,9 +26,9 @@ namespace XrdZip + //------------------------------------------------------------------------- + ZIP64_EOCDL( const char *buffer ) + { +- nbDiskZip64Eocd = *reinterpret_cast( buffer + 4 ); +- zip64EocdOffset = *reinterpret_cast( buffer + 8 ); +- totalNbDisks = *reinterpret_cast( buffer + 16 ); ++ nbDiskZip64Eocd = to(buffer + 4); ++ zip64EocdOffset = to(buffer + 8); ++ totalNbDisks = to(buffer + 16); + } + + //------------------------------------------------------------------------- +-- +2.43.0 + diff --git a/0001-Avoid-tmp-when-running-some-tests.patch b/0001-Avoid-tmp-when-running-some-tests.patch new file mode 100644 index 0000000..ff4dea6 --- /dev/null +++ b/0001-Avoid-tmp-when-running-some-tests.patch @@ -0,0 +1,105 @@ +From 2c256ffaf44d8d811398c6dfe0ea754ae55672eb Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Wed, 22 Nov 2023 06:20:19 +0100 +Subject: [PATCH] Avoid /tmp when running some tests + +Many features in xrootd require file system support for extended file +attributes. Tests that run tests on these features fail if the file +system does not support them. The /tmp directory in many Linux +installations is using a tmpfs partition. The tmpfs file system does +not support extended file attributes, so some tests that use /tmp to +store files fail. + +This commit changes some affected tests so that they create the +temporary directory containing the test files in the current working +directory instead of /tmp. + +Example of failure: + +17/34 Test #20: XrdEc::AlignedWriteTest ...................................................***Failed 0.07 sec +You have selected: + +Selected tests/ + Selected tests/MicroTest::AlignedWriteTest + +Running: + +.F + +MicroTest.cc:506:Assertion +Test name: MicroTest::AlignedWriteTest +assertion failed +- Expression: _st.IsOK() +- [*status]: [ERROR] Internal error: std::bad_alloc + +Failures !!! +Run: 1 Failure total: 1 Failures: 1 Errors: 0 + +The following tests FAILED: + 20 - XrdEc::AlignedWriteTest (Failed) + 21 - XrdEc::SmallWriteTest (Failed) + 22 - XrdEc::BigWriteTest (Failed) + 23 - XrdEc::VectorReadTest (Failed) + 24 - XrdEc::IllegalVectorReadTest (Failed) + 25 - XrdEc::AlignedWrite1MissingTest (Failed) + 26 - XrdEc::AlignedWrite2MissingTest (Failed) + 27 - XrdEc::AlignedWriteTestIsalCrcNoMt (Failed) + 28 - XrdEc::SmallWriteTestIsalCrcNoMt (Failed) + 29 - XrdEc::BigWriteTestIsalCrcNoMt (Failed) + 30 - XrdEc::AlignedWrite1MissingTestIsalCrcNoMt (Failed) + 31 - XrdEc::AlignedWrite2MissingTestIsalCrcNoMt (Failed) + +In addition to addressing the above failures, the commit also +addresses the following warnings during the XRootD::smoke-test test: + +34: setfattr: /tmp/xrdfs-test-ChGSEb/01.ref: Operation not supported +34: Extended attributes not supported, using downloaded checksums for server checks +34: setfattr: /tmp/xrdfs-test-ChGSEb/02.ref: Operation not supported +34: Extended attributes not supported, using downloaded checksums for server checks +34: setfattr: /tmp/xrdfs-test-ChGSEb/03.ref: Operation not supported +34: Extended attributes not supported, using downloaded checksums for server checks +--- + tests/XRootD/smoke.sh | 2 +- + tests/XrdEcTests/MicroTest.cc | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/XRootD/smoke.sh b/tests/XRootD/smoke.sh +index 58e0f93f0..76ae67fd9 100755 +--- a/tests/XRootD/smoke.sh ++++ b/tests/XRootD/smoke.sh +@@ -39,7 +39,7 @@ ${XRDFS} ${HOST} statvfs / + ${XRDFS} ${HOST} spaceinfo / + + # create local temporary directory +-TMPDIR=$(mktemp -d /tmp/xrdfs-test-XXXXXX) ++TMPDIR=$(mktemp -d ${PWD}/xrdfs-test-XXXXXX) + + # cleanup after ourselves if something fails + trap "rm -rf ${TMPDIR}" EXIT +diff --git a/tests/XrdEcTests/MicroTest.cc b/tests/XrdEcTests/MicroTest.cc +index d02743351..5b375c6fe 100644 +--- a/tests/XrdEcTests/MicroTest.cc ++++ b/tests/XrdEcTests/MicroTest.cc +@@ -34,6 +34,8 @@ + + #include "XrdZip/XrdZipCDFH.hh" + ++#include "XrdSys/XrdSysPlatform.hh" ++ + #include + #include + #include +@@ -280,7 +282,9 @@ void MicroTest::Init( bool usecrc32c ) + objcfg.reset( new ObjCfg( "test.txt", nbdata, nbparity, chsize, usecrc32c, true ) ); + rawdata.clear(); + +- char tmpdir[32] = "/tmp/xrootd-xrdec-XXXXXX"; ++ char tmpdir[MAXPATHLEN]; ++ CPPUNIT_ASSERT( getcwd(tmpdir, MAXPATHLEN - 21) ); ++ strcat(tmpdir, "/xrootd-xrdec-XXXXXX"); + // create the data directory + CPPUNIT_ASSERT( mkdtemp(tmpdir) ); + datadir = tmpdir; +-- +2.42.0 + diff --git a/0001-CMake-Trace-actual-variables.patch b/0001-CMake-Trace-actual-variables.patch new file mode 100644 index 0000000..94c84bd --- /dev/null +++ b/0001-CMake-Trace-actual-variables.patch @@ -0,0 +1,27 @@ +From 896f95c382b3bde7d7c6d184649a7e145d9f3419 Mon Sep 17 00:00:00 2001 +From: Jonas Hahnfeld +Date: Mon, 4 Dec 2023 11:51:44 +0100 +Subject: [PATCH 1/2] [CMake] Trace actual variables + +--- + cmake/XRootDConfig.cmake.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/XRootDConfig.cmake.in b/cmake/XRootDConfig.cmake.in +index 971b415a7..0f95a8f54 100644 +--- a/cmake/XRootDConfig.cmake.in ++++ b/cmake/XRootDConfig.cmake.in +@@ -174,8 +174,8 @@ message(TRACE "XRootD_VERSION_NUMBER = '${XRootD_VERSION_NUMBER}'") + + message(TRACE "XRootD_FOUND = '${XRootD_FOUND}'") + message(TRACE "XRootD_INSTALL_PREFIX = '@CMAKE_INSTALL_PREFIX@'") +-message(TRACE "XRootD_INCLUDE_DIR = '@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@'") +-message(TRACE "XRootD_LIBRARY_DIR = '@PACKAGE_CMAKE_INSTALL_LIBDIR@'") ++message(TRACE "XRootD_INCLUDE_DIR = '${XRootD_INCLUDE_DIR}'") ++message(TRACE "XRootD_LIBRARY_DIR = '${XRootD_LIBRARY_DIR}'") + message(TRACE "XRootD_LIBRARIES = '${XRootD_LIBRARIES}'") + + foreach(COMPONENT UTILS CLIENT SERVER HTTP POSIX SSI) +-- +2.43.0 + diff --git a/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch b/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch new file mode 100644 index 0000000..1421037 --- /dev/null +++ b/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch @@ -0,0 +1,34 @@ +From fde7669ff9006495034a493386c72d080158f027 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Wed, 22 Nov 2023 19:29:12 +0100 +Subject: [PATCH] If extended attributes are not supported xattr->Get() returns + -ENOTSUP. When this small negative value is cast to a size_t in the call to + new on the following line it becomes a very large integer and the request to + allocate this enormous memory block fails with a std::bad_alloc exception. + +This commit adds a check on the returned size and returns an error if +it is negative avoiding triggering the std::bad_alloc exception. +--- + src/XrdCl/XrdClLocalFileHandler.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/XrdCl/XrdClLocalFileHandler.cc b/src/XrdCl/XrdClLocalFileHandler.cc +index e25d8f2a2..42cce9a30 100644 +--- a/src/XrdCl/XrdClLocalFileHandler.cc ++++ b/src/XrdCl/XrdClLocalFileHandler.cc +@@ -664,6 +664,12 @@ namespace XrdCl + std::unique_ptr buffer; + + int size = xattr->Get( name.c_str(), 0, 0, 0, fd ); ++ if( size < 0 ) ++ { ++ XRootDStatus status( stError, errLocalError, -size ); ++ response.push_back( XAttr( *itr, "", status ) ); ++ continue; ++ } + buffer.reset( new char[size] ); + int ret = xattr->Get( name.c_str(), buffer.get(), size, 0, fd ); + +-- +2.43.0 + diff --git a/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch b/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch new file mode 100644 index 0000000..1094599 --- /dev/null +++ b/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch @@ -0,0 +1,36 @@ +From fe2224d33b0c310e19d497e6e795f779c8e88001 Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Thu, 30 Nov 2023 10:02:03 +0100 +Subject: [PATCH] Reapply "[XrdCl] Make sure error message does not include a + null-character." + +This reverts commit 5a832596a59d1055f59620d43fbb740955ce6787. +Even though commit 9987b4b41990df69ae611a523acb76c69eeccbbb did fix +an error message that had a second null termination character, reverting +this change was a mistake, as this change is actually still needed to +avoid the single terminating null byte in error messages from appearing +in the output of the client. + +Closes: #2138 +--- + src/XrdCl/XrdClXRootDMsgHandler.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc +index 1bd60a3e3..81e41d21b 100644 +--- a/src/XrdCl/XrdClXRootDMsgHandler.cc ++++ b/src/XrdCl/XrdClXRootDMsgHandler.cc +@@ -1202,7 +1202,9 @@ namespace XrdCl + if( pStatus.code == errErrorResponse ) + { + st->errNo = rsp->body.error.errnum; +- std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-4 ); ++ // omit the last character as the string returned from the server ++ // (acording to protocol specs) should be null-terminated ++ std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-5 ); + if( st->errNo == kXR_noReplicas && !pLastError.IsOK() ) + errmsg += " Last seen error: " + pLastError.ToString(); + st->SetErrorMessage( errmsg ); +-- +2.43.0 + diff --git a/0001-XrdZip-Include-cstdint-for-standard-int-types.patch b/0001-XrdZip-Include-cstdint-for-standard-int-types.patch new file mode 100644 index 0000000..f8a16c1 --- /dev/null +++ b/0001-XrdZip-Include-cstdint-for-standard-int-types.patch @@ -0,0 +1,61 @@ +From d414b2951855d2dbcba952ec9f271d918865e391 Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Thu, 2 Nov 2023 17:09:28 +0100 +Subject: [PATCH] [XrdZip] Include for standard int types + +--- + src/XrdZip/XrdZipDataDescriptor.hh | 2 ++ + src/XrdZip/XrdZipExtra.hh | 3 +++ + src/XrdZip/XrdZipUtils.hh | 6 +++--- + 3 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/XrdZip/XrdZipDataDescriptor.hh b/src/XrdZip/XrdZipDataDescriptor.hh +index 22e76b5e1..9e48b2446 100644 +--- a/src/XrdZip/XrdZipDataDescriptor.hh ++++ b/src/XrdZip/XrdZipDataDescriptor.hh +@@ -25,6 +25,8 @@ + #ifndef SRC_XRDZIP_XRDZIPDATADESCRIPTOR_HH_ + #define SRC_XRDZIP_XRDZIPDATADESCRIPTOR_HH_ + ++#include ++ + namespace XrdZip + { + //--------------------------------------------------------------------------- +diff --git a/src/XrdZip/XrdZipExtra.hh b/src/XrdZip/XrdZipExtra.hh +index c415faa7e..041b50ec2 100644 +--- a/src/XrdZip/XrdZipExtra.hh ++++ b/src/XrdZip/XrdZipExtra.hh +@@ -27,6 +27,9 @@ + + #include "XrdZip/XrdZipUtils.hh" + ++#include ++#include ++ + namespace XrdZip + { + //--------------------------------------------------------------------------- +diff --git a/src/XrdZip/XrdZipUtils.hh b/src/XrdZip/XrdZipUtils.hh +index 1d48e543d..619f16daf 100644 +--- a/src/XrdZip/XrdZipUtils.hh ++++ b/src/XrdZip/XrdZipUtils.hh +@@ -25,12 +25,12 @@ + #ifndef SRC_XRDZIP_XRDZIPUTILS_HH_ + #define SRC_XRDZIP_XRDZIPUTILS_HH_ + ++#include ++#include + #include +- + #include +-#include +-#include + #include ++#include + + namespace XrdZip + { +-- +2.43.0 + diff --git a/0001-XrdZip-Support-Big-Endian.patch b/0001-XrdZip-Support-Big-Endian.patch new file mode 100644 index 0000000..ead2808 --- /dev/null +++ b/0001-XrdZip-Support-Big-Endian.patch @@ -0,0 +1,102 @@ +From 8764acdd57aa98a1fa48706ddb1bc857ae021299 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Mon, 4 Dec 2023 19:07:19 +0100 +Subject: [PATCH] [XrdZip] Support Big Endian + +--- + src/XrdZip/XrdZipLFH.hh | 3 ++- + src/XrdZip/XrdZipUtils.hh | 35 ++++++++++++++++++++++++++++++++++- + 2 files changed, 36 insertions(+), 2 deletions(-) + +diff --git a/src/XrdZip/XrdZipLFH.hh b/src/XrdZip/XrdZipLFH.hh +index 972f373a4..aac99848e 100644 +--- a/src/XrdZip/XrdZipLFH.hh ++++ b/src/XrdZip/XrdZipLFH.hh +@@ -80,7 +80,8 @@ namespace XrdZip + from_buffer( minZipVersion, buffer ); + from_buffer( generalBitFlag, buffer ); + from_buffer( compressionMethod, buffer ); +- from_buffer( timestmp, buffer ); ++ from_buffer( timestmp.time, buffer ); ++ from_buffer( timestmp.date, buffer ); + from_buffer( ZCRC32, buffer ); + from_buffer( compressedSize, buffer ); + from_buffer( uncompressedSize, buffer ); +diff --git a/src/XrdZip/XrdZipUtils.hh b/src/XrdZip/XrdZipUtils.hh +index 619f16daf..892771875 100644 +--- a/src/XrdZip/XrdZipUtils.hh ++++ b/src/XrdZip/XrdZipUtils.hh +@@ -27,13 +27,36 @@ + + #include + #include ++#include + #include + #include + #include + #include + ++#if defined(__APPLE__) ++#include ++#else ++#include ++#endif ++ ++#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || \ ++ defined(__IEEE_BIG_ENDIAN) || \ ++ (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) ++#define XrdZip_Big_Endian ++#endif ++ + namespace XrdZip + { ++#if defined(__APPLE__) ++ inline static uint16_t BSwap(uint16_t x) { return OSSwapInt16(x); } ++ inline static uint32_t BSwap(uint32_t x) { return OSSwapInt32(x); } ++ inline static uint64_t BSwap(uint64_t x) { return OSSwapInt64(x); } ++#else ++ inline static uint16_t BSwap(uint16_t x) { return bswap_16(x); } ++ inline static uint32_t BSwap(uint32_t x) { return bswap_32(x); } ++ inline static uint64_t BSwap(uint64_t x) { return bswap_64(x); } ++#endif ++ + //--------------------------------------------------------------------------- + // Exception indicating corrupted data + //--------------------------------------------------------------------------- +@@ -61,7 +84,11 @@ namespace XrdZip + { + const char *begin = reinterpret_cast( &value ); + const char *end = begin + sizeof( INT ); ++#ifdef XrdZip_Big_Endian ++ std::reverse_copy( begin, end, std::back_inserter( buffer ) ); ++#else + std::copy( begin, end, std::back_inserter( buffer ) ); ++#endif + } + + //--------------------------------------------------------------------------- +@@ -72,6 +99,9 @@ namespace XrdZip + inline static void from_buffer( INT &var, const char *&buffer ) + { + memcpy( &var, buffer, sizeof( INT ) ); ++#ifdef XrdZip_Big_Endian ++ var = BSwap(var); ++#endif + buffer += sizeof( INT ); + } + +@@ -82,7 +112,10 @@ namespace XrdZip + inline static INT to( const char *buffer ) + { + INT value; +- memcpy( &value, buffer, sizeof( INT) ); ++ memcpy( &value, buffer, sizeof( INT ) ); ++#ifdef XrdZip_Big_Endian ++ value = BSwap(value); ++#endif + return value; + } + +-- +2.43.0 + diff --git a/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch b/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch new file mode 100644 index 0000000..752cf53 --- /dev/null +++ b/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch @@ -0,0 +1,28 @@ +From ccedaabc377e668280eec8bb22f0dbb76550beec Mon Sep 17 00:00:00 2001 +From: Jonas Hahnfeld +Date: Mon, 4 Dec 2023 11:52:44 +0100 +Subject: [PATCH 2/2] [CMake] Fix include path in XRootDConfig.cmake + +Headers are installed into the subdirectory xrootd/. This was broken +with commit c6e0e598ce ("[CMake] Find only XRootD matching +XRootDConfig.cmake installation path") released with version 5.6.3. +--- + cmake/XRootDConfig.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/XRootDConfig.cmake.in b/cmake/XRootDConfig.cmake.in +index 0f95a8f54..0a4ce3fe5 100644 +--- a/cmake/XRootDConfig.cmake.in ++++ b/cmake/XRootDConfig.cmake.in +@@ -50,7 +50,7 @@ SET( XROOTD_SSI_FOUND FALSE ) + + set_and_check(XRootD_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}") + set_and_check(XRootD_DATA_DIR "@PACKAGE_CMAKE_INSTALL_DATADIR@") +-set_and_check(XRootD_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") ++set_and_check(XRootD_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/xrootd") + set_and_check(XRootD_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") + + set(XRootD_INCLUDE_DIRS "${XRootD_INCLUDE_DIR};${XRootD_INCLUDE_DIR}/private") +-- +2.43.0 + diff --git a/xrootd.spec b/xrootd.spec index 6408af5..bd2d344 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.6.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.slac.stanford.edu/ @@ -34,6 +34,33 @@ Patch3: 0001-The-installed-cmake-files-are-now-generated-and-cont.patch # https://github.com/xrootd/xrootd/pull/2124 Patch4: 0001-Fix-maybe-uninitialized-warning.patch +# Avoid /tmp when running some tests +# https://github.com/xrootd/xrootd/pull/2129 +Patch5: 0001-Avoid-tmp-when-running-some-tests.patch + +# Fail gracefully in case of unsupported extended file attributes +# https://github.com/xrootd/xrootd/pull/2130 +Patch6: 0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch + +# Avoid null bytes in error message strings +# https://github.com/xrootd/xrootd/pull/2138 +Patch7: 0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch + +# Fix include path in XRootDConfig.cmake +# https://github.com/root-project/root/issues/12631 +# https://github.com/xrootd/xrootd/pull/2142 +Patch8: 0001-CMake-Trace-actual-variables.patch +Patch9: 0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch + +# Avoid dereferencing unaligned pointers +# https://github.com/xrootd/xrootd/pull/2144 +Patch10: 0001-Avoid-bus-errors.patch + +# Support big endian in XrdZip +# https://github.com/xrootd/xrootd/pull/2145 +Patch11: 0001-XrdZip-Include-cstdint-for-standard-int-types.patch +Patch12: 0001-XrdZip-Support-Big-Endian.patch + %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain @@ -90,6 +117,7 @@ BuildRequires: libradosstriper-devel %ifnarch %{ix86} BuildRequires: isa-l-devel %endif +BuildRequires: attr BuildRequires: cppunit-devel BuildRequires: gtest-devel BuildRequires: openssl @@ -314,6 +342,14 @@ This package contains the API documentation of the xrootd libraries. %patch -P 2 -p1 %patch -P 3 -p1 %patch -P 4 -p1 +%patch -P 5 -p1 +%patch -P 6 -p1 +%patch -P 7 -p1 +%patch -P 8 -p1 +%patch -P 9 -p1 +%patch -P 10 -p1 +%patch -P 11 -p1 +%patch -P 12 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -726,6 +762,14 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Dec 05 2023 Mattias Ellert - 1:5.6.3-3 +- Avoid /tmp when running some tests +- Fail gracefully in case of unsupported extended file attributes +- Avoid null bytes in error message strings +- Fix include path in XRootDConfig.cmake +- Avoid dereferencing unaligned pointers +- Support big endian in XrdZip + * Sun Nov 19 2023 Mattias Ellert - 1:5.6.3-2 - Enable erasure code support (XrdEc) From 07036ad772ccf9a4473482215c73dc533c2a0047 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 11 Dec 2023 21:57:59 +0100 Subject: [PATCH 18/62] Update to version 5.6.4 Drop patches accepted upstream or previously backported --- 0001-Avoid-bus-errors.patch | 171 ------------------ 0001-Avoid-tmp-when-running-some-tests.patch | 105 ----------- 0001-CMake-Trace-actual-variables.patch | 27 --- 0001-Fix-maybe-uninitialized-warning.patch | 34 ---- ...ibutes-are-not-supported-xattr-Get-r.patch | 34 ---- ...open-called-with-wrong-flags-in-test.patch | 80 -------- ...ke-sure-error-message-does-not-inclu.patch | 36 ---- ...ake-files-are-now-generated-and-cont.patch | 64 ------- ...clude-cstdint-for-standard-int-types.patch | 61 ------- 0001-XrdZip-Support-Big-Endian.patch | 102 ----------- ...x-include-path-in-XRootDConfig.cmake.patch | 28 --- ...TH_MAX-MAXPATHLEN-might-be-undefined.patch | 64 ------- ...t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch | 63 ------- sources | 2 +- xrootd.spec | 66 +------ 15 files changed, 9 insertions(+), 928 deletions(-) delete mode 100644 0001-Avoid-bus-errors.patch delete mode 100644 0001-Avoid-tmp-when-running-some-tests.patch delete mode 100644 0001-CMake-Trace-actual-variables.patch delete mode 100644 0001-Fix-maybe-uninitialized-warning.patch delete mode 100644 0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch delete mode 100644 0001-Posix-open-called-with-wrong-flags-in-test.patch delete mode 100644 0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch delete mode 100644 0001-The-installed-cmake-files-are-now-generated-and-cont.patch delete mode 100644 0001-XrdZip-Include-cstdint-for-standard-int-types.patch delete mode 100644 0001-XrdZip-Support-Big-Endian.patch delete mode 100644 0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch delete mode 100644 0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch delete mode 100644 0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch diff --git a/0001-Avoid-bus-errors.patch b/0001-Avoid-bus-errors.patch deleted file mode 100644 index 1baa6b7..0000000 --- a/0001-Avoid-bus-errors.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 9fddb12566049e6e89d06b94a28d60ff5409b27c Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 4 Dec 2023 13:00:07 +0100 -Subject: [PATCH] Avoid bus errors - -Do not dereference unaligned pointers. ---- - src/XProtocol/XProtocol.cc | 4 ++-- - src/XrdCl/XrdClXRootDMsgHandler.cc | 4 ++-- - src/XrdZip/XrdZipCDFH.hh | 32 +++++++++++++++--------------- - src/XrdZip/XrdZipEOCD.hh | 14 ++++++------- - src/XrdZip/XrdZipZIP64EOCD.hh | 18 ++++++++--------- - src/XrdZip/XrdZipZIP64EOCDL.hh | 6 +++--- - 6 files changed, 39 insertions(+), 39 deletions(-) - -diff --git a/src/XProtocol/XProtocol.cc b/src/XProtocol/XProtocol.cc -index e5a7df3dd..da9e74613 100644 ---- a/src/XProtocol/XProtocol.cc -+++ b/src/XProtocol/XProtocol.cc -@@ -204,7 +204,7 @@ char* ClientFattrRequest::VVecInsert( const char *value, char *buffer ) - // - char* ClientFattrRequest::NVecRead( char* buffer, kXR_unt16 &rc ) - { -- rc = *reinterpret_cast( buffer ); -+ memcpy(&rc, buffer, sizeof(kXR_unt16)); - rc = htons( rc ); - buffer += sizeof( kXR_unt16 ); - return buffer; -@@ -223,7 +223,7 @@ char* ClientFattrRequest::NVecRead( char* buffer, char *&name ) - // - char* ClientFattrRequest::VVecRead( char* buffer, kXR_int32 &len ) - { -- len = *reinterpret_cast( buffer ); -+ memcpy(&len, buffer, sizeof(kXR_int32)); - len = htonl( len ); - buffer += sizeof( kXR_int32 ); - return buffer; -diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc -index 81e41d21b..da6513872 100644 ---- a/src/XrdCl/XrdClXRootDMsgHandler.cc -+++ b/src/XrdCl/XrdClXRootDMsgHandler.cc -@@ -2445,10 +2445,10 @@ namespace XrdCl - { - if( sizeof( T ) > buflen ) return Status( stError, errDataError ); - -- result = *reinterpret_cast( buffer ); -+ memcpy(&result, buffer, sizeof(T)); - - buffer += sizeof( T ); -- buflen -= sizeof( T ); -+ buflen -= sizeof( T ); - - return Status(); - } -diff --git a/src/XrdZip/XrdZipCDFH.hh b/src/XrdZip/XrdZipCDFH.hh -index 96851ea35..e6dbb36f2 100644 ---- a/src/XrdZip/XrdZipCDFH.hh -+++ b/src/XrdZip/XrdZipCDFH.hh -@@ -194,22 +194,22 @@ namespace XrdZip - //------------------------------------------------------------------------- - CDFH( const char *buffer, const uint32_t maxSize = 0 ) - { -- zipVersion = *reinterpret_cast( buffer + 4 ); -- minZipVersion = *reinterpret_cast( buffer + 6 ); -- generalBitFlag = *reinterpret_cast( buffer + 8 ); -- compressionMethod = *reinterpret_cast( buffer + 10 ); -- timestmp.time = *reinterpret_cast( buffer + 12 ); -- timestmp.date = *reinterpret_cast( buffer + 14 ); -- ZCRC32 = *reinterpret_cast( buffer + 16 ); -- compressedSize = *reinterpret_cast( buffer + 20 ); -- uncompressedSize = *reinterpret_cast( buffer + 24 ); -- filenameLength = *reinterpret_cast( buffer + 28 ); -- extraLength = *reinterpret_cast( buffer + 30 ); -- commentLength = *reinterpret_cast( buffer + 32 ); -- nbDisk = *reinterpret_cast( buffer + 34 ); -- internAttr = *reinterpret_cast( buffer + 36 ); -- externAttr = *reinterpret_cast( buffer + 38 ); -- offset = *reinterpret_cast( buffer + 42 ); -+ zipVersion = to(buffer + 4); -+ minZipVersion = to(buffer + 6); -+ generalBitFlag = to(buffer + 8); -+ compressionMethod = to(buffer + 10); -+ timestmp.time = to(buffer + 12); -+ timestmp.date = to(buffer + 14); -+ ZCRC32 = to(buffer + 16); -+ compressedSize = to(buffer + 20); -+ uncompressedSize = to(buffer + 24); -+ filenameLength = to(buffer + 28); -+ extraLength = to(buffer + 30); -+ commentLength = to(buffer + 32); -+ nbDisk = to(buffer + 34); -+ internAttr = to(buffer + 36); -+ externAttr = to(buffer + 38); -+ offset = to(buffer + 42); - if(maxSize > 0 && (uint32_t)(cdfhBaseSize+filenameLength + extraLength + commentLength) > maxSize){ - throw bad_data(); - } -diff --git a/src/XrdZip/XrdZipEOCD.hh b/src/XrdZip/XrdZipEOCD.hh -index d38a6a1c8..575a300bc 100644 ---- a/src/XrdZip/XrdZipEOCD.hh -+++ b/src/XrdZip/XrdZipEOCD.hh -@@ -53,13 +53,13 @@ namespace XrdZip - //------------------------------------------------------------------------- - EOCD( const char *buffer, uint32_t maxSize = 0 ) - { -- nbDisk = *reinterpret_cast( buffer + 4 ); -- nbDiskCd = *reinterpret_cast( buffer + 6 ); -- nbCdRecD = *reinterpret_cast( buffer + 8 ); -- nbCdRec = *reinterpret_cast( buffer + 10 ); -- cdSize = *reinterpret_cast( buffer + 12 ); -- cdOffset = *reinterpret_cast( buffer + 16 ); -- commentLength = *reinterpret_cast( buffer + 20 ); -+ nbDisk = to(buffer + 4); -+ nbDiskCd = to(buffer + 6); -+ nbCdRecD = to(buffer + 8); -+ nbCdRec = to(buffer + 10); -+ cdSize = to(buffer + 12); -+ cdOffset = to(buffer + 16); -+ commentLength = to(buffer + 20); - if(maxSize > 0 && (uint32_t)(eocdBaseSize + commentLength) > maxSize) - throw bad_data(); - comment = std::string( buffer + 22, commentLength ); -diff --git a/src/XrdZip/XrdZipZIP64EOCD.hh b/src/XrdZip/XrdZipZIP64EOCD.hh -index c7ab0a3bb..09e5ecc4f 100644 ---- a/src/XrdZip/XrdZipZIP64EOCD.hh -+++ b/src/XrdZip/XrdZipZIP64EOCD.hh -@@ -28,15 +28,15 @@ namespace XrdZip - ZIP64_EOCD( const char* buffer ): - extensibleDataLength( 0 ) - { -- zip64EocdSize = *reinterpret_cast( buffer + 4 ); -- zipVersion = *reinterpret_cast( buffer + 12 ); -- minZipVersion = *reinterpret_cast( buffer + 14 ); -- nbDisk = *reinterpret_cast( buffer + 16 ); -- nbDiskCd = *reinterpret_cast( buffer + 20 ); -- nbCdRecD = *reinterpret_cast( buffer + 24 ); -- nbCdRec = *reinterpret_cast( buffer + 32 ); -- cdSize = *reinterpret_cast( buffer + 40 ); -- cdOffset = *reinterpret_cast( buffer + 48 ); -+ zip64EocdSize = to(buffer + 4); -+ zipVersion = to(buffer + 12); -+ minZipVersion = to(buffer + 14); -+ nbDisk = to(buffer + 16); -+ nbDiskCd = to(buffer + 20); -+ nbCdRecD = to(buffer + 24); -+ nbCdRec = to(buffer + 32); -+ cdSize = to(buffer + 40); -+ cdOffset = to(buffer + 48); - - zip64EocdTotalSize = zip64EocdBaseSize + extensibleDataLength; - } -diff --git a/src/XrdZip/XrdZipZIP64EOCDL.hh b/src/XrdZip/XrdZipZIP64EOCDL.hh -index d2cea2edc..cceca756a 100644 ---- a/src/XrdZip/XrdZipZIP64EOCDL.hh -+++ b/src/XrdZip/XrdZipZIP64EOCDL.hh -@@ -26,9 +26,9 @@ namespace XrdZip - //------------------------------------------------------------------------- - ZIP64_EOCDL( const char *buffer ) - { -- nbDiskZip64Eocd = *reinterpret_cast( buffer + 4 ); -- zip64EocdOffset = *reinterpret_cast( buffer + 8 ); -- totalNbDisks = *reinterpret_cast( buffer + 16 ); -+ nbDiskZip64Eocd = to(buffer + 4); -+ zip64EocdOffset = to(buffer + 8); -+ totalNbDisks = to(buffer + 16); - } - - //------------------------------------------------------------------------- --- -2.43.0 - diff --git a/0001-Avoid-tmp-when-running-some-tests.patch b/0001-Avoid-tmp-when-running-some-tests.patch deleted file mode 100644 index ff4dea6..0000000 --- a/0001-Avoid-tmp-when-running-some-tests.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 2c256ffaf44d8d811398c6dfe0ea754ae55672eb Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Wed, 22 Nov 2023 06:20:19 +0100 -Subject: [PATCH] Avoid /tmp when running some tests - -Many features in xrootd require file system support for extended file -attributes. Tests that run tests on these features fail if the file -system does not support them. The /tmp directory in many Linux -installations is using a tmpfs partition. The tmpfs file system does -not support extended file attributes, so some tests that use /tmp to -store files fail. - -This commit changes some affected tests so that they create the -temporary directory containing the test files in the current working -directory instead of /tmp. - -Example of failure: - -17/34 Test #20: XrdEc::AlignedWriteTest ...................................................***Failed 0.07 sec -You have selected: - -Selected tests/ - Selected tests/MicroTest::AlignedWriteTest - -Running: - -.F - -MicroTest.cc:506:Assertion -Test name: MicroTest::AlignedWriteTest -assertion failed -- Expression: _st.IsOK() -- [*status]: [ERROR] Internal error: std::bad_alloc - -Failures !!! -Run: 1 Failure total: 1 Failures: 1 Errors: 0 - -The following tests FAILED: - 20 - XrdEc::AlignedWriteTest (Failed) - 21 - XrdEc::SmallWriteTest (Failed) - 22 - XrdEc::BigWriteTest (Failed) - 23 - XrdEc::VectorReadTest (Failed) - 24 - XrdEc::IllegalVectorReadTest (Failed) - 25 - XrdEc::AlignedWrite1MissingTest (Failed) - 26 - XrdEc::AlignedWrite2MissingTest (Failed) - 27 - XrdEc::AlignedWriteTestIsalCrcNoMt (Failed) - 28 - XrdEc::SmallWriteTestIsalCrcNoMt (Failed) - 29 - XrdEc::BigWriteTestIsalCrcNoMt (Failed) - 30 - XrdEc::AlignedWrite1MissingTestIsalCrcNoMt (Failed) - 31 - XrdEc::AlignedWrite2MissingTestIsalCrcNoMt (Failed) - -In addition to addressing the above failures, the commit also -addresses the following warnings during the XRootD::smoke-test test: - -34: setfattr: /tmp/xrdfs-test-ChGSEb/01.ref: Operation not supported -34: Extended attributes not supported, using downloaded checksums for server checks -34: setfattr: /tmp/xrdfs-test-ChGSEb/02.ref: Operation not supported -34: Extended attributes not supported, using downloaded checksums for server checks -34: setfattr: /tmp/xrdfs-test-ChGSEb/03.ref: Operation not supported -34: Extended attributes not supported, using downloaded checksums for server checks ---- - tests/XRootD/smoke.sh | 2 +- - tests/XrdEcTests/MicroTest.cc | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/tests/XRootD/smoke.sh b/tests/XRootD/smoke.sh -index 58e0f93f0..76ae67fd9 100755 ---- a/tests/XRootD/smoke.sh -+++ b/tests/XRootD/smoke.sh -@@ -39,7 +39,7 @@ ${XRDFS} ${HOST} statvfs / - ${XRDFS} ${HOST} spaceinfo / - - # create local temporary directory --TMPDIR=$(mktemp -d /tmp/xrdfs-test-XXXXXX) -+TMPDIR=$(mktemp -d ${PWD}/xrdfs-test-XXXXXX) - - # cleanup after ourselves if something fails - trap "rm -rf ${TMPDIR}" EXIT -diff --git a/tests/XrdEcTests/MicroTest.cc b/tests/XrdEcTests/MicroTest.cc -index d02743351..5b375c6fe 100644 ---- a/tests/XrdEcTests/MicroTest.cc -+++ b/tests/XrdEcTests/MicroTest.cc -@@ -34,6 +34,8 @@ - - #include "XrdZip/XrdZipCDFH.hh" - -+#include "XrdSys/XrdSysPlatform.hh" -+ - #include - #include - #include -@@ -280,7 +282,9 @@ void MicroTest::Init( bool usecrc32c ) - objcfg.reset( new ObjCfg( "test.txt", nbdata, nbparity, chsize, usecrc32c, true ) ); - rawdata.clear(); - -- char tmpdir[32] = "/tmp/xrootd-xrdec-XXXXXX"; -+ char tmpdir[MAXPATHLEN]; -+ CPPUNIT_ASSERT( getcwd(tmpdir, MAXPATHLEN - 21) ); -+ strcat(tmpdir, "/xrootd-xrdec-XXXXXX"); - // create the data directory - CPPUNIT_ASSERT( mkdtemp(tmpdir) ); - datadir = tmpdir; --- -2.42.0 - diff --git a/0001-CMake-Trace-actual-variables.patch b/0001-CMake-Trace-actual-variables.patch deleted file mode 100644 index 94c84bd..0000000 --- a/0001-CMake-Trace-actual-variables.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 896f95c382b3bde7d7c6d184649a7e145d9f3419 Mon Sep 17 00:00:00 2001 -From: Jonas Hahnfeld -Date: Mon, 4 Dec 2023 11:51:44 +0100 -Subject: [PATCH 1/2] [CMake] Trace actual variables - ---- - cmake/XRootDConfig.cmake.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cmake/XRootDConfig.cmake.in b/cmake/XRootDConfig.cmake.in -index 971b415a7..0f95a8f54 100644 ---- a/cmake/XRootDConfig.cmake.in -+++ b/cmake/XRootDConfig.cmake.in -@@ -174,8 +174,8 @@ message(TRACE "XRootD_VERSION_NUMBER = '${XRootD_VERSION_NUMBER}'") - - message(TRACE "XRootD_FOUND = '${XRootD_FOUND}'") - message(TRACE "XRootD_INSTALL_PREFIX = '@CMAKE_INSTALL_PREFIX@'") --message(TRACE "XRootD_INCLUDE_DIR = '@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@'") --message(TRACE "XRootD_LIBRARY_DIR = '@PACKAGE_CMAKE_INSTALL_LIBDIR@'") -+message(TRACE "XRootD_INCLUDE_DIR = '${XRootD_INCLUDE_DIR}'") -+message(TRACE "XRootD_LIBRARY_DIR = '${XRootD_LIBRARY_DIR}'") - message(TRACE "XRootD_LIBRARIES = '${XRootD_LIBRARIES}'") - - foreach(COMPONENT UTILS CLIENT SERVER HTTP POSIX SSI) --- -2.43.0 - diff --git a/0001-Fix-maybe-uninitialized-warning.patch b/0001-Fix-maybe-uninitialized-warning.patch deleted file mode 100644 index 50c1084..0000000 --- a/0001-Fix-maybe-uninitialized-warning.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b853ff8e86ecc82fc5be87d95fe6bcf28bfaa469 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sun, 19 Nov 2023 09:55:54 +0100 -Subject: [PATCH] Fix maybe-uninitialized warning -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -.../src/XrdEc/XrdEcReader.cc:934:72: error: ‘info’ may be used uninitialized [-Werror=maybe-uninitialized] - 934 | blockMap[blkid]->stripes[strpid].resize( info ->GetSize() ); - | ^ -.../src/XrdEc/XrdEcReader.cc:932:42: note: ‘info’ was declared here - 932 | XrdCl::StatInfo* info; - | ^ ---- - src/XrdEc/XrdEcReader.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/XrdEc/XrdEcReader.cc b/src/XrdEc/XrdEcReader.cc -index 62dcb0461..9ac55b538 100644 ---- a/src/XrdEc/XrdEcReader.cc -+++ b/src/XrdEc/XrdEcReader.cc -@@ -929,7 +929,7 @@ namespace XrdEc - } - - blockMap[blkid]->state[strpid] = block_t::Loading; -- XrdCl::StatInfo* info; -+ XrdCl::StatInfo* info = nullptr; - if(dataarchs[url]->Stat(objcfg.GetFileName(blkid, strpid), info).IsOK()) - blockMap[blkid]->stripes[strpid].resize( info ->GetSize() ); - --- -2.42.0 - diff --git a/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch b/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch deleted file mode 100644 index 1421037..0000000 --- a/0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fde7669ff9006495034a493386c72d080158f027 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Wed, 22 Nov 2023 19:29:12 +0100 -Subject: [PATCH] If extended attributes are not supported xattr->Get() returns - -ENOTSUP. When this small negative value is cast to a size_t in the call to - new on the following line it becomes a very large integer and the request to - allocate this enormous memory block fails with a std::bad_alloc exception. - -This commit adds a check on the returned size and returns an error if -it is negative avoiding triggering the std::bad_alloc exception. ---- - src/XrdCl/XrdClLocalFileHandler.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/XrdCl/XrdClLocalFileHandler.cc b/src/XrdCl/XrdClLocalFileHandler.cc -index e25d8f2a2..42cce9a30 100644 ---- a/src/XrdCl/XrdClLocalFileHandler.cc -+++ b/src/XrdCl/XrdClLocalFileHandler.cc -@@ -664,6 +664,12 @@ namespace XrdCl - std::unique_ptr buffer; - - int size = xattr->Get( name.c_str(), 0, 0, 0, fd ); -+ if( size < 0 ) -+ { -+ XRootDStatus status( stError, errLocalError, -size ); -+ response.push_back( XAttr( *itr, "", status ) ); -+ continue; -+ } - buffer.reset( new char[size] ); - int ret = xattr->Get( name.c_str(), buffer.get(), size, 0, fd ); - --- -2.43.0 - diff --git a/0001-Posix-open-called-with-wrong-flags-in-test.patch b/0001-Posix-open-called-with-wrong-flags-in-test.patch deleted file mode 100644 index a347233..0000000 --- a/0001-Posix-open-called-with-wrong-flags-in-test.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 190c09059122542971530169746effff769e583a Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 28 Oct 2023 15:54:24 +0200 -Subject: [PATCH 1/3] Posix open() called with wrong flags in test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -OpenFlags::Flags should not be used for the flags argument in a posix -open() call, since they use different values. - -The OpenFlags::Flags values are defined in src/XrdCl/XrdClFileSystem.hh: - - MakePath = kXR_mkpath, //!< Create directory path if it does not - //!< already exist - New = kXR_new, //!< Open the file only if it does not already - Update = kXR_open_updt, //!< Open for reading and writing - -The kXR_* values are defined in src/XProtocol/XProtocol.hh: - kXR_new = 0x0008, // 8 - kXR_mkpath = 0x0100, // 256 - kXR_open_updt= 0x0020, // 32 - -As can be seen these do not correspond to the O_* values used in the -posix open() call. What they actually mean depends on the system and -varies between architectures. - -On hppa Linux O_CREAT is defind in /usr/include/hppa-linux-gnu/asm/fcntl.h: - - #define O_CREAT 000000400 /* not fcntl */ - -Since 0o400 = 0x100 = 256 this by chance matches kXR_mkpath and -triggers the error below. On other architectures the wrong flags are -just silently accepted. - -In file included from /usr/include/fcntl.h:342, - from /<>/tests/XrdClTests/LocalFileHandlerTest.cc:25: -In function ‘int open(const char*, int, ...)’, - inlined from ‘void LocalFileHandlerTest::WriteMkdirTest()’ at /<>/tests/XrdClTests/LocalFileHandlerTest.cc:210:17: -/usr/include/hppa-linux-gnu/bits/fcntl2.h:50:31: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments - 50 | __open_missing_mode (); - | ~~~~~~~~~~~~~~~~~~~~^~ ---- - tests/XrdClTests/LocalFileHandlerTest.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/XrdClTests/LocalFileHandlerTest.cc b/tests/XrdClTests/LocalFileHandlerTest.cc -index 0a58ed6ef..f8618c14f 100644 ---- a/tests/XrdClTests/LocalFileHandlerTest.cc -+++ b/tests/XrdClTests/LocalFileHandlerTest.cc -@@ -142,7 +142,7 @@ void LocalFileHandlerTest::WriteTest(){ - //---------------------------------------------------------------------------- - // Read file with POSIX calls to confirm correct write - //---------------------------------------------------------------------------- -- int fd = open( targetURL.c_str(), flags ); -+ int fd = open( targetURL.c_str(), O_RDWR ); - int rc = read( fd, buffer, int( writeSize ) ); - CPPUNIT_ASSERT_EQUAL( rc, int( writeSize ) ); - std::string read( (char *)buffer, writeSize ); -@@ -176,7 +176,7 @@ void LocalFileHandlerTest::WriteWithOffsetTest(){ - //---------------------------------------------------------------------------- - // Read file with POSIX calls to confirm correct write - //---------------------------------------------------------------------------- -- int fd = open( targetURL.c_str(), flags ); -+ int fd = open( targetURL.c_str(), O_RDWR ); - int rc = read( fd, buffer, offset ); - CPPUNIT_ASSERT_EQUAL( rc, int( offset ) ); - std::string read( (char *)buffer, offset ); -@@ -207,7 +207,7 @@ void LocalFileHandlerTest::WriteMkdirTest(){ - //---------------------------------------------------------------------------- - // Read file with POSIX calls to confirm correct write - //---------------------------------------------------------------------------- -- int fd = open( targetURL.c_str(), flags ); -+ int fd = open( targetURL.c_str(), O_RDWR ); - int rc = read( fd, buffer, writeSize ); - CPPUNIT_ASSERT_EQUAL( rc, int( writeSize ) ); - std::string read( buffer, writeSize ); --- -2.41.0 - diff --git a/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch b/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch deleted file mode 100644 index 1094599..0000000 --- a/0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch +++ /dev/null @@ -1,36 +0,0 @@ -From fe2224d33b0c310e19d497e6e795f779c8e88001 Mon Sep 17 00:00:00 2001 -From: Guilherme Amadio -Date: Thu, 30 Nov 2023 10:02:03 +0100 -Subject: [PATCH] Reapply "[XrdCl] Make sure error message does not include a - null-character." - -This reverts commit 5a832596a59d1055f59620d43fbb740955ce6787. -Even though commit 9987b4b41990df69ae611a523acb76c69eeccbbb did fix -an error message that had a second null termination character, reverting -this change was a mistake, as this change is actually still needed to -avoid the single terminating null byte in error messages from appearing -in the output of the client. - -Closes: #2138 ---- - src/XrdCl/XrdClXRootDMsgHandler.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc -index 1bd60a3e3..81e41d21b 100644 ---- a/src/XrdCl/XrdClXRootDMsgHandler.cc -+++ b/src/XrdCl/XrdClXRootDMsgHandler.cc -@@ -1202,7 +1202,9 @@ namespace XrdCl - if( pStatus.code == errErrorResponse ) - { - st->errNo = rsp->body.error.errnum; -- std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-4 ); -+ // omit the last character as the string returned from the server -+ // (acording to protocol specs) should be null-terminated -+ std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-5 ); - if( st->errNo == kXR_noReplicas && !pLastError.IsOK() ) - errmsg += " Last seen error: " + pLastError.ToString(); - st->SetErrorMessage( errmsg ); --- -2.43.0 - diff --git a/0001-The-installed-cmake-files-are-now-generated-and-cont.patch b/0001-The-installed-cmake-files-are-now-generated-and-cont.patch deleted file mode 100644 index 01a4817..0000000 --- a/0001-The-installed-cmake-files-are-now-generated-and-cont.patch +++ /dev/null @@ -1,64 +0,0 @@ -From e00f462610c8d0b1798a79ebbab7bc7561b42d2b Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 31 Oct 2023 09:45:58 +0100 -Subject: [PATCH] The installed cmake files are now generated and contain - architecture dependent information. Installing them in datadir (/usr/share) - now results in conflicts if packages for more than one architecture is - installed in parallel. Move the installed cmake files to libdir - (/usr/lib(64)?, /usr/lib/). - -Found by Debian's MultiArch hinter. ---- - CMakeLists.txt | 4 ++-- - packaging/debian/libxrootd-dev.install | 2 +- - packaging/rhel/xrootd.spec.in | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 36a7f62b5..438ff5666 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -68,7 +68,7 @@ configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in cmake/${PROJE - INSTALL_PREFIX - ${CMAKE_INSTALL_PREFIX} - INSTALL_DESTINATION -- ${CMAKE_INSTALL_DATADIR}/xrootd/cmake -+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} - PATH_VARS - CMAKE_INSTALL_INCLUDEDIR - CMAKE_INSTALL_LIBDIR -@@ -76,7 +76,7 @@ configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in cmake/${PROJE - ) - - install(DIRECTORY ${PROJECT_BINARY_DIR}/cmake/ -- DESTINATION ${CMAKE_INSTALL_DATADIR}/xrootd/cmake) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) - - #------------------------------------------------------------------------------- - # Configure an 'uninstall' target -diff --git a/packaging/debian/libxrootd-dev.install b/packaging/debian/libxrootd-dev.install -index c92412235..e6ffeaa6b 100644 ---- a/packaging/debian/libxrootd-dev.install -+++ b/packaging/debian/libxrootd-dev.install -@@ -13,4 +13,4 @@ usr/lib/*/libXrdCrypto.so - usr/lib/*/libXrdCryptoLite.so - usr/lib/*/libXrdUtils.so - usr/lib/*/libXrdXml.so --usr/share/xrootd/cmake/XRootDConfig.cmake -+usr/lib/*/cmake/XRootD -diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in -index 449de06a3..4a6af8f18 100644 ---- a/packaging/rhel/xrootd.spec.in -+++ b/packaging/rhel/xrootd.spec.in -@@ -919,7 +919,7 @@ fi - %{_libdir}/libXrdUtils.so - %{_libdir}/libXrdXml.so - %{_includedir}/xrootd/XrdXml/XrdXmlReader.hh --%{_datadir}/xrootd/cmake -+%{_libdir}/cmake/XRootD - - %files client-libs - %defattr(-,root,root,-) --- -2.41.0 - diff --git a/0001-XrdZip-Include-cstdint-for-standard-int-types.patch b/0001-XrdZip-Include-cstdint-for-standard-int-types.patch deleted file mode 100644 index f8a16c1..0000000 --- a/0001-XrdZip-Include-cstdint-for-standard-int-types.patch +++ /dev/null @@ -1,61 +0,0 @@ -From d414b2951855d2dbcba952ec9f271d918865e391 Mon Sep 17 00:00:00 2001 -From: Guilherme Amadio -Date: Thu, 2 Nov 2023 17:09:28 +0100 -Subject: [PATCH] [XrdZip] Include for standard int types - ---- - src/XrdZip/XrdZipDataDescriptor.hh | 2 ++ - src/XrdZip/XrdZipExtra.hh | 3 +++ - src/XrdZip/XrdZipUtils.hh | 6 +++--- - 3 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/XrdZip/XrdZipDataDescriptor.hh b/src/XrdZip/XrdZipDataDescriptor.hh -index 22e76b5e1..9e48b2446 100644 ---- a/src/XrdZip/XrdZipDataDescriptor.hh -+++ b/src/XrdZip/XrdZipDataDescriptor.hh -@@ -25,6 +25,8 @@ - #ifndef SRC_XRDZIP_XRDZIPDATADESCRIPTOR_HH_ - #define SRC_XRDZIP_XRDZIPDATADESCRIPTOR_HH_ - -+#include -+ - namespace XrdZip - { - //--------------------------------------------------------------------------- -diff --git a/src/XrdZip/XrdZipExtra.hh b/src/XrdZip/XrdZipExtra.hh -index c415faa7e..041b50ec2 100644 ---- a/src/XrdZip/XrdZipExtra.hh -+++ b/src/XrdZip/XrdZipExtra.hh -@@ -27,6 +27,9 @@ - - #include "XrdZip/XrdZipUtils.hh" - -+#include -+#include -+ - namespace XrdZip - { - //--------------------------------------------------------------------------- -diff --git a/src/XrdZip/XrdZipUtils.hh b/src/XrdZip/XrdZipUtils.hh -index 1d48e543d..619f16daf 100644 ---- a/src/XrdZip/XrdZipUtils.hh -+++ b/src/XrdZip/XrdZipUtils.hh -@@ -25,12 +25,12 @@ - #ifndef SRC_XRDZIP_XRDZIPUTILS_HH_ - #define SRC_XRDZIP_XRDZIPUTILS_HH_ - -+#include -+#include - #include -- - #include --#include --#include - #include -+#include - - namespace XrdZip - { --- -2.43.0 - diff --git a/0001-XrdZip-Support-Big-Endian.patch b/0001-XrdZip-Support-Big-Endian.patch deleted file mode 100644 index ead2808..0000000 --- a/0001-XrdZip-Support-Big-Endian.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 8764acdd57aa98a1fa48706ddb1bc857ae021299 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Mon, 4 Dec 2023 19:07:19 +0100 -Subject: [PATCH] [XrdZip] Support Big Endian - ---- - src/XrdZip/XrdZipLFH.hh | 3 ++- - src/XrdZip/XrdZipUtils.hh | 35 ++++++++++++++++++++++++++++++++++- - 2 files changed, 36 insertions(+), 2 deletions(-) - -diff --git a/src/XrdZip/XrdZipLFH.hh b/src/XrdZip/XrdZipLFH.hh -index 972f373a4..aac99848e 100644 ---- a/src/XrdZip/XrdZipLFH.hh -+++ b/src/XrdZip/XrdZipLFH.hh -@@ -80,7 +80,8 @@ namespace XrdZip - from_buffer( minZipVersion, buffer ); - from_buffer( generalBitFlag, buffer ); - from_buffer( compressionMethod, buffer ); -- from_buffer( timestmp, buffer ); -+ from_buffer( timestmp.time, buffer ); -+ from_buffer( timestmp.date, buffer ); - from_buffer( ZCRC32, buffer ); - from_buffer( compressedSize, buffer ); - from_buffer( uncompressedSize, buffer ); -diff --git a/src/XrdZip/XrdZipUtils.hh b/src/XrdZip/XrdZipUtils.hh -index 619f16daf..892771875 100644 ---- a/src/XrdZip/XrdZipUtils.hh -+++ b/src/XrdZip/XrdZipUtils.hh -@@ -27,13 +27,36 @@ - - #include - #include -+#include - #include - #include - #include - #include - -+#if defined(__APPLE__) -+#include -+#else -+#include -+#endif -+ -+#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || \ -+ defined(__IEEE_BIG_ENDIAN) || \ -+ (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) -+#define XrdZip_Big_Endian -+#endif -+ - namespace XrdZip - { -+#if defined(__APPLE__) -+ inline static uint16_t BSwap(uint16_t x) { return OSSwapInt16(x); } -+ inline static uint32_t BSwap(uint32_t x) { return OSSwapInt32(x); } -+ inline static uint64_t BSwap(uint64_t x) { return OSSwapInt64(x); } -+#else -+ inline static uint16_t BSwap(uint16_t x) { return bswap_16(x); } -+ inline static uint32_t BSwap(uint32_t x) { return bswap_32(x); } -+ inline static uint64_t BSwap(uint64_t x) { return bswap_64(x); } -+#endif -+ - //--------------------------------------------------------------------------- - // Exception indicating corrupted data - //--------------------------------------------------------------------------- -@@ -61,7 +84,11 @@ namespace XrdZip - { - const char *begin = reinterpret_cast( &value ); - const char *end = begin + sizeof( INT ); -+#ifdef XrdZip_Big_Endian -+ std::reverse_copy( begin, end, std::back_inserter( buffer ) ); -+#else - std::copy( begin, end, std::back_inserter( buffer ) ); -+#endif - } - - //--------------------------------------------------------------------------- -@@ -72,6 +99,9 @@ namespace XrdZip - inline static void from_buffer( INT &var, const char *&buffer ) - { - memcpy( &var, buffer, sizeof( INT ) ); -+#ifdef XrdZip_Big_Endian -+ var = BSwap(var); -+#endif - buffer += sizeof( INT ); - } - -@@ -82,7 +112,10 @@ namespace XrdZip - inline static INT to( const char *buffer ) - { - INT value; -- memcpy( &value, buffer, sizeof( INT) ); -+ memcpy( &value, buffer, sizeof( INT ) ); -+#ifdef XrdZip_Big_Endian -+ value = BSwap(value); -+#endif - return value; - } - --- -2.43.0 - diff --git a/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch b/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch deleted file mode 100644 index 752cf53..0000000 --- a/0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ccedaabc377e668280eec8bb22f0dbb76550beec Mon Sep 17 00:00:00 2001 -From: Jonas Hahnfeld -Date: Mon, 4 Dec 2023 11:52:44 +0100 -Subject: [PATCH 2/2] [CMake] Fix include path in XRootDConfig.cmake - -Headers are installed into the subdirectory xrootd/. This was broken -with commit c6e0e598ce ("[CMake] Find only XRootD matching -XRootDConfig.cmake installation path") released with version 5.6.3. ---- - cmake/XRootDConfig.cmake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/XRootDConfig.cmake.in b/cmake/XRootDConfig.cmake.in -index 0f95a8f54..0a4ce3fe5 100644 ---- a/cmake/XRootDConfig.cmake.in -+++ b/cmake/XRootDConfig.cmake.in -@@ -50,7 +50,7 @@ SET( XROOTD_SSI_FOUND FALSE ) - - set_and_check(XRootD_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}") - set_and_check(XRootD_DATA_DIR "@PACKAGE_CMAKE_INSTALL_DATADIR@") --set_and_check(XRootD_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") -+set_and_check(XRootD_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/xrootd") - set_and_check(XRootD_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") - - set(XRootD_INCLUDE_DIRS "${XRootD_INCLUDE_DIR};${XRootD_INCLUDE_DIR}/private") --- -2.43.0 - diff --git a/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch b/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch deleted file mode 100644 index 739edc1..0000000 --- a/0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 08e2bede433a2f513aba0b28686a31cb0b769079 Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Sat, 28 Oct 2023 17:55:58 +0200 -Subject: [PATCH 2/3] PATH_MAX / MAXPATHLEN might be undefined - -XrdSys/XrdSysPlatform.hh defines MAXPATHLEN if needed. - -/<>/tests/XrdCl/XrdClURL.cc: In member function 'virtual void URLTest_LocalURLs_Test::TestBody()': -/<>/tests/XrdCl/XrdClURL.cc:17:12: error: 'PATH_MAX' was not declared in this scope - 17 | char url[PATH_MAX]; - | ^~~~~~~~ -/<>/tests/XrdCl/XrdClURL.cc:21:18: error: 'url' was not declared in this scope - 21 | snprintf(url, sizeof(url), "%s%s%s", protocol, path, params); - | ^~~ -/<>/tests/XrdCl/XrdClURL.cc: In member function 'virtual void URLTest_RemoteURLs_Test::TestBody()': -/<>/tests/XrdCl/XrdClURL.cc:47:12: error: 'PATH_MAX' was not declared in this scope - 47 | char url[PATH_MAX]; - | ^~~~~~~~ -/<>/tests/XrdCl/XrdClURL.cc:57:26: error: 'url' was not declared in this scope - 57 | snprintf(url, sizeof(url), "%s%s%s%s%s%s%s%s%s%s%s%s", - | ^~~ -/<>/tests/XrdCl/XrdClURL.cc:63:26: error: 'path_params' was not declared in this scope - 63 | snprintf(path_params, sizeof(path_params), "%s%s", *path == '/' ? path+1 : path, params); - | ^~~~~~~~~~~ ---- - tests/XrdCl/XrdClURL.cc | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/tests/XrdCl/XrdClURL.cc b/tests/XrdCl/XrdClURL.cc -index 24e7fdc2a..046f41a8c 100644 ---- a/tests/XrdCl/XrdClURL.cc -+++ b/tests/XrdCl/XrdClURL.cc -@@ -1,6 +1,8 @@ - #undef NDEBUG - - #include -+#include "XrdSys/XrdSysPlatform.hh" -+ - #include - - #include -@@ -14,7 +16,7 @@ class URLTest : public ::testing::Test {}; - - TEST(URLTest, LocalURLs) - { -- char url[PATH_MAX]; -+ char url[MAXPATHLEN]; - for (const auto& protocol : { "", "file://" }) { - for (const auto& path : { "/dev", "/dev/", "/dev/null" }) { - for (const auto& params : { "", "?param=value", "?param1=value1¶m2=value2" }) { -@@ -44,8 +46,8 @@ TEST(URLTest, LocalURLs) - - TEST(URLTest, RemoteURLs) - { -- char url[PATH_MAX]; -- char path_params[PATH_MAX]; -+ char url[MAXPATHLEN]; -+ char path_params[MAXPATHLEN]; - for (const char *protocol : { "", "http", "root", "https", "roots" }) { - int default_port = *protocol == 'h' ? (strlen(protocol) == 4 ? 80 : 443) : 1094; - for (const char *user : { "", "alice", "bob", "user_123", "xrootd" }) { --- -2.41.0 - diff --git a/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch b/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch deleted file mode 100644 index c936cec..0000000 --- a/0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 6a381c776976c21161fa279c75b6fa2c0ce4774f Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 31 Oct 2023 18:17:23 +0100 -Subject: [PATCH 3/3] Don't try to enable TCP_CORK in GNU/Hurd - -The "man tcp" says about TCP_CORK: "This option should not be used in -code intended to be portable". So, it should not be expected to be -working everywhere. - -The failure below is from Debian GNU/Hurd: - -test 22 - Start 22: XRootD::smoke-test - -22: Test command: /usr/bin/sh "-c" "/<>/tests/XRootD/smoke.sh" -22: Working Directory: /<>/obj-i686-gnu/tests/XRootD -22: Environment variables: -22: XRDCP=/<>/obj-i686-gnu/src/XrdCl/xrdcp -22: XRDFS=/<>/obj-i686-gnu/src/XrdCl/xrdfs -22: CRC32C=/<>/obj-i686-gnu/src/xrdcrc32c -22: ADLER32=/<>/obj-i686-gnu/src/xrdadler32 -22: HOST=root://localhost:10940 -22: Test timeout computed to be: 10000000 -22: Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023) -22: v5.6.3 -22: Using /<>/obj-i686-gnu/src/XrdCl/xrdcp: -22: [FATAL] Socket opt error: no message of desired type -21/22 Test #22: XRootD::smoke-test ........................................................***Failed 0.13 sec -Using /usr/bin/openssl: OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023) -v5.6.3 -Using /<>/obj-i686-gnu/src/XrdCl/xrdcp: -[FATAL] Socket opt error: no message of desired type ---- - src/XrdCl/XrdClSocket.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/XrdCl/XrdClSocket.cc b/src/XrdCl/XrdClSocket.cc -index a94eb4b48..a2cb47c12 100644 ---- a/src/XrdCl/XrdClSocket.cc -+++ b/src/XrdCl/XrdClSocket.cc -@@ -781,7 +781,8 @@ namespace XrdCl - //------------------------------------------------------------------------ - XRootDStatus Socket::Cork() - { --#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH -+#if defined(TCP_CORK) && !defined(__GNU__) -+ // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH - if( pCorked ) return XRootDStatus(); - - int state = 1; -@@ -798,7 +799,8 @@ namespace XrdCl - //------------------------------------------------------------------------ - XRootDStatus Socket::Uncork() - { --#if defined(TCP_CORK) // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH -+#if defined(TCP_CORK) && !defined(__GNU__) -+ // it's not defined on mac, we might want explore the possibility of using TCP_NOPUSH - if( !pCorked ) return XRootDStatus(); - - int state = 0; --- -2.41.0 - diff --git a/sources b/sources index 162c0f4..ce3ee32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.3.tar.gz) = 72a875064181225deef57eae89c651696a083896d7bd26099c7dd321097c2b90acef42dc1c4ef55334f0ff9b6d33bf0a82e3c9d92511b69b955fbdadeff4b625 +SHA512 (xrootd-5.6.4.tar.gz) = efa88da2c9e9e55aeab9c4fbec0ec688fbc6ea8e16178bbcbdd534a09609b5c645cafee023fed48495cda8e865210e2fd3ba4830852f157626ecc1995eb55988 diff --git a/xrootd.spec b/xrootd.spec index bd2d344..6637722 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,54 +13,13 @@ Name: xrootd Epoch: 1 -Version: 5.6.3 -Release: 3%{?dist} +Version: 5.6.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 URL: https://xrootd.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz -# Fixes for test issues -# https://github.com/xrootd/xrootd/pull/2115 -Patch0: 0001-Posix-open-called-with-wrong-flags-in-test.patch -Patch1: 0002-PATH_MAX-MAXPATHLEN-might-be-undefined.patch -Patch2: 0003-Don-t-try-to-enable-TCP_CORK-in-GNU-Hurd.patch - -# Installed CMake files are architecture dependent -# https://github.com/xrootd/xrootd/pull/2116 -Patch3: 0001-The-installed-cmake-files-are-now-generated-and-cont.patch - -# Fix maybe-uninitialized warning -# https://github.com/xrootd/xrootd/pull/2124 -Patch4: 0001-Fix-maybe-uninitialized-warning.patch - -# Avoid /tmp when running some tests -# https://github.com/xrootd/xrootd/pull/2129 -Patch5: 0001-Avoid-tmp-when-running-some-tests.patch - -# Fail gracefully in case of unsupported extended file attributes -# https://github.com/xrootd/xrootd/pull/2130 -Patch6: 0001-If-extended-attributes-are-not-supported-xattr-Get-r.patch - -# Avoid null bytes in error message strings -# https://github.com/xrootd/xrootd/pull/2138 -Patch7: 0001-Reapply-XrdCl-Make-sure-error-message-does-not-inclu.patch - -# Fix include path in XRootDConfig.cmake -# https://github.com/root-project/root/issues/12631 -# https://github.com/xrootd/xrootd/pull/2142 -Patch8: 0001-CMake-Trace-actual-variables.patch -Patch9: 0002-CMake-Fix-include-path-in-XRootDConfig.cmake.patch - -# Avoid dereferencing unaligned pointers -# https://github.com/xrootd/xrootd/pull/2144 -Patch10: 0001-Avoid-bus-errors.patch - -# Support big endian in XrdZip -# https://github.com/xrootd/xrootd/pull/2145 -Patch11: 0001-XrdZip-Include-cstdint-for-standard-int-types.patch -Patch12: 0001-XrdZip-Support-Big-Endian.patch - %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain @@ -337,19 +296,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P 0 -p1 -%patch -P 1 -p1 -%patch -P 2 -p1 -%patch -P 3 -p1 -%patch -P 4 -p1 -%patch -P 5 -p1 -%patch -P 6 -p1 -%patch -P 7 -p1 -%patch -P 8 -p1 -%patch -P 9 -p1 -%patch -P 10 -p1 -%patch -P 11 -p1 -%patch -P 12 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -506,6 +452,8 @@ 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 + if [ $1 -eq 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : fi @@ -521,8 +469,6 @@ if [ $1 -eq 0 ] ; then fi %postun server -%tmpfiles_create %{_tmpfilesdir}/%{name}.conf - if [ $1 -ge 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : for DAEMON in xrootd cmsd frm_purged frm_xfrd; do @@ -762,6 +708,10 @@ fi %doc %{_pkgdocdir} %changelog +* Mon Dec 11 2023 Mattias Ellert - 1:5.6.4-1 +- Update to version 5.6.4 +- Drop patches accepted upstream or previously backported + * Tue Dec 05 2023 Mattias Ellert - 1:5.6.3-3 - Avoid /tmp when running some tests - Fail gracefully in case of unsupported extended file attributes From b7f4c1ccbd82a9a4cc1f9856772373464ad57a62 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 17 Jan 2024 10:17:02 +0100 Subject: [PATCH 19/62] Fix printf null pointer error --- ...lude-byteswap.h-for-BSD-and-GNU-Hurd.patch | 48 +++++++++++++++++++ ...mpilation-error-reported-with-gcc-14.patch | 36 ++++++++++++++ xrootd.spec | 11 ++++- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch create mode 100644 0001-Fix-compilation-error-reported-with-gcc-14.patch diff --git a/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch b/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch new file mode 100644 index 0000000..4dc51fd --- /dev/null +++ b/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch @@ -0,0 +1,48 @@ +From 333a5dd8187a897bc2c3c5e8097be0aef11b8e7e Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 12 Dec 2023 13:39:53 +0100 +Subject: [PATCH] Add #include for BSD and GNU/Hurd + +--- + src/XrdSys/XrdSysPlatform.hh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh +index 0024369bb..6f67b3b72 100644 +--- a/src/XrdSys/XrdSysPlatform.hh ++++ b/src/XrdSys/XrdSysPlatform.hh +@@ -67,12 +67,18 @@ + #if defined(__FreeBSD__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) + #include + #include ++#if defined(__FreeBSD__) ++#include ++#else ++#include ++#endif + #define MAXNAMELEN NAME_MAX + #endif + + #ifdef __GNU__ + #include + #include ++#include + // These are undefined on purpose in GNU/Hurd. + // The values below are the ones used in Linux. + // The proper fix is to rewrite the code to not use hardcoded values, +@@ -161,6 +167,12 @@ typedef off_t off64_t; + #define bswap_64 OSSwapInt64 + #endif + ++#if defined(__FreeBSD__) ++#define bswap_16 bswap16 ++#define bswap_32 bswap32 ++#define bswap_64 bswap64 ++#endif ++ + static inline uint16_t bswap(uint16_t x) { return bswap_16(x); } + static inline uint32_t bswap(uint32_t x) { return bswap_32(x); } + static inline uint64_t bswap(uint64_t x) { return bswap_64(x); } +-- +2.43.0 + diff --git a/0001-Fix-compilation-error-reported-with-gcc-14.patch b/0001-Fix-compilation-error-reported-with-gcc-14.patch new file mode 100644 index 0000000..4a0be8a --- /dev/null +++ b/0001-Fix-compilation-error-reported-with-gcc-14.patch @@ -0,0 +1,36 @@ +From 05393ac566fd2e1906fd7cf77b81b1019731c7cf Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Wed, 17 Jan 2024 09:59:02 +0100 +Subject: [PATCH] Fix compilation error reported with gcc 14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +/builddir/build/BUILD/xrootd-5.6.4/src/XrdSecgsi/XrdSecgsitest.cc: In function ‘pdots(char const*, bool)’: +/builddir/build/BUILD/xrootd-5.6.4/src/XrdSecgsi/XrdSecgsitest.cc:90:15: error: ‘%s’ directive argument is null [-Werror=format-overflow=] + 90 | printf("|| %s ", t); + | ^~ +--- + src/XrdSecgsi/XrdSecgsitest.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/XrdSecgsi/XrdSecgsitest.cc b/src/XrdSecgsi/XrdSecgsitest.cc +index b0be6da04..98a3fdda7 100644 +--- a/src/XrdSecgsi/XrdSecgsitest.cc ++++ b/src/XrdSecgsi/XrdSecgsitest.cc +@@ -87,7 +87,11 @@ static void pdots(const char *t, bool ok = 1) + unsigned int i = 0; + unsigned int l = (t) ? strlen (t) : 0; + unsigned int np = PRTWIDTH - l - 8; +- printf("|| %s ", t); ++ if (l > 0) { ++ printf("|| %s ", t); ++ } else { ++ printf("|| "); ++ } + for (; i < np ; i++) { printf("."); } + printf(" %s\n", (ok ? "PASSED" : "FAILED")); + } +-- +2.43.0 + diff --git a/xrootd.spec b/xrootd.spec index 6637722..6073c98 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,11 +14,15 @@ Name: xrootd Epoch: 1 Version: 5.6.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.slac.stanford.edu/ Source0: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz +# https://github.com/xrootd/xrootd/pull/2149 +Patch0: 0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch +# https://github.com/xrootd/xrootd/pull/2165 +Patch1: 0001-Fix-compilation-error-reported-with-gcc-14.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 @@ -296,6 +300,8 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P 0 -p1 +%patch -P 1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -708,6 +714,9 @@ fi %doc %{_pkgdocdir} %changelog +* Wed Jan 17 2024 Mattias Ellert - 1:5.6.4-2 +- Fix printf null pointer error + * Mon Dec 11 2023 Mattias Ellert - 1:5.6.4-1 - Update to version 5.6.4 - Drop patches accepted upstream or previously backported From 2af0de9eaf91101e6d9917c67fbe51556363054a Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 22 Jan 2024 20:07:41 +0100 Subject: [PATCH 20/62] Update to version 5.6.5 Drop patches accepted upstream --- ...lude-byteswap.h-for-BSD-and-GNU-Hurd.patch | 48 ------------------- ...mpilation-error-reported-with-gcc-14.patch | 36 -------------- sources | 2 +- xrootd.spec | 16 +++---- 4 files changed, 8 insertions(+), 94 deletions(-) delete mode 100644 0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch delete mode 100644 0001-Fix-compilation-error-reported-with-gcc-14.patch diff --git a/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch b/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch deleted file mode 100644 index 4dc51fd..0000000 --- a/0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 333a5dd8187a897bc2c3c5e8097be0aef11b8e7e Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Tue, 12 Dec 2023 13:39:53 +0100 -Subject: [PATCH] Add #include for BSD and GNU/Hurd - ---- - src/XrdSys/XrdSysPlatform.hh | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/XrdSys/XrdSysPlatform.hh b/src/XrdSys/XrdSysPlatform.hh -index 0024369bb..6f67b3b72 100644 ---- a/src/XrdSys/XrdSysPlatform.hh -+++ b/src/XrdSys/XrdSysPlatform.hh -@@ -67,12 +67,18 @@ - #if defined(__FreeBSD__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) - #include - #include -+#if defined(__FreeBSD__) -+#include -+#else -+#include -+#endif - #define MAXNAMELEN NAME_MAX - #endif - - #ifdef __GNU__ - #include - #include -+#include - // These are undefined on purpose in GNU/Hurd. - // The values below are the ones used in Linux. - // The proper fix is to rewrite the code to not use hardcoded values, -@@ -161,6 +167,12 @@ typedef off_t off64_t; - #define bswap_64 OSSwapInt64 - #endif - -+#if defined(__FreeBSD__) -+#define bswap_16 bswap16 -+#define bswap_32 bswap32 -+#define bswap_64 bswap64 -+#endif -+ - static inline uint16_t bswap(uint16_t x) { return bswap_16(x); } - static inline uint32_t bswap(uint32_t x) { return bswap_32(x); } - static inline uint64_t bswap(uint64_t x) { return bswap_64(x); } --- -2.43.0 - diff --git a/0001-Fix-compilation-error-reported-with-gcc-14.patch b/0001-Fix-compilation-error-reported-with-gcc-14.patch deleted file mode 100644 index 4a0be8a..0000000 --- a/0001-Fix-compilation-error-reported-with-gcc-14.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 05393ac566fd2e1906fd7cf77b81b1019731c7cf Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Wed, 17 Jan 2024 09:59:02 +0100 -Subject: [PATCH] Fix compilation error reported with gcc 14 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -/builddir/build/BUILD/xrootd-5.6.4/src/XrdSecgsi/XrdSecgsitest.cc: In function ‘pdots(char const*, bool)’: -/builddir/build/BUILD/xrootd-5.6.4/src/XrdSecgsi/XrdSecgsitest.cc:90:15: error: ‘%s’ directive argument is null [-Werror=format-overflow=] - 90 | printf("|| %s ", t); - | ^~ ---- - src/XrdSecgsi/XrdSecgsitest.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/XrdSecgsi/XrdSecgsitest.cc b/src/XrdSecgsi/XrdSecgsitest.cc -index b0be6da04..98a3fdda7 100644 ---- a/src/XrdSecgsi/XrdSecgsitest.cc -+++ b/src/XrdSecgsi/XrdSecgsitest.cc -@@ -87,7 +87,11 @@ static void pdots(const char *t, bool ok = 1) - unsigned int i = 0; - unsigned int l = (t) ? strlen (t) : 0; - unsigned int np = PRTWIDTH - l - 8; -- printf("|| %s ", t); -+ if (l > 0) { -+ printf("|| %s ", t); -+ } else { -+ printf("|| "); -+ } - for (; i < np ; i++) { printf("."); } - printf(" %s\n", (ok ? "PASSED" : "FAILED")); - } --- -2.43.0 - diff --git a/sources b/sources index ce3ee32..c3ad26f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.4.tar.gz) = efa88da2c9e9e55aeab9c4fbec0ec688fbc6ea8e16178bbcbdd534a09609b5c645cafee023fed48495cda8e865210e2fd3ba4830852f157626ecc1995eb55988 +SHA512 (xrootd-5.6.5.tar.gz) = 5f759fb35c6bd4bdc551d6513b61b9a1114a994f8d4811438bf3477c17690974e5ee3d3e5637d7ef9c71819d2ae62d70475fff4d440d015dbbd9b3f45f52f399 diff --git a/xrootd.spec b/xrootd.spec index 6073c98..73d3845 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,16 +13,12 @@ Name: xrootd Epoch: 1 -Version: 5.6.4 -Release: 2%{?dist} +Version: 5.6.5 +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: https://xrootd.slac.stanford.edu/download/v%{version}/%{name}-%{version}.tar.gz -# https://github.com/xrootd/xrootd/pull/2149 -Patch0: 0001-Add-include-byteswap.h-for-BSD-and-GNU-Hurd.patch -# https://github.com/xrootd/xrootd/pull/2165 -Patch1: 0001-Fix-compilation-error-reported-with-gcc-14.patch +Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 @@ -300,8 +296,6 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q -%patch -P 0 -p1 -%patch -P 1 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -714,6 +708,10 @@ fi %doc %{_pkgdocdir} %changelog +* Mon Jan 22 2024 Mattias Ellert - 1:5.6.5-1 +- Update to version 5.6.5 +- Drop patches accepted upstream + * Wed Jan 17 2024 Mattias Ellert - 1:5.6.4-2 - Fix printf null pointer error From 13f1004571f014b60651f355f482d2e51716e0ef Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 26 Jan 2024 14:17:32 +0100 Subject: [PATCH 21/62] Update to version 5.6.6 --- sources | 2 +- xrootd.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index c3ad26f..635c243 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.5.tar.gz) = 5f759fb35c6bd4bdc551d6513b61b9a1114a994f8d4811438bf3477c17690974e5ee3d3e5637d7ef9c71819d2ae62d70475fff4d440d015dbbd9b3f45f52f399 +SHA512 (xrootd-5.6.6.tar.gz) = b13b91805f238cb06d6893bb41e39df3ab0c77a3096770bbd2ccd6472ed0e292cbcad67b6c8d1966c00056f4ae21a68fc9e24331fd9c2cf56890135151ebf97b diff --git a/xrootd.spec b/xrootd.spec index 73d3845..4d869c0 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.6.5 +Version: 5.6.6 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 @@ -708,6 +708,9 @@ fi %doc %{_pkgdocdir} %changelog +* Fri Jan 26 2024 Mattias Ellert - 1:5.6.6-1 +- Update to version 5.6.6 + * Mon Jan 22 2024 Mattias Ellert - 1:5.6.5-1 - Update to version 5.6.5 - Drop patches accepted upstream From 97467c8e5150de53abdbb0abaff2e3f60550fcc0 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 6 Feb 2024 16:40:25 +0100 Subject: [PATCH 22/62] Update to version 5.6.7 --- sources | 2 +- xrootd.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 635c243..c1503bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.6.tar.gz) = b13b91805f238cb06d6893bb41e39df3ab0c77a3096770bbd2ccd6472ed0e292cbcad67b6c8d1966c00056f4ae21a68fc9e24331fd9c2cf56890135151ebf97b +SHA512 (xrootd-5.6.7.tar.gz) = e7ec8b6eae684f27b5044890c45492f7d9b2b8812a9131ff45db63984869aa62cd85836d71b4100e89a6bb98ee3864062940d4dec0fdb340472df126d6de4d41 diff --git a/xrootd.spec b/xrootd.spec index 4d869c0..5e6c7fb 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,7 +13,7 @@ Name: xrootd Epoch: 1 -Version: 5.6.6 +Version: 5.6.7 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 @@ -708,6 +708,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Feb 06 2024 Mattias Ellert - 1:5.6.7-1 +- Update to version 5.6.7 + * Fri Jan 26 2024 Mattias Ellert - 1:5.6.6-1 - Update to version 5.6.6 From e8cf9f15913294baa6be05d078c0d1a4787d684f Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Wed, 28 Feb 2024 23:48:58 +0100 Subject: [PATCH 23/62] Update to version 5.6.8 Disable tests that require file attributes if the file system doesn't support them --- ...error-when-upgrading-connections-to-.patch | 26 ++++++++++++++ ...XrdCl-Stop-Poller-before-TaskManager.patch | 36 +++++++++++++++++++ sources | 2 +- xrootd.spec | 35 ++++++++++++++++-- 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch create mode 100644 0002-XrdCl-Stop-Poller-before-TaskManager.patch diff --git a/0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch b/0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch new file mode 100644 index 0000000..c732080 --- /dev/null +++ b/0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch @@ -0,0 +1,26 @@ +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 new file mode 100644 index 0000000..45c0fca --- /dev/null +++ b/0002-XrdCl-Stop-Poller-before-TaskManager.patch @@ -0,0 +1,36 @@ +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/sources b/sources index c1503bb..9c46927 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.7.tar.gz) = e7ec8b6eae684f27b5044890c45492f7d9b2b8812a9131ff45db63984869aa62cd85836d71b4100e89a6bb98ee3864062940d4dec0fdb340472df126d6de4d41 +SHA512 (xrootd-5.6.8.tar.gz) = 152d4ff481abdb0f39c24de58e36cadea01611cc7b7e1878f0082f696ae8ae6d13488ac50843b80d680682c7cda92d416250b8eb068b33f37fe7dbb5cd1cd0e5 diff --git a/xrootd.spec b/xrootd.spec index 5e6c7fb..bc6ed15 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,13 +13,16 @@ Name: xrootd Epoch: 1 -Version: 5.6.7 +Version: 5.6.8 Release: 1%{?dist} Summary: Extended ROOT file server License: LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib 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 + %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 BuildRequires: devtoolset-7-toolchain @@ -297,6 +300,9 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch -P 0 -p 1 +%patch -P 1 -p 1 + %build %if %{?rhel}%{!?rhel:0} == 7 . /opt/rh/devtoolset-7/enable @@ -438,7 +444,27 @@ cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo %check -%ctest3 +touch testfile +if ( setfattr -n user.testattr -v testvalue testfile ) ; then + %ctest3 +else + echo "Extended file attributes not supported by file system" + echo "Don't run tests that require them" + %ctest3 -- -E "\ +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|\ +XrdCl::XrdEcTests|\ +XrdEc::|\ +XRootD::smoke-test-cluster" +fi +rm testfile %ldconfig_scriptlets libs @@ -708,6 +734,11 @@ fi %doc %{_pkgdocdir} %changelog +* 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 + support them + * Tue Feb 06 2024 Mattias Ellert - 1:5.6.7-1 - Update to version 5.6.7 From 453125606cc376defcc268ad5044c28bd253fa06 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 16 Mar 2024 23:38:54 +0100 Subject: [PATCH 24/62] Update to version 5.6.9 --- ...-for-64-bit-time_t-on-32-bit-systems.patch | 151 ++++++++++++++++++ ...error-when-upgrading-connections-to-.patch | 26 --- ...XrdCl-Stop-Poller-before-TaskManager.patch | 36 ----- xrootd.spec | 15 +- 4 files changed, 160 insertions(+), 68 deletions(-) create mode 100644 0001-Fixes-for-64-bit-time_t-on-32-bit-systems.patch delete mode 100644 0001-XrdCl-Fix-logic-error-when-upgrading-connections-to-.patch delete mode 100644 0002-XrdCl-Stop-Poller-before-TaskManager.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 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 From 0a46bf1aee0b0cfbaca5ff8a5239cf5e3ad7594d Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 16 Mar 2024 23:43:01 +0100 Subject: [PATCH 25/62] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 9c46927..c940a38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.6.8.tar.gz) = 152d4ff481abdb0f39c24de58e36cadea01611cc7b7e1878f0082f696ae8ae6d13488ac50843b80d680682c7cda92d416250b8eb068b33f37fe7dbb5cd1cd0e5 +SHA512 (xrootd-5.6.9.tar.gz) = 9ba15524451ebe7ee12d689f9c56d85508996285d01885236d396b7742ff6cc03036a6b4bd1424b0e1553cbf382c0954c10cec76fa1a99a7dfff330686bad0cd From 60461f50b17ace1391dfd157c0f493e3bdea1d92 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 3 Jun 2024 20:13:18 +0200 Subject: [PATCH 26/62] 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 27/62] 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 28/62] 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 29/62] 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 30/62] 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 31/62] 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 32/62] 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 33/62] 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 34/62] 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 35/62] 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 36/62] 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 37/62] 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 38/62] 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 39/62] 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 40/62] 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 41/62] 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 42/62] 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 43/62] 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 44/62] 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 45/62] 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 46/62] 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 47/62] 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 48/62] 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 49/62] 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 50/62] 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 51/62] 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 52/62] 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 53/62] 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 54/62] 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 55/62] 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 56/62] 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 57/62] 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 58/62] 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 59/62] 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 60/62] 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 61/62] 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 62/62] 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