#13 Add gettext-0.21-jdk17 patch to fix rhbz#2062407
Closed 2 years ago by jjames. Opened 2 years ago by jjames.
Unknown source rawhide  into  rawhide

@@ -0,0 +1,39 @@

+ diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac

+ index 2b946c9f7..4416f074b 100644

+ --- a/gettext-runtime/configure.ac

+ +++ b/gettext-runtime/configure.ac

+ @@ -34,7 +34,7 @@ AC_PROG_INSTALL

+  

+  gt_JAVA_CHOICE

+  

+ -gt_JAVACOMP([1.5], [1.6])

+ +gt_JAVACOMP([1.8], [1.8])

+  AC_CHECK_PROG([JAR], [jar], [jar])

+  if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then

+    BUILDJAVA=yes

+ diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac

+ index 65476ab85..71dadeef4 100644

+ --- a/gettext-tools/configure.ac

+ +++ b/gettext-tools/configure.ac

+ @@ -35,7 +35,7 @@ AC_PROG_INSTALL

+  gt_JAVA_CHOICE

+  

+  gt_JAVAEXEC

+ -gt_JAVACOMP([1.5])

+ +gt_JAVACOMP([1.8])

+  AC_CHECK_PROG([JAR], [jar], [jar])

+  if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then

+    BUILDJAVA=yes

+ diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c

+ index 970aae6f0..0b0a3274f 100644

+ --- a/gettext-tools/src/write-java.c

+ +++ b/gettext-tools/src/write-java.c

+ @@ -1209,7 +1209,7 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding,

+       Java compilers create the class files in the source file's directory -

+       which is in a temporary directory in our case.  */

+    java_sources[0] = java_file_name;

+ -  if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,

+ +  if (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,

+                            true, false, true, verbose > 0))

+      {

+        if (!verbose)

file modified
+5 -1
@@ -5,7 +5,7 @@

  Summary: GNU libraries and utilities for producing multi-lingual messages

  Name: gettext

  Version: 0.21

- Release: 12%{?dist}.0.%{snapshot}

+ Release: 13%{?dist}.0.%{snapshot}

  

  # The following are licensed under LGPLv2+:

  # - libintl and its headers
@@ -30,6 +30,7 @@

  

  Patch1: %{name}-%{version}-disable-libtextstyle.patch

  Patch2: %{name}-%{version}-covscan.patch

+ Patch3: %{name}-%{version}-jdk17.patch

  

  # for bootstrapping

  # BuildRequires: autoconf >= 2.62
@@ -373,6 +374,9 @@

  %{_mandir}/man1/msghack.1*

  

  %changelog

+ * Sat Mar 12 2022 Jerry James <loganjerry@gmail.com> - 0.21-13.0.20220203

+ - Add gettext-0.21-jdk17 patch to fix rhbz#2062407

+ 

  * Wed Mar 9 2022 Sundeep Anand <suanand@redhat.com> - 0.21-12

  - fix gettext snapshot versioning issue to make it canonical (#2061646)

  

This raises the --source and --target values passed to javac to 1.8, which is the minimum JDK supported by Fedora, thereby fixing https://bugzilla.redhat.com/show_bug.cgi?id=2062407.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Jerry, are you sure you want intentionally to drop support for < 1.8?

Yes. The problem this solves is that JDK 17, the default JDK in Fedora 36+, no longer accepts --source and --target values of 1.5 or 1.6. The patch could be altered to specify 1.7 instead of 1.8, but there is no JDK older than 1.8 in any supported Fedora release, nor in RHEL 8+.

If compatibility with OpenJDK 1.6 on RHEL 7 is a concern, then we can arrange to not apply this patch on RHEL 7.

I guess this is obsolete now after be4c5c7, right?

Right. I will close it. Thank you everyone involved in fixing the issue.

Pull-Request has been closed by jjames

2 years ago
Metadata