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 0000000000000000000000000000000000000000..dc7e8a629584e4019f74d6fc7e4f96a29871e40e --- /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 0000000000000000000000000000000000000000..a2d6a3b3e1c8ae1c6dca0dffec04c26166e22aa5 --- /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-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch b/0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch deleted file mode 100644 index e9024b3b7bddcf6c62cb3421760b33143f5889d5..0000000000000000000000000000000000000000 --- 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 f615f4aae0ba02091008460751e9cfda0d693cd5..70d3d580d9622a63f028995bbe3dc3ddf7e931d9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xrootd-5.7.0.tar.gz) = 2103d453e8d655a19c58beb050158b08f6e36ce5d1a6cc9181881af3cae06938222a00af5cad102d1e2df4408d61ea364e54a0d2d41c71f1f2e07641a618effe +SHA512 (xrootd-5.9.1.tar.gz) = 8806475adb8458646ad9fc75c6d877f86f969115451295fce4a1d2aa116dd4ee06a5b27c06d8112d4667996dbbcec8d5e6cb28b2b2b56620ff503dfe5b842be0 diff --git a/xrootd-sysusers.conf b/xrootd-sysusers.conf new file mode 100644 index 0000000000000000000000000000000000000000..e5e19f024508df3d11bbc4b23dc7cfa18beb37bd --- /dev/null +++ b/xrootd-sysusers.conf @@ -0,0 +1,2 @@ +# Name ID GECOS Home directory Shell +u xrootd 194 "XRootD runtime user" /var/spool/xrootd - diff --git a/xrootd.spec b/xrootd.spec index 6c7a63bb1950574a9cd10cc72c9dc5c2be54cf3b..44dbb57b3180479e60e7f02654fa4f8e0f0e9c75 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -1,15 +1,17 @@ -%global ceph 0 +%global ceph 1 %undefine __cmake_in_source_build Name: xrootd -Version: 5.7.0 -Release: 2%{?dist} +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.slac.stanford.edu/ +URL: https://xrootd.web.cern.ch Source0: %{url}/download/v%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-XrdCl-Fix-hidden-overloaded-virtual-compilation-erro.patch +Source1: %{name}-sysusers.conf +Patch0: 0001-Tests-Avoid-test-segfault-on-32-bit-architectures.patch +Patch1: 0001-Tests-Ensure-extra-test-fixtures-are-ready-before-se.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -41,16 +43,18 @@ BuildRequires: libuuid-devel BuildRequires: voms-devel BuildRequires: scitokens-cpp-devel BuildRequires: davix-devel +BuildRequires: libxcrypt-devel %if %{ceph} BuildRequires: librados-devel BuildRequires: libradosstriper-devel %endif -%ifnarch %{ix86} BuildRequires: isa-l-devel -%endif BuildRequires: attr +BuildRequires: curl +BuildRequires: davix BuildRequires: gtest-devel BuildRequires: openssl +BuildRequires: procps Requires: %{name}-server = %{version}-%{release} Requires: %{name}-selinux = %{version}-%{release} @@ -75,7 +79,7 @@ Requires: %{name}-client-libs = %{version}-%{release} Requires: %{name}-server-libs = %{version}-%{release} Requires: expect Requires: logrotate -Requires(pre): shadow-utils +%{?sysusers_requires_compat} %{?systemd_requires} %description server @@ -102,7 +106,7 @@ This package contains libraries used by the xrootd servers and clients. %package devel Summary: Development files for xrootd Provides: %{name}-libs-devel = %{version}-%{release} -Provides: %{name}-libs-devel = %{version}-%{release} +Obsoletes: %{name}-libs-devel < %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} %description devel @@ -119,7 +123,7 @@ This package contains libraries used by xrootd clients. %package client-devel Summary: Development files for xrootd clients Provides: %{name}-cl-devel = %{version}-%{release} -Provides: %{name}-cl-devel = %{version}-%{release} +Obsoletes: %{name}-cl-devel < %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} Requires: %{name}-client-libs = %{version}-%{release} @@ -159,7 +163,7 @@ compatibility between versions is not guaranteed for these headers. %package client Summary: Xrootd command line client tools Provides: %{name}-cl = %{version}-%{release} -Provides: %{name}-cl = %{version}-%{release} +Obsoletes: %{name}-cl < %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-client-libs = %{version}-%{release} @@ -182,6 +186,9 @@ Summary: VOMS attribute extractor plugin for XRootD Provides: vomsxrd = %{version}-%{release} Provides: %{name}-voms-plugin = %{version}-%{release} Provides: xrdhttpvoms = %{version}-%{release} +Obsoletes: vomsxrd < 0.6.0-4 +Obsoletes: %{name}-voms-plugin < 0.6.0-3 +Obsoletes: xrdhttpvoms < 0.2.5-9 Requires: %{name}-libs = %{version}-%{release} %description voms @@ -229,6 +236,7 @@ This package contains Python 3 bindings for xrootd. %package doc Summary: Developer documentation for the xrootd libraries +BuildArch: noarch %description doc This package contains the API documentation of the xrootd libraries. @@ -236,16 +244,15 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch -P0 -p1 +%patch -P1 -p1 %build %cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DFORCE_ENABLED:BOOL=ON \ -DENABLE_TESTS:BOOL=ON \ %if %{ceph} -DENABLE_CEPH:BOOL=ON \ -%endif -%ifarch %{ix86} - -DENABLE_XRDEC:BOOL=OFF \ %endif -DPIP_OPTIONS="--no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --verbose" \ -DXRD_PYTHON_REQ_VERSION=%{python3_version} @@ -271,20 +278,24 @@ 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 \ make -C bindings/python/docs html 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 mkdir -p %{buildroot}%{_sysconfdir}/%{name} install -m 644 -p packaging/common/%{name}-clustered.cfg \ @@ -337,14 +348,27 @@ cp -pr bindings/python/docs/build/html %{buildroot}%{_pkgdocdir}/python rm %{buildroot}%{_pkgdocdir}/python/.buildinfo %check +export HOSTNAME=localhost + adminpath=$(mktemp -d -p /var/tmp) -sed "s!all.adminpath .*!all.adminpath ${adminpath}!" \ - -i tests/cluster/common.cfg \ - tests/XRootD/xrootd.cfg +trap "rm -rf ${adminpath}" EXIT + +sed "s!all.adminpath .*!all.adminpath ${adminpath}/XRootD!" \ + -i tests/XRootD/common.cfg + +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 + touch testfile if ( setfattr -n user.testattr -v testvalue testfile ) ; then - %ctest + %ifarch loongarch64 + %ctest -- -E "XRootD::badredir|XRootD::posix::test|XRootD::authenticated_cluster::test" + %else + %ctest -- -E XRootD::badredir + %endif else echo "Extended file attributes not supported by file system" echo "Don't run tests that require them" @@ -352,35 +376,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|\ -XrdEc::|\ -XRootD::cluster::test" +XrdEc::XrdEcTests|\ +XRootD::authenticated_cluster::test|\ +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 -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 %{_tmpfilesdir}/%{name}.conf +%tmpfiles_create %{name}.conf if [ $1 -eq 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : @@ -444,6 +461,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 @@ -496,9 +514,7 @@ fi %files client-libs %{_libdir}/libXrdCl.so.* -%ifnarch %{ix86} %{_libdir}/libXrdEc.so.* -%endif %{_libdir}/libXrdFfs.so.* %{_libdir}/libXrdPosix.so.* %{_libdir}/libXrdPosixPreload.so.* @@ -528,13 +544,16 @@ 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 %{_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 @@ -555,9 +574,7 @@ fi %files private-devel %{_includedir}/%{name}/private -%ifnarch %{ix86} %{_libdir}/libXrdEc.so -%endif %{_libdir}/libXrdSsiLib.so %{_libdir}/libXrdSsiShMap.so @@ -617,6 +634,14 @@ fi %doc %{_pkgdocdir} %changelog +* Thu Dec 11 2025 bbrucezhang - 5.9.1-1 +- [Type] sync +- [DESC] Update to 5.9.1 + +* Mon Sep 08 2025 bbrucezhang - 5.8.4-1 +- [Type] other +- [DESC] Update to 5.8.4 + * Fri Jun 13 2025 bbrucezhang - 5.7.0-2 - Rebuilt for loongarch64