Blame SPECS/oprofile.spec

0978ec
%{?scl:%scl_package oprofile}
0978ec
0978ec
Summary: System wide profiler
0978ec
Name: %{?scl_prefix}oprofile
0978ec
Version: 1.3.0
0978ec
Release: 4%{?dist}
0978ec
License: GPLv2+ and LGPLv2+
0978ec
Group: Development/System
0978ec
#
0978ec
Source0: http://downloads.sourceforge.net/oprofile/oprofile-%{version}.tar.gz
0978ec
#FIXME a workaround until java-1.6.0-openjdk-devel is available on all archs
0978ec
Source1: openjdk-include.tar.gz
0978ec
Patch1: oprofile-ppc_null_event.patch
0978ec
Patch2: oprofile-no_orphan.patch
0978ec
Patch3: oprofile-offset.patch
0978ec
Requires: binutils
0978ec
Requires: which
0978ec
Requires(pre): shadow-utils
0978ec
Requires(postun): shadow-utils
0978ec
%{?scl:Requires:%scl_runtime}
0978ec
0978ec
URL: http://oprofile.sf.net
0978ec
0978ec
#If oprofile doesn't build on an arch, report it and will add ExcludeArch tag.
0978ec
BuildRequires: qt-devel
0978ec
BuildRequires: libxslt
0978ec
BuildRequires: docbook-style-xsl
0978ec
BuildRequires: docbook-utils
0978ec
BuildRequires: elinks
0978ec
BuildRequires: gtk2-devel
0978ec
BuildRequires: automake
0978ec
BuildRequires: libtool
0978ec
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
0978ec
BuildRequires: binutils-static
0978ec
BuildRequires: libpfm-devel >= 4.3.0
0978ec
%else
0978ec
BuildRequires: %{?scl_prefix}binutils-devel
0978ec
BuildRequires: binutils-devel
0978ec
%endif
0978ec
%if 0%{?rhel} == 6
0978ec
%ifnarch s390x s390
0978ec
BuildRequires: papi-devel
0978ec
%endif
0978ec
%endif
0978ec
%if 0%{?rhel} >= 6
0978ec
BuildRequires: popt-devel
0978ec
%else
0978ec
BuildRequires: popt
0978ec
%endif
0978ec
0978ec
#BuildRequires: java-devel
0978ec
#BuildRequires: jpackage-utils
0978ec
#BuildRequires: java-1.6.0-openjdk-devel
0978ec
0978ec
BuildRoot: %{_tmppath}/%{name}-root
0978ec
0978ec
%description
0978ec
OProfile is a profiling system for systems running Linux. The
0978ec
profiling runs transparently during the background, and profile data
0978ec
can be collected at any time. OProfile makes use of the hardware performance
0978ec
counters provided on Intel P6, and AMD Athlon family processors, and can use
0978ec
the RTC for profiling on other x86 processor types.
0978ec
0978ec
See the HTML documentation for further details.
0978ec
0978ec
%package devel
0978ec
Summary: Header files and libraries for developing apps which will use oprofile
0978ec
Group: Development/Libraries
0978ec
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
0978ec
Provides: %{?scl_prefix}oprofile-static = %{version}-%{release}
0978ec
0978ec
%description devel
0978ec
0978ec
Header files and libraries for developing apps which will use oprofile.
0978ec
0978ec
%package jit
0978ec
Summary: Libraries required for profiling Java and other JITed code
0978ec
Group: Development/System
0978ec
Requires: %{?scl_prefix}oprofile = %{version}-%{release}
0978ec
#Requires: java >= 1.6
0978ec
#Requires: jpackage-utils
0978ec
Requires(post): /sbin/ldconfig
0978ec
Requires(postun): /sbin/ldconfig
0978ec
Requires: /etc/ld.so.conf.d
0978ec
0978ec
%description jit
0978ec
This package includes a base JIT support library, as well as a Java
0978ec
agent library.
0978ec
0978ec
%prep
0978ec
%setup -q -n oprofile-%{version} -a1
0978ec
%patch1 -p1 -b .ppc_null_event
0978ec
%patch2 -p1 -b .noorphan
0978ec
%patch3 -p1 -b .offset
0978ec
0978ec
./autogen.sh
0978ec
0978ec
%build
0978ec
0978ec
%configure \
0978ec
--with-java=`pwd`/java-1.6.0-openjdk-1.6.0.0
0978ec
0978ec
make CFLAGS="$RPM_OPT_FLAGS"
0978ec
0978ec
#tweak the manual pages
0978ec
find -path "*/doc/*.1" -exec \
0978ec
    sed -i -e \
0978ec
     's,/doc/oprofile/,/doc/oprofile-%{version}/,g' {} \;
