Blame SPECS/dyninst.spec

368290
%{?scl:%scl_package dyninst}
368290
368290
Summary: An API for Run-time Code Generation
368290
License: LGPLv2+
368290
Name: %{?scl_prefix}dyninst
368290
Group: Development/Libraries
368290
Release: 1%{?dist}
368290
URL: http://www.dyninst.org
368290
Version: 11.0.0
368290
Exclusiveos: linux
368290
ExclusiveArch: %{ix86} x86_64
368290
368290
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
368290
Source1: https://github.com/dyninst/testsuite/archive/%{version}/testsuite-%{version}.tar.gz
368290
Source2: https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2
368290
Source3: https://github.com/01org/tbb/archive/2018_U6.tar.gz
368290
368290
Patch1: dyninst-11.0.0-cmake.patch
368290
Patch2: dyninst-11.0.0-elfstatic.patch
368290
Patch3: testsuite-11.0.0-test12.patch
368290
Patch4: testsuite-11.0.0-386.patch
368290
Patch5: dyninst-11.0.0-dwarf.patch
368290
Patch6: dyninst-11.0.0-tbb.patch
368290
Patch7: dyninst-11.0.0-amdgpu.patch
368290
%if 0%{?rhel} <= 7
368290
Patch8: testsuite-11.0.0-mutateecompiler.patch
368290
%endif
368290
368290
%global dyninst_base dyninst-%{version}
368290
%global testsuite_base testsuite-%{version}
368290
368290
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
368290
BuildRequires: boost-devel
368290
BuildRequires: binutils-devel
368290
BuildRequires: cmake
368290
BuildRequires: libtirpc-devel
368290
BuildRequires: tbb tbb-devel
368290
368290
%{?scl:Requires: %scl_runtime}
368290
368290
# Extra requires just for the testsuite
368290
# NB, there's no separate libstdc++-static for <=el6
368290
%if 0%{?rhel} >= 7
368290
BuildRequires: libstdc++-static
368290
%endif
368290
BuildRequires: gcc-gfortran glibc-static libxml2-devel
368290
368290
%if 0%{?rhel} <= 7
368290
# C++11 requires devtoolset gcc.
368290
BuildRequires: %{?scl_prefix}gcc-c++
368290
BuildRequires: %{?scl_prefix}elfutils
368290
BuildRequires: %{?scl_prefix}elfutils-devel
368290
BuildRequires: %{?scl_prefix}elfutils-libelf-devel
368290
BuildRequires: %{?scl_prefix}elfutils-debuginfod-client-devel
368290
%else
368290
BuildRequires: gcc-c++
368290
BuildRequires: elfutils-devel
368290
BuildRequires: elfutils-libelf-devel
368290
BuildRequires: elfutils-debuginfod-client-devel
368290
%endif
368290
Requires: %{?scl_prefix}elfutils
368290
368290
# Testsuite files should not provide/require anything
368290
%{?filter_setup:
368290
%filter_provides_in %{_libdir}/dyninst/testsuite/
368290
%filter_requires_in %{_libdir}/dyninst/testsuite/
368290
%filter_setup
368290
}
368290
368290
%description
368290
368290
Dyninst is an Application Program Interface (API) to permit the insertion of
368290
code into a running program. The API also permits changing or removing
368290
subroutine calls from the application program. Run-time code changes are
368290
useful to support a variety of applications including debugging, performance
368290
monitoring, and to support composing applications out of existing packages.
368290
The goal of this API is to provide a machine independent interface to permit
368290
the creation of tools and applications that use run-time code patching.
368290
368290
%package doc
368290
Summary: Documentation for using the Dyninst API
368290
Group: Documentation
368290
%description doc
368290
dyninst-doc contains API documentation for the Dyninst libraries.
368290
368290
%package devel
368290
Summary: Header files for compiling programs with Dyninst
368290
Group: Development/System
368290
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
368290
Requires: boost-devel
368290
Requires: tbb-devel
368290
%description devel
368290
dyninst-devel includes the C header files that specify the Dyninst user-space
368290
libraries and interfaces. This is required for rebuilding any program
368290
that uses Dyninst.
368290
368290
%package static
368290
Summary: Static libraries for the compiling programs with Dyninst
368290
Group: Development/System
368290
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
368290
%description static
368290
dyninst-static includes the static versions of the library files for
368290
the dyninst user-space libraries and interfaces.
368290
368290
%package testsuite
368290
Summary: Programs for testing Dyninst
368290
Group: Development/System
368290
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
368290
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
368290
Requires: %{?scl_prefix}dyninst-static = %{version}-%{release}
368290
Requires: glibc-static
368290
%description testsuite
368290
dyninst-testsuite includes the test harness and target programs for
368290
making sure that dyninst works properly.
368290
368290
%prep
368290
%setup -q -n %{name}-%{version} -c
368290
%setup -q -T -D -a 1
368290
# setup source3 boost by copying where cmake can find it to build its own copy
368290
cp %{_topdir}/SOURCES/boost_1_66_0.tar.bz2 /tmp
368290
# setup source4 tbb by copying where cmake can find it to build its own copy
368290
cp %{_topdir}/SOURCES/2018_U6.tar.gz /tmp
368290
368290
%patch1 -p1 -b.cmake
368290
%patch2 -p1 -b.elfstatic
368290
%patch3 -p1 -b.test12
368290
%patch4 -p1 -b.386
368290
%patch5 -p1 -b.dwarf
368290
%patch6 -p1 -b.tbb
368290
%patch7 -p1 -b.amdgpu
368290
%if 0%{?rhel} <= 7
368290
%patch8 -p1 -b.mutateecompiler
368290
%endif
368290
368290
# cotire seems to cause non-deterministic gcc errors
368290
# https://bugzilla.redhat.com/show_bug.cgi?id=1420551
368290
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
368290
  %{dyninst_base}/cmake/shared.cmake
