Skip to content

Commit

Permalink
librados: revert librados3/libradoscc back to librados2
Browse files Browse the repository at this point in the history
For backwards compatibility and upgrade reasons, the librados2
API needs to be preserved and it needs to continue to be compatible
with dependent libraries like librbd1.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Feb 20, 2019
1 parent 449e92b commit 65c8733
Show file tree
Hide file tree
Showing 42 changed files with 101 additions and 181 deletions.
65 changes: 21 additions & 44 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,7 @@ Group: System/Filesystems
Provides: ceph-test:/usr/bin/ceph-kvstore-tool
Requires: ceph-common = %{_epoch_prefix}%{version}-%{release}
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
%if 0%{with selinux}
Expand Down Expand Up @@ -369,8 +368,7 @@ Summary: Ceph Common
Group: System/Filesystems
%endif
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-rados = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-rbd = %{_epoch_prefix}%{version}-%{release}
Expand Down Expand Up @@ -537,7 +535,7 @@ Summary: Ceph fuse-based client
%if 0%{?suse_version}
Group: System/Filesystems
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
%description -n rbd-fuse
FUSE based client to map Ceph rbd images to files
Expand All @@ -548,7 +546,8 @@ Summary: Ceph daemon for mirroring RBD images
Group: System/Filesystems
%endif
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
%description -n rbd-mirror
Daemon for mirroring RBD images between Ceph clusters, streaming
changes asynchronously.
Expand All @@ -558,7 +557,7 @@ Summary: Ceph RBD client base on NBD
%if 0%{?suse_version}
Group: System/Filesystems
%endif
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: librbd1 = %{_epoch_prefix}%{version}-%{release}
%description -n rbd-nbd
NBD based client to map Ceph rbd images to local device
Expand All @@ -572,8 +571,7 @@ Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
%if 0%{with selinux}
Requires: ceph-selinux = %{_epoch_prefix}%{version}-%{release}
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: librgw2 = %{_epoch_prefix}%{version}-%{release}
%if 0%{?rhel} || 0%{?fedora}
Requires: mailcap
Expand Down Expand Up @@ -612,15 +610,15 @@ ceph-osd is the object storage daemon for the Ceph distributed file
system. It is responsible for storing objects on a local file system
and providing access to them over the network.

%package -n librados3
%package -n librados2
Summary: RADOS distributed object store client library
%if 0%{?suse_version}
Group: System/Libraries
%endif
%if 0%{?rhel} || 0%{?fedora}
Obsoletes: ceph-libs < %{_epoch_prefix}%{version}-%{release}
%endif
%description -n librados3
%description -n librados2
RADOS is a reliable, autonomic distributed object storage cluster
developed as part of the Ceph distributed storage system. This is a
shared library allowing applications to access the distributed object
Expand All @@ -631,31 +629,20 @@ Summary: RADOS headers
%if 0%{?suse_version}
Group: Development/Libraries/C and C++
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Obsoletes: ceph-devel < %{_epoch_prefix}%{version}-%{release}
Provides: librados3-devel = %{_epoch_prefix}%{version}-%{release}
Obsoletes: librados3-devel < %{_epoch_prefix}%{version}-%{release}
Provides: librados2-devel = %{_epoch_prefix}%{version}-%{release}
Obsoletes: librados2-devel < %{_epoch_prefix}%{version}-%{release}
%description -n librados-devel
This package contains C libraries and headers needed to develop programs
that use RADOS object store.

%package -n libradospp1
Summary: RADOS distributed object store client C++ library
%if 0%{?suse_version}
Group: System/Libraries
%endif
%description -n libradospp1
RADOS is a reliable, autonomic distributed object storage cluster
developed as part of the Ceph distributed storage system. This is a
shared library allowing C++ applications to access the distributed object
store using a simple file-like interface.

