Skip to contentSkip to conversation

fix build and packaging issues

PATCH In review Danny Al-Gaaf 3 participants 9 messages Jan 4, 2013

lore
Share & tools
lore
#0 lore raw

cover fix build and packaging issues

This set of patches contains fixes for some build and packaging issues.

Danny Al-Gaaf (6):
src/java/Makefile.am: fix default java dir ceph.spec.in: fix handling of java files ceph.spec.in: rename libcephfs-java package to cephfs-java ceph.spec.in: fix libcephfs-jni package name configure.ac: remove AC_PROG_RANLIB configure.ac: change junit4 handling

 ceph.spec.in         | 21 +++++++++------------
 configure.ac         |  8 +++++---
 src/java/Makefile.am |  6 +++---
 3 files changed, 17 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.0.2
#1 lore raw

PATCH 1/6 src/java/Makefile.am: fix default java dir

Fix default javadir in src/java/Makefile.am to $(datadir)/java since this is the common data dir for java files.

---
 src/java/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/java/Makefile.am +1 -1
index 55ff6c1..1f87885 100644
@@ -43,7 +43,7 @@ $(JAVA_H): $(CEPH_PROXY)
 libcephfs.jar: $(CEPH_PROXY)
 	$(JAR) cf $@ $(JAVA_CLASSES:%=-C java %) 
 
-javadir = $(libdir)
+javadir = $(datadir)/java
 java_DATA = libcephfs.jar
 
 CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar 
Signature · 1 line
1.8.0.2
#2 lore raw

PATCH 2/6 ceph.spec.in: fix handling of java files

In reply to Danny Al-Gaaf

Fix handling of JAVA (jar) files. Don't move the files around in the install section since the related Makefile is fixed instead.

Use %{_javadir} instead of /usr/share/java/

---
 ceph.spec.in | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
ceph.spec.in +2 -5
index 7aae6fe..cd93573 100644
@@ -281,9 +281,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph/
 #  Relocate java packages to expected locations in buildroot.
 mkdir -p $RPM_BUILD_ROOT/usr/lib/jni
 mv $RPM_BUILD_ROOT/usr/lib64/libcephfs_jni.so* $RPM_BUILD_ROOT/usr/lib/jni/.
-mkdir -p $RPM_BUILD_ROOT/usr/share/java
-mv $RPM_BUILD_ROOT/usr/lib64/libcephfs.jar  $RPM_BUILD_ROOT/usr/share/java/.
-mv $RPM_BUILD_ROOT/usr/lib64/libcephfs-test.jar $RPM_BUILD_ROOT/usr/share/java/.
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -561,7 +558,7 @@ fi
 
 %files -n libcephfs-java
 %defattr(-,root,root,-)
-/usr/share/java/libcephfs.jar
-/usr/share/java/libcephfs-test.jar
+%{_javadir}/libcephfs.jar
+%{_javadir}/libcephfs-test.jar
 
 %changelog
Signature · 1 line
1.8.0.2
#3 lore raw

PATCH 3/6 ceph.spec.in: rename libcephfs-java package to cephfs-java

In reply to Danny Al-Gaaf

Rename the libcephfs-java package to cephfs-java since the package contains no (classic) library and RPMLINT complains about the name.

---
 ceph.spec.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
ceph.spec.in +3 -3
index cd93573..bfd030b 100644
@@ -200,14 +200,14 @@ BuildRequires:  java-devel
 This package contains the Java Native Interface library for CephFS Java
 bindings.
 
-%package -n libcephfs-java
+%package -n cephfs-java
 Summary:	Java libraries for the Ceph File System.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
 Requires:	libcephfs-jni = %{version}-%{release}-
 BuildRequires:  java-devel
-%description -n libcephfs-java
+%description -n cephfs-java
 This package contains the Java libraries for the Ceph File System.
 
 %if (0%{?centos} || 0%{?opensuse} || 0%{?suse_version})
@@ -556,7 +556,7 @@ fi
 %defattr(-,root,root,-)
 /usr/lib/jni/libcephfs_jni.so*
 
-%files -n libcephfs-java
+%files -n cephfs-java
 %defattr(-,root,root,-)
 %{_javadir}/libcephfs.jar
 %{_javadir}/libcephfs-test.jar
Signature · 1 line
1.8.0.2
#4 lore raw

PATCH 4/6 ceph.spec.in: fix libcephfs-jni package name

In reply to Danny Al-Gaaf

Rename libcephfs-jni to libcephfs_jni1 to reflect the SO name/version of the library and to prevent RPMLINT to complain about the naming.

---
 ceph.spec.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
ceph.spec.in +4 -4
index bfd030b..8eb4be8 100644
@@ -189,14 +189,14 @@ Requires:	libcephfs1 = %{version}-%{release}
 %description -n ceph-test
 This package contains Ceph benchmarks and test tools.
 
-%package -n libcephfs-jni
+%package -n libcephfs_jni1
 Summary:	Java Native Interface library for CephFS Java bindings.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
 Requires:	libcephfs1 = %{version}-%{release}
 BuildRequires:  java-devel
-%description -n libcephfs-jni
+%description -n libcephfs_jni1
 This package contains the Java Native Interface library for CephFS Java
 bindings.
 
@@ -205,7 +205,7 @@ Summary:	Java libraries for the Ceph File System.
 Group:		System Environment/Libraries
 License:	LGPL-2.0
 Requires:	java
-Requires:	libcephfs-jni = %{version}-%{release}-
+Requires:	libcephfs_jni1 = %{version}-%{release}
 BuildRequires:  java-devel
 %description -n cephfs-java
 This package contains the Java libraries for the Ceph File System.
