Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Andreas Tille
Hi,

On Wed, Jun 17, 2020 at 02:12:09PM -0400, Olek Wojnar wrote:
> > That was easy. I have pushed my changes to "sudip" which now builds
> > only those two.
> 
> Great, thanks!

Yep.
 
> Good catch, thanks! The repo should be named google-api-client-java for
> consistency with the rest of the ecosystem. (And Debian Java policy)

Name fixed and uploaded to experimental.

Thanks to all who helped

  Andreas.

-- 
http://fam-tille.de



Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Olek Wojnar
Hi Sudip,

On Wed, Jun 17, 2020, 13:38 Sudip Mukherjee 
wrote:

>
> That was easy. I have pushed my changes to "sudip" which now builds
> only those two.
>

Great, thanks!

And, just noticed (after pushing) that the Vcs in d/control is wrong.
> It should be https://salsa.debian.org/java-team/google-api-java-client
> or the repo needs to be renamed.
>

Good catch, thanks! The repo should be named google-api-client-java for
consistency with the rest of the ecosystem. (And Debian Java policy)

-Olek

PS I suppose one could theoretically do google-api-java-client-java but I
think that's needlessly awkward and repetitive.


Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Sudip Mukherjee
On Wed, Jun 17, 2020 at 5:40 PM Olek Wojnar  wrote:
>
> On Wed, Jun 17, 2020 at 12:19 PM Andreas Tille  wrote:
>>
>> I have the feeling we are coming closer to a solution iteratively now
>> but there are some remaining errors unfortunately:
>
>
> If any of you have a moment, I recommend patching the main pom.xml to only 
> build the two modules that we need (google-api-client and 
> google-api-client-jackson2). That should vastly simplify things.

That was easy. I have pushed my changes to "sudip" which now builds
only those two.
And, just noticed (after pushing) that the Vcs in d/control is wrong.
It should be https://salsa.debian.org/java-team/google-api-java-client
or the repo needs to be renamed.


-- 
Regards
Sudip



Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Olek Wojnar
On Wed, Jun 17, 2020 at 12:19 PM Andreas Tille  wrote:

> I have the feeling we are coming closer to a solution iteratively now
> but there are some remaining errors unfortunately:
>

If any of you have a moment, I recommend patching the main pom.xml to only
build the two modules that we need (google-api-client and
google-api-client-jackson2). That should vastly simplify things.

-Olek


Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Andreas Tille
Hi Sudip,

On Wed, Jun 17, 2020 at 11:42:52AM +0100, Sudip Mukherjee wrote:
> 
> I have taken the liberty to push to "tmancill" branch and the issue

As I tried to express:  I wished you all would take the freedom to
simply push to the master branch which is perfectly fine for me. ;-)
Thanks a lot for providing some fix in any case!

> with "com.google.api.client.util" is now resolved. It needs to depend
> on "libgoogle-oauth-client-java" which is still in NEW.

I've a local repository and can deal with this.

> But, it now fails with:
> 
> google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java:[435,16]
> cannot find symbol
> [ERROR]   symbol:   method setResponseReturnRawInputStream(boolean)
> [ERROR]   location: variable httpRequest of type
> com.google.api.client.http.HttpRequest
> 
> And, indeed 
> https://salsa.debian.org/java-team/google-http-client-java/-/blob/master/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java
> is not having the method "setResponseReturnRawInputStream". And, it
> seems the packaged version of libgoogle-http-client-java in Debian is
> 1.27 and "setResponseReturnRawInputStream" was added in v1.29.0. So,
> we will need to update  libgoogle-http-client-java to 1.29.0 atleast.

I somehow ignored Olek's hint that we should rather start with version
1.27 to avoid issues with circular (and more) dependencies.  That's
why I downgraded the version in Git now and merged tmancill branch to
master. 

I have the feeling we are coming closer to a solution iteratively now
but there are some remaining errors unfortunately:


...
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ 
google-api-client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 27 source files to 
/build/google-api-client-java-1.27.1/google-api-client/target/test-classes
[INFO] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:
 Some input files use or override a deprecated API.
[INFO] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:
 Recompile with -Xlint:deprecation for details.
