Control: retitle -1 please rewrite the Java packaging to build rdeps Control: affects -1 src:genomicsdb
Hello,This is a summary email for this bug thread as I tested locally some changes to the packaging, so that rdeps relying on the /usr/share/java/protobuf-util.jar can build and run.
These changes amount to:- using javahelper during the build to provide a suitable classpath for protobuf-util.jar (touching d/control, d/libprotobuf-java.classpath, d/rules); - removing j2objc from the pom.xml so that rdeps don't look for this Debian-unpackaged artifact (touches d/p/no_j2objc.patch); - adding a "test" scope for junit in the pom.xml so that no rdep looks for junit while building (touches d/p/series, d/p/test_scope_for_junit.patch).
All this is in the attached patch, which allows one to build the new upstream version of genomicsdb. This package is thus affected by the present bug.
I would be pleased to provide more information or to help with uploading the proposed fix if you wish.
Best, -- Pierre
diff -Nru protobuf-3.21.12/debian/control protobuf-3.21.12/debian/control --- protobuf-3.21.12/debian/control 2022-12-04 13:49:06.000000000 +0100 +++ protobuf-3.21.12/debian/control 2023-06-27 06:42:22.000000000 +0200 @@ -29,6 +29,7 @@ # Java ant , default-jdk + , javahelper , maven-repo-helper , libguava-java , libgoogle-gson-java diff -Nru protobuf-3.21.12/debian/libprotobuf-java.classpath protobuf-3.21.12/debian/libprotobuf-java.classpath --- protobuf-3.21.12/debian/libprotobuf-java.classpath 1970-01-01 01:00:00.000000000 +0100 +++ protobuf-3.21.12/debian/libprotobuf-java.classpath 2023-06-27 06:42:22.000000000 +0200 @@ -0,0 +1 @@ +usr/share/java/protobuf-util.jar /usr/share/java/gson.jar /usr/share/java/guava.jar /usr/share/java/protobuf.jar diff -Nru protobuf-3.21.12/debian/patches/no_j2objc.patch protobuf-3.21.12/debian/patches/no_j2objc.patch --- protobuf-3.21.12/debian/patches/no_j2objc.patch 2022-03-11 01:28:07.000000000 +0100 +++ protobuf-3.21.12/debian/patches/no_j2objc.patch 2023-06-27 06:41:32.000000000 +0200 @@ -8,7 +8,7 @@ --- a/java/util/src/main/java/com/google/protobuf/util/Timestamps.java +++ b/java/util/src/main/java/com/google/protobuf/util/Timestamps.java -@@ -38,7 +38,7 @@ import static com.google.common.math.Lon +@@ -38,7 +38,7 @@ //import com.google.errorprone.annotations.CanIgnoreReturnValue; //import com.google.errorprone.annotations.CompileTimeConstant; @@ -17,7 +17,7 @@ import com.google.protobuf.Duration; import com.google.protobuf.Timestamp; import java.io.Serializable; -@@ -338,7 +338,6 @@ public final class Timestamps { +@@ -338,7 +338,6 @@ * @throws IllegalArgumentException if the year is before 1 CE or after 9999 CE */ @SuppressWarnings("GoodTime") // this is a legacy conversion API @@ -25,3 +25,19 @@ public static Timestamp fromDate(Date date) { if (date instanceof java.sql.Timestamp) { java.sql.Timestamp sqlTimestamp = (java.sql.Timestamp) date; +--- a/java/util/pom.xml ++++ b/java/util/pom.xml +@@ -27,11 +27,11 @@ + <artifactId>error_prone_annotations</artifactId> + <version>2.5.1</version> + </dependency> +- <dependency> ++ <!--<dependency> + <groupId>com.google.j2objc</groupId> + <artifactId>j2objc-annotations</artifactId> + <version>1.3</version> +- </dependency> ++ </dependency>--> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> diff -Nru protobuf-3.21.12/debian/patches/series protobuf-3.21.12/debian/patches/series --- protobuf-3.21.12/debian/patches/series 2023-04-07 20:12:46.000000000 +0200 +++ protobuf-3.21.12/debian/patches/series 2023-06-27 06:41:55.000000000 +0200 @@ -16,3 +16,4 @@ build_32_bit_tests.patch fix_C++_32bit_tests.patch fix_Python_32bit_tests.patch +test_scope_for_junit.patch diff -Nru protobuf-3.21.12/debian/patches/test_scope_for_junit.patch protobuf-3.21.12/debian/patches/test_scope_for_junit.patch --- protobuf-3.21.12/debian/patches/test_scope_for_junit.patch 1970-01-01 01:00:00.000000000 +0100 +++ protobuf-3.21.12/debian/patches/test_scope_for_junit.patch 2023-06-27 06:42:19.000000000 +0200 @@ -0,0 +1,10 @@ +--- a/java/util/pom.xml ++++ b/java/util/pom.xml +@@ -50,6 +50,7 @@ + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> ++ <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> diff -Nru protobuf-3.21.12/debian/rules protobuf-3.21.12/debian/rules --- protobuf-3.21.12/debian/rules 2023-04-09 07:50:55.000000000 +0200 +++ protobuf-3.21.12/debian/rules 2023-06-27 06:42:22.000000000 +0200 @@ -20,9 +20,9 @@ %: ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x hppa ppc64 riscv64 sh4 sparc64 x32)) - dh $@ --with autoreconf,elpa + dh $@ --with autoreconf,elpa,javahelper else - dh $@ --with autoreconf -Nelpa-protobuf-mode + dh $@ --with autoreconf,javahelper -Nelpa-protobuf-mode endif ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
OpenPGP_signature
Description: OpenPGP digital signature