368290
368290
%build
368290
368290
cd %{dyninst_base}
368290
368290
%if 0%{?rhel} <= 7
368290
# C++11 requires devtoolset gcc.
368290
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
368290
%endif
368290
368290
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
368290
LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
368290
%if 0%{?scl:1}
368290
    CPPFLAGS="-I%{_includedir}"
368290
    LDFLAGS="-L%{_libdir} -L%{_libdir}/elfutils"
368290
%endif
368290
%ifarch %{ix86}
368290
    CFLAGS="$CFLAGS -fno-lto -march=i686"
368290
    LDFLAGS="$LDFLAGS -fno-lto"
368290
%endif
368290
CXXFLAGS="$CFLAGS -std=c++11"
368290
export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
368290
368290
%cmake \
368290
 -DENABLE_STATIC_LIBS=1 \
368290
 -DENABLE_DEBUGINFOD=1  \
368290
 -DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
368290
 -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
368290
 -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
368290
 -DBoost_NO_BOOST_CMAKE=ON \
368290
 -DCMAKE_BUILD_TYPE:STRING=None \
368290
 -DCMAKE_SKIP_RPATH:BOOL=YES \
368290
 .
368290
# Dependencies building tbb, boost before dyninst are not correct
368290
LD_RUN_PATH="%{_libdir}"
368290
export LD_RUN_PATH
368290
# %cmake_build not available on rhel7
368290
# Dependencies do not take into account build of local tbb and local boost
368290
make -j1
368290
368290
# Hack to install dyninst nearby, so the testsuite can use it
368290
# Hack to install dyninst nearby, so the testsuite can use it
368290
make DESTDIR=../install install
368290
find ../install -name '*.cmake' -execdir \
368290
  sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
368290
# cmake mistakenly looks for libtbb.so in the dyninst install dir
368290
sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake
368290
368290
cd ../%{testsuite_base}
368290
%cmake \
368290
 -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
368290
 -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
368290
 -DCMAKE_BUILD_TYPE:STRING=Debug \
368290
 -DBoost_NO_BOOST_CMAKE=ON \
368290
 -DCMAKE_SKIP_RPATH:BOOL=YES \
368290
 .
