4

I installed OpenBSD using the default/automatic partition configuration which only allocated ~4MB to /usr. While compiling a large port it gave an error that the disk was full.

I have looked for ways to extend to the partition but can find nothing about how to do this. I have plenty of space on other partitions (such as /home), is there a way to redirect where output files go when I run make so I can point them to somewhere that has space?

6

Create a file /etc/mk.conf with something like the following:

WRKOBJDIR=/home/foo/build/ports
DISTDIR=/home/foo/build/distfiles
PACKAGE_REPOSITORY=/home/foo/packages

The path can be to anywhere you want, so obviously replace /home/foo with the directory you want. You don't need to create the directories; they will be created automatically when you run make.

This is covered in the FAQ: 15.3.3 - Configuration of the ports system, with the suggested use-case of using this to create a "read only" ports tree, so /usr/ports can be on a read-only disk/filesystem and you can still build from it, but obviously still works as a workaround for any situation where you cannot write to /usr/ports.

| improve this answer | |
5

Glass's answer is the best way to go, but as an alternative you can move it and symlink it.

mv /usr/ports /home/
ln -s /home/ports /usr/ports
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy