From c4ba061c7f4a17d448b68fe25dae89c7489ab0a6 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Mon, 22 Aug 2016 20:43:21 -0700 Subject: [PATCH 01/19] Add instructions and Vagrantfile for building GHC on Fedora 24 (libtinfo6) --- doc/MAINTAINER_GUIDE.md | 47 ++++++++++++++++++++++-- etc/vagrant/fedora-24-x86_64/Vagrantfile | 13 +++++++ 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 etc/vagrant/fedora-24-x86_64/Vagrantfile diff --git a/doc/MAINTAINER_GUIDE.md b/doc/MAINTAINER_GUIDE.md index c80625bf18..3f524a0558 100644 --- a/doc/MAINTAINER_GUIDE.md +++ b/doc/MAINTAINER_GUIDE.md @@ -209,8 +209,47 @@ set up. * [Publish a new Github release](https://github.com/commercialhaskell/ghc/releases/new) with tag `ghc-X.Y.Z-release` and same name. + * Down all the relevant GHC bindists from https://www.haskell.org/ghc/download_ghc_X_Y_Z and upload them to the just-created Github release (see + [stack-setup-2.yaml](https://github.com/fpco/stackage-content/blob/master/stack/stack-setup-2.yaml) + for the ones we used in the last GHC release). + + In the case of OS X, repackage the `.xz` bindist as a `.bz2`, since OS X does + not include `xz` by default or provide an easy way to install it. + + * Build any additional required bindists (see below for instructions) + + * libtinfo6 (etc/vagrant/fedora24-x86_64) + * [Edit stack-setup-2.yaml](https://github.com/fpco/stackage-content/edit/master/stack/stack-setup-2.yaml) - and add the new bindists. For each one, download the bindist from - https://www.haskell.org/ghc/download_ghc_X_Y_Z and upload it to the - just-created Github release, and refer to the Github version in the YAML. Be - sure to update the `content-length` and `sha1` values. + and add the new bindists, pointing to the Github release version. Be sure to + update the `content-length` and `sha1` values. + +### Building GHC + +Set the `GHC_VERSION` environment variable to the version to build, +then run (from [here](https://ghc.haskell.org/trac/ghc/wiki/Newcomers)): + + git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ && \ + git clone -b ghc-${GHC_VERSION}-release --recursive git://github.com/ghc/ghc ghc-${GHC_VERSION} && \ + cd ghc-${GHC_VERSION}/ && \ + cp mk/build.mk.sample mk/build.mk && \ + sed -i 's/^#BuildFlavour *= *perf$/BuildFlavour = perf/' mk/build.mk && \ + ./boot && \ + ./configure --enable-tarballs-autodownload && \ + sed -i 's/^TAR_COMP *= *bzip2$/TAR_COMP = xz/' mk/config.mk && \ + make -j$(cat /proc/cpuinfo|grep processor|wc -l) && \ + make binary-dist + +GHC 7.8.4 is slightly different: + + git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ && \ + git clone -b ghc-${GHC_VERSION}-release --recursive git://github.com/ghc/ghc ghc-${GHC_VERSION} && \ + cd ghc-${GHC_VERSION}/ && \ + ./sync-all --extra --nofib -r git://git.haskell.org get -b ghc-7.8 && \ + cp mk/build.mk.sample mk/build.mk && \ + sed -i 's/^#BuildFlavour *= *perf$/BuildFlavour = perf/' mk/build.mk && \ + perl boot && \ + ./configure && \ + sed -i 's/^TAR_COMP *= *bzip2$/TAR_COMP = xz/' mk/config.mk && \ + make -j$(cat /proc/cpuinfo|grep processor|wc -l) && \ + make binary-dist diff --git a/etc/vagrant/fedora-24-x86_64/Vagrantfile b/etc/vagrant/fedora-24-x86_64/Vagrantfile new file mode 100644 index 0000000000..13adf7279d --- /dev/null +++ b/etc/vagrant/fedora-24-x86_64/Vagrantfile @@ -0,0 +1,13 @@ +Vagrant.configure(2) do |config| + config.vm.box = "fedora/24-cloud-base" + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"], rsync__verbose: true + config.vm.provider "virtualbox" do |vb| + vb.memory = "3072" + end + config.ssh.forward_agent = true + config.vm.provision "shell", inline: <<-SHELL + set -xe + sudo dnf update -y + sudo dnf install -y glibc-devel ncurses-devel gmp-devel autoconf automake libtool gcc make perl python ghc happy alex git python-sphinx docbook-utils docbook-utils-pdf docbook-style-xsl patch file gcc-c++ bzip2 xz + SHELL +end From d29b3fc9a44c2abd2e2351c80eb97163b978ae4e Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Mon, 22 Aug 2016 20:55:30 -0700 Subject: [PATCH 02/19] Update Vagrantfiles --- etc/vagrant/centos-6-i386/Vagrantfile | 2 +- etc/vagrant/centos-6-x86_64/Vagrantfile | 4 ++-- etc/vagrant/centos-7-x86_64/Vagrantfile | 4 ++-- etc/vagrant/debian-7-amd64/Vagrantfile | 2 +- etc/vagrant/debian-7-i386/Vagrantfile | 2 +- etc/vagrant/fedora-24-x86_64/Vagrantfile | 2 +- etc/vagrant/freebsd-10.3-amd64/Vagrantfile | 2 +- etc/vagrant/openbsd-5.9-amd64/Vagrantfile | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/etc/vagrant/centos-6-i386/Vagrantfile b/etc/vagrant/centos-6-i386/Vagrantfile index 3ed0d8dbe0..912e8894e6 100644 --- a/etc/vagrant/centos-6-i386/Vagrantfile +++ b/etc/vagrant/centos-6-i386/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/centos-6-x86_64/Vagrantfile b/etc/vagrant/centos-6-x86_64/Vagrantfile index 8695706792..2812f16ba2 100644 --- a/etc/vagrant/centos-6-x86_64/Vagrantfile +++ b/etc/vagrant/centos-6-x86_64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end @@ -15,7 +15,7 @@ Vagrant.configure(2) do |config| yum -y install epel-release yum -y install perl make automake gcc gmp-devel zlib-devel rpm-build tar which git xz python-boto deltarpm python-deltarpm rpm-build rpm-sign ncurses-devel if ! which stack; then - curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/6/fpco.repo >/etc/yum.repos.d/fpco.repo + curl -sSL https://download.fpcomplete.com/centos/6/fpco.repo >/etc/yum.repos.d/fpco.repo yum -y check-update || true fi yum -y install stack diff --git a/etc/vagrant/centos-7-x86_64/Vagrantfile b/etc/vagrant/centos-7-x86_64/Vagrantfile index c9f46ceffa..43724f5b36 100644 --- a/etc/vagrant/centos-7-x86_64/Vagrantfile +++ b/etc/vagrant/centos-7-x86_64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-7.0-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end @@ -14,7 +14,7 @@ Vagrant.configure(2) do |config| yum -y install epel-release yum -y install perl make automake gcc gmp-devel zlib-devel tar which git python-boto deltarpm python-deltarpm rpm-build rpm-sign ncurses-devel if ! which stack; then - curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/7/fpco.repo >/etc/yum.repos.d/fpco.repo + curl -sSL https://download.fpcomplete.com/centos/7/fpco.repo >/etc/yum.repos.d/fpco.repo yum -y check-update || true fi yum -y install stack diff --git a/etc/vagrant/debian-7-amd64/Vagrantfile b/etc/vagrant/debian-7-amd64/Vagrantfile index 0c8a2f15ff..2251bead38 100644 --- a/etc/vagrant/debian-7-amd64/Vagrantfile +++ b/etc/vagrant/debian-7-amd64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/debian-7-i386/Vagrantfile b/etc/vagrant/debian-7-i386/Vagrantfile index 5d5e6c3959..de6efef84a 100644 --- a/etc/vagrant/debian-7-i386/Vagrantfile +++ b/etc/vagrant/debian-7-i386/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/fedora-24-x86_64/Vagrantfile b/etc/vagrant/fedora-24-x86_64/Vagrantfile index 13adf7279d..a6f5dcaf69 100644 --- a/etc/vagrant/fedora-24-x86_64/Vagrantfile +++ b/etc/vagrant/fedora-24-x86_64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "fedora/24-cloud-base" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"], rsync__verbose: true + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "3072" end diff --git a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile index 4fac70e6f4..bfdd3a7c3d 100644 --- a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile +++ b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "freebsd/FreeBSD-10.3-RELEASE" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile index b01aa19e6c..225a077269 100644 --- a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile +++ b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "kaorimatz/openbsd-5.9-amd64" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__exclude: [".stack-work/", "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end @@ -11,7 +11,7 @@ Vagrant.configure(2) do |config| pkg_add xz bzip2 gmp libffi gmake git awscli gnupg-1.4.19p0 #TODO: use a newer version of stack that supports `stack setup` on OpenBSD for bootstrap - curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/dev-tools/stack/stack-1.1.3.20160521-openbsd.gz \ + curl -sSL https://download.fpcomplete.com/dev-tools/stack/stack-1.1.3.20160521-openbsd.gz \ | gzip -dc > /usr/local/bin/stack chmod a+x /usr/local/bin/stack From 860751ad6bdfde370798d18b62ce752c8583a573 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Tue, 23 Aug 2016 16:42:45 +0200 Subject: [PATCH 03/19] Flesh out changelog for v1.2.0 --- ChangeLog.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 4 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index c8a1703272..fe61d8e5b4 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,10 +4,33 @@ Release notes: +* On many Un*x systems, stack can now be installed with a simple + one-liner: `wget -qO- https://get.haskellstack.org/ | sh` +* Bindists for Fedora 24 are now available. + Major changes: +* Use the `store` package for binary serialization of most caches. +* Add `stack hoogle` command. + [#55](https://github.com/commercialhaskell/stack/issues/55) +* Support for absolute file path in `url` field of `setup-info` or `--ghc-bindist` +* Add support for rendering GHCi scripts targeting different GHCi like + applications + [#2457](https://github.com/commercialhaskell/stack/pull/2457) + Behavior changes: +* Remove `stack ide start` and `stack ide load-targets` commands. + [#2178](https://github.com/commercialhaskell/stack/issues/2178) +* Only require minor version match for Docker stack exe. + This way, we can make patch releases for version bounds and similar + build issues without needing to upload new binaries for Docker. +* Support .buildinfo files in `stack ghci`. + [#2242](https://github.com/commercialhaskell/stack/pull/2242) +* Support -ferror-spans syntax in GHC error messages. +* Avoid unpacking ghc to `/tmp` + [#996](https://github.com/commercialhaskell/stack/issues/996) + Other enhancements: * Stack/Nix: Passes the right ghc derivation as an argument to the `shell.nix` when a @@ -15,7 +38,6 @@ Other enhancements: See [#2243](https://github.com/commercialhaskell/stack/issues/2243) * Stack/Nix: Sets `LD_LIBRARY_PATH` so packages using C libs for Template Haskell can work (See _e.g._ [this HaskellR issue](https://github.com/tweag/HaskellR/issues/253)) - * Parse CLI arguments and configuration files into less permissive types, improving error messages for bad inputs. [#2267](https://github.com/commercialhaskell/stack/issues/2267) @@ -26,13 +48,35 @@ Other enhancements: See [#2259](https://github.com/commercialhaskell/stack/issues/2259) * Perform some subprocesses during setup concurrently, slightly speeding up most commands. [#2346](https://github.com/commercialhaskell/stack/pull/2346) -* Support for absolute file path in `url` field of `setup-info` or `--ghc-bindist` * `stack setup` no longer unpacks to the system temp dir on posix systems. [#996](https://github.com/commercialhaskell/stack/issues/996) * `stack setup` detects libtinfo6 and can downloads alternate GHC bindists [#2302](https://github.com/commercialhaskell/stack/issues/2302). * `stack setup` detects Linux ARMv7 downloads appropriate GHC bindist [#2103](https://github.com/commercialhaskell/stack/issues/2103) +* Custom `stack` binaries list dependency versions in output for `--version`. + See [#2222](https://github.com/commercialhaskell/stack/issues/2222) + and [#2450](https://github.com/commercialhaskell/stack/issues/2450). +* Use a pretty printer to output dependency resolution errors. + [#1912](https://github.com/commercialhaskell/stack/issues/1912) +* Remove the `--os` flag + [#2227](https://github.com/commercialhaskell/stack/issues/2227) +* Add 'netbase' and 'ca-certificates' as dependency for .deb packages. + [#2293](https://github.com/commercialhaskell/stack/issues/2293). +* Add `stack ide targets` command. +* Enhance debug logging with subprocess timings. +* Pretty-print YAML parse errors + [#2374](https://github.com/commercialhaskell/stack/issues/2374) +* Clarify confusing `stack setup` output + [#2314](https://github.com/commercialhaskell/stack/issues/2314) +* Delete `Stack.Types` multimodule to improve build times + [#2405](https://github.com/commercialhaskell/stack/issues/2405) +* Remove spurious newlines in build logs + [#2418](https://github.com/commercialhaskell/stack/issues/2418) +* Interpreter: Provide a way to hide implicit packages + [#1208](https://github.com/commercialhaskell/stack/issues/1208) +* Check executability in exec lookup + [#2489](https://github.com/commercialhaskell/stack/issues/2489) Bug fixes: @@ -46,8 +90,41 @@ Bug fixes: [#2361](https://github.com/commercialhaskell/stack/issues/2361) * Fixes src directory pollution of `style.css` and `highlight.js` with GHC 8's haddock [#2429](https://github.com/commercialhaskell/stack/issues/2429) -* Remove the `--os` flag - [#2227](https://github.com/commercialhaskell/stack/issues/2227) +* Handle filepaths with spaces in `stack ghci` + [#2266](https://github.com/commercialhaskell/stack/issues/2266) +* Apply ghc-options to snapshot packages + [#2289](https://github.com/commercialhaskell/stack/issues/2289) +* stack sdist: Fix timestamp in tarball + [#2394](https://github.com/commercialhaskell/stack/pull/2394) +* Allow global Stack arguments with a script + [#2316](https://github.com/commercialhaskell/stack/issues/2316) +* Inconsistency between ToJSON and FromJSON instances of PackageLocation + [#2412](https://github.com/commercialhaskell/stack/pull/2412) +* Perform Unicode normalization on filepaths + [#1810](https://github.com/commercialhaskell/stack/issues/1810) +* Solver: always keep ghc wired-in as hard constraints + [#2453](https://github.com/commercialhaskell/stack/issues/2453) +* Support OpenBSD's tar where possible, require GNU tar for xz support + [#2283](https://github.com/commercialhaskell/stack/issues/2283) +* Fix using --coverage with Cabal-1.24 + [#2424](https://github.com/commercialhaskell/stack/issues/2424) +* When marking exe installed, remove old version + [#2373](https://github.com/commercialhaskell/stack/issues/2373) +* Stop truncating all-cabal-hashes git repo + [#2175](https://github.com/commercialhaskell/stack/issues/2175) +* Handle non-ASCII filenames on Windows + [#2491](https://github.com/commercialhaskell/stack/issues/2491) +* Avoid using multiple versions of a package in script interpreter + by passing package-id to ghc/runghc + [#1957](https://github.com/commercialhaskell/stack/issues/1957) +* Only pre-load compiler version when using nix integration + [#2459](https://github.com/commercialhaskell/stack/issues/2459) +* Solver: parse cabal errors also on Windows + [#2502](https://github.com/commercialhaskell/stack/issues/2502) +* Allow exec and ghci commands in interpreter mode. + Scripts can now automatically open in the repl by using `exec ghci` + instead of `runghc` in the shebang command. + [#2510](https://github.com/commercialhaskell/stack/issues/2510) ## 1.1.2 From e0b9b13865b3e906dfe3a91a8e458b703503dd88 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 23 Aug 2016 09:24:12 -0700 Subject: [PATCH 04/19] 'stack setup' detects libncursesw.so.6 and selects an appropriate GHC bindist --- doc/MAINTAINER_GUIDE.md | 5 ++-- doc/install_and_upgrade.md | 13 +++++++-- src/Stack/Setup.hs | 60 +++++++++++++++++++++++++------------- 3 files changed, 53 insertions(+), 25 deletions(-) diff --git a/doc/MAINTAINER_GUIDE.md b/doc/MAINTAINER_GUIDE.md index 3f524a0558..d222e8bc9e 100644 --- a/doc/MAINTAINER_GUIDE.md +++ b/doc/MAINTAINER_GUIDE.md @@ -226,8 +226,9 @@ set up. ### Building GHC -Set the `GHC_VERSION` environment variable to the version to build, -then run (from [here](https://ghc.haskell.org/trac/ghc/wiki/Newcomers)): +Set the `GHC_VERSION` environment variable to the version to build. + +For GHC >= 7.10.2, run (from [here](https://ghc.haskell.org/trac/ghc/wiki/Newcomers)): git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/ && \ git clone -b ghc-${GHC_VERSION}-release --recursive git://github.com/ghc/ghc ghc-${GHC_VERSION} && \ diff --git a/doc/install_and_upgrade.md b/doc/install_and_upgrade.md index 6a181387eb..11435acde2 100644 --- a/doc/install_and_upgrade.md +++ b/doc/install_and_upgrade.md @@ -230,9 +230,13 @@ new releases by some days. - [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_ - [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_ -In order to use `stack setup`, you will need the [ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/) AUR package installed. If this package is not installed, Stack will not be able to install GHC. +In order to use `stack setup`, you will need the +[libtinfo](https://aur.archlinux.org/packages/libtinfo/) AUR package installed. +If this package is not installed, Stack will not be able to install GHC. -If you use the [ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell), you can also get the `haskell-stack-tool` package from there. +If you use the +[ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell), you +can also get the `haskell-stack-tool` package from there. ## NixOS @@ -280,7 +284,10 @@ Stack](http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-sta * Debian / Ubuntu: `sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg` * Fedora / CentOS: `sudo dnf install perl make automake gcc gmp-devel libffi zlib xz tar git gnupg` (use `yum` instead of `dnf` on CentOS and Fedora <= 21) * Arch Linux: `sudo pacman -S make gcc ncurses git gnupg xz zlib gmp libffi zlib` - * In order to use `stack setup`, you will need the [ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/) AUR package installed. If this package is not installed, Stack will not be able to install GHC. + * In order to use `stack setup`, you will need the + [libtinfo](https://aur.archlinux.org/packages/libtinfo/) AUR package + installed. If this package is not installed, Stack will not be able to + install GHC. * Gentoo users, make sure to have the `ncurses` package with `USE=tinfo` (without it, stack will not be able to install GHC). * Now you can run `stack` from the terminal. diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index e4c7f5ff32..b10af911bc 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -8,6 +8,7 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE MultiWayIf #-} module Stack.Setup ( setupEnv @@ -472,7 +473,7 @@ getGhcBuild menv = do -- that GHC does (i.e. built in same environment as the GHC bindist). The algorithm would go -- something like this: -- - -- check for previous 'uname -a' plus compiler version/variant in cache + -- check for previous 'uname -a'/`ldconfig -p` plus compiler version/variant in cache -- if cached, then use that as suffix -- otherwise: -- download setup-info @@ -482,30 +483,49 @@ getGhcBuild menv = do -- try running it -- if successful, then choose that -- cache compiler suffix with the uname -a and ldconfig -p output hash plus compiler version + -- + -- Of course, could also try to make a static GHC bindist instead of all this rigamarole. platform <- asks getPlatform case platform of Platform _ Linux -> do eldconfigOut <- tryProcessStdout Nothing menv "ldconfig" ["-p"] - let efirstWords = fmap (mapMaybe (headMay . T.words) . - T.lines . T.decodeUtf8With T.lenientDecode) eldconfigOut - case efirstWords of - Right firstWords - | "libtinfo.so.6" `elem` firstWords - && not ("libtinfo.so.5" `elem` firstWords) -> do - $logDebug "Found libtinfo.so.6; using tinfo6 GHC build" - return (CompilerBuildSpecialized "tinfo6") - | "libgmp.so.3" `elem` firstWords - && not ("libgmp.so.10" `elem` firstWords) -> do - $logDebug "Found libgmp.so.3; using gmp4 GHC build" - return (CompilerBuildSpecialized "gmp4") - | otherwise -> do - $logDebug "Did not find libtinfo.so.6 or libgmp.so.3; using standard GHC build" - return CompilerBuildStandard - Left _ -> do - $logDebug "ldconfig -p failed; falling back to using standard GHC build" - return CompilerBuildStandard - _ -> return CompilerBuildStandard + let firstWords = case eldconfigOut of + Right ldconfigOut -> mapMaybe (headMay . T.words) $ + T.lines $ T.decodeUtf8With T.lenientDecode ldconfigOut + Left _ -> [] + checkLib lib + | libT `elem` firstWords = do + $logDebug ("Found shared library " <> libT <> " in 'ldconfig -p' output") + return True + | otherwise = do + -- There doesn't seem to be an easy way to get the true list of directories + -- to scan for shared libs, but this works for the case we care about here: Arch Linux + e <- doesFileExist ($(mkAbsDir "/usr/lib") lib) + if e + then $logDebug ("Found shared library " <> libT <> " in /usr/lib") + else $logDebug ("Did not find shared library " <> libT) + return e + where + libT = T.pack (toFilePath lib) + hastinfo5 <- checkLib $(mkRelFile "libtinfo.so.5") + hastinfo6 <- checkLib $(mkRelFile "libtinfo.so.6") + hasncurses6 <- checkLib $(mkRelFile "libncursesw.so.6") + hasgmp5 <- checkLib $(mkRelFile "libgmp.so.10") + hasgmp4 <- checkLib $(mkRelFile "libgmp.so.3") + if | hastinfo5 && hasgmp5 -> useBuild CompilerBuildStandard + | hastinfo6 && hasgmp5 -> useBuild (CompilerBuildSpecialized "tinfo6") + | hasncurses6 && hasgmp5 -> useBuild (CompilerBuildSpecialized "ncurses6") + | hasgmp4 && hastinfo5 -> useBuild (CompilerBuildSpecialized "gmp4") + | otherwise -> useBuild CompilerBuildStandard + _ -> useBuild CompilerBuildStandard + where + useBuild CompilerBuildStandard = do + $logDebug "Using standard GHC build" + return (CompilerBuildStandard) + useBuild (CompilerBuildSpecialized s) = do + $logDebug ("Using " <> T.pack s <> " GHC build") + return (CompilerBuildSpecialized s) -- | Ensure Docker container-compatible 'stack' executable is downloaded ensureDockerStackExe From 06ba97dd542038d5179f7b23c0258b4c4a74ded2 Mon Sep 17 00:00:00 2001 From: Tim Dysinger Date: Tue, 23 Aug 2016 08:14:18 -0700 Subject: [PATCH 05/19] add 2376 to the changelog --- ChangeLog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index c8a1703272..cd0b233fe3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -42,6 +42,9 @@ Bug fixes: [#2225](https://github.com/commercialhaskell/stack/issues/2225) * Detect resolver change in `stack solver` [#2252](https://github.com/commercialhaskell/stack/issues/2252) +* Fix a bug in docker image creation where the wrong base image was + selected + [#2376](https://github.com/commercialhaskell/stack/issues/2376) * Ignore special entries when unpacking tarballs [#2361](https://github.com/commercialhaskell/stack/issues/2361) * Fixes src directory pollution of `style.css` and `highlight.js` with GHC 8's From 096b63e30d0eea5ffc1009a7f383bd3efbcd3a2a Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Wed, 24 Aug 2016 06:48:47 -0700 Subject: [PATCH 06/19] Fix build on Windows --- src/Stack/Setup.hs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index b10af911bc..acce9bccc5 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -9,6 +9,7 @@ {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiWayIf #-} +{-# LANGUAGE CPP #-} module Stack.Setup ( setupEnv @@ -498,14 +499,19 @@ getGhcBuild menv = do | libT `elem` firstWords = do $logDebug ("Found shared library " <> libT <> " in 'ldconfig -p' output") return True +#ifndef WINDOWS + -- $(mkAbsDir "/usr/lib") fails to compile on Windows, thus the CPP | otherwise = do + -- This is a workaround for the fact that libtinfo.so.6 doesn't appear in + -- the 'ldconfig -p' output on Arch even when it exists. -- There doesn't seem to be an easy way to get the true list of directories - -- to scan for shared libs, but this works for the case we care about here: Arch Linux + -- to scan for shared libs, but this works for our particular case. e <- doesFileExist ($(mkAbsDir "/usr/lib") lib) if e then $logDebug ("Found shared library " <> libT <> " in /usr/lib") else $logDebug ("Did not find shared library " <> libT) return e +#endif where libT = T.pack (toFilePath lib) hastinfo5 <- checkLib $(mkRelFile "libtinfo.so.5") @@ -861,11 +867,11 @@ downloadFromInfo programsDir downloadInfo tool = do let DownloadInfo{downloadInfoContentLength=contentLength, downloadInfoSha1=sha1} = downloadInfo when (isJust contentLength) $ - $logWarn "`content-length` in not checked \n\ - \and should not be specified when `url` is a file path" + $logWarn ("`content-length` in not checked \n" <> + "and should not be specified when `url` is a file path") when (isJust sha1) $ - $logWarn "`sha1` is not checked and \n\ - \should not be specified when `url` is a file path" + $logWarn ("`sha1` is not checked and \n" <> + "should not be specified when `url` is a file path") return path _ -> fail $ "`url` must be either an HTTP URL or absolute file path: " ++ url From f37057b77bcfa8ce7cf0d6eb38f5506c49709ecb Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Wed, 24 Aug 2016 08:52:53 -0700 Subject: [PATCH 07/19] Fix comment that broke haddock build --- src/Stack/Setup.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index acce9bccc5..85040e09f0 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -500,7 +500,7 @@ getGhcBuild menv = do $logDebug ("Found shared library " <> libT <> " in 'ldconfig -p' output") return True #ifndef WINDOWS - -- $(mkAbsDir "/usr/lib") fails to compile on Windows, thus the CPP + -- (mkAbsDir "/usr/lib") fails to compile on Windows, thus the CPP | otherwise = do -- This is a workaround for the fact that libtinfo.so.6 doesn't appear in -- the 'ldconfig -p' output on Arch even when it exists. From 4f2a39a5bd75d155f8177e86f5ce6ad1b2da2f74 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Mon, 29 Aug 2016 23:58:58 +0200 Subject: [PATCH 08/19] Add download warning to changelog --- ChangeLog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 0d1c9afcf3..5d5ba96eb7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,11 @@ Release notes: +* The fix for + [#2175](https://github.com/commercialhaskell/stack/issues/2175) + entails that stack must perform a full clone of a large Git repo of + Hackage meta-information. The total download size is about 200 MB. + Please be aware of this when upgrading your stack installation. * On many Un*x systems, stack can now be installed with a simple one-liner: `wget -qO- https://get.haskellstack.org/ | sh` * Bindists for Fedora 24 are now available. From 323b509c6200e74fdcc7efdf4c94811fe5637456 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 15:06:40 -0700 Subject: [PATCH 09/19] Update ChangeLog --- ChangeLog.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5d5ba96eb7..6308a50021 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -11,11 +11,12 @@ Release notes: Please be aware of this when upgrading your stack installation. * On many Un*x systems, stack can now be installed with a simple one-liner: `wget -qO- https://get.haskellstack.org/ | sh` -* Bindists for Fedora 24 are now available. +* 64-bit GHC bindists have been built for Linux systems with + libtinfo6/libncurses6 (such as Fedora 24 and Arch Linux), and `stack setup` + will detect when to use them. Major changes: -* Use the `store` package for binary serialization of most caches. * Add `stack hoogle` command. [#55](https://github.com/commercialhaskell/stack/issues/55) * Support for absolute file path in `url` field of `setup-info` or `--ghc-bindist` @@ -27,17 +28,21 @@ Behavior changes: * Remove `stack ide start` and `stack ide load-targets` commands. [#2178](https://github.com/commercialhaskell/stack/issues/2178) -* Only require minor version match for Docker stack exe. - This way, we can make patch releases for version bounds and similar - build issues without needing to upload new binaries for Docker. * Support .buildinfo files in `stack ghci`. [#2242](https://github.com/commercialhaskell/stack/pull/2242) * Support -ferror-spans syntax in GHC error messages. * Avoid unpacking ghc to `/tmp` [#996](https://github.com/commercialhaskell/stack/issues/996) +* The Linux `gmp4` GHC bindist is no longer considered a full-fledged GHC + variant and can no longer be specified using the `ghc-variant` option, + and instead is treated more like a slightly different platform. Other enhancements: +* Use the `store` package for binary serialization of most caches. +* Only require minor version match for Docker stack exe. + This way, we can make patch releases for version bounds and similar + build issues without needing to upload new binaries for Docker. * Stack/Nix: Passes the right ghc derivation as an argument to the `shell.nix` when a custom `shell.nix` is used See [#2243](https://github.com/commercialhaskell/stack/issues/2243) @@ -55,7 +60,8 @@ Other enhancements: commands. [#2346](https://github.com/commercialhaskell/stack/pull/2346) * `stack setup` no longer unpacks to the system temp dir on posix systems. [#996](https://github.com/commercialhaskell/stack/issues/996) -* `stack setup` detects libtinfo6 and can downloads alternate GHC bindists +* `stack setup` detects libtinfo6 and ncurses6 and can download alternate GHC + bindists [#257](https://github.com/commercialhaskell/stack/issues/257) [#2302](https://github.com/commercialhaskell/stack/issues/2302). * `stack setup` detects Linux ARMv7 downloads appropriate GHC bindist [#2103](https://github.com/commercialhaskell/stack/issues/2103) From c2e51eb4cfbba43330ca487ce98d84a11ee68cb0 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 15:07:16 -0700 Subject: [PATCH 10/19] Update install docs --- doc/install_and_upgrade.md | 22 +++++++++++++++------- doc/yaml_configuration.md | 2 -- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/install_and_upgrade.md b/doc/install_and_upgrade.md index 11435acde2..0e758cbff7 100644 --- a/doc/install_and_upgrade.md +++ b/doc/install_and_upgrade.md @@ -230,9 +230,11 @@ new releases by some days. - [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_ - [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_ -In order to use `stack setup`, you will need the -[libtinfo](https://aur.archlinux.org/packages/libtinfo/) AUR package installed. -If this package is not installed, Stack will not be able to install GHC. +In order to use `stack setup` with older versions of GHC or on a 32-bit system, +you may need the +[ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/) +AUR package installed. If this package is not installed, Stack may not be able +to install older (< 7.10.3) or 32-bit GHC versions. If you use the [ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell), you @@ -283,11 +285,17 @@ Stack](http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-sta * Ensure you have required system dependencies installed. These include GCC, GNU make, xz, perl, libgmp, libffi, and zlib. We also recommend Git and GPG. To install these using your package manager: * Debian / Ubuntu: `sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg` * Fedora / CentOS: `sudo dnf install perl make automake gcc gmp-devel libffi zlib xz tar git gnupg` (use `yum` instead of `dnf` on CentOS and Fedora <= 21) + * Fedora 24: In order to use `stack setup` on a 32-bit system, you may + need to run `sudo dnf install ncurses-compat-libs`. If this package is + not installed, Stack may not be able to install 32-bit GHC versions. + Also `sudo dnf install ncurses-compat-libs` if you nee * Arch Linux: `sudo pacman -S make gcc ncurses git gnupg xz zlib gmp libffi zlib` - * In order to use `stack setup`, you will need the - [libtinfo](https://aur.archlinux.org/packages/libtinfo/) AUR package - installed. If this package is not installed, Stack will not be able to - install GHC. + + * In order to use `stack setup` with older versions of GHC or on a + 32-bit system, you may need the + [ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/) + AUR package installed. If this package is not installed, Stack may not + be able to install older (< 7.10.3) or 32-bit GHC versions. * Gentoo users, make sure to have the `ncurses` package with `USE=tinfo` (without it, stack will not be able to install GHC). * Now you can run `stack` from the terminal. diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index ad18401f09..99163dcc47 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -429,8 +429,6 @@ rebuild-ghc-options: true Specify a variant binary distribution of GHC to use. Known values: * `standard`: This is the default, uses the standard GHC binary distribution -* `gmp4`: Use the "centos6" GHC bindist, for Linux systems with libgmp4 (aka - `libgmp.so.3`), such as CentOS 6. This variant will be used automatically on such systems; you should not need to specify it in the configuration * `integersimple`: Use a GHC bindist that uses [integer-simple instead of GMP](https://ghc.haskell.org/trac/ghc/wiki/ReplacingGMPNotes) * any other value: Use a custom GHC bindist. You should specify From 42eaa9fa5aa533d933a2b4126b1cdbe938175381 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 15:08:31 -0700 Subject: [PATCH 11/19] get-stack.sh: update dependencies info --- etc/scripts/get-stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/scripts/get-stack.sh b/etc/scripts/get-stack.sh index f8a2ba5734..8ccc1737a1 100755 --- a/etc/scripts/get-stack.sh +++ b/etc/scripts/get-stack.sh @@ -340,7 +340,7 @@ do_sloppy_install() { info "Since this installer doesn't support your Linux distribution," info "there is no guarantee that 'stack' will work at all! You may" info "need to manually install some system info dependencies for GHC:" - info " gcc, make, libffi, zlib, libgmp5, and libtinfo5" + info " gcc, make, libffi, zlib, libgmp and libtinfo" info "Please see http://docs.haskellstack.org/en/stable/install_and_upgrade/" info "Pull requests to add support for this distro would be welcome!" info "" From 596d1f27290b56d843ac5fe3845b098cce2b4b37 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 15:31:13 -0700 Subject: [PATCH 12/19] release: build static 64-bit binary on alpine --- etc/scripts/linux-armv7-release.sh | 2 +- etc/scripts/osx-release.sh | 2 +- etc/scripts/release.hs | 29 +++++++++++++++-------- etc/scripts/vagrant-releases.sh | 11 +++++---- etc/scripts/windows-releases.bat | 4 ++-- etc/scripts/with-vagrant.sh | 4 ++-- etc/vagrant/alpine-3.4-x86_64/Vagrantfile | 17 +++++++++++++ 7 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 etc/vagrant/alpine-3.4-x86_64/Vagrantfile diff --git a/etc/scripts/linux-armv7-release.sh b/etc/scripts/linux-armv7-release.sh index fc9cc32161..356d4384e4 100755 --- a/etc/scripts/linux-armv7-release.sh +++ b/etc/scripts/linux-armv7-release.sh @@ -2,4 +2,4 @@ #TODO: move this logic into release.hs. set -xe (cd etc/scripts && stack --install-ghc build) -$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks --upload-label="Linux ARMv7" release +$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks release diff --git a/etc/scripts/osx-release.sh b/etc/scripts/osx-release.sh index e01e921621..344288e631 100755 --- a/etc/scripts/osx-release.sh +++ b/etc/scripts/osx-release.sh @@ -4,4 +4,4 @@ set -xe RELEASE_SCRIPT=.local/bin/stack-release-script rm -f "$RELEASE_SCRIPT" (cd etc/scripts && stack --install-ghc build) -$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks --arch=x86_64 --upload-label="Mac OS X 64-bit" release +$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks --arch=x86_64 release diff --git a/etc/scripts/release.hs b/etc/scripts/release.hs index 967c79e95f..c04d3b70e2 100644 --- a/etc/scripts/release.hs +++ b/etc/scripts/release.hs @@ -103,9 +103,11 @@ options = "Label to give the uploaded release asset" , Option "" [noTestHaddocksOptName] (NoArg $ Right $ \g -> g{gTestHaddocks = False}) "Disable testing building haddocks." + , Option "" [staticOptName] (NoArg $ Right $ \g -> g{gBuildArgs = gBuildArgs g ++ ["--split-objs", "--ghc-options=-optc-Os -optl-static -fPIC"]}) + "Build a static binary." , Option "" [buildArgsOptName] (ReqArg - (\v -> Right $ \g -> g{gBuildArgs = words v}) + (\v -> Right $ \g -> g{gBuildArgs = gBuildArgs g ++ words v}) "\"ARG1 ARG2 ...\"") "Additional arguments to pass to 'stack build'." ] @@ -153,15 +155,16 @@ rules global@Global{..} args = do when (not gAllowDirty && not (null (trim dirty))) $ error ("Working tree is dirty. Use --" ++ allowDirtyOptName ++ " option to continue anyway.") withTempDir $ \tmpDir -> do - let cmd0 = cmd (releaseBinDir binaryName stackExeFileName) + let cmd0 c = cmd (releaseBinDir binaryName stackExeFileName) (stackArgs global) - gBuildArgs ["--local-bin-path=" ++ tmpDir] - () <- cmd0 $ concat $ concat - [["install --pedantic --no-haddock-deps"], [" --haddock" | gTestHaddocks]] - () <- cmd0 "install --resolver=lts-6.0 cabal-install" - let cmd' = cmd (AddPath [tmpDir] []) stackProgName (stackArgs global) gBuildArgs - () <- cmd' "test --pedantic --flag stack:integration-tests" + c + gBuildArgs + () <- cmd0 "install" $ concat $ concat + [["--pedantic --no-haddock-deps"], [" --haddock" | gTestHaddocks]] + () <- cmd0 "install" "--resolver=lts-6.0 cabal-install" + let cmd' c = cmd (AddPath [tmpDir] []) stackProgName (stackArgs global) c gBuildArgs + () <- cmd' "test" "--pedantic --flag stack:integration-tests" return () copyFileChanged (releaseBinDir binaryName stackExeFileName) out @@ -230,9 +233,10 @@ rules global@Global{..} args = do actionOnException (cmd stackProgName (stackArgs global) - gBuildArgs ["--local-bin-path=" ++ takeDirectory out] - "install --pedantic") + "install" + gBuildArgs + "--pedantic") (removeFile out) debDistroRules ubuntuDistro ubuntuVersions @@ -593,9 +597,14 @@ uploadLabelOptName = "upload-label" noTestHaddocksOptName :: String noTestHaddocksOptName = "no-test-haddocks" +-- | @--build-args@ command-line option name. buildArgsOptName :: String buildArgsOptName = "build-args" +-- | @--static@ command-line option name. +staticOptName :: String +staticOptName = "static" + -- | Arguments to pass to all 'stack' invocations. stackArgs :: Global -> [String] stackArgs Global{..} = ["--install-ghc", "--arch=" ++ display gArch] diff --git a/etc/scripts/vagrant-releases.sh b/etc/scripts/vagrant-releases.sh index 9c449a75e6..366c4748f0 100755 --- a/etc/scripts/vagrant-releases.sh +++ b/etc/scripts/vagrant-releases.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -xe -"$(dirname "$0")/with-vagrant.sh" debian-7-amd64 "--upload-label='Linux 64-bit, standard' $* release" -"$(dirname "$0")/with-vagrant.sh" debian-7-i386 "--upload-label='Linux 32-bit, standard' $* release" -"$(dirname "$0")/with-vagrant.sh" centos-6-x86_64 "--binary-variant=gmp4 --upload-label='Linux 64-bit, libgmp4 for CentOS 6.x' $* release" -"$(dirname "$0")/with-vagrant.sh" centos-6-i386 "--binary-variant=gmp4 --upload-label='Linux 32-bit, libgmp4 for CentOS 6.x' $* release" -"$(dirname "$0")/with-vagrant.sh" freebsd-10.3-amd64 "--upload-label='FreeBSD 64-bit' $* release" "export LANG=en_US.UTF-8;" +"$(dirname "$0")/with-vagrant.sh" alpine-3.4-x86_64 "--binary-variant=static --static $* release" +"$(dirname "$0")/with-vagrant.sh" debian-7-amd64 "$* release" +"$(dirname "$0")/with-vagrant.sh" debian-7-i386 "$* release" +"$(dirname "$0")/with-vagrant.sh" centos-6-x86_64 "--binary-variant=gmp4 $* release" +"$(dirname "$0")/with-vagrant.sh" centos-6-i386 "--binary-variant=gmp4 $* release" +"$(dirname "$0")/with-vagrant.sh" freebsd-10.3-amd64 "$* release" "export LANG=en_US.UTF-8;" diff --git a/etc/scripts/windows-releases.bat b/etc/scripts/windows-releases.bat index 8ace5a07a3..9d9d6629d2 100644 --- a/etc/scripts/windows-releases.bat +++ b/etc/scripts/windows-releases.bat @@ -10,7 +10,7 @@ cd etc\scripts stack --install-ghc install if errorlevel 1 exit /b cd ..\.. -%RELEASE_SCRIPT% --no-test-haddocks --arch=i386 --upload-label="Windows 32-bit" %1 %2 %3 %4 %5 %6 %7 %8 %9 release +%RELEASE_SCRIPT% --no-test-haddocks --arch=i386 %1 %2 %3 %4 %5 %6 %7 %8 %9 release if errorlevel 1 exit /b -%RELEASE_SCRIPT% --no-test-haddocks --arch=x86_64 --upload-label="Windows 64-bit" %1 %2 %3 %4 %5 %6 %7 %8 %9 release +%RELEASE_SCRIPT% --no-test-haddocks --arch=x86_64 %1 %2 %3 %4 %5 %6 %7 %8 %9 release if errorlevel 1 exit /b diff --git a/etc/scripts/with-vagrant.sh b/etc/scripts/with-vagrant.sh index c5d70af7fd..a8cc060d33 100755 --- a/etc/scripts/with-vagrant.sh +++ b/etc/scripts/with-vagrant.sh @@ -13,5 +13,5 @@ vagrant up vagrant provision vagrant rsync -vagrant ssh -c "$3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/dist/gpg-secret-key.asc; cd /vagrant && (cd etc/scripts && stack --install-ghc build) && \$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks $2" -vagrant halt +vagrant ssh -c "set -xe; $3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/dist/gpg-secret-key.asc; cd /vagrant; (cd etc/scripts; stack --install-ghc build); \$(cd etc/scripts; stack exec which stack-release-script) --no-test-haddocks $2" +vagrant halt || vagrant halt -f diff --git a/etc/vagrant/alpine-3.4-x86_64/Vagrantfile b/etc/vagrant/alpine-3.4-x86_64/Vagrantfile new file mode 100644 index 0000000000..08f15b014c --- /dev/null +++ b/etc/vagrant/alpine-3.4-x86_64/Vagrantfile @@ -0,0 +1,17 @@ +Vagrant.configure(2) do |config| + config.vm.box = "maier/alpine-3.4-x86_64" + #@@@ also make other vagrantfiles ignore .#*#, copy symlinks, set rsync__rsync_path + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z", "--copy-links"], rsync__rsync_path: "/usr/bin/rsync", rsync__chown: false + config.vm.provider "virtualbox" do |vb| + vb.memory = "3072" + end + config.ssh.forward_agent = true + config.vm.provision "shell", inline: <<-SHELL + echo "https://s3-us-west-2.amazonaws.com/alpine-ghc/7.10" |sudo tee -a /etc/apk/repositories + sudo curl -o /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub + sudo apk update + sudo apk add alpine-sdk linux-headers musl-dev gmp-dev zlib-dev ghc git rsync gnupg + sudo cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o.orig + sudo cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginS.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o + sudo curl -Lo /usr/local/bin/stack https://download.fpcomplete.com/temp/manny/stack-alpine-static +end From 003e7f6f56b560ca1b8c78b1a73255dbc57d9991 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 16:12:55 -0700 Subject: [PATCH 13/19] Update ChangeLog --- ChangeLog.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 6308a50021..f3697aa4a5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -139,6 +139,8 @@ Bug fixes: Scripts can now automatically open in the repl by using `exec ghci` instead of `runghc` in the shebang command. [#2510](https://github.com/commercialhaskell/stack/issues/2510) +* Now consider a package to be dirty when an extra-source-file is changed. + See [#2040](https://github.com/commercialhaskell/stack/issues/2040) ## 1.1.2 @@ -209,9 +211,6 @@ Bug fixes: checked for dirtiness. See [#1982](https://github.com/commercialhaskell/stack/issues/1982) * Signing: always use `--with-fingerprints` - [#2110](https://github.com/commercialhaskell/stack/issues/2110). -* Now consider a package to be dirty when an extra-source-file is changed. - See [#2040](https://github.com/commercialhaskell/stack/issues/2040). ## 1.1.0 From 2bed3de52fd175316e6d9bb329241b4605dbd659 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 16:13:04 -0700 Subject: [PATCH 14/19] Update ISSUE_TEMPLATE.md --- ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 3c801f7794..5f4de53da3 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -5,7 +5,7 @@ This way your question will be more easily discoverable by other people with the If you're reporting a bug please follow the steps below: -Make sure that you are using the latest release (currently stack-1.1.2). +Make sure that you are using the latest release (currently stack-1.2.0). See the [upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade) to upgrade. Please use the following schema for your bug report: From 533b697b4e3f26eb519f34535609bfc66883470c Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Tue, 30 Aug 2016 18:58:19 -0700 Subject: [PATCH 15/19] release: updates --- etc/scripts/with-vagrant.sh | 5 ++--- etc/vagrant/alpine-3.4-x86_64/Vagrantfile | 16 +++++++++------- etc/vagrant/centos-6-i386/Vagrantfile | 2 +- etc/vagrant/centos-6-x86_64/Vagrantfile | 2 +- etc/vagrant/centos-7-x86_64/Vagrantfile | 2 +- etc/vagrant/debian-7-amd64/Vagrantfile | 2 +- etc/vagrant/debian-7-i386/Vagrantfile | 2 +- etc/vagrant/fedora-24-x86_64/Vagrantfile | 2 +- etc/vagrant/freebsd-10.3-amd64/Vagrantfile | 2 +- etc/vagrant/openbsd-5.9-amd64/Vagrantfile | 2 +- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/etc/scripts/with-vagrant.sh b/etc/scripts/with-vagrant.sh index a8cc060d33..d3b42a53b8 100755 --- a/etc/scripts/with-vagrant.sh +++ b/etc/scripts/with-vagrant.sh @@ -3,8 +3,7 @@ set -xe cd "$(dirname "$0")/../.." #TODO: set up gpg-agent forwarding for package signing (see http://superuser.com/questions/161973/how-can-i-forward-a-gpg-key-via-ssh-agent). -mkdir -p dist -gpg --export-secret-keys --armor dev@fpcomplete.com >dist/gpg-secret-key.asc +gpg --export-secret-keys --armor dev@fpcomplete.com >gpg-secret-key.asc~ cd "etc/vagrant/$1" # Double 'vagrant up' is a workaround for FreeBSD @@ -13,5 +12,5 @@ vagrant up vagrant provision vagrant rsync -vagrant ssh -c "set -xe; $3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/dist/gpg-secret-key.asc; cd /vagrant; (cd etc/scripts; stack --install-ghc build); \$(cd etc/scripts; stack exec which stack-release-script) --no-test-haddocks $2" +vagrant ssh -c "set -xe; $3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/gpg-secret-key.asc~; cd /vagrant; for x in CONTRIBUTING ChangeLog; do rm -f doc/\$x.md; ln -s ../\$x.md doc/\$x.md; done; (cd etc/scripts; stack --install-ghc build); \$(cd etc/scripts; stack exec which stack-release-script) --no-test-haddocks $2" vagrant halt || vagrant halt -f diff --git a/etc/vagrant/alpine-3.4-x86_64/Vagrantfile b/etc/vagrant/alpine-3.4-x86_64/Vagrantfile index 08f15b014c..7f9c8d1cec 100644 --- a/etc/vagrant/alpine-3.4-x86_64/Vagrantfile +++ b/etc/vagrant/alpine-3.4-x86_64/Vagrantfile @@ -1,6 +1,5 @@ Vagrant.configure(2) do |config| config.vm.box = "maier/alpine-3.4-x86_64" - #@@@ also make other vagrantfiles ignore .#*#, copy symlinks, set rsync__rsync_path config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z", "--copy-links"], rsync__rsync_path: "/usr/bin/rsync", rsync__chown: false config.vm.provider "virtualbox" do |vb| vb.memory = "3072" @@ -8,10 +7,13 @@ Vagrant.configure(2) do |config| config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL echo "https://s3-us-west-2.amazonaws.com/alpine-ghc/7.10" |sudo tee -a /etc/apk/repositories - sudo curl -o /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub - sudo apk update - sudo apk add alpine-sdk linux-headers musl-dev gmp-dev zlib-dev ghc git rsync gnupg - sudo cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o.orig - sudo cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginS.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o - sudo curl -Lo /usr/local/bin/stack https://download.fpcomplete.com/temp/manny/stack-alpine-static + curl -o /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%40gmail.com-55881c97.rsa.pub + apk -q update + apk add alpine-sdk linux-headers musl-dev gmp-dev zlib-dev ghc git rsync gnupg + cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o.orig + cp /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginS.o /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/crtbeginT.o + curl -sSLo /usr/local/bin/stack https://download.fpcomplete.com/temp/manny/stack-alpine-static + chmod a+x /usr/local/bin/stack + chown vagrant:vagrant /vagrant + SHELL end diff --git a/etc/vagrant/centos-6-i386/Vagrantfile b/etc/vagrant/centos-6-i386/Vagrantfile index 912e8894e6..346ba24a6b 100644 --- a/etc/vagrant/centos-6-i386/Vagrantfile +++ b/etc/vagrant/centos-6-i386/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/centos-6-x86_64/Vagrantfile b/etc/vagrant/centos-6-x86_64/Vagrantfile index 2812f16ba2..bcf04e4001 100644 --- a/etc/vagrant/centos-6-x86_64/Vagrantfile +++ b/etc/vagrant/centos-6-x86_64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/centos-7-x86_64/Vagrantfile b/etc/vagrant/centos-7-x86_64/Vagrantfile index 43724f5b36..99c1ee9d51 100644 --- a/etc/vagrant/centos-7-x86_64/Vagrantfile +++ b/etc/vagrant/centos-7-x86_64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-7.0-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/debian-7-amd64/Vagrantfile b/etc/vagrant/debian-7-amd64/Vagrantfile index 2251bead38..e91e501444 100644 --- a/etc/vagrant/debian-7-amd64/Vagrantfile +++ b/etc/vagrant/debian-7-amd64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/debian-7-i386/Vagrantfile b/etc/vagrant/debian-7-i386/Vagrantfile index de6efef84a..f2c5e379b0 100644 --- a/etc/vagrant/debian-7-i386/Vagrantfile +++ b/etc/vagrant/debian-7-i386/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/, ".#*#""], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/fedora-24-x86_64/Vagrantfile b/etc/vagrant/fedora-24-x86_64/Vagrantfile index a6f5dcaf69..0080189100 100644 --- a/etc/vagrant/fedora-24-x86_64/Vagrantfile +++ b/etc/vagrant/fedora-24-x86_64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "fedora/24-cloud-base" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "3072" end diff --git a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile index bfdd3a7c3d..6f04df0f26 100644 --- a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile +++ b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "freebsd/FreeBSD-10.3-RELEASE" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end diff --git a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile index 225a077269..9b1a6868b4 100644 --- a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile +++ b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure(2) do |config| config.vm.box = "kaorimatz/openbsd-5.9-amd64" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end From 2d82558ed6ebeb2088c2618675d9d506ca5eef7f Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Wed, 31 Aug 2016 04:47:41 -0700 Subject: [PATCH 16/19] release: Vagrantfile fixs --- etc/scripts/with-vagrant.sh | 2 +- etc/vagrant/centos-7-x86_64/Vagrantfile | 1 + etc/vagrant/debian-7-amd64/Vagrantfile | 3 ++- etc/vagrant/debian-7-i386/Vagrantfile | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/scripts/with-vagrant.sh b/etc/scripts/with-vagrant.sh index d3b42a53b8..a4c2743d9c 100755 --- a/etc/scripts/with-vagrant.sh +++ b/etc/scripts/with-vagrant.sh @@ -12,5 +12,5 @@ vagrant up vagrant provision vagrant rsync -vagrant ssh -c "set -xe; $3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/gpg-secret-key.asc~; cd /vagrant; for x in CONTRIBUTING ChangeLog; do rm -f doc/\$x.md; ln -s ../\$x.md doc/\$x.md; done; (cd etc/scripts; stack --install-ghc build); \$(cd etc/scripts; stack exec which stack-release-script) --no-test-haddocks $2" +vagrant ssh -c "set -xe; $3 export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/gpg-secret-key.asc~ || true; cd /vagrant; for x in CONTRIBUTING ChangeLog; do rm -f doc/\$x.md; ln -s ../\$x.md doc/\$x.md; done; (cd etc/scripts; stack --install-ghc build); \$(cd etc/scripts; stack exec which stack-release-script) --no-test-haddocks $2" vagrant halt || vagrant halt -f diff --git a/etc/vagrant/centos-7-x86_64/Vagrantfile b/etc/vagrant/centos-7-x86_64/Vagrantfile index 99c1ee9d51..54f7e6cea9 100644 --- a/etc/vagrant/centos-7-x86_64/Vagrantfile +++ b/etc/vagrant/centos-7-x86_64/Vagrantfile @@ -20,6 +20,7 @@ Vagrant.configure(2) do |config| yum -y install stack if ! which fpm; then yum -y install ruby-devel + gem install json --version '< 1.8.0' gem install fpm --version '< 1.4.0' fi if ! [[ -d /opt/rpm-s3 ]]; then diff --git a/etc/vagrant/debian-7-amd64/Vagrantfile b/etc/vagrant/debian-7-amd64/Vagrantfile index e91e501444..8c65a24688 100644 --- a/etc/vagrant/debian-7-amd64/Vagrantfile +++ b/etc/vagrant/debian-7-amd64/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-64-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], "_release/"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end @@ -22,6 +22,7 @@ Vagrant.configure(2) do |config| if ! which fpm; then apt-get install -y ruby-dev libffi-dev make build-essential apt-get install -y rubygems || true + gem install json --version '< 1.8.0' gem install fpm --version '< 1.4.0' fi if ! which deb-s3; then diff --git a/etc/vagrant/debian-7-i386/Vagrantfile b/etc/vagrant/debian-7-i386/Vagrantfile index f2c5e379b0..a02b8bb7e2 100644 --- a/etc/vagrant/debian-7-i386/Vagrantfile +++ b/etc/vagrant/debian-7-i386/Vagrantfile @@ -19,6 +19,7 @@ Vagrant.configure(2) do |config| if ! which fpm; then apt-get install -y ruby-dev libffi-dev make build-essential apt-get install -y rubygems || true + gem install json --version '< 1.8.0' gem install fpm --version '< 1.4.0' fi if ! which deb-s3; then From 9a5e2550674fd59fd004bebbb09dd89183eb4919 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Wed, 31 Aug 2016 09:19:11 -0700 Subject: [PATCH 17/19] release: debian-7-i386/Vagrantfile fix --- etc/vagrant/debian-7-i386/Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/vagrant/debian-7-i386/Vagrantfile b/etc/vagrant/debian-7-i386/Vagrantfile index a02b8bb7e2..b7e1091d2d 100644 --- a/etc/vagrant/debian-7-i386/Vagrantfile +++ b/etc/vagrant/debian-7-i386/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/, ".#*#""], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/, ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end From 526fd5439d8c2e56b7cab263080a2ccd99324a99 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Wed, 31 Aug 2016 14:35:39 -0700 Subject: [PATCH 18/19] release: give VMs more memory --- etc/vagrant/centos-6-i386/Vagrantfile | 2 +- etc/vagrant/centos-6-x86_64/Vagrantfile | 2 +- etc/vagrant/centos-7-x86_64/Vagrantfile | 2 +- etc/vagrant/debian-7-amd64/Vagrantfile | 2 +- etc/vagrant/debian-7-i386/Vagrantfile | 4 ++-- etc/vagrant/freebsd-10.3-amd64/Vagrantfile | 2 +- etc/vagrant/openbsd-5.9-amd64/Vagrantfile | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/etc/vagrant/centos-6-i386/Vagrantfile b/etc/vagrant/centos-6-i386/Vagrantfile index 346ba24a6b..b84b699d34 100644 --- a/etc/vagrant/centos-6-i386/Vagrantfile +++ b/etc/vagrant/centos-6-i386/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-32-nocm" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL diff --git a/etc/vagrant/centos-6-x86_64/Vagrantfile b/etc/vagrant/centos-6-x86_64/Vagrantfile index bcf04e4001..55dc55dd82 100644 --- a/etc/vagrant/centos-6-x86_64/Vagrantfile +++ b/etc/vagrant/centos-6-x86_64/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-6.6-64-nocm" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL diff --git a/etc/vagrant/centos-7-x86_64/Vagrantfile b/etc/vagrant/centos-7-x86_64/Vagrantfile index 54f7e6cea9..efabb9e9de 100644 --- a/etc/vagrant/centos-7-x86_64/Vagrantfile +++ b/etc/vagrant/centos-7-x86_64/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/centos-7.0-64-nocm" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL diff --git a/etc/vagrant/debian-7-amd64/Vagrantfile b/etc/vagrant/debian-7-amd64/Vagrantfile index 8c65a24688..92a3bc5fd0 100644 --- a/etc/vagrant/debian-7-amd64/Vagrantfile +++ b/etc/vagrant/debian-7-amd64/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-64-nocm" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL diff --git a/etc/vagrant/debian-7-i386/Vagrantfile b/etc/vagrant/debian-7-i386/Vagrantfile index b7e1091d2d..fcf9ae2443 100644 --- a/etc/vagrant/debian-7-i386/Vagrantfile +++ b/etc/vagrant/debian-7-i386/Vagrantfile @@ -2,9 +2,9 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "puppetlabs/debian-7.8-32-nocm" - config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/, ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] + config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.vm.provision "shell", inline: <<-SHELL diff --git a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile index 6f04df0f26..0d131ede65 100644 --- a/etc/vagrant/freebsd-10.3-amd64/Vagrantfile +++ b/etc/vagrant/freebsd-10.3-amd64/Vagrantfile @@ -2,7 +2,7 @@ Vagrant.configure(2) do |config| config.vm.box = "freebsd/FreeBSD-10.3-RELEASE" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.ssh.shell = "/bin/sh" diff --git a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile index 9b1a6868b4..090eafd728 100644 --- a/etc/vagrant/openbsd-5.9-amd64/Vagrantfile +++ b/etc/vagrant/openbsd-5.9-amd64/Vagrantfile @@ -2,7 +2,7 @@ Vagrant.configure(2) do |config| config.vm.box = "kaorimatz/openbsd-5.9-amd64" config.vm.synced_folder "../../..", "/vagrant", type: "rsync", rsync__verbose: true, rsync__exclude: [".stack-work/", "_release/", ".cabal-sandbox/", "cabal.sandbox.config", "dist/", ".#*#"], rsync__args: ["--verbose", "--archive", "--delete", "-z"] config.vm.provider "virtualbox" do |vb| - vb.memory = "2048" + vb.memory = "3072" end config.ssh.forward_agent = true config.ssh.shell = "/bin/sh" From a2c4141bbd0a4d6bd1c40b74ac444305d127c400 Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Thu, 8 Sep 2016 13:58:09 -0700 Subject: [PATCH 19/19] stack.cabal: hpack >= 0.14.0 && < 0.16 --- stack.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack.cabal b/stack.cabal index 724b673014..7bd4007b88 100644 --- a/stack.cabal +++ b/stack.cabal @@ -238,7 +238,7 @@ library , hastache , project-template >= 0.2 , zip-archive < 0.4 - , hpack >= 0.14.0 && < 0.15 + , hpack >= 0.14.0 && < 0.16 , store , annotated-wl-pprint if os(windows) @@ -264,7 +264,7 @@ executable stack , either , filelock >= 0.1.0.1 , filepath >= 1.3.0.2 - , hpack + , hpack >= 0.14.0 && < 0.16 , http-client -- https://github.com/basvandijk/lifted-base/issues/31 , lifted-base < 0.2.3.7 || > 0.2.3.7