diff mbox

[GIT,PULL,v5] java: add libcephfs Java bindings

Message ID 5075EFF3.9000106@cs.ucsc.edu (mailing list archive)
State New, archived
Headers show

Commit Message

Noah Watkins Oct. 10, 2012, 10 p.m. UTC
Laszlo, James:

Changes based on your previous feedback are ready for review. I pushed the changes here:

  git://github.com/noahdesu/ceph.git wip-java-cephfs

Thanks!
- Noah

From 0d8c4dc39f9b8f2e264bb2503c053418ad72b705 Mon Sep 17 00:00:00 2001
From: Noah Watkins <noahwatkins@gmail.com>
Date: Wed, 10 Oct 2012 13:57:03 -0700
Subject: [PATCH] java: update deb bits from ceph-devel feedback

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
---
 debian/.gitignore            |    3 ++-
 debian/control               |   10 ++++++++--
 debian/libceph-java.jlibs    |    1 +
 debian/libceph-jni.install   |    1 +
 debian/libceph1-java.install |    2 --
 debian/rules                 |    1 +
 src/java/.gitignore          |    2 +-
 src/java/Makefile.am         |    8 ++++----
 src/java/README              |    2 +-
 src/java/build.xml           |    6 +++---
 10 files changed, 22 insertions(+), 14 deletions(-)
 create mode 100644 debian/libceph-java.jlibs
 create mode 100644 debian/libceph-jni.install
 delete mode 100644 debian/libceph1-java.install

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Laszlo Boszormenyi Oct. 11, 2012, 12:53 a.m. UTC | #1
Hi Noah,

On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
> Laszlo, James:
> 
> Changes based on your previous feedback are ready for review. I pushed the changes here:
> 
>   git://github.com/noahdesu/ceph.git wip-java-cephfs
 Checking only the diff, as it's 3 am here. It looks quite OK. But will
check it further in the afternoon.

Laszlo/GCS

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins Oct. 11, 2012, 1:36 a.m. UTC | #2
On Wed, Oct 10, 2012 at 5:53 PM, Laszlo Boszormenyi (GCS) <gcs@debian.hu> wrote:
> Hi Noah,
>
> On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
>> Laszlo, James:
>>
>> Changes based on your previous feedback are ready for review. I pushed the changes here:
>>
>>   git://github.com/noahdesu/ceph.git wip-java-cephfs
>  Checking only the diff, as it's 3 am here. It looks quite OK. But will
> check it further in the afternoon.

Ok, great. The one thing I was most curious about is if the ceph.jar
reference in debian/libceph-java.jlibs is correct. Previously I was
able to reference its installation path within debian/tmp
(usr/lib/ceph.jar), but jh_installlibs was only able to find the jar
when I referenced its build location (src/java/ceph.jar).

Thanks!

>
> Laszlo/GCS
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sage Weil Oct. 17, 2012, 10:45 p.m. UTC | #3
On Wed, 10 Oct 2012, Noah Watkins wrote:
> On Wed, Oct 10, 2012 at 5:53 PM, Laszlo Boszormenyi (GCS) <gcs@debian.hu> wrote:
> > Hi Noah,
> >
> > On Wed, 2012-10-10 at 15:00 -0700, Noah Watkins wrote:
> >> Laszlo, James:
> >>
> >> Changes based on your previous feedback are ready for review. I pushed the changes here:
> >>
> >>   git://github.com/noahdesu/ceph.git wip-java-cephfs
> >  Checking only the diff, as it's 3 am here. It looks quite OK. But will
> > check it further in the afternoon.
> 
> Ok, great. The one thing I was most curious about is if the ceph.jar
> reference in debian/libceph-java.jlibs is correct. Previously I was
> able to reference its installation path within debian/tmp
> (usr/lib/ceph.jar), but jh_installlibs was only able to find the jar
> when I referenced its build location (src/java/ceph.jar).

Laszlo, any comment there?

Also, I have one question: this packages up libcephfs bindings in 
libceph-java.  Should that be libcephfs-java, or should be put *all* ceph 
lib bindings in here (libcephfs, librados, librbd)?

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Noah Watkins Oct. 19, 2012, 5:27 p.m. UTC | #4
On Wed, Oct 17, 2012 at 3:45 PM, Sage Weil <sage@inktank.com> wrote:
>
> Also, I have one question: this packages up libcephfs bindings in
> libceph-java.  Should that be libcephfs-java, or should be put *all* ceph
> lib bindings in here (libcephfs, librados, librbd)?

Pushed changes that build packages:

  libcephfs-java and libcephfs-jni

to git://github.com/noahdesu/ceph.git wip-java-cephfs

  rebased to master.

- Noah
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/debian/.gitignore b/debian/.gitignore
index c5b73ce..2fd5a05 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -30,5 +30,6 @@ 
 /rest-bench-dbg
 /rest-bench
 /python-ceph
-/libceph1-java
+/libceph-java
+/libceph-jni
 /tmp
diff --git a/debian/control b/debian/control
index 579855f..62c85d9 100644
--- a/debian/control
+++ b/debian/control
@@ -319,8 +319,14 @@  Description: Python libraries for the Ceph distributed filesystem
  This package contains Python libraries for interacting with Ceph's
  RADOS object storage, and RBD (RADOS block device).
 
