Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package google-gson for openSUSE:Factory 
checked in at 2021-10-19 23:03:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-gson (Old)
 and      /work/SRC/openSUSE:Factory/.google-gson.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "google-gson"

Tue Oct 19 23:03:50 2021 rev:2 rq:926143 version:2.8.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/google-gson/google-gson.changes  2019-11-04 
17:15:03.696815924 +0100
+++ /work/SRC/openSUSE:Factory/.google-gson.new.1890/google-gson.changes        
2021-10-19 23:04:10.117282246 +0200
@@ -1,0 +2,18 @@
+Tue Oct 19 07:08:34 UTC 2021 - Fridrich Strba <[email protected]>
+
+- Upgrade to version 2.8.8
+- Removed patch:
+  * fix-test.patch
+    + integrated upstream
+- Modified patches:
+  * no-template-plugin.patch
+  * osgi-export-internal.patch
+    + rediff to changed context
+- Added patches:
+  * allow-build-with-java8.patch
+    + lower the unnecessary requirement of Java 9
+  * sun-misc.patch
+    + make import of sun.misc optional since not all versions of
+      jdk export it
+
+-------------------------------------------------------------------

Old:
----
  fix-test.patch
  gson-parent-2.8.5.tar.gz

New:
----
  allow-build-with-java8.patch
  gson-parent-2.8.8.tar.gz
  sun-misc.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ google-gson.spec ++++++
--- /var/tmp/diff_new_pack.rpgeyB/_old  2021-10-19 23:04:10.757282536 +0200
+++ /var/tmp/diff_new_pack.rpgeyB/_new  2021-10-19 23:04:10.761282539 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package google-gson
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,21 +17,20 @@
 
 
 Name:           google-gson
-Version:        2.8.5
+Version:        2.8.8
 Release:        0
 Summary:        Java lib for conversion of Java objects into JSON 
representation
 License:        Apache-2.0
-Group:          Development/Libraries/Java
 URL:            https://github.com/google/gson
 Source0:        
https://github.com/google/gson/archive/gson-parent-%{version}.tar.gz
-Patch0:         osgi-export-internal.patch
-Patch1:         no-template-plugin.patch
-# Java 11 changed the DateTime.FULL output for Locale.FRANCE
-Patch2:         fix-test.patch
+Patch0:         sun-misc.patch
+Patch1:         osgi-export-internal.patch
+Patch2:         allow-build-with-java8.patch
+# Remove dependency on unavailable templating-maven-plugin
+Patch3:         no-template-plugin.patch
 BuildRequires:  fdupes
 BuildRequires:  maven-local
 BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
-BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
 BuildArch:      noarch
 
 %description
@@ -51,16 +50,20 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
-rm -f \
-  gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java \
-  
gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java \
-  gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
+# remove unnecessary dependency on parent POM
+%pom_remove_parent
+
+# presence of these files breaks builds with Java 8
+find -name "module-info.java" -print -delete
 
 # Use felix maven-bundle-plugin only for OSGi metadata
 %pom_remove_plugin :bnd-maven-plugin gson
-%pom_remove_plugin org.codehaus.mojo:templating-maven-plugin gson
-%pom_xpath_inject "pom:plugin[pom:artifactId='maven-bundle-plugin']" 
"<configuration>
+%pom_remove_plugin :templating-maven-plugin gson
+%pom_remove_plugin :copy-rename-maven-plugin gson
+%pom_remove_plugin :proguard-maven-plugin gson
+%pom_add_plugin "org.apache.felix:maven-bundle-plugin" gson "<configuration>
     <instructions>
       <_include>bnd.bnd</_include>
     </instructions>
@@ -71,11 +74,10 @@
       <phase>process-classes</phase>
       <goals><goal>manifest</goal></goals>
     </execution>
-  </executions>" gson
-
+  </executions>"
 
 %build
-%{mvn_build} -f -- -Dsource=6
+%{mvn_build} -f
 
 %install
 %mvn_install

++++++ allow-build-with-java8.patch ++++++
>From 55ba74d967df953b4a5b646be4305877d6bb267c Mon Sep 17 00:00:00 2001
From: Mat Booth <[email protected]>
Date: Thu, 27 Aug 2020 11:08:44 +0100
Subject: [PATCH 3/4] Allow building on Java 8

---
 pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8716014..3ce8a3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,9 +69,8 @@
               <id>default-compile</id>
               <configuration>
                 <jdkToolchain>
-                  <version>9</version>
+                  <version>8</version>
                 </jdkToolchain>
-                <release>9</release>
               </configuration>
             </execution>
             <execution>
-- 
2.26.2

++++++ gson-parent-2.8.5.tar.gz -> gson-parent-2.8.8.tar.gz ++++++
++++ 31928 lines of diff (skipped)

