control: tags -1 + patch
Hello,
Please find attached a patch to build libthrift-java.
Best wishes,
Andrius
diff --git a/debian/control b/debian/control
index deae009..2232a77 100644
--- a/debian/control
+++ b/debian/control
@@ -16,8 +16,9 @@ Build-Depends: debhelper (>= 9), dh-python,
golang-go, golang-github-golang-mock-dev,
pkg-php-tools (>= 1.14~), php-dev, phpunit,
perl (>= 5.22), libbit-vector-perl, libclass-accessor-perl,
-# openjdk-11-jdk, javahelper, maven-debian-helper (>= 1.5), ant (>= 1.7), ant-optional,
-# libhttpclient-java, libslf4j-java, libservlet3.1-java (>= 8),
+ openjdk-11-jdk, javahelper, maven-debian-helper (>= 1.5), ant (>= 1.7), ant-optional,
+ libhttpclient-java, libslf4j-java, libservlet3.1-java (>= 8),
+ junit4, libgeronimo-annotation-1.3-spec-java, libmockito-java,
# nodejs, npm,
ruby-dev (>= 1:2.2), ruby, bundler,
rake,
@@ -148,20 +149,20 @@ Description: Python library for Thrift (debug symbols)
.
This package contains the debugging symbols for Python 3 bindings of Thrift.
-#Package: libthrift-java
-#Section: java
-#Architecture: all
-#Depends: ${java:Depends}, ${misc:Depends}
-#Conflicts: libthrift-java (<= 0.9.1-2)
-#Replaces: libthrift-java (<= 0.9.1-2)
-#Description: Java language support for Thrift
-# Thrift is a software framework for the development of reliable and
-# performant communication and data serialization. It combines a software
-# stack with code generation to build services that operate seamlessly
-# across a number of different development languages.
-# .
-# This package provides the Java language support for Thrift.
-#
+Package: libthrift-java
+Section: java
+Architecture: all
+Depends: ${java:Depends}, ${misc:Depends}
+Conflicts: libthrift-java (<= 0.9.1-2)
+Replaces: libthrift-java (<= 0.9.1-2)
+Description: Java language support for Thrift
+ Thrift is a software framework for the development of reliable and
+ performant communication and data serialization. It combines a software
+ stack with code generation to build services that operate seamlessly
+ across a number of different development languages.
+ .
+ This package provides the Java language support for Thrift.
+
#Package: libthrift-java-doc
#Architecture: all
#Section: doc
diff --git a/debian/patches/java_fix.patch b/debian/patches/java_fix.patch
new file mode 100644
index 0000000..8fd8edd
--- /dev/null
+++ b/debian/patches/java_fix.patch
@@ -0,0 +1,43 @@
+Description: Downloading of remote content has to be replaced with
+ artifacts alread in Debian. Source and target 1.6 are needed to build.
+Author: Andrius Merkys <[email protected]>
+--- a/lib/java/build.xml
++++ b/lib/java/build.xml
+@@ -70,6 +70,13 @@
+ <fileset dir="${build.lib.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
++ <fileset dir="/usr/share/java">
++ <include name="slf4j-*.jar"/>
++ </fileset>
++ <fileset dir="/usr/share/java">
++ <include name="servlet-api-*.jar"/>
++ </fileset>
++ <pathelement location="/usr/share/java/httpclient.jar"/>
+ </path>
+
+ <path id="test.classpath">
+@@ -78,11 +85,13 @@
+ <pathelement location="${build.test.dir}"/>
+ <pathelement location="${jar.file}"/>
+ <pathelement location="${test.jar.file}"/>
++ <pathelement location="/usr/share/java/geronimo-annotation-1.3-spec.jar"/>
++ <pathelement location="/usr/share/java/mockito-core.jar"/>
+
+ </path>
+
+ <!-- Tasks -->
+- <target name="init" depends="setup.init,mvn.init" unless="init.finished">
++ <target name="init" depends="setup.init" unless="init.finished">
+ <property name="init.finished" value="true"/>
+ </target>
+
+@@ -95,7 +104,7 @@
+ </target>
+
+ <target name="compile" depends="init">
+- <javac compiler="modern" srcdir="${src}" destdir="${build.dir}" source="1.5" target="1.5"
++ <javac compiler="modern" srcdir="${src}" destdir="${build.dir}" source="1.6" target="1.6"
+ debug="true" classpathref="compile.classpath" includeantruntime="false" encoding="UTF-8">
+ <compilerarg value="-Xlint:unchecked"/>
+ </javac>
diff --git a/debian/patches/no_json_tests.patch b/debian/patches/no_json_tests.patch
new file mode 100644
index 0000000..d97628a
--- /dev/null
+++ b/debian/patches/no_json_tests.patch
@@ -0,0 +1,15 @@
+Description: With --with-java, json tests are turned on automatically.
+ As JSON schema validator for Java is not yet packaged, these tests all
+ fail.
+Author: Andrius Merkys <[email protected]>
+--- a/lib/json/test/build.xml
++++ b/lib/json/test/build.xml
+@@ -80,7 +80,7 @@
+ </target>
+
+ <target name="test" description="run schema validation"
+- depends="validate-schema, validate-generated-json"/>
++ />
+
+ <target name="validate-schema" depends="init">
+ <java classname="com.github.fge.jsonschema.main.cli.Main"
diff --git a/debian/patches/series b/debian/patches/series
index 2f91871..93b11bf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,5 @@ fix_boost_atomic_link.patch
go_test_fail_on_busy_machine.patch
CVE-2018-11798_Node.js_Filesever_webroot_fixed_path.patch
THRIFT-4421_fix_golang_tests_rely_on_gomock.patch
+java_fix.patch
+no_json_tests.patch
diff --git a/debian/rules b/debian/rules
index 9aa7aa8..b9eaee4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,7 +42,7 @@ override_dh_auto_clean:
# let make clean
dh_auto_clean
-# jh_clean
+ jh_clean
# leftovers
rm -f $(CURDIR)/thrift.jar
rm -f $(CURDIR)/lib/cpp/test/tests.xml \
@@ -59,7 +59,7 @@ override_dh_auto_clean:
override_dh_auto_configure:
dh_auto_configure -- --enable-plugin \
--with-cpp --with-c_glib --with-php --with-php_extension \
- --with-perl --with-python --with-py3 --without-java \
+ --with-perl --with-python --with-py3 --with-java \
--without-nodejs --without-erlang --without-lua \
--with-go --with-ruby \
--with-qt4=no --with-qt5=yes \
@@ -81,16 +81,16 @@ override_dh_auto_build:
set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS) $(PYTHON3_VERSIONS); do \
$$python setup.py build; \
done
-# jh_build thrift.jar $(CURDIR)/lib/java/src/
+ jh_build thrift.jar $(CURDIR)/lib/java/src/
override_dh_auto_install:
dh_auto_install -- INSTALLDIRS=vendor
set -ex; cd lib/py && for python in $(PYTHON2_VERSIONS) $(PYTHON3_VERSIONS); do \
$$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp; \
done
-# jh_installlibs -plibthrift-java thrift.jar
+ jh_installlibs -plibthrift-java thrift.jar
# jh_installjavadoc
-# jh_depends
+ jh_depends
find $(CURDIR)/debian/tmp/ -name \*.la -exec rm {} \;