Because I changed the patch considerably, I'm resending it from scratch.
On Wed, Mar 5, 2014 at 11:10 AM, Klaus Aehlig <[email protected]> wrote: > On Wed, Mar 05, 2014 at 10:35:07AM +0100, Petr Pudlak wrote: > > Since the default GHC6 isn't usable for modern libraries and starting > > from wheezy there is GHC7 anyway, download and install the current > > vanilla version as well as the latest Cabal. > > > > Use the current up-to-date libraries. > > > > Also enhance the check for test-framework so that it works for the > > recent version. > > > > Signed-off-by: Petr Pudlak <[email protected]> > > --- > > configure.ac | 6 ++- > > devel/build_chroot | 128 > +++++++++++++++++++++++++++++++++++------------------ > > 2 files changed, 89 insertions(+), 45 deletions(-) > > > > +function install_ghc { > > + local TDIR=$( mktemp -d ) ; > > + pushd "$TDIR" > > + { > > + wget > http://www.haskell.org/ghc/dist/${GHC_VERSION}/ghc-${GHC_VERSION}-x86_64-unknown-linux.tar.bz2 > > Please explicitly specify the name of the output file (option -O). > Otherwise > a redirect from the said site (remeber, it's unauthenticated) might cause > us > to write files with arbitrary names; alternatively, you could disallow > redirects. > The latter might even be preferrable. > > > + tar xjf ghc-${GHC_VERSION}-x86_64-unknown-linux.tar.bz2 > > Before using a randomly downloaded file, verify its hash against a > known good source! > > (I know, cabal isn't any better, but we shouldn't contribute to the mess.) > > > + cd ghc-${GHC_VERSION} > > + ./configure --prefix=/usr/local > > + make install > > + } > > + popd > > + [ -d "$TDIR" ] && rm -rf "$TDIR" > > +} > > +# export everything so that the function can be called in a sub-shell > > +export GHC_VERSION > > +export -f install_ghc > > + > > +function install_cabal { > > + local TDIR=$( mktemp -d ) > > + pushd "$TDIR" > > + { > > + wget > http://www.haskell.org/cabal/release/cabal-install-${CABAL_INSTALL_VERSION}/cabal-install-${CABAL_INSTALL_VERSION}.tar.gz > > + tar xzf cabal-install-${CABAL_INSTALL_VERSION}.tar.gz > > same here. > > > + pushd cabal-install-${CABAL_INSTALL_VERSION} > > + ./bootstrap.sh --global > > + } > > + popd > > + [ -d "$TDIR" ] && rm -rf "$TDIR" > > +} > > +# export everything so that the function can be called in a sub-shell > > +export -f install_cabal > > +export CABAL_INSTALL_VERSION > > + > > -- > Klaus Aehlig > Google Germany GmbH, Dienerstr. 12, 80331 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores >
