PDA

View Full Version : no /usr/ports or /usr/src/ports ??


ukulele
07-26-2008, 10:16 PM
Hello,

I've set up an OpenBSD 3.8 system that I'm using as a webserver. I've got apache happily configured to serve three domains and run CGIs that I'm writing in Perl. Now I want Subversion, to use for source control.

It looks as though all you have to do is download the makefile from http://subversion.tigris.org/getting.html#freebsd, then run "make install" and make will get the sources .tgz, do the build and install svn, svnserve, etc.

But the above-linked page says you should be in /usr/ports/devel/subversion when you run make. Well, /usr/ports didn't exist, so I made those directories and ran "make install". Got the following fatal error:

"Could not find /usr/ports/infrastructure/mk/bsd.port.mk"

Then I found a note at http://monkey.org/openbsd/archive/misc/0303/msg00131.html which suggests you need to have PORTSDIR configured as /usr/src/ports. Trouble is, /usr/src is empty on my system, so I doubt make will find whatever it's looking for there, either. Ha ha!

I guess some package or other is not installed, to enable this kind of make. But what? And how do I install it? I do find make and gcc on the system, so there's some provision for development.

ocicat
07-26-2008, 10:45 PM
.../usr/src is empty on my system...
There are several issues at play:

OpenBSD 3.8 was released November 1, 2005 which makes it nearly 3 years old. This release is no longer supported. Note that OpenBSD 4.4 will be released November 1, 2008.
/usr/src & /usr/ports are not populated by default. If you have the distribution CD set, you will find the following:

src.tar.gz
sys.tar.gz
ports.tar.gz

...there, or on a mirror site located under pub/OpenBSD/3.8. Assuming you have copied these files to /tmp, issue the following commands:

# cd /usr/src; tar xzf /tmp/src.tar.gz
# cd /usr/src; tar xzf /tmp/sys.tar.gz
# cd /usr; tar xzf /tmp/ports.tar.gz

...will populate /usr/src & /usr/ports as expected.

The point here is that the contents of src.tar.gz & sys.tar.gz both go into /usr/src while the contents of ports.tar.gz go into /usr/ports.
If your goal is to install Subversion, downloading the files described in your initial post means that you will be having to port anything (libraries, system calls...) not specific to OpenBSD. Even if you are versed in porting software, you may or may not be successful at this venture, & expect the effort to be very time-consuming. You will be saving yourself significant grief by installing the pre-built package available at pub/OpenBSD/3.8/packages/i386 assuming you are running on the i386 platform. The version found there is:

subversion-1.2.1.tgz

Note that all packages found in that directory will also be three years old, & installing versions of newer packages is not supported given the tight coupling between the kernel & userland. For more information on installing packages, study Section 15.2.2:

http://openbsd.org/faq/faq15.html#Easy

More importantly, study the pkg_add(1) (http://www.openbsd.org/cgi-bin/man.cgi?query=pkg_add&apropos=0&sektion=0&manpath=OpenBSD+3.8&arch=i386&format=html) manpage given that the information currently in the FAQ is specific to OpenBSD 4.3. The manpage link provided is specific to 3.8.

Note that you can upgrade from 3.8 to 4.3 or 4.4, but you will need to upgrade sequentially through all intermediate versions: 3.8 to 3.9 to 4.0, etc. all the way to either 4.3 or 4.4 once it is available.

My recommendation would be to do a fresh install. Information for installing OpenBSD 4.3 can be found in Section 4 of the FAQ:

http://openbsd.org/faq/faq4.html

More information on the packages/ports system can be found in Section 15:

http://openbsd.org/faq/faq15.html

ukulele
07-27-2008, 10:45 PM
Thanks so much for the detailed reply!

I think I'll just go the fresh install route; I had that old 3.8 system lying around and didn't realize how out of date it was. But I may do a subversion experiment first.

Thanks again. I can see that this forum will be a huge help to my continuing education.

ocicat
07-27-2008, 10:50 PM
I can see that this forum will be a huge help to my continuing education.
Thanks for the vote of confidence!

As a newcomer to OpenBSD, you will save yourself a great deal of time & grief by familiarizing yourself with the contents found in the official FAQ. It is the single best place to find information on all things relating to OpenBSD:

http://openbsd.org/faq/index.html

Welcome!