[INFO] -
[ERROR] COMPILATION ERROR : 
[INFO] -
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[29,38]
 package com.google.api.client.protobuf does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[182,43]
 package ErrorOutput does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[192,38]
 package ErrorOutput does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[228,39]
 package MockData does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[235,35]
 package MockData does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[244,39]
 package MockData does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[251,35]
 package MockData does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/CloudShellCredentialTest.java:[36,39]
 package com.google.api.client.json.gson does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecretsTest.java:[18,39]
 package com.google.api.client.json.gson does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[196,20]
 package ErrorOutput does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[207,25]
 package ErrorOutput does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[333,50]
 package MockData does not exist
[ERROR] 
/build/google-api-client-java-1.27.1/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java:[339,50]
 package MockData does not exist
[ERROR] 

Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Sudip Mukherjee
On Wed, Jun 17, 2020 at 9:13 AM Andreas Tille  wrote:
>
> Hi Tony,
>
> On Tue, Jun 16, 2020 at 09:34:20PM -0700, tony mancill wrote:
> >
> > I've pushed a "tmancill" branch to the Salsa repo that gets us further
> > along.

I have taken the liberty to push to "tmancill" branch and the issue
with "com.google.api.client.util" is now resolved. It needs to depend
on "libgoogle-oauth-client-java" which is still in NEW.
But, it now fails with:

google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java:[435,16]
cannot find symbol
[ERROR]   symbol:   method setResponseReturnRawInputStream(boolean)
[ERROR]   location: variable httpRequest of type
com.google.api.client.http.HttpRequest

And, indeed 
https://salsa.debian.org/java-team/google-http-client-java/-/blob/master/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java
is not having the method "setResponseReturnRawInputStream". And, it
seems the packaged version of libgoogle-http-client-java in Debian is
1.27 and "setResponseReturnRawInputStream" was added in v1.29.0. So,
we will need to update  libgoogle-http-client-java to 1.29.0 atleast.


-- 
Regards
Sudip



Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-17 Thread Andreas Tille
Hi Tony,

On Tue, Jun 16, 2020 at 09:34:20PM -0700, tony mancill wrote:
> 
> I've pushed a "tmancill" branch to the Salsa repo that gets us further
> along.

Thanks a lot for your great help.  I've merged your branch to master.
Feel free to push right to master in future since I feel unable to do
any changes creating any race condition. ;-)

>  At this point, the build is failing with this error:
> 
>package com.google.api.client.util does not exist
> 
> This Java package should be part of the google-http-java-client package.
> I'm looking into why it's missing now.

Your work is highly appreciated

 Andreas.

-- 
http://fam-tille.de



Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-16 Thread Olek Wojnar
Hi tony,

On Wed, Jun 17, 2020 at 12:39 AM tony mancill  wrote:

>
> I've pushed a "tmancill" branch to the Salsa repo that gets us further
>

Thanks!


> along.  At this point, the build is failing with this error:
>
>package com.google.api.client.util does not exist
>
> This Java package should be part of the google-http-java-client package.
> I'm looking into why it's missing now.
>

Strange. I don't think that's part of g-h-j-c but I could be wrong. In
related news, I just pushed oauth-client to NEW. Bootleg version available
on Salsa [1] in the meantime for your favorite local repos. :) I believe
that was the last api-client dependency [2] we were missing. ...until we
find the next one... ;)

Bedtime for me but I'll take a look at that missing .util in the morning if
you haven't figured it out by then. :)

Oh, just realized a potential problem! We need to package version 1.27.0,
not 1.30.9. Due to the dependency hell we're working with, that's the
version that lets us get everything to work "well enough." Once
opencensus and grpc-java are in, I think we'll be able to go through and
update many of these packages to newer versions. I'll bet this problem will
go away with the lower version.

-Olek

[1] https://salsa.debian.org/java-team/google-oauth-client-java
[2]
https://salsa.debian.org/bazel-team/meta/-/wikis/Workplan-Part-1#3-package-dependencies


Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-16 Thread tony mancill
On Tue, Jun 16, 2020 at 11:19:45AM +0200, Andreas Tille wrote:
> Hi Olek,
> 
> On Tue, Jun 16, 2020 at 05:01:37AM -0400, Olek Wojnar wrote:
> > 
> > Good question! Due to some dependency issues, the bom artifacts are not
> > packaged.
> 
> OK, that explains the issue ...
> 
> > But you should be able to just depend on the non-bom pom files.
> 
> ... but I'm to uneducated to implement your suggested solution.
> (Feel free to push and I keep on testing).

Hi Andreas,

I've pushed a "tmancill" branch to the Salsa repo that gets us further
along.  At this point, the build is failing with this error:

   package com.google.api.client.util does not exist

This Java package should be part of the google-http-java-client package.
I'm looking into why it's missing now.

Cheers,
tony


signature.asc
Description: PGP signature


Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-16 Thread Andreas Tille
Hi Olek,

On Tue, Jun 16, 2020 at 05:01:37AM -0400, Olek Wojnar wrote:
> 
> Good question! Due to some dependency issues, the bom artifacts are not
> packaged.

OK, that explains the issue ...

> But you should be able to just depend on the non-bom pom files.

... but I'm to uneducated to implement your suggested solution.
(Feel free to push and I keep on testing).

Kind regards

  Andreas.

-- 
http://fam-tille.de



Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-16 Thread Olek Wojnar
Hi Andreas,

On Tue, Jun 16, 2020 at 4:15 AM Andreas Tille  wrote:

> [ERROR] [ERROR] Some problems were encountered while processing the POMs:
> [ERROR] Non-resolvable import POM: Cannot access central (
> https://repo.maven.apache.org/maven2) in offline mode and the artifact
> com.google.http-client:google-http-client-bom:pom:debian has not been
> downloaded from it before. @ line 105, column 16
> [ERROR] Non-resolvable import POM: Cannot access central (
> https://repo.maven.apache.org/maven2) in offline mode and the artifact
> com.google.oauth-client:google-oauth-client-bom:pom:debian has not been
> downloaded from it before. @ line 112, column 16
>
> I have added libgoogle-http-client-java that is carrying the classes in
> question but it seems I need to do some more magic to make maven finding
> it.  It would be great if somebody would refresh my mind how to do this.
>

Good question! Due to some dependency issues, the bom artifacts are not
packaged. But you should be able to just depend on the non-bom pom files.

-Olek


Bug#959829: [covid-19] Help needed to finalise bazel predependency google-api-client-java

2020-06-16 Thread Andreas Tille
Hi,

I have injected some preliminary packaging for google-api-client-java
into salsa[1].  When trying to build I get:


...
   dh_auto_build
/usr/lib/jvm/default-java/bin/java -noverify -cp 
/usr/share/maven/boot/plexus-classworlds-2.x.jar -Dmaven.home=/usr/share/maven 
-Dmaven.multiModuleProjectDirectory=/build/google-api-client-java-1.30.9 
-Dclassworlds.conf=/etc/maven/m2-debian.conf 
org.codehaus.plexus.classworlds.launcher.Launcher 
-s/etc/maven/settings-debian.xml 
-Ddebian.dir=/build/google-api-client-java-1.30.9/debian 
-Dmaven.repo.local=/build/google-api-client-java-1.30.9/debian/maven-repo 
package -DskipTests -Dnotimestamp=true -Dlocale=en_US
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
com.google.inject.internal.cglib.core.$ReflectUtils$1 
(file:/usr/share/maven/lib/guice.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of 
com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Cannot access central 
(https://repo.maven.apache.org/maven2) in offline mode and the artifact 
com.google.http-client:google-http-client-bom:pom:debian has not been 
downloaded from it before. @ line 105, column 16
[ERROR] Non-resolvable import POM: Cannot access central 
(https://repo.maven.apache.org/maven2) in offline mode and the artifact 
com.google.oauth-client:google-oauth-client-bom:pom:debian has not been 
downloaded from it before. @ line 112, column 16
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.google.api-client:google-api-client-parent:1.30.9 
(/build/google-api-client-java-1.30.9/pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Cannot access central 
(https://repo.maven.apache.org/maven2) in offline mode and the artifact 
com.google.http-client:google-http-client-bom:pom:debian has not been 
downloaded from it before. @ line 105, column 16 -> [Help 2]
[ERROR] Non-resolvable import POM: Cannot access central 
(https://repo.maven.apache.org/maven2) in offline mode and the artifact 
com.google.oauth-client:google-oauth-client-bom:pom:debian has not been 
downloaded from it before. @ line 112, column 16 -> [Help 2]


I have added libgoogle-http-client-java that is carrying the classes in
question but it seems I need to do some more magic to make maven finding
it.  It would be great if somebody would refresh my mind how to do this.

Kind regards

Andreas.

[1] https://salsa.debian.org/java-team/google-api-client-java

-- 
http://fam-tille.de