From 34a4ed202a9a4b95baf75187237f3f6e5cb45fd7 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Aug 05 2017 18:17:21 +0000 Subject: Adapt to ceph version 12 --- diff --git a/xrootd-ceph12.patch b/xrootd-ceph12.patch new file mode 100644 index 0000000..60dce91 --- /dev/null +++ b/xrootd-ceph12.patch @@ -0,0 +1,45 @@ +diff --git a/src/XrdCeph/XrdCephPosix.cc b/src/XrdCeph/XrdCephPosix.cc +index d3c5d7ba..8a4261a7 100644 +--- a/src/XrdCeph/XrdCephPosix.cc ++++ b/src/XrdCeph/XrdCephPosix.cc +@@ -69,7 +69,7 @@ struct CephFileRef : CephFile { + + /// small struct for directory listing + struct DirIterator { +- librados::ObjectIterator m_iterator; ++ librados::NObjectIterator m_iterator; + librados::IoCtx *m_ioctx; + }; + +@@ -1169,24 +1169,24 @@ DIR* ceph_posix_opendir(XrdOucEnv* env, const char *pathname) { + return 0; + } + DirIterator* res = new DirIterator(); +- res->m_iterator = ioctx->objects_begin(); ++ res->m_iterator = ioctx->nobjects_begin(); + res->m_ioctx = ioctx; + return (DIR*)res; + } + + int ceph_posix_readdir(DIR *dirp, char *buff, int blen) { +- librados::ObjectIterator &iterator = ((DirIterator*)dirp)->m_iterator; ++ librados::NObjectIterator &iterator = ((DirIterator*)dirp)->m_iterator; + librados::IoCtx *ioctx = ((DirIterator*)dirp)->m_ioctx; +- while (iterator->first.compare(iterator->first.size()-17, 17, ".0000000000000000") && +- iterator != ioctx->objects_end()) { ++ while (iterator->get_oid().compare(iterator->get_oid().size()-17, 17, ".0000000000000000") && ++ iterator != ioctx->nobjects_end()) { + iterator++; + } +- if (iterator == ioctx->objects_end()) { ++ if (iterator == ioctx->nobjects_end()) { + buff[0] = 0; + } else { +- int l = iterator->first.size()-17; ++ int l = iterator->get_oid().size()-17; + if (l < blen) blen = l; +- strncpy(buff, iterator->first.c_str(), blen-1); ++ strncpy(buff, iterator->get_oid().c_str(), blen-1); + buff[blen-1] = 0; + iterator++; + } diff --git a/xrootd.spec b/xrootd.spec index 812b4a6..8af77fd 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -13,14 +13,15 @@ Name: xrootd Epoch: 1 Version: 4.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Extended ROOT file server -Group: System Environment/Daemons License: LGPLv3+ URL: http://xrootd.org/ Source0: http://xrootd.org/download/v%{version}/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Adapt to ceph version 12 +# https://github.com/xrootd/xrootd/pull/553 +Patch0: %{name}-ceph12.patch BuildRequires: cmake BuildRequires: krb5-devel @@ -68,7 +69,6 @@ latency and increased throughput. %package server Summary: Xrootd server daemons -Group: System Environment/Daemons Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -94,7 +94,6 @@ xrootd-selinux package. %package selinux Summary: SELinux policy module for the xrootd server -Group: System Environment/Daemons BuildArch: noarch Requires: selinux-policy Requires(post): policycoreutils @@ -105,7 +104,6 @@ This package contains SELinux policy module for the xrootd server package. %package libs Summary: Libraries used by xrootd servers and clients -Group: System Environment/Libraries # Java admin client no longer supported Obsoletes: %{name}-client-admin-java < 1:3.3.0 # Perl admin client no longer supported @@ -116,7 +114,6 @@ This package contains libraries used by the xrootd servers and clients. %package devel Summary: Development files for xrootd -Group: Development/Libraries Provides: %{name}-libs-devel = %{epoch}:%{version}-%{release} Provides: %{name}-libs-devel%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: %{name}-libs-devel < %{epoch}:%{version}-%{release} @@ -128,7 +125,6 @@ development. %package client-libs Summary: Libraries used by xrootd clients -Group: System Environment/Libraries Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} %if %{use_libc_semaphore} Requires: glibc >= 2.21 @@ -139,7 +135,6 @@ This package contains libraries used by xrootd clients. %package client-devel Summary: Development files for xrootd clients -Group: Development/Libraries Provides: %{name}-cl-devel = %{epoch}:%{version}-%{release} Provides: %{name}-cl-devel%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: %{name}-cl-devel < %{epoch}:%{version}-%{release} @@ -152,7 +147,6 @@ client development. %package server-libs Summary: Libraries used by xrootd servers -Group: System Environment/Libraries Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -161,7 +155,6 @@ This package contains libraries used by xrootd servers. %package server-devel Summary: Development files for xrootd servers -Group: Development/Libraries Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-devel%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-server-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -172,7 +165,6 @@ server development. %package private-devel Summary: Legacy xrootd headers -Group: Development/Libraries Requires: %{name}-libs = %{epoch}:%{version}-%{release} BuildArch: noarch @@ -183,7 +175,6 @@ versions is not guaranteed for these headers. %package client Summary: Xrootd command line client tools -Group: Applications/Internet Provides: %{name}-cl = %{epoch}:%{version}-%{release} Provides: %{name}-cl%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: %{name}-cl < %{epoch}:%{version}-%{release} @@ -196,7 +187,6 @@ xrootd servers. %package fuse Summary: Xrootd FUSE tool -Group: Applications/Internet Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: fuse @@ -208,7 +198,6 @@ tool. %if %{?fedora}%{!?fedora:0} >= 24 %package ceph Summary: Ceph back-end plug-in for xrootd -Group: Development/Tools Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} %description ceph @@ -217,7 +206,6 @@ This package contains a ceph back-end plug-in for xrootd. %package python Summary: Python bindings for xrootd -Group: Development/Libraries Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -226,7 +214,6 @@ This package contains Python bindings for xrootd. %package doc Summary: Developer documentation for the xrootd libraries -Group: Documentation BuildArch: noarch %description doc @@ -234,6 +221,7 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q +%patch0 -p1 %build mkdir build @@ -610,6 +598,9 @@ fi %doc %{_pkgdocdir} %changelog +* Sat Aug 05 2017 Mattias Ellert - 1:4.6.1-5 +- Adapt to ceph version 12 + * Thu Aug 03 2017 Fedora Release Engineering - 1:4.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild