[papi] resolves rhbz986673 - /usr/lib64/libpapi.so is unowned

William Eden Cohen wcohen at fedoraproject.org
Mon Jul 22 17:09:43 UTC 2013


commit cca5a3d4603120ab9503f387fd4d073fcb7bc466
Author: William Cohen <wcohen at redhat.com>
Date:   Mon Jul 22 13:08:07 2013 -0400

    resolves rhbz986673 - /usr/lib64/libpapi.so is unowned

 papi-shlib.patch |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 papi.spec        |   17 +++++++++++++----
 2 files changed, 59 insertions(+), 4 deletions(-)
---
diff --git a/papi-shlib.patch b/papi-shlib.patch
new file mode 100644
index 0000000..c9fdf71
--- /dev/null
+++ b/papi-shlib.patch
@@ -0,0 +1,46 @@
+commit f4ec143eef7b714718b766bdc641af7856a950af
+Author: William Cohen <wcohen at redhat.com>
+Date:   Mon Jul 22 12:26:02 2013 -0400
+
+    Correct versioning of libpapi.so
+    
+    The configure for linux always set the soname to libpapi.so.  This
+    causes problems when /sbin/ldconfig tries to update the library
+    information on linux.  The shared library is installed as
+    /lib{64}/libpapi.so.$VERSION, but the shared library has the soname of
+    libpapi.so.  ldconfig makes a symbolic link from /lib/libpapi.so to
+    the actual versioned shared library, /lib/{64}/libpapi.so$VERSION.
+    The configure should get the soname correct to avoid creating this
+    symbolic link.
+    
+    This patch only addresses the issues for some of the possible
+    platforms and similar patches may be needed for other platforms.
+    
+    Signed-off-by: William Cohen <wcohen at redhat.com>
+
+diff --git a/src/configure.in b/src/configure.in
+index 4bee24d..b5a6c80 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -1234,10 +1234,10 @@ CTEST_TARGETS="papi_api serial forkexec_tests overflow_tests profile_tests attac
+ FTEST_TARGETS="all"
+ UTIL_TARGETS="papi_avail papi_mem_info papi_cost papi_clockres papi_native_avail papi_command_line papi_event_chooser papi_decode papi_xml_event_info papi_version papi_multiplex_cost papi_component_avail papi_error_codes"
+ LIBRARY=libpapi.a
+-SHLIB='libpapi.so.$(PAPIVER)'
++SHLIB='libpapi.so.AC_PACKAGE_VERSION'
+ OMPCFLGS=-fopenmp
+ CC_R='$(CC) -pthread'
+-CC_SHR='$(CC) -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
++CC_SHR='$(CC) -fPIC -DPIC -shared -Wl,-soname -Wl,$(SHLIB) -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
+ if test "$CC_COMMON_NAME" = "gcc"; then
+ 	if test "$bitmode" = "32"; then
+ 		BITFLAGS=-m32
+@@ -1383,7 +1383,7 @@ elif test "$MAKEVER" = "bgp"; then
+   SHLIB=libpapi.so
+   DESCR="Linux for BlueGene/P"
+   LIBS=static
+-  CC_SHR='$(CC) -shared -Xlinker "-soname" -Xlinker "libpapi.so" -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
++  CC_SHR='$(CC) -shared -Xlinker "-soname" -Xlinker "$(SHLIB)" -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
+   OMPCFLGS=""
+ 
+ elif test "$MAKEVER" = "bgq"; then
diff --git a/papi.spec b/papi.spec
index 8462024..196c4ca 100644
--- a/papi.spec
+++ b/papi.spec
@@ -2,7 +2,7 @@
 Summary: Performance Application Programming Interface
 Name: papi
 Version: 5.1.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: BSD
 Group: Development/System
 URL: http://icl.cs.utk.edu/papi/
@@ -10,6 +10,7 @@ Source0: http://icl.cs.utk.edu/projects/papi/downloads/%{name}-%{version}.tar.gz
 Patch200: papi-testsuite1.patch
 Patch210: papi-native-option.patch
 Patch211: papi-man.patch
+Patch212: papi-shlib.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: doxygen
 BuildRequires: ncurses-devel
@@ -63,6 +64,7 @@ the PAPI user-space libraries and interfaces.
 %patch200 -p1
 %patch210 -p1
 %patch211 -p1
+%patch212 -p1 -b .shlib
 
 %build
 %if %{without bundled_libpfm}
@@ -71,6 +73,7 @@ the PAPI user-space libraries and interfaces.
 %endif
 
 cd src
+autoconf
 %configure --with-perf-events \
 %{?libpfm_config} \
 --with-static-lib=yes --with-shared-lib=yes --with-shlib \
@@ -94,8 +97,8 @@ DBG="" make %{?_smp_mflags}
 #generate updated versions of the documentation
 #DBG workaround to make sure libpfm just uses the normal CFLAGS
 pushd ../doc
-DBG="" make %{?_smp_mflags}
-DBG="" make %{?_smp_mflags} install
+DBG="" make
+DBG="" make install
 popd
 
 %install
@@ -114,7 +117,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %{_bindir}/*
 %{_libdir}/*.so.*
-/usr/share/papi
+%dir /usr/share/papi
+/usr/share/papi/papi_events.csv
 %doc INSTALL.txt README LICENSE.txt RELEASENOTES.txt
 %doc %{_mandir}/man1/*
 
@@ -140,6 +144,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.a
 
 %changelog
+* Mon Jul 22 2013 William Cohen <wcohen at redhat.com> - 5.1.1-5
+- rhbz986673 - /usr/lib64/libpapi.so is unowned
+- Package files in /usr/share/papi only once.
+- Avoid dependency problem with parallel make of man pages.
+
 * Fri Jul 19 2013 William Cohen <wcohen at redhat.com> - 5.1.1-4
 - Correct changelog.
 


More information about the scm-commits mailing list