[commit: ghc] wip/T16199: Adds a veriy-packages script to ensure ghc and hackage agree on package source and version (b927417)

git at git.haskell.org git at git.haskell.org
Fri Jan 18 02:10:32 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T16199
Link       : http://ghc.haskell.org/trac/ghc/changeset/b927417984187d09602c78b49d8d08debfc208d4/ghc

>---------------------------------------------------------------

commit b927417984187d09602c78b49d8d08debfc208d4
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Fri Jan 18 10:05:41 2019 +0800

    Adds a veriy-packages script to ensure ghc and hackage agree on package source and version


>---------------------------------------------------------------

b927417984187d09602c78b49d8d08debfc208d4
 utils/verify-release/verify-packages.sh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/utils/verify-release/verify-packages.sh b/utils/verify-release/verify-packages.sh
new file mode 100755
index 0000000..4d3a385
--- /dev/null
+++ b/utils/verify-release/verify-packages.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# This script will veriy that the packages in ghc,
+# correspond to packages on hackage.
+rm -fR ghc-packages hackage-packages package-diffs
+mkdir -p ghc-packages hackage-packages package-diffs
+# We'll skip Cabal and tarballs, while looking only at packages in libraries
+# the we reference as gitmodules.
+for lib in $(git submodule status|grep libraries|grep -v tarballs|grep -v Cabal|awk -F\  '{ print $2 }'); do
+    (cd $lib && cabal new-sdist -o ../../ghc-packages);
+done
+
+for pkg in $(cd ghc-packages && ls *.tar.gz); do
+    PKG=${pkg%%.tar.gz}
+    (cd hackage-packages && cabal get --pristine ${PKG})
+    (cd ghc-packages && tar xzf $pkg)
+    diff -ur hackage-packages/${PKG} ghc-packages/${PKG} \
+	| sed "s/hackage-packages\/${PKG}/hackage-package-${PKG}/"g \
+	| sed "s/ghc-packages\/${PKG}/ghc-package-${PKG}/"g \
+	      > package-diffs/${PKG}.patch
+done
+ls -lah package-diffs



More information about the ghc-commits mailing list