@@ -552,7 +552,7 @@ fi
 %{_bindir}/tpbench
 %{_bindir}/xattr_bench
 
-%files -n libcephfs-jni
+%files -n libcephfs_jni1
 %defattr(-,root,root,-)
 /usr/lib/jni/libcephfs_jni.so*
 
Signature · 1 line
1.8.0.2
#5 lore raw

PATCH 5/6 configure.ac: remove AC_PROG_RANLIB

In reply to Danny Al-Gaaf

Remove already comment out AC_PROG_RANLIB to get rid of warning:

libtoolize: AC_PROG_RANLIB' is rendered obsolete by LT_INIT'

---
 configure.ac | 1 -
 1 file changed, 1 deletion(-)
configure.ac +0 -1
index 07bfaa9..15430dd 100644
@@ -51,7 +51,6 @@ AM_CONDITIONAL(FREEBSD, test x"$freebsd" = x"yes")
 # Checks for programs.
 AC_PROG_CXX
 #AC_PROG_CC
-#AC_PROG_RANLIB
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 
Signature · 1 line
1.8.0.2
#6 lore raw

PATCH 6/6 configure.ac: change junit4 handling

In reply to Danny Al-Gaaf

Change handling of --with-debug and junit4. Add a new conditional HAVE_JUNIT4 to be able to build ceph-test package also if junit4 isn't available. In this case simply don't build libcephfs-test.jar, but the rest of the tools.

---
 configure.ac         | 7 +++++--
 src/java/Makefile.am | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
configure.ac +5 -2
index 15430dd..832054b 100644
@@ -309,8 +309,10 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [
       junit4_jar=`find $dir -name junit4.jar | head -n 1`
 		  AS_IF([test -r "$junit4_jar"], [
 	      EXTRA_CLASSPATH_JAR=`dirname $junit4_jar`/junit4.jar
-      AC_SUBST(EXTRA_CLASSPATH_JAR)], [
-      AC_MSG_ERROR([Cannot find junit4.jar (apt-get install junit4)])])])
+      AC_SUBST(EXTRA_CLASSPATH_JAR)
+      [have_junit4=1]], [
+      AC_MSG_NOTICE([Cannot find junit4.jar (apt-get install junit4)])
+      [have_junit4=0]])])
 
 	# Check for Java programs: javac, javah, jar
     PATH_save=$PATH
@@ -341,6 +343,7 @@ AS_IF([test "x$enable_cephfs_java" = "xyes"], [
 	# Setup output var
 	AC_SUBST(JDK_CPPFLAGS)
 ])
+AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"])
 
 # jni?
 # clear cache (from java above) -- this whole thing will get
src/java/Makefile.am +2 -2
index 1f87885..788bea2 100644
@@ -51,7 +51,7 @@ CLEANFILES = -rf java/com/ceph/fs/*.class $(JAVA_H) libcephfs.jar
 BUILT_SOURCES = $(JAVA_H)
 
 # build the tests if *both* --enable-cephfs-java and --with-debug were specifed
-if WITH_DEBUG 
+if HAVE_JUNIT4
 
 JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test/%.java=%.class)
 ESCAPED_JAVA_TEST_CLASSES = com/ceph/fs/CephAllTests\$$1.class
@@ -68,5 +68,5 @@ libcephfs-test.jar: $(CEPH_TEST_PROXY)
 java_DATA += libcephfs-test.jar
 
 CLEANFILES += test/com/ceph/fs/*.class libcephfs-test.jar
-endif # WITH_DEBUG
+endif # HAVE_JUNIT4 (includes WITH_DEBUG)
 endif #ENABLE_CEPHFS_JAVA
Signature · 1 line
1.8.0.2
#7 lore raw
In reply to Danny Al-Gaaf

Thanks!

Gary, can you pull these into a branch and do some before-and-after package comparisons on our systems (for the different distros in gitbuilder) and then merge into master?
-Greg

Quoted 22 lines · Danny Al-Gaaf

This set of patches contains fixes for some build and packaging issues.

Danny Al-Gaaf (6):
src/java/Makefile.am: fix default java dir ceph.spec.in: fix handling of java files ceph.spec.in: rename libcephfs-java package to cephfs-java ceph.spec.in: fix libcephfs-jni package name configure.ac: remove AC_PROG_RANLIB configure.ac: change junit4 handling

 ceph.spec.in         | 21 +++++++++------------
 configure.ac         |  8 +++++---
 src/java/Makefile.am |  6 +++---
 3 files changed, 17 insertions(+), 18 deletions(-)

--
1.8.0.2

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

#8 lore raw

No Problem.

Cheers,
Gary

Quoted 30 lines · Gregory Farnum

Thanks!

Gary, can you pull these into a branch and do some before-and-after package comparisons on our systems (for the different distros in gitbuilder) and then merge into master?
-Greg

Quoted 22 lines · Danny Al-Gaaf

This set of patches contains fixes for some build and packaging issues.

Danny Al-Gaaf (6):
src/java/Makefile.am: fix default java dir ceph.spec.in: fix handling of java files ceph.spec.in: rename libcephfs-java package to cephfs-java ceph.spec.in: fix libcephfs-jni package name configure.ac: remove AC_PROG_RANLIB
configure.ac: change junit4 handling

ceph.spec.in         | 21 +++++++++------------
configure.ac         |  8 +++++---
src/java/Makefile.am |  6 +++---
3 files changed, 17 insertions(+), 18 deletions(-)

--
1.8.0.2

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