From ee2f9d7832197fdbc9162847b46948704ce06737 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 21 Dec 2023 15:13:31 -0500 Subject: [PATCH] Fix tests on RHEL Fedora uses -Wl,--enable-new-dtags by default, so the test programs do not need RPATH to find the in-tree libwget2. However, on RHEL that is not the case, but logs show that -Wl,--rpath is only used in the test programs which are not installed. Also, lcov and lzip are not available on RHEL. --- wget2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wget2.spec b/wget2.spec index b1e1a60..17ae9aa 100644 --- a/wget2.spec +++ b/wget2.spec @@ -56,9 +56,11 @@ BuildRequires: pkgconfig(libpsl) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(zlib) +%if ! 0%{?rhel} # Test suite BuildRequires: lcov BuildRequires: lzip +%endif # For gpg signature verification BuildRequires: gnupg2 @@ -119,9 +121,11 @@ the system provider of wget. %build %configure --disable-static -# Remove RPATH +%if ! 0%{?rhel} +# Remove RPATH, rely on default -Wl,--enable-new-dtags in Fedora. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +%endif %make_build