Bug#1039521: Summarizing my proposed changes about the Java part of protobuf

2023-06-29 Thread Pierre Gruet

Hello again,

Le 29/06/2023 à 21:22, László Böszörményi (GCS) a écrit :

On Thu, Jun 29, 2023 at 9:15 PM Pierre Gruet  wrote:

Le 29/06/2023 à 18:41, László Böszörményi (GCS) a écrit :

Do you have your proposed package somewhere? I would also like to
check it with the updated protobuf package before uploading.

You can find it in the public repo
 https://salsa.debian.org/pgt/protobuf

  Your package = genomicsdb but I guess it's in the med-team repo [1].

Cheers,
Laszlo/GCS
[1] https://salsa.debian.org/med-team/genomicsdb


Sorry, obviously I misread your request. Yes this is genomicsdb, located 
at [1]. You may get it and build it against protobuf with the changes I 
proposed and it should be OK!


Best,

--
Pierre


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1039521: Summarizing my proposed changes about the Java part of protobuf

2023-06-29 Thread GCS
On Thu, Jun 29, 2023 at 9:15 PM Pierre Gruet  wrote:
> Le 29/06/2023 à 18:41, László Böszörményi (GCS) a écrit :
> > Do you have your proposed package somewhere? I would also like to
> > check it with the updated protobuf package before uploading.
> You can find it in the public repo
> https://salsa.debian.org/pgt/protobuf
 Your package = genomicsdb but I guess it's in the med-team repo [1].

Cheers,
Laszlo/GCS
[1] https://salsa.debian.org/med-team/genomicsdb



Bug#1039521: Summarizing my proposed changes about the Java part of protobuf

2023-06-29 Thread Pierre Gruet

Hi Laszlo,

Thanks for looking at my proposal, I am glad you consider it fit!

Le 29/06/2023 à 18:41, László Böszörményi (GCS) a écrit :

Hi Pierre,

On Wed, Jun 28, 2023 at 4:39 PM Pierre Gruet  wrote:

- removing j2objc from the pom.xml so that rdeps don't look for this
Debian-unpackaged artifact (touches d/p/no_j2objc.patch);

  Thanks for all of your work on this! I see you added this as a patch,
but not included in the series file. Meaning it will not be applied.
It's just an oversight I guess. Other than that it looks good.


Sorry, indeed I provided you with an excerpt of a source debdiff, which 
might not be the most suitable way to do it.



Do you have your proposed package somewhere? I would also like to
check it with the updated protobuf package before uploading.



You can find it in the public repo
https://salsa.debian.org/pgt/protobuf
I initiated it with version 3.21.12-3 that is currently packaged, and 
made commits for each change I listed in my previous email. Hopefully 
this is more handy!
Despite what is in d/changelog, I did not intend to NMU, it was only a 
changelog entry to get a consistent package in order to run my tests 
locally.



Thanks,
Laszlo/GCS


Please tell me if I may do something else for you here.

Best,

--
Pierre


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1039521: Summarizing my proposed changes about the Java part of protobuf

2023-06-29 Thread GCS
Hi Pierre,

On Wed, Jun 28, 2023 at 4:39 PM Pierre Gruet  wrote:
> - removing j2objc from the pom.xml so that rdeps don't look for this
> Debian-unpackaged artifact (touches d/p/no_j2objc.patch);
 Thanks for all of your work on this! I see you added this as a patch,
but not included in the series file. Meaning it will not be applied.
It's just an oversight I guess. Other than that it looks good.
Do you have your proposed package somewhere? I would also like to
check it with the updated protobuf package before uploading.

Thanks,
Laszlo/GCS



Bug#1039521: Summarizing my proposed changes about the Java part of protobuf

2023-06-28 Thread Pierre Gruet

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.0 +0100
+++ protobuf-3.21.12/debian/control	2023-06-27 06:42:22.0 +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.0 +0100
+++ protobuf-3.21.12/debian/libprotobuf-java.classpath	2023-06-27 06:42:22.0 +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.0 +0100
+++ protobuf-3.21.12/debian/patches/no_j2objc.patch	2023-06-27 06:41:32.0 +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  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 @@
+   error_prone_annotations
+   2.5.1
+ 
+-
++
+ 
+   com.google.code.findbugs
+   jsr305
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.0 +0200
+++ protobuf-3.21.12/debian/patches/series	2023-06-27 06:41:55.0 +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.0 +0100
+++ protobuf-3.21.12/debian/patches/test_scope_for_junit.patch	2023-06-27 06:42:19.0 +0200
@@ -0,0 +1,10 @@
+--- a/java/util/pom.xml
 b/java/util/pom.xml
+@@ -50,6 +50,7 @@
+ 
+   junit
+   junit
++  test
+ 
+ 
+   org.mockito
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.0 +0200
+++ protobuf-3.21.12/debian/rules	2023-06-27 06:42:22.0 +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