From 10247ac25d653fb05f5d367ec8a317d82666d8f7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 17 May 2022 05:33:10 -0400 Subject: [PATCH] import jdeparser-2.0.3-12.el9 --- .gitignore | 1 + .jdeparser.metadata | 1 + ...depending-on-class-removed-in-Java-1.patch | 33 +++++ SPECS/jdeparser.spec | 114 ++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 .gitignore create mode 100644 .jdeparser.metadata create mode 100644 SOURCES/0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch create mode 100644 SPECS/jdeparser.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad7cc25 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jdeparser-2.0.3.Final.tar.gz diff --git a/.jdeparser.metadata b/.jdeparser.metadata new file mode 100644 index 0000000..3e2680a --- /dev/null +++ b/.jdeparser.metadata @@ -0,0 +1 @@ +67a4608c75355338b3ba55594411077b8529ebea SOURCES/jdeparser-2.0.3.Final.tar.gz diff --git a/SOURCES/0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch b/SOURCES/0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch new file mode 100644 index 0000000..6316080 --- /dev/null +++ b/SOURCES/0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch @@ -0,0 +1,33 @@ +From d839be75837da2bc51712af5ae123657c67de30d Mon Sep 17 00:00:00 2001 +From: Chris Kelley +Date: Mon, 16 Aug 2021 21:22:27 +0100 +Subject: [PATCH] Fix build error depending on class removed in Java 11 + +--- + src/main/java/org/jboss/jdeparser/Assertions.java | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/main/java/org/jboss/jdeparser/Assertions.java b/src/main/java/org/jboss/jdeparser/Assertions.java +index 017c645..a931b88 100644 +--- a/src/main/java/org/jboss/jdeparser/Assertions.java ++++ b/src/main/java/org/jboss/jdeparser/Assertions.java +@@ -18,15 +18,13 @@ + + package org.jboss.jdeparser; + +-import sun.reflect.Reflection; +- + /** + * @author David M. Lloyd + */ + class Assertions { + static boolean callerIs(Class clazz) { + try { +- return Reflection.getCallerClass(3) == clazz; ++ return StackWalker.getInstance().getCallerClass() == clazz; + } catch (Throwable ignored) {} + // dunno + return true; +-- +2.31.1 + diff --git a/SPECS/jdeparser.spec b/SPECS/jdeparser.spec new file mode 100644 index 0000000..ab4673d --- /dev/null +++ b/SPECS/jdeparser.spec @@ -0,0 +1,114 @@ +%global namedreltag .Final +%global namedversion %{version}%{?namedreltag} + +Name: jdeparser +Version: 2.0.3 +Release: 12%{?dist} +Summary: Source generator library for Java +License: ASL 2.0 +URL: https://github.com/jdeparser/jdeparser2 +# old repos https://github.com/jdeparser/jdeparser +Source0: %{url}/archive/%{namedversion}/%{name}-%{namedversion}.tar.gz +Patch: 0001-Fix-build-error-depending-on-class-removed-in-Java-1.patch +BuildArch: noarch + +BuildRequires: java-1.8.0-openjdk-devel +BuildRequires: maven-local +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.jboss:jboss-parent:pom:) + +%description +This project is a fork of Sun's (now Oracle's) com.sun.codemodel project. We +decided to fork the project because by all evidence, the upstream project is +dead and not actively accepting outside contribution. All JBoss projects are +urged to use this project instead for source code generation. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n jdeparser2-%{namedversion} +%patch -p1 + +%build +# Use Java 8 as sun.reflect.Reflection is removed in Java 11. +export JAVA_HOME=%{_jvmdir}/java-1.8.0 +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE.txt + +%files javadoc -f .mfiles-javadoc +%license LICENSE.txt + +%changelog +* Tue Aug 17 2021 Red Hat PKI Team 2.0.3-9 +- Bug 1981014 - jdeparser: FTBFS due to access to internal class sun.reflect.Reflection + +* Mon Aug 09 2021 Mohan Boddu - 2.0.3-8 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 2.0.3-7 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 2.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Markku Korkeala - 2.0.3-5 +- Force Java 8 as sun.reflect.Reflection is removed in Java 11. + +* Tue Jul 28 2020 Fedora Release Engineering - 2.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 2.0.3-3 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Wed Jan 29 2020 Fedora Release Engineering - 2.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Oct 08 2019 Dogtag PKI Team - 2.0.3-1 +- Rebuild as part of revival process +- BZ#1758686 + +* Fri Feb 01 2019 Fedora Release Engineering - 2.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 2.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 2.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri May 27 2016 gil cattaneo 2.0.0-1 +- update to 2.0.0.Final +- introduce license macro +- fix some rpmlint problem + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed May 29 2013 Marek Goldmann - 1.0.0-1 +- Initial packaging +