Fix packaging of CDS archives

The JDK build includes CDS archives, classes.jsa and classes_nocoops.jsa
already since JEP 341. Executing -Xshare:dump in the headless post
script breaks AppCDS workflows using dynamic dumps since that relies
on the base CDS archive from the JDK to be unchanged.
This commit is contained in:
Jiri Vanek 2023-05-10 17:50:31 +02:00
parent af4ddd0260
commit 3a08aff87f

View File

@ -322,7 +322,7 @@
%global top_level_dir_name %{origin}
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global buildver 9
%global rpmrelease 6
%global rpmrelease 7
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
%if %is_system_jdk
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
@ -539,10 +539,6 @@ alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jre
}
%define post_headless() %{expand:
%ifarch %{share_arches}
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
%endif
update-desktop-database %{_datadir}/applications &> /dev/null || :
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@ -868,7 +864,8 @@ exit 0
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/
%ifarch %{share_arches}
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/classes.jsa
%attr(444, root, root) %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/classes.jsa
%attr(444, root, root) %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/classes_nocoops.jsa
%endif
%dir %{etcjavasubdir}
%dir %{etcjavadir -- %{?1}}
@ -2391,6 +2388,9 @@ cjc.mainProgram(args)
%endif
%changelog
* Wed May 10 2023 Severin Gehwolf <sgehwolf@redhat.com> - 1:20.0.1.0.9-6.rolling
- Fix packaging of CDS archives
* Fri Apr 28 2023 Jiri Vanek <jvanek@redhat.com> - 1:20.0.1.0.9-6.rolling
- faking build-id in libjsvml.so