[packages/ceph] - updated to 0.56 - updated logrotate,link patches - build java cephfs binding

qboosh qboosh at pld-linux.org
Sun Jan 6 19:18:34 CET 2013


commit 4f42482bfc56cd65b930d89aab1d7c6b62f4b99e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jan 6 19:18:37 2013 +0100

    - updated to 0.56
    - updated logrotate,link patches
    - build java cephfs binding

 ceph-link.patch      | 16 ++++++++--------
 ceph.logrotate.patch | 10 +++++-----
 ceph.spec            | 53 +++++++++++++++++++++++++++++++++++++++++++---------
 3 files changed, 57 insertions(+), 22 deletions(-)
---
diff --git a/ceph.spec b/ceph.spec
index be7bd0f..8d1696d 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -1,16 +1,17 @@
 #
 # Conditional build:
 %bcond_with	hadoop	# Hadoop client (requires JNI)
+%bcond_without	java	# Java binding
 #
 Summary:	User space components of the Ceph file system
 Summary(pl.UTF-8):	Działające w przestrzeni użytkownika elementy systemu plików Ceph
 Name:		ceph
-Version:	0.55.1
+Version:	0.56
 Release:	1
 License:	LGPL v2.1 (libraries), GPL v2 (some programs)
 Group:		Base
 Source0:	http://ceph.newdream.net/download/%{name}-%{version}.tar.bz2
-# Source0-md5:	8276e98f2cffe6deabe729716fe930f6
+# Source0-md5:	4ff88372cf85a04ce40585724b192b53
 Patch0:		%{name}-init-fix.patch
 Patch1:		%{name}.logrotate.patch
 Patch2:		%{name}-link.patch
@@ -23,7 +24,9 @@ BuildRequires:	curl-devel
 BuildRequires:	expat-devel >= 1.95
 BuildRequires:	fcgi-devel
 BuildRequires:	gdbm-devel
-%{?with_hadoop:BuildRequires:	jdk}
+%if %{with java} || %{with hadoop}
+BuildRequires:	jdk
+%endif
 BuildRequires:	keyutils-devel
 BuildRequires:	leveldb-devel
 BuildRequires:	libaio-devel
@@ -113,6 +116,18 @@ Ceph Python bindings.
 %description -n python-ceph -l pl.UTF-8
 Wiązania Pythona do bibliotek Cepha.
 
+%package -n java-cephfs
+Summary:	CephFS Java bindings
+Summary(pl.UTF-8):	Wiązania Javy do biblioteki CephFS
+Group:		Libraries/Java
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description -n java-cephfs
+CephFS Java bindings.
+
+%description -n java-cephfs -l pl.UTF-8
+Wiązania Javy do biblioteki CephFS.
+
 %package fuse
 Summary:	Ceph FUSE-based client
 Summary(pl.UTF-8):	Klient Cepha oparty na FUSE
@@ -188,6 +203,7 @@ Klient Hadoopa dla systemu plików Ceph.
 	--with-radosgw \
 	--with-system-leveldb \
 	--with-system-libs3 \
+	%{?with_java:--enable-cephfs-java --with-jdk-dir=%{_jvmdir}/java} \
 	--disable-silent-rules
 
 %{__make}
@@ -196,8 +212,10 @@ Klient Hadoopa dla systemu plików Ceph.
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/tmp,log/ceph/stat} \
 	$RPM_BUILD_ROOT%{_sysconfdir}/{ceph,bash_completion.d,logrotate.d,rc.d/init.d}
+
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	javadir=%{_javadir}
 
 install -p src/init-ceph $RPM_BUILD_ROOT/etc/rc.d/init.d/ceph
 install -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
@@ -207,6 +225,10 @@ install -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
 %if %{with hadoop}
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhadoopcephfs.{la,a}
 %endif
+%if %{with java}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcephfs_jni.{la,a}
+%endif
+
 # packaged as %doc
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/ceph/sample.{ceph.conf,fetch_config}
 
@@ -228,6 +250,9 @@ fi
 %post	libs -p /sbin/ldconfig
 %postun	libs -p /sbin/ldconfig
 
+%post	-n java-cephfs -p /sbin/ldconfig
+%postun	-n java-cephfs -p /sbin/ldconfig
+
 %post	-n hadoop-cephfs -p /sbin/ldconfig
 %postun	-n hadoop-cephfs -p /sbin/ldconfig
 
@@ -257,17 +282,18 @@ fi
 %attr(755,root,root) %{_bindir}/rbd
 %attr(755,root,root) %{_bindir}/ceph-debugpack
 %attr(755,root,root) %{_bindir}/ceph-coverage
+%attr(755,root,root) /sbin/ceph-create-keys
+%attr(755,root,root) /sbin/ceph-disk-activate
+%attr(755,root,root) /sbin/ceph-disk-prepare
+%attr(755,root,root) /sbin/mkcephfs
+%attr(755,root,root) /sbin/mount.ceph
+%attr(755,root,root) /sbin/mount.fuse.ceph
 %dir %{_libdir}/rados-classes
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_kvs.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_lock.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_rbd.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_refcount.so*
 %attr(755,root,root) %{_libdir}/rados-classes/libcls_rgw.so*
