The default compression flag defined by automake via GZIP_ENV is --best.
That is pretty expensive for when you just want to make sure your change
is done properly to pass 'make distcheck'.
Hence add a convenience target 'make distcheck-fast' that sets GZIP_ENV
to --fast and runs distcheck with that.
On my machine, this almost cuts the 'make distcheck' time in half:
distcheck 4min 40s
distcheck-fast 2min 32s
This is not invasive as it does not change the existing distcheck
target.
* Makefile.am: add distcheck-fast make target
Signed-off-by: Matthias Maennich <maennich@google.com>
Symbols of pretty much all member functions of types that are meant to
be "private" to translation units that contribute to libabigail.so
were exported because we didn't do much to prevent that.
This patch starts controlling the set of symbols that are exported.
By default, symbols of any entity declared in a translation unit that
contributes to libabigail.so are hidden by default. Only symbols of
entities declared in public headers (headers in include/*.h) are
exported.
There are many ways to achieve that. This patch chooses to avoid
cluttering declarations of entities in the public header by adding
__attribute__((visibility="default")) to every declared type of
function in there.
Rather, the patch uses "#pragma GCC visibility push(default)" before
entities declared on those headers. By doing so, all those entities
have their symbol marked as "visible" by the compiler. Once the
header are #included, the #pragma GCC visibility pop" is used, so that
anything else has its symbol be hidden from that point on.
Note that for ease of maintenance the patch uses the macros
ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS rather
than using the pragma directive directly.
I believe this is a more elegant way of handling visibility, compared
to cluttering every single declaration in public headers with a
"__attribute__((visibility=("default")))" or with a macro which
expands to it.
This reduces the the set of symbols exported by libabigail.so from
20000+ to less than 5000.
* VISIBILITY: New documentation about this visiblity business.
* CONTRIBUTING: Update the "contributing guide" to refer to symbol
visibility issues.
* configure.ac: Define a variable VISIBILITY_FLAGS that is set to
the -fvisibility=hidden flag to pass to GCC, when its available.
* src/Makefile.am: Add VISIBILITY to source distribution. Also
add COMPILING and COMMIT-LOG-GUIDELINES that were missing.
* src/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
the library.
* tests/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
tests.
* tools/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
tools.
* src/abg-comp-filter.cc: Enclose inclusion of public headers in
ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS to
export the symbols of entities declared in there.
* src/abg-comparison.cc: Likewise.
* src/abg-config.cc: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-diff-utils.cc: Likewise.
* src/abg-dwarf-reader.cc: Likewise.
* src/abg-hash.cc: Likewise.
* src/abg-ini.cc: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-libxml-utils.cc: Likewise.
* src/abg-libzip-utils.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-suppression.cc: Likewise.
* src/abg-tools-utils.cc: Likewise.
* src/abg-traverse.cc: Likewise.
* src/abg-viz-common.cc: Likewise.
* src/abg-viz-dot.cc: Likewise.
* src/abg-viz-svg.cc: Likewise.
* src/abg-workers.cc: Likewise.
* src/abg-writer.cc: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
After I tried to build libabigail on Debian, I realized the detection
of python modules wasn't that great. The koji module wasn't present
and yet the detection system tried to launch fedabipkgdiff regression
tests. Woops.
I was thinking about coming up with something easier to to update to
add new modules to check for anyway, so I just dived in. I came up
with a new autoconf macro of my own, AX_CHECK_PYTHON_MODULES, that
lets you check for the presence of several python modules at once.
This is more handy than having to call AX_PYTHON_MODULE for each
module we want to detect. This fixes the detection issue I found and
simplifies configure.ac.
* configure.ac: Include
autoconf-archive/ax_check_python_modules.m4 rather than
autoconf-archive/ax_python_module.m4. Use AX_CHECK_PYTHON_MODULES
rather than AX_PYTHON_MODULE.
* Makefile.am: Add the new file
autoconf-archive/ax_check_python_modules.m4 to source distribution
and remove the older autoconf-archive/ax_python_module.m4 one.
* autoconf-archive/ax_check_python_modules.m4: New file.
* autoconf-archive/ax_python_module.m4: Remove.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
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>
The check-valgrind target was only accessible from the tests/
sub-directory. Make it be accessible from the top-most directory too.
* Makefile.am (check-valgrind): Add this new target here.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
There was not user documentation about how to execute regression
tests. This patch fixes that by adding a description of the
regression tests and how to launch them.
I have also added a new "make check-valgrind-recursive" target that
execute the tests under memcheck by tracing children processes too,
notably libabigail command line tool processes.
* CONTRIBUTING: Add a section about regression tests.
* Makefile.am: Add a check-valgrind-recursive target.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
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>
* Makefile.am: Add info, man and html-doc targets to generate
documentation in info, man and html formats. If you want to
generate them all, then the doc target is the one to be used.
* COMPILING: Add documentation for the above.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Add a release target that tags and uploads the release.
* Makefile.am: Add tarball, upload-release-only, upload-release
and release targets.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Silent rules already are the default, but automake and make both still
tell which directory is being entered/build. Disable printing from make.
* Makefile.am (AM_MAKEFLAGS): Set --no-print-directory.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
* COPYING: Of course we know the licence we want to use now :-)
* COPYING-GPLV3: Add the text of GPLv3.
* Makefile.am: Add the file COPYING-GPLV3 above to source
distribution.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* Makefile.am: Add ChangeLog and COPYING-LGPLV2 to the source
distribution.
(update-changelog, tag-release-only tag-release): New Makefile
targets.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tests/test-utils.h (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): Move these directories manipulation
utilities from here to ...
* tools/abg-tools-utils.h (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): ... here in this new file.
(dir_name, base_name): Declare these new functions.
* tests/test-utils.cc (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): Likewise, move these to ...
* tools/abg-tools-utils.cc (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): ... here in this new file.
(dir_name, base_name): Define these.
* tools/Makefile.am: New file. Create a new libtoolsutils.la
static library with stuff from tools/abg-tools-utils.cc in it.
Also create a new 'biar' program with the stuff from the new
tools/biar.cc in it.
* tools/biar.cc: New file. Contains the code for the new "biar"
archive manipulation command line utility.
* tests/test-read-write.cc (main): Adjust for the change about
ensure_parent_dir_created above.
* tests/test-write-read-archive.cc (main): Likewise.
* Makefile.am (SUBDIRS): Add the new tools/ sub-directory to the
build system.
* configure.ac (AC_CONFIG_FILES): Generate tools/Makefile.
* tests/Makefile.am: Make libtestutils.la link with the new
libtoolsutils.la. Make sure to express the dependencies between
libtestutils.la and the binaries that depend on it. Otherwise
parallel builds can go awry.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* libabigail.pc.in: New pkgconfig file.
* configure.ac: Define the LIBXML2_VERSION variable that is used
in the libabigail.pc.in file. Generate the libabigail.pc file
from its libabigail.pc.in template.
* Makefile.am: Add libabigail.pc.in to the source distribution.
Install the generated libabigail.pc to the right destination.
* include/libabigail: New directory.
* include/Makefile.am: New file.
* include/libabigail/Makefile.am: New file.
* src/abg-*.h: Move these in include/libabigail/*.h
* src/Makefile.am: Set -I option to look for headers in include/libabigail
* doc/api/libabigail.doxy: Look for headers in include/libabigail
* tests/Makefile.am: Set -I option to look for headers in include/libabigail
* abigail.m4: Set includedir to $prefix/include/libabigail for
library used as a dep, or to srcdir/libabigail/include/libabigail
in GCC source tree.
* configure.ac: Add Makefile.am in include and include/libabigail
* abigail.m4: Look for headers in include/libabigail when the
libabigail is in in the source tree and in $incdir/libabigail when
it is installed as a dependency.
* configure.ac: Define the components of the version number as
autoconf variables. Set the version number to 0.1.0
* abigail.m4: New file
* Makefile.am: Add abigail.m4 to the build system. Install it in
$(datadir)/aclocal.
* src/Makefile.am: Generate and add abg-version.h from the version
number autoconf variable defined in configure.ac. Re-generate
abg-version.h each time configure.ac changes.
* src/abg-config.h (abigail_get_library_version): Declare ...
* src/abg-config.cc (abigail_get_library_version): ... and define
this wirth C linkage. This is useful for autoconf tests to test
for the presence of the library.
* configure: Re-generate.
* Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
* Makefile.am: Support the doc sub-directory. We don't have a
COPYRIGHT file.
* src/Makefile.am: Don't prefix the file paths by the absolute
path of the src dir; current autotools know how to deal with it,
otherwise and it break them.
* tests/Makefile.am: Likewise. Make sure to remove the output of
the tests upon make clean.
* Makefile.in: Re-generate.
* aclocal.m4: Likewise.
* configure: Likewise.
* src/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
* src/abg-ir.cc (namespace_decl::~namespace_decl): Add this
missing virtual constructor definition.
* src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}):
Return a null pointer when the decls stack is empty.
(update_read_context): Don't try to de-reference a NULL cur_decl.
(read_input): Don't try to poke at file validity here. What was I
thinking. Really test for advance_cursor to return 1, expressing
success.
* src/abg-reader.h (read_file): Fix style.
* Makefile.am: Add tests sub-directory.
* configure.ac: Build with debugging-friendly options if the
ABIGAIL_DEBUG env variable is set. Generate tests/Makefile.
* tests/Makefile.am: New file.
* tests/test-read-write.cc: Likewise.
* tests/test-utils.{h,cc}: Likewise.
* tests/data/test-read-write/input0.xml: Likewise.