|
|
Subscribe / Log in / New account

Installing to your home drive

Installing to your home drive

Posted Feb 22, 2011 18:15 UTC (Tue) by nye (subscriber, #51576)
In reply to: Installing to your home drive by pflugstad
Parent article: Optimizing Linux with cheap flash drives

The point was to install a *package*. To my knowledge no widely used package manager allows per-user package installation.


to post comments

Installing to your home drive

Posted Feb 23, 2011 5:45 UTC (Wed) by idupree (guest, #71169) [Link] (3 responses)

Most package managers offer binary (already-compiled) packages. Most Linux/Unix software can't have its prefix changed *after* compilation. Everyone's user directory has a different path (thus, prefix). Thus, problems.

Options I've heard of & played with: GoboLinux's "Rootless" project is a system for installing from source in your home directory (on any distro). ZeroInstall I believe does source and binary (not sure how it manages binary) without root privileges. Some NixOS research has looked into rewriting the paths in compiled packages (though not changing its total-number-of-characters length).

Installing to your home drive

Posted Feb 23, 2011 9:34 UTC (Wed) by nix (subscriber, #2304) [Link]

Also, gnulib contains support code to make 'relocatable packages' work (by looking at argv[0], or, if this contains no path, by hunting along $PATH to find itself, then using relative paths everywhere in the knowledge of the location of the binary). GCC has worked this way for ever, but it's only fairly recently that relocatable support has started to find its way into other GNU programs. (Most non-GNU programs still don't care, but the GNU Project cares about keeping its stuff installable into people's home directories on random systems: that's how it started, after all.)

Installing to your home drive

Posted Feb 23, 2011 19:08 UTC (Wed) by talex (guest, #19139) [Link] (1 responses)

ZeroInstall I believe does source and binary (not sure how it manages binary) without root privileges.

In my experience (0install developer), a surprising number of programs are relocatable:

  • Anything that's been ported to Windows or Mac will be relocatable.
  • Anything that encourages non-technical end-users to download beta versions will be relocatable.
  • Things written in languages with built-in string concatenation (i.e. anything except C) are usually relocatable.
  • Libraries always seem to be relocatable (not sure why this is; maybe to allow them to be bundled with other relocatable programs?).
There were a few suggestions for supporting non-relocatable programs (e.g. using Plash to adjust paths at runtime, Klik-style binary rewriting, etc) but there don't seem to be many programs that need it these days.

Installing to your home drive

Posted Feb 23, 2011 22:36 UTC (Wed) by nix (subscriber, #2304) [Link]

Libraries always seem to be relocatable (not sure why this is; maybe to allow them to be bundled with other relocatable programs?).
That is definitely not always true. The KDE3 libraries, for instance, were not relocatable: they had $datadir and $libdir/kde3 baked into them. (I think the same is true of glib and gtk as well.)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds