wiki:MakingReleases

Making Releases

Branching the tree

Make a ghc-x.y branch of all of the repos (including those with a 'dph' tag). In the ghc branch, change sync-all so that it doesn't get the dph repos by default, and change validate so that it doesn't require them to be present.

For repos with an upstream maintainer, ask upstream what commit we should be using in the branch.

Update http://ghc.haskell.org/trac/ghc/wiki/Repositories#Branches

Make release notes

In docs/users_guide, add a $VERSION-notes.xml file and write the release notes.

Add a corresponding relnotes$PATCH_LEVEL entity to ug-ent.xml.in, and use the entity at the end of the chapter in intro.xml.

Updating the tree

Update the ANNOUNCE file in the root of the tree.

In the AC_INIT line of configure.ac, set the version number. A few lines below, set RELEASE=YES.

Making the source tarball

The source tarball includes some generated files, such as Parser.hs (generated from Parser.y.pp). We therefore need to do a build before generating the source tarball.

First check out the branch, and ensure that the version number and RELEASE near the top of configure.ac are correct. Then:

$ perl boot
$ ./configure
$ make
$ make sdist

It is advisable to use a machine with as recent an autoreconf as possible; in particular, 2.61 is known to make a configure script that doesn't work on Windows.

You should now have source tarballs sdistprep/ghc-<VERSION>-src.tar.bz2 and sdistprep/ghc-<VERSION>-testsuite.tar.bz2.

Making the binary builds

Untar the src tarball. Then:

$ cat > mk/build.mk <<EOF
V=1
HADDOCK_DOCS=YES
LATEX_DOCS=YES
HSCOLOUR_SRCS=YES
BUILD_DOCBOOK_HTML=YES
BUILD_DOCBOOK_PDF=YES
BUILD_DOCBOOK_PS=YES
BeConservative=YES
EOF

(Note that BeConservative is only relevant on Linux, as it controls usage of clock_gettime in the RTS.)

Then:

$ ./configure      2>&1 | tee ../conf.log
$ make             2>&1 | tee ../make.log
$ make binary-dist 2>&1 | tee ../bd.log

Nightly builders will automatically produce release builds on FreeBSD, putting the results here.

Sanity checking the binary builds

The compare tool compares the tarballs of different releases, and warns about possible problems:

$ cd <</path/to/ghc/tree>>/distrib/compare
$ make
$ <</path/to/ghc/tree>>/distrib/compare/compare <<previous_release_files>> <<this_release_files>>

Check that the build can build the release

Install the release, set your $PATH, then just untar and:

$ ./configure
$ make

Create and upload the library documentation

haskell.org$ mkdir /srv/web/haskell.org/ghc/docs/<<VERSION>>
$ <</path/to/ghc/tree>>/distrib/mkDocs/mkDocs ghc-*-x86_64-unknown-linux.tar.bz2 ghc-*-i386-unknown-mingw32.tar.bz2
$ cd docs
$ scp * haskell.org:/srv/web/haskell.org/ghc/docs/<<VERSION>>
haskell.org$ cd /srv/web/haskell.org/ghc/docs/<<VERSION>>
haskell.org$ mkdir html
haskell.org$ cd html
haskell.org$ mv ../index.html .
haskell.org$ for i in ../*.tar.bz2; do tar -jxf $i; done

Sanity check http://www.haskell.org/ghc/docs/<<VERSION>>/. In particular, check that the libraries docs include both Win32 and unix.

Prepare the webpage

In the http://www.haskell.org/ghc darcs repository, create a download_ghc_<<MANGLED_VERSION>>.shtml page based on the previous one.

Sanity check http://www.haskell.org/ghc/download_ghc_<<MANGLED_VERSION>>. In particular, check that the release notes and documentation links work.

Upload the binaries

scp -r 7.6.2 haskell.org:/srv/web/haskell.org/ghc/dist/

Sanity check that the download links work.

Announcing

Add the release to "Versions" in the trac admin section, and make it the default version.

Update "Current Stable Release" in download.shtml, and move the previous release down to "Older Releases".

Update "Latest News" in index.shtml.

haskell.org$ ~/mk-latest-links
haskell.org$ ~/mk-latest-links | sh

Mail ANNOUNCE to glasgow-haskell-users@haskell.org, haskell@haskell.org, subject ANNOUNCE: GHC version <<VERSION>>.

For an RC, a smaller message is sent to just glasgow-haskell-users@haskell.org, e.g.:

Subject: ANNOUNCE: GHC x.y.z Release Candidate 1

We are pleased to announce the first release candidate for GHC x.y.z:

    http://www.haskell.org/ghc/dist/x.y.z-rc1/

This includes the source tarball and bindists for Windows, Linux, OS X and FreeBSD, on x86 and x86_64.

We plan to make the x.y.z release <sometime>.

Please test as much as possible; bugs are much cheaper if we find them
before the release!

Tagging repositories

./sync-all tag ghc-7.6.2-release

Also git tag <<LIBRARY>>-<<VERSION>>-release libraries that we maintain (other than ghc-prim).

Set RELEASE back to NO and commit.

./sync-all push --tags

Uploading libraries

If any library that we maintain (other than bin-package-db, ghc-prim, integer-gmp and integer-simple which don't get uploaded) has been changed, then the new version should be uploaded to hackage.

For example, for base, in a built tree:

make sdist_base
cabal upload libraries/base/dist-install/*.tar.gz
Last modified 8 weeks ago Last modified on Feb 26, 2014 6:26:43 PM