Installing Ports from CD/DVD?

I'm still a novice, but I've done my prerequisite googling, forum searching and all around digging to try and find this answer. It should be as straight forward as specifying source media with sysinstall but that doesn't seem to work. Here's my scenario.

I installed FreeBSD 7.1 from DVD. Along with install I had it add the ports collection. I'm trying to install a port now, but it always tries to go out to my non-existent internet connection and pull down via FTP rather than just read off the CD/DVD. I do have the cdrom mounted and I can view all of the files on it, but no matter how many times I specify CDROM as the media in sysinstall it tries FTP instead. I found the following off my googling, but it was related to release 2.7...which was a while ago so I'm curious what's the correct method to accomplish my task.

# cd /usr/ports
# ln -s /cdrom/ports/distfiles distfiles

I would think this is a pretty basic function, but maybe my search terminology is off or my fundamental understanding isn't quite there. Would someone be so kind as to shed some light on this for me? Thanks.
 
It has been some time since I used the FreeBSD CD/DVDs (FreeBSD 4 to be exact), but back in those days the CDs never contained any port distfiles, just packages.

You can check if you're dealing with a distfile or package with:
% pkg_info [i]file.tbz[/i]

If it's a package, some info about the package is displayed, otherwise it is a distfile.

* The directory path does suggest we're dealing with distfiles, but just making sure can't hurt.

Another possibility is that the port wants a different version than what is in the distdir.
Check what the port wants with % cd yourport && make -V DISTFILES, then check if that file actually exists in the distfile directory.

There are some other possibilities, like mismatching checksums, or missing dependency distfiles, post the *full* output of # make clean extract.

As a sidenote, you don't need to symlink /cdrom/ports/distfiles, you can just set the DISTDIR variable to /cdrom/ports/distfiles, either from the commandline or in /etc/make.conf
 
Thanks for your reply.

Is this what you're looking for or does it output more verbose information to a log file somewhere?

corinth# make clean extract
===> Cleaning for kde4-4.1.1
===> Vulnerability check disabled, database not found
===> Found saved configuration for kde4-4.1.1
===> Extracting for kde4-4.1.1


If I set the DISTDIR variable in /etc/make.conf to look like this
DISTDIR=/cdrom/ports/distfiles
then it gives me these errors because it's trying to create directories on the CD.

corinth# make install clean
===> Patching for kde4-4.1.1
===> kde4-4.1.1 depends on file: /usr/local/kde4/bin/kdebugdiaglog - not found
===> Verifying install for /usr/local/kde4/bin/kdebugdialog in /usr/ports/x11/kdebase4-runtime
===> Vulnerability check disabled, database not found
mkdir: /cdrom/ports: Read-only file system
*** Error code 1

Stop in /usr/ports/x11/kde4base4-runtime
*** Error code 1

Stop in /usr/ports/x11/kde4
*** Error code 1

Stop in /usr/ports/x11/kde4
 
Had I looked a bit closer at the FreeBSD handbook section 4.5.1 subsection for sysinstall I'd see that picking the initial install media source isn't what it was refering to that it actually wants to specify explicitly for the media source for ports

# sysinstall
Scroll down and select Configure, press Enter.
Scroll down and select Distributions, press Enter.
Scroll down to ports, press Space.
Scroll up to Exit, press Enter.
Select your desired installation media, such as CDROM, FTP, and so on.

This looks like it's got me on the right track, however after going through this and running make for the port that I want to install my system crashes with a 'Fatal Trap 12: page fault while in kernel mode'

Since I'm not too far in I'm inclined to try a fresh install just to make sure everything is kosher with the system.
 
kde4 is a meta port, so make extract will always succeed because you don't need any distfiles.

run # make depends for kde4 and post the output (preferably inside
Code:
 tags since this retains the formatting)

[quote]Is this what you're looking for or does it output more verbose information to a log file somewhere?[/quote]

No, this is good, just copy&paste everything from the command down.


[quote="Carpetsmoker"]As a sidenote, you don't need to symlink /cdrom/ports/distfiles, you can just set the DISTDIR variable to /cdrom/ports/distfiles, either from the commandline or in /etc/make.conf[/quote]

I just remembered there is a separate variable for distfiles from CD: CD_MOUNTPTS, it seems to set to /cdrom automatically, and searches ${CD_MOUNTPTS}/ports/distfiles ... So no there should be no need to touch the DISTDIR variable.

[quote]Had I looked a bit closer at the FreeBSD handbook section 4.5.1 subsection for sysinstall I'd see that picking the initial install media source isn't what it was refering to that it actually wants to specify explicitly for the media source for ports[/quote]

You can't install ports with sysinstall, only packages ... Selecting a media source in sysinstall only applies to that sysinstall session, there is no configuration saved anywhere of any sort.
 
If you install a package from the ports collection, the source code for the package gets downloaded form the internet and stored in /usr/ports/distfiles folder. Then the package gets compiled.

If you like to install off the CD/DVD you should install the pre-compilled package using pkg_add command or sysinstall.
 
Back
Top