Martin Husemann <[email protected]> writes: > On Wed, Sep 30, 2026 at 06:47:11PM +0200, Edgar Fuß wrote: >> > The idea is to minimize the /etc content, but have it all working out >> > of the box. Where possible things that can be enabled by simply setting >> > thing=yes in /etc/rc.conf should then just run. For rtadvd that is >> > not possible, it requires more detailed configuration. >> So, why is postfix/{main,master}.cf in both /etc and /usr/share/examples? > > Minimal working-out-of-the-box version in /etc, original (as distributed > by upstream) version in /usr/share/examples (I guess).
Nope -- they are identical. I use INSTALL-NetBSD from pkgsrc/sysutils/etcmanage for upgrading, and that unpacked the etc sets to /usr/netbsd-etc for use with etcmanage to merge them to the installed /etc. As a side effect I find them useful for reference to be able to diff from set contents to installed -- I've always believed in understanding and minimizing (on unintended changes) the differences between distribution contents and my contents. There's a larger config file doctrine issue that is surely related to some of these choices. I believe that operational config files should be small, and should not contain commented-out sections that restate defaults, ready for people to uncomment a line and change it. I believe that example config files should be like this, showing every setting and explaining it. Further, programs should have reasonable defaults, so an empty config file should do something sensible, even if too minimal for most. And if empty isn't feasible, then it should only take a line or two to set things that can't default. For example, a server should probably default to listening on localhost only, if there isn't an explicit listen. Thus, diffing example to operational is not a reasonable thing to do. Many programs seem to want to install tens of kilobytes of example configs in such a way that users then edit them and carry that around, needing to merge changes in upstream examples to keep diffs low. With very small config files, it makes sense to have the larger true examples in /usr/share/examples.
