Using Ports vs Install on your own reddit / freebsd ---------------------------------------------------------------------- marshen0110 · 2023-12-15 00:06 I understand that installing with package manager like pkg, pkg\_add, etc... , are just pre-compiled from the ports pretty much. My question is what are the notable advantages of installing via Ports and not just getting source from a repository or Download link and building on your own. I think so far the only benefits would be it doing * Where and how to fetch the source of the software * Which other software it depends upon * How to alter the sources (if necessary) * How to configure and build it * How to test it (optional) * How to install it ---------------------------------------------------------------------- OwnPomegranate5906 · 2023-12-15 00:30 The only reason I'd choose to pull the source and build it manually is if the default pre-built installed via pkg didn't have a configuration option that I just had to have so much that I'd go to the trouble of building it myself. Thankfully, that hasn't really been the case for me and the stuff I typically run, but that may not be the case for others. ---------------------------------------------------------------------- mmm-harder · 2023-12-15 00:59 Have a look at Poudriere. It's really quite a better alternative to building source by hand. ---------------------------------------------------------------------- dlangille · 2023-12-15 01:24 This is why I run poudriere: non-default build options. The added benefit is when a vuln is patched, my overnight builds give me the package the next day. I don’t have to wait for FreeBSD to build it. ---------------------------------------------------------------------- OwnPomegranate5906 · 2023-12-15 01:37 That's a great way to go if you have that need. ---------------------------------------------------------------------- vivekkhera · 2023-12-15 02:14 If you’re only running one box then building directly from ports is viable to make a custom configuration for a few. When I ran a fleet of servers I used poudriere to build all the packages I needed and served them up from a local repository. These days I only have one system running everything (no longer running a business) and I just install the default packages. I’m not so concerned with changing the defaults. ---------------------------------------------------------------------- sp0rk173 · 2023-12-15 02:55 There’s very few reasons, at this point, to compile from ports. I used to only use ports back on the day, but now I use pkg exclusively. ---------------------------------------------------------------------- Xzenor · 2023-12-15 06:34 Another reason to not just grab and build the source from the internet instead of building from port is that a lot of ports have specific patches to the source code to make them run on FreeBSD. You'd miss out on those. It's mostly changes to the default paths, because FreeBSD installs user applications in /use/local but some have even more patches to the code to get it running on FreeBSD. ---------------------------------------------------------------------- darkempath · 2023-12-15 10:03 I can't believe nobody has addressed the reasons why yet. I use ports pretty much exclusively, and there's a reason you should use ports over compiling outside the system. First, the ports contain FreeBSD-specific patches. These patches address everything from paths (so installs don't mix with or overwrite the OS) to rectifying linux-specific code so it actually works in FreeBSD. This is why there are missing Samba releases in ports - Samba introduced linux-specific code that took a while to be ported properly to function under FreeBSD. Second, it stops replication of dependencies. Outside of ports, it might or might not recognise installed dependencies because it will likely search linux file paths. It might even try installing older libraries over the top of already installed (and newer) ones. Lastly, installing via ports keeps the software consistent with the operating system. This includes keeping the dependency list accurate and updated, as well as ensuring the OS can control how apps start, stop, and restart. FreeBSD is an operating system, not a distribution of separate software packages. Installing through ports ensures scripts are created that make starting/stopping/restarting/reloading apps simple ***and consistent***. Consistency is one major deficiency linux has, and it's a deficiency you'll port to the BSDs if you don't use ports. ---------------------------------------------------------------------- abqcheeks · 2023-12-15 14:35 Well put. As someone who did a lot of software installation/ maintenance before the FreeBSD Ports came to be, the ports system was a revelation. Managing dependencies by hand had become very hard (and would be much harder now). These days I use packages in most places, and poudriere on systems that need custom options set for the builds. The only times I install something directly is if there’s no port available for something (or it got removed from ports because the upstream is abandoned and nobody wants to maintain it). ---------------------------------------------------------------------- darkempath · 2023-12-16 02:18 >Managing dependencies by hand had become very hard (and would be much harder now). My introduction to \*nix was slackware in 1994. I feel your pain.