Non-Root Package Managers
Binary packages are compiled with the assumption that they will be installed to specific locations in /
. This is not always easily changed, and it would take additional QA effort (which is difficult enough in the first place!) to determine whether specific binaries are or aren't relocatable.
To an extent, you can use things like fakechroot to create an entire system in a subdirectory as a non-root user, but this is tedious and fragile.
You will have better luck with source packages. Gentoo Prefix and Rootless GoboLinux are both package managers that can install to non-/
locations and may be usable by non-root
users.
There's a package manager project--Nix--with an interesting foundational idea (a "functional" pkg manager), which also supports a per-user operation:
Multi-user support
Starting at version 0.11, Nix has multi-user support. This means that non-privileged users can securely install software. Each user can have a different profile, a set of packages in the Nix store that appear in the user’s PATH. If a user installs a package that another user has already installed previously, the package won’t be built or downloaded a second time. At the same time, it is not possible for one user to inject a Trojan horse into a package that might be used by another user.
A NOTE I WANT TO ADD: Nix
ought to be usable in a Unix-like system of your choice (e.g., a Linux distro).
There are also an associated large collection of packages that can be installed with the Nix package manager--Nixpkgs--built for a number of platforms:
- GNU/Linux on 32-bit and 64-bit x86 (i686-linux and x86_64-linux)
- Mac OS X (i686-darwin and x86_64-darwin)
- FreeBSD (i686-freebsd and x86_64-freebsd)
- OpenBSD (i686-openbsd)
- Windows / Cygwin (i686-cygwin),
and an associated distro--NixOS:
NixOS is a Linux distribution based on Nix. It uses Nix not just for package management but also to manage the system configuration (e.g., to build configuration files in /etc). This means, among other things, that it’s possible to easily roll back the entire configuration of the system to an earlier state. Also, users can install software without root privileges. Read more…
and an associated "continuous" build system--Hydra.
I use JuJu which basically allows to have a really tiny linux distribution (containing just the package manager) inside your $HOME/.juju directory.
It allows to have your custom system inside the home directory accessible via proot and, therefore, you can install any packages without root privileges. It will run properly to all the major linux distributions, the only limitation is that JuJu can run on linux kernel with minimum reccomended version 2.6.32.