[Git][java-team/grpc-java][master] Initial packaging
Olek Wojnar
gitlab at salsa.debian.org
Tue Jul 14 19:53:32 BST 2020
Olek Wojnar pushed to branch master at Debian Java Maintainers / grpc-java
Commits:
1a65798e by Olek Wojnar at 2020-07-14T14:52:45-04:00
Initial packaging
- - - - -
22 changed files:
- + debian/changelog
- + debian/control
- + debian/copyright
- + debian/grpc_java_plugin.1
- + debian/libgrpc-java.docs
- + debian/libgrpc-java.examples
- + debian/libgrpc-java.poms
- + debian/maven.ignoreRules
- + debian/maven.properties
- + debian/maven.rules
- + debian/patches/build-plugin.patch
- + debian/patches/fix-gradle-build.patch
- + debian/patches/python3.patch
- + debian/patches/series
- + debian/protobuf-compiler-grpc-java-plugin.docs
- + debian/protobuf-compiler-grpc-java-plugin.install
- + debian/protobuf-compiler-grpc-java-plugin.lintian-overrides
- + debian/protobuf-compiler-grpc-java-plugin.manpages
- + debian/rules
- + debian/source/format
- + debian/upstream/metadata
- + debian/watch
Changes:
=====================================
debian/changelog
=====================================
@@ -0,0 +1,5 @@
+grpc-java (1.20.0+ds-1) unstable; urgency=medium
+
+ * Initial release (Closes: #959837)
+
+ -- Olek Wojnar <olek at debian.org> Sun, 19 Apr 2020 22:55:16 -0400
=====================================
debian/control
=====================================
@@ -0,0 +1,62 @@
+Source: grpc-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Olek Wojnar <olek at debian.org>,
+ Andreas Tille <tille at debian.org>,
+Build-Depends: debhelper-compat (= 13),
+ default-jdk,
+ gem2deb,
+ gradle-apt-plugin,
+ gradle-debian-helper,
+ gradle-plugin-protobuf,
+ javahelper,
+ jdupes,
+ libc-ares-dev,
+ libgeronimo-annotation-1.3-spec-java,
+ libgflags-dev,
+ libgoogle-perftools-dev,
+ libgradle-plugins-java,
+ libgtest-dev,
+ libguava-java,
+ libjacoco-java,
+ libjsr305-java,
+ libprotobuf-dev,
+ libprotobuf-java,
+ libprotoc-dev (>= 3.11.4~),
+ libssl-dev,
+ maven-repo-helper,
+ protobuf-compiler (>= 3.11.4~),
+ protobuf-compiler-grpc,
+ python3,
+ ruby-google-protobuf (>= 3.9.1~),
+ ruby-googleapis-common-protos-types,
+ ruby-googleauth (>= 0.5.1~),
+ ruby-rspec,
+ ruby-simplecov,
+ zlib1g-dev,
+Standards-Version: 4.5.0
+Rules-Requires-Root: no
+Vcs-Browser: https://salsa.debian.org/java-team/grpc-java
+Vcs-Git: https://salsa.debian.org/java-team/grpc-java.git
+Homepage: https://github.com/grpc/grpc-java
+
+Package: libgrpc-java
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
+Description: Java gRPC implementation, HTTP/2 based RPC
+ gRPC-Java works with JDK 7. gRPC-Java clients are supported on Android API
+ levels 14 and up (Ice Cream Sandwich and later).
+
+Package: protobuf-compiler-grpc-java-plugin
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: high performance general RPC framework - protobuf Java plugin
+ A modern, open source remote procedure call (RPC) framework that can run
+ anywhere. It enables client and server applications to communicate
+ transparently, and makes it easier to build connected systems.
+ .
+ This package provides the Java plugin needed for compiling gRPC service
+ definitions with the protobuf compiler.
=====================================
debian/copyright
=====================================
@@ -0,0 +1,41 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: grpc-java
+Upstream-Contact: grpc-io at googlegroups.com
+Source: https://github.com/grpc/grpc-java
+Files-Excluded: gradlew* gradle examples/gradlew* examples/gradle
+Comment: Exclude Gradle wrapper (not needed)
+
+Files: *
+Copyright: 2014-2019 The gRPC Authors
+License: Apache-2.0
+
+Files: okhttp/third_party/*
+Copyright: 2011-2012 The Android Open Source Project
+ 2012-2014 Square, Inc.
+ 2013 Twitter, Inc.
+License: Apache-2.0
+
+Files: xds/third_party/envoy/NOTICE
+ xds/third_party/envoy/src/*
+Copyright: 2016-2018 Envoy Project Authors
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2020 Olek Wojnar <olek at debian.org>
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ https://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache version 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
=====================================
debian/grpc_java_plugin.1
=====================================
@@ -0,0 +1,28 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" (C) Copyright 2020 Olek Wojnar <olek at debian.org>,
+.\"
+.TH GRPC_JAVA_PLUGIN 1 "June 21 2020"
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+grpc_java_plugin \- Java plugin for gRPC
+.SH SYNOPSIS
+.B grpc_java_plugin
+.SH DESCRIPTION
+This manual page documents the
+.B grpc_java_plugin
+program.
+.PP
+\fBgrpc_java_plugin\fP is a plugin to allow Java gRPC code.
+.SH OPTIONS
+None.
+.br
=====================================
debian/libgrpc-java.docs
=====================================
@@ -0,0 +1 @@
+xds/third_party/envoy/NOTICE
=====================================
debian/libgrpc-java.examples
=====================================
@@ -0,0 +1 @@
+examples/*
=====================================
debian/libgrpc-java.poms
=====================================
@@ -0,0 +1 @@
+context/build/debian/grpc-context.pom --java-lib --artifact=context/build/libs/*.jar
=====================================
debian/maven.ignoreRules
=====================================
@@ -0,0 +1,10 @@
+ru.vyarus gradle-animalsniffer-plugin
+net.ltgt.gradle gradle-errorprone-plugin
+com.github.ben-manes gradle-versions-plugin
+gradle.plugin.com.github.sherter.google-java-format google-java-format-gradle-plugin
+me.champeau.gradle jmh-gradle-plugin
+gradle.plugin.io.morethan.jmhreport gradle-jmh-report
+
+#com.google.guava guava-testlib
+#com.google.truth truth
+#junit junit
=====================================
debian/maven.properties
=====================================
@@ -0,0 +1,7 @@
+project.build.sourceEncoding=UTF-8
+maven.test.skip=true
+maven.compiler.source=1.7
+maven.compiler.target=1.7
+maven.compiler.verbose=true
+org.slf4j.simpleLogger.defaultLogLevel=debug
+trimStackTrace=false
=====================================
debian/maven.rules
=====================================
@@ -0,0 +1 @@
+s/com.google.protobuf/ws.antonov.gradle.plugins/ s/protobuf-gradle-plugin/gradle-plugin-protobuf/ * s/.*/debian/ * *
=====================================
debian/patches/build-plugin.patch
=====================================
@@ -0,0 +1,34 @@
+Description: Use autotools to build C++ plugin since Gradle is a hot mess
+Author: Olek Wojnar <olek at debian.org>
+Last-Update: 2020-06-19
+
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,1 @@
++SUBDIRS = compiler/
+--- /dev/null
++++ b/compiler/Makefile.am
+@@ -0,0 +1,2 @@
++SUBDIRS = src/java_plugin/cpp/
++dist_doc_DATA = README.md
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,11 @@
++AC_INIT([protobuf-compiler-grpc-java-plugin], [1.20.0], [grpc-io at googlegroups.com])
++AM_INIT_AUTOMAKE([-Wall -Werror foreign])
++AC_PROG_CXX
++AC_CONFIG_HEADERS([config.h])
++AC_CONFIG_FILES([
++ Makefile
++ compiler/Makefile
++ compiler/src/java_plugin/cpp/Makefile
++])
++AC_OUTPUT
++
+--- /dev/null
++++ b/compiler/src/java_plugin/cpp/Makefile.am
+@@ -0,0 +1,4 @@
++bin_PROGRAMS = grpc_java_plugin
++include_HEADERS = java_generator.h
++grpc_java_plugin_SOURCES = java_plugin.cpp java_generator.cpp
++grpc_java_plugin_LDADD = -lprotobuf -lprotoc -lpthread
=====================================
debian/patches/fix-gradle-build.patch
=====================================
@@ -0,0 +1,696 @@
+Description: Allow Gradle to correctly build this package
+Author: Olek Wojnar <olek at debian.org>
+Last-Update: 2020-06-18
+
+--- a/settings.gradle
++++ b/settings.gradle
+@@ -1,54 +1,4 @@
+ rootProject.name = "grpc"
+-include ":grpc-core"
+ include ":grpc-context"
+-include ":grpc-stub"
+-include ":grpc-auth"
+-include ":grpc-okhttp"
+-include ":grpc-protobuf"
+-include ":grpc-protobuf-lite"
+-include ":grpc-protobuf-nano"
+-include ":grpc-netty"
+-include ":grpc-netty-shaded"
+-include ":grpc-grpclb"
+-include ":grpc-testing"
+-include ":grpc-testing-proto"
+-include ":grpc-interop-testing"
+-include ":grpc-gae-interop-testing-jdk8"
+-include ":grpc-all"
+-include ":grpc-alts"
+-include ":grpc-benchmarks"
+-include ":grpc-services"
+-include ":grpc-xds"
+-include ":grpc-bom"
+
+-project(':grpc-core').projectDir = "$rootDir/core" as File
+ project(':grpc-context').projectDir = "$rootDir/context" as File
+-project(':grpc-stub').projectDir = "$rootDir/stub" as File
+-project(':grpc-auth').projectDir = "$rootDir/auth" as File
+-project(':grpc-okhttp').projectDir = "$rootDir/okhttp" as File
+-project(':grpc-protobuf').projectDir = "$rootDir/protobuf" as File
+-project(':grpc-protobuf-lite').projectDir = "$rootDir/protobuf-lite" as File
+-project(':grpc-protobuf-nano').projectDir = "$rootDir/protobuf-nano" as File
+-project(':grpc-netty').projectDir = "$rootDir/netty" as File
+-project(':grpc-netty-shaded').projectDir = "$rootDir/netty/shaded" as File
+-project(':grpc-grpclb').projectDir = "$rootDir/grpclb" as File
+-project(':grpc-testing').projectDir = "$rootDir/testing" as File
+-project(':grpc-testing-proto').projectDir = "$rootDir/testing-proto" as File
+-project(':grpc-interop-testing').projectDir = "$rootDir/interop-testing" as File
+-project(':grpc-gae-interop-testing-jdk8').projectDir = "$rootDir/gae-interop-testing/gae-jdk8" as File
+-project(':grpc-all').projectDir = "$rootDir/all" as File
+-project(':grpc-alts').projectDir = "$rootDir/alts" as File
+-project(':grpc-benchmarks').projectDir = "$rootDir/benchmarks" as File
+-project(':grpc-services').projectDir = "$rootDir/services" as File
+-project(':grpc-xds').projectDir = "$rootDir/xds" as File
+-project(':grpc-bom').projectDir = "$rootDir/bom" as File
+-
+-if (settings.hasProperty('skipCodegen') && skipCodegen.toBoolean()) {
+- println '*** Skipping the build of codegen and compilation of proto files because skipCodegen=true'
+-} else {
+- include ":grpc-compiler"
+- project(':grpc-compiler').projectDir = "$rootDir/compiler" as File
+-}
+-
+-// Gradle 5.0 changed the behavior of publishing block, use new stable behavior
+-enableFeaturePreview('STABLE_PUBLISHING')
+--- a/build.gradle
++++ b/build.gradle
+@@ -3,18 +3,8 @@
+ mavenLocal()
+ maven { url "https://plugins.gradle.org/m2/" }
+ }
+- dependencies {
+- classpath "com.diffplug.spotless:spotless-plugin-gradle:3.13.0"
+- classpath 'com.google.gradle:osdetector-gradle-plugin:1.4.0'
+- classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.4.5'
+- classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.6'
+- classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.5"
+- classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.2.5'
+- }
+ }
+
+-import net.ltgt.gradle.errorprone.CheckSeverity
+-
+ subprojects {
+ apply plugin: "checkstyle"
+ apply plugin: "java"
+@@ -24,30 +14,6 @@
+ apply plugin: "signing"
+ apply plugin: "jacoco"
+
+- apply plugin: "me.champeau.gradle.jmh"
+- apply plugin: "com.google.osdetector"
+- // The plugin only has an effect if a signature is specified
+- apply plugin: "ru.vyarus.animalsniffer"
+-
+- apply plugin: "net.ltgt.errorprone"
+- if (rootProject.properties.get('errorProne', true)) {
+- dependencies {
+- errorprone 'com.google.errorprone:error_prone_core:2.3.2'
+- errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
+-
+- annotationProcessor 'com.google.guava:guava-beta-checker:1.0'
+- }
+- } else {
+- // Disable Error Prone
+- allprojects {
+- afterEvaluate { project ->
+- project.tasks.withType(JavaCompile) {
+- options.errorprone.enabled = false
+- }
+- }
+- }
+- }
+-
+ group = "io.grpc"
+ version = "1.20.0" // CURRENT_GRPC_VERSION
+
+@@ -63,7 +29,6 @@
+ [
+ compileJava,
+ compileTestJava,
+- compileJmhJava
+ ].each() {
+ it.options.compilerArgs += [
+ "-Xlint:all",
+@@ -83,7 +48,6 @@
+ "-Xlint:-serial"
+ ]
+ // LinkedList doesn't hurt much in tests and has lots of usages
+- options.errorprone.check("JdkObsolete", CheckSeverity.OFF)
+ }
+
+ jar.manifest {
+@@ -103,7 +67,7 @@
+ }
+
+ ext {
+- def exeSuffix = osdetector.os == 'windows' ? ".exe" : ""
++ def exeSuffix = ""
+ protocPluginBaseName = 'protoc-gen-grpc-java'
+ javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"
+
+@@ -115,80 +79,7 @@
+ protobufNanoVersion = '3.0.0-alpha-5'
+ opencensusVersion = '0.19.2'
+
+- configureProtoCompilation = {
+- String generatedSourcePath = "${projectDir}/src/generated"
+- project.apply plugin: 'com.google.protobuf'
+- project.protobuf {
+- protoc {
+- if (project.hasProperty('protoc')) {
+- path = project.protoc
+- } else {
+- artifact = "com.google.protobuf:protoc:${protocVersion}"
+- }
+- }
+- generateProtoTasks {
+- all().each { task ->
+- // Recompile protos when build.gradle has been changed, because
+- // it's possible the version of protoc has been changed.
+- task.inputs.file "${rootProject.projectDir}/build.gradle"
+- }
+- }
+- }
+- if (rootProject.childProjects.containsKey('grpc-compiler')) {
+- // Only when the codegen is built along with the project, will we be able to run
+- // the grpc code generator.
+- project.protobuf {
+- plugins { grpc { path = javaPluginPath } }
+- generateProtoTasks {
+- all().each { task ->
+- project["syncGeneratedSources${task.sourceSet.name}"].dependsOn task
+-
+- task.dependsOn ':grpc-compiler:java_pluginExecutable'
+- // Recompile protos when the codegen has been changed
+- task.inputs.file javaPluginPath
+- task.plugins { grpc { option 'noversion' } }
+- }
+- }
+- }
+-
+- task syncGeneratedSources { }
+- sourceSets.all { sourceSet ->
+- task "syncGeneratedSources${sourceSet.name}"(type: Sync) {
+- from "$buildDir/generated/source/proto/${sourceSet.name}/grpc"
+- into "$generatedSourcePath/${sourceSet.name}/grpc"
+- }
+- syncGeneratedSources.dependsOn "syncGeneratedSources${sourceSet.name}"
+- }
+- // Re-sync as part of a normal build, to avoid forgetting to run the sync
+- assemble.dependsOn syncGeneratedSources
+- } else {
+- // Otherwise, we just use the checked-in generated code.
+- project.sourceSets {
+- main { java { srcDir "${generatedSourcePath}/main/grpc" } }
+- test { java { srcDir "${generatedSourcePath}/test/grpc" } }
+- }
+- }
+-
+- [
+- compileJava,
+- compileTestJava,
+- compileJmhJava
+- ].each() {
+- // Protobuf-generated code produces some warnings.
+- // https://github.com/google/protobuf/issues/2718
+- it.options.compilerArgs += [
+- "-Xlint:-cast",
+- ]
+- it.options.errorprone.excludedPaths = ".*/src/generated/[^/]+/java/.*" +
+- "|.*/build/generated/source/proto/[^/]+/java/.*"
+- }
+- }
+-
+ def epoll_suffix = "";
+- if (osdetector.classifier in ["linux-x86_64"]) {
+- // The native code is only pre-compiled on certain platforms.
+- epoll_suffix = ":" + osdetector.classifier
+- }
+ libraries = [
+ android_annotations: "com.google.android:annotations:4.1.1.4",
+ animalsniffer_annotations: "org.codehaus.mojo:animal-sniffer-annotations:1.17",
+@@ -270,8 +161,6 @@
+ // Configuration for modules that use Jetty ALPN agent
+ alpnagent libraries.jetty_alpn_agent
+
+- jmh 'org.openjdk.jmh:jmh-core:1.19',
+- 'org.openjdk.jmh:jmh-generator-bytecode:1.19'
+ }
+
+ // Disable JavaDoc doclint on Java 8. It's annoying.
+@@ -294,40 +183,6 @@
+
+ jacoco { toolVersion = "0.8.2" }
+
+- checkstyle {
+- configDir = file("$rootDir/buildscripts")
+- toolVersion = "6.17"
+- ignoreFailures = false
+- if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
+- ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()
+- }
+- }
+-
+- checkstyleMain {
+- source = fileTree(dir: "src/main", include: "**/*.java")
+- }
+-
+- checkstyleTest {
+- source = fileTree(dir: "src/test", include: "**/*.java")
+- }
+-
+- // invoke jmh on a single benchmark class like so:
+- // ./gradlew -PjmhIncludeSingleClass=StatsTraceContextBenchmark clean :grpc-core:jmh
+- jmh {
+- warmupIterations = 10
+- iterations = 10
+- fork = 1
+- // None of our benchmarks need the tests, and we have pseudo-circular
+- // dependencies that break when including them. (context's testCompile
+- // depends on core; core's testCompile depends on testing)
+- includeTests = false
+- if (project.hasProperty('jmhIncludeSingleClass')) {
+- include = [
+- project.property('jmhIncludeSingleClass')
+- ]
+- }
+- }
+-
+ task javadocJar(type: Jar) {
+ classifier = 'javadoc'
+ from javadoc
+@@ -338,102 +193,6 @@
+ from sourceSets.main.allSource
+ }
+
+- publishing {
+- publications {
+- // do not use mavenJava, as java plugin will modify it via "magic"
+- maven(MavenPublication) {
+- if (project.name != 'grpc-netty-shaded') {
+- from components.java
+- }
+-
+- artifact javadocJar
+- artifact sourcesJar
+-
+- pom {
+- name = project.group + ":" + project.name
+- url = 'https://github.com/grpc/grpc-java'
+- afterEvaluate {
+- // description is not available until evaluated.
+- description = project.description
+- }
+-
+- scm {
+- connection = 'scm:git:https://github.com/grpc/grpc-java.git'
+- developerConnection = 'scm:git:git at github.com:grpc/grpc-java.git'
+- url = 'https://github.com/grpc/grpc-java'
+- }
+-
+- licenses {
+- license {
+- name = 'Apache 2.0'
+- url = 'https://opensource.org/licenses/Apache-2.0'
+- }
+- }
+-
+- developers {
+- developer {
+- id = "grpc.io"
+- name = "gRPC Contributors"
+- email = "grpc-io at googlegroups.com"
+- url = "https://grpc.io/"
+- organization = "gRPC Authors"
+- organizationUrl = "https://www.google.com"
+- }
+- }
+-
+- withXml {
+- if (!(project.name in
+- [
+- "grpc-stub",
+- "grpc-protobuf",
+- "grpc-protobuf-lite",
+- "grpc-protobuf-nano"
+- ])) {
+- asNode().dependencies.'*'.findAll() { dep ->
+- dep.artifactId.text() == 'grpc-core'
+- }.each() { core ->
+- core.version*.value = "[" + core.version.text() + "]"
+- }
+- }
+- }
+- }
+- }
+- }
+- repositories {
+- maven {
+- if (rootProject.hasProperty('repositoryDir')) {
+- url = new File(rootProject.repositoryDir).toURI()
+- } else {
+- String stagingUrl
+- if (rootProject.hasProperty('repositoryId')) {
+- stagingUrl = 'https://oss.sonatype.org/service/local/staging/deployByRepositoryId/' +
+- rootProject.repositoryId
+- } else {
+- stagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
+- }
+- credentials {
+- if (rootProject.hasProperty('ossrhUsername') && rootProject.hasProperty('ossrhPassword')) {
+- username = rootProject.ossrhUsername
+- password = rootProject.ossrhPassword
+- }
+- }
+- def releaseUrl = stagingUrl
+- def snapshotUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
+- url = version.endsWith('SNAPSHOT') ? snapshotUrl : releaseUrl
+- }
+- }
+- }
+- }
+-
+- signing {
+- required false
+- sign publishing.publications.maven
+- }
+-
+- [publishMavenPublicationToMavenRepository, publishMavenPublicationToMavenLocal]*.onlyIf {
+- !name.contains("grpc-gae-interop-testing") && !name.contains("grpc-xds")
+- }
+-
+ // At a test failure, log the stack trace to the console so that we don't
+ // have to open the HTML in a browser.
+ test {
+@@ -451,80 +210,5 @@
+ def baselineGrpcVersion = '1.6.1'
+ def publicApiSubprojects = [
+ // TODO: uncomment after grpc-alts, grpc-bom artifact is published.
+- // ':grpc-alts',
+- ':grpc-auth',
+- //':grpc-bom',
+ ':grpc-context',
+- ':grpc-core',
+- ':grpc-grpclb',
+- ':grpc-netty',
+- ':grpc-okhttp',
+- ':grpc-protobuf',
+- ':grpc-protobuf-lite',
+- ':grpc-protobuf-nano',
+- ':grpc-stub',
+- ':grpc-testing',
+ ]
+-
+-publicApiSubprojects.each { name ->
+- project(":$name") {
+- apply plugin: 'me.champeau.gradle.japicmp'
+-
+- // Get the baseline version's jar for this subproject
+- File baselineArtifact = null
+- // Use a detached configuration, otherwise the current version's jar will take precedence
+- // over the baseline jar.
+- // A necessary hack, the intuitive thing does NOT work:
+- // https://discuss.gradle.org/t/is-the-default-configuration-leaking-into-independent-configurations/2088/6
+- def oldGroup = project.group
+- try {
+- project.group = 'virtual_group_for_japicmp'
+- String depModule = "io.grpc:${project.name}:${baselineGrpcVersion}@jar"
+- String depJar = "${project.name}-${baselineGrpcVersion}.jar"
+- Configuration configuration = configurations.detachedConfiguration(
+- dependencies.create(depModule)
+- )
+- baselineArtifact = files(configuration.files).filter {
+- it.name.equals(depJar)
+- }.singleFile
+- } finally {
+- project.group = oldGroup
+- }
+-
+- // Add a japicmp task that compares the current .jar with baseline .jar
+- task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: jar) {
+- oldClasspath = files(baselineArtifact)
+- newClasspath = files(jar.archivePath)
+- onlyBinaryIncompatibleModified = false
+- // Be quiet about things that did not change
+- onlyModified = true
+- // This task should fail if there are incompatible changes
+- failOnModification = true
+- ignoreMissingClasses = true
+- htmlOutputFile = file("$buildDir/reports/japi.html")
+-
+- packageExcludes = ['io.grpc.internal']
+-
+- // Also break on source incompatible changes, not just binary.
+- // Eg adding abstract method to public class.
+- // TODO(zpencer): enable after japicmp-gradle-plugin/pull/14
+- // breakOnSourceIncompatibility = true
+-
+- // Ignore any classes or methods marked @ExperimentalApi
+- // TODO(zpencer): enable after japicmp-gradle-plugin/pull/15
+- // annotationExcludes = ['@io.grpc.ExperimentalApi']
+- }
+- }
+-}
+-
+-// format checkers
+-apply plugin: "com.diffplug.gradle.spotless"
+-apply plugin: 'groovy'
+-spotless {
+- groovyGradle {
+- target '**/*.gradle'
+- greclipse()
+- indentWithSpaces()
+- paddedCell()
+- }
+-}
+--- a/context/build.gradle
++++ b/context/build.gradle
+@@ -2,6 +2,4 @@
+
+ dependencies {
+ testCompile libraries.jsr305
+- signature "org.codehaus.mojo.signature:java17:1.0 at signature"
+- signature "net.sf.androidscents.signature:android-api-level-14:4.0_r4 at signature"
+ }
+--- a/compiler/build.gradle
++++ b/compiler/build.gradle
+@@ -1,5 +1,4 @@
+ apply plugin: "cpp"
+-apply plugin: "com.google.protobuf"
+
+ description = 'The protoc plugin for gRPC Java'
+
+@@ -9,7 +8,6 @@
+ url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
+ mavenLocal()
+ }
+- dependencies { classpath libraries.protobuf_plugin }
+ }
+
+ def artifactStagingPath = "$buildDir/artifacts" as File
+@@ -34,8 +32,8 @@
+ }
+ }
+
+-def String arch = rootProject.hasProperty('targetArch') ? rootProject.targetArch : osdetector.arch
+-def boolean vcDisable = rootProject.hasProperty('vcDisable') ? rootProject.vcDisable : false
++def String arch = (System.env.DEB_TARGET_GNU_CPU != null) ? System.env.DEB_TARGET_GNU_CPU : System.env.DEB_HOST_GNU_CPU
++def boolean vcDisable = true
+ def boolean usingVisualCpp // Whether VisualCpp is actually available and selected
+
+ model {
+@@ -91,21 +89,12 @@
+ cppCompiler.args "--std=c++0x"
+ addEnvArgs("CXXFLAGS", cppCompiler.args)
+ addEnvArgs("CPPFLAGS", cppCompiler.args)
+- if (osdetector.os == "osx") {
+- cppCompiler.args "-mmacosx-version-min=10.7", "-stdlib=libc++"
+- addLibraryIfNotLinked('protoc', linker.args)
+- addLibraryIfNotLinked('protobuf', linker.args)
+- } else if (osdetector.os == "windows") {
+- linker.args "-static", "-lprotoc", "-lprotobuf", "-static-libgcc", "-static-libstdc++",
+- "-s"
+- } else {
+- // Link protoc, protobuf, libgcc and libstdc++ statically.
+- // Link other (system) libraries dynamically.
+- // Clang under OSX doesn't support these options.
+- linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc",
+- "-static-libstdc++",
+- "-Wl,-Bdynamic", "-lpthread", "-s"
+- }
++ // Link protoc, protobuf, libgcc and libstdc++ statically.
++ // Link other (system) libraries dynamically.
++ // Clang under OSX doesn't support these options.
++ linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc",
++ "-static-libstdc++",
++ "-Wl,-Bdynamic", "-lpthread", "-s"
+ addEnvArgs("LDFLAGS", linker.args)
+ } else if (toolChain in VisualCpp) {
+ usingVisualCpp = true
+@@ -123,112 +112,13 @@
+ }
+ }
+
+-configurations {
+- testLiteCompile
+- testNanoCompile
+-}
+-
+-dependencies {
+- testCompile project(':grpc-protobuf'),
+- project(':grpc-stub'),
+- libraries.javax_annotation
+- testLiteCompile project(':grpc-protobuf-lite'),
+- project(':grpc-stub'),
+- libraries.javax_annotation
+- testNanoCompile project(':grpc-protobuf-nano'),
+- project(':grpc-stub'),
+- libraries.javax_annotation
+-}
+-
+-sourceSets {
+- testLite {
+- proto { setSrcDirs(['src/test/proto']) }
+- }
+- testNano {
+- proto { setSrcDirs(['src/test/proto']) }
+- }
+-}
+-
+-compileTestJava {
+- options.compilerArgs += [
+- "-Xlint:-cast"
+- ]
+- options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
+-}
+-
+-compileTestLiteJava {
+- options.compilerArgs = compileTestJava.options.compilerArgs
+- // Protobuf-generated Lite produces quite a few warnings.
+- options.compilerArgs += [
+- "-Xlint:-rawtypes",
+- "-Xlint:-unchecked",
+- "-Xlint:-fallthrough"
+- ]
+- options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
+-}
+-
+-compileTestNanoJava {
+- options.compilerArgs = compileTestJava.options.compilerArgs
+- options.errorprone.excludedPaths = ".*/build/generated/source/proto/.*"
+-}
+-
+-protobuf {
+- protoc {
+- if (project.hasProperty('protoc')) {
+- path = project.protoc
+- } else {
+- // Since nano is removed from newer versions of protoc, use an older version for the
+- // while. This means we won't be able to test any descriptor.proto additions, but that
+- // should be fine for a while.
+- artifact = libraries.protoc_nano
+- }
+- }
+- plugins {
+- javalite {
+- if (project.hasProperty('protoc-gen-javalite')) {
+- path = project['protoc-gen-javalite']
+- } else {
+- artifact = libraries.protoc_lite
+- }
+- }
+- grpc { path = javaPluginPath }
+- }
+- generateProtoTasks {
+- all().each { task ->
+- task.dependsOn 'java_pluginExecutable'
+- task.inputs.file javaPluginPath
+- }
+- ofSourceSet('test')*.plugins { grpc {} }
+- ofSourceSet('testLite')*.each { task ->
+- task.builtins { remove java }
+- task.plugins {
+- javalite {}
+- grpc { option 'lite' }
+- }
+- }
+- ofSourceSet('testNano').each { task ->
+- task.builtins {
+- remove java
+- javanano { option 'ignore_services=true' }
+- }
+- task.plugins { grpc { option 'nano' } }
+- }
+- }
+-}
+-
+-checkstyleTestNano {
+- source = fileTree(dir: "src/testNano", include: "**/*.java")
+-}
+-
+ println "*** Building codegen requires Protobuf version ${protocVersion}"
+ println "*** Please refer to https://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation-plugin"
+
+ task buildArtifacts(type: Copy) {
+ dependsOn 'java_pluginExecutable'
+ from("$buildDir/exe") {
+- if (osdetector.os != 'windows') {
+- rename 'protoc-gen-grpc-java', '$0.exe'
+- }
++ rename 'protoc-gen-grpc-java', '$0.exe'
+ }
+ into artifactStagingPath
+ }
+@@ -241,7 +131,7 @@
+ if (!usingVisualCpp) {
+ def ret = exec {
+ executable 'bash'
+- args 'check-artifact.sh', osdetector.os, arch
++ args 'check-artifact.sh', System.env.DEB_HOST_GNU_SYSTEM, System.env.DEB_HOST_GNU_CPU
+ }
+ if (ret.exitValue != 0) {
+ throw new GradleException("check-artifact.sh exited with " + ret.exitValue)
+@@ -278,55 +168,3 @@
+ }
+ }
+ }
+-
+-// Exe files are skipped by Maven by default. Override it.
+-// Also skip jar files that is generated by the java plugin.
+-publishing {
+- publications {
+- maven(MavenPublication) {
+- // Removes all artifacts since grpc-compiler doesn't generates any Jar
+- artifacts = []
+- artifactId 'protoc-gen-grpc-java'
+- artifact("$artifactStagingPath/java_plugin/${protocPluginBaseName}.exe" as File) {
+- classifier osdetector.os + "-" + arch
+- extension "exe"
+- builtBy checkArtifacts
+- }
+- pom.withXml {
+- // This isn't any sort of Java archive artifact, and OSSRH doesn't enforce
+- // javadoc for 'pom' packages. 'exe' would be a more appropriate packaging
+- // value, but it isn't clear how that will be interpreted. In addition,
+- // 'pom' is typically the value used when building an exe with Maven.
+- asNode().project.packaging*.value = 'pom'
+- }
+- }
+- }
+-}
+-
+-def configureTestTask(Task task, String dep, String extraPackage, String serviceName) {
+- test.dependsOn task
+- task.dependsOn "generateTest${dep}Proto"
+- if (osdetector.os != 'windows') {
+- task.executable "diff"
+- task.args "-u"
+- } else {
+- task.executable "fc"
+- }
+- // File isn't found on Windows if last slash is forward-slash
+- def slash = System.getProperty("file.separator")
+- task.args "$buildDir/generated/source/proto/test${dep}/grpc/io/grpc/testing/compiler${extraPackage}${slash}${serviceName}Grpc.java",
+- "$projectDir/src/test${dep}/golden/${serviceName}.java.txt"
+-}
+-
+-task testGolden(type: Exec)
+-task testLiteGolden(type: Exec)
+-task testNanoGolden(type: Exec)
+-task testDeprecatedGolden(type: Exec)
+-task testDeprecatedLiteGolden(type: Exec)
+-task testDeprecatedNanoGolden(type: Exec)
+-configureTestTask(testGolden, '', '', 'TestService')
+-configureTestTask(testLiteGolden, 'Lite', '', 'TestService')
+-configureTestTask(testNanoGolden, 'Nano', '/nano', 'TestService')
+-configureTestTask(testDeprecatedGolden, '', '', 'TestDeprecatedService')
+-configureTestTask(testDeprecatedLiteGolden, 'Lite', '', 'TestDeprecatedService')
+-configureTestTask(testDeprecatedNanoGolden, 'Nano', '/nano', 'TestDeprecatedService')
=====================================
debian/patches/python3.patch
=====================================
@@ -0,0 +1,39 @@
+Description: Use Python 3 instead of Python 2
+Author: Olek Wojnar <olek at debian.org>
+Last-Update: 2020-06-18
+
+--- a/buildscripts/set_github_status.py
++++ b/buildscripts/set_github_status.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2.7
++#!/usr/bin/env python3
+ #
+ # Copyright 2018 The gRPC Authors
+ #
+@@ -16,7 +16,7 @@
+
+ import argparse
+ import json
+-import urllib2
++import urllib.request, urllib.error, urllib.parse
+
+
+ def run():
+@@ -46,7 +46,7 @@
+ with open(oauth_file, 'r') as oauth_file_reader:
+ oauth_token = oauth_file_reader.read().replace('\n', '')
+
+- req = urllib2.Request(
++ req = urllib.request.Request(
+ url='https://api.github.com/repos/grpc/grpc-java/statuses/%s' % sha1,
+ data=json.dumps({
+ 'state': state,
+@@ -57,7 +57,7 @@
+ 'Authorization': 'token %s' % oauth_token,
+ 'Content-Type': 'application/json',
+ })
+- print urllib2.urlopen(req).read()
++ print(urllib.request.urlopen(req).read())
+
+
+ if __name__ == '__main__':
=====================================
debian/patches/series
=====================================
@@ -0,0 +1,3 @@
+python3.patch
+fix-gradle-build.patch
+build-plugin.patch
=====================================
debian/protobuf-compiler-grpc-java-plugin.docs
=====================================
@@ -0,0 +1 @@
+usr/share/doc/protobuf-compiler-grpc-java-plugin/README.md
=====================================
debian/protobuf-compiler-grpc-java-plugin.install
=====================================
@@ -0,0 +1,2 @@
+usr/bin/*
+usr/include/*
=====================================
debian/protobuf-compiler-grpc-java-plugin.lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+# False positive
+protobuf-compiler-grpc-java-plugin: hardening-no-fortify-functions
=====================================
debian/protobuf-compiler-grpc-java-plugin.manpages
=====================================
@@ -0,0 +1 @@
+debian/grpc_java_plugin.1
=====================================
debian/rules
=====================================
@@ -0,0 +1,46 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+export ORG_GRADLE_PROJECT_skipAndroid=true
+export ORG_GRADLE_PROJECT_errorProne=false
+export DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+export DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+export DEB_TARGET_GNU_CPU ?= $(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
+export DEB_TARGET_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_TARGET_GNU_SYSTEM)
+
+export ORG_GRADLE_PROJECT_protoc="/usr/bin/protoc"
+
+# Ensure packages build with no Internet access
+export http_proxy=127.0.0.1:9
+export https_proxy=127.0.0.1:9
+
+%:
+ dh $@ --buildsystem=gradle --with maven_repo_helper
+
+override_dh_auto_configure:
+ dh_auto_configure --buildsystem=autoconf
+ dh_auto_configure
+
+override_dh_auto_build:
+ dh_auto_build --buildsystem=autoconf
+ dh_auto_build
+
+override_dh_auto_install:
+ dh_auto_install --buildsystem=autoconf
+ dh_auto_install
+
+override_dh_installexamples:
+ dh_installexamples
+ rm -f debian/libgrpc-java/usr/share/doc/libgrpc-java/examples/android/helloworld/.gitignore
+ rm -f debian/libgrpc-java/usr/share/doc/libgrpc-java/examples/android/routeguide/.gitignore
+ rm -f debian/libgrpc-java/usr/share/doc/libgrpc-java/examples/android/routeguide/app/.gitignore
+
+override_dh_auto_test:
+
+override_dh_link:
+ dh_link
+ jdupes -rl debian/libgrpc-java/usr
=====================================
debian/source/format
=====================================
@@ -0,0 +1 @@
+3.0 (quilt)
=====================================
debian/upstream/metadata
=====================================
@@ -0,0 +1,6 @@
+Bug-Database: https://github.com/grpc/grpc-java/issues
+Bug-Submit: https://github.com/grpc/grpc-java/issues/new
+Documentation: https://grpc.io/docs/
+Homepage: https://grpc.io
+Repository: https://github.com/grpc/grpc-java
+Repository-Browse: https://github.com/grpc/grpc-java
=====================================
debian/watch
=====================================
@@ -0,0 +1,5 @@
+version=4
+
+opts="repack, repacksuffix=+ds, dversionmangle=s/\+ds\d*$//" \
+ https://github.com/grpc/grpc-java/releases?after=v1.27.0 \
+ .*/grpc-java/archive/v(\d[\d\.]*)\.tar\.gz debian uupdate
View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/1a65798e28649514c0a14fce5828f0ca2d545524
--
View it on GitLab: https://salsa.debian.org/java-team/grpc-java/-/commit/1a65798e28649514c0a14fce5828f0ca2d545524
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200714/e1019acf/attachment.html>
More information about the pkg-java-commits
mailing list