Remove rpath

Resolves: rhbz#1986352
This commit is contained in:
Jan Černý 2021-07-27 12:26:48 +02:00
parent 979d1f936c
commit fb451a59e4
2 changed files with 48 additions and 5 deletions

View File

@ -0,0 +1,42 @@
From 99a496dd49d0e0035b12db43e09aa3ab144bbfbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
Date: Tue, 27 Jul 2021 11:14:23 +0200
Subject: [PATCH] Do not set rpath
See: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
Similar to: https://github.com/OpenSCAP/openscap/pull/1765
---
CMakeLists.txt | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe33466..77bb3ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,23 +128,6 @@ set(SCAP_WORKBENCH_LINK_LIBRARIES
Qt5::Widgets Qt5::XmlPatterns
${OPENSCAP_LIBRARIES})
-# ---------- RPATHS for linking
-
-# see https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
-
-# when building, use the install RPATH
-# (but later on when installing)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
-
-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
-
-# add the automatically determined parts of the RPATH
-# which point to directories outside the build tree to the install RPATH
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
-# Turn on RPATH for OSX
-set(CMAKE_MACOSX_RPATH ON)
-
configure_file("include/Config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/Config.h")
# It is not trivial to make the resulting file executable :-(
# People will have to `bash runwrapper.sh ...` in the meantime.
--
2.31.1

View File

@ -2,7 +2,7 @@
Name: scap-workbench
Version: 1.2.1
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Scanning, tailoring, editing and validation tool for SCAP content
License: GPLv3+
@ -11,6 +11,7 @@ Source0: https://github.com/OpenSCAP/scap-workbench/releases/download/%{versi
Patch1: scap-workbench-1.2.2-fix-qt-deprecated-pr-259.patch
Patch2: scap-workbench-1.2.2-replace-obsolete-Qstring-SkipEmptyParts-pr-266.patch
Patch3: %{name}-gcc11.patch
Patch4: scap-workbench-1.2.2-no-rpath-pr-285.patch
BuildRequires: cmake >= 2.6
BuildRequires: qt5-qtbase-devel >= 5.0.0
@ -40,10 +41,7 @@ scap-workbench is GUI tool that provides scanning functionality for SCAP
content. The tool is based on OpenSCAP library.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%autosetup -p1
%build
%cmake
@ -70,6 +68,9 @@ content. The tool is based on OpenSCAP library.
%doc %{_pkgdocdir}/README.md
%changelog
* Tue Jul 27 2021 Jan Černý <jcerny@redhat.com> - 1.2.1-10
- Do not set rpath (rhbz#1986352)
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.1-9
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937