0978ec
0978ec
%install
0978ec
rm -rf %{buildroot}
0978ec
0978ec
mkdir -p %{buildroot}%{_bindir}
0978ec
mkdir -p %{buildroot}%{_mandir}/man1
0978ec
0978ec
make DESTDIR=%{buildroot} INSTALL="install -p" install
0978ec
0978ec
# We want the manuals in the special doc dir, not the generic doc install dir.
0978ec
# We build it in place and then move it away so it doesn't get installed
0978ec
# twice. rpm can specify itself where the (versioned) docs go with the
0978ec
# %%doc directive.
0978ec
mkdir docs.installed
0978ec
mv %{buildroot}%{_datadir}/doc/oprofile/* docs.installed/
0978ec
0978ec
%if 0%{?scl:1}
0978ec
# if developer tools set need to put the agentlib in an appropriate place
0978ec
mv %{buildroot}%{_libdir}/oprofile/* %{buildroot}%{_libdir}
0978ec
rmdir %{buildroot}%{_libdir}/oprofile
0978ec
%else
0978ec
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
0978ec
echo "%{_libdir}/oprofile" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/oprofile-%{_arch}.conf
0978ec
%endif
0978ec
0978ec
0978ec
%pre
0978ec
getent group oprofile >/dev/null || groupadd -r -g 16 oprofile
0978ec
getent passwd oprofile >/dev/null || \
0978ec
useradd -g oprofile -d /var/lib/oprofile -M -r -u 16 -s /sbin/nologin \
0978ec
    -c "Special user account to be used by OProfile" oprofile
0978ec
exit 0
0978ec
0978ec
%postun
0978ec
# do not try to remove existing oprofile user or group
0978ec
0978ec
%files
0978ec
%defattr(-,root,root)
0978ec
%doc  docs.installed/*
0978ec
%doc COPYING
0978ec
0978ec
%{_bindir}/*
0978ec
0978ec
%{_mandir}/man1/*
0978ec
0978ec
%{_datadir}/oprofile
0978ec
0978ec
%files devel
0978ec
%defattr(-,root,root)
0978ec
0978ec
%{_includedir}/opagent.h
0978ec
0978ec
%post jit -p /sbin/ldconfig
0978ec
0978ec
%postun jit -p /sbin/ldconfig
0978ec
0978ec
%files jit
0978ec
%defattr(-,root,root)
0978ec
0978ec
%if 0%{?scl:1}
0978ec
%{_libdir}/*
0978ec
%else
0978ec
%{_libdir}/oprofile
0978ec
%{_sysconfdir}/ld.so.conf.d/*
0978ec
%endif
0978ec
0978ec
%changelog
0978ec
* Tue Sep 24 2019 William Cohen <wcohen@redhat.com> - 1.3.0-4
0978ec
- Use mmap offset in the computation of pc address. rhbz1745134
0978ec
0978ec
* Thu Jul 25 2019 William Cohen <wcohen@redhat.com> - 1.3.0-3
0978ec
- Correctly kill child process when error occurs during setup.
0978ec
0978ec
* Fri Aug 3 2018 William Cohen <wcohen@redhat.com> - 1.3.0-2
0978ec
- Fix handling of null event name on ppc. rhbz1609797
0978ec
0978ec
* Mon Jul 16 2018 William Cohen <wcohen@redhat.com> - 1.3.0-1
0978ec
- Rebase to oprofile-1.3.0.
0978ec
0978ec
* Wed Apr 25 2018 William Cohen <wcohen@redhat.com> - 1.2.0-2.1
0978ec
- Power9 cpu recognition.
0978ec
0978ec
* Thu Feb 22 2018 William Cohen <wcohen@redhat.com> - 1.2.0-2
0978ec
- Rebuilt.
0978ec
0978ec
* Wed Jul 26 2017 William Cohen <wcohen@redhat.com> - 1.2.0-1
0978ec
- Rebase to oprofile-1.2.0.
0978ec
0978ec
* Fri Jun 16 2017 Will Cohen <wcohen@redhat.com> - 1.2.0-0.20170616git647ca9d0
0978ec
- Rebuild on oprofile git snapshot.
0978ec
0978ec
* Wed Oct 12 2016 Will Cohen <wcohen@redhat.com> - 1.1.0-4
0978ec
- Update events non-x86 architectures (aarch64, power, zseries)
0978ec
- Add support for newer Intel processors.
0978ec
0978ec
* Thu Sep 15 2016 Will Cohen <wcohen@redhat.com> - 1.1.0-3
0978ec
- Avoid duplicate event names for Nehalem and Westmere processors.
0978ec
0978ec
* Thu Aug 13 2015 Will Cohen <wcohen@redhat.com> - 1.1.0-2
0978ec
- Locate jvm agent libjvmti in a LD_LIBRARY_PATH directory.
0978ec
0978ec
* Tue Jul 21 2015 Will Cohen <wcohen@redhat.com> - 1.1.0-1
0978ec
- Rebase to oprofile-1.1.0.
0978ec
0978ec
* Thu Apr 23 2015 Will Cohen <wcohen@redhat.com> - 0.9.9-7
0978ec
- LLC_REFS and LLC_MISSES do not work on some CPUs.
0978ec
- incorrect handling of default unit masks longer than 11 characters
0978ec
- Oprofile updates for Avoton
0978ec
- Unable to profile jited JVM code when using static huge pages
0978ec
- operf causes rpmbuild to fail
0978ec
0978ec
* Wed Sep 17 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-6
0978ec
- Update support for Intel Silvermont (Avoton).
0978ec
- Enable configure for ppc64le.
0978ec
0978ec
* Mon Aug 18 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-5
0978ec
- Update Intel Haswell events.
0978ec
- Add support for Intel Silvermont (Avoton).
0978ec
- Add support for Intel Broadwell.
0978ec
- Add support for aarch64.
0978ec
- Update IBM power8 events.
0978ec
0978ec
* Wed May 28 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-2.1
0978ec
- Correct xml output.
0978ec
0978ec
* Fri May 16 2014 Will Cohen <wcohen@redhat.com> - 0.9.9-1.1
0978ec
- Rebase on oprofile-0.9.9.