add an ABI change check to prevent unexpected hash changes

This commit is contained in:
Jens Petersen 2016-07-13 17:17:40 +09:00
parent 7748407e4e
commit 4874a3b925
1 changed files with 13 additions and 0 deletions

View File

@ -432,6 +432,18 @@ rm testghc/*
make test
%endif
# check the ABI hashes
%if %{undefined ghc_bootstrapping}
for i in %{ghc_packages_list}; do
old=$(ghc-pkg field $i id --simple-output)
new=$(/usr/libexec/ghc-pkg/wrapper %{buildroot}%{ghclibdir} field $i id --simple-output)
if [ "$old" != "$new" ]; then
echo "ABI hash for $i changed!:"
echo "$old -> $new"
exit 1
done
%endif
%post compiler
# Alas, GHC, Hugs, and nhc all come with different set of tools in
@ -536,6 +548,7 @@ fi
%changelog
* Tue Jul 12 2016 Jens Petersen <petersen@redhat.com> - 7.10.3-51
- obsolete haskell98 and haskell2010
- add an ABI change check to prevent unexpected ghc package hash changes
* Fri Jun 3 2016 Jens Petersen <petersen@redhat.com> - 7.10.3-50
- perf build