| 1 |
dbus-deviation |
| 2 |
============== |
| 3 |
|
| 4 |
dbus-deviation is a project for parsing D-Bus introspection XML and processing |
| 5 |
it in various ways. Its main tool is dbus-interface-diff, which calculates the |
| 6 |
difference between two D-Bus APIs for the purpose of checking for API breaks. |
| 7 |
This functionality is also available as a Python module, dbusdeviation. |
| 8 |
|
| 9 |
A second Python module, dbusapi, is provided for parsing D-Bus introspection |
| 10 |
XML to produce an AST representing a D-Bus interface. |
| 11 |
|
| 12 |
dbus-deviation’s API is currently unstable and is likely to change wildly. |
| 13 |
|
| 14 |
Using dbus-deviation |
| 15 |
==================== |
| 16 |
|
| 17 |
dbus-deviation can be used as a utility program or as a Python library. |
| 18 |
|
| 19 |
The utility programs: |
| 20 |
• dbus-interface-diff: |
| 21 |
Check for differences between two versions of the same D-Bus API and |
| 22 |
print details of each difference. It can check for problems with forwards |
| 23 |
and backwards compatibility, as well as general informational |
| 24 |
differences. |
| 25 |
|
| 26 |
Example: |
| 27 |
dbus-interface-diff \ |
| 28 |
com.example.Interface1.xml \ # old version of the interface |
| 29 |
com.example.Interface2.xml # new version of the interface |
| 30 |
|
| 31 |
• dbus-interface-vcs-helper: |
| 32 |
This is a helper program designed to be used by dbus-deviation.mk. |
| 33 |
|
| 34 |
As a library, the core object is an InterfaceParser, allowing a D-Bus API to |
| 35 |
be parsed and represented as an AST. See the API documentation for more |
| 36 |
explanation and examples. |
| 37 |
|
| 38 |
dbus-deviation.mk |
| 39 |
----------------- |
| 40 |
|
| 41 |
This is a Makefile snippet which should be copied into your project, added to |
| 42 |
git, and the following two lines included in your top-level Makefile.am: |
| 43 |
dbus_api_xml_files = list of D-Bus interface XML files |
| 44 |
-include $(top_srcdir)/dbus-deviation.mk |
| 45 |
|
| 46 |
Do not add it to EXTRA_DIST. It is designed to work from git checkouts only. |
| 47 |
|
| 48 |
Then run: |
| 49 |
make dbus-deviation-mk-install |
| 50 |
to set up the API signature database. This assumes that your project defines |
| 51 |
D-Bus interfaces in XML files, and does not generate them at runtime. |
| 52 |
|
| 53 |
Finally, copy pre-push.hook to .git/hooks/pre-push and ensure it’s executable. |
| 54 |
This script will automatically update the API signature database when a new |
| 55 |
release tag is pushed to the git remote. |
| 56 |
|
| 57 |
There is currently no streamlined support for projects which generate D-Bus |
| 58 |
interfaces at runtime. |
| 59 |
|
| 60 |
dbus-deviation.mk defines the following rules: |
| 61 |
• dist-dbus-api-compatibility (a dependency of dist-hook) |
| 62 |
• check-dbus-api-compatibility (a dependency of check-local) |
| 63 |
• dbus-deviation-mk-install (never triggered automatically) |
| 64 |
|
| 65 |
Dependencies |
| 66 |
============ |
| 67 |
|
| 68 |
• argparse |
| 69 |
• lxml |
| 70 |
|
| 71 |
Development |
| 72 |
=========== |
| 73 |
|
| 74 |
For fun, dbus-deviation uses the following services to do continuous |
| 75 |
integration and gather build statistics: |
| 76 |
• https://travis-ci.org/pwithnall/dbus-deviation |
| 77 |
• https://landscape.io/github/pwithnall/dbus-deviation |
| 78 |
• https://coveralls.io/r/pwithnall/dbus-deviation |
| 79 |
• https://codecov.io/github/pwithnall/dbus-deviation |
| 80 |
|
| 81 |
Licensing |
| 82 |
========= |
| 83 |
|
| 84 |
dbus-deviation is licensed under the LGPL version 2.1 (or, at your option, any |
| 85 |
later version). See COPYING for more details. |
| 86 |
|
| 87 |
dbus-deviation versions 0.4.0 and earlier were licensed under the choice of the |
| 88 |
Academic Free License version 2.1, or the GNU General Public License version 2 |
| 89 |
(or, at your option, any later version). This is the same license as D-Bus |
| 90 |
itself. Version 0.5.0 was relicensed to LGPLv2.1+ as it’s a more standard license |
| 91 |
with less ambiguity about its implications. |
| 92 |
|
| 93 |
Bugs |
| 94 |
==== |
| 95 |
|
| 96 |
Bug reports and patches should be sent via GitHub or Gitlab: |
| 97 |
|
| 98 |
https://github.com/pwithnall/dbus-deviation |
| 99 |
https://gitlab.com/dbus-deviation/dbus-deviation |
| 100 |
|
| 101 |
Contact |
| 102 |
======= |
| 103 |
|
| 104 |
Philip Withnall <[email protected]> |
| 105 |
http://people.collabora.com/~pwith/dbus-deviation/ |