Skip to content

Commit 55f61fc

Browse files
authored
Upgrades objenesis to version 3.3 (#13704)
1 parent 776ee00 commit 55f61fc

4 files changed

Lines changed: 69 additions & 38 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- objenesis-3.1/tck/src/main/java/org/objenesis/tck/TCK.java 2022-03-19 22:06:57.437915731 +0100
2+
+++ objenesis-3.1/tck/src/main/java/org/objenesis/tck/TCK.java 2022-03-19 22:07:53.950244008 +0100
3+
@@ -31,7 +31,7 @@
4+
* This TCK tests Objenesis implementations against a set of candidate classes (class it attempts to instantiate),
5+
* reporting the results to a {@link Reporter}.
6+
*
7+
- * <h3>Example usage</h3>
8+
+ * <h2>Example usage</h2>
9+
*
10+
* <pre>
11+
* TextReporter reporter = new TextReporter(System.out, System.err);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"objenesis-3.1.tar.gz": "2ca9b191e8f16fe7715cfce2d04cc16c32d5e6d0166c615572d6355f24afc6af"
3+
"objenesis-3.3.tar.gz": "73d223e32161743826d876f4b962e2dcd3439201fe0eb21b23f5fcd0eb0e0293"
44
}
5-
}
5+
}

SPECS-EXTENDED/objenesis/objenesis.spec

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Distribution: Azure Linux
33
#
44
# spec file for package objenesis
55
#
6-
# Copyright (c) 2019 SUSE LLC
6+
# Copyright (c) 2024 SUSE LLC
77
# Copyright (c) 2000-2009, JPackage Project
88
#
99
# All modifications and additions to the file contributed by third parties
@@ -19,13 +19,14 @@ Distribution: Azure Linux
1919
#
2020

2121
Name: objenesis
22-
Version: 3.1
23-
Release: 3%{?dist}
22+
Version: 3.3
23+
Release: 1%{?dist}
2424
Summary: A library for instantiating Java objects
2525
License: Apache-2.0
2626
Group: Development/Libraries/Java
27-
URL: http://objenesis.org/
28-
Source0: https://github.com/easymock/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
27+
URL: https://objenesis.org/
28+
Source0: https://github.com/easymock/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
29+
Patch0: objenesis-javadoc.patch
2930
BuildRequires: fdupes
3031
BuildRequires: java-devel >= 1.8
3132
BuildRequires: javapackages-local-bootstrap
@@ -61,28 +62,23 @@ This package contains the API documentation for %{name}.
6162

6263
%prep
6364
%setup -q
65+
%patch -P 0 -p1
6466

6567
# Enable generation of pom.properties (rhbz#1017850)
6668
%pom_xpath_remove pom:addMavenDescriptor
6769

68-
%pom_remove_plugin :maven-timestamp-plugin
69-
%pom_xpath_remove "pom:dependency[pom:scope='test']" tck
70-
71-
%pom_xpath_remove pom:build/pom:extensions
72-
73-
for i in main tck; do
74-
%pom_remove_parent ${i}
75-
%pom_xpath_inject "pom:project" "<groupId>org.objenesis</groupId><version>%{version}</version>" ${i}
76-
done
77-
7870
%build
7971
mkdir -p main/build/classes
8072
javac -d main/build/classes -source 8 -target 8 -encoding utf-8 \
8173
$(find main/src/main/java -name *.java | xargs)
82-
jar cf %{name}-%{version}.jar -C main/build/classes .
74+
jar \
75+
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
76+
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
77+
%endif
78+
--create --file=%{name}-%{version}.jar -C main/build/classes .
8379

8480
touch manifest.txt
85-
echo "Automatic-Module-Name: org.objenesis" >> manifest.txt
81+
echo "Automatic-Module-Name: org.objenesis" >> manifest.txt
8682
echo "Bundle-Description: A library for instantiating Java objects" >> manifest.txt
8783
echo "Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt" >> manifest.txt
8884
echo "Bundle-Name: Objenesis" >> manifest.txt
@@ -102,15 +98,31 @@ echo "Import-Package: sun.misc;resolution:=optional,\
10298
COM.newmonics.PercClassloader;resolution:=optional,\
10399
sun.reflect;resolution:=optional" | sed 's/.\{71\}/&\n /g' >> manifest.txt
104100
echo "Require-Capability: osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version=1.6))\"" >> manifest.txt
105-
jar ufm %{name}-%{version}.jar manifest.txt
101+
jar \
102+
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
103+
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
104+
%endif
105+
--update --file=%{name}-%{version}.jar --manifest=manifest.txt
106106

