public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/google-gson] epel10: re-add 0002-Also-export-internal-packages-in-OSGi-metadata.patch and pom_xpath_inject
@ 2026-08-17 12:39
0 siblings, 0 replies; only message in thread
From: @ 2026-08-17 12:39 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/google-gson
Branch : epel10
Commit : 3ddc7f4e006443a03947be026715a99a457611f5
Author : Sérgio M. Basto <sergio@serjux.com>
Date : 2022-02-06T17:55:46+00:00
Stats : +60/-16 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/google-gson/c/3ddc7f4e006443a03947be026715a99a457611f5?branch=epel10
Log:
re-add 0002-Also-export-internal-packages-in-OSGi-metadata.patch and pom_xpath_inject
---
diff --git a/0002-Also-export-internal-packages-in-OSGi-metadata.patch b/0002-Also-export-internal-packages-in-OSGi-metadata.patch
new file mode 100644
index 0000000..d6dab1e
--- /dev/null
+++ b/0002-Also-export-internal-packages-in-OSGi-metadata.patch
@@ -0,0 +1,25 @@
+From ad012fa6acc53560a07d05676aa22d1afc66bf22 Mon Sep 17 00:00:00 2001
+From: Mat Booth <mat.booth@redhat.com>
+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,\
+- com.google.gson.stream
++ com.google.gson.stream,\
++ 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
+
diff --git a/google-gson.spec b/google-gson.spec
index 577ff9b..2a4a36a 100644
--- a/google-gson.spec
+++ b/google-gson.spec
@@ -1,20 +1,24 @@
Name: google-gson
Version: 2.8.8
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Java lib for conversion of Java objects into JSON representation
License: ASL 2.0
URL: https://github.com/google/gson
Source0: https://github.com/google/gson/archive/gson-parent-%{version}.tar.gz
+# Internal packages are naughtily used by other packages in Fedora
+Patch1: 0002-Also-export-internal-packages-in-OSGi-metadata.patch
# Remove dependency on unavailable templating-maven-plugin
# Reverts upstream commit https://github.com/google/gson/commit/d84e26d
Patch3: 0004-This-commit-added-a-dependency-on-templating-maven-p.patch
+Patch4: gson-gradle.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
+BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
BuildRequires: bnd-maven-plugin
BuildRequires: maven-resources-plugin
@@ -32,32 +36,34 @@ This package contains the API documentation for %{name}.
%prep
%setup -q -n gson-gson-parent-%{version}
+rm ./gradle/wrapper/gradle-wrapper.jar
+%patch1 -p1
%patch3 -p1
+%patch4 -p1
# The test EnumWithObfuscatedTest requires the plugins copy-rename-maven-plugin, proguard-maven-plugin and maven-resources-plugin to work correctly because it tests Gson interaction with a class obfuscated by ProGuard.
# https://github.com/google/gson/issues/2045
rm ./gson/src/test/java/com/google/gson/functional/EnumWithObfuscatedTest.java
# remove unnecessary dependency on parent POM
%pom_remove_parent
-%pom_xpath_remove 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration'
# Use felix maven-bundle-plugin only for OSGi metadata
#pom_remove_plugin :bnd-maven-plugin gson
%pom_remove_plugin :copy-rename-maven-plugin gson
%pom_remove_dep com.github.wvengen gson
%pom_remove_plugin :proguard-maven-plugin gson
-#%%pom_xpath_inject "pom:plugin[pom:artifactId='maven-bundle-plugin']" "<configuration>
-# <instructions>
-# <_include>bnd.bnd</_include>
-# </instructions>
-# </configuration>
-# <executions>
-# <execution>
-# <id>create-manifest</id>
-# <phase>process-classes</phase>
-# <goals><goal>manifest</goal></goals>
-# </execution>
-# </executions>" gson
+%pom_xpath_inject "pom:plugin[pom:artifactId='maven-bundle-plugin']" "<configuration>
+ <instructions>
+ <_include>bnd.bnd</_include>
+ </instructions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-manifest</id>
+ <phase>process-classes</phase>
+ <goals><goal>manifest</goal></goals>
+ </execution>
+ </executions>"
%build
%mvn_build
@@ -73,10 +79,11 @@ rm ./gson/src/test/java/com/google/gson/functional/EnumWithObfuscatedTest.java
%license LICENSE
%changelog
+* Sun Feb 06 2022 Sérgio Basto <sergio@serjux.com> - 2.8.8-5
+- re-add 0002-Also-export-internal-packages-in-OSGi-metadata.patch and pom_xpath_inject
+
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.8.8-4
- Rebuilt for java-17-openjdk as system jdk
-- (#2051150) Fix Compilation failure:
- [ERROR] Source option 6 is no longer supported. Use 7 or later.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/gson-gradle.patch b/gson-gradle.patch
new file mode 100644
index 0000000..ceb04e2
--- /dev/null
+++ b/gson-gradle.patch
@@ -0,0 +1,12 @@
+--- gson-gson-parent-2.8.8.orig/gson/build.gradle 2021-08-20 17:07:19.000000000 +0100
++++ gson-gson-parent-2.8.8/gson/build.gradle 2022-02-06 16:35:16.740363581 +0000
+@@ -4,9 +4,6 @@ apply plugin: 'maven'
+ group = 'com.google.code.gson'
+ version = '2.8.6-SNAPSHOT'
+
+-sourceCompatibility = 1.6
+-targetCompatibility = 1.6
+-
+ sourceSets.main.java.exclude("**/module-info.java")
+ dependencies {
+ testCompile "junit:junit:4.12"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-17 12:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 12:39 [rpms/google-gson] epel10: re-add 0002-Also-export-internal-packages-in-OSGi-metadata.patch and pom_xpath_inject
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox