LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 04-23-2005, 10:46 PM   #1
monkeyking
LQ Newbie
 
Registered: Jan 2005
Posts: 20

Rep: Reputation: 0
newb. question about ports.


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

monkeyking
 
Old 04-24-2005, 02:01 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 04-24-2005, 05:16 AM   #3
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Rep: Reputation: 15
monkeyking has brought up an interesting point.

is there a guide or tut. (GREAT GUIDE) which explains proper port setup, usage and maintenance.

I went through the long process of port setup and CVS setup and it appeared to work. But my very first installed app KDE3 fail miserably

thanks
 
Old 04-24-2005, 06:43 AM   #4
monkeyking
LQ Newbie
 
Registered: Jan 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
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
 
Old 04-24-2005, 07:44 AM   #5
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
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:
Code:
setenv PKG_PATH ftp://ftp.freebsd.org/pub/FreeBSD/po...s-5-stable/All
pkg_add $PKG_PATH/firefox-1.0.1_3,1.tbz
I am at work, so more explanation to come but this will work right now and sate you until then.

Last edited by frob23; 04-24-2005 at 07:47 AM.
 
Old 04-24-2005, 09:04 AM   #6
monkeyking
LQ Newbie
 
Registered: Jan 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks,
 
Old 04-24-2005, 02:23 PM   #7
jake3988
Member
 
Registered: Mar 2005
Location: Ohio
Distribution: Freebsd and Ubuntu
Posts: 69

Rep: Reputation: 17
pkg_add -r <pkg_name>

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

It's that simple
 
Old 04-24-2005, 02:24 PM   #8
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newb C++ question Scotty2435 Programming 9 03-05-2006 04:38 AM
Newb question sicness Slackware 4 11-09-2005 03:40 AM
newb - firewire ports. Impactor Fedora 0 03-05-2004 04:36 AM
Newb question tombomb300 Linux - Newbie 1 01-28-2004 12:20 PM
A Newb Question pt. 2 gnr2k3 Linux - Newbie 3 08-30-2003 05:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 02:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration