[commit: ghc] wip/ghc-8.8-merges: [T16199] Adds a verify-packages script (b69e4e6)

git at git.haskell.org git at git.haskell.org
Thu Feb 21 15:10:29 UTC 2019


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

On branch  : wip/ghc-8.8-merges
Link       : http://ghc.haskell.org/trac/ghc/changeset/b69e4e6258793e8411d375e6e7f27666a170380f/ghc

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

commit b69e4e6258793e8411d375e6e7f27666a170380f
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Sun Jan 20 05:24:21 2019 -0500

    [T16199] Adds a verify-packages script


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

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

diff --git a/utils/verify-release/verify-packages.sh b/utils/verify-release/verify-packages.sh
new file mode 100755
index 0000000..d5c6bf1
--- /dev/null
+++ b/utils/verify-release/verify-packages.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# This script will verify 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
+# that 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 hackage-packages/${PKG} && git init && git add . && git commit -q -m "hackage packages" && rm -fR *)
+    (cd hackage-packages && tar xzf ../ghc-packages/$pkg)
+    (cd hackage-packages/${PKG} && git -c core.fileMode=false diff > ../$PKG.patch)
+done
+find hackage-packages -name "*.patch" -not -empty -type f -print -exec false {} +



More information about the ghc-commits mailing list