Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xrootd for openSUSE:Factory checked in at 2023-06-16 16:55:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xrootd (Old) and /work/SRC/openSUSE:Factory/.xrootd.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xrootd" Fri Jun 16 16:55:07 2023 rev:29 rq:1093348 version:5.5.5 Changes: -------- --- /work/SRC/openSUSE:Factory/xrootd/xrootd.changes 2023-04-05 21:36:14.186767561 +0200 +++ /work/SRC/openSUSE:Factory/.xrootd.new.15902/xrootd.changes 2023-06-16 16:56:17.794221519 +0200 @@ -1,0 +2,48 @@ +Thu Jun 15 16:44:16 UTC 2023 - Atri Bhattacharya <[email protected]> + +- Fix some multibuild package name degeneracies. + +------------------------------------------------------------------- +Fri Jun 9 17:26:19 UTC 2023 - Atri Bhattacharya <[email protected]> + +- Update to version 5.5.5: + * [HTTP] Initialize SecEntity.addrInfo to avoid SEGV + (gh#xrootd/xrootd#1986). + * [Server] Allow XrdXrootdFile::Serialize() to be used to wait + more than once (gh#xrootd/xrootd#1995). + * [Server] Correct file handle returned when reusing it from + external table. + * [XrdCl] Fix client crash on early closed connection + (gh#xrootd/xrootd#1934). + * [Server] Use correct format to print size_t + (gh#xrootd/xrootd#1989). + * [XrdApps] Let XrdClProxyPlugin work with PgRead + (gh#xrootd/xrootd#1993). + * [XrdCl] Avoid possibility of Channel unregistering the wrong + task (gh#xrootd/xrootd#1883). + * [XrdCl] Fix ZipArchive issuing VectorWrite which is too large + during CloseArchive (gh#xrootd/xrootd#2004). + * [XrdSys] Avoid memory leak when overwriting the default + message for EBADE. + * [CMake] Adjust build rules to not depend on scitokenscpp to + build libXrdSecztn. + * [Server,XrdPosix,XrdSecgsi] Fix compile warnings with Clang + compiler. + * [XrdPosix] Fix build with Clang and _FORTIFY_SOURCE enabled + (gh#xrootd/xrootd#1975). +- Fix python builds: + * Add xrootd-modernize-python-builds.patch: patch from + gh#xrootd/xrootd#2025 rebased for current version. + * Use _multibuild to split out python builds into own flavour + separate from main package builds. + * Manually create a VERSION file so that dist-infos can decipher + the right version and does not use 5.6-rc-foo; this should no + longer be required when packaging tagged version 5.6. + * Manually specify xrootd includedirs when building python pkgs + since cmake as invoked by python build tools does not + automatically inherit them, leading to missing header + complaints. + * Pass -Wno-error=odr to linker flags to avoid build failures on + 32bit archs (gh#xrootd/xrootd#2032). + +------------------------------------------------------------------- Old: ---- xrootd-5.5.4.tar.gz New: ---- _multibuild xrootd-5.5.5.tar.gz xrootd-modernize-python-builds.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xrootd.spec ++++++ --- /var/tmp/diff_new_pack.dtc8mP/_old 2023-06-16 16:56:18.458225435 +0200 +++ /var/tmp/diff_new_pack.dtc8mP/_new 2023-06-16 16:56:18.466225482 +0200 @@ -16,31 +16,43 @@ # +# SECTION Multiflavour definitions +%define pname xrootd +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "python" +%bcond_without python3 +%define psuffix -python +%else +%bcond_with python3 +%define psuffix %{nil} +%endif +# /SECTION + %define __builder ninja %define skip_python2 1 %define plugver 5 %bcond_with ceph %bcond_without libc_semaphore -Name: xrootd -Version: 5.5.4 +Name: %{pname}%{psuffix} +Version: 5.5.5 Release: 0 Summary: An eXtended Root Daemon License: LGPL-3.0-or-later Group: System/Daemons URL: http://xrootd.org/ Source0: http://xrootd.org/download/v%{version}/xrootd-%{version}.tar.gz -Source1: %{name}-user.conf +Source1: xrootd-user.conf Source100: xrootd-rpmlintrc +# PATCH0 [Python] Modernize build system https://github.com/xrootd/xrootd/pull/2025; patch rebased for current version +Patch0: xrootd-modernize-python-builds.patch # PATCH-FEATURE-OPENSUSE Hardening patches Patch100: [email protected] Patch101: [email protected] Patch102: [email protected] Patch103: [email protected] -BuildRequires: %{python_module devel} -BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} -BuildRequires: cmake >= 2.8 +BuildRequires: ca-certificates +BuildRequires: cmake >= 3.0 BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ @@ -71,7 +83,18 @@ BuildRequires: libradosstriper-devel %endif BuildRequires: pkgconfig(libtirpc) +%if %{with python3} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: xrootd-client-devel = %{version} +BuildRequires: xrootd-libs-devel = %{version} +BuildRequires: xrootd-private-devel = %{version} +BuildRequires: xrootd-server-devel = %{version} +%define python_subpackage_only 1 %python_subpackages +%endif %description The XROOTD project gives access to data repositories. @@ -92,7 +115,7 @@ %package ceph Summary: Ceph back-end plug-in for XRootD Group: System/Filesystems -Requires: %{name}-server = %{version} +Requires: %{pname}-server = %{version} %description ceph The XROOTD project gives access to data repositories. @@ -104,8 +127,8 @@ %package ceph-devel Summary: Ceph back-end plug-in for XRootD Group: Development/Libraries/C and C++ -Requires: %{name}-ceph = %{version} -Requires: %{name}-server = %{version} +Requires: %{pname}-ceph = %{version} +Requires: %{pname}-server = %{version} %description ceph-devel The XROOTD project gives access to data repositories. @@ -117,10 +140,10 @@ %package client Summary: XRootD command line client tools Group: Productivity/Clustering/Computing -Requires: %{name}-client-libs = %{version} -Requires: %{name}-libs = %{version} -Provides: %{name}-cl = %{version} -Obsoletes: %{name}-cl < %{version} +Requires: %{pname}-client-libs = %{version} +Requires: %{pname}-libs = %{version} +Provides: %{pname}-cl = %{version} +Obsoletes: %{pname}-cl < %{version} %description client The XROOTD project gives access to data repositories. @@ -132,7 +155,7 @@ %package client-libs Summary: Libraries used by XRootD clients Group: System/Libraries -Requires: %{name}-libs = %{version} +Requires: %{pname}-libs = %{version} %description client-libs The XROOTD project gives access to data repositories. @@ -143,11 +166,11 @@ %package client-devel Summary: Development files for XRootD clients Group: Development/Libraries/C and C++ -Requires: %{name}-client-libs = %{version} -Requires: %{name}-libs-devel = %{version} -Recommends: %{name}-client = %{version} -Provides: %{name}-cl-devel = %{version} -Obsoletes: %{name}-cl-devel < %{version} +Requires: %{pname}-client-libs = %{version} +Requires: %{pname}-libs-devel = %{version} +Recommends: %{pname}-client = %{version} +Provides: %{pname}-cl-devel = %{version} +Obsoletes: %{pname}-cl-devel < %{version} %description client-devel The XROOTD project gives access to data repositories. @@ -171,8 +194,8 @@ %package fuse Summary: FUSE-based XRootD filesystem mount Group: System/Filesystems -Requires: %{name}-client = %{version} -Requires: %{name}-libs = %{version} +Requires: %{pname}-client = %{version} +Requires: %{pname}-libs = %{version} Requires: fuse %description fuse @@ -199,7 +222,7 @@ %package libs-devel Summary: Development files for XRootD core libraries Group: Development/Libraries/C and C++ -Requires: %{name}-libs = %{version} +Requires: %{pname}-libs = %{version} %description libs-devel The XROOTD project gives access to data repositories. @@ -211,8 +234,8 @@ %package private-devel Summary: Private XRootD development files Group: Development/Libraries/C and C++ -Requires: %{name}-libs = %{version} -Requires: %{name}-server-libs = %{version} +Requires: %{pname}-libs = %{version} +Requires: %{pname}-server-libs = %{version} %description private-devel The XROOTD project gives access to data repositories. @@ -226,9 +249,9 @@ %package server Summary: XRootD (eXtended Root Daemon) server Group: System/Daemons -Requires: %{name}-client-libs = %{version} -Requires: %{name}-libs = %{version} -Requires: %{name}-server-libs = %{version} +Requires: %{pname}-client-libs = %{version} +Requires: %{pname}-libs = %{version} +Requires: %{pname}-server-libs = %{version} Recommends: logrotate %sysusers_requires @@ -241,8 +264,8 @@ %package server-libs Summary: Libraries used by XRootD servers Group: System/Daemons -Requires: %{name}-client-libs = %{version} -Requires: %{name}-libs = %{version} +Requires: %{pname}-client-libs = %{version} +Requires: %{pname}-libs = %{version} Requires: logrotate Requires: systemd Requires(post): systemd @@ -259,10 +282,10 @@ %package server-devel Summary: Development files for XRootD servers Group: Development/Libraries/C and C++ -Requires: %{name}-client-devel = %{version} -Requires: %{name}-libs-devel = %{version} -Requires: %{name}-server-libs = %{version} -Recommends: %{name}-server = %{version} +Requires: %{pname}-client-devel = %{version} +Requires: %{pname}-libs-devel = %{version} +Requires: %{pname}-server-libs = %{version} +Recommends: %{pname}-server = %{version} %description server-devel The XROOTD project gives access to data repositories. @@ -271,63 +294,73 @@ This package contains header files and development libraries for XRootD server development. +%package -n python-xrootd +Summary: Python bindings for xrootd + +%description -n python-xrootd +This package provides python3 bindings for xrootd. + %prep -%autosetup -p1 +%autosetup -p1 -n %{pname}-%{version} %build -%sysusers_generate_pre %{SOURCE1} %{name} %{name}-user.conf +%if %{with python3} +# Create a version file so that python packages get the right version info; +# this should not be needed when tagged version 5.6 is packaged +echo %{version} > VERSION + +# cmake cannot inherit the right includedirs when running python builds; specify manually +export CFLAGS="%{optflags} -I%{_includedir}/%{pname} -I%{_includedir}/%{pname}/private" +export CXXFLAGS=${CFLAGS} +# https://github.com/xrootd/xrootd/issues/2032 +%ifarch %ix86 +export LDFLAGS+=" -Wno-error=odr" +%endif +%pyproject_wheel -%{python_expand # Necessary to run configure with multiple py3 flavors -export PYTHON=%{_bindir}/$python -mkdir ../$python -cp -pr ./ ../$python -pushd ../$python +%else + +%sysusers_generate_pre %{SOURCE1} %{pname} xrootd-user.conf %cmake \ - -DBUILD_PYTHON:BOOL=ON \ - -DPYTHON_EXECUTABLE:PATH=%{_bindir}/$python \ - -DPYTHON_LIBRARY:PATH=%{_libdir} \ - -DPYTHON_INCLUDE_DIR:PATH=`$python -c "from sysconfig import get_path;print(get_path('include'))"` \ + -DBUILD_PYTHON:BOOL=OFF \ -DENABLE_CEPH:BOOL=%{with ceph} \ -DUSE_LIBC_SEMAPHORE:BOOL=%{with libc_semaphore} %cmake_build -if [ "$python_" = "python3_" -o "%{$python_provides}" = "python3" ]; then doxygen ../Doxyfile -fi -popd -} +%endif %install -%{python_expand # Necessary to run configure with multiple py3 flavors -export PYTHON=%{_bindir}/$python -pushd ../$python -# PYTHONPATH must be set to allow installation of .pth file -export PYTHONPATH=%{buildroot}%{$python_sitearch}/ -test -e ${PYTHONPATH} || mkdir -p ${PYTHONPATH} +%if %{with python3} + +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch}/ + +%else + %cmake_install -test -e doxydoc/html && cp -pr doxydoc/html %{buildroot}%{_docdir}/%{name}/ -popd -} -rm -rf %{buildroot}%{_sysconfdir}/%{name}/* +test -e doxydoc/html && cp -pr doxydoc/html %{buildroot}%{_docdir}/%{pname}/ -mkdir -p %{buildroot}%{_var}/log/%{name} -mkdir -p %{buildroot}%{_var}/spool/%{name} +rm -rf %{buildroot}%{_sysconfdir}/%{pname}/* -install -Dm 0644 -t %{buildroot}%{_sysconfdir}/%{name}/ packaging/common/*.cfg +mkdir -p %{buildroot}%{_var}/log/%{pname} +mkdir -p %{buildroot}%{_var}/spool/%{pname} + +install -Dm 0644 -t %{buildroot}%{_sysconfdir}/%{pname}/ packaging/common/*.cfg install -Dm 0644 -t %{buildroot}%{_unitdir} packaging/common/{cmsd,frm_purged,frm_xfrd,xrootd}@.service install -Dm 0644 -t %{buildroot}%{_unitdir} packaging/common/{xrdhttp,xrootd}@.socket -install -Dm 0644 packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf -install -Dm 0644 packaging/common/client.conf %{buildroot}%{_sysconfdir}/%{name}/client.conf +install -Dm 0644 packaging/rhel/xrootd.tmpfiles %{buildroot}%{_tmpfilesdir}/%{pname}.conf +install -Dm 0644 packaging/common/client.conf %{buildroot}%{_sysconfdir}/%{pname}/client.conf install -p -Dm 0644 packaging/common/xrootd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/xrootd-server install -Dm 0644 packaging/common/client-plugin.conf.example %{buildroot}%{_sysconfdir}/xrootd/client.plugins.d/client-plugin.conf.example -install -Dm 644 README %{buildroot}%{_docdir}/%{name}/README +install -Dm 644 README %{buildroot}%{_docdir}/%{pname}/README -chmod -x %{buildroot}%{_datadir}/%{name}/utils/XrdCmsNotify.pm +chmod -x %{buildroot}%{_datadir}/%{pname}/utils/XrdCmsNotify.pm sed -i 's|/usr/bin/env bash|%{_bindir}/bash|' %{buildroot}%{_bindir}/xrootd-config -sed -i 's|/usr/bin/env perl|%{_bindir}/perl|' %{buildroot}%{_datadir}/%{name}/utils/XrdOlbMonPerf -sed -i 's|/usr/bin/env perl|%{_bindir}/perl|' %{buildroot}%{_datadir}/%{name}/utils/netchk +sed -i 's|/usr/bin/env perl|%{_bindir}/perl|' %{buildroot}%{_datadir}/%{pname}/utils/XrdOlbMonPerf +sed -i 's|/usr/bin/env perl|%{_bindir}/perl|' %{buildroot}%{_datadir}/%{pname}/utils/netchk mkdir -p %{buildroot}%{_sysusersdir} install -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/ @@ -346,11 +379,11 @@ %postun ceph -p /sbin/ldconfig %endif -%pre server -f %{name}.pre +%pre server -f %{pname}.pre %service_add_pre [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] %post server -%tmpfiles_create %{_tmpfilesdir}/%{name}.conf +%tmpfiles_create %{_tmpfilesdir}/%{pname}.conf %service_add_post [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] %preun server @@ -358,8 +391,10 @@ %postun server %service_del_postun [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] +%endif -%files -n %{name}-client +%if %{without python3} +%files client %license COPYING.LGPL LICENSE %{_bindir}/xrdadler32 %{_bindir}/xrdcopy @@ -376,7 +411,7 @@ %{_mandir}/man1/xrdfs.1%{?ext_man} %{_mandir}/man1/xrdgsiproxy.1%{?ext_man} -%files -n %{name}-client-libs +%files client-libs %license COPYING.LGPL LICENSE %{_libdir}/libXrdCl.so.* %{_libdir}/libXrdFfs.so.* @@ -384,32 +419,32 @@ %{_libdir}/libXrdPosixPreload.so.* # This lib may be used for LD_PRELOAD so the .so link needs to be included %{_libdir}/libXrdPosixPreload.so -%dir %{_sysconfdir}/%{name}/ -%dir %{_sysconfdir}/%{name}/client.plugins.d/ -%config %{_sysconfdir}/%{name}/client.plugins.d/client-plugin.conf.example -%config(noreplace) %{_sysconfdir}/%{name}/client.conf +%dir %{_sysconfdir}/%{pname}/ +%dir %{_sysconfdir}/%{pname}/client.plugins.d/ +%config %{_sysconfdir}/%{pname}/client.plugins.d/client-plugin.conf.example +%config(noreplace) %{_sysconfdir}/%{pname}/client.conf -%files -n %{name}-client-devel +%files client-devel %license COPYING.LGPL LICENSE %{_bindir}/xrdgsitest %{_mandir}/man1/xrdgsitest.1%{?ext_man} %{_libdir}/libXrdCl.so %{_libdir}/libXrdFfs.so %{_libdir}/libXrdPosix.so -%dir %{_includedir}/%{name}/ -%{_includedir}/%{name}/XrdCl/ -%{_includedir}/%{name}/XrdPosix/ +%dir %{_includedir}/%{pname}/ +%{_includedir}/%{pname}/XrdCl/ +%{_includedir}/%{pname}/XrdPosix/ -%files -n %{name}-doc +%files doc %license COPYING.LGPL LICENSE -%{_docdir}/%{name}/ +%{_docdir}/%{pname}/ -%files -n %{name}-fuse +%files fuse %license COPYING.LGPL LICENSE %{_bindir}/xrootdfs %{_mandir}/man1/xrootdfs.1%{?ext_man} -%files -n %{name}-libs +%files libs %license COPYING.LGPL LICENSE %{_libdir}/libXrdAppUtils.so.* %{_libdir}/libXrdCrypto.so.* @@ -423,7 +458,7 @@ %{_libdir}/libXrdCryptossl-%{plugver}.so %{_libdir}/libXrdCmsRedirectLocal-%{plugver}.so -%files -n %{name}-libs-devel +%files libs-devel %license COPYING.LGPL LICENSE %{_bindir}/xrootd-config %{_libdir}/libXrdAppUtils.so @@ -432,26 +467,26 @@ %{_libdir}/libXrdHttpUtils.so %{_libdir}/libXrdUtils.so %{_libdir}/libXrdXml.so -%dir %{_includedir}/%{name}/ -%{_includedir}/%{name}/XrdVersion.hh -%{_includedir}/%{name}/XProtocol/ -%{_includedir}/%{name}/Xrd/ -%{_includedir}/%{name}/XrdCks/ -%{_includedir}/%{name}/XrdNet/ -%{_includedir}/%{name}/XrdOuc/ -%{_includedir}/%{name}/XrdOfs/ -%{_includedir}/%{name}/XrdSec/ -%{_includedir}/%{name}/XrdSys/ -%{_includedir}/%{name}/XrdXml/ +%dir %{_includedir}/%{pname}/ +%{_includedir}/%{pname}/XrdVersion.hh +%{_includedir}/%{pname}/XProtocol/ +%{_includedir}/%{pname}/Xrd/ +%{_includedir}/%{pname}/XrdCks/ +%{_includedir}/%{pname}/XrdNet/ +%{_includedir}/%{pname}/XrdOuc/ +%{_includedir}/%{pname}/XrdOfs/ +%{_includedir}/%{pname}/XrdSec/ +%{_includedir}/%{pname}/XrdSys/ +%{_includedir}/%{pname}/XrdXml/ -%files -n %{name}-private-devel +%files private-devel %license COPYING.LGPL LICENSE %{_libdir}/libXrdSsiLib.so %{_libdir}/libXrdSsiShMap.so -%dir %{_includedir}/%{name}/ -%{_includedir}/%{name}/private/ +%dir %{_includedir}/%{pname}/ +%{_includedir}/%{pname}/private/ -%files -n %{name}-server +%files server %license COPYING.LGPL LICENSE %{_bindir}/cconfig %{_bindir}/cmsd @@ -467,7 +502,7 @@ %{_bindir}/xrdpwdadmin %{_bindir}/xrdsssadmin %{_bindir}/xrootd -%{_datadir}/%{name}/ +%{_datadir}/%{pname}/ %{_mandir}/man8/cmsd.8%{?ext_man} %{_mandir}/man8/frm_admin.8%{?ext_man} %{_mandir}/man8/frm_purged.8%{?ext_man} @@ -479,8 +514,8 @@ %{_mandir}/man8/xrdsssadmin.8%{?ext_man} %{_mandir}/man8/xrootd.8%{?ext_man} %{_mandir}/man1/xrdmapc.1%{?ext_man} -%{_sysusersdir}/%{name}-user.conf -%{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/%{pname}-user.conf +%{_tmpfilesdir}/%{pname}.conf %{_unitdir}/[email protected] %{_unitdir}/[email protected] %{_unitdir}/[email protected] @@ -488,17 +523,17 @@ %{_unitdir}/[email protected] %{_unitdir}/[email protected] %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server -%dir %{_sysconfdir}/%{name}/ -%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/xrootd-clustered.cfg -%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/xrootd-standalone.cfg -%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/xrootd-filecache-clustered.cfg -%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/xrootd-filecache-standalone.cfg -%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{name}/xrootd-http.cfg -%attr(-,xrootd,xrootd) %dir %{_var}/log/%{name} -%attr(-,xrootd,xrootd) %dir %{_var}/spool/%{name} -%ghost %dir /run/%{name} +%dir %{_sysconfdir}/%{pname}/ +%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{pname}/xrootd-clustered.cfg +%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{pname}/xrootd-standalone.cfg +%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{pname}/xrootd-filecache-clustered.cfg +%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{pname}/xrootd-filecache-standalone.cfg +%attr(-,xrootd,xrootd) %config(noreplace) %{_sysconfdir}/%{pname}/xrootd-http.cfg +%attr(-,xrootd,xrootd) %dir %{_var}/log/%{pname} +%attr(-,xrootd,xrootd) %dir %{_var}/spool/%{pname} +%ghost %dir /run/%{pname} -%files -n %{name}-server-libs +%files server-libs %license COPYING.LGPL LICENSE %{_libdir}/libXrdClRecorder-%{plugver}.so %{_libdir}/libXrdServer.so.* @@ -519,34 +554,36 @@ %{_libdir}/libXrdThrottle-%{plugver}.so %{_libdir}/libXrdXrootd-%{plugver}.so -%files -n %{name}-server-devel +%files server-devel %license COPYING.LGPL LICENSE %{_libdir}/libXrdServer.so -%dir %{_includedir}/%{name}/ -%{_includedir}/%{name}/XrdAcc/ -%{_includedir}/%{name}/XrdCms/ -%{_includedir}/%{name}/XrdHttp/ -%{_includedir}/%{name}/XrdOss/ -%{_includedir}/%{name}/XrdPfc/ -%{_includedir}/%{name}/XrdSfs/ -%{_includedir}/%{name}/XrdXrootd/ - -%files %{python_files} -%license COPYING.LGPL LICENSE -%{python_sitearch}/XRootD/ -%{python_sitearch}/pyxrootd/ -%{python_sitearch}/xrootd-%{version}-py%{python_version}.egg-info/ - +%dir %{_includedir}/%{pname}/ +%{_includedir}/%{pname}/XrdAcc/ +%{_includedir}/%{pname}/XrdCms/ +%{_includedir}/%{pname}/XrdHttp/ +%{_includedir}/%{pname}/XrdOss/ +%{_includedir}/%{pname}/XrdPfc/ +%{_includedir}/%{pname}/XrdSfs/ +%{_includedir}/%{pname}/XrdXrootd/ %if %{with ceph} -%files -n %{name}-ceph +%files ceph %license COPYING.LGPL LICENSE %{_libdir}/libXrdCeph-%{plugver}.so %{_libdir}/libXrdCephXattr-%{plugver}.so %{_libdir}/libXrdCephPosix.so.* -%files -n %{name}-ceph-devel +%files ceph-devel %license COPYING.LGPL LICENSE %{_libdir}/libXrdCephPosix.so %endif +%else + +%files %{python_files xrootd} +%license COPYING.LGPL LICENSE +%{python_sitearch}/XRootD/ +%{python_sitearch}/pyxrootd/ +%{python_sitearch}/xrootd-*info/ +%endif + %changelog ++++++ _multibuild ++++++ <multibuild> <package>python</package> </multibuild> ++++++ xrootd-5.5.4.tar.gz -> xrootd-5.5.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/.github/workflows/build.yml new/xrootd-5.5.5/.github/workflows/build.yml --- old/xrootd-5.5.4/.github/workflows/build.yml 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/.github/workflows/build.yml 2023-05-07 14:02:46.000000000 +0200 @@ -871,9 +871,6 @@ pkg-config \ tree sudo apt-get autoclean -y - # Remove packages with invalid versions which cause sdist build to fail - sudo apt-get remove python3-debian python3-distro-info - python3 -m pip --no-cache-dir install --upgrade pip setuptools wheel python3 -m pip list - name: Clone repository diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/VERSION_INFO new/xrootd-5.5.5/VERSION_INFO --- old/xrootd-5.5.4/VERSION_INFO 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/VERSION_INFO 2023-05-07 14:02:46.000000000 +0200 @@ -1,3 +1,3 @@ -RefNames: (HEAD, tag: v5.5.4, origin/stable-5.5.x) -ShortHash: 7a490e1 -Date: 2023-03-21 13:32:10 +0100 +RefNames: (HEAD, tag: v5.5.5) +ShortHash: d994dc9 +Date: 2023-05-05 14:11:50 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/bindings/python/src/PyXRootDEnv.hh new/xrootd-5.5.5/bindings/python/src/PyXRootDEnv.hh --- old/xrootd-5.5.4/bindings/python/src/PyXRootDEnv.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/bindings/python/src/PyXRootDEnv.hh 2023-05-07 14:02:46.000000000 +0200 @@ -134,7 +134,7 @@ //---------------------------------------------------------------------------- PyObject* XrdVersion_cpp( PyObject *self, PyObject *args ) { - static std::string verstr( XrdVERSION[0] == 'v' ? XrdVERSION + 1 : XrdVERSION ); + static std::string verstr( XrdVERSION[0] == 'v' ? &XrdVERSION[1] : XrdVERSION ); return Py_BuildValue( "s", verstr.c_str() ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/docs/ReleaseNotes.txt new/xrootd-5.5.5/docs/ReleaseNotes.txt --- old/xrootd-5.5.4/docs/ReleaseNotes.txt 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/docs/ReleaseNotes.txt 2023-05-07 14:02:46.000000000 +0200 @@ -6,6 +6,28 @@ ============= ------------- +Version 5.5.5 +------------- + ++ **Major bug fixes** + **[HTTP]** Initialize SecEntity.addrInfo to avoid SEGV (issue 1986) + **[Server]** Allow XrdXrootdFile::Serialize() to be used to wait more than once (issue 1995) + **[Server]** Correct file handle returned when reusing it from external table + **[XrdCl]** Fix client crash on early closed connection (issue 1934) + ++ **Minor bug fixes** + **[Server]** Use correct format to print size_t (issue 1989) + **[XrdApps]** Let XrdClProxyPlugin work with PgRead (issue 1993) + **[XrdCl]** Avoid possibility of Channel unregistering the wrong task (issue 1883) + **[XrdCl]** Fix ZipArchive issuing VectorWrite which is too large during CloseArchive (issue 2004) + **[XrdSys]** Avoid memory leak when overwriting the default message for EBADE + ++ **Miscellaneous** + **[CMake]** Adjust build rules to not depend on scitokenscpp to build libXrdSecztn + **[Server,XrdPosix,XrdSecgsi]** Fix compile warnings with Clang compiler + **[XrdPosix]** Fix build with Clang and _FORTIFY_SOURCE enabled (issue 1975) + +------------- Version 5.5.4 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdApps/XrdClProxyPlugin/ProxyPrefixFile.hh new/xrootd-5.5.5/src/XrdApps/XrdClProxyPlugin/ProxyPrefixFile.hh --- old/xrootd-5.5.4/src/XrdApps/XrdClProxyPlugin/ProxyPrefixFile.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdApps/XrdClProxyPlugin/ProxyPrefixFile.hh 2023-05-07 14:02:46.000000000 +0200 @@ -26,6 +26,8 @@ #include "XrdCl/XrdClDefaultEnv.hh" #include "XrdCl/XrdClPlugInInterface.hh" +#include <utility> + using namespace XrdCl; namespace xrdcl_proxy @@ -45,7 +47,7 @@ //---------------------------------------------------------------------------- //! Destructor //---------------------------------------------------------------------------- - virtual ~ProxyPrefixFile(); + virtual ~ProxyPrefixFile() override; //---------------------------------------------------------------------------- //! Open @@ -54,13 +56,13 @@ OpenFlags::Flags flags, Access::Mode mode, ResponseHandler* handler, - uint16_t timeout); + uint16_t timeout) override; //---------------------------------------------------------------------------- //! Close //---------------------------------------------------------------------------- virtual XRootDStatus Close(ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Close(handler, timeout); } @@ -70,7 +72,7 @@ //---------------------------------------------------------------------------- virtual XRootDStatus Stat(bool force, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Stat(force, handler, timeout); } @@ -83,11 +85,23 @@ uint32_t size, void* buffer, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Read(offset, size, buffer, handler, timeout); } + //------------------------------------------------------------------------ + //! PgRead + //------------------------------------------------------------------------ + virtual XRootDStatus PgRead( uint64_t offset, + uint32_t size, + void *buffer, + ResponseHandler *handler, + uint16_t timeout ) override + { + return pFile->PgRead(offset, size, buffer, handler, timeout); + } + //---------------------------------------------------------------------------- //! Write //---------------------------------------------------------------------------- @@ -95,16 +109,53 @@ uint32_t size, const void* buffer, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Write(offset, size, buffer, handler, timeout); } + //------------------------------------------------------------------------ + //! Write + //------------------------------------------------------------------------ + virtual XRootDStatus Write( uint64_t offset, + Buffer &&buffer, + ResponseHandler *handler, + uint16_t timeout = 0 ) override + { + return pFile->Write(offset, std::move(buffer), handler, timeout); + } + + //------------------------------------------------------------------------ + //! Write + //------------------------------------------------------------------------ + virtual XRootDStatus Write( uint64_t offset, + uint32_t size, + Optional<uint64_t> fdoff, + int fd, + ResponseHandler *handler, + uint16_t timeout = 0 ) override + { + return pFile->Write(offset, size, fdoff, fd, handler, timeout); + } + + //------------------------------------------------------------------------ + //! PgWrite + //------------------------------------------------------------------------ + virtual XRootDStatus PgWrite( uint64_t offset, + uint32_t nbpgs, + const void *buffer, + std::vector<uint32_t> &cksums, + ResponseHandler *handler, + uint16_t timeout ) override + { + return pFile->PgWrite(offset, nbpgs, buffer, cksums, handler, timeout); + } + //---------------------------------------------------------------------------- //! Sync //---------------------------------------------------------------------------- virtual XRootDStatus Sync(ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Sync(handler, timeout); } @@ -114,7 +165,7 @@ //---------------------------------------------------------------------------- virtual XRootDStatus Truncate(uint64_t size, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Truncate(size, handler, timeout); } @@ -125,17 +176,39 @@ virtual XRootDStatus VectorRead(const ChunkList& chunks, void* buffer, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->VectorRead(chunks, buffer, handler, timeout); } + //------------------------------------------------------------------------ + //! VectorWrite + //------------------------------------------------------------------------ + virtual XRootDStatus VectorWrite( const ChunkList &chunks, + ResponseHandler *handler, + uint16_t timeout = 0 ) override + { + return pFile->VectorWrite(chunks, handler, timeout); + } + + //------------------------------------------------------------------------ + //! @see XrdCl::File::WriteV + //------------------------------------------------------------------------ + virtual XRootDStatus WriteV( uint64_t offset, + const struct iovec *iov, + int iovcnt, + ResponseHandler *handler, + uint16_t timeout = 0 ) override + { + return pFile->WriteV(offset, iov, iovcnt, handler, timeout); + } + //---------------------------------------------------------------------------- //! Fcntl //---------------------------------------------------------------------------- virtual XRootDStatus Fcntl(const Buffer& arg, ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Fcntl(arg, handler, timeout); } @@ -144,7 +217,7 @@ //! Visa //---------------------------------------------------------------------------- virtual XRootDStatus Visa(ResponseHandler* handler, - uint16_t timeout) + uint16_t timeout) override { return pFile->Visa(handler, timeout); } @@ -152,7 +225,7 @@ //---------------------------------------------------------------------------- //! IsOpen //---------------------------------------------------------------------------- - virtual bool IsOpen() const + virtual bool IsOpen() const override { return pFile->IsOpen(); } @@ -161,7 +234,7 @@ //! SetProperty //---------------------------------------------------------------------------- virtual bool SetProperty(const std::string& name, - const std::string& value) + const std::string& value) override { return pFile->SetProperty(name, value); } @@ -170,7 +243,7 @@ //! GetProperty //---------------------------------------------------------------------------- virtual bool GetProperty(const std::string& name, - std::string& value) const + std::string& value) const override { return pFile->GetProperty(name, value); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCeph/VERSION_INFO new/xrootd-5.5.5/src/XrdCeph/VERSION_INFO --- old/xrootd-5.5.4/src/XrdCeph/VERSION_INFO 2022-09-19 07:07:01.000000000 +0200 +++ new/xrootd-5.5.5/src/XrdCeph/VERSION_INFO 2022-09-19 07:07:01.000000000 +0200 @@ -1,3 +1,3 @@ -RefNames: (HEAD, tag: v5.5.4, tag: v5.5.3, tag: v5.5.2-rc2, tag: v5.5.2-rc1, tag: v5.5.2, tag: v5.5.1-rc2, tag: v5.5.1, origin/stable-5.5.x, origin/master, origin/HEAD, master) +RefNames: (HEAD, tag: v5.5.5, tag: v5.5.4, tag: v5.5.3, tag: v5.5.2-rc2, tag: v5.5.2-rc1, tag: v5.5.2, tag: v5.5.1-rc2, tag: v5.5.1, origin/stable-5.5.x, origin/master, origin/HEAD, master) ShortHash: 6ba5175 Date: 2022-09-18 22:07:01 -0700 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClAsyncSocketHandler.cc new/xrootd-5.5.5/src/XrdCl/XrdClAsyncSocketHandler.cc --- old/xrootd-5.5.4/src/XrdCl/XrdClAsyncSocketHandler.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClAsyncSocketHandler.cc 2023-05-07 14:02:46.000000000 +0200 @@ -136,6 +136,9 @@ } pHandShakeDone = false; + pTlsHandShakeOngoing = false; + pHSWaitStarted = 0; + pHSWaitSeconds = 0; //-------------------------------------------------------------------------- // Initiate async connection to the address @@ -214,17 +217,35 @@ type = pSocket->MapEvent( type ); //-------------------------------------------------------------------------- + // Handle any read or write events. If any of the handlers indicate an error + // we will have been disconnected. A disconnection may cause the current + // object to be asynchronously reused or deleted, so we return immediately. + //-------------------------------------------------------------------------- + if( !EventRead( type ) ) + return; + + if( !EventWrite( type ) ) + return; + } + + //---------------------------------------------------------------------------- + // Handler for read related socket events + //---------------------------------------------------------------------------- + bool AsyncSocketHandler::EventRead( uint8_t type ) + { + //-------------------------------------------------------------------------- // Read event //-------------------------------------------------------------------------- if( type & ReadyToRead ) { pLastActivity = time(0); if( unlikely( pTlsHandShakeOngoing ) ) - OnTLSHandShake(); - else if( likely( pHandShakeDone ) ) - OnRead(); - else - OnReadWhileHandshaking(); + return OnTLSHandShake(); + + if( likely( pHandShakeDone ) ) + return OnRead(); + + return OnReadWhileHandshaking(); } //-------------------------------------------------------------------------- @@ -233,14 +254,25 @@ else if( type & ReadTimeOut ) { if( pHSWaitSeconds ) - CheckHSWait(); + { + if( !CheckHSWait() ) + return false; + } if( likely( pHandShakeDone ) ) - OnReadTimeout(); - else - OnTimeoutWhileHandshaking(); + return OnReadTimeout(); + + return OnTimeoutWhileHandshaking(); } + return true; + } + + //---------------------------------------------------------------------------- + // Handler for write related socket events + //---------------------------------------------------------------------------- + bool AsyncSocketHandler::EventWrite( uint8_t type ) + { //-------------------------------------------------------------------------- // Write event //-------------------------------------------------------------------------- @@ -248,19 +280,21 @@ { pLastActivity = time(0); if( unlikely( pSocket->GetStatus() == Socket::Connecting ) ) - OnConnectionReturn(); + return OnConnectionReturn(); + //------------------------------------------------------------------------ // Make sure we are not writing anything if we have been told to wait. //------------------------------------------------------------------------ - else if( pHSWaitSeconds == 0 ) - { - if( unlikely( pTlsHandShakeOngoing ) ) - OnTLSHandShake(); - else if( likely( pHandShakeDone ) ) - OnWrite(); - else - OnWriteWhileHandshaking(); - } + if( pHSWaitSeconds != 0 ) + return true; + + if( unlikely( pTlsHandShakeOngoing ) ) + return OnTLSHandShake(); + + if( likely( pHandShakeDone ) ) + return OnWrite(); + + return OnWriteWhileHandshaking(); } //-------------------------------------------------------------------------- @@ -269,16 +303,18 @@ else if( type & WriteTimeOut ) { if( likely( pHandShakeDone ) ) - OnWriteTimeout(); - else - OnTimeoutWhileHandshaking(); + return OnWriteTimeout(); + + return OnTimeoutWhileHandshaking(); } + + return true; } //---------------------------------------------------------------------------- // Connect returned //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnConnectionReturn() + bool AsyncSocketHandler::OnConnectionReturn() { //-------------------------------------------------------------------------- // Check whether we were able to connect @@ -303,7 +339,7 @@ XrdSysE2T( errno ) ); pStream->OnConnectError( pSubStreamNum, XRootDStatus( stFatal, errSocketOptError, errno ) ); - return; + return false; } //-------------------------------------------------------------------------- @@ -315,7 +351,7 @@ pStreamName.c_str(), XrdSysE2T( errorCode ) ); pStream->OnConnectError( pSubStreamNum, XRootDStatus( stError, errConnectionError ) ); - return; + return false; } pSocket->SetStatus( Socket::Connected ); @@ -326,7 +362,7 @@ if( !st.IsOK() ) { pStream->OnConnectError( pSubStreamNum, st ); - return; + return false; } //-------------------------------------------------------------------------- @@ -344,7 +380,7 @@ log->Error( AsyncSockMsg, "[%s] Connection negotiation failed", pStreamName.c_str() ); pStream->OnConnectError( pSubStreamNum, st ); - return; + return false; } if( st.code != suRetry ) @@ -372,19 +408,20 @@ { pStream->OnConnectError( pSubStreamNum, XRootDStatus( stFatal, errPollerError ) ); - return; + return false; } + return true; } //---------------------------------------------------------------------------- // Got a write readiness event //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnWrite() + bool AsyncSocketHandler::OnWrite() { if( !reqwriter ) { OnFault( XRootDStatus( stError, errInternal, 0, "Request writer is null." ) ); - return; + return false; } //-------------------------------------------------------------------------- // Let's do the writing ... @@ -396,30 +433,34 @@ // We failed //------------------------------------------------------------------------ OnFault( st ); - return; + return false; } //-------------------------------------------------------------------------- // We are not done yet //-------------------------------------------------------------------------- - if( st.code == suRetry) return; + if( st.code == suRetry) return true; //-------------------------------------------------------------------------- // Disable the respective substream if empty //-------------------------------------------------------------------------- reqwriter->Reset(); pStream->DisableIfEmpty( pSubStreamNum ); + return true; } //---------------------------------------------------------------------------- // Got a write readiness event while handshaking //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnWriteWhileHandshaking() + bool AsyncSocketHandler::OnWriteWhileHandshaking() { XRootDStatus st; if( !hswriter || !hswriter->HasMsg() ) { if( !(st = DisableUplink()).IsOK() ) + { OnFaultWhileHandshaking( st ); - return; + return false; + } + return true; } //-------------------------------------------------------------------------- // Let's do the writing ... @@ -431,25 +472,29 @@ // We failed //------------------------------------------------------------------------ OnFaultWhileHandshaking( st ); - return; + return false; } //-------------------------------------------------------------------------- // We are not done yet //-------------------------------------------------------------------------- - if( st.code == suRetry ) return; + if( st.code == suRetry ) return true; //-------------------------------------------------------------------------- // Disable the uplink // Note: at this point we don't deallocate the HS message as we might need // to re-send it in case of a kXR_wait response //-------------------------------------------------------------------------- if( !(st = DisableUplink()).IsOK() ) + { OnFaultWhileHandshaking( st ); + return false; + } + return true; } //---------------------------------------------------------------------------- // Got a read readiness event //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnRead() + bool AsyncSocketHandler::OnRead() { //-------------------------------------------------------------------------- // Make sure the response reader object exists @@ -457,7 +502,7 @@ if( !rspreader ) { OnFault( XRootDStatus( stError, errInternal, 0, "Response reader is null." ) ); - return; + return false; } //-------------------------------------------------------------------------- @@ -471,7 +516,7 @@ if( !st.IsOK() && st.code == errCorruptedHeader ) { OnHeaderCorruption(); - return; + return false; } //-------------------------------------------------------------------------- @@ -480,24 +525,25 @@ if( !st.IsOK() ) { OnFault( st ); - return; + return false; } //-------------------------------------------------------------------------- // We are not done yet //-------------------------------------------------------------------------- - if( st.code == suRetry ) return; + if( st.code == suRetry ) return true; //-------------------------------------------------------------------------- // We are done, reset the response reader so we can read out next message //-------------------------------------------------------------------------- rspreader->Reset(); + return true; } //---------------------------------------------------------------------------- // Got a read readiness event while handshaking //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnReadWhileHandshaking() + bool AsyncSocketHandler::OnReadWhileHandshaking() { //-------------------------------------------------------------------------- // Make sure the response reader object exists @@ -505,7 +551,7 @@ if( !hsreader ) { OnFault( XRootDStatus( stError, errInternal, 0, "Hand-shake reader is null." ) ); - return; + return false; } //-------------------------------------------------------------------------- @@ -516,19 +562,19 @@ if( !st.IsOK() ) { OnFaultWhileHandshaking( st ); - return; + return false; } if( st.code != suDone ) - return; + return true; - HandleHandShake( hsreader->ReleaseMsg() ); + return HandleHandShake( hsreader->ReleaseMsg() ); } //------------------------------------------------------------------------ // Handle the handshake message //------------------------------------------------------------------------ - void AsyncSocketHandler::HandleHandShake( std::unique_ptr<Message> msg ) + bool AsyncSocketHandler::HandleHandShake( std::unique_ptr<Message> msg ) { //-------------------------------------------------------------------------- // OK, we have a new message, let's deal with it; @@ -547,7 +593,7 @@ if( !st.IsOK() ) { OnFaultWhileHandshaking( st ); - return; + return false; } if( st.code == suRetry ) @@ -568,6 +614,7 @@ pStreamName.c_str() ); OnFaultWhileHandshaking( XRootDStatus( stError, errSocketTimeout ) ); + return false; } else { @@ -581,15 +628,14 @@ pHSWaitStarted = time( 0 ); pHSWaitSeconds = waitSeconds; } - return; + return true; } //------------------------------------------------------------------------ // We are re-sending a protocol request //------------------------------------------------------------------------ else if( pHandShakeData->out ) { - SendHSMsg(); - return; + return SendHSMsg(); } } @@ -600,19 +646,22 @@ pTransport->NeedEncryption( pHandShakeData.get(), *pChannelData ) ) { XRootDStatus st = DoTlsHandShake(); - if( !st.IsOK() || st.code == suRetry ) return; + if( !st.IsOK() ) + return false; + if ( st.code == suRetry ) + return true; } //-------------------------------------------------------------------------- // Now prepare the next step of the hand-shake procedure //-------------------------------------------------------------------------- - HandShakeNextStep( st.IsOK() && st.code == suDone ); + return HandShakeNextStep( st.IsOK() && st.code == suDone ); } //------------------------------------------------------------------------ // Prepare the next step of the hand-shake procedure //------------------------------------------------------------------------ - void AsyncSocketHandler::HandShakeNextStep( bool done ) + bool AsyncSocketHandler::HandShakeNextStep( bool done ) { //-------------------------------------------------------------------------- // We successfully proceeded to the next step @@ -636,7 +685,7 @@ if( !(st = EnableUplink()).IsOK() ) { OnFaultWhileHandshaking( st ); - return; + return false; } pHandShakeDone = true; pStream->OnConnect( pSubStreamNum ); @@ -646,8 +695,9 @@ //-------------------------------------------------------------------------- else if( pHandShakeData->out ) { - SendHSMsg(); + return SendHSMsg(); } + return true; } //---------------------------------------------------------------------------- @@ -677,27 +727,31 @@ //---------------------------------------------------------------------------- // Handle write timeout //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnWriteTimeout() + bool AsyncSocketHandler::OnWriteTimeout() { - pStream->OnWriteTimeout( pSubStreamNum ); + return pStream->OnWriteTimeout( pSubStreamNum ); } //---------------------------------------------------------------------------- // Handler read timeout //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnReadTimeout() + bool AsyncSocketHandler::OnReadTimeout() { - pStream->OnReadTimeout( pSubStreamNum ); + return pStream->OnReadTimeout( pSubStreamNum ); } //---------------------------------------------------------------------------- // Handle timeout while handshaking //---------------------------------------------------------------------------- - void AsyncSocketHandler::OnTimeoutWhileHandshaking() + bool AsyncSocketHandler::OnTimeoutWhileHandshaking() { time_t now = time(0); if( now > pConnectionStarted+pConnectionTimeout ) + { OnFaultWhileHandshaking( XRootDStatus( stError, errSocketTimeout ) ); + return false; + } + return true; } //---------------------------------------------------------------------------- @@ -723,8 +777,8 @@ XRootDStatus st; if( !( st = pSocket->TlsHandShake( this, pUrl.GetHostName() ) ).IsOK() ) { - OnFaultWhileHandshaking( st ); pTlsHandShakeOngoing = false; + OnFaultWhileHandshaking( st ); return st; } @@ -743,25 +797,28 @@ //---------------------------------------------------------------------------- // Handle read/write event if we are in the middle of a TLS hand-shake //---------------------------------------------------------------------------- - inline void AsyncSocketHandler::OnTLSHandShake() + inline bool AsyncSocketHandler::OnTLSHandShake() { XRootDStatus st = DoTlsHandShake(); - if( !st.IsOK() || st.code == suRetry ) return; + if( !st.IsOK() ) + return false; + if ( st.code == suRetry ) + return true; - HandShakeNextStep( pTransport->HandShakeDone( pHandShakeData.get(), - *pChannelData ) ); + return HandShakeNextStep( pTransport->HandShakeDone( pHandShakeData.get(), + *pChannelData ) ); } //---------------------------------------------------------------------------- // Prepare a HS writer for sending and enable uplink //---------------------------------------------------------------------------- - void AsyncSocketHandler::SendHSMsg() + bool AsyncSocketHandler::SendHSMsg() { if( !hswriter ) { OnFaultWhileHandshaking( XRootDStatus( stError, errInternal, 0, "HS writer object missing!" ) ); - return; + return false; } //-------------------------------------------------------------------------- // We only set a new HS message if this is not a replay due to kXR_wait @@ -783,8 +840,9 @@ if( !(st = EnableUplink()).IsOK() ) { OnFaultWhileHandshaking( st ); - return; + return false; } + return true; } kXR_int32 AsyncSocketHandler::HandleWaitRsp( Message *msg ) @@ -801,7 +859,7 @@ //---------------------------------------------------------------------------- // Check if HS wait time elapsed //---------------------------------------------------------------------------- - void AsyncSocketHandler::CheckHSWait() + bool AsyncSocketHandler::CheckHSWait() { time_t now = time( 0 ); if( now - pHSWaitStarted >= pHSWaitSeconds ) @@ -809,13 +867,15 @@ Log *log = DefaultEnv::GetLog(); log->Debug( AsyncSockMsg, "[%s] The hand-shake wait time elapsed, will " "replay the endsess request.", pStreamName.c_str() ); - SendHSMsg(); + if( !SendHSMsg() ) + return false; //------------------------------------------------------------------------ // Make sure the wait state is reset //------------------------------------------------------------------------ pHSWaitSeconds = 0; pHSWaitStarted = 0; } + return true; } //------------------------------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClAsyncSocketHandler.hh new/xrootd-5.5.5/src/XrdCl/XrdClAsyncSocketHandler.hh --- old/xrootd-5.5.4/src/XrdCl/XrdClAsyncSocketHandler.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClAsyncSocketHandler.hh 2023-05-07 14:02:46.000000000 +0200 @@ -30,6 +30,7 @@ #include "XrdCl/XrdClAsyncHSReader.hh" #include "XrdCl/XrdClAsyncMsgWriter.hh" #include "XrdCl/XrdClAsyncHSWriter.hh" +#include "XrdOuc/XrdOucCompiler.hh" namespace XrdCl { @@ -149,37 +150,38 @@ //------------------------------------------------------------------------ // Connect returned //------------------------------------------------------------------------ - virtual void OnConnectionReturn(); + virtual bool OnConnectionReturn() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Got a write readiness event //------------------------------------------------------------------------ - void OnWrite(); + bool OnWrite() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Got a write readiness event while handshaking //------------------------------------------------------------------------ - void OnWriteWhileHandshaking(); + bool OnWriteWhileHandshaking() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Got a read readiness event //------------------------------------------------------------------------ - void OnRead(); + bool OnRead() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Got a read readiness event while handshaking //------------------------------------------------------------------------ - void OnReadWhileHandshaking(); + bool OnReadWhileHandshaking() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Handle the handshake message //------------------------------------------------------------------------ - void HandleHandShake( std::unique_ptr<Message> msg ); + bool HandleHandShake( std::unique_ptr<Message> msg ) + XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Prepare the next step of the hand-shake procedure //------------------------------------------------------------------------ - void HandShakeNextStep( bool done ); + bool HandShakeNextStep( bool done ) XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Handle fault @@ -194,17 +196,17 @@ //------------------------------------------------------------------------ // Handle write timeout event //------------------------------------------------------------------------ - void OnWriteTimeout(); + bool OnWriteTimeout() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Handle read timeout event //------------------------------------------------------------------------ - void OnReadTimeout(); + bool OnReadTimeout() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Handle timeout event while handshaking //------------------------------------------------------------------------ - void OnTimeoutWhileHandshaking(); + bool OnTimeoutWhileHandshaking() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Handle header corruption in case of kXR_status response @@ -229,12 +231,12 @@ // Handle read/write event if we are in the middle of a TLS hand-shake //------------------------------------------------------------------------ // Handle read/write event if we are in the middle of a TLS hand-shake - void OnTLSHandShake(); + bool OnTLSHandShake() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Prepare a HS writer for sending and enable uplink //------------------------------------------------------------------------ - void SendHSMsg(); + bool SendHSMsg() XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Extract the value of a wait response @@ -248,7 +250,17 @@ //------------------------------------------------------------------------ // Check if HS wait time elapsed //------------------------------------------------------------------------ - void CheckHSWait(); + bool CheckHSWait() XRD_WARN_UNUSED_RESULT; + + //------------------------------------------------------------------------ + // Handler for read related socket events + //------------------------------------------------------------------------ + inline bool EventRead( uint8_t type ) XRD_WARN_UNUSED_RESULT; + + //------------------------------------------------------------------------ + // Handler for write related socket events + //------------------------------------------------------------------------ + inline bool EventWrite( uint8_t type ) XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ // Data members diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClChannel.cc new/xrootd-5.5.5/src/XrdCl/XrdClChannel.cc --- old/xrootd-5.5.4/src/XrdCl/XrdClChannel.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClChannel.cc 2023-05-07 14:02:46.000000000 +0200 @@ -132,7 +132,6 @@ Channel::~Channel() { pTickGenerator->Invalidate(); - pTaskManager->UnregisterTask( pTickGenerator ); delete pStream; pTransport->FinalizeChannel( pChannelData ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClStream.cc new/xrootd-5.5.5/src/XrdCl/XrdClStream.cc --- old/xrootd-5.5.4/src/XrdCl/XrdClStream.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClStream.cc 2023-05-07 14:02:46.000000000 +0200 @@ -1021,13 +1021,13 @@ //---------------------------------------------------------------------------- // Call back when a message has been reconstructed //---------------------------------------------------------------------------- - void Stream::OnReadTimeout( uint16_t substream ) + bool Stream::OnReadTimeout( uint16_t substream ) { //-------------------------------------------------------------------------- // We only take the main stream into account //-------------------------------------------------------------------------- if( substream != 0 ) - return; + return true; //-------------------------------------------------------------------------- // Check if there is no outgoing messages and if the stream TTL is elapesed. @@ -1067,7 +1067,7 @@ // object that aggregates this Stream. //---------------------------------------------------------------------- DefaultEnv::GetPostMaster()->ForceDisconnect( *pUrl ); - return; + return false; } } @@ -1080,14 +1080,17 @@ { scopedLock.UnLock(); OnError( substream, st ); + return false; } + return true; } //---------------------------------------------------------------------------- // Call back when a message has been reconstru //---------------------------------------------------------------------------- - void Stream::OnWriteTimeout( uint16_t /*substream*/ ) + bool Stream::OnWriteTimeout( uint16_t /*substream*/ ) { + return true; } //---------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClStream.hh new/xrootd-5.5.5/src/XrdCl/XrdClStream.hh --- old/xrootd-5.5.4/src/XrdCl/XrdClStream.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClStream.hh 2023-05-07 14:02:46.000000000 +0200 @@ -31,6 +31,7 @@ #include "XrdSys/XrdSysPthread.hh" #include "XrdSys/XrdSysRAtomic.hh" #include "XrdNet/XrdNetAddr.hh" +#include "XrdOuc/XrdOucCompiler.hh" #include <list> #include <vector> #include <functional> @@ -219,12 +220,12 @@ //------------------------------------------------------------------------ //! On read timeout //------------------------------------------------------------------------ - void OnReadTimeout( uint16_t subStream ); + bool OnReadTimeout( uint16_t subStream ) XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ //! On write timeout //------------------------------------------------------------------------ - void OnWriteTimeout( uint16_t subStream ); + bool OnWriteTimeout( uint16_t subStream ) XRD_WARN_UNUSED_RESULT; //------------------------------------------------------------------------ //! Register channel event handler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClUtils.cc new/xrootd-5.5.5/src/XrdCl/XrdClUtils.cc --- old/xrootd-5.5.4/src/XrdCl/XrdClUtils.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClUtils.cc 2023-05-07 14:02:46.000000000 +0200 @@ -865,4 +865,54 @@ if( dst_supported.count( *itr ) ) return *itr; return std::string(); } + + //---------------------------------------------------------------------------- + //! Split chunks in a ChunkList into one or more ChunkLists + //---------------------------------------------------------------------------- + void Utils::SplitChunks( std::vector<ChunkList> &listsvec, + const ChunkList &chunks, + const uint32_t maxcs, + const size_t maxc ) + { + listsvec.clear(); + if( !chunks.size() ) return; + + listsvec.emplace_back(); + ChunkList *c = &listsvec.back(); + const size_t cs = chunks.size(); + size_t idx = 0; + size_t nc = 0; + ChunkInfo tmpc; + + c->reserve( cs ); + + while( idx < cs ) + { + if( maxc && nc >= maxc ) + { + listsvec.emplace_back(); + c = &listsvec.back(); + c->reserve( cs - idx ); + nc = 0; + } + + if( tmpc.length == 0 ) + tmpc = chunks[idx]; + + if( maxcs && tmpc.length > maxcs ) + { + c->emplace_back( tmpc.offset, maxcs, tmpc.buffer ); + tmpc.offset += maxcs; + tmpc.length -= maxcs; + tmpc.buffer = static_cast<char*>( tmpc.buffer ) + maxcs; + } + else + { + c->emplace_back( tmpc.offset, tmpc.length, tmpc.buffer ); + tmpc.length = 0; + ++idx; + } + ++nc; + } + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClUtils.hh new/xrootd-5.5.5/src/XrdCl/XrdClUtils.hh --- old/xrootd-5.5.4/src/XrdCl/XrdClUtils.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClUtils.hh 2023-05-07 14:02:46.000000000 +0200 @@ -272,6 +272,18 @@ if( !st.IsOK() ) return false; return protver >= kXR_PROTPGRWVERSION; } + + //------------------------------------------------------------------------ + //! Split chunks in a ChunkList into one or more ChunkLists + //! @param listsvec : output vector of ChunkLists + //! @param chunks : input ChunkLisits + //! @param maxcs : maximum size of a ChunkInfo in output + //! @param maxc : maximum number of ChunkInfo in each ChunkList + //------------------------------------------------------------------------ + static void SplitChunks( std::vector<ChunkList> &listsvec, + const ChunkList &chunks, + const uint32_t maxcs, + const size_t maxc ); }; //---------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdCl/XrdClZipArchive.cc new/xrootd-5.5.5/src/XrdCl/XrdClZipArchive.cc --- old/xrootd-5.5.4/src/XrdCl/XrdClZipArchive.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdCl/XrdClZipArchive.cc 2023-05-07 14:02:46.000000000 +0200 @@ -28,6 +28,7 @@ #include "XrdCl/XrdClLog.hh" #include "XrdCl/XrdClDefaultEnv.hh" #include "XrdCl/XrdClConstants.hh" +#include "XrdCl/XrdClUtils.hh" #include "XrdZip/XrdZipZIP64EOCDL.hh" #include <sys/stat.h> @@ -626,10 +627,18 @@ } auto wrtbuff = std::make_shared<buffer_t>( GetCD() ); - chunks.emplace_back( cdoff, wrtbuff->size(), wrtbuff->data() ); + Pipeline p = XrdCl::Write( archive, cdoff, + wrtbuff->size(), + wrtbuff->data() ); wrtbufs.emplace_back( std::move( wrtbuff ) ); - Pipeline p = XrdCl::VectorWrite( archive, chunks ); + std::vector<ChunkList> listsvec; + XrdCl::Utils::SplitChunks( listsvec, chunks, 262144, 1024 ); + + for(auto itr = listsvec.rbegin(); itr != listsvec.rend(); ++itr) + { + p = XrdCl::VectorWrite( archive, *itr ) | p; + } if( ckpinit ) p |= XrdCl::Checkpoint( archive, ChkPtCode::COMMIT ); p |= Close( archive ) >> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdHttp/XrdHttpProtocol.cc new/xrootd-5.5.5/src/XrdHttp/XrdHttpProtocol.cc --- old/xrootd-5.5.4/src/XrdHttp/XrdHttpProtocol.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdHttp/XrdHttpProtocol.cc 2023-05-07 14:02:46.000000000 +0200 @@ -280,6 +280,7 @@ // that is is https without invoking TLS on the actual link. Eventually, // we should just use the link's TLS native implementation. // + SecEntity.addrInfo = lp->AddrInfo(); XrdNetAddr *netP = const_cast<XrdNetAddr*>(lp->NetAddr()); netP->SetDialect("https"); netP->SetTLS(true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdMacaroons/XrdMacaroonsAuthz.hh new/xrootd-5.5.5/src/XrdMacaroons/XrdMacaroonsAuthz.hh --- old/xrootd-5.5.4/src/XrdMacaroons/XrdMacaroonsAuthz.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdMacaroons/XrdMacaroonsAuthz.hh 2023-05-07 14:02:46.000000000 +0200 @@ -43,7 +43,7 @@ // Macaroons don't have a concept off an "issuers"; return an empty // list. - virtual Issuers IssuerList() {return Issuers();} + virtual Issuers IssuerList() override {return Issuers();} private: XrdAccPrivs OnMissing(const XrdSecEntity *Entity, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdPosix/XrdPosixAdmin.cc new/xrootd-5.5.5/src/XrdPosix/XrdPosixAdmin.cc --- old/xrootd-5.5.4/src/XrdPosix/XrdPosixAdmin.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdPosix/XrdPosixAdmin.cc 2023-05-07 14:02:46.000000000 +0200 @@ -51,7 +51,7 @@ XrdCl::URL *uVec; XrdNetAddr netLoc; const char *hName; - unsigned int i; + unsigned long i; // Make sure admin is ok // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdPosix/XrdPosixFile.hh new/xrootd-5.5.5/src/XrdPosix/XrdPosixFile.hh --- old/xrootd-5.5.4/src/XrdPosix/XrdPosixFile.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdPosix/XrdPosixFile.hh 2023-05-07 14:02:46.000000000 +0200 @@ -165,7 +165,7 @@ using XrdPosixObject::Who; -inline bool Who(XrdPosixFile **fileP) +inline bool Who(XrdPosixFile **fileP) override {*fileP = this; return true;} int Write(char *Buff, long long Offs, int Len) override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdPosix/XrdPosixPreload.cc new/xrootd-5.5.5/src/XrdPosix/XrdPosixPreload.cc --- old/xrootd-5.5.4/src/XrdPosix/XrdPosixPreload.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdPosix/XrdPosixPreload.cc 2023-05-07 14:02:46.000000000 +0200 @@ -28,6 +28,10 @@ /* specific prior written permission of the institution or contributor. */ /******************************************************************************/ +#if defined(__clang__) && defined(_FORTIFY_SOURCE) +#undef _FORTIFY_SOURCE +#endif + #include <sys/types.h> #include <cstdarg> #include <unistd.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdPosix/XrdPosixPreload32.cc new/xrootd-5.5.5/src/XrdPosix/XrdPosixPreload32.cc --- old/xrootd-5.5.4/src/XrdPosix/XrdPosixPreload32.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdPosix/XrdPosixPreload32.cc 2023-05-07 14:02:46.000000000 +0200 @@ -28,6 +28,10 @@ /* specific prior written permission of the institution or contributor. */ /******************************************************************************/ +#if defined(__clang__) && defined(_FORTIFY_SOURCE) +#undef _FORTIFY_SOURCE +#endif + #ifdef _LARGEFILE_SOURCE #undef _LARGEFILE_SOURCE #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdPss/XrdPss.hh new/xrootd-5.5.5/src/XrdPss/XrdPss.hh --- old/xrootd-5.5.4/src/XrdPss/XrdPss.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdPss/XrdPss.hh 2023-05-07 14:02:46.000000000 +0200 @@ -144,34 +144,34 @@ class XrdPssSys : public XrdOss { public: -virtual XrdOssDF *newDir(const char *tident) +virtual XrdOssDF *newDir(const char *tident) override {return (XrdOssDF *)new XrdPssDir(tident);} -virtual XrdOssDF *newFile(const char *tident) +virtual XrdOssDF *newFile(const char *tident) override {return (XrdOssDF *)new XrdPssFile(tident);} -virtual void Connect(XrdOucEnv &); +virtual void Connect(XrdOucEnv &) override; -virtual void Disc(XrdOucEnv &); +virtual void Disc(XrdOucEnv &) override; -int Chmod(const char *, mode_t mode, XrdOucEnv *eP=0); +int Chmod(const char *, mode_t mode, XrdOucEnv *eP=0) override; bool ConfigMapID(); virtual -int Create(const char *, const char *, mode_t, XrdOucEnv &, int opts=0); -void EnvInfo(XrdOucEnv *envP); -uint64_t Features() {return myFeatures;} +int Create(const char *, const char *, mode_t, XrdOucEnv &, int opts=0) override; +void EnvInfo(XrdOucEnv *envP) override; +uint64_t Features() override {return myFeatures;} int Init(XrdSysLogger *, const char *) override {return -ENOTSUP;} int Init(XrdSysLogger *, const char *, XrdOucEnv *envP) override; -int Lfn2Pfn(const char *Path, char *buff, int blen); +int Lfn2Pfn(const char *Path, char *buff, int blen) override; const -char *Lfn2Pfn(const char *Path, char *buff, int blen, int &rc); -int Mkdir(const char *, mode_t mode, int mkpath=0, XrdOucEnv *eP=0); -int Remdir(const char *, int Opts=0, XrdOucEnv *eP=0); +char *Lfn2Pfn(const char *Path, char *buff, int blen, int &rc) override; +int Mkdir(const char *, mode_t mode, int mkpath=0, XrdOucEnv *eP=0) override; +int Remdir(const char *, int Opts=0, XrdOucEnv *eP=0) override; int Rename(const char *, const char *, - XrdOucEnv *eP1=0, XrdOucEnv *eP2=0); -int Stat(const char *, struct stat *, int opts=0, XrdOucEnv *eP=0); -int Stats(char *bp, int bl); -int Truncate(const char *, unsigned long long, XrdOucEnv *eP=0); -int Unlink(const char *, int Opts=0, XrdOucEnv *eP=0); + XrdOucEnv *eP1=0, XrdOucEnv *eP2=0) override; +int Stat(const char *, struct stat *, int opts=0, XrdOucEnv *eP=0) override; +int Stats(char *bp, int bl) override; +int Truncate(const char *, unsigned long long, XrdOucEnv *eP=0) override; +int Unlink(const char *, int Opts=0, XrdOucEnv *eP=0) override; static const int PolNum = 2; enum PolAct {PolPath = 0, PolObj = 1}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdSecgsi/XrdSecgsiGMAPFunDN.cc new/xrootd-5.5.5/src/XrdSecgsi/XrdSecgsiGMAPFunDN.cc --- old/xrootd-5.5.4/src/XrdSecgsi/XrdSecgsiGMAPFunDN.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdSecgsi/XrdSecgsiGMAPFunDN.cc 2023-05-07 14:02:46.000000000 +0200 @@ -204,7 +204,7 @@ if (len < 2) continue; if (l[0] == '#') continue; if (l[len-1] == '\n') l[len-1] = '\0'; - if (sscanf(l, "%4096s %256s", val, usr) >= 2) { + if (sscanf(l, "%4095s %255s", val, usr) >= 2) { XrdOucString stype = "matching"; char *p = &val[0]; int type = kFull; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdSys/XrdSysE2T.cc new/xrootd-5.5.5/src/XrdSys/XrdSysE2T.cc --- old/xrootd-5.5.4/src/XrdSys/XrdSysE2T.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdSys/XrdSysE2T.cc 2023-05-07 14:02:46.000000000 +0200 @@ -54,7 +54,7 @@ // Premap all known error codes. // - for(int i = 1; i <errSlots; i++) + for(int i = 1; i < errSlots; i++) {eTxt = strerror(ERRNOBASE + i); if (eTxt) { eTxt = strdup(eTxt); @@ -67,11 +67,15 @@ // 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]); + } + Errno2String[EBADE] = "authentication failed - possible invalid exchange"; #endif -// Supply generic message for missing ones -// + // Supply generic message for missing ones + // for (int i = 1; i < lastGood; i++) {if (!Errno2String[i]) {snprintf(eBuff, sizeof(eBuff), "unknown error %d", ERRNOBASE + i); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdAioBuff.hh new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdAioBuff.hh --- old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdAioBuff.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdAioBuff.hh 2023-05-07 14:02:46.000000000 +0200 @@ -48,7 +48,7 @@ void doneWrite() override; -virtual void Recycle(); +virtual void Recycle() override; XrdXrootdAioBuff* next; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdFile.cc new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdFile.cc --- old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdFile.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdFile.cc 2023-05-07 14:02:46.000000000 +0200 @@ -170,7 +170,10 @@ fileMutex.Lock(); refCount += num; TRACEI(FSAIO,"File::Ref="<<refCount<<" after +"<<num<<' '<<FileKey); - if (num < 0 && syncWait && refCount <= 0) syncWait->Post(); + if (num < 0 && syncWait && refCount <= 0) + {syncWait->Post(); + syncWait = nullptr; + } fileMutex.UnLock(); } @@ -215,6 +218,7 @@ else {i -= XRD_FTABSIZE; if (XTab && i < XTnum) fP = &XTab[i]; else fP = 0; + i += XRD_FTABSIZE; } if (fP && *fP == heldSpotP) {*fP = fp; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdProtocol.cc new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdProtocol.cc --- old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdProtocol.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdProtocol.cc 2023-05-07 14:02:46.000000000 +0200 @@ -1501,7 +1501,7 @@ doTLS = tlsNot; // Assume client is not capable. This will be ableTLS = false; // resolved during the kXR_protocol interchange. isTLS = false; // Made true when link converted to TLS - linkAioReq = {0}; + linkAioReq = 0; pioFree = pioFirst = pioLast = 0; isActive = isLinkWT= isNOP = isDead = false; sigNeed = sigHere = sigRead = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdProtocol.hh new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdProtocol.hh --- old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdProtocol.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdProtocol.hh 2023-05-07 14:02:46.000000000 +0200 @@ -163,11 +163,11 @@ static char *Buffer(XrdSfsXioHandle h, int *bsz); // XrdSfsXio -XrdSfsXioHandle Claim(const char *buff, int datasz, int minasz=0);// XrdSfsXio +XrdSfsXioHandle Claim(const char *buff, int datasz, int minasz=0) override;// XrdSfsXio static int Configure(char *parms, XrdProtocol_Config *pi); - void DoIt() {(*this.*Resume)();} + void DoIt() override {(*this.*Resume)();} int do_WriteSpan(); @@ -181,29 +181,29 @@ int getPathID() {return PathID;} - XrdProtocol *Match(XrdLink *lp); + XrdProtocol *Match(XrdLink *lp) override; - int Process(XrdLink *lp); // Sync: Job->Link.DoIt->Process + int Process(XrdLink *lp) override; // Sync: Job->Link.DoIt->Process int Process2(); int ProcSig(); - void Recycle(XrdLink *lp, int consec, const char *reason); + void Recycle(XrdLink *lp, int consec, const char *reason) override; static void Reclaim(XrdSfsXioHandle h); // XrdSfsXio - int SendFile(int fildes); // XrdSfsDio + int SendFile(int fildes) override; // XrdSfsDio - int SendFile(XrdOucSFVec *sfvec, int sfvnum); // XrdSfsDio + int SendFile(XrdOucSFVec *sfvec, int sfvnum) override; // XrdSfsDio - void SetFD(int fildes); // XrdSfsDio + void SetFD(int fildes) override; // XrdSfsDio - int Stats(char *buff, int blen, int do_sync=0); + int Stats(char *buff, int blen, int do_sync=0) override; void StreamNOP(); -XrdSfsXioHandle Swap(const char *buff, XrdSfsXioHandle h=0); // XrdSfsXio +XrdSfsXioHandle Swap(const char *buff, XrdSfsXioHandle h=0) override; // XrdSfsXio XrdXrootdProtocol *VerifyStream(int &rc, int pID, bool lok=true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdTpcMon.cc new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdTpcMon.cc --- old/xrootd-5.5.4/src/XrdXrootd/XrdXrootdTpcMon.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/src/XrdXrootd/XrdXrootdTpcMon.cc 2023-05-07 14:02:46.000000000 +0200 @@ -44,7 +44,7 @@ const char *json_fmt = "{\"TPC\":\"%s\",\"Client\":\"%s\"," "\"Xeq\":{\"Beg\":\"%s\",\"End\":\"%s\",\"RC\":%d,\"Strm\":%u,\"Type\":\"%s\"," "\"IPv\":%c}," -"\"Src\":\"%s\",\"Dst\":\"%s\",\"Size\":%d}"; +"\"Src\":\"%s\",\"Dst\":\"%s\",\"Size\":%zu}"; const char *urlFMT = ""; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/tests/XrdClTests/FileCopyTest.cc new/xrootd-5.5.5/tests/XrdClTests/FileCopyTest.cc --- old/xrootd-5.5.4/tests/XrdClTests/FileCopyTest.cc 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/tests/XrdClTests/FileCopyTest.cc 2023-05-07 14:02:46.000000000 +0200 @@ -397,7 +397,7 @@ CPPUNIT_ASSERT_XRDST_NOTOK( process12.Run(0), XrdCl::errCheckSumError ); XrdCl::StatInfo *info = 0; XrdCl::XRootDStatus status = fs.Stat( targetPath, info ); - CPPUNIT_ASSERT_XRDST( status.status == XrdCl::stError && st.code == XrdCl::errNotFound ); + CPPUNIT_ASSERT_XRDST( status.status == XrdCl::stError && status.code == XrdCl::errNotFound ); properties.Clear(); //-------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xrootd-5.5.4/tests/common/CppUnitXrdHelpers.hh new/xrootd-5.5.5/tests/common/CppUnitXrdHelpers.hh --- old/xrootd-5.5.4/tests/common/CppUnitXrdHelpers.hh 2023-03-24 08:58:01.000000000 +0100 +++ new/xrootd-5.5.5/tests/common/CppUnitXrdHelpers.hh 2023-05-07 14:02:46.000000000 +0200 @@ -25,18 +25,18 @@ #define CPPUNIT_ASSERT_XRDST_NOTOK( x, err ) \ { \ - XrdCl::XRootDStatus st = x; \ + XrdCl::XRootDStatus _st = x; \ std::string msg = "["; msg += #x; msg += "]: "; \ - msg += st.ToStr(); \ - CPPUNIT_ASSERT_MESSAGE( msg, !st.IsOK() && st.code == err ); \ + msg += _st.ToStr(); \ + CPPUNIT_ASSERT_MESSAGE( msg, !_st.IsOK() && _st.code == err ); \ } #define CPPUNIT_ASSERT_XRDST( x ) \ { \ - XrdCl::XRootDStatus st = x; \ + XrdCl::XRootDStatus _st = x; \ std::string msg = "["; msg += #x; msg += "]: "; \ - msg += st.ToStr(); \ - CPPUNIT_ASSERT_MESSAGE( msg, st.IsOK() ); \ + msg += _st.ToStr(); \ + CPPUNIT_ASSERT_MESSAGE( msg, _st.IsOK() ); \ } #define CPPUNIT_ASSERT_ERRNO( x ) \ ++++++ xrootd-modernize-python-builds.patch ++++++ ++++ 1124 lines (skipped)
