Skip to content

Commit

Permalink
release: support official FreeBSD bindist (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed May 20, 2016
1 parent cebe10e commit cb6da86
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 8 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 1.1.2

Release notes:

* Official FreeBSD binaries are
[now available](http://docs.haskellstack.org/en/stable/install_and_upgrade/#freebsd)
[#1253](https://github.com/commercialhaskell/stack/issues/1253).

Major changes:

* Extensible custom snapshots implemented. These allow you to define snapshots
Expand Down
8 changes: 2 additions & 6 deletions doc/MAINTAINER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Maintainer guide

## Next release:

* Integrate FreeBSD binaries and packages
[#1253](https://github.com/commercialhaskell/stack/issues/1253#issuecomment-185993240)

## Pre-release steps

* Ensure `release` and `stable` branches merged to `master`
Expand Down Expand Up @@ -43,11 +38,12 @@
* Look for any links to "latest" documentation, replace with version tag
* Ensure all documentation pages listed in `mkdocs.yaml`
* Check that any new Linux distribution versions added to
`etc/scripts/release.hs` and `etc/scripts/vagrant-releases.sh`.
`etc/scripts/release.hs` and `etc/scripts/vagrant-releases.sh`
* [Ubuntu](https://wiki.ubuntu.com/Releases)
* [Debian](https://www.debian.org/releases/) (keep at least latest two)
* [CentOS](https://wiki.centos.org/Download)
* [Fedora](https://fedoraproject.org/wiki/Releases)
* Check for new FreeBSD release
* Check that no new entries need to be added to
[releases.yaml](https://github.com/fpco/stackage-content/blob/master/stack/releases.yaml),
[install_and_upgrade.md](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md),
Expand Down
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Downloads are available by operating system:
* [Arch Linux](install_and_upgrade.md#arch-linux)
* [NixOS](install_and_upgrade.md#nixos)
* [Linux (general)](install_and_upgrade.md#linux)
* [FreeBSD (unofficial)](install_and_upgrade.md#freebsd)
* [FreeBSD](install_and_upgrade.md#freebsd)

[Upgrade instructions](install_and_upgrade.md#upgrade)

Expand Down
14 changes: 14 additions & 0 deletions doc/install_and_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,20 @@ For Gentoo users, make sure to have the `ncurses` package with `USE=tinfo` (with

## FreeBSD

(only 64-bit currently available, tested on FreeBSD 10.3-RELEASE)

* Install required dependencies:

pkg install devel/gmake perl5 lang/gcc misc/compat8x misc/compat9x converters/libiconv ca_root_nss

* Download the latest release:

* [FreeBSD 64-bit](https://www.stackage.org/stack/freebsd-x86_64)

* Extract the archive and place `stack` somewhere on your `$PATH` (see [Path section below](#path))

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

An unofficial package repository for FreeBSD 10 (amd64 only) and install
instructions are available at [http://stack-pkg.applicative.tech](http://stack-pkg.applicative.tech/). The
repository is not official and as such might lag behind new releases. See [issue #1253](https://github.com/commercialhaskell/stack/issues/1253)
Expand Down
1 change: 1 addition & 0 deletions etc/scripts/vagrant-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ set -xe
"$(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;"
6 changes: 5 additions & 1 deletion etc/scripts/with-vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ set -xe
#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).
gpg --export-secret-keys --armor [email protected] >.stack-work/gpg-secret-key.asc
cd "etc/vagrant/$1"

# Double 'vagrant up' is a workaround for FreeBSD
vagrant up || true
vagrant up

vagrant provision
vagrant rsync
vagrant ssh -c "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/.stack-work/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 "$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/.stack-work/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
20 changes: 20 additions & 0 deletions etc/vagrant/freebsd-10.3-amd64/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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.provider "virtualbox" do |vb|
vb.memory = "2048"
end
config.ssh.forward_agent = true
config.ssh.shell = "/bin/sh"
config.vm.provision "shell", inline: <<-SHELL
set -xe
if ! which stack; then
mkdir -p /usr/local/etc/pkg/repos
cd /usr/local/etc/pkg/repos
fetch --no-verify-peer --no-verify-hostname https://stack-pkg.applicative.tech/stack-pkg-applicative-tech.conf
fetch --no-verify-peer --no-verify-hostname https://stack-pkg.applicative.tech/stack-pkg-applicative-tech.pub
pkg update
fi
pkg install -y stack ca_root_nss gmake awscli git gnupg
SHELL
end

0 comments on commit cb6da86

Please sign in to comment.