The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Installing a port without installing the ports
14 January 2000
|
Let's say you suddenly discover that you need to upgrade a port, but you
don't have the port skeletons installed. What are you
going to do? This article talks about how we managed to do that. If you want to update a port collection, try reading Updating the ports collection. |
The situation
|
Someone wanted to upgrade their version of bind8 but they didn't have the port skeletons installed and time was important. I've found
it takes up to an hour to install the port skeletons. My first option was to upgrade
using cvsup, but he didn't have that installed either. So we went for another
option. I suggest you read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html |
Getting the tarball
|
The first thing you need for any port is the tarball for that port.
This tarball contains the basic things required to build a port. Here is a short
example of what is needed:
Here is what I did to give him the tarball:
I did the make clean so I wasn't sending them the .obj files and the binaries. Then I used tar to create a taball and moved that to my ftp directory. This allowed the person to grab the tarball from my box. |
What they did
|
They grabbed the tarball from my box by doing this:
|
The better way to get the tarball
|
Here's a better way to get the tarball if you can't get it from someone
else. And I'd recommand this method rather than the above unless you trust the
person in question.
A short hand version of this is:
Note that the above will not work on all FTP servers. But it does work on ftp.freebsd.org. |
What about this tarball?
|
You could use this tarball anywhere, but I suggest you stick with the port
convention and put it under the /usr/ports tree. In this example, the tarball would
go into /usr/ports/net/.
Originally, I had the options in the tar command as "xvfz". But that won't work as Mark Ma pointed out. Thanks. The "z" option is for compression. But the above tarballs are not compressed. |
Make the port
|
Now that you have the tarball and unzipped it. go into the directory and
make it.
|
OH OH! we forgot something
|
If you get this message when doing the make:
Do this (if you are behind a firewall, you may need to do a "fetch -P" instead of just "fetch"):
|
Then try the make again
|
If you try the make again, and find you can't fetch the files, it may be
because of your firewall. See make - and how to use it behind a
firewall. But that should allow you to build that port you wanted so badly. |