Skip to content

Commit c045a4b

Browse files
committed
Merge branch 'stable'
2 parents adf1703 + d108dcd commit c045a4b

8 files changed

Lines changed: 44 additions & 13 deletions

File tree

doc/GUIDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,9 @@ matrix:
19111911
- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
19121912
compiler: ": #GHC 7.10.3"
19131913
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
1914+
- env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
1915+
compiler: ": #GHC 8.0.1"
1916+
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
19141917
19151918
# Build with the newest GHC and cabal-install. This is an accepted failure,
19161919
# see below.

doc/install_and_upgrade.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ problems, see the linked FAQ entries:
181181

182182
1. Add the appropriate source repository:
183183

184+
* Fedora 24 (x86_64)
185+
186+
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/fedora/24/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
187+
184188
* Fedora 23 (x86_64)
185189

186190
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/fedora/23/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
@@ -219,14 +223,14 @@ releases by ten days or more.
219223

220224
## Arch Linux
221225

222-
*Note:* `stack` package in the [community] repository isn't managed by the
226+
*Note:* `stack` package in the [community] repository isn't managed by the
223227
Stack release team. Depending on the maintainer's availability, it can lag
224228
new releases by some days.
225229

226230
- [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_
227231
- [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_
228232

229-
In order to use `stack setup`, you will need the [ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/) Arch Linux package installed. If this package is not installed, Stack will not be able to install GHC.
233+
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.
230234

231235
If you use the [ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell), you can also get the `haskell-stack-tool` package from there.
232236

@@ -275,6 +279,9 @@ Stack](http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-sta
275279
* 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:
276280
* Debian / Ubuntu: `sudo apt-get install g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg`
277281
* 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)
282+
* Fedora 24: Also `sudo dnf install ncurses-compat-libs`
283+
* Arch Linux: `sudo pacman -S make gcc ncurses git gnupg xz zlib gmp libffi zlib`
284+
* 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.
278285
* Gentoo users, make sure to have the `ncurses` package with `USE=tinfo` (without it, stack will not be able to install GHC).
279286

280287
* Now you can run `stack` from the terminal.

etc/scripts/get-stack.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ do_debian_install() {
201201
do_fedora_install() {
202202
install_dependencies() {
203203
dnf_install_pkgs perl make automake gcc gmp-devel libffi zlib xz tar
204+
if [ "$1" == "24" ] ; then
205+
dnf_install_pkgs ncurses-compat-libs-6.0
206+
fi
204207
}
205208
dnf_install_stack() {
206209
dnf_install_pkgs stack
@@ -212,6 +215,10 @@ do_fedora_install() {
212215
if is_64_bit ; then
213216
check_dl_tools
214217
case "$1" in
218+
"24"*)
219+
dl_to_stdout https://s3.amazonaws.com/download.fpcomplete.com/fedora/24/fpco.repo | sudocmd tee /etc/yum.repos.d/fpco.repo >/dev/null
220+
dnf_install_stack
221+
;;
215222
"23"*)
216223
dl_to_stdout https://s3.amazonaws.com/download.fpcomplete.com/fedora/23/fpco.repo | sudocmd tee /etc/yum.repos.d/fpco.repo >/dev/null
217224
dnf_install_stack
@@ -221,15 +228,15 @@ do_fedora_install() {
221228
dnf_install_stack
222229
;;
223230
*)
224-
install_dependencies
231+
install_dependencies "$1"
225232
info ""
226233
info "No packages available for Fedora $1, using generic bindist..."
227234
info ""
228235
install_64bit_standard_binary
229236
;;
230237
esac
231238
else
232-
install_dependencies
239+
install_dependencies "$1"
233240
info ""
234241
info "No packages available for 32-bit Fedora $1, using generic bindist..."
235242
info ""
@@ -537,7 +544,7 @@ install_64bit_freebsd_binary() {
537544
install_from_bindist "freebsd-x86_64"
538545
}
539546

540-
# Attempt to install packages using whiever of apt-get, dnf, or yum is
547+
# Attempt to install packages using whichever of apt-get, dnf, or yum is
541548
# available.
542549
try_install_pkgs() {
543550
if has_apt_get ; then

etc/scripts/linux-armv7-release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
#TODO: move this logic into release.hs.
3+
set -xe
4+
(cd etc/scripts && stack --install-ghc build)
5+
$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks --upload-label="Linux ARMv7" release

etc/scripts/release.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ rules global@Global{..} args = do
322322
need inputFiles
323323
cmd "fpm -s dir -t rpm"
324324
"-d perl -d make -d automake -d gcc -d gmp-devel -d libffi -d zlib -d xz -d tar"
325+
(concat
326+
[["-d", "ncurses-compat-libs"] | dvDistro == fedoraDistro && dvVersion == "24"])
325327
["-n", stackProgName
326328
,"-C", rpmStagingDir dv
327329
,"-v", rpmPackageVersionStr dv
@@ -439,7 +441,8 @@ rules global@Global{..} args = do
439441
, ("6", "el6") ]
440442
fedoraVersions =
441443
[ ("22", "fc22")
442-
, ("23", "fc23") ]
444+
, ("23", "fc23")
445+
, ("24", "fc24") ]
443446

444447
ubuntuDistro = "ubuntu"
445448
debianDistro = "debian"

src/Stack/Image.hs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ type Assemble e m = (HasConfig e, HasTerminal e, MonadBaseControl IO m, MonadIO
4040
-- directory under '.stack-work'
4141
stageContainerImageArtifacts
4242
:: Build e m
43-
=> Maybe (Path Abs Dir) -> m ()
44-
stageContainerImageArtifacts mProjectRoot = do
43+
=> Maybe (Path Abs Dir) -> [Text] -> m ()
44+
stageContainerImageArtifacts mProjectRoot imageNames = do
4545
config <- asks getConfig
4646
forM_
47-
(zip [0 ..] (imgDockers $ configImage config))
47+
(zip
48+
[0 ..]
49+
(filterImages
50+
(map T.unpack imageNames)
51+
(imgDockers $ configImage config)))
4852
(\(idx,opts) ->
4953
do imageDir <-
5054
imageStagingDir (fromMaybeProjectRoot mProjectRoot) idx
@@ -73,9 +77,11 @@ createContainerImageFromStage mProjectRoot imageNames = do
7377
imageStagingDir (fromMaybeProjectRoot mProjectRoot) idx
7478
createDockerImage opts imageDir
7579
extendDockerImageWithEntrypoint opts imageDir)
80+
81+
filterImages :: [String] -> [ImageDockerOpts] -> [ImageDockerOpts]
82+
filterImages [] = id -- all: no filter
83+
filterImages names = filter (imageNameFound names . imgDockerImageName)
7684
where
77-
filterImages [] = id -- all: no filter
78-
filterImages names = filter (imageNameFound names . imgDockerImageName)
7985
imageNameFound names (Just name) = name `elem` names
8086
imageNameFound _ _ = False
8187

src/main/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ imgDockerCmd (rebuild,images) go@GlobalOpts{..} = do
813813
(const (return ()))
814814
lk
815815
defaultBuildOptsCLI
816-
Image.stageContainerImageArtifacts mProjectRoot)
816+
Image.stageContainerImageArtifacts mProjectRoot images)
817817
(Just $ Image.createContainerImageFromStage mProjectRoot images)
818818

819819
-- | Project initialization

stack.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ test-suite stack-test
290290
, Stack.SolverSpec
291291
ghc-options: -threaded -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates
292292
build-depends: Cabal >= 1.18.1.5 && < 1.25
293-
, QuickCheck
293+
, QuickCheck < 2.10
294294
, attoparsec < 0.14
295295
, base >=4.7 && <5
296296
, conduit

0 commit comments

Comments
 (0)