Blob Blame History Raw
%global tarball_revision 0
%global tarball_name %{name}-%{version}

Name: libabigail
Version: 1.7
Release: 1%{?dist}
Summary: Set of ABI analysis tools

License: LGPLv3+
URL: https://sourceware.org/libabigail/
Source0: ftp://mirrors.kernel.org/sourceware/libabigail/%{tarball_name}.tar.gz

BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: elfutils-devel
BuildRequires: libxml2-devel
BuildRequires: doxygen
BuildRequires: python-sphinx
BuildRequires: texinfo
BuildRequires: dos2unix
BuildRequires: dpkg
BuildRequires: python2-devel
BuildRequires: python-argparse
BuildRequires: rpm-python
BuildRequires: python-mock
BuildRequires: koji
BuildRequires: pyxdg
BuildRequires: python-unittest2
BuildRequires: wget
#For x-rpm mimetype definition!
BuildRequires: mailcap
BuildRequires: koji

Requires: pyxdg
Requires: rpm-python
Requires: koji
Requires: python2 >= 2.6
Requires: wget
#For x-rpm mimetype definition!
Requires: mailcap

%description
The libabigail package comprises seven command line utilities:
abidiff, kmidiff, abipkgdiff, abicompat, abidw, abilint and
fedabipkgdiff.  The abidiff command line tool compares the ABI of two
ELF shared libraries and emits meaningful textual reports about
changes impacting exported functions, variables and their types.
Simarly, the kmidiff compares the kernel module interface of two Linux
kernels.  abipkgdiff compares the ABIs of ELF binaries contained in
two packages.  abicompat checks if a subsequent version of a shared
library is still compatible with an application that is linked against
it.  abidw emits an XML representation of the ABI of a given ELF
shared library. abilint checks that a given XML representation of the
ABI of a shared library is correct.  fedabipkgdiff interacts with the
Fedora Build System over the internet to let the user compare the ABI
of Fedora packages without having to download them manually.

Install libabigail if you need to compare the ABI of ELF shared
libraries.

%package devel
Summary: Shared library and header files to write ABI analysis tools
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
This package contains a shared library and the associated header files
that are necessary to develop applications that use the C++ Libabigail
library.  The library provides facilities to analyze and compare
application binary interfaces of shared libraries in the ELF format.


%package doc
Summary: Man pages, texinfo files and html manuals of libabigail
Requires(post): info
Requires(preun): info

%description doc
This package contains documentation for the libabigail tools in the
form of man pages, texinfo documentation and API documentation in html
format.

%prep
%setup -n %{tarball_name}

%build
# Sometimes the libtool program generated on the developer's machine
# when she was doing make dist contains some flags that trigger the
# use of "/usr/lib/rpm/redhat/redhat-hardened-ld", which is not
# present on el6.  That flags like in the fild build-aux/ltmain.sh
# looks like:
#  compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
# So let's remove those flags if they are present.
if test -f build-aux/ltmain.sh; then
  sed -i -e "s/compiler_flags=.*/compiler_flags=/" build-aux/ltmain.sh
fi
%configure --disable-python3 --disable-silent-rules --disable-zip-archive --disable-static
make %{?_smp_mflags}
pushd doc
make html-doc
pushd manuals
make html-doc
%if 0%{!?el6}||0%{!?el5}
make man
make info
%endif
popd
popd

%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'

%if 0%{!?el6}&&0%{!?el5}
# Install man and texinfo files as they are not installed by the
# default 'install' target of the makefile.
make -C doc/manuals install-man-and-info-doc DESTDIR=%{buildroot}
dos2unix doc/manuals/html/_static/jquery.js
%endif

%check
time make %{?_smp_mflags} check || (cat tests/test-suite.log && exit 2)

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%if 0%{!?el6}&&0%{!?el5}
%post doc
/usr/sbin/install-info %{_infodir}/abigail.info* %{_infodir}/dir 2>/dev/null || :

%preun doc
if [ $1 -eq 0 ]; then
  /usr/sbin/install-info --delete %{_infodir}/abigail.info* %{_infodir}/dir 2>/dev/null || :
fi
%endif

