[Pkg-voip-commits] [asterisk] 01/11: sanity check to avoid changing the ABI hash

tzafrir at debian.org tzafrir at debian.org
Wed Dec 17 06:27:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository asterisk.

commit 074f8750413dce77b7631ffbdd9da16c5b44c62f
Author: Tzafrir Cohen <tzafrir at debian.org>
Date:   Sat Nov 1 17:15:32 2014 +0200

    sanity check to avoid changing the ABI hash
    
    If the ABI is changed, modules built against a different the old version
    will fail to load with the new copy. Thus we need to avoid breaking it
    on a stable release.
---
 debian/rules | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/debian/rules b/debian/rules
index a1a9163..a22403a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+# Sanity check for a stable release:
+SAVED_ABI_HASH = 32b00085fac294c16fcde5db8ce7e676
+
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
@@ -96,6 +99,15 @@ override_dh_auto_build:
 		menuselect/menuselect --enable DEBUG_THREADS menuselect.makeopts ; \
 	fi
 	$(FETCH_ENV) dh_auto_build -- $(BUILDFLAGS)
+	# Sanity check: don't break the ABI for modules:
+	@abi_hash=`awk -F'"' '/AST_BUILDOPT_SUM/ {print $$2}' include/asterisk/buildopts.h`; \
+	  if [ "$$abi_hash" != "$(SAVED_ABI_HASH)" ]; then \
+	    echo "Debian packaging problem: ABI checksum changed."; \
+	    echo "  Was: $(SAVED_ABI_HASH)"; \
+	    echo "  Now: $$abi_hash"; \
+	    echo "Check include/asterisk/buildopts.h"; \
+	    exit 1; \
+	  fi
 
 SND_FILE=asterisk-core-sounds-en-gsm-1.4.20.tar.gz
 override_dh_clean:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list