---------- Forwarded message --------- From: Olek Wojnar <o...@debian.org> Date: Mon, May 4, 2020 at 2:44 AM Subject: Re: Bug#958444: protobuf: Please add protobuf-java-util to the protobuf-java package To: László Böszörményi (GCS) <g...@debian.org>
Hi László, On Thu, Apr 30, 2020 at 1:26 AM László Böszörményi (GCS) <g...@debian.org> wrote: > On Wed, Apr 29, 2020 at 4:17 PM Olek Wojnar <o...@debian.org> wrote: > > On Thu, Apr 23, 2020 at 10:50 AM Olek Wojnar <o...@debian.org> wrote: > > Did you have an opportunity to make any progress over the weekend? > Had enough things to do, but of course I've tried to update the > libtruth-java package and failed. :( > I think the Java build dependencies should be handled by someone who > is more proficient with Java. :-/ > Well, I'm certainly no Java expert but I can definitely take a look. Where is your packaging so far? > > > Offer to help is still open and I'm happy to push a branch to your VCS > with what I've already done. Hope you're having a nice week! > How big is your changes? You can send that to me as a patch. > Not very big. I'm attaching what I have. Note that I added a patch to disable error-prone. The error-prone library is not strictly necessary and, if it enters Debian at some point, you can just remove that patch. In the meantime, it will enable the util java to build. I also ran a `quilt refresh` on the existing patches before I created mine, my normal workflow to prevent possible problems. If you don't want the patch refresh I also included a clean patch that only makes the absolutely necessary changes to enable the -util build. This builds correctly in a sid cowbuilder and introduces no lintian errors. Hope this helps! -Olek
diff --git a/debian/changelog b/debian/changelog index 40fffd9..131b1be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +protobuf (3.11.4-4.1) unstable; urgency=medium + + [ Olek Wojnar <olek@debian.org> ] + * Non-maintainer upload + * Allow building of protobuf-java-util (Closes: #958444) + * Refresh d/patches + * Add no_errorprone.patch since dependency not available in Debian + + -- Olek Wojnar <olek@debian.org> Wed, 22 Apr 2020 01:54:23 -0400 + protobuf (3.11.4-4) unstable; urgency=medium * Update Python version for self-tests (closes: #937327). diff --git a/debian/control b/debian/control index d5b38da..fa9cfaf 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,8 @@ Build-Depends-Indep: ant , default-jdk , maven-repo-helper + , libguava-java + , libgoogle-gson-java Standards-Version: 4.5.0 Homepage: https://github.com/google/protobuf/ #Vcs-Browser: https://anonscm.debian.org/cgit/pkg-protobuf/pkg-protobuf.git diff --git a/debian/java-build.xml b/debian/java-build.xml index db1b6f4..5c84f83 100644 --- a/debian/java-build.xml +++ b/debian/java-build.xml @@ -1,20 +1,32 @@ <project name="protobuf-java" default="jar" basedir=".."> <property name="srcdir" value="src" /> - <property name="javadir" value="java/core" /> - <property name="javasrcdir" value="${javadir}/src" /> - <property name="targetdir" value="${javadir}/target" /> - <property name="classesdir" value="${targetdir}/classes" /> - <property name="generateddir" value="${targetdir}/generated-sources" /> + <property name="javacoredir" value="java/core" /> + <property name="javautildir" value="java/util" /> + <property name="javacoresrcdir" value="${javacoredir}/src" /> + <property name="javautilsrcdir" value="${javautildir}/src" /> + <property name="coretargetdir" value="${javacoredir}/target" /> + <property name="utiltargetdir" value="${javautildir}/target" /> + <property name="coreclassesdir" value="${coretargetdir}/classes" /> + <property name="utilclassesdir" value="${utiltargetdir}/classes" /> + <property name="coregenerateddir" value="${coretargetdir}/generated-sources" /> + + <path id="util-classpath"> + <fileset dir="/usr/share/java/"> + <include name="gson.jar"/> + <include name="guava.jar"/> + </fileset> + </path> <target name="clean"> - <delete dir="${targetdir}"/> + <delete dir="${coretargetdir}"/> + <delete dir="${utiltargetdir}"/> </target> <target name="generate"> - <mkdir dir="${generateddir}" /> + <mkdir dir="${coregenerateddir}" /> <echo message="${srcdir}" /> <exec executable="${srcdir}/protoc"> - <arg value="--java_out=${generateddir}" /> + <arg value="--java_out=${coregenerateddir}" /> <arg value="--proto_path=${srcdir}" /> <arg value="${srcdir}/google/protobuf/any.proto" /> <arg value="${srcdir}/google/protobuf/api.proto" /> @@ -32,13 +44,25 @@ </target> <target name="compile" depends="generate"> - <mkdir dir="${classesdir}"/> - <javac srcdir="${generateddir}:${javasrcdir}/main/java" - destdir="${classesdir}" source="1.7" target="1.7" + <mkdir dir="${coreclassesdir}"/> + <javac srcdir="${coregenerateddir}:${javacoresrcdir}/main/java" + destdir="${coreclassesdir}" source="1.7" target="1.7" + includeantruntime="false" /> + </target> + + <target name="compile-util" depends="compile"> + <mkdir dir="${utilclassesdir}"/> + <javac srcdir="${coregenerateddir}:${javacoresrcdir}/main/java:${javautilsrcdir}/main/java" + destdir="${utilclassesdir}" source="1.7" target="1.7" + classpathref="util-classpath" includeantruntime="false" /> </target> <target name="jar" depends="compile"> - <jar destfile="${targetdir}/protobuf.jar" basedir="${classesdir}" /> + <jar destfile="${coretargetdir}/protobuf.jar" basedir="${coreclassesdir}" /> + </target> + + <target name="jar-util" depends="compile-util"> + <jar destfile="${utiltargetdir}/protobuf-util.jar" basedir="${utilclassesdir}" /> </target> </project> diff --git a/debian/libprotobuf-java.poms b/debian/libprotobuf-java.poms index c13a2b2..ef3c493 100644 --- a/debian/libprotobuf-java.poms +++ b/debian/libprotobuf-java.poms @@ -1 +1,2 @@ java/core/pom.xml --artifact=java/core/target/protobuf.jar --java-lib --no-parent --usj-name=protobuf +java/util/pom.xml --artifact=java/util/target/protobuf-util.jar --java-lib --no-parent --usj-name=protobuf-util diff --git a/debian/patches/32bit.patch b/debian/patches/32bit.patch index 91bb40f..7e5095b 100644 --- a/debian/patches/32bit.patch +++ b/debian/patches/32bit.patch @@ -8,7 +8,7 @@ Last-Update: 2019-09-12 --- a/python/google/protobuf/internal/text_format_test.py +++ b/python/google/protobuf/internal/text_format_test.py -@@ -41,6 +41,8 @@ import textwrap +@@ -41,6 +41,8 @@ import six @@ -17,7 +17,7 @@ Last-Update: 2019-09-12 # pylint: disable=g-import-not-at-top try: import unittest2 as unittest # PY26 -@@ -845,29 +845,52 @@ class OnlyWorksWithProto2RightNowTests(T +@@ -909,29 +911,52 @@ all_data = message.SerializeToString() empty_message = unittest_pb2.TestEmptyMessage() empty_message.ParseFromString(all_data) diff --git a/debian/patches/default_python_version b/debian/patches/default_python_version index c2d5988..555fba5 100644 --- a/debian/patches/default_python_version +++ b/debian/patches/default_python_version @@ -1,17 +1,13 @@ -Index: protobuf-2.1.0/python/mox.py -=================================================================== ---- protobuf-2.1.0.orig/python/mox.py 2009-11-17 03:37:29.000000000 +1100 -+++ protobuf-2.1.0/python/mox.py 2009-11-17 03:38:08.000000000 +1100 +--- a/python/mox.py ++++ b/python/mox.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python # # Copyright 2008 Google Inc. # -Index: protobuf-2.1.0/python/stubout.py -=================================================================== ---- protobuf-2.1.0.orig/python/stubout.py 2009-11-17 03:37:29.000000000 +1100 -+++ protobuf-2.1.0/python/stubout.py 2009-11-17 03:38:17.000000000 +1100 +--- a/python/stubout.py ++++ b/python/stubout.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python diff --git a/debian/patches/disable_local_gmock.patch b/debian/patches/disable_local_gmock.patch index 6c78e60..3abeca1 100644 --- a/debian/patches/disable_local_gmock.patch +++ b/debian/patches/disable_local_gmock.patch @@ -8,7 +8,7 @@ Last-Update: 2018-05-29 --- a/Makefile.am +++ b/Makefile.am -@@ -17,9 +17,9 @@ DIST_SUBDIRS = src conformance benchmark +@@ -17,9 +17,9 @@ # want "make install" to recurse into gmock since we don't want to overwrite # the installed version of gmock if there is one. check-local: @@ -23,7 +23,7 @@ Last-Update: 2018-05-29 # be careful because clean-local is also invoked during "make distclean", but --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -718,10 +718,8 @@ GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_pa +@@ -715,10 +715,8 @@ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ protobuf-lite-test test_plugin protobuf-lite-arena-test \ no-warning-test $(GZCHECKPROGRAMS) @@ -36,7 +36,7 @@ Last-Update: 2018-05-29 protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ -I$(GOOGLEMOCK_SRC_DIR)/include # Disable optimization for tests unless the user explicitly asked for it, -@@ -810,10 +808,7 @@ $(am_protobuf_test_OBJECTS): unittest_pr +@@ -811,10 +809,7 @@ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ @@ -48,7 +48,7 @@ Last-Update: 2018-05-29 protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include \ -DPROTOBUF_TEST_NO_DESCRIPTORS -@@ -837,9 +832,7 @@ COMMON_LITE_TEST_SOURCES = +@@ -838,9 +833,7 @@ # full runtime and we want to make sure this test builds without full # runtime. protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ @@ -59,7 +59,7 @@ Last-Update: 2018-05-29 protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -@@ -853,9 +846,7 @@ $(am_protobuf_lite_test_OBJECTS): unitte +@@ -854,9 +847,7 @@ # gtest when building the test internally our memory sanitizer doesn't detect # memory leaks (don't know why). protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ @@ -70,7 +70,7 @@ Last-Update: 2018-05-29 protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -@@ -867,7 +858,7 @@ $(am_protobuf_lite_arena_test_OBJECTS): +@@ -868,7 +859,7 @@ # Test plugin binary. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ diff --git a/debian/patches/fix_google_test_link.patch b/debian/patches/fix_google_test_link.patch index e6aaaf1..1213a97 100644 --- a/debian/patches/fix_google_test_link.patch +++ b/debian/patches/fix_google_test_link.patch @@ -5,9 +5,9 @@ Last-Update: 2018-10-11 --- ---- protobuf-3.6.1.orig/src/Makefile.am -+++ protobuf-3.6.1/src/Makefile.am -@@ -700,7 +700,7 @@ check_PROGRAMS = protoc protobuf-test pr +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -716,7 +716,7 @@ protobuf-lite-test test_plugin protobuf-lite-arena-test \ no-warning-test $(GZCHECKPROGRAMS) protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la -lgtest \ @@ -16,7 +16,7 @@ Last-Update: 2018-10-11 protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \ -I$(GOOGLEMOCK_SRC_DIR)/include # Disable optimization for tests unless the user explicitly asked for it, -@@ -789,7 +789,7 @@ $(am_protobuf_test_OBJECTS): unittest_pr +@@ -809,7 +809,7 @@ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ @@ -25,7 +25,7 @@ Last-Update: 2018-10-11 protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include \ -DPROTOBUF_TEST_NO_DESCRIPTORS -@@ -813,7 +813,7 @@ COMMON_LITE_TEST_SOURCES = +@@ -833,7 +833,7 @@ # full runtime and we want to make sure this test builds without full # runtime. protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ @@ -34,7 +34,7 @@ Last-Update: 2018-10-11 protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -@@ -827,7 +827,7 @@ $(am_protobuf_lite_test_OBJECTS): unitte +@@ -847,7 +847,7 @@ # gtest when building the test internally our memory sanitizer doesn't detect # memory leaks (don't know why). protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \ @@ -43,7 +43,7 @@ Last-Update: 2018-10-11 protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \ -I$(GOOGLETEST_SRC_DIR)/include protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) -@@ -839,7 +839,7 @@ $(am_protobuf_lite_arena_test_OBJECTS): +@@ -859,7 +859,7 @@ # Test plugin binary. test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ diff --git a/debian/patches/fix_googletest.patch b/debian/patches/fix_googletest.patch index b660bfd..5995e7d 100644 --- a/debian/patches/fix_googletest.patch +++ b/debian/patches/fix_googletest.patch @@ -6,9 +6,9 @@ Last-Update: 2019-08-06 --- ---- protobuf-3.9.1.orig/src/google/protobuf/compiler/command_line_interface_unittest.cc -+++ protobuf-3.9.1/src/google/protobuf/compiler/command_line_interface_unittest.cc -@@ -2433,7 +2433,7 @@ TEST_P(EncodeDecodeTest, ProtoParseError +--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc ++++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc +@@ -2585,7 +2585,7 @@ "net/proto2/internal/no_such_file.proto: No such file or directory\n"); } @@ -17,9 +17,9 @@ Last-Update: 2019-08-06 testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN)); } // anonymous namespace ---- protobuf-3.9.1.orig/src/google/protobuf/descriptor_unittest.cc -+++ protobuf-3.9.1/src/google/protobuf/descriptor_unittest.cc -@@ -2969,7 +2969,7 @@ TEST_P(AllowUnknownDependenciesTest, +--- a/src/google/protobuf/descriptor_unittest.cc ++++ b/src/google/protobuf/descriptor_unittest.cc +@@ -2968,7 +2968,7 @@ ASSERT_TRUE(pool_->FindMessageTypeByName("undeclared.Quux") == nullptr); } @@ -28,9 +28,9 @@ Last-Update: 2019-08-06 testing::Values(NO_DATABASE, FALLBACK_DATABASE)); // =================================================================== ---- protobuf-3.9.1.orig/src/google/protobuf/dynamic_message_unittest.cc -+++ protobuf-3.9.1/src/google/protobuf/dynamic_message_unittest.cc -@@ -320,7 +320,7 @@ TEST_F(DynamicMessageTest, Proto3) { +--- a/src/google/protobuf/dynamic_message_unittest.cc ++++ b/src/google/protobuf/dynamic_message_unittest.cc +@@ -320,7 +320,7 @@ delete message; } @@ -39,9 +39,9 @@ Last-Update: 2019-08-06 } // namespace protobuf } // namespace google ---- protobuf-3.9.1.orig/src/google/protobuf/map_field_test.cc -+++ protobuf-3.9.1/src/google/protobuf/map_field_test.cc -@@ -295,7 +295,7 @@ class MapFieldStateTest : public testing +--- a/src/google/protobuf/map_field_test.cc ++++ b/src/google/protobuf/map_field_test.cc +@@ -295,7 +295,7 @@ State state_; }; @@ -50,9 +50,9 @@ Last-Update: 2019-08-06 ::testing::Values(CLEAN, MAP_DIRTY, REPEATED_DIRTY)); TEST_P(MapFieldStateTest, GetMap) { ---- protobuf-3.9.1.orig/src/google/protobuf/text_format_unittest.cc -+++ protobuf-3.9.1/src/google/protobuf/text_format_unittest.cc -@@ -82,7 +82,7 @@ const std::string kEscapeTestStringEscap +--- a/src/google/protobuf/text_format_unittest.cc ++++ b/src/google/protobuf/text_format_unittest.cc +@@ -80,7 +80,7 @@ class TextFormatTest : public testing::Test { public: @@ -61,7 +61,7 @@ Last-Update: 2019-08-06 GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath( "net/proto2/internal/" -@@ -105,7 +105,7 @@ std::string TextFormatTest::static_proto +@@ -103,7 +103,7 @@ class TextFormatExtensionsTest : public testing::Test { public: @@ -70,9 +70,9 @@ Last-Update: 2019-08-06 GOOGLE_CHECK_OK(File::GetContents( TestUtil::GetTestDataPath("net/proto2/internal/testdata/" "text_format_unittest_extensions_data.txt"), ---- protobuf-3.9.1.orig/src/google/protobuf/util/internal/default_value_objectwriter_test.cc -+++ protobuf-3.9.1/src/google/protobuf/util/internal/default_value_objectwriter_test.cc -@@ -73,7 +73,7 @@ class DefaultValueObjectWriterTest : pub +--- a/src/google/protobuf/util/internal/default_value_objectwriter_test.cc ++++ b/src/google/protobuf/util/internal/default_value_objectwriter_test.cc +@@ -73,7 +73,7 @@ virtual ~DefaultValueObjectWriterTest() {} }; @@ -81,7 +81,7 @@ Last-Update: 2019-08-06 DefaultValueObjectWriterTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -160,7 +160,7 @@ class DefaultValueObjectWriterSuppressLi +@@ -160,7 +160,7 @@ ~DefaultValueObjectWriterSuppressListTest() override {} }; @@ -90,9 +90,9 @@ Last-Update: 2019-08-06 DefaultValueObjectWriterSuppressListTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); ---- protobuf-3.9.1.orig/src/google/protobuf/util/internal/protostream_objectsource_test.cc -+++ protobuf-3.9.1/src/google/protobuf/util/internal/protostream_objectsource_test.cc -@@ -290,7 +290,7 @@ class ProtostreamObjectSourceTest +--- a/src/google/protobuf/util/internal/protostream_objectsource_test.cc ++++ b/src/google/protobuf/util/internal/protostream_objectsource_test.cc +@@ -290,7 +290,7 @@ bool render_unknown_enum_values_; }; @@ -101,7 +101,7 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -606,7 +606,7 @@ class ProtostreamObjectSourceMapsTest : +@@ -606,7 +606,7 @@ } }; @@ -110,7 +110,7 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceMapsTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -748,7 +748,7 @@ class ProtostreamObjectSourceAnysTest : +@@ -748,7 +748,7 @@ } }; @@ -119,7 +119,7 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceAnysTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -985,7 +985,7 @@ class ProtostreamObjectSourceStructTest +@@ -985,7 +985,7 @@ } }; @@ -128,7 +128,7 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceStructTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1031,7 +1031,7 @@ class ProtostreamObjectSourceFieldMaskTe +@@ -1031,7 +1031,7 @@ } }; @@ -137,7 +137,7 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceFieldMaskTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1094,7 +1094,7 @@ class ProtostreamObjectSourceTimestampTe +@@ -1094,7 +1094,7 @@ } }; @@ -146,9 +146,9 @@ Last-Update: 2019-08-06 ProtostreamObjectSourceTimestampTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); ---- protobuf-3.9.1.orig/src/google/protobuf/util/internal/protostream_objectwriter_test.cc -+++ protobuf-3.9.1/src/google/protobuf/util/internal/protostream_objectwriter_test.cc -@@ -184,7 +184,7 @@ class ProtoStreamObjectWriterTest : publ +--- a/src/google/protobuf/util/internal/protostream_objectwriter_test.cc ++++ b/src/google/protobuf/util/internal/protostream_objectwriter_test.cc +@@ -184,7 +184,7 @@ virtual ~ProtoStreamObjectWriterTest() {} }; @@ -157,7 +157,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1190,7 +1190,7 @@ class ProtoStreamObjectWriterTimestampDu +@@ -1190,7 +1190,7 @@ } }; @@ -166,7 +166,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterTimestampDurationTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1586,7 +1586,7 @@ class ProtoStreamObjectWriterStructTest +@@ -1586,7 +1586,7 @@ } }; @@ -175,7 +175,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterStructTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1738,7 +1738,7 @@ class ProtoStreamObjectWriterMapTest : p +@@ -1777,7 +1777,7 @@ } }; @@ -184,7 +184,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterMapTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -1835,7 +1835,7 @@ class ProtoStreamObjectWriterAnyTest : p +@@ -1874,7 +1874,7 @@ } }; @@ -193,7 +193,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterAnyTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -2480,7 +2480,7 @@ class ProtoStreamObjectWriterFieldMaskTe +@@ -2519,7 +2519,7 @@ } }; @@ -202,7 +202,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterFieldMaskTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -2733,7 +2733,7 @@ class ProtoStreamObjectWriterWrappersTes +@@ -2772,7 +2772,7 @@ } }; @@ -211,7 +211,7 @@ Last-Update: 2019-08-06 ProtoStreamObjectWriterWrappersTest, ::testing::Values( testing::USE_TYPE_RESOLVER)); -@@ -2756,7 +2756,7 @@ class ProtoStreamObjectWriterOneOfsTest +@@ -2795,7 +2795,7 @@ } }; diff --git a/debian/patches/hurd.patch b/debian/patches/hurd.patch index 3b10644..49c64ad 100644 --- a/debian/patches/hurd.patch +++ b/debian/patches/hurd.patch @@ -4,9 +4,9 @@ Description: Add support for GNU/Hurd which doesn't define PATH_MAX. Author: Bas Couwenberg <sebastic@debian.org> Last-Update: 2019-08-06 ---- protobuf-3.9.1.orig/src/google/protobuf/compiler/command_line_interface.cc -+++ protobuf-3.9.1/src/google/protobuf/compiler/command_line_interface.cc -@@ -56,6 +56,9 @@ +--- a/src/google/protobuf/compiler/command_line_interface.cc ++++ b/src/google/protobuf/compiler/command_line_interface.cc +@@ -55,6 +55,9 @@ #include <iostream> #include <limits.h> //For PATH_MAX diff --git a/debian/patches/no_errorprone.patch b/debian/patches/no_errorprone.patch new file mode 100644 index 0000000..c0ba993 --- /dev/null +++ b/debian/patches/no_errorprone.patch @@ -0,0 +1,161 @@ +Description: Remove dependency on errror-prone library + Library is not necessary and is not currently available in Debian. This patch + can be safely removed if the error-prone library is ever added to Debian and + that functionality is needed in protobuf. +Author: Olek Wojnar <olek@debian.org> +Last-Update: 2020-05-01 + +--- a/java/util/src/main/java/com/google/protobuf/util/Durations.java ++++ b/java/util/src/main/java/com/google/protobuf/util/Durations.java +@@ -42,7 +42,7 @@ + import static com.google.protobuf.util.Timestamps.NANOS_PER_MILLISECOND; + import static com.google.protobuf.util.Timestamps.NANOS_PER_SECOND; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Duration; + import java.text.ParseException; + import java.util.Comparator; +@@ -152,7 +152,7 @@ + * @throws IllegalArgumentException if {@code duration} is negative or invalid + * @throws NullPointerException if {@code duration} is {@code null} + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkNotNegative(Duration duration) { + checkValid(duration); + checkArgument(!isNegative(duration), "duration (%s) must not be negative", toString(duration)); +@@ -165,7 +165,7 @@ + * @throws IllegalArgumentException if {@code duration} is negative, {@code ZERO}, or invalid + * @throws NullPointerException if {@code duration} is {@code null} + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkPositive(Duration duration) { + checkValid(duration); + checkArgument( +@@ -176,7 +176,7 @@ + } + + /** Throws an {@link IllegalArgumentException} if the given {@link Duration} is not valid. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkValid(Duration duration) { + long seconds = duration.getSeconds(); + int nanos = duration.getNanos(); +--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java ++++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java +@@ -30,7 +30,7 @@ + + package com.google.protobuf.util; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Descriptors.Descriptor; + import com.google.protobuf.Descriptors.FieldDescriptor; + import com.google.protobuf.FieldMask; +@@ -96,7 +96,7 @@ + * exists, which will turn the tree node for "foo.bar" to a leaf node. Likewise, if the field path + * to add is a sub-path of an existing leaf node, nothing will be changed in the tree. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + FieldMaskTree addFieldPath(String path) { + String[] parts = path.split(FIELD_PATH_SEPARATOR_REGEX); + if (parts.length == 0) { +@@ -126,7 +126,7 @@ + } + + /** Merges all field paths in a FieldMask into this tree. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + FieldMaskTree mergeFromFieldMask(FieldMask mask) { + for (String path : mask.getPathsList()) { + addFieldPath(path); +--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java ++++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java +@@ -36,7 +36,7 @@ + import com.google.common.base.Joiner; + import com.google.common.base.Splitter; + import com.google.common.primitives.Ints; +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Descriptors.Descriptor; + import com.google.protobuf.Descriptors.FieldDescriptor; + import com.google.protobuf.FieldMask; +@@ -307,7 +307,7 @@ + * + * <p>If false, merge the source message field into the destination message field. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplaceMessageFields(boolean value) { + replaceMessageFields = value; + return this; +@@ -320,7 +320,7 @@ + * + * <p>If false, append elements from source repeated field to the destination repeated field. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplaceRepeatedFields(boolean value) { + replaceRepeatedFields = value; + return this; +@@ -337,7 +337,7 @@ + * field, and if the source field is unset, the default value of the source field is copied to + * the destination. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplacePrimitiveFields(boolean value) { + replacePrimitiveFields = value; + return this; +--- a/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java ++++ b/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java +@@ -32,7 +32,7 @@ + + import com.google.common.base.Preconditions; + import com.google.common.io.BaseEncoding; +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.gson.Gson; + import com.google.gson.GsonBuilder; + import com.google.gson.JsonArray; +@@ -546,7 +546,7 @@ + * Adds a message type and all types defined in the same .proto file as well as all + * transitively imported .proto files to this {@link Builder}. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public Builder add(Descriptor messageType) { + if (types == null) { + throw new IllegalStateException("A TypeRegistry.Builder can only be used once."); +@@ -559,7 +559,7 @@ + * Adds message types and all types defined in the same .proto file as well as all + * transitively imported .proto files to this {@link Builder}. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public Builder add(Iterable<Descriptor> messageTypes) { + if (types == null) { + throw new IllegalStateException("A TypeRegistry.Builder can only be used once."); +--- a/java/util/src/main/java/com/google/protobuf/util/Timestamps.java ++++ b/java/util/src/main/java/com/google/protobuf/util/Timestamps.java +@@ -36,7 +36,7 @@ + import static com.google.common.math.LongMath.checkedMultiply; + import static com.google.common.math.LongMath.checkedSubtract; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Duration; + import com.google.protobuf.Timestamp; + import java.text.ParseException; +@@ -164,7 +164,7 @@ + } + + /** Throws an {@link IllegalArgumentException} if the given {@link Timestamp} is not valid. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Timestamp checkValid(Timestamp timestamp) { + long seconds = timestamp.getSeconds(); + int nanos = timestamp.getNanos(); diff --git a/debian/patches/no_thirdparty.patch b/debian/patches/no_thirdparty.patch index 2b5a990..3e82066 100644 --- a/debian/patches/no_thirdparty.patch +++ b/debian/patches/no_thirdparty.patch @@ -6,9 +6,9 @@ Last-Update: 2019-08-06 --- ---- protobuf-3.9.1.orig/Makefile.am -+++ protobuf-3.9.1/Makefile.am -@@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = foreign +--- a/Makefile.am ++++ b/Makefile.am +@@ -9,7 +9,7 @@ SUBDIRS = . src # Always include third_party directories in distributions. @@ -17,9 +17,9 @@ Last-Update: 2019-08-06 # Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS # because then "make check" would also build and run all of gmock's own tests, ---- protobuf-3.9.1.orig/configure.ac -+++ protobuf-3.9.1/configure.ac -@@ -228,7 +228,6 @@ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], +--- a/configure.ac ++++ b/configure.ac +@@ -228,7 +228,6 @@ # too. export CFLAGS export CXXFLAGS diff --git a/debian/patches/python3ify_examples.patch b/debian/patches/python3ify_examples.patch index 0e176e7..b369a01 100644 --- a/debian/patches/python3ify_examples.patch +++ b/debian/patches/python3ify_examples.patch @@ -5,16 +5,16 @@ Last-Update: 2020-03-24 --- ---- protobuf-3.11.4.orig/examples/add_person.py -+++ protobuf-3.11.4/examples/add_person.py +--- a/examples/add_person.py ++++ b/examples/add_person.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # See README.txt for information and build instructions. ---- protobuf-3.11.4.orig/examples/list_people.py -+++ protobuf-3.11.4/examples/list_people.py +--- a/examples/list_people.py ++++ b/examples/list_people.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 diff --git a/debian/patches/s390x.patch b/debian/patches/s390x.patch index 6f4dc3a..a6358c8 100644 --- a/debian/patches/s390x.patch +++ b/debian/patches/s390x.patch @@ -7,8 +7,7 @@ Description: Add support for s390x architecture. --- a/src/google/protobuf/stubs/platform_macros.h +++ b/src/google/protobuf/stubs/platform_macros.h -@@ -78,8 +78,15 @@ - #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 +@@ -79,6 +79,13 @@ #elif defined(__PPC__) #define GOOGLE_PROTOBUF_ARCH_PPC 1 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 @@ -22,4 +21,3 @@ Description: Add support for s390x architecture. #elif defined(__GNUC__) # if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)) // We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h - # elif defined(__clang__) diff --git a/debian/patches/series b/debian/patches/series index 1667f3e..bbea0ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ no_thirdparty.patch x32.patch 32bit.patch python3ify_examples.patch +no_errorprone.patch diff --git a/debian/patches/x32.patch b/debian/patches/x32.patch index f6a0437..f02a5ce 100644 --- a/debian/patches/x32.patch +++ b/debian/patches/x32.patch @@ -10,8 +10,8 @@ Last-Update: 2019-08-06 --- ---- protobuf-3.9.1.orig/ruby/ext/google/protobuf_c/wrap_memcpy.c -+++ protobuf-3.9.1/ruby/ext/google/protobuf_c/wrap_memcpy.c +--- a/ruby/ext/google/protobuf_c/wrap_memcpy.c ++++ b/ruby/ext/google/protobuf_c/wrap_memcpy.c @@ -38,7 +38,7 @@ // This wrapper is enabled by passing the linker flags -Wl,-wrap,memcpy in // extconf.rb. diff --git a/debian/rules b/debian/rules index ec9ecf5..31d649d 100755 --- a/debian/rules +++ b/debian/rules @@ -69,7 +69,7 @@ override_dh_auto_build-indep: dh_auto_build --indep # Java build - ant -f debian/java-build.xml jar + ant -f debian/java-build.xml jar jar-util override_dh_clean: $(RM) -rv gmock
diff --git a/debian/changelog b/debian/changelog index 40fffd9..131b1be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +protobuf (3.11.4-4.1) unstable; urgency=medium + + [ Olek Wojnar <olek@debian.org> ] + * Non-maintainer upload + * Allow building of protobuf-java-util (Closes: #958444) + * Refresh d/patches + * Add no_errorprone.patch since dependency not available in Debian + + -- Olek Wojnar <olek@debian.org> Wed, 22 Apr 2020 01:54:23 -0400 + protobuf (3.11.4-4) unstable; urgency=medium * Update Python version for self-tests (closes: #937327). diff --git a/debian/control b/debian/control index d5b38da..fa9cfaf 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,8 @@ Build-Depends-Indep: ant , default-jdk , maven-repo-helper + , libguava-java + , libgoogle-gson-java Standards-Version: 4.5.0 Homepage: https://github.com/google/protobuf/ #Vcs-Browser: https://anonscm.debian.org/cgit/pkg-protobuf/pkg-protobuf.git diff --git a/debian/java-build.xml b/debian/java-build.xml index db1b6f4..5c84f83 100644 --- a/debian/java-build.xml +++ b/debian/java-build.xml @@ -1,20 +1,32 @@ <project name="protobuf-java" default="jar" basedir=".."> <property name="srcdir" value="src" /> - <property name="javadir" value="java/core" /> - <property name="javasrcdir" value="${javadir}/src" /> - <property name="targetdir" value="${javadir}/target" /> - <property name="classesdir" value="${targetdir}/classes" /> - <property name="generateddir" value="${targetdir}/generated-sources" /> + <property name="javacoredir" value="java/core" /> + <property name="javautildir" value="java/util" /> + <property name="javacoresrcdir" value="${javacoredir}/src" /> + <property name="javautilsrcdir" value="${javautildir}/src" /> + <property name="coretargetdir" value="${javacoredir}/target" /> + <property name="utiltargetdir" value="${javautildir}/target" /> + <property name="coreclassesdir" value="${coretargetdir}/classes" /> + <property name="utilclassesdir" value="${utiltargetdir}/classes" /> + <property name="coregenerateddir" value="${coretargetdir}/generated-sources" /> + + <path id="util-classpath"> + <fileset dir="/usr/share/java/"> + <include name="gson.jar"/> + <include name="guava.jar"/> + </fileset> + </path> <target name="clean"> - <delete dir="${targetdir}"/> + <delete dir="${coretargetdir}"/> + <delete dir="${utiltargetdir}"/> </target> <target name="generate"> - <mkdir dir="${generateddir}" /> + <mkdir dir="${coregenerateddir}" /> <echo message="${srcdir}" /> <exec executable="${srcdir}/protoc"> - <arg value="--java_out=${generateddir}" /> + <arg value="--java_out=${coregenerateddir}" /> <arg value="--proto_path=${srcdir}" /> <arg value="${srcdir}/google/protobuf/any.proto" /> <arg value="${srcdir}/google/protobuf/api.proto" /> @@ -32,13 +44,25 @@ </target> <target name="compile" depends="generate"> - <mkdir dir="${classesdir}"/> - <javac srcdir="${generateddir}:${javasrcdir}/main/java" - destdir="${classesdir}" source="1.7" target="1.7" + <mkdir dir="${coreclassesdir}"/> + <javac srcdir="${coregenerateddir}:${javacoresrcdir}/main/java" + destdir="${coreclassesdir}" source="1.7" target="1.7" + includeantruntime="false" /> + </target> + + <target name="compile-util" depends="compile"> + <mkdir dir="${utilclassesdir}"/> + <javac srcdir="${coregenerateddir}:${javacoresrcdir}/main/java:${javautilsrcdir}/main/java" + destdir="${utilclassesdir}" source="1.7" target="1.7" + classpathref="util-classpath" includeantruntime="false" /> </target> <target name="jar" depends="compile"> - <jar destfile="${targetdir}/protobuf.jar" basedir="${classesdir}" /> + <jar destfile="${coretargetdir}/protobuf.jar" basedir="${coreclassesdir}" /> + </target> + + <target name="jar-util" depends="compile-util"> + <jar destfile="${utiltargetdir}/protobuf-util.jar" basedir="${utilclassesdir}" /> </target> </project> diff --git a/debian/libprotobuf-java.poms b/debian/libprotobuf-java.poms index c13a2b2..ef3c493 100644 --- a/debian/libprotobuf-java.poms +++ b/debian/libprotobuf-java.poms @@ -1 +1,2 @@ java/core/pom.xml --artifact=java/core/target/protobuf.jar --java-lib --no-parent --usj-name=protobuf +java/util/pom.xml --artifact=java/util/target/protobuf-util.jar --java-lib --no-parent --usj-name=protobuf-util diff --git a/debian/patches/no_errorprone.patch b/debian/patches/no_errorprone.patch new file mode 100644 index 0000000..c0ba993 --- /dev/null +++ b/debian/patches/no_errorprone.patch @@ -0,0 +1,161 @@ +Description: Remove dependency on errror-prone library + Library is not necessary and is not currently available in Debian. This patch + can be safely removed if the error-prone library is ever added to Debian and + that functionality is needed in protobuf. +Author: Olek Wojnar <olek@debian.org> +Last-Update: 2020-05-01 + +--- a/java/util/src/main/java/com/google/protobuf/util/Durations.java ++++ b/java/util/src/main/java/com/google/protobuf/util/Durations.java +@@ -42,7 +42,7 @@ + import static com.google.protobuf.util.Timestamps.NANOS_PER_MILLISECOND; + import static com.google.protobuf.util.Timestamps.NANOS_PER_SECOND; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Duration; + import java.text.ParseException; + import java.util.Comparator; +@@ -152,7 +152,7 @@ + * @throws IllegalArgumentException if {@code duration} is negative or invalid + * @throws NullPointerException if {@code duration} is {@code null} + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkNotNegative(Duration duration) { + checkValid(duration); + checkArgument(!isNegative(duration), "duration (%s) must not be negative", toString(duration)); +@@ -165,7 +165,7 @@ + * @throws IllegalArgumentException if {@code duration} is negative, {@code ZERO}, or invalid + * @throws NullPointerException if {@code duration} is {@code null} + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkPositive(Duration duration) { + checkValid(duration); + checkArgument( +@@ -176,7 +176,7 @@ + } + + /** Throws an {@link IllegalArgumentException} if the given {@link Duration} is not valid. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Duration checkValid(Duration duration) { + long seconds = duration.getSeconds(); + int nanos = duration.getNanos(); +--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java ++++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskTree.java +@@ -30,7 +30,7 @@ + + package com.google.protobuf.util; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Descriptors.Descriptor; + import com.google.protobuf.Descriptors.FieldDescriptor; + import com.google.protobuf.FieldMask; +@@ -96,7 +96,7 @@ + * exists, which will turn the tree node for "foo.bar" to a leaf node. Likewise, if the field path + * to add is a sub-path of an existing leaf node, nothing will be changed in the tree. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + FieldMaskTree addFieldPath(String path) { + String[] parts = path.split(FIELD_PATH_SEPARATOR_REGEX); + if (parts.length == 0) { +@@ -126,7 +126,7 @@ + } + + /** Merges all field paths in a FieldMask into this tree. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + FieldMaskTree mergeFromFieldMask(FieldMask mask) { + for (String path : mask.getPathsList()) { + addFieldPath(path); +--- a/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java ++++ b/java/util/src/main/java/com/google/protobuf/util/FieldMaskUtil.java +@@ -36,7 +36,7 @@ + import com.google.common.base.Joiner; + import com.google.common.base.Splitter; + import com.google.common.primitives.Ints; +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Descriptors.Descriptor; + import com.google.protobuf.Descriptors.FieldDescriptor; + import com.google.protobuf.FieldMask; +@@ -307,7 +307,7 @@ + * + * <p>If false, merge the source message field into the destination message field. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplaceMessageFields(boolean value) { + replaceMessageFields = value; + return this; +@@ -320,7 +320,7 @@ + * + * <p>If false, append elements from source repeated field to the destination repeated field. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplaceRepeatedFields(boolean value) { + replaceRepeatedFields = value; + return this; +@@ -337,7 +337,7 @@ + * field, and if the source field is unset, the default value of the source field is copied to + * the destination. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public MergeOptions setReplacePrimitiveFields(boolean value) { + replacePrimitiveFields = value; + return this; +--- a/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java ++++ b/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java +@@ -32,7 +32,7 @@ + + import com.google.common.base.Preconditions; + import com.google.common.io.BaseEncoding; +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.gson.Gson; + import com.google.gson.GsonBuilder; + import com.google.gson.JsonArray; +@@ -546,7 +546,7 @@ + * Adds a message type and all types defined in the same .proto file as well as all + * transitively imported .proto files to this {@link Builder}. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public Builder add(Descriptor messageType) { + if (types == null) { + throw new IllegalStateException("A TypeRegistry.Builder can only be used once."); +@@ -559,7 +559,7 @@ + * Adds message types and all types defined in the same .proto file as well as all + * transitively imported .proto files to this {@link Builder}. + */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public Builder add(Iterable<Descriptor> messageTypes) { + if (types == null) { + throw new IllegalStateException("A TypeRegistry.Builder can only be used once."); +--- a/java/util/src/main/java/com/google/protobuf/util/Timestamps.java ++++ b/java/util/src/main/java/com/google/protobuf/util/Timestamps.java +@@ -36,7 +36,7 @@ + import static com.google.common.math.LongMath.checkedMultiply; + import static com.google.common.math.LongMath.checkedSubtract; + +-import com.google.errorprone.annotations.CanIgnoreReturnValue; ++//import com.google.errorprone.annotations.CanIgnoreReturnValue; + import com.google.protobuf.Duration; + import com.google.protobuf.Timestamp; + import java.text.ParseException; +@@ -164,7 +164,7 @@ + } + + /** Throws an {@link IllegalArgumentException} if the given {@link Timestamp} is not valid. */ +- @CanIgnoreReturnValue ++// @CanIgnoreReturnValue + public static Timestamp checkValid(Timestamp timestamp) { + long seconds = timestamp.getSeconds(); + int nanos = timestamp.getNanos(); diff --git a/debian/patches/series b/debian/patches/series index 1667f3e..bbea0ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ no_thirdparty.patch x32.patch 32bit.patch python3ify_examples.patch +no_errorprone.patch diff --git a/debian/rules b/debian/rules index ec9ecf5..31d649d 100755 --- a/debian/rules +++ b/debian/rules @@ -69,7 +69,7 @@ override_dh_auto_build-indep: dh_auto_build --indep # Java build - ant -f debian/java-build.xml jar + ant -f debian/java-build.xml jar jar-util override_dh_clean: $(RM) -rv gmock