Josh Triplett <j...@joshtriplett.org> writes:

> 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.
>
> Users who *don't* want that behavior can remove that package, and users
> who *do* want that behavior could install it.

Isnt this basically implementing the systemd approach, where a package
would ship default configuration in /usr/lib/package (with all defaults,
which dont need to be commented out) and the user can override by
putting files in /etc/package -- either by copy-and-edit or just adding
individual changes. (I think systemd-sysctl does this, also suppporting
/run/ for temporary changes?)

I think systemd can already tell you how the locations have been merged
together (eg 'systemctl cat' does this), but perhaps what is missing is
a way to see what changed on upgrade (you'd want to save the clean
version from the _previous_ version of a package to be able to do that
after the upgrade)?

Reply via email to