install the ports tree into another directory

Hi all,
I'm trying to install the ports tree into a zfs filesystem under /mnt/RPOOL/ports and I've succesfully used portsnap to get the directory configured:

Code:
portsnap fetch
portsnap -p /mnt/RPOOL/ports extract

But now when I try to make a search into the ports catalog I got:

Code:
root@nas] /mnt/RPOOL/ports# make search key=eclipse
"/usr/share/mk/bsd.port.subdir.mk", line 6: Could not find /usr/ports/Mk/bsd.port.subdir.mk
"Makefile", line 155: Malformed conditional (${OSVERSION} >= 601101)
"Makefile", line 157: if-less else
"Makefile", line 159: if-less endif
make: fatal errors encountered -- cannot continue

The problem is that I cannot edit the /usr/share/mk/bsd.port.subdir.mk because my /usr is read only. Is there a way to override the settings in such file so to make the ports collection working?
 
Link your new ports directory to /usr/ports/. This way you don't have to change any configuration. I myself have my ports tree under /usr/local/ports/ and then link it to /usr/ports to keep / from getting cluttered.
 
Thanks both. I was trying to set the mountpoint to /usr/ports but got an error due to the file system in read-only mode. It is curious I can create the link in such filesystem...
 
Remount your /usr filesystem read-write then create the link then remount it as read-only again. As long as the linked directory is read-write you shouldn't have any problems.
 
Back
Top