From dd819ec396d0923ca86a1602cd91fc3e1ad0bb24 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 6 Dec 2022 13:19:17 +0100 Subject: [PATCH] Fix flatpak builds ...after "Update to jdk-11.0.16.1+1" added the TestTranslations.java "test to ensure timezones can be translated": Similar to the previous "Fix flatpak builds", during a flatpak build of java-11-openjdk its .../images/jdk/lib/tzdb.dat is a dangling symlink to /app/share/javazi-1.8/tzdb.dat (but which will be a working symlink in at least the assembled LibreOffice flatpak). That causes execution of TestTranslations.java during the build to fail due to a java.io.FileNotFoundException when trying to access that tzdb.dat. The easiest fix appears to be to just not run that specific test for a flatpak build. Related: rhbz#2150198 --- java-17-openjdk.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index 79000e6..b52acb4 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -369,7 +369,7 @@ %global top_level_dir_name %{origin} %global top_level_dir_name_backup %{top_level_dir_name}-backup %global buildver 9 -%global rpmrelease 3 +%global rpmrelease 4 # 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 @@ -2161,10 +2161,14 @@ nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi %endif -# Check translations are available for new timezones +%if ! 0%{?flatpak} +# Check translations are available for new timezones (during flatpak builds, the +# tzdb.dat used by this test is not where the test expects it, so this is +# disabled for flatpak builds) $JAVA_HOME/bin/javac -d . %{SOURCE18} $JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR +%endif %if %{include_staticlibs} # Check debug symbols in static libraries (smoke test) @@ -2622,6 +2626,10 @@ cjc.mainProgram(args) %endif %changelog +* Fri Jan 13 2023 Stephan Bergmann - 1:17.0.6.0.9-0.4.ea +- Fix flatpak builds by disabling TestTranslations test due to missing tzdb.dat +- Related: rhbz#2150198 + * Wed Jan 04 2023 Andrew Hughes - 1:17.0.6.0.9-0.3.ea - Update to jdk-17.0.6+9 - Update release notes to 17.0.6+9