Timeline for Where to install custom software packages on FreeBSD?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 29, 2024 at 19:21 | comment | added | user149408 |
Indeed, I should have read this more thoroughly, /usr/ports is for source code, patches and build recipes, not executable binaries.
|
|
| Apr 29, 2024 at 19:02 | comment | added | Zé Loff |
/usr/ports is not for installing packages. It is where the porting infrastructure is stored, i.e., the "recipes" for building the packages themselves. You can, of course, create a port of your own software, and then you can install the resulting package file with the OS's package management tools.
|
|
| Apr 29, 2024 at 18:57 | comment | added | user149408 |
I see hier (7) mentions neither /opt nor /usr/local/$PACKAGE (which another answer mentions). As per hier (7) and ports (7), BSD ports go in /usr/local/ports/$CATEGORY/$PORT, e.g. /usr/local/ports/sysutils/fooadmin for fooadmin from the sysutils category. As in FreeBSD terminology, port and package are pretty much synonyms, that would imply installing your own package into /usr/local/ports/$CATEGORY/$PACKAGE, even if it’s not strictly part of the FreeBSD Ports Collection. You’d run into issues only if the latter has a package of the same name in the same category.
|
|
| Apr 28, 2024 at 21:14 | comment | added | Zé Loff |
Here's the canonical answer: FreeBSD's man page for hier. Its bin, sbin, etc. Note the absence of /opt, although that obviously doesn't mean it can't exist.
|
|
| Apr 28, 2024 at 18:21 | comment | added | user149408 |
What’s the standard hierarchy for /usr/local in FreeBSD? /usr/local/{bin,sbin,man,lib} or usr/local/$PACKAGE? In the first case, conflicts are likely and I wouldn’t feel comfortable placing anything in there. In the latter case, there should be no conflicts as long as the name of my package doesn’t collide with anything in the repos, which shouldn’t be that hard to avoid. Installing two packages with the same name (one from the repo, one custom) but different contents will probably cause other issues as well, so I’m not too worried about file collisions in that case.
|
|
| Apr 28, 2024 at 11:46 | history | answered | Zé Loff | CC BY-SA 4.0 |