#87 Patch syslookup.c so it actually has some code to be compiled into libsyslookup
Merged 2 years ago by jvanek. Opened 2 years ago by jvanek.

file modified
+8 -9
@@ -298,7 +298,7 @@

  %global top_level_dir_name   %{origin}

  %global top_level_dir_name_backup %{top_level_dir_name}-backup

  %global buildver        12

- %global rpmrelease      7

+ %global rpmrelease      8

  # 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
@@ -1198,6 +1198,8 @@

  # OpenJDK patches in need of upstreaming

  #

  #############################################

+ # JDK-8276572: Fake libsyslookup.so library causes tooling issues

+ Patch2000: jdk8276572-fake_libsyslookup_causes_tooling_issues.patch

  

  

  BuildRequires: autoconf
@@ -1596,6 +1598,7 @@

  %patch1011

  %patch1012

  %patch1013

+ %patch2000

  

  # Extract systemtap tapsets

  %if %{with_systemtap}
@@ -1912,14 +1915,6 @@

      # All these tests rely on RPM failing the build if the exit code of any set

      # of piped commands is non-zero.

  

-     # If this is the empty library, libsyslookup.so, of the foreign function and memory

-     # API incubation module (JEP 412), skip the debuginfo check as this seems unreliable

-     # on s390x. It's not very useful for other arches either, so skip unconditionally.

-     if [ "`basename $lib`" = "libsyslookup.so" ]; then

-        echo "Skipping debuginfo check for empty library 'libsyslookup.so'"

-        continue

-     fi

- 

      # Test for .debug_* sections in the shared object. This is the main test

      # Stripped objects will not contain these

      eu-readelf -S "$lib" | grep "] .debug_"
@@ -2363,6 +2358,10 @@

  %endif

  

  %changelog

+ * Fri Nov 05 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-8

+ - Patch syslookup.c so it actually has some code to be compiled into libsyslookup

+ - Related: rhbz#2013846

+ 

  * Wed Nov 03 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.1.0.12-7.rolling

  - Use 'sql:' prefix in nss.fips.cfg as F35+ no longer ship the legacy

    secmod.db file as part of nss

@@ -0,0 +1,21 @@

+ commit a4724332098cd8bff44ee27e9190fd28fa5c1865

+ Author: Andrew John Hughes <andrew@openjdk.org>

+ Date:   Fri Nov 5 21:05:42 2021 +0000

+ 

+     8276572: Fake libsyslookup.so library causes tooling issues

+     

+     Reviewed-by: shade, mcimadamore

+ 

+ diff --git openjdk.orig/src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c openjdk/src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c

+ index fdf99866786..b1f543bfdb7 100644

+ --- openjdk.orig/src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c

+ +++ openjdk/src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c

+ @@ -26,3 +26,8 @@

+  // Note: the include below is not strictly required, as dependencies will be pulled using linker flags.

+  // Adding at least one #include removes unwanted warnings on some platforms.

+  #include <stdlib.h>

+ +

+ +// Simple dummy function so this library appears as a normal library to tooling.

+ +char* syslookup() {

+ +  return "syslookup";

+ +}

Related: rhbz#2013846

rebased onto 6837909

2 years ago

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

Pull-Request has been merged by jvanek

2 years ago