From 683790912048789d6450728e22aee0e52f46164f Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Mon, 8 Nov 2021 14:48:30 +0100 Subject: [PATCH] Patch syslookup.c so it actually has some code to be compiled into libsyslookup Related: rhbz#2013846 --- java-latest-openjdk.spec | 17 +++++++-------- ...e_libsyslookup_causes_tooling_issues.patch | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 jdk8276572-fake_libsyslookup_causes_tooling_issues.patch diff --git a/java-latest-openjdk.spec b/java-latest-openjdk.spec index 8b7e164..d1a8d83 100644 --- a/java-latest-openjdk.spec +++ b/java-latest-openjdk.spec @@ -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 @@ Patch1013: rh1991003-enable_fips_keys_import.patch # 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 @@ popd # openjdk %patch1011 %patch1012 %patch1013 +%patch2000 # Extract systemtap tapsets %if %{with_systemtap} @@ -1912,14 +1915,6 @@ do # 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 @@ cjc.mainProgram(args) %endif %changelog +* Fri Nov 05 2021 Andrew Hughes - 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 - 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 diff --git a/jdk8276572-fake_libsyslookup_causes_tooling_issues.patch b/jdk8276572-fake_libsyslookup_causes_tooling_issues.patch new file mode 100644 index 0000000..dee144b --- /dev/null +++ b/jdk8276572-fake_libsyslookup_causes_tooling_issues.patch @@ -0,0 +1,21 @@ +commit a4724332098cd8bff44ee27e9190fd28fa5c1865 +Author: Andrew John Hughes +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 ++ ++// Simple dummy function so this library appears as a normal library to tooling. ++char* syslookup() { ++ return "syslookup"; ++}