-%attr(755,root,root) /sbin/ceph-create-keys
-%attr(755,root,root) /sbin/ceph-disk-activate
-%attr(755,root,root) /sbin/ceph-disk-prepare
-%attr(755,root,root) /sbin/mkcephfs
-%attr(755,root,root) /sbin/mount.ceph
 %dir %{_libdir}/ceph
 %attr(755,root,root) %{_libdir}/ceph/ceph_common.sh
 %config(noreplace) /etc/logrotate.d/ceph
@@ -334,6 +360,15 @@ fi
 %{py_sitescriptdir}/rados.py[co]
 %{py_sitescriptdir}/rbd.py[co]
 
+%if %{with java}
+%files -n java-cephfs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcephfs_jni.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcephfs_jni.so.1
+%attr(755,root,root) %{_libdir}/libcephfs_jni.so
+%{_javadir}/libcephfs.jar
+%endif
+
 %files fuse
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/ceph-fuse
diff --git a/ceph-link.patch b/ceph-link.patch
index 203346e..3c508f1 100644
--- a/ceph-link.patch
+++ b/ceph-link.patch
@@ -1,6 +1,6 @@
---- ceph-0.55.1/src/Makefile.am.orig	2012-12-13 01:22:18.000000000 +0100
-+++ ceph-0.55.1/src/Makefile.am	2012-12-15 15:24:44.676015542 +0100
-@@ -54,7 +54,7 @@
+--- ceph-0.56/src/Makefile.am.orig	2013-01-01 01:52:55.000000000 +0100
++++ ceph-0.56/src/Makefile.am	2013-01-06 14:47:20.347970073 +0100
+@@ -55,7 +55,7 @@
  EXTRALIBS += -lprofiler
  endif
  
@@ -9,7 +9,7 @@
  
  LIBOS_LDA = libos.a
  
-@@ -139,7 +139,7 @@
+@@ -138,7 +138,7 @@
  bin_PROGRAMS += cephfs
  
  librados_config_SOURCES = librados-config.cc
@@ -18,19 +18,19 @@
  bin_PROGRAMS += librados-config
  
  # synthetic client
-@@ -295,7 +295,7 @@
+@@ -296,7 +296,7 @@
  libcephfs_la_CFLAGS= ${CRYPTO_CFLAGS} ${AM_CFLAGS}
- libcephfs_la_CXXFLAGS= ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
+ libcephfs_la_CXXFLAGS= ${AM_CXXFLAGS}
  libcephfs_la_LIBADD = libclient.la
 -libcephfs_la_LDFLAGS =  $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) \
 +libcephfs_la_LDFLAGS =  $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) -lboost_system \
              ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '^ceph_.*'
  lib_LTLIBRARIES += libcephfs.la
  
-@@ -317,7 +317,7 @@
+@@ -318,7 +318,7 @@
  librados_la_SOURCES = ${librados_SOURCES}
  librados_la_CFLAGS = ${CRYPTO_CFLAGS} ${AM_CFLAGS}
- librados_la_CXXFLAGS = ${CRYPTO_CXXFLAGS} ${AM_CXXFLAGS}
+ librados_la_CXXFLAGS = ${AM_CXXFLAGS}
 -librados_la_LIBADD = libcommon.la $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
 +librados_la_LIBADD = libcommon.la $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) -lboost_system
  librados_la_LDFLAGS = ${AM_LDFLAGS} -version-info 2:0:0 -export-symbols-regex '^rados_.*'
diff --git a/ceph.logrotate.patch b/ceph.logrotate.patch
index fd84975..e869408 100644
--- a/ceph.logrotate.patch
+++ b/ceph.logrotate.patch
@@ -1,16 +1,16 @@
---- ceph-0.55.1/src/logrotate.conf.orig	2012-12-15 15:11:13.516032449 +0100
-+++ ceph-0.55.1/src/logrotate.conf	2012-12-15 15:16:52.636025383 +0100
+--- ceph-0.56/src/logrotate.conf.orig	2013-01-06 13:46:50.321379068 +0100
++++ ceph-0.56/src/logrotate.conf	2013-01-06 14:46:15.021304770 +0100
 @@ -4,23 +4,7 @@
      compress
      sharedscripts
      postrotate
--        if which invoke-rc.d && [ -x `which invoke-rc.d` ]; then
+-        if which invoke-rc.d > /dev/null && [ -x `which invoke-rc.d` ]; then
 -            invoke-rc.d ceph reload >/dev/null
--        elif which service && [ -x `which service` ]; then
+-        elif which service > /dev/null && [ -x `which service` ]; then
 -            service ceph reload >/dev/null
 -        fi
 -        # Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
--        if which initctl && [ -x `which initctl` ]; then
+-        if which initctl > /dev/null && [ -x `which initctl` ]; then
 -            # upstart reload isn't very helpful here:
 -            #   https://bugs.launchpad.net/upstart/+bug/1012938
 -            for type in mon osd mds; do
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ceph.git/commitdiff/4f42482bfc56cd65b930d89aab1d7c6b62f4b99e



More information about the pld-cvs-commit mailing list