107107
mkdir -p tck/build/classes
108108
javac -d tck/build/classes -source 8 -target 8 -encoding utf-8 \
109109
-cp %{name}-%{version}.jar \
110110
$(find tck/src/main/java -name *.java | xargs)
111-
jar cf %{name}-tck-%{version}.jar -C tck/build/classes .
112-
jar uf %{name}-tck-%{version}.jar -C tck/src/main/resources .
113-
jar ufe %{name}-tck-%{version}.jar org.objenesis.tck.Main
111+
jar \
112+
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
113+
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
114+
%endif
115+
--create --file=%{name}-tck-%{version}.jar -C tck/build/classes .
116+
jar \
117+
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
118+
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
119+
%endif
120+
--update --file=%{name}-tck-%{version}.jar -C tck/src/main/resources .
121+
jar \
122+
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
123+
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
124+
%endif
125+
--update --file=%{name}-tck-%{version}.jar --main-class=org.objenesis.tck.Main
114126

115127
mkdir -p build/apidoc
116128
javadoc -d build/apidoc -source 8 -encoding utf-8 -notimestamp \
@@ -143,20 +155,28 @@ cp -aL build/apidoc/* %{buildroot}%{_javadocdir}/%{name}
143155
%{_javadocdir}/%{name}
144156

145157
%changelog
146-
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1-3
147-
- Reverting versioning change to match the upstream's schema.
148-
149-
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1.0-2
150-
- Converting the 'Release' tag to the '[number].[distribution]' format.
151-
152-
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1.0-1.6
153-
- Switching to always using full version.
154-
155-
* Fri Nov 20 2020 Ruying Chen <v-ruyche@microsoft.com> - 3.1-1.5
156-
- Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
158+
* Wed May 07 2025 Aninda Pradhan <v-anipradhan@microsoft.com> - 3.3-1
159+
- Initial Azure Linux import from openSUSE Tumbleweed (license: same as "License" tag).
157160
- Use javapackages-local-bootstrap to avoid build cycle.
158-
- Fix line break in sed commands.
159-
161+
- License Verified.
162+
163+
* Tue Sep 24 2024 Fridrich Strba <fstrba@suse.com>
164+
- Use SOURCE_DATE_EPOCH for reproducible jar mtime
165+
* Wed Feb 21 2024 Fridrich Strba <fstrba@suse.com>
166+
- Use %%patch -P N instead of deprecated %%patchN.
167+
* Tue Dec 5 2023 Andrea Manzini <andrea.manzini@suse.com>
168+
- update to upstream version 3.3
169+
* org.objenesis:objenesis-test missing in Maven Central (#85)
170+
* added instructions for running Android TCK for Windows users (#84)
171+
* Copyright and Owner is missing in license (#83)
172+
- update to upstream version 3.2
173+
* Add Dependencies Manifest Entry (#81)
174+
* Objenesis can't be compiled on Android SDK < 26 (#79)
175+
* PercClassLoader misspelled in pom.xml (#76)
176+
* Sat Mar 19 2022 Fridrich Strba <fstrba@suse.com>
177+
- Added patch:
178+
* objenesis-javadoc.patch
179+
+ fix build with javadoc 17
160180
* Fri Nov 29 2019 Fridrich Strba <fstrba@suse.com>
161181
- Upgrade to upstream version 3.1
162182
- Do not force building with java-devel < 9

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14642,8 +14642,8 @@
1464214642
"type": "other",
1464314643
"other": {
1464414644
"name": "objenesis",
14645-
"version": "3.1",
14646-
"downloadUrl": "https://github.com/easymock/objenesis/archive/3.1.tar.gz"
14645+
"version": "3.3",
14646+
"downloadUrl": "https://github.com/easymock/objenesis/archive/refs/tags/3.3.tar.gz"
1464714647
}
1464814648
}
1464914649
},

0 commit comments

Comments
 (0)