Date: Fri, 3 Oct 2003 12:39:02 +0300 From: Peter Pentchev <roam@ringlet.net> To: Will Kessler <kessler@willkessler.com> Cc: ports@freebsd.org Subject: Re: install mozilla without root permission Message-ID: <20031003093902.GH546@straylight.oblivion.bg> In-Reply-To: <200310022226100827.0307CB95@localhost> References: <200310022226100827.0307CB95@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
--QXO0/MSS4VvK6f+D Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 02, 2003 at 10:26:10PM -0700, Will Kessler wrote: > Hello, >=20 > I am a poor unpriv'd user on a shared freebsd system which has no > installed browser. >=20 > I'd like to install mozilla but cannot secure root or even pseudo > privs to do it using a package. Is there any way to just install it in > my local home dir? I've also tried biulding from source, after > building gtk and glib, but this fails due to other dependencies. You cannot really install an already-built package into another location: most often, the binaries, libraries, and other files in the package will have hardwired (at compile time) references to paths to its 'usual' location (the one it was built for) - it may be hard and time-consuming (and even impossible for the binaries and libraries) to track down and change all those references, and make sure it's done correctly. The most you can do is build the port - starting with all its dependencies - instructing it to install into your home dir. Although I've never done this for Mozilla itself, I have indeed succeeded in doing this for other ports, including their dependencies. It is not a very easy task, though :( The way to go about it is to set several environment variables. - the PREFIX variable specifies where a port is to be installed; point it at your home directory, and the ports system will create the ~/bin, ~/lib, ~/share, etc, directories needed; - the LOCALBASE variable specifies where a port should look for the libraries and commands installed by its dependencies; if you want to build Mozilla's dependencies, too (if they are not installed on the system in the default /usr/local hierarchy), you may want to also point LOCALBASE to your home directory; - the INSTALL_AS_USER variable instructs the ports collection to not attempt to perform the actual installation as root; set it to any value, 'yes' works fine :) - the NO_PKG_REGISTER variable instructs the ports collection to not attempt to actually register the package in the package database used by the pkg_add/pkg_delete/pkg_info tools; set it to any value, 'yes' works fine :) - the DISTDIR variable contains the location for the directory where the ports system downloads the source files for the installed packages; since you may not have permission to write to the default download directory, /usr/ports/distfiles/, you may want to set DISTDIR to, say, $HOME/tmp/dist/; - the WRKDIRPREFIX variable contains the location for a directory where the ports are actually extracted and compiled; since you may not have permission to write to the default directories - they are created in the ports tree itself, e.g. /usr/ports/www/mozilla/work/ and /usr/ports/devel/gmake/work/, you may want to set WRKDIRPREFIX to, say, $HOME/tmp/work/; - the DEPENDS_TARGET variable controls the way a port's dependencies are built when needed; since Mozilla has a lot of big dependencies, and you may not want to keep all of their extracted/compiled sources around after they were successfully installed, you may want to change the default 'install' setting to 'install clean', so that the ports are cleaned up immediately after a successful installation; - the LD_LIBRARY_PATH, while not specifically a ports variable, will have some bearing on your trying to build applications which link with libraries in non-standard locations. You may want to set LD_LIBRARY_PATH to $LOCALBASE/lib (if using the settings proposed above, this will be the same as $HOME/lib). Well, I warned you that it might not be simple and easy :) Something like the following usually works for me: - for Bourne-family shells (sh, ksh, bash, zsh): export PREFIX=3D$HOME LOCALBASE=3D$HOME INSTALL_AS_USER=3Dyes NO_PKG_REGI= STER=3Dyes export DISTDIR=3D$HOME/tmp/dist/ WRKDIRPREFIX=3D$HOME/tmp/work/ export DEPENDS_TARGET=3D'install clean' LD_LIBRARY_PATH=3D$LOCALBASE/lib - for C-family shells (csh, tcsh): setenv PREFIX $HOME setenv LOCALBASE $HOME setenv INSTALL_AS_USER yes setenv NO_PKG_REGISTER yes setenv DISTDIR $HOME/tmp/dist setenv WRKDIRPREFIX $HOME/tmp/work setenv DEPENDS_TARGET 'install clean' setenv LD_LIBRARY_PATH $LOCALBASE/lib Then either use the system's ports tree in /usr/ports, or extract your own copy in, say, $HOME/ports/ and set the PORTSDIR variable to point at it (export PORTSDIR=3D$HOME/ports or setenv PORTSDIR $HOME/ports), change to the www/mozilla port's directory (cd /usr/ports/www/mozilla/), and try 'make clean all install' to see if it will work :) Someday I'll try to organize this, as well as any feedback received from people who have tried it and found it a bit lacking, and make it a part of the FreeBSD Handbook's ports section. Thus, it will be awesome if you actually tried to follow these directions and told me if it works or not, including the error messages in the latter case :) > Normally I develop under solaris and linux, for which i can get > executables that seem to run in their own dir, so i'm less familiar > with freebsd (although pkg_add sounds a bit like pkgadd under > solaris). Unfortunately, as noted above, pkg_add only installs precompiled packages, and you cannot easily do this into a different directory - not for a port as complex as Mozilla anyway :( > Any pointers/help appreciated! Opera just doesn't cut the mustard, I > really don't want to use any MSFT products, and googling revealed few > clues. Well, pretty much your only chance is to build the beast yourself... and be warned, it *is* a beast, it is enormous, it has a *lot* of big dependencies, it will take both much time and much disk space to do this. Still, it might be worth a try :) By the way, there are a couple of other browsers in the ports/www category: Arena and Mosaic come to mind, although they might be a bit simplistic, but there might be others that I just don't know about :) If Mozilla turns out to be really hard to build this way, you might want to try some of the simpler ones. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 When you are not looking at it, this sentence is in Spanish. --QXO0/MSS4VvK6f+D Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/fUO27Ri2jRYZRVMRAkWzAJ91ciWePsrCuaxKZ5VDyy8zmwzAigCdG/Wj WumgFz+XAQnnhhZF0/ucEUc= =Ps/Z -----END PGP SIGNATURE----- --QXO0/MSS4VvK6f+D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031003093902.GH546>