17 ms·
FreeBSD from a NetBSD developer’s perspective
- livueta 5y ago> FreeBSD Ports sometimes shows me a text menu for configuring package options, while pkgsrc just uses text configuration and tries to make it so you don’t need to reconfigure packages. I’m the kind of person who prefers text configuration, but I can see how others wouldn’t. Posting because it took me way too long to run into this on my own: make config-recursive lets you get all the ncurses per-port menus out of the way at once. Not a full fix, but it does take a rough edge off of the default port config/building experience. e: Real lovers of text config could also use Poudriere to build their own packages since it takes per-port config options files. I think you can do something similar with portmaster as well. ee: now I think about it, the choices from the ncurses menus just get stored in /var/db/ports, so you could probably edit it directly as text if you felt like it.
- throw0101a 5y agoSee ports(7) which mentions "config-recursive" and other targets that may be useful: * https://www.freebsd.org/cgi/man.cgi?ports(7) https://www.freebsd.org/cgi/man.cgi?ports(7)
- asveikau 5y agoYou can also set port options in /etc/make.conf. I find this easier than the /var/db/ports solution because you can see all the configuration in a single file, rather than file-per-port.
- paulmd 5y agousing portmaster does the same thing, runs all the configs up front. portmaster is a big quality-of-life improvement, that's almost always one of the first things that I build on a clean install
- takeda 5y agoFreeBSD started with options and you could edit /etc/make.conf You could also make them available for specific packages, for example: .if ${.CURDIR:N*/ports/www/apache2*} == "" SUEXEC_DOCROOT=/usr/local/www SUEXEC_USERDIR=public_html .endif Then they implemented the ncurses approach which made it more user friendly. You can still change some defaults for example I have this: OPTIONS_UNSET+=X11 OPTIONS_UNSET+=DOCS OPTIONS_UNSET+=EXAMPLES OPTIONS_UNSET+=CUPS OPTIONS_UNSET+=OPENGL Here's more how to use them: https://github.com/freebsd/freebsd-ports/blob/main/Mk/bsd.options.mk https://github.com/freebsd/freebsd-ports/blob/main/Mk/bsd.op... The options are also stored in the config as you mentioned and if a new option is added the old one's state is preserved. Overall this reminds me early days with smartphones and iPhone users making excuses why not having copy&paste was better.
- cosmotic 5y agoUsers perspective? This specific user is a developer; I'd say this subject is quite misleading.
- dang 5y agoOk, we've promoted the user in the title above.
- yjftsjthsd-h 5y ago> On the other hand, QEMU is this huge piece of software with documentation scattered all over the web and no man pages. On every Linux distro I can recall it has manpages, and glancing at the AUTHOR section on Ubuntu implies that it's upstream and not a local distro-added thing. Anyone know what's going on there?
- yjftsjthsd-h 5y agoAnswer per https://news.ycombinator.com/item?id=27416077 https://news.ycombinator.com/item?id=27416077 upthread: yes, FreeBSD has qemu manpages, might just be that the OP couldn't find them under the expected name.
- motiejus 5y ago> On the other hand, QEMU is this huge piece of software with documentation scattered all over the web and no man pages. My frequent resource: https://manpages.debian.org/jessie/qemu-system-x86/qemu-system-x86_64.1.en.html https://manpages.debian.org/jessie/qemu-system-x86/qemu-syst... Not available for BSDs? Maybe that's a mishap by the distro?
- toast0 5y agoI've got several man pages for qemu (FreeBSD 13.0, qemu-5.0.1) $ apropos qemu qemu(1) - QEMU User Documentation qemu-img(1) - QEMU disk image utility vdeq, vdekvm, vdeqemu(1) - Virtual Distributed Ethernet wrapper for QEMU/KVM virtual machines qemu-block-drivers(7) - QEMU block drivers reference qemu-cpu-models(7) - QEMU CPU Models qemu-ga-ref(7) - QEMU Guest Agent Protocol Reference qemu-qmp-ref(7) - QEMU QMP Reference Manual qemu-ga(8) - QEMU Guest Agent qemu-nbd(8) - QEMU Disk Network Block Device Server OTOH, there's no manpage for qemu-system-X, so maybe that's the confusion. Also, >the pw man page is much scarier than NetBSD’s useradd. FreeBSD has an adduser(8), which is a bit more friendly than pw.
- dylan604 5y ago>which is a bit more friendly than pw. pw is one of those that i wish had a --dryrun type option enabled by default and required a --doit switch. this was brought up a few days ago, and i really like the idea of scary commands using the dry run as a default.
- enedil 5y agoI think what they mean is that the manpage you link is just synopsis of command line options and not anything that help understand what happens with QEMU and how to fix it when something goes wrong.
- liveoneggs 5y agojmmv and jmcneill (probably more) work on both NetBSD and FreeBSD
- andix 5y agoI never understood why you would use BSD instead of Linux. It it just a preference, or is there really a benefit?
- selfhoster11 5y agoPreventing software monoculture, for one. The same argument could have been made about using Linux instead of Windows not that long ago.
- nix23 5y agoThe terrible 1995-2000, where Dec and Solaris boxes where thrown away and shiny windows servers run everywhere, not one day without a hard reset.
- Koshkin 5y agoTo be fair, when faced with a need to make a practical decision on whether to use a Linux or a BSD preventing software monoculture is the last thing on my mind. (In fact, my decision would often be influenced by wanting to keep the infrastructure as uniform as possible.)
- nix23 5y agoYes it's a massive benefit (for me), but i don't tell you which one, because would you believe me that linux is better for server and development then windows without testing it out for yourself?
- pjmlp 5y agoBSDs actually descends from UNIX and had it not been for the AT&T litigation, most likely Linux kernel wouldn't have had the uptake it had. Additionally we don't need UNIX monoculture.
- ggm 5y agoI don't entirely agree. The SYSV vs BSD thing was constant before either (Free,Net,Open)BSD and Linux came into a rivalry. I was there, using both across the timescale (I'd been doing sysadmin and development work on V7, Unix 32V, BSD4.1->4.2 (thats sockets) and then Ultrix/Solaris &c) SYSV had streams/STREAMS when BSD had sockets. Arguably streams is a superior model. NFS came to the fore in BSD. SYSV had RFS. It was a different model of network filestore. MGR -> v8 ->Plan9 was there too. There has always been room for more than one viewpoint of what a UNIX conforming system is. The rise of Linux has a lot to do with licence terms (for some reason the BSD 4 clause hold harmless appealed more to the embedded market) and the natural tendency of some driver vendors to write for Linux. Google deciding to deploy linux at scale inside the borg, and as Android was recognition of reality. Van Jacobsen, who did a lot of work on TCP tuning and congestion control in the BSD kernel, wound up in Google, and stopped developing for BSD. So, BBR (for instance) came to BSD late and only because Netflix sponsored it. A bunch of the GPU driving space, WiFi card blobs, they're in Linux kernel before BSD. Docker hasn't been ported to BSD notwithstanding the possibly superior models in Jails and Bhyve, the supremacy of Dockerfile has to be understood as "mindshare" TL;DR BSD lost a lot of "mindshare" but there was always room for a BSD-vs-SYSV-vs-Plan9 thinking, from before-times.
- linguae 5y agoI wonder how close NetBSD’s design is to 4.4BSD, the last version of BSD from UC Berkeley’s CSRG? My understanding is that FreeBSD has a lot of features that are exclusive to it, such as jails and Capsicum, and FreeBSD also has some Solaris-derived components such as ZFS and Dtrace. I’m under the impression that NetBSD’s specialty is in providing a BSD that is easily portable to a wide range of architectures. Because BSD is not just a kernel, but an entire operating system, NetBSD’s portability makes it attractive when choosing a Unix for “exotic“ hardware.
- Koshkin 5y ago> Because BSD is not just a kernel, but an entire operating system To my chagrin, I’ve never understood this. (A Linux distribution is not just a kernel, either.)
- nieve 5y agoIt just means that the BSDs have both their kernel and their full userland maintained by the same team whereas Linux to a certain extent splits responsibilities between the kernel devs and a bunch of other projects.
- enriquto 5y agothe bsd kernel is made by the same team as the rest of the system, and follows the same release schedule. Thus they can add a new syscall (e.g., pledge in openbd), and update all the programs at once to use it. That wouldn't really be possible in a linux distribution.
- LAC-Tech 5y agoI played around with freeBSD for a couple of days recently. I quite liked it until it came time to updating the system (I delibearely installed 12 to test this). Missing .so libraries everywhere. I suppose if I was more of a unix pro I would have figured out the problem, but trivial updates are a big deal for me.
- Lammy 5y agoDid you update from 12.x to 13.0? FreeBSD maintains ABI compatibility across minor versions, and major version updates are usually like `freebsd-update -r '<major>.<minor>-RELEASE' upgrade`, `freebsd-update install`, reboot, `pkg upgrade`, reboot, `freebsd-update install`. That second `freebsd-update install` removes the shared libraries from the old version and will result in old binaries breaking like you described. The `pkg upgrade` step implies an ABI change as well, replacing your installed packages with the same packages built for the new major version. It's even possible to keep old binaries working by installing the appropriate `compat` package, e.g. compat12x if you have FreeBSD 12 binaries you want to run on FreeBSD 13: https://www.freshports.org/misc/compat12x/ https://www.freshports.org/misc/compat12x/
- LAC-Tech 5y agoYes. 12.0 -> 12.2 was smooth (my cloud provider had 12.0 from a dropdown menu). I see from your post I was supposed to reboot twice to upgrade major versions. I'm sure it was in one of the docs I was reading and I lazily skim passed it. So it's on me.
- Lammy 5y agoDon't feel bad. I've used FreeBSD for a long time but still find it kinda confusing when the "same" command has different effects depending on system state. Heck even I got it wrong since I forgot it's actually three steps — install the new kernel and reboot into it, install the new userland and reboot into that, reinstall packages, and then remove the old userland: https://www.freebsd.org/releases/13.0R/installation/#upgrade https://www.freebsd.org/releases/13.0R/installation/#upgrade On the plus side it's super-easy to recover since even if your `pkg` is broken there's a `pkg-static`: https://www.freebsd.org/cgi/man.cgi?query=pkg-static&sektion=8&n=1 https://www.freebsd.org/cgi/man.cgi?query=pkg-static&sektion... A `pkg-static bootstrap -f && pkg upgrade -f` would probably sort that system out if you ever end up in that state again :)
- ulzeraj 5y ago> I use Multicast DNS on my home network - mostly this is just for convenience, and so I don’t have to remember lots of different IP addresses. > NetBSD includes multicast DNS support by default through a port of macOS’s mDNSResponder called mdnsd. It seems it’s available for FreeBSD but not a core part of the OS. I’m also under the impression that it’s more common to use Avahi (the Linux community’s answer to mDNSResponder) on FreeBSD, but I don’t know for certain. I use Avahi on a vnet Jail. I basically put every host on /usr/local/etc/avahi/hosts and this is enough for name resolution even if the system or device has no mDNS broadcasting capabilities.
- ggm 5y agoGreat write up. I would have wanted to say much the same, when I cut from NetBSD to FreeBSD back when the IBM X30 laptop was my daily drive. I ran pkg on OSX for a while, and would still do if homebrew hadn't solved other problems for me. the /opt vs /usr/local thing is quite interesting, on systems which think "they" own /usr/local Doing things in kernel vs doing things in userspace is a subject worthy of more discussion. We now have TCP in userspace models, browsers which have internalised a huge amount of the network dependency stack and QUIC, which I do not believe is kernel supported normally.
- nikisweeting 5y agoTIL you could run pkg on OSX, when did that stop working, Tiger / Leopard?
- ggm 5y agoI last tried around Leopard, but I am unsure it stopped working. https://pkgsrc.joyent.com/install-on-osx/ https://pkgsrc.joyent.com/install-on-osx/ suggests it hasn't.