3 ms·
Before continuing my rant, I will mention that I am a FreeBSD amateur and tinkerer, and I know the Linux tools far better than the FreeBSD tools. I could be en
by SwellJoe 19y ago
Before continuing my rant, I will mention that I am a FreeBSD amateur and tinkerer, and I know the Linux tools far better than the FreeBSD tools. I could be entirely wrong in some of my complaints. I have spent the past two weeks knee deep in FreeBSD package management and scripted installation of a very complex system. These are the things that have caused me great pain, and I've been unable to overcome them with repeated readings of the documentation--that's not to say they can't be overcome. I just haven't been able to.
"I'm not sure from what you've written what you consider to be the right problem -- can you clarify?"
There are actually many problems that yum and apt solve very well, that ports doesn't even consider. Yes, the fact that ports builds everything from source is, frankly, stupid (OK, not stupid...just solving the wrong problem...it should be a tool used for building the distribution by the developers of the OS, not for installing applications on every freakin' FreeBSD box on the planet while we all grow old waiting on the damned build to finish).
I generally use pkgadd -rI to install things, and it works reasonably well (still needs a lot of work--the functionality of pkg* is pretty dismal compared to the rich capabilities of rpm and dpkg, particularly with regards to upgrades and getting information back about what is already installed). But the lack of binaries isn't really all that big of a concern to me. It's slow and pointless, but some people like that sort of thing--heck, one nutjob even built a ports style system for Linux and built a whole distro around it, apparently because yum and apt-get were just too damned quick and easy for him. ;-)
Among the issues that ports doesn't solve (and maybe even shouldn't--this might be a job for extensions to the pkg* tools):
ports doesn't provide any tools for distribution of software other than that provided by FreeBSD. As a third party software developer, I can't (easily) add my own ports tree path to a configuration file and from then on my customers will be able to use ports for my software, as well as the FreeBSD stock stuff. Both yum and apt repos are available for dozens of projects and packages outside of the "official" repositories, and it makes using Linux a whole lot more fun. One can grab newer or custom versions of things, commercial software that doesn't meet the license requirements of the OS repos, etc. And once installed one can keep them up to date with a simple command ( "yum update" or "apt-get update; apt-get upgrade" ).
Updating with ports is complicated and slow, so even if it were possible to add third party repos, it would still be the wrong tool for the job. freebsd-update actually manages this better than ports (but again, only for OS-provided packages, and in a quite limited fashion). Distributing software to FreeBSD users is generally done via a tarball with maybe a shell script...and that's a valid option for some software. But we've got dozens of packages and they are updated sometimes weekly (much of it is security related--for example we distribute 80 or so installable web applications of wildly varying quality...when Wordpress has a security bug, we have to roll out an update to our installer for that script quickly and easily).
Installing software with ports is not scriptable in any sane way. It asks questions using an ncurses interface, which, as far as I can tell, cannot be disabled. This is abomination. pkgadd has the -I option, which means no configuration is done, but at least it is non-interactive. It even seems to handle dependencies reasonably well, though I may just not be hitting it hard enough yet. Another few days and I'll begin the heavy lifting and I'll know for sure.
So, I think those are the biggies, and being from source isn't really the biggest of them. If our customers want to wait four hours for our tools to install, that's not really my concern--it's their time, not mine. But, the other stuff is serious: non-scriptable, no good tools for querying the existing state of the system (versions, locations, etc.) and updating it, and no support for third party software.
Anyway, those are the things that spring to mind. I'm sure I'll think of other stuff to bitch about later, particularly when I'm back to work on the FreeBSD installer for our product.
- cperciva 19y agoI can't (easily) add my own ports tree path to a configuration file... Good point. In most cases the solution is to have your application added to the ports tree (unlike certain ungulate/avian operating systems, FreeBSD doesn't mix up religion and computing, so this isn't only an option for free software), but there are certainly cases where that isn't an option. Distributing software to FreeBSD users is generally done via a tarball with maybe a shell script I'd say that a more common method is to distribute a package (which can then be installed via pkg_add). [The ports tree] asks questions using an ncurses interface, which, as far as I can tell, cannot be disabled. This needs to be documented better: Add BATCH=YES into your environment, and the ports infrastructure will run without pestering you. Of course, there are a few ports which absolutely need to interact with the user (e.g., to have the user accept an EULA) -- if you set BATCH=YES these ports will print an error message rather than installing.
- SwellJoe 19y ago"I'd say that a more common method is to distribute a package (which can then be installed via pkg_add)." Same problems, though, if I need to distribute a dozen or so packages. No repo-based software distribution means my user either has to download and install them all individually. And, when it comes time to upgrade, they have to do it all over again. So, we've had to write our own package management stuff to deal with the frequent updates we roll out (not just FreeBSD...Solaris also has crap package management). "Add BATCH=YES into your environment, and the ports infrastructure will run without pestering you." Lovely. The squeaky wheel does indeed get the grease. I've gotta air my grievances in public more often.
- cperciva 19y agoSame problems, though, if I need to distribute a dozen or so packages. True. This is something which deserves more thought than it has been given by FreeBSD developers. The squeaky wheel does indeed get the grease. No, the squeaky wheel gets told where the grease has been sitting for several years. :-) More seriously, BATCH=YES and DISABLE_VULNERABILITIES=YES (which is needed to install ports with known security vulnerabilities if you have portaudit installed) are two options which lots of people trip over -- they should probably be better documented.