haskell-hub/hub-gen — Issue #8: Request for user-space install
Author: sanketr
Created: 2012-01-06 00:48:21+00:00
State: open

It will be very useful to have a user-space install for GHC and Haskell platform, instead of assuming root privileges, and /usr/hs path. Couple of things to consider:

- Development machines can be locked down, like production machines. This happens to be true in my case. The idea is to have the deployment procedures consistent across development and production. So, while gcc, ghc and other tools will be available only in dev, they will be deployed using the same procedures. No root permissions will be available to users. See below about deployment procedures.

- The deployment procedures might use clustered filesystems over the network. So, gcc and other libraries can be on other network drives in user land. For example, gcc 4.4.3 might be in /nfs/dev/tools/gcc/4.4.3 (where /nfs is a network mount). The only libraries that are local to the boxes are the ones that are needed to boot from local disk, and are standard across linux installations. So, critical libraries like libc are in standard locations like /lib. That is the only assumption that can be made. Other libraries that are not considered core for Linux, but are needed for GHC might be in user-land. For example, gmp library might be in /nfs/dev/tool/libgmp. This indeed is the case for me. I have libgmp and zlib installed in user-land.

- No outside network connection should be assumed for the installer tools. I can get cabal to pull data using http_proxy environment variable. But, other users might be blocked by their proxy servers from accessing files outside. We should let them download the files manually, and install.

So, installing in user-land should be similar to what we get when we build from source with configure prefix. We should allow user-defined locations for libraries and tools needed by GHC. I have noticed that GHC binary seems to assume that gcc is in /usr/bin/gcc, but this hard-coded assumption should be avoided if possible, as users might use a different version of gcc and binutils. I am not sure if GHC bash script overrides it with pgmgcc environment setting.

It will be nice to have both GHC and platform rpms available as relocatable (i.e., users can specify the installation location, and a script can be provided to set locations of libraries and tools). May be we should look into how this is done by existing binaries for other linux platforms.