From 51f64f6e432f974796af9ac9ca79181bc8931b3e89126395452f49f17b40c55e Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 6 Dec 2011 17:35:02 +0000 Subject: [PATCH 1/4] Updating link to change in openSUSE:Factory/oprofile revision 32.0 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=58f88212905c619b65c033461dc3fa1d --- oprofile.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oprofile.spec b/oprofile.spec index 5dfcfc3..9610515 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -20,7 +20,7 @@ Name: oprofile BuildRequires: binutils-devel fdupes java2-devel-packages libtool libxslt popt-devel qt-devel update-desktop-files Url: http://oprofile.sourceforge.net/ -License: GPLv2+ ; LGPLv2.1+ +License: GPL-2.0+ ; LGPL-2.1+ Group: Development/Tools/Other PreReq: /usr/sbin/groupadd /usr/sbin/useradd Version: 0.9.7 @@ -60,7 +60,7 @@ This is the package containing the userspace tools. %package devel Summary: System-Wide Profiler for Linux Systems Group: Development/Libraries/C and C++ -License: GPLv2+ ; LGPLv2.1+ +License: GPL-2.0+ ; LGPL-2.1+ AutoReqProv: on Requires: libopagent1 = %{version}-%{release} binutils-devel @@ -75,7 +75,7 @@ virtual machines. %package -n libopagent1 Summary: System-Wide Profiler for Linux Systems Group: Development/Libraries/C and C++ -License: GPLv2+ ; LGPLv2.1+ +License: GPL-2.0+ ; LGPL-2.1+ AutoReqProv: on %description -n libopagent1 From bad9cdfb527d0db6f7581604fd157456aa035b4ebc82a68df3b682e7b047ef32 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 3 Jan 2012 15:21:55 +0000 Subject: [PATCH 2/4] Accepting request 98319 from home:klaussfreire:branches:devel:tools Bug #684751, opcontrol --start fails because of NMI watchdog. The real issue, is the watchdog /proc interface was moved from /proc/blah/nmi_watchdog to /proc/blah/watchdog, a simple search and replace fixed it. I'm actually testing it on my local without issues. I couldn't find anything useful in the openSUSE bug (684751), but I did find a debian bug filled with interesting details (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615964). You will probably have to add the necessary tags to the patches, I couldn't find any examples in any of the existing patches but I did see the warning. Changes from sr#98110: - Added changelog entry OBS-URL: https://build.opensuse.org/request/show/98319 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=23 --- oprofile-0.9.7-watchdog.diff | 17 +++++++++++++++++ oprofile.changes | 6 ++++++ oprofile.spec | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 oprofile-0.9.7-watchdog.diff diff --git a/oprofile-0.9.7-watchdog.diff b/oprofile-0.9.7-watchdog.diff new file mode 100644 index 0000000..d19804f --- /dev/null +++ b/oprofile-0.9.7-watchdog.diff @@ -0,0 +1,17 @@ +diff -wur oprofile-0.9.7/utils/opcontrol oprofile-0.9.7-nu/utils/opcontrol +--- oprofile-0.9.7/utils/opcontrol 2011-07-20 16:36:48.000000000 -0300 ++++ oprofile-0.9.7-nu/utils/opcontrol 2011-12-24 11:36:16.141000284 -0300 +@@ -1211,10 +1211,10 @@ + echo $3 >$MOUNT/$1/$2 + else + echo -n "Error: counter $1 not available" +- if test -e /proc/sys/kernel/nmi_watchdog; then +- echo " nmi_watchdog using this resource ? Try:" ++ if test -e /proc/sys/kernel/watchdog; then ++ echo " watchdog using this resource ? Try:" + echo "opcontrol --deinit" +- echo "echo 0 > /proc/sys/kernel/nmi_watchdog" ++ echo "echo 0 > /proc/sys/kernel/watchdog" + fi + exit 1 + fi diff --git a/oprofile.changes b/oprofile.changes index c3c2466..9d26eae 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 27 14:38:40 UTC 2011 - klaussfreire@gmail.com + +- Fix nmi_watchdog handling, it was renamed as watchdog in recent + kernels [#684751] + ------------------------------------------------------------------- Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com diff --git a/oprofile.spec b/oprofile.spec index 9610515..d5fc248 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -35,6 +35,7 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: oprofile-0.9.5-buildfixes.diff Patch2: oprofile-0.9.4-fixes.diff +Patch3: oprofile-0.9.7-watchdog.diff %description OProfile is a system-wide profiler for Linux systems, capable of @@ -90,6 +91,7 @@ from supported virtual machines. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 mkdir -p java/include # copy files necessary to build Java agent libraries # libjvmpi_oprofile.so and libjvmti_oprofile.so From 947d4e2db384fbef1876a7e1b9a1a7e3bccde18a407e9fdd432716b90e2e933b Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Fri, 6 Jan 2012 13:29:07 +0000 Subject: [PATCH 3/4] Revert previous incorrect commit by klaussfreire@gmail.com (commit should never have been accepted) OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=24 --- oprofile-0.9.7-watchdog.diff | 17 ----------------- oprofile.changes | 6 ------ oprofile.spec | 25 ++++++++++++------------- 3 files changed, 12 insertions(+), 36 deletions(-) delete mode 100644 oprofile-0.9.7-watchdog.diff diff --git a/oprofile-0.9.7-watchdog.diff b/oprofile-0.9.7-watchdog.diff deleted file mode 100644 index d19804f..0000000 --- a/oprofile-0.9.7-watchdog.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff -wur oprofile-0.9.7/utils/opcontrol oprofile-0.9.7-nu/utils/opcontrol ---- oprofile-0.9.7/utils/opcontrol 2011-07-20 16:36:48.000000000 -0300 -+++ oprofile-0.9.7-nu/utils/opcontrol 2011-12-24 11:36:16.141000284 -0300 -@@ -1211,10 +1211,10 @@ - echo $3 >$MOUNT/$1/$2 - else - echo -n "Error: counter $1 not available" -- if test -e /proc/sys/kernel/nmi_watchdog; then -- echo " nmi_watchdog using this resource ? Try:" -+ if test -e /proc/sys/kernel/watchdog; then -+ echo " watchdog using this resource ? Try:" - echo "opcontrol --deinit" -- echo "echo 0 > /proc/sys/kernel/nmi_watchdog" -+ echo "echo 0 > /proc/sys/kernel/watchdog" - fi - exit 1 - fi diff --git a/oprofile.changes b/oprofile.changes index 9d26eae..c3c2466 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Dec 27 14:38:40 UTC 2011 - klaussfreire@gmail.com - -- Fix nmi_watchdog handling, it was renamed as watchdog in recent - kernels [#684751] - ------------------------------------------------------------------- Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com diff --git a/oprofile.spec b/oprofile.spec index d5fc248..19e7fe3 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -1,7 +1,7 @@ # # spec file for package oprofile # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,17 +15,22 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: oprofile -BuildRequires: binutils-devel fdupes java2-devel-packages libtool libxslt popt-devel qt-devel update-desktop-files +BuildRequires: binutils-devel +BuildRequires: fdupes +BuildRequires: java2-devel-packages +BuildRequires: libtool +BuildRequires: libxslt +BuildRequires: popt-devel +BuildRequires: qt-devel +BuildRequires: update-desktop-files Url: http://oprofile.sourceforge.net/ -License: GPL-2.0+ ; LGPL-2.1+ -Group: Development/Tools/Other PreReq: /usr/sbin/groupadd /usr/sbin/useradd Version: 0.9.7 -Release: 1 +Release: 0 Summary: System-Wide Profiler for Linux Systems +License: GPL-2.0+ ; LGPL-2.1+ +Group: Development/Tools/Other BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{version}.tar.bz2 Source1: %{name}.desktop @@ -35,7 +40,6 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: oprofile-0.9.5-buildfixes.diff Patch2: oprofile-0.9.4-fixes.diff -Patch3: oprofile-0.9.7-watchdog.diff %description OProfile is a system-wide profiler for Linux systems, capable of @@ -61,8 +65,6 @@ This is the package containing the userspace tools. %package devel Summary: System-Wide Profiler for Linux Systems Group: Development/Libraries/C and C++ -License: GPL-2.0+ ; LGPL-2.1+ -AutoReqProv: on Requires: libopagent1 = %{version}-%{release} binutils-devel %description devel @@ -76,8 +78,6 @@ virtual machines. %package -n libopagent1 Summary: System-Wide Profiler for Linux Systems Group: Development/Libraries/C and C++ -License: GPL-2.0+ ; LGPL-2.1+ -AutoReqProv: on %description -n libopagent1 OProfile is a system-wide profiler for Linux systems, capable of @@ -91,7 +91,6 @@ from supported virtual machines. %setup -q %patch1 -p1 %patch2 -p1 -%patch3 -p1 mkdir -p java/include # copy files necessary to build Java agent libraries # libjvmpi_oprofile.so and libjvmti_oprofile.so From 30510b72e2120e7e03e0faa2aaaa026c3caf4f6f6b37a14b0c978226b3540216 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Tue, 11 Dec 2012 19:01:54 +0000 Subject: [PATCH 4/4] Accepting request 145122 from home:jones_tony:branches:devel:tools - Update to version 0.9.8. - Support for pre-2.6 kernels has been removed - The sample data format has changed (see bug #3309794 below for details) - A new 'operf' program is now available that allows non-root users to profile single processes. 'operf' can also be used for system-wide profiling, but root authority is required. This capability requires a kernel version of 2.6.31 or greater. - New Processors Support: Tilera (tile64 tilepro tile-gx) IBM (System z10 z196) Intel Ivy Bridge ARMv7 (Cortex-A5 Cortex-A15 Cortex-A7) - Numerous bugfixes OBS-URL: https://build.opensuse.org/request/show/145122 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=25 --- oprofile-0.9.4-fixes.diff | 34 ---------- oprofile-0.9.5-buildfixes.diff | 110 ------------------------------- oprofile-0.9.7.tar.bz2 | 3 - oprofile-0.9.8.tar.bz2 | 3 + oprofile-compressed-kernel.patch | 33 ++++++++++ oprofile-no-libjvm-version.patch | 33 ++++++++++ oprofile.changes | 17 +++++ oprofile.spec | 29 ++++---- 8 files changed, 102 insertions(+), 160 deletions(-) delete mode 100644 oprofile-0.9.4-fixes.diff delete mode 100644 oprofile-0.9.5-buildfixes.diff delete mode 100644 oprofile-0.9.7.tar.bz2 create mode 100644 oprofile-0.9.8.tar.bz2 create mode 100644 oprofile-compressed-kernel.patch create mode 100644 oprofile-no-libjvm-version.patch diff --git a/oprofile-0.9.4-fixes.diff b/oprofile-0.9.4-fixes.diff deleted file mode 100644 index 54fcf14..0000000 --- a/oprofile-0.9.4-fixes.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- - agents/jvmpi/jvmpi_oprofile.cpp | 2 ++ - libutil++/bfd_support.cpp | 3 +++ - 2 files changed, 5 insertions(+) - ---- a/agents/jvmpi/jvmpi_oprofile.cpp -+++ b/agents/jvmpi/jvmpi_oprofile.cpp -@@ -24,12 +24,14 @@ - * - */ - -+#include - #include - #include - #include - #include - #include - #include -+#include - - extern "C" { - #include ---- a/libutil++/bfd_support.cpp -+++ b/libutil++/bfd_support.cpp -@@ -370,6 +370,9 @@ bool interesting_symbol(asymbol * sym) - if (!(sym->section->flags & SEC_LOAD)) - return false; - -+ if (sym->flags & BSF_SECTION_SYM) -+ return false; -+ - return true; - } - diff --git a/oprofile-0.9.5-buildfixes.diff b/oprofile-0.9.5-buildfixes.diff deleted file mode 100644 index 4ab086a..0000000 --- a/oprofile-0.9.5-buildfixes.diff +++ /dev/null @@ -1,110 +0,0 @@ ---- - Makefile.am | 1 + - agents/jvmpi/Makefile.am | 4 ++-- - agents/jvmti/Makefile.am | 4 ++-- - libopagent/Makefile.am | 4 ++-- - m4/builtinexpect.m4 | 2 +- - m4/mallocattribute.m4 | 4 ++-- - utils/opcontrol | 13 +++++++++++-- - 7 files changed, 21 insertions(+), 11 deletions(-) - ---- a/Makefile.am -+++ b/Makefile.am -@@ -25,6 +25,7 @@ SUBDIRS = \ - - - -+AUTOMAKE_OPTIONS = foreign - ACLOCAL_AMFLAGS = -I m4 - - # The module will not build under distcheck ---- a/agents/jvmpi/Makefile.am -+++ b/agents/jvmpi/Makefile.am -@@ -1,6 +1,6 @@ --pkglib_LTLIBRARIES = libjvmpi_oprofile.la -+lib_LTLIBRARIES = libjvmpi_oprofile.la - --libjvmpi_oprofile_la_CXXFLAGS = -W -Wall -fPIC -+libjvmpi_oprofile_la_LDFLAGS = -module -avoid-version - - libjvmpi_oprofile_la_SOURCES = jvmpi_oprofile.cpp - ---- a/agents/jvmti/Makefile.am -+++ b/agents/jvmti/Makefile.am -@@ -1,8 +1,8 @@ - AM_CFLAGS = @OP_CFLAGS@ - --pkglib_LTLIBRARIES = libjvmti_oprofile.la -+lib_LTLIBRARIES = libjvmti_oprofile.la - --libjvmti_oprofile_la_CFLAGS = $(AM_CFLAGS) -fPIC -+libjvmti_oprofile_la_LDFLAGS = -module -avoid-version - - libjvmti_oprofile_la_LIBADD = ../../libopagent/libopagent.la - ---- a/libopagent/Makefile.am -+++ b/libopagent/Makefile.am -@@ -1,4 +1,4 @@ --pkglib_LTLIBRARIES = libopagent.la -+lib_LTLIBRARIES = libopagent.la - - # install opagent.h to include directory - include_HEADERS = opagent.h -@@ -10,7 +10,7 @@ libopagent_la_SOURCES = opagent.c \ - EXTRA_DIST = opagent_symbols.ver - - --libopagent_la_CFLAGS = -fPIC -I ${top_srcdir}/libop -I ${top_srcdir}/libutil -+libopagent_la_CPPFLAGS = -I ${top_srcdir}/libop -I ${top_srcdir}/libutil - libopagent_la_LIBADD = $(BFD_LIBS) - - # Do not increment the major version for this library except to ---- a/m4/builtinexpect.m4 -+++ b/m4/builtinexpect.m4 -@@ -5,7 +5,7 @@ AC_MSG_CHECKING([whether __builtin_expec - SAVE_CFLAGS=$CFLAGS - CFLAGS="-Werror $CFLAGS" - AC_TRY_LINK(,[ --int i; -+int i = 0; - if (__builtin_expect(i, 0)) { } - ], - AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", ---- a/m4/mallocattribute.m4 -+++ b/m4/mallocattribute.m4 -@@ -4,9 +4,9 @@ AC_DEFUN([AX_MALLOC_ATTRIBUTE], - AC_MSG_CHECKING([whether malloc attribute is understood]) - SAVE_CFLAGS=$CFLAGS - CFLAGS="-Werror $CFLAGS" --AC_TRY_COMPILE(,[ -+AC_TRY_COMPILE([ - void monkey() __attribute__((malloc)); --],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) -+],,AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) - CFLAGS=$SAVE_CFLAGS - ] - ) ---- a/utils/opcontrol -+++ b/utils/opcontrol -@@ -482,10 +482,19 @@ get_image_range() - exit 1 - fi - -+ kernel_file=$FILE_IMAGE -+ case $(file -L $kernel_file) in -+ *"gzip compressed"*) -+ kernel_file=$(mktemp /tmp/opcXXXXXX) || exit 1 -+ trap "rm -f $kernel_file" EXIT -+ gzip -cd $FILE_IMAGE > $kernel_file -+ ;; -+ esac -+ - # start at the start of .text, and end at _etext -- range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "` -+ range_info=`objdump -h $kernel_file 2>/dev/null | grep " .text "` - tmp1=`echo $range_info | awk '{print $4}'` -- tmp2=`objdump -t $FILE_IMAGE 2>/dev/null | grep "_etext$" | awk '{ print $1 }'` -+ tmp2=`objdump -t $kernel_file 2>/dev/null | grep "_etext$" | awk '{ print $1 }'` - - if test -z "$tmp1" -o -z "$tmp2"; then - echo "The specified file $FILE_IMAGE does not seem to be valid" >&2 diff --git a/oprofile-0.9.7.tar.bz2 b/oprofile-0.9.7.tar.bz2 deleted file mode 100644 index a042abf..0000000 --- a/oprofile-0.9.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34ae290c9be9675f925721561f569abc8d7e960d5a0f4a70adf224b16cca6d43 -size 1047960 diff --git a/oprofile-0.9.8.tar.bz2 b/oprofile-0.9.8.tar.bz2 new file mode 100644 index 0000000..4b318fa --- /dev/null +++ b/oprofile-0.9.8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f143b69b9c60bef6bc9b700ebcfc9c4f98a603cddec6f2764a7f02abeec2687d +size 1087805 diff --git a/oprofile-compressed-kernel.patch b/oprofile-compressed-kernel.patch new file mode 100644 index 0000000..170df53 --- /dev/null +++ b/oprofile-compressed-kernel.patch @@ -0,0 +1,33 @@ +From: Tony Jones +Subject: all compressed kernel when determining range +Upstream: no + +Extracted from 0.9.7 patch 'oprofile-0.9.5-buildfixes.diff'. + +This needs further investigation as purpose is unclear, since compressed image +isn't supported by underlying sampling code. + +--- a/utils/opcontrol ++++ b/utils/opcontrol +@@ -482,10 +482,19 @@ get_image_range() + exit 1 + fi + ++ kernel_file=$FILE_IMAGE ++ case $(file -L $kernel_file) in ++ *"gzip compressed"*) ++ kernel_file=$(mktemp /tmp/opcXXXXXX) || exit 1 ++ trap "rm -f $kernel_file" EXIT ++ gzip -cd $FILE_IMAGE > $kernel_file ++ ;; ++ esac ++ + # start at the start of .text, and end at _etext +- range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "` ++ range_info=`objdump -h $kernel_file 2>/dev/null | grep " .text "` + tmp1=`echo $range_info | awk '{print $4}'` +- tmp2=`objdump -t $FILE_IMAGE 2>/dev/null | grep "_etext$" | awk '{ print $1 }'` ++ tmp2=`objdump -t $kernel_file 2>/dev/null | grep "_etext$" | awk '{ print $1 }'` + + if test -z "$tmp1" -o -z "$tmp2"; then + echo "The specified file $FILE_IMAGE does not seem to be valid" >&2 diff --git a/oprofile-no-libjvm-version.patch b/oprofile-no-libjvm-version.patch new file mode 100644 index 0000000..c3bf760 --- /dev/null +++ b/oprofile-no-libjvm-version.patch @@ -0,0 +1,33 @@ +From: Tony Jones +Subject: Build libjvm[pt]i as so only +Upstream: no + +Only expected user is Java. + +Extracted from 0.9.7 patch 'oprofile-0.9.5-buildfixes.diff' + +--- + agents/jvmpi/Makefile.am | 1 + + agents/jvmti/Makefile.am | 1 + + 2 files changed, 2 insertions(+) + +--- a/agents/jvmpi/Makefile.am ++++ b/agents/jvmpi/Makefile.am +@@ -1,6 +1,7 @@ + pkglib_LTLIBRARIES = libjvmpi_oprofile.la + + libjvmpi_oprofile_la_CXXFLAGS = -W -Wall -fPIC ++libjvmpi_oprofile_la_LDFLAGS = -module -avoid-version + + libjvmpi_oprofile_la_SOURCES = jvmpi_oprofile.cpp + +--- a/agents/jvmti/Makefile.am ++++ b/agents/jvmti/Makefile.am +@@ -3,6 +3,7 @@ AM_CFLAGS = @OP_CFLAGS@ + pkglib_LTLIBRARIES = libjvmti_oprofile.la + + libjvmti_oprofile_la_CFLAGS = $(AM_CFLAGS) -fPIC ++libjvmti_oprofile_la_LDFLAGS = -module -avoid-version + + libjvmti_oprofile_la_LIBADD = ../../libopagent/libopagent.la + diff --git a/oprofile.changes b/oprofile.changes index c3c2466..c661daa 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Dec 10 20:37:17 UTC 2012 - tonyj@suse.com + +- Update to version 0.9.8. +- Support for pre-2.6 kernels has been removed +- The sample data format has changed (see bug #3309794 below for details) +- A new 'operf' program is now available that allows non-root users to profile + single processes. 'operf' can also be used for system-wide profiling, but + root authority is required. This capability requires a kernel version of + 2.6.31 or greater. +- New Processors Support: + Tilera (tile64 tilepro tile-gx) + IBM (System z10 z196) + Intel Ivy Bridge + ARMv7 (Cortex-A5 Cortex-A15 Cortex-A7) +- Numerous bugfixes + ------------------------------------------------------------------- Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com diff --git a/oprofile.spec b/oprofile.spec index 19e7fe3..f65cc94 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: oprofile BuildRequires: binutils-devel BuildRequires: fdupes @@ -26,10 +27,10 @@ BuildRequires: qt-devel BuildRequires: update-desktop-files Url: http://oprofile.sourceforge.net/ PreReq: /usr/sbin/groupadd /usr/sbin/useradd -Version: 0.9.7 +Version: 0.9.8 Release: 0 Summary: System-Wide Profiler for Linux Systems -License: GPL-2.0+ ; LGPL-2.1+ +License: GPL-2.0+ and LGPL-2.1+ Group: Development/Tools/Other BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{version}.tar.bz2 @@ -38,8 +39,8 @@ Source2: %{name}.rpmlintrc Source3: baselibs.conf Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES -Patch1: oprofile-0.9.5-buildfixes.diff -Patch2: oprofile-0.9.4-fixes.diff +Patch1: %{name}-compressed-kernel.patch +Patch2: %{name}-no-libjvm-version.patch %description OProfile is a system-wide profiler for Linux systems, capable of @@ -65,7 +66,8 @@ This is the package containing the userspace tools. %package devel Summary: System-Wide Profiler for Linux Systems Group: Development/Libraries/C and C++ -Requires: libopagent1 = %{version}-%{release} binutils-devel +Requires: binutils-devel +Requires: libopagent1 = %{version}-%{release} %description devel OProfile is a system-wide profiler for Linux systems, capable of @@ -99,11 +101,10 @@ ln -s %_libdir/jvm/java/include/* java/include test -f java/include/jvmpi.h || ln -s %{S:4} java/include %build -autoreconf -fi +sh autogen.sh ./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ --prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \ - --with-kernel-support --with-java=$PWD/java \ - --enable-gui=qt4 + --with-java=$PWD/java --enable-gui=qt4 # Change DATE/TIME macros to use last change time of oprofile.changes # See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" @@ -116,7 +117,7 @@ make %{?jobs:-j%jobs} %install make DESTDIR=$RPM_BUILD_ROOT htmldir=%{_docdir}/oprofile install %suse_update_desktop_file -i %name Development Profiling -rm -vf $RPM_BUILD_ROOT%{_libdir}/libopagent.*a +rm -f $RPM_BUILD_ROOT%{_libdir}/oprofile/libopagent.*a # Hardlink duplicate files automatically (from package fdupes): # It doesn't save much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT @@ -138,8 +139,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/applications/*.desktop /usr/share/oprofile %{_mandir}/man1/* -%{_libdir}/libjvm[tp]i_oprofile.so -%exclude %{_libdir}/libjvm[tp]i_oprofile.*a +%{_libdir}/oprofile/libjvm[tp]i_oprofile.so +%exclude %{_libdir}/oprofile/libjvm[tp]i_oprofile.*a %doc doc/oprofile.html doc/internals.html doc/opreport.xsd %doc COPYING README TODO ChangeLog-* @@ -147,10 +148,12 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) /usr/include/* %doc doc/op-jit-devel.html -%{_libdir}/libopagent.so +%dir %{_libdir}/oprofile +%{_libdir}/oprofile/libopagent.so %files -n libopagent1 %defattr(-,root,root) -%{_libdir}/libopagent.so.1* +%dir %{_libdir}/oprofile +%{_libdir}/oprofile/libopagent.so.1* %changelog