d5fce7
Summary: An API for Run-time Code Generation
d5fce7
License: LGPLv2+
d5fce7
Name: dyninst
d5fce7
Group: Development/Libraries
d5fce7
Release: 3%{?dist}
d5fce7
URL: http://www.dyninst.org
d5fce7
Version: 9.3.1
d5fce7
# Dyninst only has full support for a few architectures.
d5fce7
# It has some preliminary support for aarch64 and ppc64le,
d5fce7
# but we're waiting for those to be feature-complete.
d5fce7
ExclusiveArch: %{ix86} x86_64 ppc ppc64
d5fce7
d5fce7
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
d5fce7
# Explicit version since it does not match the source version
d5fce7
Source1: https://github.com/dyninst/testsuite/archive/v9.3.0/testsuite-9.3.0.tar.gz
d5fce7
d5fce7
Patch1: testsuite-9.3.0-junit-nullptr.patch
d5fce7
Patch2: dyninst-9.3.1-Address.patch
d5fce7
Patch3: dyninst-rhbz1441810.patch
d5fce7
d5fce7
%global dyninst_base dyninst-%{version}
d5fce7
# Explicit version since it does not match the source version
d5fce7
%global testsuite_base testsuite-9.3.0
d5fce7
d5fce7
BuildRequires: gcc-c++
d5fce7
BuildRequires: libdwarf-devel >= 20111030
d5fce7
BuildRequires: elfutils-libelf-devel
d5fce7
BuildRequires: boost-devel
d5fce7
BuildRequires: binutils-devel
d5fce7
BuildRequires: cmake
d5fce7
d5fce7
# Extra requires just for the testsuite
d5fce7
BuildRequires: gcc-gfortran glibc-static libstdc++-static nasm
d5fce7
d5fce7
# Testsuite files should not provide/require anything
d5fce7
%{?filter_setup:
d5fce7
%filter_provides_in %{_libdir}/dyninst/testsuite/
d5fce7
%filter_requires_in %{_libdir}/dyninst/testsuite/
d5fce7
%filter_setup
d5fce7
}
d5fce7
d5fce7
%description
d5fce7
d5fce7
Dyninst is an Application Program Interface (API) to permit the insertion of
d5fce7
code into a running program. The API also permits changing or removing
d5fce7
subroutine calls from the application program. Run-time code changes are
d5fce7
useful to support a variety of applications including debugging, performance
d5fce7
monitoring, and to support composing applications out of existing packages.
d5fce7
The goal of this API is to provide a machine independent interface to permit
d5fce7
the creation of tools and applications that use run-time code patching.
d5fce7
d5fce7
%package doc
d5fce7
Summary: Documentation for using the Dyninst API
d5fce7
Group: Documentation
d5fce7
%description doc
d5fce7
dyninst-doc contains API documentation for the Dyninst libraries.
d5fce7
d5fce7
%package devel
d5fce7
Summary: Header files for the compiling programs with Dyninst
d5fce7
Group: Development/System
d5fce7
Requires: dyninst = %{version}-%{release}
d5fce7
Requires: boost-devel
d5fce7
d5fce7
%description devel
d5fce7
dyninst-devel includes the C header files that specify the Dyninst user-space
d5fce7
libraries and interfaces. This is required for rebuilding any program
d5fce7
that uses Dyninst.
d5fce7
d5fce7
%package static
d5fce7
Summary: Static libraries for the compiling programs with Dyninst
d5fce7
Group: Development/System
d5fce7
Requires: dyninst-devel = %{version}-%{release}
d5fce7
%description static
d5fce7
dyninst-static includes the static versions of the library files for
d5fce7
the dyninst user-space libraries and interfaces.
d5fce7
d5fce7
%package testsuite
d5fce7
Summary: Programs for testing Dyninst
d5fce7
Group: Development/System
d5fce7
Requires: dyninst = %{version}-%{release}
d5fce7
Requires: dyninst-devel = %{version}-%{release}
d5fce7
Requires: dyninst-static = %{version}-%{release}
d5fce7
Requires: glibc-static
d5fce7
%description testsuite
d5fce7
dyninst-testsuite includes the test harness and target programs for
d5fce7
making sure that dyninst works properly.
d5fce7
d5fce7
%prep
d5fce7
%setup -q -n %{name}-%{version} -c
d5fce7
%setup -q -T -D -a 1
d5fce7
d5fce7
%patch1 -p0 -b.nullptr
d5fce7
%patch2 -p0 -b.Address
d5fce7
%patch3 -p0 -b.1441810
d5fce7
d5fce7
# cotire seems to cause non-deterministic gcc errors
d5fce7
# https://bugzilla.redhat.com/show_bug.cgi?id=1420551
d5fce7
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
d5fce7
  %{dyninst_base}/cmake/shared.cmake
