On Sun, Apr 04, 2021 at 06:45:09PM -0700, se wrote:
* What led up to the situation?
- running "apt upgrade"
* What exactly did you do (or not do) that was effective (or
ineffective)?
- had to restore all 3 confuration files from backup:
/etc/default/dnss
/lib/systemd/system/dnss.socket
/lib/systemd/system/dnss.service
* What was the outcome of this action?
- restoring from backup and re-enabling and re-starting dnss restored function
* What outcome did you expect instead?
- asking about modified configuratiuon files before overwriting them.
- not breaking DNS resolution.
Hi, thanks for reporting this, and sorry you run into this!
The dnss package uses the standard Debian way of packaging configuration
files, so the behaviour should match what you see in other packages.
- /etc/default/dnss appears in conffiles, which is what tells apt that
it is a configuration file that *shouldn't* be overwritten if the user
has made changes, and you should get asked what to do (see [1] and
[2]).
- The /lib/systemd/ files do not appear in conffiles and *will* get
overwritten. I think that's expected, since for overriding systemd
configuration the expectation is that you do it in /etc/systemd/ (see
[3]). I'm not saying I love it, but it's how systemd configuration
file layout is designed to work.
I'm sorry that you had to restore these from backups, but this will
happen with _any_ package, it was probably just bad luck that you saw
it with dnss.
So, /lib/systemd/ files being silently overwritten is working as
intended (as unfortunate as that is), but /etc/default/dnss should not
be automatically overwritten under normal conditions.
Was this an unattended upgrade? If so, do you have a log of the upgrade?
Like /var/log/unattended-upgrades/unattended-upgrades.log and
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log.
Do you have any special apt configuration that might be behind this? An
"apt-config dump" should show the full apt configuration, it might be
useful to include it as well.
Thanks again,
Alberto
[1]: https://www.debian.org/doc/debian-policy/ch-files.html#behavior
[2]: https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html
[3]: https://wiki.debian.org/systemd#Creating_or_altering_services