368290
# %cmake_build not available on rhel7
368290
%make_build
368290
368290
%install
368290
368290
cd %{dyninst_base}
368290
%make_install
368290
368290
# It doesn't install docs the way we want, so remove them.
368290
# We'll just grab the pdfs later, directly from the build dir.
368290
rm -v %{buildroot}%{_docdir}/*-%{version}.pdf
368290
368290
cd ../%{testsuite_base}
368290
%make_install
368290
368290
# Ugly hack to mask testsuite files from debuginfo extraction.  Running the
368290
# testsuite requires debuginfo, so extraction is useless.  However, debuginfo
368290
# extraction is still nice for the main libraries, so we don't want to disable
368290
# it package-wide.  The permissions are restored by attr(755,-,-) in files.
368290
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
368290
  -type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
368290
368290
%files
368290
%defattr(-,root,root,-)
368290
368290
%dir %{_libdir}/dyninst
368290
%{_libdir}/dyninst/*.so.*
368290
# dyninst mutators dlopen the runtime library
368290
%{_libdir}/dyninst/libdyninstAPI_RT.so
368290
368290
%doc %{dyninst_base}/COPYRIGHT
368290
%doc %{dyninst_base}/LICENSE.md
368290
368290
# %config(noreplace) /etc/ld.so.conf.d/*
368290
368290
%files doc
368290
%defattr(-,root,root,-)
368290
%doc %{dyninst_base}/dataflowAPI/doc/dataflowAPI.pdf
368290
%doc %{dyninst_base}/dynC_API/doc/dynC_API.pdf
368290
%doc %{dyninst_base}/dyninstAPI/doc/dyninstAPI.pdf
368290
%doc %{dyninst_base}/instructionAPI/doc/instructionAPI.pdf
368290
%doc %{dyninst_base}/parseAPI/doc/parseAPI.pdf
368290
%doc %{dyninst_base}/patchAPI/doc/patchAPI.pdf
368290
%doc %{dyninst_base}/proccontrol/doc/proccontrol.pdf
368290
%doc %{dyninst_base}/stackwalk/doc/stackwalk.pdf
368290
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
368290
368290
%files devel
368290
%defattr(-,root,root,-)
368290
%{_includedir}/dyninst
368290
%{_includedir}/tbb
368290
%exclude %{_libdir}/dyninst/libInst.so
368290
%{_libdir}/dyninst/*.so
368290
%{_libdir}/cmake/Dyninst
368290
368290
%files static
368290
%defattr(-,root,root,-)
368290
%{_libdir}/dyninst/*.a
368290
368290
%files testsuite
368290
%defattr(-,root,root,-)
368290
%{_bindir}/parseThat
368290
368290
%dir %{_libdir}/dyninst/testsuite/
368290
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
368290
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
368290
368290
%changelog
368290
* Wed May 19 2021 Stan Cox <scox@redhat.com> - 11.0.0
368290
- Update to 11.0.0
368290
368290
* Fri Jan 22 2021 Stan Cox <scox@redhat.com> - 10.2.1-1
368290
- Update to 10.2.1
368290
368290
* Wed Jul 22 2020 Stan Cox <scox@redhat.com> - 10.1.0-5
368290
- Patch checkMutateeCompiler.cmake to force use of %{?scl_prefix}gcc-c++
368290
368290
* Wed Oct 23 2019 Stan Cox <scox@redhat.com> - 10.1.0-4
368290
- Remove ppc, ppc64, ppc64le, aarch64 for rhel-7
368290
- rhbz1763156 devtoolset-9-dyninst-10.1.0-3.el7.aarch64 broken 
368290
- rhbz1763157 devtoolset-9-dyninst-10.1.0-3.el7.ppc64 (big endian) broken 
368290
368290
* Mon Oct 07 2019 Stan Cox <scox@redhat.com> - 10.1.0-3
368290
- Install tbb/include
368290
368290
* Mon Sep 02 2019 Stan Cox <scox@redhat.com> - 10.1.0-2
368290
- Do not add libtbb*so libboost*so links to dyninst-devel.
368290
368290
* Thu Jul 25 2019 Stan Cox <scox@redhat.com> - 10.1.0-1
368290
- Update to 10.1.0
368290
368290
* Tue Jan 8 2019 Stan Cox <scox@redhat.com> - 9.3.2-6
368290
- rhbz1498558 Needs dyninst-devtoolset installed
368290
- rhbz1470149 Use separate debuginfo for dyninst-testsuite
368290
- rhbz1647471 so name clashes
368290
368290
* Tue Jul 17 2018 William Cohen <wcohen@redhat.com> - 9.3.2-5
368290
- Avoid conditional patching of source files.
368290
368290
* Thu Jul 05 2018 Stan Cox <scox@redhat.com> - 9.3.2-4
368290
- Make specfile rhel agnostic
368290
368290
* Thu Jan 04 2018 Stan Cox <scox@redhat.com> - 9.3.2-3
368290
- rhbz1503116 possible soname clashes between base rhel- and devtoolset- dyninst
368290
- rhbz1538757 segfault with a glibc built with binutils-2.27: handle R_*_IRELATIVE
368290
368290
* Thu Jan 04 2018 Stan Cox <scox@redhat.com> - 9.3.2-2
368290
- rhbz1503116 possible soname clashes between base rhel- and devtoolset- dyninst
368290
368290
* Fri Jun 16 2017 Stan Cox <scox@redhat.com> - 9.3.2-1
368290
- Remove ppc/ppc64 for rhel-6
368290
368290
* Fri Jun 09 2017 Stan Cox <scox@redhat.com> - 9.3.2-1
368290
- Rebase to 9.3.2
368290
368290
* Thu Sep 15 2016 Josh Stone <jistone@redhat.com> - 9.2.0-4
368290
- rhbz1366656: fix ppc64 relocation rewriting
368290
- rhbz1366726: check mmap constrains for locality
368290
- rhbz1367225: fix x86 codegen for 64-bit offsets
368290
368290
* Tue Aug 09 2016 Josh Stone <jistone@redhat.com> - 9.2.0-3
368290
- rhbz1363794: fix proccontrol attach without an exe.
368290
368290
* Tue Jul 26 2016 Josh Stone <jistone@redhat.com> - 9.2.0-2
368290
- Patch a template '>>' in stackanalysis.h for pre-C++11 users.
368290
368290
* Thu Jul 21 2016 Josh Stone <jistone@redhat.com> - 9.2.0-1
368290
- Update to 9.2.0
368290
368290
* Fri Mar 11 2016 Frank Ch. Eigler <fche@redhat.com> - 9.1.0-3
368290
- Export libdyninstAPI_RT_init_maxthreads (ref rhbz1315841/1316956)
368290
368290
* Thu Feb 25 2016 Frank Ch. Eigler <fche@redhat.com> - 9.1.0-2
368290
- buildroot bump respin
368290
368290
* Wed Jan 13 2016 Josh Stone <jistone@redhat.com> - 9.1.0-1
368290
- Update to 9.1.0
368290
368290
* Mon Sep 21 2015 Josh Stone <jistone@redhat.com> - 8.2.1-5
368290
- Rebuild for x86_64 only.
368290
368290
* Mon Sep 21 2015 Josh Stone <jistone@redhat.com> - 8.2.1-4
368290
- rhbz1261061: Make sure the system's Boost.cmake is not used.
368290
368290
* Wed Jan 07 2015 Josh Stone <jistone@redhat.com> - 8.2.1-3
368290
- Rebuild for x86_64 only.
368290
368290
* Wed Jan 07 2015 Josh Stone <jistone@redhat.com> - 8.2.1-2
368290
- Rebuild for releng updates.
368290
368290
* Wed Dec 17 2014 Josh Stone <jistone@redhat.com> - 8.2.1-1
368290
- Update to point release 8.2.1.
368290
368290
* Tue Aug 19 2014 Josh Stone <jistone@redhat.com> - 8.2.0-1
368290
- final rebase to 8.2.0, using upstream tag "v8.2.0.1"
368290
368290
* Thu Jul 24 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.440.gde280f74f40e
368290
- update to a newer pre-8.2.0 snapshot
368290
368290
* Wed May 21 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.374.g593fb2773a48
368290
- more libdyninstAPI_RT symbols, and add testsuite requires
368290
368290
* Wed May 21 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.373.geaba204a72a3
368290
- fix libdyninstAPI_RT.so symbol visibility
368290
368290
* Tue May 20 2014 Josh Stone <jistone@redhat.com> - 8.2.0-0.372.gdfd4a8842f4c
368290
- prerelease build of dyninst 8.2.0
368290
368290
* Tue Nov 26 2013 Josh Stone <jistone@redhat.com> 8.0-6dw
368290
- rhbz987096: backported upstream patches for mid-syscall PTRACE_EVENTs
368290
368290
* Wed Apr 17 2013 Josh Stone <jistone@redhat.com> 8.0-5dw
368290
- rhbz855981: backported upstream patch to remove missing-dwarf asserts
368290
368290
* Tue Feb 26 2013 Frank Ch. Eigler <fche@redhat.com> 8.0-4dw
368290
- fix %attr() of testsuite files
368290
368290
* Tue Feb 26 2013 Josh Stone <jistone@redhat.com> 8.0-3dw
368290
- rhbz915820: Add a dyninst-testsuite package.
368290
368290
* Thu Jan 31 2013 Frank Ch. Eigler <fche@redhat.com> - 8.0-2dw
368290
- convert to scl
368290
- bundle libdwarf temporarily
368290
368290
* Tue Nov 20 2012 Josh Stone <jistone@redhat.com>
368290
- Tweak the configure/make commands
368290
- Disable the testsuite via configure.
368290
- Set the private includedir and libdir via configure.
368290
- Set VERBOSE_COMPILATION for make.
368290
- Use DESTDIR for make install.
368290
368290
* Mon Nov 19 2012 Josh Stone <jistone@redhat.com> 8.0-1
368290
- Update to release 8.0.
368290
- Updated "%files doc" to reflect renames.
368290
- Drop the unused BuildRequires libxml2-devel.
368290
- Drop the 7.99.x version-munging patch.
368290
368290
* Fri Nov 09 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.29
368290
- Rebase to git e99d7070bbc39c76d6d528db530046c22681c17e
368290
368290
* Mon Oct 29 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.28
368290
- Bump to 7.99.2 per abi-compliance-checker results
368290
368290
* Fri Oct 26 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.27
368290
- Rebase to git dd8f40b7b4742ad97098613876efeef46d3d9e65
368290
- Use _smp_mflags to enable building in parallel.
368290
368290
* Wed Oct 03 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.26
368290
- Rebase to git 557599ad7417610f179720ad88366c32a0557127
368290
368290
* Thu Sep 20 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.25
368290
- Rebase on newer git tree.
368290
- Bump the fake version to 7.99.1 to account for ABI differences.
368290
- Enforce the minimum libdwarf version.
368290
- Drop the upstreamed R_PPC_NUM patch.
368290
368290
* Wed Aug 15 2012 Karsten Hopp <karsten@redhat.com> 7.99-0.24
368290
- check if R_PPC_NUM is defined before using it, similar to R_PPC64_NUM
368290
368290
* Mon Jul 30 2012 Josh Stone <jistone@redhat.com> 7.99-0.23
368290
- Rebase on newer git tree.
368290
- Update license files with upstream additions.
368290
- Split documentation into -doc subpackage.
368290
- Claim ownership of %{_libdir}/dyninst.
368290
368290
* Fri Jul 27 2012 William Cohen <wcohen@redhat.com> - 7.99-0.22
368290
- Correct requires for dyninst-devel.
368290
368290
* Wed Jul 25 2012 Josh Stone <jistone@redhat.com> - 7.99-0.21
368290
- Rebase on newer git tree
368290
- Update context in dyninst-git.patch
368290
- Drop dyninst-delete_array.patch
368290
- Drop dyninst-common-makefile.patch
368290
368290
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.99-0.20
368290
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
368290
368290
* Mon Jul 16 2012 William Cohen <wcohen@redhat.com> - 7.99-0.19
368290
- Patch common/i386-unknown-linux2.4/Makefile to build.
368290
368290
* Fri Jul 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.18
368290
- Rebase on newer git tree the has a number of merges into it.
368290
- Adjust spec file to allow direct use of git patches
368290
- Fix to eliminate unused varables.
368290
- Proper delete for array.
368290
368290
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.17
368290
- Rebase on newer git repo.
368290
368290
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.16
368290
- Eliminate dynptr.h file use with rebase on newer git repo.
368290
368290
* Mon Jun 25 2012 William Cohen <wcohen@redhat.com> - 7.99-0.14
368290
- Rebase on newer git repo.
368290
368290
* Tue Jun 19 2012 William Cohen <wcohen@redhat.com> - 7.99-0.12
368290
- Fix static library and header file permissions.
368290
- Use sources from the dyninst git repositories.
368290
- Fix 32-bit library versioning for libdyninstAPI_RT_m32.so.
368290
368290
* Wed Jun 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.11
368290
- Fix library versioning.
368290
- Move .so links to dyninst-devel.
368290
- Remove unneded clean section.
368290
368290
* Fri May 11 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.9
368290
- Clean up Makefile rules.
368290
368290
* Sat May 5 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.8
368290
- Clean up spec file.
368290
368290
* Wed May 2 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.7
368290
- Use "make install" and do staged build.
368290
- Use rpm configure macro.
368290
368290
* Thu Mar 15 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.5
368290
- Nuke the bundled boost files and use the boost-devel rpm instead.
368290
368290
* Mon Mar 12 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.4
368290
- Initial submission of dyninst spec file.