diff -Nru ceph-12.2.4/debian/changelog ceph-12.2.4/debian/changelog --- ceph-12.2.4/debian/changelog 2018-03-20 06:28:22.000000000 -0300 +++ ceph-12.2.4/debian/changelog 2018-04-24 22:45:34.000000000 -0300 @@ -1,3 +1,15 @@ +ceph (12.2.4-0ubuntu1.1) bionic; urgency=medium + + * d/p/update-java-source-target-flags.patch: Use --release instead + of -source/-target and set release to 7 as that is the minimum + required for OpenJDK 11 (LP: #1766998). + * d/p/replace-javah-usage.patch: call -h during compilation time to + generate native header files and remove the javah call as the binary + is no longer part of openjdk-10 - javah has been deprecated since + openjdk-9 (LP: #1766995). + + -- Tiago Stürmer Daitx Wed, 25 Apr 2018 01:45:34 +0000 + ceph (12.2.4-0ubuntu1) bionic; urgency=medium [ James Page ] diff -Nru ceph-12.2.4/debian/patches/replace-javah-usage.patch ceph-12.2.4/debian/patches/replace-javah-usage.patch --- ceph-12.2.4/debian/patches/replace-javah-usage.patch 1969-12-31 21:00:00.000000000 -0300 +++ ceph-12.2.4/debian/patches/replace-javah-usage.patch 2018-04-24 22:45:34.000000000 -0300 @@ -0,0 +1,38 @@ +Description: Replace javah usage with javac flag for header generation + OpenJDK 10 removed the javah binary as per JEP-313 and JDK-8182758 and + native header should be now generated by calling the Java compiler with + the flag '-h' (eg. javac -h
). +Author: Tiago Stürmer Daitx +Bug-Ubuntu: https://launchpad.net/bugs/1766995 +Forwarded: no +Last-Update: 2018-04-25 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/java/CMakeLists.txt ++++ b/src/java/CMakeLists.txt +@@ -15,21 +15,20 @@ set(java_srcs + java/com/ceph/fs/CephStat.java + java/com/ceph/fs/CephStatVFS.java) + ++set(java_h_dir ${CMAKE_CURRENT_BINARY_DIR}/native) ++set(java_h ${java_h_dir}/com_ceph_fs_CephMount.h) ++ + # note: for the -source 1.5 builds, we add + # -Xlint:-options + # to get rid of the warning + # warning: [options] bootstrap class path not set in conjunction with -source 1.5 + # as per + # https://blogs.oracle.com/darcy/entry/bootclasspath_older_source +-set(CMAKE_JAVA_COMPILE_FLAGS "--release" "7" "-Xlint:-options") ++set(CMAKE_JAVA_COMPILE_FLAGS "--release" "7" "-Xlint:-options" "-h" "${java_h_dir}") + add_jar(libcephfs ${java_srcs}) + install_jar(libcephfs share/java) + get_property(libcephfs_jar TARGET libcephfs PROPERTY JAR_FILE) + +-set(java_h native/com_ceph_fs_CephMount.h) +-add_custom_command( +- OUTPUT ${java_h} +- COMMAND ${Java_JAVAH_EXECUTABLE} -classpath ${libcephfs_jar} -jni -o ${CMAKE_CURRENT_BINARY_DIR}/${java_h} com.ceph.fs.CephMount) + add_custom_target( + jni-header + DEPENDS ${java_h}) diff -Nru ceph-12.2.4/debian/patches/series ceph-12.2.4/debian/patches/series --- ceph-12.2.4/debian/patches/series 2018-03-19 09:11:20.000000000 -0300 +++ ceph-12.2.4/debian/patches/series 2018-04-24 22:45:34.000000000 -0300 @@ -7,3 +7,4 @@ # Ubuntu: FTBFS on armhf armhf-ftbfs.patch update-java-source-target-flags.patch +replace-javah-usage.patch diff -Nru ceph-12.2.4/debian/patches/update-java-source-target-flags.patch ceph-12.2.4/debian/patches/update-java-source-target-flags.patch --- ceph-12.2.4/debian/patches/update-java-source-target-flags.patch 2018-03-19 09:11:20.000000000 -0300 +++ ceph-12.2.4/debian/patches/update-java-source-target-flags.patch 2018-04-24 22:45:34.000000000 -0300 @@ -1,26 +1,23 @@ -Description: update java source and target to 1.8 - In order to build ceph with OpenJDK the source and target flags need to be - set to at least 1.6. Setting them to 1.8 allows us to some head space for - OpenJDK 11 (see JEP-182). - . - ceph (12.2.2-0ubuntu3) UNRELEASED; urgency=medium - . - * Update java source and target flags from 1.5 to 1.8. Allows it to run - using OpenJDK 8 or earlier and to be build with OpenJDK 9, 10, and 11. +Description: use --release 7 instead of -source/-target + Instead of -source/-target ceph should be build with --release for OpenJDK 9 + or later so that the bootclasspath is also set, as per JEP-247, otherwise it + risks incurring into binary incompatibility when run with an earlier OpenJDK. + OpenJDK 11 minimum compatibility release has been updated to 7. Author: Tiago Stürmer Daitx Bug-Ubuntu: https://launchpad.net/bugs/1756854 +Bug-Ubuntu: https://launchpad.net/bugs/1766998 Forwarded: no -Last-Update: 2018-02-28 +Last-Update: 2018-04-24 --- ---- ceph-12.2.2.orig/src/java/CMakeLists.txt -+++ ceph-12.2.2/src/java/CMakeLists.txt +--- a/src/java/CMakeLists.txt ++++ b/src/java/CMakeLists.txt @@ -21,7 +21,7 @@ set(java_srcs # warning: [options] bootstrap class path not set in conjunction with -source 1.5 # as per # https://blogs.oracle.com/darcy/entry/bootclasspath_older_source -set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.5" "-target" "1.5" "-Xlint:-options") -+set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" "-Xlint:-options") ++set(CMAKE_JAVA_COMPILE_FLAGS "--release" "7" "-Xlint:-options") add_jar(libcephfs ${java_srcs}) install_jar(libcephfs share/java) get_property(libcephfs_jar TARGET libcephfs PROPERTY JAR_FILE)