Extend `packages` by 4th column for upstream repo
authorHerbert Valerio Riedel <hvr@gnu.org>
Mon, 2 Sep 2013 14:32:28 +0000 (16:32 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Mon, 2 Sep 2013 14:39:03 +0000 (16:39 +0200)
By keeping the repository url in the `packages` file scripts such as
source:ghc/sync-all can pick it up. Moreover, it's easier to
automatically validate for correctness than the
wiki:Repositories/Upstream page.

boot
packages
sync-all

diff --git a/boot b/boot
index 3c17e4c..1374742 100755 (executable)
--- a/boot
+++ b/boot
@@ -58,7 +58,7 @@ sub sanity_check_tree {
         if (/^#/) {
             # Comment; do nothing
         }
-        elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+$/) {
+        elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+ +[^ ]+$/) {
             $dir = $1;
             $tag = $2;
 
index ecba5c8..39d8d8d 100644 (file)
--- a/packages
+++ b/packages
@@ -2,7 +2,7 @@
 # the *repositories* that make up GHC. It is parsed by
 # * boot
 # * sync-all
-# * rules/extra-packages.mk
+# * rules/foreachLibrary.mk
 #
 # Some of this information is duplicated elsewhere in the build system:
 #    See Trac #3896
 #    - nofib and testsuite are optional helpers
 #
 # The format of the lines in this file is:
-#   localpath    tag    remotepath
+#   localpath  tag  remotepath  upstreamurl
 # where
 #   * 'localpath' is where to put the repository in a checked out tree.
 #   * 'remotepath' is where the repository is in the central repository.
 #     It is - for submodules.
+#   * 'upstreamurl' is the upstream Git repo location for packages
+#     maintained outside of GHC HQ.
 #
 #   * The 'tag' determines when "darcs-all get" will get the
 #     repo. If the tag is "-" then it will always get it, but if there
 #
 # Lines that start with a '#' are comments.
 #
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#    localpath                tag           remotepath
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-ghc-tarballs                    windows     ghc-tarballs.git
-libffi-tarballs                 -           libffi-tarballs.git
-utils/hsc2hs                    -           hsc2hs.git
-utils/haddock                   -           haddock.git
-libraries/array                 -           packages/array.git
-libraries/base                  -           packages/base.git
-libraries/binary                -           -
-libraries/bytestring            -           -
-libraries/Cabal                 -           -
-libraries/containers            -           -
-libraries/deepseq               -           packages/deepseq.git
-libraries/directory             -           packages/directory.git
-libraries/filepath              -           packages/filepath.git
-libraries/ghc-prim              -           packages/ghc-prim.git
-libraries/haskeline             -           -
-libraries/haskell98             -           packages/haskell98.git
-libraries/haskell2010           -           packages/haskell2010.git
-libraries/hoopl                 -           packages/hoopl.git
-libraries/hpc                   -           packages/hpc.git
-libraries/integer-gmp           -           packages/integer-gmp.git
-libraries/integer-simple        -           packages/integer-simple.git
-libraries/old-locale            -           packages/old-locale.git
-libraries/old-time              -           packages/old-time.git
-libraries/pretty                -           -
-libraries/process               -           packages/process.git
-libraries/template-haskell      -           packages/template-haskell.git
-libraries/terminfo              -           -
-libraries/time                  -           -
-libraries/transformers          -           -
-libraries/unix                  -           packages/unix.git
-libraries/Win32                 -           -
-libraries/xhtml                 -           -
-testsuite                       testsuite   testsuite.git
-nofib                           nofib       nofib.git
-libraries/parallel              extra       packages/parallel.git
-libraries/stm                   extra       packages/stm.git
-libraries/random                dph         -
-libraries/primitive             dph         -
-libraries/vector                dph         -
-libraries/dph                   dph         packages/dph.git
-.                               -           ghc.git
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# localpath                  tag         remotepath                      upstreamurl
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ghc-tarballs                 windows     ghc-tarballs.git                -
+libffi-tarballs              -           libffi-tarballs.git             -
+utils/hsc2hs                 -           hsc2hs.git                      -
+utils/haddock                -           haddock.git                     -
+libraries/array              -           packages/array.git              -
+libraries/base               -           packages/base.git               -
+libraries/binary             -           -                               https://github.com/kolmodin/binary.git
+libraries/bytestring         -           -                               https://github.com/haskell/bytestring.git
+libraries/Cabal              -           -                               https://github.com/haskell/cabal.git
+libraries/containers         -           -                               https://github.com/haskell/containers.git
+libraries/deepseq            -           packages/deepseq.git            -
+libraries/directory          -           packages/directory.git          -
+libraries/filepath           -           packages/filepath.git           -
+libraries/ghc-prim           -           packages/ghc-prim.git           -
+libraries/haskeline          -           -                               http://git.haskell.org/darcs-mirrors/haskeline.git
+libraries/haskell98          -           packages/haskell98.git          -
+libraries/haskell2010        -           packages/haskell2010.git        -
+libraries/hoopl              -           packages/hoopl.git              -
+libraries/hpc                -           packages/hpc.git                -
+libraries/integer-gmp        -           packages/integer-gmp.git        -
+libraries/integer-simple     -           packages/integer-simple.git     -
+libraries/old-locale         -           packages/old-locale.git         -
+libraries/old-time           -           packages/old-time.git           -
+libraries/pretty             -           -                               https://github.com/haskell/pretty.git
+libraries/process            -           packages/process.git            -
+libraries/template-haskell   -           packages/template-haskell.git   -
+libraries/terminfo           -           -                               http://git.haskell.org/darcs-mirrors/terminfo.git
+libraries/time               -           -                               http://git.haskell.org/darcs-mirrors/time.git
+libraries/transformers       -           -                               http://git.haskell.org/darcs-mirrors/transformers.git
+libraries/unix               -           packages/unix.git               -
+libraries/Win32              -           -                               https://github.com/haskell/win32.git
+libraries/xhtml              -           -                               https://github.com/haskell/xhtml.git
+testsuite                    testsuite   testsuite.git                   -
+nofib                        nofib       nofib.git                       -
+libraries/parallel           extra       packages/parallel.git           -
+libraries/stm                extra       packages/stm.git                -
+libraries/random             dph         -                               -
+libraries/primitive          dph         -                               http://git.haskell.org/darcs-mirrors/primitive.git
+libraries/vector             dph         -                               http://git.haskell.org/darcs-mirrors/vector.git
+libraries/dph                dph         packages/dph.git                -
+.                            -           ghc.git                         -
\ No newline at end of file
index 85a697a..f37c379 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -50,11 +50,12 @@ sub parsePackages {
     foreach (@repos) {
         chomp;
         $lineNum++;
-        if (/^([^# ]+) +([^ ]+) +([^ ]+)$/) {
+        if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
             my %line;
             $line{"localpath"}  = $1;
             $line{"tag"}        = $2;
             $line{"remotepath"} = $3;
+            $line{"upstreamurl"}= $4;
             push @packages, \%line;
 
             $tags{$2} = 0;