++++++ no-template-plugin.patch ++++++
--- /var/tmp/diff_new_pack.rpgeyB/_old  2021-10-19 23:04:10.941282620 +0200
+++ /var/tmp/diff_new_pack.rpgeyB/_new  2021-10-19 23:04:10.945282622 +0200
@@ -1,6 +1,41 @@
---- gson-gson-parent-2.8.5/gson/src/main/java/com/google/gson/Gson.java        
2018-11-21 09:00:13.754469522 +0100
-+++ gson-gson-parent-2.8.5/gson/src/main/java/com/google/gson/Gson.java        
2018-11-21 09:02:58.267295026 +0100
-@@ -37,7 +37,6 @@
+--- 
a/gson/src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java
++++ /dev/null
+@@ -1,32 +0,0 @@
+-/*
+- * Copyright (C) 2018 The Gson authors
+- *
+- * 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
+- *
+- * http://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.
+- */
+-
+-package com.google.gson.internal;
+-
+-/**
+- * Build configuration for Gson. This file is automatically populated by
+- * templating-maven-plugin and .java/.class files are generated for use in 
Gson.
+- *
+- * @author Inderjeet Singh
+- */
+-public final class GsonBuildConfig {
+-  // Based on 
https://stackoverflow.com/questions/2469922/generate-a-version-java-file-in-maven
+-
+-  /** This field is automatically populated by Maven when a build is 
triggered */
+-  public static final String VERSION = "${project.version}";
+-
+-  private GsonBuildConfig() { }
+-}
+--- a/gson/src/main/java/com/google/gson/Gson.java
++++ b/gson/src/main/java/com/google/gson/Gson.java
+@@ -37,7 +37,6 @@ import java.util.concurrent.atomic.AtomicLongArray;
  
  import com.google.gson.internal.ConstructorConstructor;
  import com.google.gson.internal.Excluder;
@@ -8,7 +43,7 @@
  import com.google.gson.internal.Primitives;
  import com.google.gson.internal.Streams;
  import com.google.gson.internal.bind.ArrayTypeAdapter;
-@@ -462,7 +461,7 @@
+@@ -462,7 +461,7 @@ public final class Gson {
            return candidate;
          }
        }
@@ -17,30 +52,171 @@
      } finally {
        threadCalls.remove(type);
  
-@@ -704,8 +703,6 @@
+@@ -704,10 +703,6 @@ public final class Gson {
        ((TypeAdapter<Object>) adapter).write(writer, src);
      } catch (IOException e) {
        throw new JsonIOException(e);
 -    } catch (AssertionError e) {
--      throw new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
+-      AssertionError error = new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage());
+-      error.initCause(e);
+-      throw error;
      } finally {
        writer.setLenient(oldLenient);
        writer.setHtmlSafe(oldHtmlSafe);
-@@ -782,8 +779,6 @@
+@@ -784,10 +779,6 @@ public final class Gson {
        Streams.write(jsonElement, writer);
      } catch (IOException e) {
        throw new JsonIOException(e);
 -    } catch (AssertionError e) {
--      throw new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
+-      AssertionError error = new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage());
+-      error.initCause(e);
+-      throw error;
      } finally {
        writer.setLenient(oldLenient);
        writer.setHtmlSafe(oldHtmlSafe);
-@@ -940,8 +935,6 @@
+@@ -945,10 +936,6 @@ public final class Gson {
      } catch (IOException e) {
        // TODO(inder): Figure out whether it is indeed right to rethrow this 
as JsonSyntaxException
        throw new JsonSyntaxException(e);
 -    } catch (AssertionError e) {
--      throw new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage(), e);
+-      AssertionError error = new AssertionError("AssertionError (GSON " + 
GsonBuildConfig.VERSION + "): " + e.getMessage());
+-      error.initCause(e);
+-      throw error;
      } finally {
        reader.setLenient(oldLenient);
      }
