|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Location for ports tree?
I set up my system originally with the default partitions, which gave me /usr = 2.0G.
I followed the FAQ and put the ports tree in /usr, which resulted in an overfull partition. As a result upgrading to -current failed today until I deleted the ports tree. Is there any reason why ports shouldn't go somewhere else, e.g. /usr/src or /usr/obj, which are currently unused? |
|
|||
Sorry to reply to myself but I think I've found two possible solutions.
http://unix.stackexchange.com/questi...-i-build-ports suggests making /etc/mk.conf, but the alternative of making a symlink in /usr seems simpler. |
|
|||
It is not and is the wrong way to go.
|
|
||||
The "default" partitions are determined by the size of the drive, and won't necessarily fit any particular system's needs. Yours, or mine. See disklabel(8), under AUTOMATIC DISK ALLOCATION.
You can put $PORTSDIR anywhere you desire, but /usr/src would not be my recommendation. That directory is for the system source tree and is used when patching your -release, building -stable, or building -current. (Either applying errata patches to -release or running -stable are recommended over running -release in production.) Building ports can take many GBs, especially of some of the larger workstation applications (Gnome, Libreoffice, etc.) and you may want to place $WRKOBJDIR in a separate large partition if you do significant port building. You can use a symbolic link for /usr/ports -- but not /usr, as ibara already recommended to you. If you do this, you may want to set $PORTSDIR manually. Some ports tools may require it. (I have not found it necessary, myself, but my use of the tools in /usr/ports/infrastructure/bin is fairly limited.) Last edited by jggimi; 11th February 2015 at 01:54 PM. Reason: clarity |
|
|||
I meant not to use a symlink at all. See ports(7).
|
|
||||
That man page doesn't address the use of symbolic links for $PORTSDIR. Which I've gotten away with in the past. I'm lucky, perhaps. bsd.port.mk(5) explicitly permits symbolic link use for some targets, such as $WRKDIR.
I will revise my recommendation: You can place $PORTSDIR anywhere you like, just explicitly set the variable. |
|
|||
Thanks to all for comments.
Yes, I meant a symlink to /usr/ports. Sorry if that wasn't clear. Anyway, in the light of comments I'll probably use the $PORTSDIR variable and put the tree in $HOME if I use it at all, but I don't expect to be doing any serious ports building any time soon. |
|
||||
Excellent example of a variation of requirements. That partition may be fine for the occasional build of individual ports, but it's way undersized for large application builds. When I was regularly building around 1500 or so ports for i386 and amd64, I would often need 20+GB. Even with $BULK set to Yes, which clears $WRKOBJDIR after packages are built.
If anyone ever needs to build a lot of packages, I recommend dpb(1). This tool is the bee's knees, the fly's forarm, and the wasp's nipples. It is the entire set of erogenous zones of every major flying insect of the world. [1] It a wonderful tool which makes the process of large scale ports building much easier to direct, manage, monitor, and support. [2] --- [1] Stolen shamelessly from So Long, and Thanks for All the Fish, by Douglas Adams, ISBN 978-0756948160, and badly adapted for use here. [2] I no longer bulk build, as I no longer have a use case. |
|
|||
Quote:
In my experience, building ports using amd64 is less cantankerous than i386 even with changing the memory profile in login.conf(5) & ksh(1)'s ulimit command. Watching dpb's error log sometimes necessitates restarts or resorting to make install as described in Section 15.3.5 of the FAQ. Having said that, dpb is a great addition to the port building toolkit. |
|
|||
Quote:
How? Trial & error. Make an educated guess, & if this works, great. If it doesn't, use a larger partition size. |
|
||||
Quote:
Yep, a 4GB /usr/ports partition seems to be okay for the occasional # make install clean=all of a 3rd party application. I would actually like finer grained partitioning of the disk in that little OpenBSD machine, but [if memory serves] each disk can only have 16[?] partitions. Last edited by hanzer; 12th February 2015 at 10:18 PM. |
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Got my ports tree deleted after attempting ports update | bsdnotbdsm | FreeBSD Ports and Packages | 2 | 18th May 2014 01:58 PM |
OpenBSD ports tree now locked | ocicat | News | 0 | 21st January 2011 03:30 PM |
OpenBSD 4.8 ports tree locked! | ocicat | News | 0 | 2nd August 2010 07:31 PM |
Is my ports tree corrupt or sth? | TerryP | FreeBSD Ports and Packages | 1 | 29th June 2010 09:51 PM |
GCC in src tree or in ports tree | vigol | FreeBSD Ports and Packages | 2 | 6th December 2009 04:34 PM |