Do not rely on symlinks when openning a library
The symlink libopenscap_sce.so is supposed to be consumed by linker, but not by a run-time. The symlink is not assured to point-out to the latest shared object (otherwise libtool authors would not introduced such symlink). This fix should enable use of SCE without openscap-engine-sce-devel package installed.
This commit is contained in:
parent
e6ced0fde0
commit
4936000630
@ -0,0 +1,44 @@
|
||||
diff -uNr openscap-1.0.0/configure openscap-1.0.0.plugin/configure
|
||||
--- openscap-1.0.0/configure 2013-11-19 11:36:09.502896274 +0100
|
||||
+++ openscap-1.0.0.plugin/configure 2013-11-21 16:21:43.288454538 +0100
|
||||
@@ -799,6 +799,7 @@
|
||||
ENV_PRESENT_FALSE
|
||||
ENV_PRESENT_TRUE
|
||||
HAVE_ENV
|
||||
+LT_CURRENT_MINUS_AGE
|
||||
LT_AGE
|
||||
LT_REVISION
|
||||
LT_CURRENT
|
||||
@@ -22730,11 +22731,20 @@
|
||||
## precedence over adding, so set to 0 if both happened.
|
||||
LT_AGE=0
|
||||
|
||||
+LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+
|
||||
+
|
||||
+cat >>confdefs.h <<_ACEOF
|
||||
+#define LT_CURRENT_MINUS_AGE $LT_CURRENT_MINUS_AGE
|
||||
+_ACEOF
|
||||
+
|
||||
+
|
||||
+
|
||||
|
||||
|
||||
# Compiler flags
|
||||
diff -uNr openscap-1.0.0/src/XCCDF_POLICY/check_engine_plugin.c openscap-1.0.0.plugin/src/XCCDF_POLICY/check_engine_plugin.c
|
||||
--- openscap-1.0.0/src/XCCDF_POLICY/check_engine_plugin.c 2013-11-10 08:54:47.459067475 +0100
|
||||
+++ openscap-1.0.0.plugin/src/XCCDF_POLICY/check_engine_plugin.c 2013-11-21 16:22:57.369464028 +0100
|
||||
@@ -184,7 +184,7 @@
|
||||
return (plugin->get_capabilities_fn)(&plugin->user_data);
|
||||
}
|
||||
|
||||
-const char * const known_plugins[] = {"libopenscap_sce.so", NULL};
|
||||
+const char * const known_plugins[] = {"libopenscap_sce.so." STRINGIZE(LT_CURRENT_MINUS_AGE), NULL};
|
||||
|
||||
const char * const *check_engine_plugin_get_known_plugins(void)
|
||||
{
|
@ -6,12 +6,13 @@ restorecon -R /usr/bin/oscap /usr/libexec/openscap; \
|
||||
|
||||
Name: openscap
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Set of open source libraries enabling integration of the SCAP line of standards
|
||||
Group: System Environment/Libraries
|
||||
License: LGPLv2+
|
||||
URL: http://www.open-scap.org/
|
||||
Source0: http://fedorahosted.org/releases/o/p/openscap/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-dlopen-libopenscap_sce.so.-current-age--explicitly.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: swig libxml2-devel libxslt-devel perl-XML-Parser
|
||||
BuildRequires: rpm-devel
|
||||
@ -146,6 +147,7 @@ This package installs and sets up the SELinux policy security module for opensc
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .plugin
|
||||
|
||||
%build
|
||||
%ifarch sparc64
|
||||
@ -305,6 +307,10 @@ exit 0
|
||||
# %{_mandir}/man8/openscap_selinux.8.*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 21 2013 Šimon Lukašík <slukasik@redhat.com> - 1.0.0-2
|
||||
- dlopen libopenscap_sce.so.{current-age} explicitly
|
||||
That allows for SCE to work without openscap-engine-sce-devel
|
||||
|
||||
* Tue Nov 19 2013 Šimon Lukašík <slukasik@redhat.com> - 1.0.0-1
|
||||
- upgrade
|
||||
- package openscap-engine-sce-devel separately
|
||||
|
Loading…
Reference in New Issue
Block a user