1. 25 Mar, 2015 1 commit
  2. 05 Mar, 2015 1 commit
  3. 02 Mar, 2015 1 commit
  4. 16 Feb, 2015 1 commit
  5. 12 Feb, 2015 1 commit
  6. 19 Jan, 2015 1 commit
  7. 08 Dec, 2014 1 commit
  8. 02 Dec, 2014 4 commits
  9. 14 Nov, 2014 2 commits
  10. 13 Nov, 2014 6 commits
    • Niklas Hambuechen's avatar
      Use Cabal to enforce dependency versions · 8e193466
      Niklas Hambuechen authored
      This uses `cabal configure` to determine which exact dependency versions
      we are compiling against, and ensures that these versions are used
      by passing -package-id flags to GHC.
      
      The `cabal configure` step makes the build fail before compiling / type
      checking if the user tries to compile against a dependency version we don't
      support; before, this case led to type errors which were not clearly
      user errors. This fixes issue #988.
      
      The output of `cabal configure` is also used to generate MIN_VERSION_*
      macros.
      
      MIN_VERSION_* macros are the standard way to build CPP dependency switches
      in Haskell packages, and they replace our custom macros (like PARALLEL3
      and NO_REGEX_PCRE) which had to be hand-built for each dependency.
      We can now query the version of any Haskell dependency without having
      to manually add a flag via autoconf.
      
      All ghc and hlint invocations were adjusted to take these macros into
      account.
      
      This change introduces a Haskell-build-time dependency on cabal-install
      (for `cabal configure`) and the Cabal API (for obtaining the configured
      dependency versions and generating the macros).
      Any cabal version since Debian Squeeze is supported.
      
      Note that our use of Cabal does not imply any downloading of dependencies
      at build time, hermetic builds are unaffected by this change.
      
      For developers we now require hlint >= 1.8.60, to make use of its
      --cpp-file option.
      However, hlint >= 1.9.12 is recommended since for
      hlint >= 1.8.58 && < 1.9.12 the --utf8 flag is non-functional
      (see https://github.com/ndmitchell/hlint/issues/96); this can be worked
      though by using the equivalent `--encoding=UTF-8` flag.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      8e193466
    • Niklas Hambuechen's avatar
      Cabal: Relax lower bounds · 27ca54a7
      Niklas Hambuechen authored
      Compilation was tested successfully on our buildbot.
      
      Indirect dependencies were removed, found by the `packdeps` tool.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      27ca54a7
    • Niklas Hambuechen's avatar
      Cabal: Allow network <= 2.6 · bc4ea0cf
      Niklas Hambuechen authored
      Compilation was tested successfully with network-2.5.0.0 and network-2.6.0.2.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      bc4ea0cf
    • Niklas Hambuechen's avatar
      Cabal: Allow attoparsec <= 0.12 and lens <= 4.3 · 2bc75624
      Niklas Hambuechen authored
      Compilation was tested successfully.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      2bc75624
    • Niklas Hambuechen's avatar
      Cabal: Allow json-0.8 · 3a6007b1
      Niklas Hambuechen authored
      Compilation was tested successfully.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      3a6007b1
    • Niklas Hambuechen's avatar
      Add cabal file generation to Makefile.am · 3736b078
      Niklas Hambuechen authored
      This allows us to specify the exact version ranges of dependencies we
      support, across all operating systems.
      
      See issue #988.
      
      This commit only adds the cabal file and declares the dependencies.
      Enforcing them will be subject of a later commit.
      
      So far, we have only given the names of dependency in most cases,
      making sure that Ganeti builds with the dependency versions that are in
      Debian.
      This has caused problems for users that were not running Debian, or
      when there were packages installed in the compiling user's ~/.ghc
      directory, leading to compile-time type errors instead of pre-build
      configuration errors; for an example, see:
        https://code.google.com/p/ganeti/issues/detail?id=979#c10
      
      By explicitly listing our dependencies, we make clear which versions
      are supported.
      
      Modules and executables listed in the cabal file are automatically
      generated from the Makefile; executables are symlinked in an apps/
      directory to avoid repeated compilation as explained in:
      
        http://stackoverflow.com/a/6711739/263061
        http://stackoverflow.com/q/12305970/263061
      
      For example, in apps/ there is:
      
        hluxid.hs -> ../src/hluxid.hs
        hluxid.hs.stamp
        [...]
      
      Each executable symlink has a stamp file to track its modification time
      because make follow symlinks and thus does not see symlink modification
      times.
      
      In addition to declaring our dependencies, this setup allows building
      Ganeti's Haskell code with cabal to support editor integration and
      cabal-based tooling, the Makefile remains the default way to build Ganeti.
      Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      3736b078