+--- 
a/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java
++++ /dev/null
+@@ -1,96 +0,0 @@
+-/*
+- * Copyright (C) 2018 Gson Authors
+- *
+- * 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
+- *
+- * http://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.
+- */
+-package com.google.gson.functional;
+-
+-import java.io.IOException;
+-import java.util.regex.Pattern;
+-
+-import org.junit.Before;
+-import org.junit.Test;
+-
+-import com.google.gson.Gson;
+-import com.google.gson.GsonBuilder;
+-import com.google.gson.TypeAdapter;
+-import com.google.gson.stream.JsonReader;
+-import com.google.gson.stream.JsonWriter;
+-
+-import junit.framework.TestCase;
+-
+-/**
+- * Functional tests to validate printing of Gson version on AssertionErrors
+- *
+- * @author Inderjeet Singh
+- */
+-public class GsonVersionDiagnosticsTest extends TestCase {
+-  private static final Pattern GSON_VERSION_PATTERN = 
Pattern.compile("(\\(GSON \\d\\.\\d\\.\\d)(?:[-.][A-Z]+)?\\)$");
+-
+-  private Gson gson;
+-
+-  @Before
+-  public void setUp() {
+-    gson = new GsonBuilder().registerTypeAdapter(TestType.class, new 
TypeAdapter<TestType>() {
+-      @Override public void write(JsonWriter out, TestType value) {
+-        throw new AssertionError("Expected during serialization");
+-      }
+-      @Override public TestType read(JsonReader in) throws IOException {
+-        throw new AssertionError("Expected during deserialization");
+-      }
+-    }).create();
+-  }
+-
+-  @Test
+-  public void testVersionPattern() {
+-    assertTrue(GSON_VERSION_PATTERN.matcher("(GSON 2.8.5)").matches());
+-    assertTrue(GSON_VERSION_PATTERN.matcher("(GSON 
2.8.5-SNAPSHOT)").matches());
+-  }
+-
+-  @Test
+-  public void testAssertionErrorInSerializationPrintsVersion() {
+-    try {
+-      gson.toJson(new TestType());
+-      fail();
+-    } catch (AssertionError expected) {
+-      ensureAssertionErrorPrintsGsonVersion(expected);
+-    }
+-  }
+-
+-  @Test
+-  public void testAssertionErrorInDeserializationPrintsVersion() {
+-    try {
+-      gson.fromJson("{'a':'abc'}", TestType.class);
+-      fail();
+-    } catch (AssertionError expected) {
+-      ensureAssertionErrorPrintsGsonVersion(expected);
+-    }
+-  }
+-
+-  private void ensureAssertionErrorPrintsGsonVersion(AssertionError expected) 
{
+-    String msg = expected.getMessage();
+-    // System.err.println(msg);
+-    int start = msg.indexOf("(GSON");
+-    assertTrue(start > 0);
+-    int end = msg.indexOf("):") + 1;
+-    assertTrue(end > 0 && end > start + 6);
+-    String version = msg.substring(start, end);
+-    // System.err.println(version);
+-    assertTrue(GSON_VERSION_PATTERN.matcher(version).matches());
+-  }
+-
+-  private static final class TestType {
+-    @SuppressWarnings("unused")
+-    String a;
+-  }
+-}
+--- a/gson/src/test/java/com/google/gson/internal/GsonBuildConfigTest.java
++++ /dev/null
+@@ -1,33 +0,0 @@
+-/*
+- * Copyright (C) 2018 The Gson authors
+- *
+- * 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
+- *
+- * http://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.
+- */
+-package com.google.gson.internal;
+-
+-import static org.junit.Assert.assertFalse;
+-
+-import org.junit.Test;
+-
+-/**
+- * Unit tests for {@code GsonBuildConfig}
+- *
+- * @author Inderjeet Singh
+- */
+-public class GsonBuildConfigTest {
+-
+-  @Test
+-  public void testEnsureGsonBuildConfigGetsUpdatedToMavenVersion() {
+-    assertFalse("${project.version}".equals(GsonBuildConfig.VERSION));
+-  }
+-}

++++++ osgi-export-internal.patch ++++++
--- /var/tmp/diff_new_pack.rpgeyB/_old  2021-10-19 23:04:10.953282625 +0200
+++ /var/tmp/diff_new_pack.rpgeyB/_new  2021-10-19 23:04:10.953282625 +0200
@@ -1,6 +1,17 @@
---- gson-gson-parent-2.8.1/gson/bnd.bnd.orig   2017-08-29 11:07:29.630655005 
+0100
-+++ gson-gson-parent-2.8.1/gson/bnd.bnd        2017-08-29 11:08:29.592075069 
+0100
-@@ -11,4 +11,7 @@
+From ad012fa6acc53560a07d05676aa22d1afc66bf22 Mon Sep 17 00:00:00 2001
+From: Mat Booth <[email protected]>
+Date: Thu, 27 Aug 2020 10:52:58 +0100
+Subject: [PATCH 2/4] Also export internal packages in OSGi metadata
+
+---
+ gson/bnd.bnd | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/gson/bnd.bnd b/gson/bnd.bnd
+index 7706d8a..8469930 100644
+--- a/gson/bnd.bnd
++++ b/gson/bnd.bnd
+@@ -13,4 +13,7 @@ Import-Package: sun.misc;resolution:=optional,*
      com.google.gson,\
      com.google.gson.annotations,\
      com.google.gson.reflect,\
@@ -9,3 +20,6 @@
 +    com.google.gson.internal;x-internal:=true,\
 +    com.google.gson.internal.bind;x-internal:=true,\
 +    com.google.gson.internal.bind.util;x-internal:=true
+-- 
+2.26.2
+

++++++ sun-misc.patch ++++++
--- gson-gson-parent-2.8.8/gson/bnd.bnd 2021-08-20 18:07:19.000000000 +0200
+++ gson-gson-parent-2.8.8/gson/bnd.bnd 2021-10-18 22:15:38.992319557 +0200
@@ -3,8 +3,10 @@
 Bundle-Description: ${project.description}
 Bundle-Vendor: Google Gson Project
 Bundle-ContactAddress: ${project.parent.url}
+Bundle-DocURL: ${project.parent.url}/blob/master/UserGuide.md
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7, JavaSE-1.8
 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"
+Import-Package: sun.misc;resolution:=optional,*
 
 -removeheaders: Private-Package
 

Reply via email to