Hi Josh, On Thu, Dec 19, 2024 at 07:05:56PM -0800, Josh Triplett wrote: > Suppose that packages ship sample configuration files *that exactly > match their defaults* (which should in general mean that everything is > commented out) in some standardized path under /usr/share/doc/$package/ > (e.g. examples/etc), that makes it easy to see what path the example > corresponds to in /etc. > > Then, we could have a package (e.g. "etc-commented-defaults") with an > on-installation trigger for that location, which automatically copies > over the defaults to /etc if they don't already exist, updates them if > they match the defaults, and (ideally) has a ucf-style mechanism for the > case where they've been changed. That package could also provide scripts > for easily seeing the diffs between your configuration and all the > defaults.
I've had the same idea floating around my head for a while now too, thanks for writing it down <3 While codifying the default config path (/usr/share/doc/examples/etc in your example) in the long run would be nice and clean in many cases individual maintainers would need to be convinced to follow that convention, however the etc-commented-defaults package could also just special case the locations where needed. I like that aspect of the idea. As an example I'm familiar with iproute2 moved it's default config from /etc/iproute2 to /usr/share/iproute2 in trixie, that is it actually *loads* the config from there, it's not just example files so in that case upstream patching or symlink trickery would be required to make the package conformant to this convention. I've tried arguing this is a blatant disregard of policy but that fell on deaf ears so far. I wonder how many other packages do this now that this idea of empty-/etc is fashionable, I've no idea how we might find them though. --Daniel
signature.asc
Description: PGP signature