Blame SPECS/oprofile.spec

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