*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi I'm fairly new in the world of freebsd, and the blessing of the ports.
I just finished my freebsd 5.3 installation and updatet my ports tree with
Code:
cvsup -g -L2 /root/ports-supfile
I remembered to change the CHANGETHIS.freebsd.org host.
I had no problems updating the tree.
But now I want the firefox installed and I did a.
Code:
pkg_add -r firefox
This installed the firefox but only version 0.9, and I want the new one.
Then I checked freshports.org, and they have 1.0.3. http://www.freshports.org/www/firefox/
They say that i should just type in pkg_add -r firefox, which I did.
I don't get this, what should I do, thanks in advance
Did you set your PKG_PATH environment variable to point to the freshports packages? AFAIK changing your ports setting will have no effect on where pkg_add tries to get packages from. If setting PKG_PATH doesn't work, try specifying the full URL of the package to pkg_add.
NB I'm basing this on OpenBSD, since I haven't had a FreeBSD system in awhile. I *think* everything works the same, though.
Originally posted by btmiller
Did you set your PKG_PATH environment variable to point to the freshports packages? AFAIK changing your ports setting will have no effect on where pkg_add tries to get packages from. If setting PKG_PATH doesn't work, try specifying the full URL of the package to pkg_add.
No this I didn't., acutally I didn't know that you had to do this.
I've been cruising around for the last 2 hours or so, and I can't find any info on the var PKG_PATH.
I can't even see the full URL for the package I want to install.
Can anyone elaborate on this subject, I
Thanks again.
monkeyking
While PKG_PATH will work, it is annoying because it requires that you type "pkg_add PKG_PATH/proper.pkg.name.tgz" instead of the simple "pkg_add -r shortname". But it does tend to work more reliably in this situation so we'll stick with it. Check out PACKAGESITE in the pkg_add man page for another way to do it.
Here is how to install the newest firefox that has a package (and all the dependancies too) at this time:
This does precompiled binaries. But... since they are precompiled they take a lot longer before someone makes them available, thus you need to compile from source... with 'make install clean'
1)cvsup ports-supfile (if you're using X, no need for any flags),
this should take only a few minutes if you do it enough
2)make index
3)portupgrade <pkg_name> OR make install clean
Some of this comes from the various man-pages but I am also going to try and explain the differences and when you would want to use one over the other.
There are many different environment variable that affect how you get packages remotely. I'm going to cover a few... hopefully in enough detail to make sense from the manpage descriptions (which aren't bad but neglect to explain some things).
PACKAGEROOT: specifies an alternate location for pkg_add to fetch from. The fetch URL is built using this environment variable and the automatic directory logic that pkg_add uses when the -r option is invoked. An example setting would be "ftp://ftp3.FreeBSD.org".
Explanation: This is valuable if everything works just fine but you know a mirror is closer to you and faster than the default. Basically, if pkg_add -r name does exactly what you want but you know the network speed could be increased then you set this.
PACKAGESITE specifies an alternate location for pkg_add to fetch from. This variable subverts the automatic directory logic that pkg_add uses when the -r option is invoked. Thus it should be a complete URL to the remote package file(s).
Explanation: This lets you pick a very specific directory which may not conform to the rules pkg_add uses to determine how to find directories. Because it does not use the rules at all, the filename must be package.tbz where package is the short name entered. This makes it less flexible on the user site but allows you to deal with odd repositories.
PKG_PATH is used if a given package can't be found. The environment variable should be a series of entries separated by colons. Each entry consists of a directory name.
Explanation: This is meant to allow the program to check several possibly locations for a package before it gives up and says it could not be found. Originally, this was intended to tell the program where, on the local disk, to find the packages... since it was possible to have it in many locations and have different package repositories on the same disk. It can be overloaded, with ease, to use a network site (see example above) because of the flexibility of the program.
PKG_SITES list of URI's to fetch packages from separated by space. Each site directory must contain directories named ``All'' and ``Latest''.
Explanation: This is a nice variable to set when using portupgrade or even with pkg_add if you pre-fetch the packages manually. I use it so often that I have PKG_SITES=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/ included in my .cshrc so that I never need to type it. This is NOT a perfect solution but it tends to meet my needs. Also, this is the best solution if you have many systems which are similar and you want to install the same packages on each. For example, we'll assume you have the variable set as above.
pkg_fetch -R firefox
# This above command will download the latest firefox package from that directory along with all the dependancies it requires to run. They will be saved (by default) to /usr/ports/packages/All/ so you can use any variety of the above to install them. If you have PKG_PATH set the the default package directory, you can just cd in there and type "pkg_add firefox[tab]' the [tab] means hit the tab key to complete the file name, then enter and it will install it.
Also, after a cvsup, with PKG_SITES set you can type portupgrade -P to use the latest package if you have it.
If you have many computers, you just need to serve this directory (with ftp or whatever) and point all the computers to your local machine to get the latest packages from.
Okay, that's a pretty basic intro about the variable used by the system... the most common ones for me at least. I hope it makes sense and helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.