d5fce7
d5fce7
%build
d5fce7
d5fce7
cd %{dyninst_base}
d5fce7
d5fce7
%cmake \
d5fce7
 -DENABLE_STATIC_LIBS=1 \
d5fce7
 -DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
d5fce7
 -DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
d5fce7
 -DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
d5fce7
 -DCMAKE_BUILD_TYPE=None \
d5fce7
 -DCMAKE_SKIP_RPATH:BOOL=YES
d5fce7
%make_build
d5fce7
d5fce7
# Hack to install dyninst nearby, so the testsuite can use it
d5fce7
make DESTDIR=../install install
d5fce7
find ../install -name '*.cmake' -execdir \
d5fce7
  sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
d5fce7
d5fce7
cd ../%{testsuite_base}
d5fce7
%cmake \
d5fce7
 -DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
d5fce7
 -DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
d5fce7
 -DCMAKE_BUILD_TYPE:STRING=Debug \
d5fce7
 -DCMAKE_SKIP_RPATH:BOOL=YES
d5fce7
%make_build
d5fce7
d5fce7
%install
d5fce7
d5fce7
cd %{dyninst_base}
d5fce7
%make_install
d5fce7
d5fce7
# It doesn't install docs the way we want, so remove them.
d5fce7
# We'll just grab the pdfs later, directly from the build dir.
d5fce7
rm -v %{buildroot}%{_docdir}/*-%{version}.pdf
d5fce7
d5fce7
cd ../%{testsuite_base}
d5fce7
%make_install
d5fce7
d5fce7
mkdir -p %{buildroot}/etc/ld.so.conf.d
d5fce7
echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
d5fce7
d5fce7
# Ugly hack to mask testsuite files from debuginfo extraction.  Running the
d5fce7
# testsuite requires debuginfo, so extraction is useless.  However, debuginfo
d5fce7
# extraction is still nice for the main libraries, so we don't want to disable
d5fce7
# it package-wide.  The permissions are restored by attr(755,-,-) in files.
d5fce7
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
d5fce7
  -type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
d5fce7
d5fce7
%post -p /sbin/ldconfig
d5fce7
%postun -p /sbin/ldconfig
d5fce7
d5fce7
%files
d5fce7
%dir %{_libdir}/dyninst
d5fce7
%{_libdir}/dyninst/*.so.*
d5fce7
# dyninst mutators dlopen the runtime library
d5fce7
%{_libdir}/dyninst/libdyninstAPI_RT.so
d5fce7
d5fce7
%doc %{dyninst_base}/COPYRIGHT
d5fce7
%doc %{dyninst_base}/LGPL
d5fce7
d5fce7
%config(noreplace) /etc/ld.so.conf.d/*
d5fce7
d5fce7
%files doc
d5fce7
%doc %{dyninst_base}/dataflowAPI/doc/dataflowAPI.pdf
d5fce7
%doc %{dyninst_base}/dynC_API/doc/dynC_API.pdf
d5fce7
%doc %{dyninst_base}/dyninstAPI/doc/dyninstAPI.pdf
d5fce7
%doc %{dyninst_base}/instructionAPI/doc/instructionAPI.pdf
d5fce7
%doc %{dyninst_base}/parseAPI/doc/parseAPI.pdf
d5fce7
%doc %{dyninst_base}/patchAPI/doc/patchAPI.pdf
d5fce7
%doc %{dyninst_base}/proccontrol/doc/proccontrol.pdf
d5fce7
%doc %{dyninst_base}/stackwalk/doc/stackwalk.pdf
d5fce7
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
d5fce7
d5fce7
%files devel
d5fce7
%{_includedir}/dyninst
d5fce7
%{_libdir}/dyninst/*.so
d5fce7
%dir %{_libdir}/cmake
d5fce7
%{_libdir}/cmake/Dyninst
d5fce7
d5fce7
%files static
d5fce7
%{_libdir}/dyninst/*.a
d5fce7
d5fce7
%files testsuite
d5fce7
%{_bindir}/parseThat
d5fce7
%dir %{_libdir}/dyninst/testsuite/
d5fce7
# Restore the permissions that were hacked out above, during install.
d5fce7
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
d5fce7
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
d5fce7
d5fce7
%changelog
d5fce7
* Tue Mar 19 2019 Stan Cox <scox@redhat.com> - 9.3.1-3
d5fce7
- rhbz1498558: dyninst needs the -devel package installed
d5fce7
d5fce7
* Thu Jun 07 2018 Stan Cox <scox@redhat.com> - 9.3.1-2
d5fce7
- rhbz1441810: Handle regions with no disk backing for ppc static instrumenting
d5fce7
d5fce7
* Mon Mar 06 2017 Stan Cox <scox@redhat.com> - 9.3.1-1
d5fce7
- Update to 9.3.1
d5fce7
d5fce7
* Mon Oct 20 2014 Josh Stone <jistone@redhat.com> - 8.2.0-2
d5fce7
- rhbz1152270: enable bug workaround for syscall pc rewind on ppc
d5fce7
d5fce7
* Fri Sep 05 2014 Josh Stone <jistone@redhat.com> - 8.2.0-1
d5fce7
- rebase to 8.2.0, using upstream tag "v8.2.0.1"
d5fce7
d5fce7
* Mon Feb 10 2014 Josh Stone <jistone@redhat.com> 8.1.2-6
d5fce7
- rhbz1063447: squash testsuite g++ optimization
d5fce7
- rhbz1030969: backported additional patch to silence new warnings
d5fce7
d5fce7
* Thu Jan 16 2014 Josh Stone <jistone@redhat.com> 8.1.2-5
d5fce7
- rhbz1030969: backported upstream patches for image::findMain
d5fce7
d5fce7
* Tue Jan 07 2014 Josh Stone <jistone@redhat.com> 8.1.2-4
d5fce7
- rhbz1040652: backported upstream patches for mid-syscall PTRACE_EVENTs
d5fce7
d5fce7
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 8.1.2-3
d5fce7
- Mass rebuild 2013-12-27
d5fce7
d5fce7
* Fri Oct 25 2013 Josh Stone <jistone@redhat.com> 8.1.2-2
d5fce7
- rhbz1007500: Fix DYNINST_index_lock state and ppc64 writeFunctionPtr
d5fce7
d5fce7
* Tue Jun 18 2013 Josh Stone <jistone@redhat.com> 8.1.2-1
d5fce7
- Update to release 8.1.2.
d5fce7
d5fce7
* Fri Mar 15 2013 Josh Stone <jistone@redhat.com> 8.1.1-1
d5fce7
- Update to release 8.1.1.
d5fce7
- Drop the backported dyninst-test2_4-kill-init.patch.
d5fce7
- Drop the now-upstreamed dyninst-unused_vars.patch.
d5fce7
- Update other patches for context.
d5fce7
- Patch the installed symlinks to be relative, not $(DEST) filled.
d5fce7
d5fce7
* Tue Feb 26 2013 Josh Stone <jistone@redhat.com> 8.0-7
d5fce7
- testsuite: Require dyninst-devel for the libdyninstAPI_RT.so symlink
d5fce7
d5fce7
* Tue Feb 26 2013 Josh Stone <jistone@redhat.com> 8.0-6
d5fce7
- Fix the testsuite path to include libtestlaunch.so
d5fce7
d5fce7
* Mon Feb 25 2013 Josh Stone <jistone@redhat.com> 8.0-5
d5fce7
- Add a dyninst-testsuite package.
d5fce7
- Patch test2_4 to protect against running as root.
d5fce7
- Make dyninst-static require dyninst-devel.
d5fce7
d5fce7
* Thu Feb 14 2013 Josh Stone <jistone@redhat.com> 8.0-4
d5fce7
- Patch make.config to ensure rpm build flags are not discarded.
d5fce7
d5fce7
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 8.0-3
d5fce7
- Rebuild for Boost-1.53.0
d5fce7
d5fce7
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 8.0-2
d5fce7
- Rebuild for Boost-1.53.0
d5fce7
d5fce7
* Tue Nov 20 2012 Josh Stone <jistone@redhat.com>
d5fce7
- Tweak the configure/make commands
d5fce7
- Disable the testsuite via configure.
d5fce7
- Set the private includedir and libdir via configure.
d5fce7
- Set VERBOSE_COMPILATION for make.
d5fce7
- Use DESTDIR for make install.
d5fce7
d5fce7
* Mon Nov 19 2012 Josh Stone <jistone@redhat.com> 8.0-1
d5fce7
- Update to release 8.0.
d5fce7
- Updated "%files doc" to reflect renames.
d5fce7
- Drop the unused BuildRequires libxml2-devel.
d5fce7
- Drop the 7.99.x version-munging patch.
d5fce7
d5fce7
* Fri Nov 09 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.29
d5fce7
- Rebase to git e99d7070bbc39c76d6d528db530046c22681c17e
d5fce7
d5fce7
* Mon Oct 29 2012 Josh Stone <jistone@redhat.com> 7.99.2-0.28
d5fce7
- Bump to 7.99.2 per abi-compliance-checker results
d5fce7
d5fce7
* Fri Oct 26 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.27
d5fce7
- Rebase to git dd8f40b7b4742ad97098613876efeef46d3d9e65
d5fce7
- Use _smp_mflags to enable building in parallel.
d5fce7
d5fce7
* Wed Oct 03 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.26
d5fce7
- Rebase to git 557599ad7417610f179720ad88366c32a0557127
d5fce7
d5fce7
* Thu Sep 20 2012 Josh Stone <jistone@redhat.com> 7.99.1-0.25
d5fce7
- Rebase on newer git tree.
d5fce7
- Bump the fake version to 7.99.1 to account for ABI differences.
d5fce7
- Enforce the minimum libdwarf version.
d5fce7
- Drop the upstreamed R_PPC_NUM patch.
d5fce7
d5fce7
* Wed Aug 15 2012 Karsten Hopp <karsten@redhat.com> 7.99-0.24
d5fce7
- check if R_PPC_NUM is defined before using it, similar to R_PPC64_NUM
d5fce7
d5fce7
* Mon Jul 30 2012 Josh Stone <jistone@redhat.com> 7.99-0.23
d5fce7
- Rebase on newer git tree.
d5fce7
- Update license files with upstream additions.
d5fce7
- Split documentation into -doc subpackage.
d5fce7
- Claim ownership of %{_libdir}/dyninst.
d5fce7
d5fce7
* Fri Jul 27 2012 William Cohen <wcohen@redhat.com> - 7.99-0.22
d5fce7
- Correct requires for dyninst-devel.
d5fce7
d5fce7
* Wed Jul 25 2012 Josh Stone <jistone@redhat.com> - 7.99-0.21
d5fce7
- Rebase on newer git tree
d5fce7
- Update context in dyninst-git.patch
d5fce7
- Drop dyninst-delete_array.patch
d5fce7
- Drop dyninst-common-makefile.patch
d5fce7
d5fce7
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.99-0.20
d5fce7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d5fce7
d5fce7
* Mon Jul 16 2012 William Cohen <wcohen@redhat.com> - 7.99-0.19
d5fce7
- Patch common/i386-unknown-linux2.4/Makefile to build.
d5fce7
d5fce7
* Fri Jul 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.18
d5fce7
- Rebase on newer git tree the has a number of merges into it.
d5fce7
- Adjust spec file to allow direct use of git patches
d5fce7
- Fix to eliminate unused varables.
d5fce7
- Proper delete for array.
d5fce7
d5fce7
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.17
d5fce7
- Rebase on newer git repo.
d5fce7
d5fce7
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.16
d5fce7
- Eliminate dynptr.h file use with rebase on newer git repo.
d5fce7
d5fce7
* Mon Jun 25 2012 William Cohen <wcohen@redhat.com> - 7.99-0.14
d5fce7
- Rebase on newer git repo.
d5fce7
d5fce7
* Tue Jun 19 2012 William Cohen <wcohen@redhat.com> - 7.99-0.12
d5fce7
- Fix static library and header file permissions.
d5fce7
- Use sources from the dyninst git repositories.
d5fce7
- Fix 32-bit library versioning for libdyninstAPI_RT_m32.so.
d5fce7
d5fce7
* Wed Jun 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.11
d5fce7
- Fix library versioning.
d5fce7
- Move .so links to dyninst-devel.
d5fce7
- Remove unneded clean section.
d5fce7
d5fce7
* Fri May 11 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.9
d5fce7
- Clean up Makefile rules.
d5fce7
d5fce7
* Sat May 5 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.8
d5fce7
- Clean up spec file.
d5fce7
d5fce7
* Wed May 2 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.7
d5fce7
- Use "make install" and do staged build.
d5fce7
- Use rpm configure macro.
d5fce7
d5fce7
* Thu Mar 15 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.5
d5fce7
- Nuke the bundled boost files and use the boost-devel rpm instead.
d5fce7
d5fce7
* Mon Mar 12 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.4
d5fce7
- Initial submission of dyninst spec file.