%package -n libradospp-devel
Summary: RADOS headers
%if 0%{?suse_version}
Group: Development/Libraries/C and C++
%endif
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Requires: librados-devel = %{_epoch_prefix}%{version}-%{release}
%description -n libradospp-devel
This package contains C++ libraries and headers needed to develop programs
Expand All @@ -666,7 +653,7 @@ Summary: RADOS gateway client library
%if 0%{?suse_version}
Group: System/Libraries
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%description -n librgw2
This package provides a library implementation of the RADOS gateway
(distributed object store with S3 and Swift personalities).
Expand Down Expand Up @@ -715,7 +702,7 @@ Summary: Python 2 libraries for the RADOS object store
%if 0%{?suse_version}
Group: Development/Libraries/Python
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
Obsoletes: python-ceph < %{_epoch_prefix}%{version}-%{release}
%description -n python-rados
This package contains Python 2 libraries for interacting with Cephs RADOS
Expand All @@ -728,7 +715,7 @@ Summary: Python 3 libraries for the RADOS object store
Group: Development/Libraries/Python
%endif
Requires: python%{python3_pkgversion}
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%description -n python%{python3_pkgversion}-rados
This package contains Python 3 libraries for interacting with Cephs RADOS
object store.
Expand All @@ -739,8 +726,7 @@ Summary: RADOS striping interface
%if 0%{?suse_version}
Group: System/Libraries
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%description -n libradosstriper1
Striping interface built on top of the rados library, allowing
to stripe bigger objects onto several standard rados objects using
Expand All @@ -767,8 +753,7 @@ Summary: RADOS block device client library
%if 0%{?suse_version}
Group: System/Libraries
%endif
Requires: librados3 = %{_epoch_prefix}%{version}-%{release}
Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release}
Requires: librados2 = %{_epoch_prefix}%{version}-%{release}
%if 0%{?suse_version}
Requires(post): coreutils
%endif
Expand Down Expand Up @@ -1853,17 +1838,17 @@ fi

%endif

%files -n librados3
%files -n librados2
%{_libdir}/librados.so.*
%dir %{_libdir}/ceph
%{_libdir}/ceph/libceph-common.so.*
%if %{with lttng}
%{_libdir}/librados_tp.so.*
%endif

%post -n librados3 -p /sbin/ldconfig
%post -n librados2 -p /sbin/ldconfig

%postun -n librados3 -p /sbin/ldconfig
%postun -n librados2 -p /sbin/ldconfig

%files -n librados-devel
%dir %{_includedir}/rados
Expand All @@ -1876,13 +1861,6 @@ fi
%{_bindir}/librados-config
%{_mandir}/man8/librados-config.8*

%files -n libradospp1
%{_libdir}/libradospp.so.*

%post -n libradospp1 -p /sbin/ldconfig

%postun -n libradospp1 -p /sbin/ldconfig

%files -n libradospp-devel
%dir %{_includedir}/rados
%{_includedir}/rados/buffer.h
Expand All @@ -1892,7 +1870,6 @@ fi
%{_includedir}/rados/librados.hpp
%{_includedir}/rados/page.h
%{_includedir}/rados/rados_types.hpp
%{_libdir}/libradospp.so

%if 0%{with python2}
%files -n python-rados
Expand Down
48 changes: 11 additions & 37 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Depends: binutils,
${shlibs:Depends},
Recommends: btrfs-tools,
ceph-mds (= ${binary:Version}),
librados3 (= ${binary:Version}),
librados2 (= ${binary:Version}),
libradosstriper1 (= ${binary:Version}),
librbd1 (= ${binary:Version}),
ntp | time-daemon,
Expand Down Expand Up @@ -428,7 +428,7 @@ Description: debugging symbols for rbd-fuse
Package: rbd-mirror
Architecture: linux-any
Depends: ceph-common (= ${binary:Version}),
librados3 (= ${binary:Version}),
librados2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Ceph daemon for mirroring RBD images
Expand Down Expand Up @@ -551,7 +551,7 @@ Description: OCF-compliant resource agents for Ceph
Ceph with OCF-compliant cluster resource managers,
such as Pacemaker.

Package: librados3
Package: librados2
Conflicts: librados
Replaces: librados
Architecture: linux-any
Expand All @@ -564,11 +564,11 @@ Description: RADOS distributed object store client library
shared library allowing applications to access the distributed object
store using a simple file-like interface.

Package: librados3-dbg
Package: librados2-dbg
Architecture: linux-any
Section: debug
Priority: extra
Depends: librados3 (= ${binary:Version}),
Depends: librados2 (= ${binary:Version}),
${misc:Depends},
Description: debugging symbols for librados
RADOS is a reliable, autonomic distributed object storage cluster
Expand All @@ -581,7 +581,7 @@ Description: debugging symbols for librados
Package: librados-dev
Architecture: linux-any
Section: libdevel
Depends: librados3 (= ${binary:Version}),
Depends: librados2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Conflicts: librados1-dev,
Expand All @@ -597,36 +597,10 @@ Description: RADOS distributed object store client library (development files)
This package contains development files needed for building applications that
link against librados.

Package: libradospp1
Architecture: linux-any
Section: libs
Depends: ${misc:Depends},
${shlibs:Depends},
Description: RADOS distributed object store client C++ library
RADOS is a reliable, autonomic distributed object storage cluster
developed as part of the Ceph distributed storage system. This is a
shared library allowing C++ applications to access the distributed object
store using a simple file-like C++ interface.

Package: libradospp1-dbg
Architecture: linux-any
Section: debug
Priority: extra
Depends: libradospp1 (= ${binary:Version}),
${misc:Depends},
Description: debugging symbols for libradospp1
RADOS is a reliable, autonomic distributed object storage cluster
developed as part of the Ceph distributed storage system. This is a
shared library allowing applications to access the distributed object
store using a simple file-like interface in C++.
.
This package contains debugging symbols for libradospp.

