2015-01-13 10:34:15 +00:00
|
|
|
m4_define([version_major], [1])
|
2019-03-29 16:32:06 +00:00
|
|
|
m4_define([version_minor], [7])
|
2013-05-07 10:42:53 +00:00
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_INIT([libabigail],
|
2017-11-05 23:32:36 +00:00
|
|
|
[version_major.version_minor],
|
2013-02-28 10:42:57 +00:00
|
|
|
[http://sourceware.org/bugzilla],
|
|
|
|
[libabigail],
|
|
|
|
[http://sourceware.org/libabigail])
|
|
|
|
|
|
|
|
AC_PREREQ([2.63])
|
2014-09-09 10:36:24 +00:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
AC_CONFIG_SRCDIR([README])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
dnl Include some autoconf macros to check for python modules.
|
|
|
|
dnl
|
|
|
|
dnl These macros are coming from the autoconf archive at
|
|
|
|
dnl http://www.gnu.org/software/autoconf-archive
|
|
|
|
|
2016-06-03 14:36:52 +00:00
|
|
|
dnl This one is for the AX_CHECK_PYTHON_MODULES() macro.
|
|
|
|
m4_include([autoconf-archive/ax_check_python_modules.m4])
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
|
|
|
|
dnl These two below are for the AX_PROG_PYTHON_VERSION() module.
|
|
|
|
m4_include([autoconf-archive/ax_compare_version.m4])
|
|
|
|
m4_include([autoconf-archive/ax_prog_python_version.m4])
|
|
|
|
|
2016-05-21 00:09:50 +00:00
|
|
|
dnl This one is to be able to run "make check-valgrind"
|
|
|
|
dnl and have unit tests run under der Valgrind.
|
|
|
|
m4_include([autoconf-archive/ax_valgrind_check.m4])
|
|
|
|
|
2014-12-27 11:54:28 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.11.1 foreign subdir-objects tar-ustar parallel-tests])
|
2013-02-28 10:42:57 +00:00
|
|
|
AM_MAINTAINER_MODE([enable])
|
|
|
|
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
|
2013-05-07 10:42:53 +00:00
|
|
|
VERSION_MAJOR=version_major
|
|
|
|
VERSION_MINOR=version_minor
|
2018-01-09 17:03:42 +00:00
|
|
|
VERSION_REVISION=0
|
2013-05-07 10:42:53 +00:00
|
|
|
|
|
|
|
AC_SUBST(VERSION_MAJOR)
|
|
|
|
AC_SUBST(VERSION_MINOR)
|
|
|
|
AC_SUBST(VERSION_REVISION)
|
|
|
|
|
2019-12-15 23:51:51 +00:00
|
|
|
dnl This VERSION_SUFFIX environment variable is to allow appending
|
|
|
|
dnl arbitrary text to the libabigail version string representation.
|
|
|
|
dnl That is useful to identify custom versions of the library
|
|
|
|
dnl (e.g. development versions or versions of a particular origin).
|
|
|
|
dnl
|
|
|
|
dnl The feature can be enabled by passing VERSION_SUFFIX to `configure`,
|
|
|
|
dnl e.g.
|
|
|
|
dnl
|
|
|
|
dnl $ configure VERSION_SUFFIX="-dev"
|
|
|
|
AC_SUBST(VERSION_SUFFIX)
|
|
|
|
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
AC_ARG_ENABLE(rpm,
|
|
|
|
AS_HELP_STRING([--enable-rpm=yes|no|auto],
|
2015-08-22 12:27:37 +00:00
|
|
|
[enable the support of rpm in abipkgdiff (default is auto)]),
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
ENABLE_RPM=$enableval,
|
|
|
|
ENABLE_RPM=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(deb,
|
2016-03-18 17:25:49 +00:00
|
|
|
AS_HELP_STRING([--enable-deb=yes|no|auto],
|
2015-08-22 12:27:37 +00:00
|
|
|
[enable the support of deb in abipkgdiff (default is auto)]),
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
ENABLE_DEB=$enableval,
|
|
|
|
ENABLE_DEB=auto)
|
|
|
|
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
AC_ARG_ENABLE(tar,
|
|
|
|
AS_HELP_STRING([--enable-tar=yes|no|auto],
|
|
|
|
[enable the support of GNU tar archives in abipkgdiff (default is auto)]),
|
|
|
|
ENABLE_TAR=$enableval,
|
|
|
|
ENABLE_TAR=auto)
|
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
AC_ARG_ENABLE(zip-archive,
|
|
|
|
AS_HELP_STRING([--enable-zip-archive=yes|no|auto],
|
2015-06-23 10:21:30 +00:00
|
|
|
[enable bundling of TUs in zip archives (default is no)]),
|
2014-08-31 08:34:11 +00:00
|
|
|
ENABLE_ZIP_ARCHIVE=$enableval,
|
2015-06-23 10:21:30 +00:00
|
|
|
ENABLE_ZIP_ARCHIVE=no)
|
2014-08-31 08:34:11 +00:00
|
|
|
|
|
|
|
|
2014-11-05 09:08:33 +00:00
|
|
|
AC_ARG_ENABLE(cxx11,
|
|
|
|
AS_HELP_STRING([--enable-cxx11=yes|no],
|
|
|
|
[enable features that use the C++11 compiler]),
|
|
|
|
ENABLE_CXX11=$enableval,
|
|
|
|
ENABLE_CXX11=no)
|
|
|
|
|
2014-11-19 16:08:10 +00:00
|
|
|
AC_ARG_ENABLE(apidoc,
|
|
|
|
AS_HELP_STRING([--enable-apidoc=yes|no|auto],
|
|
|
|
[enable generation of the apidoc in html]),
|
|
|
|
ENABLE_APIDOC=$enableval,
|
|
|
|
ENABLE_APIDOC=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(manual,
|
|
|
|
AS_HELP_STRING([--enable-manual=yes|no|auto],
|
|
|
|
[enable generation of the manual in html]),
|
|
|
|
ENABLE_MANUAL=$enableval,
|
|
|
|
ENABLE_MANUAL=auto)
|
|
|
|
|
2015-11-14 17:32:01 +00:00
|
|
|
AC_ARG_ENABLE([bash-completion],
|
|
|
|
AS_HELP_STRING([--enable-bash-completion=yes|no|auto],
|
|
|
|
[enable using completion files for tools]),
|
|
|
|
ENABLE_BASH_COMPLETION=$enableval,
|
|
|
|
ENABLE_BASH_COMPLETION=auto)
|
|
|
|
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
AC_ARG_ENABLE([fedabipkgdiff],
|
|
|
|
AS_HELP_STRING([--enable-fedabipkgdiff=yes|no|auto],
|
|
|
|
[enable the fedabipkgdiff tool]),
|
|
|
|
ENABLE_FEDABIPKGDIFF=$enableval,
|
|
|
|
ENABLE_FEDABIPKGDIFF=auto)
|
|
|
|
|
2018-03-25 07:34:59 +00:00
|
|
|
AC_ARG_ENABLE([python3],
|
|
|
|
AS_HELP_STRING([--enable-python3=yes|no|auto],
|
|
|
|
[enable running abigail tools with python3 (default is auto)]),
|
|
|
|
ENABLE_PYTHON3=$enableval,
|
|
|
|
ENABLE_PYTHON3=auto)
|
|
|
|
|
2019-04-18 13:46:34 +00:00
|
|
|
AC_ARG_ENABLE(asan,
|
|
|
|
AS_HELP_STRING([--enable-asan=yes|no],
|
|
|
|
[enable the support of building with -fsanitize=address)]),
|
|
|
|
ENABLE_ASAN=$enableval,
|
|
|
|
ENABLE_ASAN=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ubsan,
|
|
|
|
AS_HELP_STRING([--enable-ubsan=yes|no],
|
|
|
|
[enable the support of building with -fsanitize=undefined)]),
|
|
|
|
ENABLE_UBSAN=$enableval,
|
|
|
|
ENABLE_UBSAN=no)
|
|
|
|
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
dnl *************************************************
|
2015-08-14 10:46:36 +00:00
|
|
|
dnl check for dependencies
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
dnl *************************************************
|
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
LT_PREREQ([2.2])
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
AC_LANG_COMPILER_REQUIRE
|
|
|
|
|
2016-07-22 09:01:41 +00:00
|
|
|
dnl
|
|
|
|
dnl check if the c++ compiler has support __attribute__((visibility("hidden")))
|
|
|
|
dnl
|
|
|
|
AC_MSG_NOTICE([checking for GCC visibility attribute support ...])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
struct __attribute__((visibility("hidden"))) Foo
|
|
|
|
{
|
|
|
|
int m0;
|
|
|
|
|
|
|
|
Foo()
|
|
|
|
: m0()
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
]])],
|
|
|
|
[SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=yes],
|
|
|
|
[SUPPORTS_GCC_VISIBILITY_ATTRIBUTE=no]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test x$SUPPORTS_GCC_VISIBILITY_ATTRIBUTE = xyes; then
|
|
|
|
AC_MSG_NOTICE([GCC visibility attribute is supported])
|
|
|
|
AC_DEFINE([HAS_GCC_VISIBILITY_ATTRIBUTE], 1,
|
|
|
|
[Defined if the compiler supports the attribution visibility syntax __attribute__((visibility("hidden")))])
|
2016-07-27 10:18:58 +00:00
|
|
|
VISIBILITY_FLAGS="-fvisibility=hidden"
|
2016-07-22 09:01:41 +00:00
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([GCC visibility attribute is not supported])
|
2016-07-27 10:18:58 +00:00
|
|
|
VISIBILITY_FLAGS=
|
2016-07-22 09:01:41 +00:00
|
|
|
fi
|
|
|
|
|
2016-07-27 10:18:58 +00:00
|
|
|
AC_SUBST(VISIBILITY_FLAGS)
|
|
|
|
|
2017-11-13 11:52:07 +00:00
|
|
|
dnl Older glibc had a broken fts that didn't work with Large File Systems.
|
|
|
|
dnl We want the version that can handler LFS, but include workaround if we
|
|
|
|
dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
|
|
|
|
dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
|
|
|
|
AC_CACHE_CHECK([whether including fts.h with _FILE_OFFSET_BITS set breaks], ac_cv_bad_fts,
|
|
|
|
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
#define _FILE_OFFSET_BITS 64
|
|
|
|
#include <fts.h>
|
|
|
|
]])],
|
|
|
|
ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
|
|
|
|
AS_IF([test "x$ac_cv_bad_fts" = "xyes"],
|
|
|
|
[CFLAGS="$CFLAGS -DBAD_FTS=1",
|
|
|
|
CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
|
|
|
|
|
2015-01-07 12:45:53 +00:00
|
|
|
dnl Check for dependency: libelf, libdw, libebl (elfutils)
|
2016-02-11 11:37:03 +00:00
|
|
|
dnl Note that we need to use at least elfutils 0.159 but
|
|
|
|
dnl at that time elfutils didnt have pkgconfig capabilities
|
|
|
|
dnl to easily query for its version.
|
2015-01-07 12:45:53 +00:00
|
|
|
ELF_LIBS=
|
|
|
|
AC_CHECK_LIB([elf], [elf_end], [ELF_LIBS="-lelf"])
|
|
|
|
AC_CHECK_HEADER([libelf.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([could not find libelf.h])])
|
|
|
|
|
2013-12-07 07:07:54 +00:00
|
|
|
DW_LIBS=
|
|
|
|
AC_CHECK_LIB(dw, dwfl_begin, [DW_LIBS=-ldw])
|
Plug leak of debug info handles
On recent elfutils where the libdw's function dwarf_getalt exists, we
don't need to try and find the alternate debug info file ourselves by
using the function dwfl_standard_find_debuginfo. Furthermore, when we
use that function on those recent elfutils versions, we leak the elf
resources allocated in the debug info resources; we also leak the file
descriptor to access the alternate debug info sections.
More generally, we also leak debug info handles used to access debug
info when using get_soname_of_elf_file and get_type_of_elf_file.
This patch plugs those leaks.
In the first case, if the function dwarf_getalt exists, the patch just
uses it to get the alternate debug info. Otherwise, the patch uses
the dwfl_standard_find_debuginfo function like we used to, but then it
tries hard to free the file descriptor and debuginfo memory of the
alternate debug info.
* configure.ac: Check the presence of dwarf_getalt in libdw. If
it's present, define the preprocessor macro
LIBDW_HAS_DWARF_GETALT. Update the autoconf configuration
summary.
* src/abg-dwarf-reader.cc: Add config.h.
(find_alt_debug_info_location): Factorize this out of ...
(find_alt_debug_info): ... this function. Use dwarf_getalt if
present, otherwise, keep using dwfl_standard_find_debuginfo. In
the later case, return the file descriptor opened to access the
alternate debug info, by parameter, so that the caller can fclose
it.
(read_context::alt_fd_): New data member.
(read_context::read_context): Initialize the new alt_fd_ data
member.
(read_context::load_debug_info): Store the file descriptor used to
access the alternate debug info into the new alt_fd_ data member.
(read_context::~read_context): New desctructor.
(get_soname_of_elf_file, get_type_of_elf_file): Free the elf
handle.
(read_context::load_debug_info): Be paranoid in making sure we
never override alt_dwarf_.
* tests/data/test-alt-dwarf-file/test0-report.txt: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-22 09:39:33 +00:00
|
|
|
AC_CHECK_LIB(dw, dwarf_getalt,
|
|
|
|
[FOUND_DWARF_GETALT_IN_LIBDW=yes],
|
|
|
|
[FOUND_DWARF_GETALT_IN_LIBDW=no])
|
|
|
|
|
2013-12-07 07:07:54 +00:00
|
|
|
AC_CHECK_HEADER(elfutils/libdwfl.h,
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([could not find elfutils/libdwfl.h installed])])
|
2015-01-07 12:45:53 +00:00
|
|
|
|
2019-01-09 14:22:01 +00:00
|
|
|
dnl Allow users to compile with the NDEBUG macro defined,
|
|
|
|
dnl meaning they are compiling in a mode where the
|
|
|
|
dnl assert call does nothing. With the directive below,
|
|
|
|
dnl users just need to pass the --disable-assert
|
|
|
|
dnl option to configure.
|
|
|
|
AC_HEADER_ASSERT
|
|
|
|
|
2015-01-07 12:45:53 +00:00
|
|
|
if test x$ELF_LIBS = x; then
|
|
|
|
AC_MSG_ERROR([could not find elfutils elf library installed])
|
|
|
|
fi
|
2013-12-07 07:07:54 +00:00
|
|
|
|
|
|
|
if test x$DW_LIBS = x; then
|
|
|
|
AC_MSG_ERROR([could not find elfutils dwarf library installed])
|
|
|
|
fi
|
|
|
|
|
2016-10-27 14:05:35 +00:00
|
|
|
if test x$FOUND_DWARF_GETALT_IN_LIBDW = xyes; then
|
Plug leak of debug info handles
On recent elfutils where the libdw's function dwarf_getalt exists, we
don't need to try and find the alternate debug info file ourselves by
using the function dwfl_standard_find_debuginfo. Furthermore, when we
use that function on those recent elfutils versions, we leak the elf
resources allocated in the debug info resources; we also leak the file
descriptor to access the alternate debug info sections.
More generally, we also leak debug info handles used to access debug
info when using get_soname_of_elf_file and get_type_of_elf_file.
This patch plugs those leaks.
In the first case, if the function dwarf_getalt exists, the patch just
uses it to get the alternate debug info. Otherwise, the patch uses
the dwfl_standard_find_debuginfo function like we used to, but then it
tries hard to free the file descriptor and debuginfo memory of the
alternate debug info.
* configure.ac: Check the presence of dwarf_getalt in libdw. If
it's present, define the preprocessor macro
LIBDW_HAS_DWARF_GETALT. Update the autoconf configuration
summary.
* src/abg-dwarf-reader.cc: Add config.h.
(find_alt_debug_info_location): Factorize this out of ...
(find_alt_debug_info): ... this function. Use dwarf_getalt if
present, otherwise, keep using dwfl_standard_find_debuginfo. In
the later case, return the file descriptor opened to access the
alternate debug info, by parameter, so that the caller can fclose
it.
(read_context::alt_fd_): New data member.
(read_context::read_context): Initialize the new alt_fd_ data
member.
(read_context::load_debug_info): Store the file descriptor used to
access the alternate debug info into the new alt_fd_ data member.
(read_context::~read_context): New desctructor.
(get_soname_of_elf_file, get_type_of_elf_file): Free the elf
handle.
(read_context::load_debug_info): Be paranoid in making sure we
never override alt_dwarf_.
* tests/data/test-alt-dwarf-file/test0-report.txt: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-22 09:39:33 +00:00
|
|
|
AC_DEFINE([LIBDW_HAS_DWARF_GETALT], 1,
|
|
|
|
[Defined if libdw has the function dwarf_getalt])
|
|
|
|
fi
|
|
|
|
|
2013-12-07 07:07:54 +00:00
|
|
|
AC_SUBST(DW_LIBS)
|
2014-09-09 12:53:41 +00:00
|
|
|
AC_SUBST([ELF_LIBS])
|
2013-12-07 07:07:54 +00:00
|
|
|
|
2013-03-27 19:07:03 +00:00
|
|
|
dnl Check for dependency: libxml
|
|
|
|
LIBXML2_VERSION=2.6.22
|
|
|
|
PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_VERSION)
|
2013-08-22 14:57:42 +00:00
|
|
|
|
|
|
|
AC_SUBST(LIBXML2_VERSION)
|
2013-03-27 19:07:03 +00:00
|
|
|
AC_SUBST(XML_LIBS)
|
|
|
|
AC_SUBST(XML_CFLAGS)
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
2015-08-14 10:48:35 +00:00
|
|
|
dnl Check for some programs like rm, mkdir, etc ...
|
|
|
|
AC_CHECK_PROG(HAS_RM, rm, yes, no)
|
|
|
|
if test x$HAS_RM = xno; then
|
|
|
|
AC_MSG_ERROR([could not find the program 'rm' installed])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_PROG(HAS_MKDIR, mkdir, yes, no)
|
|
|
|
if test x$HAS_MKDIR = xno; then
|
|
|
|
AC_MSG_ERROR([could not find the program 'mkdir' installed])
|
|
|
|
fi
|
|
|
|
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
dnl Check for the rpm2cpio and cpio programs
|
|
|
|
if test x$ENABLE_RPM = xyes -o x$ENABLE_RPM = xauto; then
|
|
|
|
AC_CHECK_PROG(HAS_RPM2CPIO, rpm2cpio, yes, no)
|
|
|
|
AC_CHECK_PROG(HAS_CPIO, cpio, yes, no)
|
2018-03-29 11:28:29 +00:00
|
|
|
AC_CHECK_PROG(HAS_RPM, rpm, yes, no)
|
2016-03-18 17:25:49 +00:00
|
|
|
|
2018-03-29 11:28:29 +00:00
|
|
|
if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes -a x$HAS_RPM = xyes; then
|
2016-12-12 15:37:54 +00:00
|
|
|
ENABLE_RPM=yes
|
|
|
|
else
|
|
|
|
if test x$ENABLE_RPM = xyes; then
|
2018-03-29 11:28:29 +00:00
|
|
|
AC_MSG_ERROR([rpm support in abipkgdiff needs 'rpm2cpio', 'cpio' and 'rpm' programs to be installed])
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
fi
|
2016-12-12 15:37:54 +00:00
|
|
|
ENABLE_RPM=no
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_RPM = xyes; then
|
|
|
|
AC_DEFINE([WITH_RPM], 1, [compile the rpm package support in abipkgdiff])
|
|
|
|
AC_MSG_NOTICE(rpm support in abipkgdiff is enabled);
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(rpm support in abipkgdiff is disabled);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_RPM, test x$ENABLE_RPM = xyes)
|
|
|
|
|
|
|
|
dnl Check for the dpkg program
|
|
|
|
if test x$ENABLE_DEB = xauto -o x$ENABLE_DEB = xyes; then
|
|
|
|
AC_CHECK_PROG(HAS_DPKG, dpkg, yes, no)
|
|
|
|
|
|
|
|
if test x$ENABLE_DEB = xauto; then
|
|
|
|
if test x$HAS_DPKG = xyes; then
|
|
|
|
ENABLE_DEB=yes
|
2015-10-15 10:51:33 +00:00
|
|
|
else
|
|
|
|
ENABLE_DEB=no
|
Make the support of RPM and DEB package formats conditional
If at configure time the libabigail source tarball detects that
rpm2cpio and cpio are present then it enables the support for rpm
files. Users can explicitly enable or disable that support by passing
--enable-rpm or --disable-rpm to configure.
Similarly if it detects that dpkg is present at configure time then it
enables the support for deb files. Users can explicitly enable or
disable that support by passing --enable-deb or --disable-deb to
configure.
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-14 10:49:57 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_DEB = xyes; then
|
|
|
|
AC_DEFINE([WITH_DEB], 1, [compile the deb package support in abipkgdiff])
|
|
|
|
AC_MSG_NOTICE(deb support in abipkgdiff is enabled);
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(deb support in abipkgdiff is disabled);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_DEB, test x$ENABLE_DEB = xyes)
|
|
|
|
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
dnl Check for the tar program
|
|
|
|
if test x$ENABLE_TAR = xauto -o x$ENABLE_TAR = xyes; then
|
|
|
|
AC_CHECK_PROG(HAS_TAR, tar, yes, no)
|
|
|
|
|
|
|
|
if test x$ENABLE_TAR = xauto; then
|
|
|
|
if test x$HAS_TAR = xyes; then
|
|
|
|
ENABLE_TAR=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_TAR = xyes; then
|
|
|
|
AC_DEFINE([WITH_TAR], 1, [compile the GNU tar archive support in abipkgdiff])
|
|
|
|
AC_MSG_NOTICE(GNU tar support in abipkgdiff is enabled);
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(GNU tar support in abipkgdiff is disabled);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_TAR, test x$ENABLE_TAR = xyes)
|
|
|
|
|
2015-11-14 17:32:01 +00:00
|
|
|
dnl Check for the bash-completion package
|
|
|
|
if test x$ENABLE_BASH_COMPLETION = xauto -o x$ENABLE_BASH_COMPLETION = xyes; then
|
|
|
|
AC_CHECK_PROG(HAS_BASH_COMPLETION, bash-completion, yes, no)
|
|
|
|
|
|
|
|
if test x$ENABLE_BASH_COMPLETION = xauto; then
|
|
|
|
if test x$HAS_BASH_COMPLETION = xyes; then
|
|
|
|
ENABLE_BASH_COMPLETION=yes
|
2016-05-21 01:01:32 +00:00
|
|
|
else
|
|
|
|
ENABLE_BASH_COMPLETION=no
|
2015-11-14 17:32:01 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_BASH_COMPLETION = xyes; then
|
|
|
|
AC_MSG_NOTICE(bash-completion support in libabigail is enabled);
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(bash-completion support in libabigail is disabled);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test x$ENABLE_BASH_COMPLETION = xyes)
|
|
|
|
|
2018-07-17 10:11:02 +00:00
|
|
|
# The minimal python 2 version we want to support is 2.6.6 because EL6
|
|
|
|
# distributions have that version installed.
|
|
|
|
MINIMAL_PYTHON2_VERSION="2.6.6"
|
|
|
|
|
|
|
|
AC_PATH_PROG(PYTHON, python, no)
|
|
|
|
AX_PROG_PYTHON_VERSION($MINIMAL_PYTHON2_VERSION,
|
|
|
|
[MINIMAL_PYTHON_VERSION_FOUND=yes],
|
|
|
|
[MINIMAL_PYTHON_VERSION_FOUND=no])
|
|
|
|
|
|
|
|
# The minimal python 3 version we want to support is 3.5, which is
|
|
|
|
# available in Fedora releases and in EL7.
|
|
|
|
if test x$ENABLE_PYTHON3 != xno; then
|
|
|
|
AC_CHECK_PROGS(PYTHON3_INTERPRETER, [python3 python3.5 python3.6 python3.7], no)
|
|
|
|
else
|
|
|
|
PYTHON3_INTERPRETER=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_PYTHON3 = xauto; then
|
|
|
|
if test x$PYTHON3_INTERPRETER != xno; then
|
|
|
|
ENABLE_PYTHON3=yes
|
|
|
|
else
|
|
|
|
# When enabling python3 is auto, tests only run if the
|
|
|
|
# python3 interpreter was found on the system. Otherwise,
|
|
|
|
# just ignore it.
|
|
|
|
ENABLE_PYTHON3=no
|
|
|
|
AC_MSG_NOTICE([Python 3 was not found. Skip running tests with Python 3.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_PYTHON3 = xyes; then
|
|
|
|
if test x$PYTHON3_INTERPRETER != xno; then
|
|
|
|
# We were asked to enable python3 implicitely (auto and
|
|
|
|
# python3 was found) or explicitly. So enable running tests
|
|
|
|
# using python3 then.
|
|
|
|
RUN_TESTS_WITH_PY3=yes
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Python 3 was not found])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$PYTHON3_INTERPRETER = xyes; then
|
|
|
|
MINIMAL_PYTHON_VERSION_FOUND=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
|
|
|
|
AC_MSG_NOTICE([no minimal version of python found])
|
|
|
|
if test x$PYTHON = xno; then
|
|
|
|
AC_MSG_NOTICE([python binary wasn't found])
|
|
|
|
if test x$PYTHON3_INTERPRETER != xno; then
|
|
|
|
AC_MSG_NOTICE([using $PYTHON3_INTERPRETER instead])
|
|
|
|
PYTHON=$PYTHON3_INTERPRETER
|
|
|
|
MINIMAL_PYTHON_VERSION_FOUND=yes
|
|
|
|
MISSING_FEDABIPKGDIFF_DEP=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([a minimal version of python was found ...])
|
|
|
|
if test x$PYTHON3_INTERPRETER != xno; then
|
|
|
|
# We were instructed to use python3 and it's present on the
|
|
|
|
# system. Let's update the PYTHON variable that points to the
|
|
|
|
# actual python interpreter we are going to be using
|
|
|
|
AC_MSG_NOTICE([... and it was $PYTHON3_INTERPRETER])
|
|
|
|
PYTHON=$PYTHON3_INTERPRETER
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
dnl if --enable-fedabipkgdiff has the 'auto' value, then check for the required
|
|
|
|
dnl python modules. If they are present, then enable the fedabipkgdiff program.
|
|
|
|
dnl If they are not then disable the program.
|
|
|
|
dnl
|
|
|
|
dnl If --enable-fedabipkgdiff has the 'yes' value, then check for the required
|
|
|
|
dnl python modules and whatever dependency fedabipkgdiff needs. If they are
|
|
|
|
dnl not present then the configure script will error out.
|
|
|
|
|
|
|
|
if test x$ENABLE_FEDABIPKGDIFF = xauto -o x$ENABLE_FEDABIPKGDIFF = xyes; then
|
|
|
|
CHECK_DEPS_FOR_FEDABIPKGDIFF=yes
|
|
|
|
else
|
|
|
|
CHECK_DEPS_FOR_FEDABIPKGDIFF=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
|
2016-09-12 10:09:59 +00:00
|
|
|
MISSING_FEDABIPKGDIFF_DEP=no
|
|
|
|
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
if test x$ENABLE_FEDABIPKGDIFF = xyes; then
|
2016-09-12 10:09:59 +00:00
|
|
|
MISSING_FEDABIPKGDIFF_DEP_FATAL=yes
|
|
|
|
else
|
|
|
|
MISSING_FEDABIPKGDIFF_DEP_FATAL=no
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_PATH_PROG(WGET, wget, no)
|
|
|
|
|
2016-09-12 10:09:59 +00:00
|
|
|
if test x$WGET = xno; then
|
2016-11-23 12:13:19 +00:00
|
|
|
ENABLE_FEDABIPKGDIFF=no
|
2016-09-12 10:09:59 +00:00
|
|
|
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
|
|
|
|
AC_MSG_ERROR(could not find the wget program)
|
|
|
|
else
|
|
|
|
MISSING_FEDABIPKGDIFF_DEP=yes
|
2016-11-23 12:13:19 +00:00
|
|
|
AC_MSG_NOTICE([could not find the wget program])
|
|
|
|
AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
|
2016-09-12 10:09:59 +00:00
|
|
|
fi
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then
|
2016-09-12 10:09:59 +00:00
|
|
|
MISSING_FEDABIPKGDIFF_DEP=yes
|
|
|
|
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
|
2018-03-25 07:34:59 +00:00
|
|
|
AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON2_VERSION])
|
|
|
|
fi
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
fi
|
|
|
|
|
2018-03-25 07:34:59 +00:00
|
|
|
###################################################################
|
|
|
|
# Now we are going to check the presence of the required python
|
|
|
|
# modules using either python2 or python3 as required until now.
|
|
|
|
###################################################################
|
|
|
|
|
|
|
|
# Grrr, the urlparse python2 module got renamed in python3 as
|
|
|
|
# urllib.parse. Oh well.
|
|
|
|
if test x$PYTHON = xpython3; then
|
|
|
|
URLPARSE_MODULE=urllib.parse
|
|
|
|
else
|
|
|
|
URLPARSE_MODULE=urlparse
|
|
|
|
fi
|
|
|
|
|
2016-06-03 14:36:52 +00:00
|
|
|
REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\
|
2018-03-25 07:34:59 +00:00
|
|
|
argparse logging os re subprocess sys $URLPARSE_MODULE \
|
|
|
|
xdg koji mock rpm imp tempfile mimetypes shutil six"
|
2016-06-03 14:36:52 +00:00
|
|
|
|
2016-09-12 10:09:59 +00:00
|
|
|
if test x$ENABLE_FEDABIPKGDIFF != xno; then
|
2016-06-03 14:36:52 +00:00
|
|
|
AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
|
2018-03-25 07:34:59 +00:00
|
|
|
[$PYTHON],
|
2016-06-03 14:36:52 +00:00
|
|
|
[FOUND_ALL_PYTHON_MODULES=yes],
|
|
|
|
[FOUND_ALL_PYTHON_MODULES=no])
|
|
|
|
|
|
|
|
if test x$FOUND_ALL_PYTHON_MODULES = xno; then
|
2016-09-12 10:09:59 +00:00
|
|
|
MISSING_FEDABIPKGDIFF_DEP=yes
|
|
|
|
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
|
|
|
|
AC_MSG_ERROR([missing python modules: $MISSING_PYTHON_MODULES]);
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES])
|
|
|
|
AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
|
|
|
|
fi
|
2016-06-03 14:36:52 +00:00
|
|
|
ENABLE_FEDABIPKGDIFF=no
|
|
|
|
else
|
2017-11-22 16:27:02 +00:00
|
|
|
# On some old platforms, the koji client object doesn't have
|
|
|
|
# the required .read_config method. Alas, that module doesn't
|
|
|
|
# have any __version__ string either. So we do as well as we
|
|
|
|
# can to try and detect that case and disable fedabipkgdiff if
|
|
|
|
# necessary.
|
|
|
|
AC_MSG_CHECKING([checking if koji client is recent enough ...])
|
2018-05-16 06:59:26 +00:00
|
|
|
$PYTHON -c "
|
2017-11-22 16:27:02 +00:00
|
|
|
import koji
|
|
|
|
koji.read_config('koji')"
|
|
|
|
if test $? -eq 0; then
|
|
|
|
koji_version_check_ok=yes
|
|
|
|
else
|
|
|
|
koji_version_check_ok=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$koji_version_check_ok = xno; then
|
|
|
|
AC_MSG_RESULT([no, disabling fedpkgdiff])
|
|
|
|
MISSING_FEDABIPKGDIFF_DEP=yes
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
2016-09-12 10:09:59 +00:00
|
|
|
if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then
|
|
|
|
ENABLE_FEDABIPKGDIFF=yes
|
|
|
|
fi
|
2016-06-03 14:36:52 +00:00
|
|
|
fi
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_FEDABIPKGDIFF, test x$ENABLE_FEDABIPKGDIFF = xyes)
|
2018-03-25 07:34:59 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_RUNNING_TESTS_WITH_PY3, test x$RUN_TESTS_WITH_PY3 = xyes)
|
|
|
|
AM_CONDITIONAL(ENABLE_PYTHON3_INTERPRETER, test x$PYTHON3_INTERPRETER != xno)
|
2018-05-16 12:24:31 +00:00
|
|
|
AC_SUBST(PYTHON)
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
|
2013-08-27 13:18:59 +00:00
|
|
|
dnl Check for dependency: libzip
|
2015-04-24 17:59:19 +00:00
|
|
|
LIBZIP_VERSION=0.10.1
|
2013-08-27 13:18:59 +00:00
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
HAS_LIBZIP=no
|
|
|
|
# The below doesn't seem to work on my box for a reason. Let's write
|
|
|
|
# the damn thing by hand:
|
|
|
|
# PKG_CHECK_EXISTS([libzip >= $LIBZIP_VERSION], [HAS_LIBZIP=yes], [HAS_LIBZIP=no])
|
|
|
|
|
|
|
|
if $PKG_CONFIG --exists --print-errors "libzip >= $LIBZIP_VERSION"; then
|
|
|
|
AC_MSG_NOTICE(found libzip version $LIBZIP_VERSION)
|
|
|
|
HAS_LIBZIP=yes
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(no libzip >= $LIBZIP_VERSION has been found)
|
|
|
|
HAS_LIBZIP=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xauto; then
|
|
|
|
if test x$HAS_LIBZIP = xyes; then
|
|
|
|
ENABLE_ZIP_ARCHIVE=yes;
|
|
|
|
else
|
|
|
|
ENABLE_ZIP_ARCHIVE=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xyes; then
|
|
|
|
AC_MSG_NOTICE(the zip-archive feature is enabled)
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE(the zip-archive feature is disabled)
|
|
|
|
fi
|
|
|
|
|
|
|
|
FOUND_LIBZIP=no
|
|
|
|
if test x$ENABLE_ZIP_ARCHIVE = xyes; then
|
|
|
|
PKG_CHECK_MODULES(LIBZIP, libzip >= $LIBZIP_VERSION)
|
|
|
|
FOUND_LIBZIP=yes
|
|
|
|
AC_SUBST(LIBZIP_VERSION)
|
|
|
|
AC_SUBST(LIBZIP_LIBS)
|
|
|
|
AC_SUBST(LIBZIP_CFLAGS)
|
|
|
|
AC_DEFINE([WITH_ZIP_ARCHIVE], 1, [compile the zip archive support])
|
|
|
|
AC_DEFINE([HAVE_LIBZIP], 1, [Defined to 1 if the libzip library is available])
|
|
|
|
fi
|
2013-08-27 13:18:59 +00:00
|
|
|
|
2014-08-31 08:34:11 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_ZIP_ARCHIVE, test x$ENABLE_ZIP_ARCHIVE = xyes)
|
2013-08-27 13:18:59 +00:00
|
|
|
DEPS_CPPFLAGS="$XML_CFLAGS $LIBZIP_CFLAGS"
|
|
|
|
AC_SUBST(DEPS_CPPFLAGS)
|
|
|
|
|
2014-11-05 09:08:33 +00:00
|
|
|
dnl Handle conditional use of a C++11 compiler
|
|
|
|
if test x$ENABLE_CXX11 = xyes; then
|
2019-07-22 08:39:40 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
2014-11-05 09:08:33 +00:00
|
|
|
AC_DEFINE([WITH_CXX11], 1, [Defined to 1 if a C++11 compiler is used])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_CXX11, test x$ENABLE_CXX11 = xyes)
|
|
|
|
|
2014-11-19 16:08:10 +00:00
|
|
|
dnl Check for the presence of doxygen program
|
|
|
|
|
|
|
|
if test x$ENABLE_APIDOC != xno; then
|
|
|
|
AC_CHECK_PROG(FOUND_DOXYGEN, doxygen, yes, no)
|
|
|
|
if test x$ENABLE_APIDOC = xauto; then
|
|
|
|
if test x$FOUND_DOXYGEN = xyes; then
|
|
|
|
ENABLE_APIDOC=yes
|
|
|
|
else
|
|
|
|
ENABLE_APIDOC=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_APIDOC, test x$ENABLE_APIDOC = xyes)
|
|
|
|
|
|
|
|
dnl Check for the presence of the sphinx-build program
|
|
|
|
|
|
|
|
if test x$ENABLE_MANUAL != xno; then
|
|
|
|
AC_CHECK_PROG(FOUND_SPHINX_BUILD, sphinx-build, yes, no)
|
|
|
|
if test x$ENABLE_MANUAL = xauto; then
|
|
|
|
if test x$FOUND_SPHINX_BUILD = xyes; then
|
|
|
|
ENABLE_MANUAL=yes
|
|
|
|
else
|
|
|
|
ENABLE_MANUAL=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_MANUAL, test x$ENABLE_MANUAL = xyes)
|
|
|
|
|
2016-05-21 00:09:50 +00:00
|
|
|
dnl Check for the presence of Valgrind and do the plumbing to allow
|
|
|
|
dnl the running of "make check-valgrind".
|
|
|
|
AX_VALGRIND_DFLT(memcheck, on)
|
|
|
|
AX_VALGRIND_DFLT(helgrind, on)
|
|
|
|
AX_VALGRIND_DFLT(drd, off)
|
|
|
|
AX_VALGRIND_DFLT(sgcheck, off)
|
|
|
|
|
|
|
|
AX_VALGRIND_CHECK
|
|
|
|
|
2014-11-19 16:08:10 +00:00
|
|
|
dnl Set the list of libraries libabigail depends on
|
|
|
|
|
2015-01-26 21:08:54 +00:00
|
|
|
DEPS_LIBS="$XML_LIBS $LIBZIP_LIBS $ELF_LIBS $DW_LIBS"
|
2013-08-27 13:18:59 +00:00
|
|
|
AC_SUBST(DEPS_LIBS)
|
|
|
|
|
2013-03-21 22:42:41 +00:00
|
|
|
if test x$ABIGAIL_DEVEL != x; then
|
2014-09-09 10:52:07 +00:00
|
|
|
CFLAGS="-g -Wall -Wextra -Werror"
|
|
|
|
CXXFLAGS="-g -Wall -Wextra -Werror"
|
2019-04-18 13:46:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_ASAN = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -fsanitize=address"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fsanitize=address"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$ENABLE_UBSAN = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -fsanitize=undefined"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fsanitize=undefined"
|
2013-03-21 22:42:41 +00:00
|
|
|
fi
|
|
|
|
|
Overhaul detection the DW_LANG_* enumerators from dwarf.h
elfutils regularly adds new members to the anonymous DWARF language
encodings enum which contains the DW_LANG_* enumerators, from the
dwarf.h header file.
If we want libabigail to keep compiling with older versions of
elfutils, we need to detect the absence of a given DW_LANG_*
enumerator and avoid using it in that case.
Until now, we were doing #ifdef DW_LANG_* for that purpose. But then
the DW_LANG_* are *enumerators*, not preprocessor macros. So that
preprocessor macro.
This patch detects the presence of each of the "newer" DW_LANG_*
enumerator using autoconf. And for each DW_LANG_xxx enumerator that
is present, autoconf defines the HAVE_DW_LANG_xxx_enumerator macro.
Libabigail source code can thus do #ifdef HAVE_DW_LANG_xxx_enumerator
to guard the use of DW_LANG_xxx.
Tested with the Rust binaries from
https://gitlab.gnome.org/federico/abi-rust.
* configure.ac: Detect the presence of DW_LANG_{UPC, D, Python,
Go, C11, C_plus_plus_03, C_plus_plus_11, C_plus_plus_14,
Mips_Assembler, Rust} and define the corresponding
HAVE_DW_LANG_*_enumerator macro accordingly.
* include/abg-ir.h (LANG_C_plus_plus_03): Define this new
enumerator in the translation_unit::language enum.
* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Use the
new HAVE_DW_LANG_*_enumerator macros.
(get_default_array_lower_bound): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
* src/abg-ir.cc (is_cplus_plus_language): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2019-01-18 10:21:48 +00:00
|
|
|
dnl Check if several decls and constant are defined in dependant
|
|
|
|
dnl libraries
|
2015-03-31 10:16:45 +00:00
|
|
|
HAS_EM_AARCH64=no
|
|
|
|
AC_CHECK_DECL([EM_AARCH64],
|
|
|
|
[HAS_EM_AARCH64=yes],
|
|
|
|
[HAS_EM_AARCH64=no],
|
|
|
|
[[#include <elf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_EM_AARCH64 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_EM_AARCH64_MACRO],
|
|
|
|
1,
|
|
|
|
[Defined to 1 if elf.h has EM_AARCH64 macro defined])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_EM_TILEPRO=no
|
|
|
|
AC_CHECK_DECL([EM_TILEPRO],
|
|
|
|
[HAS_EM_TILEPRO=yes],
|
|
|
|
[HAS_EM_TILEPRO=no],
|
|
|
|
[[#include <elf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_EM_TILEPRO = xyes; then
|
|
|
|
AC_DEFINE([HAVE_EM_TILEPRO_MACRO],
|
|
|
|
1,
|
|
|
|
[Defined to 1 if elf.h has EM_TILEPR0 macro defined])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_EM_TILEGX=no
|
|
|
|
AC_CHECK_DECL([EM_TILEGX],
|
|
|
|
[HAS_EM_TILEGX=yes],
|
|
|
|
[HAS_EM_TILEGX=no],
|
|
|
|
[[#include <elf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_EM_TILEGX = xyes; then
|
|
|
|
AC_DEFINE([HAVE_EM_TILEGX_MACRO],
|
|
|
|
1,
|
|
|
|
[Defined to 1 if elf.h has EM_TILEGX macro defined])
|
|
|
|
fi
|
|
|
|
|
Detect the presence of R_AARCH64_{ABS64, PREL32} macros
The patch:
"e687032 Support pre and post v4.19 ksymtabs for Linux kernel modules"
introduces the use of the R_AARCH64_{ABS64, PREL32} macros. However,
some older "elf.h" don't define these. When compiling on these older
platforms, we thus need to avoid using these new macros.
With this patch, the configure system detects the presence of these
macros and defines the HAVE_R_AARCH64_{ABS64, PREL32}_MACRO macros
accordingly.
Note that just to comply with what's in there in the code already, we
don't directly do "#ifdef R_AARCH64_ABS64", but rather "#ifdef
HAVE_R_AARCH64_ABS64_MACRO", to allow cases where we want to
artificially disable the "feature" at configure time, in the future.
* configure.ac: Define macros HAVE_R_AARCH64_{ABS64, PREL32}_MACRO
if the macros R_AARCH64_{ABS64, PREL32} are present.
* src/abg-dwarf-reader.cc
(read_context::get_ksymtab_format_module): Conditionalize the use
of R_AARCH64_{ABS64, PREL32} using HAVE_R_AARCH64_{ABS64, PREL32}_MACRO.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2019-09-18 07:16:27 +00:00
|
|
|
HAS_R_AARCH64_ABS64=no
|
|
|
|
AC_CHECK_DECL([R_AARCH64_ABS64],
|
|
|
|
[HAS_R_AARCH64_ABS64=yes],
|
|
|
|
[HAS_R_AARCH64_ABS64=no],
|
|
|
|
[[#include <elf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_R_AARCH64_ABS64 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_R_AARCH64_ABS64_MACRO],
|
|
|
|
1,
|
|
|
|
[Defined to 1 if elf.h has R_AARCH64_ABS64 macro defined])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_R_AARCH64_PREL32=no
|
|
|
|
AC_CHECK_DECL([R_AARCH64_PREL32],
|
|
|
|
[HAS_R_AARCH64_PREL32=yes],
|
|
|
|
[HAS_R_AARCH64_PREL32=no],
|
|
|
|
[[#include <elf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_R_AARCH64_PREL32 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_R_AARCH64_PREL32_MACRO],
|
|
|
|
1,
|
|
|
|
[Defined to 1 if elf.h has R_AARCH64_PREL32 macro defined])
|
|
|
|
fi
|
|
|
|
|
Overhaul detection the DW_LANG_* enumerators from dwarf.h
elfutils regularly adds new members to the anonymous DWARF language
encodings enum which contains the DW_LANG_* enumerators, from the
dwarf.h header file.
If we want libabigail to keep compiling with older versions of
elfutils, we need to detect the absence of a given DW_LANG_*
enumerator and avoid using it in that case.
Until now, we were doing #ifdef DW_LANG_* for that purpose. But then
the DW_LANG_* are *enumerators*, not preprocessor macros. So that
preprocessor macro.
This patch detects the presence of each of the "newer" DW_LANG_*
enumerator using autoconf. And for each DW_LANG_xxx enumerator that
is present, autoconf defines the HAVE_DW_LANG_xxx_enumerator macro.
Libabigail source code can thus do #ifdef HAVE_DW_LANG_xxx_enumerator
to guard the use of DW_LANG_xxx.
Tested with the Rust binaries from
https://gitlab.gnome.org/federico/abi-rust.
* configure.ac: Detect the presence of DW_LANG_{UPC, D, Python,
Go, C11, C_plus_plus_03, C_plus_plus_11, C_plus_plus_14,
Mips_Assembler, Rust} and define the corresponding
HAVE_DW_LANG_*_enumerator macro accordingly.
* include/abg-ir.h (LANG_C_plus_plus_03): Define this new
enumerator in the translation_unit::language enum.
* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Use the
new HAVE_DW_LANG_*_enumerator macros.
(get_default_array_lower_bound): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
* src/abg-ir.cc (is_cplus_plus_language): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2019-01-18 10:21:48 +00:00
|
|
|
HAS_DW_LANG_UPC=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_UPC],
|
|
|
|
[HAS_DW_LANG_UPC=yes],
|
|
|
|
[HAS_DW_LANG_UPC=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_UPC = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_UPC_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_UPC enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_D=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_D],
|
|
|
|
[HAS_DW_LANG_D=yes],
|
|
|
|
[HAS_DW_LANG_D=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_D = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_D_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_D enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_Python=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_Python],
|
|
|
|
[HAS_DW_LANG_Python=yes],
|
|
|
|
[HAS_DW_LANG_Python=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_Python = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_Python_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_Python enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_Go=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_Go],
|
|
|
|
[HAS_DW_LANG_Go=yes],
|
|
|
|
[HAS_DW_LANG_Go=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_Go = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_Go_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_Go enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_C11=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_C11],
|
|
|
|
[HAS_DW_LANG_C11=yes],
|
|
|
|
[HAS_DW_LANG_C11=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_C11 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_C11_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_C11 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_C_plus_plus_03=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_C_plus_plus_03],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_03=yes],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_03=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_C_plus_plus_03 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_03_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_03 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_C_plus_plus_11=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_C_plus_plus_11],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_11=yes],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_11=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_C_plus_plus_11 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_11_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_11 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_C_plus_plus_14=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_C_plus_plus_14],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_14=yes],
|
|
|
|
[HAS_DW_LANG_C_plus_plus_14=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_C_plus_plus_14 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_C_plus_plus_14_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_C_plus_plus_14 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_Mips_Assembler=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_Mips_Assembler],
|
|
|
|
[HAS_DW_LANG_Mips_Assembler=yes],
|
|
|
|
[HAS_DW_LANG_Mips_Assembler=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
if test x$HAS_DW_LANG_Mips_Assembler = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_Mips_Assembler_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_Mips_Assembler enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
HAS_DW_LANG_Rust=no
|
|
|
|
AC_CHECK_DECL([DW_LANG_Rust],
|
2019-01-24 09:31:57 +00:00
|
|
|
[HAS_DW_LANG_Rust=yes],
|
|
|
|
[HAS_DW_LANG_Rust=no],
|
Overhaul detection the DW_LANG_* enumerators from dwarf.h
elfutils regularly adds new members to the anonymous DWARF language
encodings enum which contains the DW_LANG_* enumerators, from the
dwarf.h header file.
If we want libabigail to keep compiling with older versions of
elfutils, we need to detect the absence of a given DW_LANG_*
enumerator and avoid using it in that case.
Until now, we were doing #ifdef DW_LANG_* for that purpose. But then
the DW_LANG_* are *enumerators*, not preprocessor macros. So that
preprocessor macro.
This patch detects the presence of each of the "newer" DW_LANG_*
enumerator using autoconf. And for each DW_LANG_xxx enumerator that
is present, autoconf defines the HAVE_DW_LANG_xxx_enumerator macro.
Libabigail source code can thus do #ifdef HAVE_DW_LANG_xxx_enumerator
to guard the use of DW_LANG_xxx.
Tested with the Rust binaries from
https://gitlab.gnome.org/federico/abi-rust.
* configure.ac: Detect the presence of DW_LANG_{UPC, D, Python,
Go, C11, C_plus_plus_03, C_plus_plus_11, C_plus_plus_14,
Mips_Assembler, Rust} and define the corresponding
HAVE_DW_LANG_*_enumerator macro accordingly.
* include/abg-ir.h (LANG_C_plus_plus_03): Define this new
enumerator in the translation_unit::language enum.
* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Use the
new HAVE_DW_LANG_*_enumerator macros.
(get_default_array_lower_bound): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
* src/abg-ir.cc (is_cplus_plus_language): Support the
translation_unit::LANG_C_plus_plus_03 enumerator.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2019-01-18 10:21:48 +00:00
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_DW_LANG_Rust = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_LANG_Rust_enumerator],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_LANG_Rust enumerator])
|
|
|
|
fi
|
|
|
|
|
2019-09-30 15:36:58 +00:00
|
|
|
HAS_DW_FORM_strx1=no
|
|
|
|
HAS_DW_FORM_strx2=no
|
|
|
|
HAS_DW_FORM_strx3=no
|
|
|
|
HAS_DW_FORM_strx4=no
|
|
|
|
|
|
|
|
AC_CHECK_DECL([DW_FORM_strx1],
|
|
|
|
[HAS_DW_FORM_strx1=yes],
|
|
|
|
[HAS_DW_FORM_strx1=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_DW_FORM_strx1 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_FORM_strx1],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_FORM_strx1 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_DECL([DW_FORM_strx2],
|
|
|
|
[HAS_DW_FORM_strx2=yes],
|
|
|
|
[HAS_DW_FORM_strx2=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_DW_FORM_strx2 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_FORM_strx2],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_FORM_strx2 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_DECL([DW_FORM_strx3],
|
|
|
|
[HAS_DW_FORM_strx3=yes],
|
|
|
|
[HAS_DW_FORM_strx3=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_DW_FORM_strx3 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_FORM_strx3],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_FORM_strx3 enumerator])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_DECL([DW_FORM_strx4],
|
|
|
|
[HAS_DW_FORM_strx4=yes],
|
|
|
|
[HAS_DW_FORM_strx4=no],
|
|
|
|
[[#include <dwarf.h>]])
|
|
|
|
|
|
|
|
if test x$HAS_DW_FORM_strx4 = xyes; then
|
|
|
|
AC_DEFINE([HAVE_DW_FORM_strx4],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_FORM_strx4 enumerator])
|
|
|
|
fi
|
|
|
|
|
2019-10-01 14:50:37 +00:00
|
|
|
if test x$HAS_DW_FORM_strx1 = xyes -a \
|
|
|
|
x$HAS_DW_FORM_strx2 = xyes -a \
|
|
|
|
x$HAS_DW_FORM_strx3 = xyes -a \
|
|
|
|
x$HAS_DW_FORM_strx4 = xyes ; then
|
2019-09-30 15:36:58 +00:00
|
|
|
AC_DEFINE([HAVE_DW_FORM_strx],
|
|
|
|
1,
|
|
|
|
[Define to 1 if dwarf.h has the DW_FORM_strx enumerators])
|
|
|
|
fi
|
|
|
|
|
2015-06-23 10:30:27 +00:00
|
|
|
dnl Set large files support
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2013-08-22 14:57:42 +00:00
|
|
|
libabigail.pc
|
2014-11-18 22:32:50 +00:00
|
|
|
include/Makefile
|
|
|
|
include/abg-version.h
|
|
|
|
doc/Makefile
|
|
|
|
doc/manuals/Makefile
|
|
|
|
src/Makefile
|
|
|
|
tools/Makefile
|
2014-11-20 10:26:30 +00:00
|
|
|
tests/Makefile
|
2015-11-14 17:32:01 +00:00
|
|
|
tests/data/Makefile
|
|
|
|
bash-completion/Makefile])
|
2013-02-28 10:42:57 +00:00
|
|
|
|
Canonicalize types either early or late after TU reading
While trying to diff two identical files (abidiff foo.so foo.so) it
appeared that canonicalizing types during e.g, the DWARF reading
process was leading to subtle errors because it's extremely hard to
know when a type is complete. That is, during the building of a class
type C, a pointer to C can be built before C is complete. Worse, even
after reading the DIE (from DWARF) of class C, there can be DIE seen
later in the translation unit that modifies type C. In these late
cases, one needs to wait -- not only until C is fully built, but also
sometimes, after the translation unit is fully built -- to
canonicalize C and then the pointer to C. This kind of things.
So now there are two possible points in time when canonicalization of
a type can happen. It can happen early, when the type is built. This
is the case for basic types and composite types for which all
sub-types are canonicalized already. It can happen late, right after
we've finished reading the debug info for the current translation
unit.
So this patch fixes the IR traversal and uses that to walk the
translation unit (or even types) after it's built. It does away with
the first attempt to perform early canonicalizing only.
The patch also handles type canonicalizing while reading xml-abi
format.
* include/abg-fwd.h (is_class_type)
(type_has_non_canonicalized_subtype): Declare new functions.
(is_member_type): Remove the overload that takes a decl_base_sptr.
It's superfluous. We just need the one that takes a
type_base_sptr.
* include/abg-ir.h (translation_unit::{is_constructed,
set_is_constructed}): Add new methods.
(class_decl::has_virtual_member_functions): Likewise.
(class decl_base): Makes it virtually inherit ir_traversable_base.
(class type_base): Make this virtually inherit traversable_base
too.
(type_base::canonicalize): Renamed enable_canonical_equality
into this.
(type_base::traverse): Declare new virtual method.
(canonicalize): Renamed enable_canonical_equality into this.
(scope_type_decl::traverse): Declare new virtual method.
(namespace_decl::get_pretty_representation): Declare new virtual
method.
(function_type::traverse): Likewise.
(class_decl::base_spec::traverse): Likewise.
(ir_node_visitor::visit): Remove the overloads and replace each of
them with a pair of ...
(ir_node_visitor::{visit_begin, visit_end}): ... of these.
* include/abg-traverse.h (traversable_base::visiting): New
method.
(traversable_base::visiting_): New data member.
(traversable_base::traversable_base): New constructor.
* src/abg-ir.cc ({scope_decl, type_decl, namespace_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_decl::parameter, class_decl,
class_decl::member_function_template,
class_decl::member_class_template, function_tdecl,
class_tdecl}::traverse): Fix this to properly set the
traversable_base::visiting_ flag and to reflect the new signatures
of the ir_node_visitor methods.
({type_base, scope_type_decl, function_type,
class_decl::base_spec}::traverse): New method.
(type_base::get_canonical_type_for): Handle the case of the type
already having a canonical type. Properly hash the type using the
dynamic type hasher. Look through declaration-only classes to
consider the definition of the class instead. Fix logic to have a
single pointer of return, to ease debugging.
(canonicalize): Renamed enable_canonical_equality into this.
(namespace_decl::get_pretty_representation): Define new method.
(ir_node_visitor::visit): Replace each of these overloads with a
pair of visit_begin/visit_end ones.
(translation_unit::priv::is_constructed_): New data member.
(translation_unit::priv::priv): Initialize it.
(translation_unit::{is_constructed, set_is_constructed}): Define
new methods.
(is_member_type(const decl_base_sptr)): Remove.
(is_class_type(decl_base *d)): Define new function.
(class_decl::has_virtual_member_functions): Define new method.
(equals(const class_decl&, const class_decl&, change_kind*)): If
the containing translation unit is not constructed yet, do not
take virtual member functions in account when comparing the
classes. This is because when reading from DWARF, there can be
DIEs that change the number of virtual member functions after the
DIE of the class. So one needs to start taking virtual members
into account only after the translation unit has been constructed.
(class non_canonicalized_subtype_detector): Define new type.
(type_has_non_canonicalized_subtype): Define new function.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Renamed
this into symtab_build_visitor_type::visit_end.
* src/abg-dwarf-reader.cc (die_type_map_type): New typedef.
(die_class_map_type): This is now a typedef on a map of
Dwarf_Off/class_decl_sptr.
(read_context::{die_type_map_, alternate_die_type_map_,
types_to_canonicalize_, alt_types_to_canonicalize_}): New data
members.
(read_context::{associate_die_to_decl,
associate_die_to_decl_primary}): Make these methods public.
(read_context::{associate_die_to_type,
lookup_type_from_die_offset, is_wip_class_die_offset,
types_to_canonicalize, schedule_type_for_canonicalization}):
Define new methods.
(build_type_decl, build_enum_type)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_array_type)
(build_typedef_type, build_function_decl): Do not canonicalize
types here.
(maybe_canonicalize_type): Define new function.
(build_ir_node_from_die): Take a new flag that says if the ir node
is a member type/function or not. Early-canonicalize base types.
Canonicalize composite types that have only canonicalized
sub-types. Schedule the other types for late canonicalizing. For
class types, early canonicalize those that are non-member types,
that are fully constructed and that have only canonicalized
sub-types. Adjust to the new signature of build_ir_node_from_die.
(get_scope_for_die, build_namespace_decl_and_add_to_ir)
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_array_type, build_typedef_type)
(build_var_decl, build_function_decl): Adjust for the new
signature of build_ir_node_from_die.
(build_translation_unit_and_add_to_ir): Likewise. Perform the
late canonicalizing of the types that have been scheduled for
that.
(build_class_type_and_add_to_ir): Return a class_decl_sptr, not a
decl_base_sptr. Adjust for the new signature of
build_ir_node_from_die. Early canonicalize member types that are
created and added to a given class, or schedule them for late
canonicalizing.
* src/abg-reader.cc (class read_context::{m_wip_classes_map,
m_types_to_canonicalize}): New data members.
(read_context::{clear_types_to_canonicalize,
clear_wip_classes_map, mark_class_as_wip, unmark_class_as_wip,
is_wip_class, maybe_canonicalize_type,
schedule_type_for_late_canonicalizing,
perform_late_type_canonicalizing}): Add new method definitions.
(read_context::clear_per_translation_unit_data): Call
read_context::clear_types_to_canonicalize().
(read_translation_unit_from_input): Call
read_context::perform_late_type_canonicalizing() at the end of the
function.
(build_function_decl): Fix the function type canonicalizing (per
translation) that was already in place. Do the canonicalizing of
these only when the type is fully built. Oops. This was really
brokend. Also, when the function type is constructed, consider it
for type canonicalizing.
(build_type_decl): Early canonicalize basic types.
(build_qualified_type_decl, build_pointer_type_def)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_enum_type_decl, build_typedef_decl):
Handle the canonicalizing for these composite types: either early
or late.
(build_class_decl): Likewise. Also, mark this class a 'being
built' until it's fully built. This helps the canonicalizing code
to know that it should leave a class alone until it's fully built.
* tests/test-ir-walker.cc (struct name_printing_visitor): Adjust
to the visitor methods naming change.
* configure.ac: Generate the tests/runtestcanonicalizetypes.sh
testing script from tests/runtestcanonicalizetypes.sh.in.
* tests/runtestcanonicalizetypes.sh.in: Add the template for the
new runtestcanonicalizetypes.sh script that test for type
canonicalizing.
* tests/Makefile.am: Add the new runtestcanonicalizetypes.sh
regression testing script to the build system.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-02-13 19:20:57 +00:00
|
|
|
dnl Some test scripts are generated by autofoo.
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
AC_CONFIG_FILES([tests/runtestcanonicalizetypes.sh],
|
|
|
|
[chmod +x tests/runtestcanonicalizetypes.sh])
|
Make fedabipkgdiff consistent with Libabigail's other tests
In the libabigail project, almost all the tests for the tools follow a
similar pattern. The test contains a set of input files to compare.
The result of the comparison is thus compared to a set of reference
comparison result.
This approach is already documented in the CONTRIBUTING file.
There are several interesting properties with this scheme. First, it
capture the behaviour of the tools, including what is shown to the
user.
Second, it eases the job of a hacker who wants to add a new test for a
new behaviour of a given tool. The user just has to provide:
1/ A new reference output of the new use case of the tool (that is easily
constructed by using the tool itself and saving its output) and add an
entry to array of entries that describe what to compare
2/ A new set of inputs to the tool
And voila.
Unfortunately, fedabipkgdiff tests don't follow this scheme. That
make them surprising to hackers who read the source code of the
existing tests, at very least. Also, the fedabipkgdiff tests were
only unit tests. They were not testing the tool as used by users in
general.
This patch makes the fedabipkgdiff tests follow the general approach
of the tests of the other Libabigail tools.
The patch first craetes a program names tests/mockfedabipkgdiff. It's
a wrapper around tools/fedabipkgdiff. It overloads the Koji client of
fedabipkgdiff with a fake Koji client that gets the Fedora packages
locally, from tests/data/test-fedabipkgdiff/packages. In other words,
mockfedabipkgdiff is fedabipkgdiff without going to the network.
I believe that in the future, tests/mockfedabipkgdiff should be killed
when fedabipkgdiff is able to cache a local description of a local
partial view of a Koji repository, along with the build packages that
were already downloaded.
That way, calling fedabipkgdiff twice with the same set of option
should make the tool perform correctly without going to the netword on
the second invocation. We should be able to save the local partial
view of the Koji repository under e.g,
tests/data/test-fedabipkgdiff/local-koji and tell fedabipkgdiff to use
that, instead of using the network. But we are not there yet. So for
now, I am using mockfedabipkgdiff.
Then, tests/runtestfedabipkdiff.py.in has been re-written to use
tests/mockfedabipkgdiff and to look like what is described in
CONTRIBUTING as far as how Libabigail tools' tests are organized:
mockfedabipkgdiff is called to perform a comparison. The result of
the comparison is then compared (using GNU diff) to a reference
comparison result file.
Please note that tests/runtestfedabipkdiff.py is relatively fast for
the moment. But when it contains much more tests and start becoming
slow, then we'll need to change the code to run several comparisons in
parallel, just like we do today in tests/test-diff-filter.cc. At that
point, I believe I'll just re-write this in C++, just like
tests/test-diff-filter.cc because that will allow us to have true
concurrent code based on the abigail:workers API. For now, I am
keeping this in Python also because I think that keeps Chenxiong happy
;-)
To be sure that fedabipkgdiff (and its underlying abipkgdiff) are
really comparing all the packages they are supposed to compare and
also all the binaries in those packages, I have added a new
--show-identical-binaries to abipkgdiff and fedabipkgdiff. That
option shows the name of the binaries (and packages) that are
compared, *even if* the ABI of those binaries are identical. Because
otherwise, today, if two binaries (or packages) have the same ABI,
nothing is displayed.
For instance, here is the result of comparing a package against
itself, using this new --show-identical-binaries options:
dodji@adjoa:patches$ ./tools/fedabipkgdiff --abipkgdiff ./build/tools/abipkgdiff --show-identical-binaries dbus-glib-0.80-3.fc12.x86_64.rpm dbus-glib-0.80-3.fc12.x86_64.rpm
Comparing the ABI of binaries between dbus-glib-0.80-3.fc12.x86_64.rpm and dbus-glib-0.80-3.fc12.x86_64.rpm:
================ changes of 'dbus-binding-tool'===============
No ABI change detected
================ end of changes of 'dbus-binding-tool'===============
================ changes of 'libdbus-glib-1.so.2.1.0'===============
No ABI change detected
================ end of changes of 'libdbus-glib-1.so.2.1.0'===============
dodji@adjoa:patches$
And here is what this command before that patch would do:
dodji@adjoa:patches$ ./tools/fedabipkgdiff --abipkgdiff ../master/build/tools/abipkgdiff dbus-glib-0.80-3.fc12.x86_64.rpm dbus-glib-0.80-3.fc12.x86_64.rpm
Comparing the ABI of binaries between dbus-glib-0.80-3.fc12.x86_64.rpm and dbus-glib-0.80-3.fc12.x86_64.rpm:
dodji@adjoa:patches$
The rest of the patch is mostly new test inputs material and the
necessary adjustments following all the changes above.
* configure.ac: Do not require Python dependencies itertools,
unittest and StringIO anymore as they are not used anymore.
Require new module tempfile now. Generate new executable script
tests/mockfedabipkgdiff from tests/mockfedabipkgdiff.in.
* doc/manuals/abipkgdiff.rst: Add doc for new option
--show-identical-binaries to abipkgdiff
* doc/manuals/fedabipkgdiff.rst: Add doc for new options
--show-identical-binaries to fedabipkgdiff.
* tools/abipkgdiff.cc (options::show_identical_binaries): New data
member.
(options::options): Initialize new data member.
(display_usage): Add a new help string for the new
--show-identical-binaries option.
(parse_command_line): Parse the newq --show-identical-binaries
command line switch.
(pthread_routine_compare): When the comparison of two binaries is
empty, if --show-identical-binaries was provided, then emit some
output saying the comparison did yield the empty set.
* tools/fedabipkgdiff (DEFAULT_ABIPKGDIFF): Store the default path
to abipkgdiff in this new global variable. Naming this default
path is useful because it can then be cleanly overloaded when
using mock.patch.
(build_path_to_abipkgdiff): Return the new DEFAULT_ABIPKGDIFF
global variable.
(cmd): Parse the new --show-identical-binaries command line
switch.
* tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt:
New reference output.
* tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt:
Likewise.
* tests/mockfedabipkgdiff.in: New uninstalled script template.
* tests/runtestfedabipkgdiff.py.in (counter)
(temp_file_or_dir_prefix, UtilsTest, RPMTest, LocalRPMTest)
(RunAbipkgdiffTest, GetPackageLatestBuildTest, DownloadRPMTest)
(BrewListRPMsTest, AssertionHelper, MockGlobalConfig)
(BUILT_ABIPKGDIFF, CompareABIFromCommandLineTest): Remove these
classes, global variables and functions.
(FEDABIPKGDIFF, TEST_SRC_DIR, TEST_BUILD_DIR, INPUT_DIR)
(OUTPUT_DIR, FEDABIPKGDIFF_TEST_SPECS): New global variables.
(ensure_output_dir_created, run_fedabipkgdiff_tests, main): New
functions.
* tests/test-diff-pkg.cc (in_out_specs): Add
tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt
to the set of reference outputs to consider.
* tests/Makefile.am: Add non-installed script mockfedabipkgdiff to
source distribution. Also added
tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt,
tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt,
tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt,
tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt
and
tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt
to source distribution.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-07-06 09:51:13 +00:00
|
|
|
AC_CONFIG_FILES([tests/mockfedabipkgdiff],
|
|
|
|
[chmod +x tests/mockfedabipkgdiff])
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
AC_CONFIG_FILES([tests/runtestfedabipkgdiff.py],
|
|
|
|
[chmod +x tests/runtestfedabipkgdiff.py])
|
2018-03-25 07:34:59 +00:00
|
|
|
AC_CONFIG_FILES([tests/runtestfedabipkgdiffpy3.sh],
|
|
|
|
[chmod +x tests/runtestfedabipkgdiffpy3.sh])
|
Bug 20180 - Support system-wide suppression specifications
This patch adds support for loading system and user level suppression
specifications for libabigail tools.
At launch time, relevant libabigail tools (abidiff, abipkgdiff
fedabipkgdiff for now) read the default system suppression
specification file, if it's present, from a file which path is the
value of the environment variable
LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE, if set, or from the file
$libdir/libabigail/default.abignore.
Then it reads the user system suppression specification file, if it's
present, from a file which path is the value of the environment
variable LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE, if set, or from the
file $HOME/.abignore.
The content of the user system suppression file is merged with the
content of default system suppression file.
That content is also merged with the content of the suppression
specification files that might be provided by the --suppressions
command line option of the invoked tools.
The resulting set of all these suppression specifications is thus used
to filter the ABI change reports that are emitted.
abidiff, abipkgdiff and abipkgdiff gain a --no-default-suppression
option to avoid loading any of these default suppression specification
files.
The patch also installs a default.abignore file into $(pkglibdir).
Note that on x86_64, that directory is /usr/lib64/libabigail. Now we
just need to think about the content of that default.abignore file.
* doc/manuals/abidiff.rst: Document the default suppression
scheme, its interaction with the --supprs option and the new
--no-default option.
* doc/manuals/abipkgdiff.rst: Likewise.
* doc/manuals/fedabipkgdiff.rst: Likewise.
* configure.ac: Generate the tests/runtestdefaultsupprs.py file
from the new tests/runtestdefaultsupprs.py.in template.
* default.abignore: New file.
* Makefile.am: Add it to source distribution.
* src/Makefile.am: Define the ABIGAIL_ROOT_SYSTEM_LIBDIR
preprocessor macro that is set the value of the $libdir autotools
macro.
* include/abg-tools-utils.h: Update copyright years.
(get_system_libdir, get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Declare new functions
* src/abg-tools-utils.cc (get_system_libdir)
(get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Define new functions.
(is_regular_file): Amend this so that it return true for symlinks
to regular files too.
(is_dir): Amend this so that it returns true for symlinks to
directories too.
* tools/abidiff.cc (options::no_default_supprs): New data member.
(options::options): Initialize the new data member.
(display_usage): Display a new help string for the new
--no-default-suppression command line option.
(parse_command_line): Parse this new command line option.
(set_diff_context_from_opts): Load the default suppression
specifications, unless --no-default-suppression or --supprs was
provided.
* tools/abipkgdiff.cc (options::no_default_supprs): New data
member.
(options::options): Initialize the new data member.
(parse_command_line): Parse the new --no-default-suppression
command line option.
(main): Load the default suppression specifications, unless
--no-default-suppression or --supprs was provided.
* tools/fedabipkgdiff (abipkgdiff): Add --no-default-suppression
to the invocation of abipkgdiff if it was provided on the command
line.
(build_commandline_args_parser): Parse the new
--no-default-suppression command line option.
* tests/runtestdefaultsupprs.py.in: New test harness template.
* tests/Makefile.am: Add the new runtestdefaultsupprs.py to the
set of tests.
* tests/data/test-default-supprs/test0-type-suppr-0.suppr: New
test input.
* tests/data/test-default-supprs/test0-type-suppr-report-0.txt: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v0.o: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v1.o: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir-report-0.txt:
Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir1: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir2: Likewise.
* tests/data/Makefile.am: Add new the new tests input above to
Makefile.am.
* tests/runtestcanonicalizetypes.sh.in: Pass
--no-default-suppression to abidiff invocations.
* tests/runtestdefaultsupprs.py.in: Likewise.
* tests/test-abidiff-exit.cc: Likewise.
* tests/test-diff-dwarf-abixml.cc: Likewise.
* tests/test-diff-filter.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tools/abidiff.cc: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-30 08:37:48 +00:00
|
|
|
AC_CONFIG_FILES([tests/runtestdefaultsupprs.py],
|
|
|
|
[chmod +x tests/runtestdefaultsupprs.py])
|
2018-03-25 07:34:59 +00:00
|
|
|
AC_CONFIG_FILES([tests/runtestdefaultsupprspy3.sh],
|
|
|
|
[chmod +x tests/runtestdefaultsupprspy3.sh])
|
Canonicalize types either early or late after TU reading
While trying to diff two identical files (abidiff foo.so foo.so) it
appeared that canonicalizing types during e.g, the DWARF reading
process was leading to subtle errors because it's extremely hard to
know when a type is complete. That is, during the building of a class
type C, a pointer to C can be built before C is complete. Worse, even
after reading the DIE (from DWARF) of class C, there can be DIE seen
later in the translation unit that modifies type C. In these late
cases, one needs to wait -- not only until C is fully built, but also
sometimes, after the translation unit is fully built -- to
canonicalize C and then the pointer to C. This kind of things.
So now there are two possible points in time when canonicalization of
a type can happen. It can happen early, when the type is built. This
is the case for basic types and composite types for which all
sub-types are canonicalized already. It can happen late, right after
we've finished reading the debug info for the current translation
unit.
So this patch fixes the IR traversal and uses that to walk the
translation unit (or even types) after it's built. It does away with
the first attempt to perform early canonicalizing only.
The patch also handles type canonicalizing while reading xml-abi
format.
* include/abg-fwd.h (is_class_type)
(type_has_non_canonicalized_subtype): Declare new functions.
(is_member_type): Remove the overload that takes a decl_base_sptr.
It's superfluous. We just need the one that takes a
type_base_sptr.
* include/abg-ir.h (translation_unit::{is_constructed,
set_is_constructed}): Add new methods.
(class_decl::has_virtual_member_functions): Likewise.
(class decl_base): Makes it virtually inherit ir_traversable_base.
(class type_base): Make this virtually inherit traversable_base
too.
(type_base::canonicalize): Renamed enable_canonical_equality
into this.
(type_base::traverse): Declare new virtual method.
(canonicalize): Renamed enable_canonical_equality into this.
(scope_type_decl::traverse): Declare new virtual method.
(namespace_decl::get_pretty_representation): Declare new virtual
method.
(function_type::traverse): Likewise.
(class_decl::base_spec::traverse): Likewise.
(ir_node_visitor::visit): Remove the overloads and replace each of
them with a pair of ...
(ir_node_visitor::{visit_begin, visit_end}): ... of these.
* include/abg-traverse.h (traversable_base::visiting): New
method.
(traversable_base::visiting_): New data member.
(traversable_base::traversable_base): New constructor.
* src/abg-ir.cc ({scope_decl, type_decl, namespace_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_decl::parameter, class_decl,
class_decl::member_function_template,
class_decl::member_class_template, function_tdecl,
class_tdecl}::traverse): Fix this to properly set the
traversable_base::visiting_ flag and to reflect the new signatures
of the ir_node_visitor methods.
({type_base, scope_type_decl, function_type,
class_decl::base_spec}::traverse): New method.
(type_base::get_canonical_type_for): Handle the case of the type
already having a canonical type. Properly hash the type using the
dynamic type hasher. Look through declaration-only classes to
consider the definition of the class instead. Fix logic to have a
single pointer of return, to ease debugging.
(canonicalize): Renamed enable_canonical_equality into this.
(namespace_decl::get_pretty_representation): Define new method.
(ir_node_visitor::visit): Replace each of these overloads with a
pair of visit_begin/visit_end ones.
(translation_unit::priv::is_constructed_): New data member.
(translation_unit::priv::priv): Initialize it.
(translation_unit::{is_constructed, set_is_constructed}): Define
new methods.
(is_member_type(const decl_base_sptr)): Remove.
(is_class_type(decl_base *d)): Define new function.
(class_decl::has_virtual_member_functions): Define new method.
(equals(const class_decl&, const class_decl&, change_kind*)): If
the containing translation unit is not constructed yet, do not
take virtual member functions in account when comparing the
classes. This is because when reading from DWARF, there can be
DIEs that change the number of virtual member functions after the
DIE of the class. So one needs to start taking virtual members
into account only after the translation unit has been constructed.
(class non_canonicalized_subtype_detector): Define new type.
(type_has_non_canonicalized_subtype): Define new function.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Renamed
this into symtab_build_visitor_type::visit_end.
* src/abg-dwarf-reader.cc (die_type_map_type): New typedef.
(die_class_map_type): This is now a typedef on a map of
Dwarf_Off/class_decl_sptr.
(read_context::{die_type_map_, alternate_die_type_map_,
types_to_canonicalize_, alt_types_to_canonicalize_}): New data
members.
(read_context::{associate_die_to_decl,
associate_die_to_decl_primary}): Make these methods public.
(read_context::{associate_die_to_type,
lookup_type_from_die_offset, is_wip_class_die_offset,
types_to_canonicalize, schedule_type_for_canonicalization}):
Define new methods.
(build_type_decl, build_enum_type)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_array_type)
(build_typedef_type, build_function_decl): Do not canonicalize
types here.
(maybe_canonicalize_type): Define new function.
(build_ir_node_from_die): Take a new flag that says if the ir node
is a member type/function or not. Early-canonicalize base types.
Canonicalize composite types that have only canonicalized
sub-types. Schedule the other types for late canonicalizing. For
class types, early canonicalize those that are non-member types,
that are fully constructed and that have only canonicalized
sub-types. Adjust to the new signature of build_ir_node_from_die.
(get_scope_for_die, build_namespace_decl_and_add_to_ir)
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_array_type, build_typedef_type)
(build_var_decl, build_function_decl): Adjust for the new
signature of build_ir_node_from_die.
(build_translation_unit_and_add_to_ir): Likewise. Perform the
late canonicalizing of the types that have been scheduled for
that.
(build_class_type_and_add_to_ir): Return a class_decl_sptr, not a
decl_base_sptr. Adjust for the new signature of
build_ir_node_from_die. Early canonicalize member types that are
created and added to a given class, or schedule them for late
canonicalizing.
* src/abg-reader.cc (class read_context::{m_wip_classes_map,
m_types_to_canonicalize}): New data members.
(read_context::{clear_types_to_canonicalize,
clear_wip_classes_map, mark_class_as_wip, unmark_class_as_wip,
is_wip_class, maybe_canonicalize_type,
schedule_type_for_late_canonicalizing,
perform_late_type_canonicalizing}): Add new method definitions.
(read_context::clear_per_translation_unit_data): Call
read_context::clear_types_to_canonicalize().
(read_translation_unit_from_input): Call
read_context::perform_late_type_canonicalizing() at the end of the
function.
(build_function_decl): Fix the function type canonicalizing (per
translation) that was already in place. Do the canonicalizing of
these only when the type is fully built. Oops. This was really
brokend. Also, when the function type is constructed, consider it
for type canonicalizing.
(build_type_decl): Early canonicalize basic types.
(build_qualified_type_decl, build_pointer_type_def)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_enum_type_decl, build_typedef_decl):
Handle the canonicalizing for these composite types: either early
or late.
(build_class_decl): Likewise. Also, mark this class a 'being
built' until it's fully built. This helps the canonicalizing code
to know that it should leave a class alone until it's fully built.
* tests/test-ir-walker.cc (struct name_printing_visitor): Adjust
to the visitor methods naming change.
* configure.ac: Generate the tests/runtestcanonicalizetypes.sh
testing script from tests/runtestcanonicalizetypes.sh.in.
* tests/runtestcanonicalizetypes.sh.in: Add the template for the
new runtestcanonicalizetypes.sh script that test for type
canonicalizing.
* tests/Makefile.am: Add the new runtestcanonicalizetypes.sh
regression testing script to the build system.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-02-13 19:20:57 +00:00
|
|
|
|
2013-02-28 10:42:57 +00:00
|
|
|
AC_OUTPUT
|
2014-08-31 09:17:03 +00:00
|
|
|
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
=====================================================================
|
2019-12-15 23:51:51 +00:00
|
|
|
Libabigail: $VERSION_MAJOR.$VERSION_MINOR.$VERSION_REVISION$VERSION_SUFFIX
|
2014-08-31 09:17:03 +00:00
|
|
|
=====================================================================
|
|
|
|
|
|
|
|
Here is the configuration of the package:
|
|
|
|
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
Prefix : ${prefix}
|
|
|
|
Source code location : ${srcdir}
|
|
|
|
C Compiler : ${CC}
|
|
|
|
C++ Compiler : ${CXX}
|
2016-07-22 09:01:41 +00:00
|
|
|
GCC visibility attribute supported : ${SUPPORTS_GCC_VISIBILITY_ATTRIBUTE}
|
2018-03-25 07:34:59 +00:00
|
|
|
Python : ${PYTHON}
|
2014-08-31 09:17:03 +00:00
|
|
|
|
|
|
|
OPTIONAL FEATURES:
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
Enable zip archives : ${ENABLE_ZIP_ARCHIVE}
|
|
|
|
Use a C++-11 compiler : ${ENABLE_CXX11}
|
Plug leak of debug info handles
On recent elfutils where the libdw's function dwarf_getalt exists, we
don't need to try and find the alternate debug info file ourselves by
using the function dwfl_standard_find_debuginfo. Furthermore, when we
use that function on those recent elfutils versions, we leak the elf
resources allocated in the debug info resources; we also leak the file
descriptor to access the alternate debug info sections.
More generally, we also leak debug info handles used to access debug
info when using get_soname_of_elf_file and get_type_of_elf_file.
This patch plugs those leaks.
In the first case, if the function dwarf_getalt exists, the patch just
uses it to get the alternate debug info. Otherwise, the patch uses
the dwfl_standard_find_debuginfo function like we used to, but then it
tries hard to free the file descriptor and debuginfo memory of the
alternate debug info.
* configure.ac: Check the presence of dwarf_getalt in libdw. If
it's present, define the preprocessor macro
LIBDW_HAS_DWARF_GETALT. Update the autoconf configuration
summary.
* src/abg-dwarf-reader.cc: Add config.h.
(find_alt_debug_info_location): Factorize this out of ...
(find_alt_debug_info): ... this function. Use dwarf_getalt if
present, otherwise, keep using dwfl_standard_find_debuginfo. In
the later case, return the file descriptor opened to access the
alternate debug info, by parameter, so that the caller can fclose
it.
(read_context::alt_fd_): New data member.
(read_context::read_context): Initialize the new alt_fd_ data
member.
(read_context::load_debug_info): Store the file descriptor used to
access the alternate debug info into the new alt_fd_ data member.
(read_context::~read_context): New desctructor.
(get_soname_of_elf_file, get_type_of_elf_file): Free the elf
handle.
(read_context::load_debug_info): Be paranoid in making sure we
never override alt_dwarf_.
* tests/data/test-alt-dwarf-file/test0-report.txt: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-22 09:39:33 +00:00
|
|
|
libdw has the dwarf_getalt function : ${FOUND_DWARF_GETALT_IN_LIBDW}
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
Enable rpm support in abipkgdiff : ${ENABLE_RPM}
|
|
|
|
Enable deb support in abipkgdiff : ${ENABLE_DEB}
|
|
|
|
Enable GNU tar archive support in abipkgdiff : ${ENABLE_TAR}
|
2015-11-14 17:32:01 +00:00
|
|
|
Enable bash completion : ${ENABLE_BASH_COMPLETION}
|
2016-05-21 01:02:19 +00:00
|
|
|
Enable fedabipkgdiff : ${ENABLE_FEDABIPKGDIFF}
|
2018-03-25 07:34:59 +00:00
|
|
|
Enable python 3 : ${ENABLE_PYTHON3}
|
2016-05-21 00:09:50 +00:00
|
|
|
Enable running tests under Valgrind : ${enable_valgrind}
|
2019-04-18 13:46:34 +00:00
|
|
|
Enable build with -fsanitize=address : ${ENABLE_ASAN}
|
|
|
|
Enable build with -fsanitize=undefined : ${ENABLE_UBSAN}
|
Make abipkgdiff compare tar archives containing binaries
This patch adds support for comparing the ABI of binaries contained in
a tar archive.
If the archive is compressed with gzip, bzip2, lzip, lzma or xz, then
abipkgdiff recognizes the usual relevant file extensions and lets the
GNU tar program handle the decompression.
If the archive is not compressed, abipkgdiff recognizes the UStar
(Uniform Standard Tape ARchive) format, even if the archive file name
doesn't end with the .tar extension, and lets the GNU tar program
handle the extraction. If the file ends up with the .tar extension
anyway (even if it's not in the UStar format, abipkgdiff lets the GNU
tar program handle its extraction.
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-22 11:59:18 +00:00
|
|
|
Generate html apidoc : ${ENABLE_APIDOC}
|
|
|
|
Generate html manual : ${ENABLE_MANUAL}
|
2014-08-31 09:17:03 +00:00
|
|
|
])
|