-Package: libceph1-java
+Package: libceph-java
 Section: java
+Architecture: all
+Depends: libceph-jni, ${java:Depends}, ${misc:Depends}
+Description: Java libraries for the Ceph File System.
+
+Package: libceph-jni
 Architecture: linux-any
+Section: libs
 Depends: libcephfs1, ${shlibs:Depends}, ${java:Depends}, ${misc:Depends}
-Description: Java libraries for the Ceph File System
+Description: Java Native Interface library for CephFS Java bindings.
diff --git a/debian/libceph-java.jlibs b/debian/libceph-java.jlibs
new file mode 100644
index 0000000..952a190
--- /dev/null
+++ b/debian/libceph-java.jlibs
@@ -0,0 +1 @@ 
+src/java/ceph.jar
diff --git a/debian/libceph-jni.install b/debian/libceph-jni.install
new file mode 100644
index 0000000..072b990
--- /dev/null
+++ b/debian/libceph-jni.install
@@ -0,0 +1 @@ 
+usr/lib/libcephfs_jni.so* usr/lib/jni
diff --git a/debian/libceph1-java.install b/debian/libceph1-java.install
deleted file mode 100644
index 98133e4..0000000
--- a/debian/libceph1-java.install
+++ /dev/null
@@ -1,2 +0,0 @@ 
-usr/lib/libcephfs_jni.so* usr/lib/jni
-usr/lib/libcephfs.jar usr/share/java
diff --git a/debian/rules b/debian/rules
index b848ddc..6d61385 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,6 +93,7 @@  install: build
 # Add here commands to install the package into debian/testpack.
 # Build architecture-independent files here.
 binary-indep: build install
+	jh_installlibs -v -i
 
 # We have nothing to do by default.
 # Build architecture-dependent files here.
diff --git a/src/java/.gitignore b/src/java/.gitignore
index 8208e2b..b8eb0e9 100644
--- a/src/java/.gitignore
+++ b/src/java/.gitignore
@@ -1,4 +1,4 @@ 
 *.class
-libcephfs.jar
+ceph.jar
 native/com_ceph_fs_CephMount.h
 TEST-*.txt
diff --git a/src/java/Makefile.am b/src/java/Makefile.am
index 5c54f36..87d763d 100644
--- a/src/java/Makefile.am
+++ b/src/java/Makefile.am
@@ -24,20 +24,20 @@  CEPH_PROXY=java/com/ceph/fs/CephMount.class
 
 $(CEPH_PROXY): $(JAVA_SRC)
 	export CLASSPATH=java/ ;
-	$(JAVAC) java/com/ceph/fs/*.java
+	$(JAVAC) -source 1.5 -target 1.5 java/com/ceph/fs/*.java
 
 $(JAVA_H): $(CEPH_PROXY)
 	export CLASSPATH=java/ ; \
 	$(JAVAH) -jni -o $@ com.ceph.fs.CephMount
 
-libcephfs.jar: $(CEPH_PROXY)
+ceph.jar: $(CEPH_PROXY)
 	$(JAR) cf $@ $(JAVA_CLASSES:%=-C java %) # $(ESCAPED_JAVA_CLASSES:%=-C java %)
 
 javadir = $(libdir)
-java_DATA = libcephfs.jar
+java_DATA = ceph.jar
 
 BUILT_SOURCES = $(JAVA_H)
 
-CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar
+CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) ceph.jar
 
 endif
diff --git a/src/java/README b/src/java/README
index ca39a44..d58ab8a 100644
--- a/src/java/README
+++ b/src/java/README
@@ -33,7 +33,7 @@  Ant is used to run the unit test (apt-get install ant). For example:
 
 1. The tests depend on the compiled wrappers. If the wrappers are installed as
 part of a package (e.g. Debian package) then this should 'just work'. Ant will
-also look in the current directory for 'libcephfs.jar' and in ../.libs for the
+also look in the current directory for 'ceph.jar' and in ../.libs for the
 JNI library.  If all else fails, set the environment variables CEPHFS_JAR, and
 CEPHFS_JNI_LIB accordingly.
 
diff --git a/src/java/build.xml b/src/java/build.xml
index f846ca4..203ffc0 100644
--- a/src/java/build.xml
+++ b/src/java/build.xml
@@ -31,10 +31,10 @@ 
 
 	<target name="compile-tests" depends="makedir">
         <javac srcdir="${test.src.dir}" destdir="${test.build.dir}"
-            includeantruntime="false">
+            includeantruntime="false" source="1.5" target="1.5">
             <classpath>
 				<pathelement location="${env.CEPHFS_JAR}"/>
-				<pathelement location="libcephfs.jar"/>
+				<pathelement location="ceph.jar"/>
                 <fileset dir="${lib.dir}">
                     <include name="**/*.jar"/>
                 </fileset>
@@ -51,7 +51,7 @@ 
                     <include name="**/*.jar"/>
                 </fileset>
 				<pathelement location="${env.CEPHFS_JAR}"/>
-				<pathelement location="libcephfs.jar"/>
+				<pathelement location="ceph.jar"/>
                 <pathelement path="${test.build.dir}"/>
                 <pathelement path="${test.src.dir}"/>
             </classpath>