Package: libradospp-dev
Architecture: linux-any
Section: libdevel
Depends: librados-dev (= ${binary:Version}),
libradospp1 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADOS distributed object store client C++ library (development files)
Expand All @@ -641,7 +615,7 @@ Description: RADOS distributed object store client C++ library (development file
Package: libradosstriper1
Architecture: linux-any
Section: libs
Depends: librados3 (= ${binary:Version}),
Depends: librados2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADOS striping interface
Expand Down Expand Up @@ -678,7 +652,7 @@ Description: RADOS striping interface (development files)
Package: librbd1
Architecture: linux-any
Section: libs
Depends: librados3 (= ${binary:Version}),
Depends: librados2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADOS block device client library
Expand Down Expand Up @@ -777,7 +751,7 @@ Description: Ceph distributed file system client library (development files)
Package: librgw2
Architecture: linux-any
Section: libs
Depends: librados3 (= ${binary:Version}),
Depends: librados2 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADOS Gateway client library
Expand Down Expand Up @@ -890,7 +864,7 @@ Description: Meta-package for python libraries for the Ceph libraries
Package: python-rados
Architecture: linux-any
Section: python
Depends: librados2 | librados3
Depends: librados2 | librados2
${misc:Depends},
${python:Depends},
${shlibs:Depends},
Expand Down Expand Up @@ -924,7 +898,7 @@ Description: Python 2 libraries for the Ceph librados library
Package: python3-rados
Architecture: linux-any
Section: python
Depends: librados2 | librados3,
Depends: librados2 | librados2,
${misc:Depends},
${python3:Depends},
${shlibs:Depends},
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion debian/libradospp-dev.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ usr/include/rados/inline_memory.h
usr/include/rados/librados.hpp
usr/include/rados/page.h
usr/include/rados/rados_types.hpp
usr/lib/libradospp.so
1 change: 0 additions & 1 deletion debian/libradospp1.install

This file was deleted.

2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ override_dh_strip:
dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg
dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg
dh_strip -pceph-common --dbg-package=ceph-common-dbg
dh_strip -plibrados3 --dbg-package=librados3-dbg
dh_strip -plibrados2 --dbg-package=librados2-dbg
dh_strip -plibradosstriper1 --dbg-package=libradosstriper1-dbg
dh_strip -plibrbd1 --dbg-package=librbd1-dbg
dh_strip -plibcephfs2 --dbg-package=libcephfs2-dbg
Expand Down
4 changes: 2 additions & 2 deletions doc/install/upgrading-ceph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ Upgrading a Client

Once you have upgraded the packages and restarted daemons on your Ceph
cluster, we recommend upgrading ``ceph-common`` and client libraries
(``librbd1`` , ``librados3`` and ``libradospp1``) on your client nodes too.
(``librbd1`` and ``librados2``) on your client nodes too.

#. Upgrade the package::

ssh {client-host}
apt-get update && sudo apt-get install ceph-common librados3 libradospp1 librbd1 python-rados python-rbd
apt-get update && sudo apt-get install ceph-common librados2 librbd1 python-rados python-rbd

#. Ensure that you have the latest version::

Expand Down
4 changes: 2 additions & 2 deletions doc/man/8/ceph-deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ uninstall

Remove Ceph packages from remote hosts. It detects the platform and distro of
selected host and uninstalls Ceph packages from it. However, some dependencies
like ``librbd1`` and ``librados3`` will not be removed because they can cause
like ``librbd1`` and ``librados2`` will not be removed because they can cause
issues with ``qemu-kvm``.

Usage::
Expand All @@ -345,7 +345,7 @@ purge

Remove Ceph packages from remote hosts and purge all data. It detects the
platform and distro of selected host, uninstalls Ceph packages and purges all
data. However, some dependencies like ``librbd1`` and ``librados3`` will not be
data. However, some dependencies like ``librbd1`` and ``librados2`` will not be
removed because they can cause issues with ``qemu-kvm``.

Usage::
Expand Down
2 changes: 1 addition & 1 deletion examples/librados/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

CXX?=g++
CXX_FLAGS?=-std=c++11 -Wno-unused-parameter -Wall -Wextra -Werror -g
CXX_LIBS?=-lradospp -lradosstriper
CXX_LIBS?=-lrados -lradosstriper
CXX_INC?=$(LOCAL_LIBRADOS_INC)
CXX_CC=$(CXX) $(CXX_FLAGS) $(CXX_INC) $(LOCAL_LIBRADOS)

Expand Down
Loading

0 comments on commit 65c8733

Please sign in to comment.