]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm,install-dep.sh,cmake: build cephfs java binding 35598/head
authorKefu Chai <kchai@redhat.com>
Tue, 16 Jun 2020 12:49:29 +0000 (20:49 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 18 Feb 2021 04:18:38 +0000 (12:18 +0800)
java packaging tools are now offered by "javapackages-tools" module in
el8. so let's re-enable it. this change partially reverts
dd133840b9d35ca7d8b1788836f6076b06c33087

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in
install-deps.sh

index f9516fc2de765c01189aa87d9b100af415051099..308cf40aa2545977050a7d93c40b7b4544878dfd 100644 (file)
 %endif
 %if 0%{?fedora} || 0%{?rhel}
 %bcond_without selinux
-%if 0%{?rhel} >= 8
-%bcond_with cephfs_java
-%else
 %bcond_without cephfs_java
-%endif
 %bcond_without amqp_endpoint
 %bcond_without kafka_endpoint
 %bcond_without lttng
@@ -161,6 +157,7 @@ Requires:       ceph-mon = %{_epoch_prefix}%{version}-%{release}
 Requires(post):        binutils
 %if 0%{with cephfs_java}
 BuildRequires: java-devel
+BuildRequires: jpackage-utils
 BuildRequires: sharutils
 %endif
 %if 0%{with selinux}
@@ -1230,6 +1227,8 @@ cd build
     -DWITH_TESTS:BOOL=OFF \
 %endif
 %if 0%{with cephfs_java}
+    -DJAVA_HOME=%{java_home} \
+    -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
     -DWITH_CEPHFS_JAVA:BOOL=ON \
 %endif
 %if 0%{with selinux}
index 07259e84dc4e3b24826f09665aaa8d0e2ffe195f..5345e73a20b20762f8d26f384e88de8a8b490496 100755 (executable)
@@ -350,10 +350,12 @@ else
                    # before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies
                     $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
                     $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
+                    $SUDO dnf -y module enable javapackages-tools
                 elif test $ID = rhel -a $MAJOR_VERSION = 8 ; then
                     $SUDO subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
                    $SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
                    $SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
+                   $SUDO dnf -y module enable javapackages-tools
                 fi
                 ;;
         esac