%files
%{_bindir}/abicompat
%{_bindir}/abidiff
%{_bindir}/abidw
%{_bindir}/abilint
%{_bindir}/abipkgdiff
%{_bindir}/fedabipkgdiff
%{_bindir}/kmidiff
%{_libdir}/libabigail.so.0
%{_libdir}/libabigail.so.0.0.0
%{_libdir}/libabigail/default.abignore
%if 0%{?el6}||0%{?el5}
%doc README AUTHORS ChangeLog COPYING COPYING-LGPLV3 COPYING-GPLV3 doc/manuals/html/*
%else
%doc README AUTHORS ChangeLog
%license COPYING COPYING-LGPLV3 COPYING-GPLV3
%endif

%files devel
%{_libdir}/libabigail.so
%{_libdir}/pkgconfig/libabigail.pc
%{_includedir}/*
%{_datadir}/aclocal/abigail.m4

%if 0%{!?el6}&&0%{!?el5}
%files doc
%license COPYING  COPYING-LGPLV3 COPYING-GPLV3
%doc doc/manuals/html/*
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_infodir}/abigail.info*
%endif

%changelog
* Tue Feb 25 2020 Dodji Seketeli <dodji@redhat.com> - 1.7-1
- Update to upstream 1.7
- Add Koji as BuildRequires
  Fixes: RHBZ#1799575

* Thu Mar 28 2019 Dodji Seketeli <dodji@seketeli.org> - 1.6-1
- Update to upstream 1.6
- Remove patches:
  Support-having-several-debuginfo-search-dirs-for-a-b.patch
  Add-a-fail-no-debug-info-to-abidiff.patch

* Mon Nov 12 2018 Dodji Seketeli <dodji@redhat.com> - 1.5-2
- Apply patches
  Support-having-several-debuginfo-search-dirs-for-a-b.patch and
  Add-a-fail-no-debug-info-to-abidiff.patch

* Thu Oct 25 2018 Dodji Seketeli <dodji@seketeli.org> - 1.5-1
- Update to upstream 1.5 tarball

* Fri Jul 13 2018 Dodji Seketeli <dodji@redhat.com> - 1.4-1
- Update to upstream 1.4
- Merge change to build fedabipkgdiff in Fedora only

* Wed May 16 2018 Dodji Seketeli <dodji@redhat.com> - 1.3-1
- Update to upstream 1.3 version
- Make sure to disable python3

* Tue Mar  6 2018 Dodji Seketeli <dodji@seketeli.org> - 1.2-1
- Update to upstream 1.2

* Tue Jan 30 2018 Dodji Seketeli <dodji@seketeli.org> - 1.1-1
- Update to upstream 1.1

* Wed Nov 22 2017 Dodji Seketeli <dodji@seketeli.org> - 1.0-1
- Add missing %%{dist} to release.

* Tue Nov 7 2017 Dodji Seketeli <dodji@redhat.com> - 1.0-1
- Update to upstream 1.0 tarball
- Adjust tarball_revision and tarball_name macros
- Adjust Release macro
- Added missing build and runtime require 'mailcap' to allow
  fedabipkgdiff to detect RPM files
- Update description to account for the new kmidiff tool
- Remove patches that got applied upstream:
  0001-A-suppressed-diff-node-implies-suppressing-all-equiv.patch
  0001-Bug-20927-Segfault-when-HOME-is-not-set.patch
  0001-Fix-aborting-when-reading-.foo-symbols-from-a-ppc64-.patch
- Add kmidiff to the RPM

* Fri Dec  9 2016 Dodji Seketeli <dodji@redhat.com> - 1.0-0.8.rc6.4
- Fix upstream bug - Fix aborting when reading .foo symbols from a ppc64 binary

* Mon Dec  5 2016 Dodji Seketeli <dodji@redhat.com> - 1.0-0.8.rc6.3
- Fix upstream Bug 20927 - Segfault when abidiff is invoked with $HOME not set
  Apply the upstream patch here.

* Sat Nov 26 2016 Dodji Seketeli <dodji@redhat.com> - 1.0-0.8.rc6.2
- Fix an issue where some suppressed diff nodes are still visible in change reports
  This implies applying upstream patch:
   "[PATCH] A suppressed diff node implies suppressing all equivalent nodes too"

* Thu Nov 24 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.8.rc6.1
- Update to upstream 1.0.rc6 tarball
- Add pyxdg, rpm-python, koji and python2 as runtime dependencies.
- Add wget as a build and runtime requirement.  It's useful for fedabipkgdiff.
- Update package description to mention fedabipkgdiff

* Tue Jun 28 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.8.rc5.2
- Add README

* Mon Jun 27 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.8.rc5.1
- Update to upstream 1.0.rc5 tarball
- Add new build requires for new fedabipkgdiff tool: python2-devel,
  python-argparse, rpm-python, python-mock, koji, pyxdg,
  python-unittest2
- Add new %%{_bindir}/fedabipkgdiff binary and
  %%{_libdir}/libabigail/default.abignore configuration file to the set
  of distributed files. 
- Drop patches that were integrated upstream:
  0001-Bug-19961-Distinguish-between-PI-executable-and-shar.patch
  0002-Bug-19964-Cannot-load-function-aliases-on-ppc64.patch

* Mon Apr 25 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.8.rc4.2
- Fix PIE and ppc64 function aliases handling.
  The exact two upstream bugs fixed are:
    Bug 19961 - Distinguish between PI executable and shared library
    Bug 19964 - Cannot load function aliases on ppc64
  The two upstream patches applied are 8944ceb9ef03a4187 and 2529f84ae0e2ca2a

* Sun Apr 17 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.8.rc4.1
- Update to upstream 1.0.rc4
- Remove patch fix-test-diff-pkg-patch.txt as it got applied upstream

* Tue Mar  8 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.rc3.2
- Fix test-diff-pkg regression test failure due to a race condition.

* Tue Mar  8 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.rc3.1
- Update to upstream 1.0.rc3
- Add gcc-c++ as BuildRequires
- Drop the pactches to 1.0.rc2 as they are now integrated upstream in 1.0.rc3
- Measure the time taken by regression tests

* Fri Jan  8 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.rc2.2
- Add enum-val-stable-on-32-64-bits-patch

* Fri Jan  8 2016 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.rc2.1
- Update to upstream 1.0.rc2
- Build the tests in // if possible
- Add a patch to fix build on el6/g++ 4.4.7
- Drop the previous patches as they got integrated upstream

* Tue Nov 17 2015 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.3.rc0
- Fix use of redhat-hardened-ld link script on el6
- Add a patch to avoid using designated initializers in tools/abipkgdiff.cc
- Add a patch to avoid a test failure do to loss of precision of
  enumerator values on 32 bits x86.

* Tue Nov 17 2015 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.2.rc0
- Update to upstream release 1.0.rc0
- Take a tarball built using make dist now.
- Do not run autoreconf -i anymore, during the build.
- Add redhat-rpm-config to have binaries linked with
  /usr/lib/rpm/redhat/redhat-hardened-ld

* Wed Sep 9 2015 Dodji Seketeli <dodji@seketeli.org> - 1.0-0.1.20150909git164d17e
- Initial package for upstream git commit hash 164d17e