summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2021-09-10 13:47:33 +0000
committerDaiki Ueno <ueno@gnu.org>2021-09-10 13:47:33 +0000
commit687787b1651be522c9af2a028498c7dbdc6708ae (patch)
tree172dcd26c08dc605194f55afa0333a25a1ba3c20
parent8ecff9486ef386b85aeaf8cf949cc1e8423457d9 (diff)
parente3bb315530455462a6d78b954b452f2a7ae09e09 (diff)
downloadgnutls-687787b1651be522c9af2a028498c7dbdc6708ae.tar.gz
Merge branch 'tmp-abi-check' into 'master'
devel: provide external git diff driver for *.abi files See merge request gnutls/gnutls!1214
-rw-r--r--.gitattributes2
-rw-r--r--CONTRIBUTING.md8
-rwxr-xr-xdevel/git-abidiff-gnutls16
3 files changed, 25 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..d58d318a6c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# See devel/git-abidiff-gnutls for making this useful.
+devel/*.abi diff=abi
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 47037a3dd6..5441e54600 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -158,7 +158,7 @@ As such, some questions to answer before adding a new API:
The make rule 'abi-check' verifies that the ABI remained compatible since
-the last tagged release. It relies on the git tree and abi-compliance-checker.
+the last tagged release. It relies on the git tree and libabigail.
The above do not apply to the C++ library; this library's ABI should not
be considered stable.
@@ -403,6 +403,12 @@ or adding new command line options to tools you need to run 'make
files-update', review the output (when feasible) and commit it separately,
e.g., with a message: "auto-generated files update".
+ The 'files-update' rule also regenerates the ABI dump files (.abi), used by
+the 'abi-check' rule to ensure library ABI compatibility. To make it easier
+to track actual changes to be made in those files, a git external diff
+driver is provided as `devel/git-abidiff-gnutls`. See the comment in the
+file for the instruction.
+
# Guile bindings:
diff --git a/devel/git-abidiff-gnutls b/devel/git-abidiff-gnutls
new file mode 100755
index 0000000000..a5507360d0
--- /dev/null
+++ b/devel/git-abidiff-gnutls
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This is a diff driver that works on the .abi files during GnuTLS
+# development. To use, copy this file to ~/.local/bin and issue the
+# following command to update your git configuration:
+#
+# git config diff.abi.command ~/.local/bin/git-abidiff-gnutls
+
+top_srcdir=$(git rev-parse --show-toplevel)
+bold=$(tput bold)
+normal=$(tput sgr0)
+
+echo "${bold}$1${normal}"
+abidiff --suppressions "$top_srcdir/devel/libgnutls.abignore" \
+ --hd2 "$top_srcdir/lib/includes/gnutls/" \
+ "$2" "$5" || :