Blame SPECS/oprofile.spec

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