pkg(8) deinstall and then reinstall of FreeBSD-runtime leads to wiping out `/etc/master.passwd` and `/etc/group`
See the e-mail thread starting here: https://lists.freebsd.org/pipermail/freebsd-pkgbase/2020-June/000526.html
Routine upgrade of my CURRENT+pkgbase VM resulted in /etc/master.passwd and /etc/group being replaced by the default versions from the source tree. This appears to be related to the addition of the new test user and group, where we'd expect to see a 3-way merge with the existing files.
The suggestion in the mailing list is that this is due to pkg(8) doing a deinstall+reinstall of the FreeBSD-runtime package, which is what happened according to my syslog:
Jun 7 09:02:40 codling pkg[92260]: FreeBSD-utilities-13.0.s20200530093747 deinstalled
Jun 7 09:02:40 codling pkg[92260]: FreeBSD-runtime-13.0.s20200530093747 deinstalled
Jun 7 09:02:40 codling pkg[92260]: FreeBSD-runtime-development-13.0.s20200530093747 deinstalled
Jun 7 09:02:42 codling pkg[92260]: FreeBSD-clibs upgraded: 13.0.s20200530093747 -> 13.0.s20200607031954
Jun 7 09:02:42 codling pkg[92260]: FreeBSD-ftp-13.0.s20200530093747 deinstalled
Jun 7 09:02:42 codling pkg[92260]: FreeBSD-telnet-13.0.s20200530093747 deinstalled
Jun 7 09:02:47 codling pkg[92260]: FreeBSD-runtime-13.0.s20200607031954 installed
Jun 7 09:02:47 codling pkg[92260]: FreeBSD-wpa upgraded: 13.0.s20200530093747 -> 13.0.s20200607031954
Jun 7 09:02:47 codling pkg[92260]: FreeBSD-vi upgraded: 13.0.s20200530093747 -> 13.0.s20200607031954
Jun 7 09:02:59 codling pkg[92260]: FreeBSD-utilities-13.0.s20200607031954 installed
Jun 7 09:02:59 codling pkg[92260]: FreeBSD-unbound upgraded: 13.0.s20200530093747 -> 13.0.s20200607031954
Jun 7 09:03:11 codling pkg[92260]: FreeBSD-tests upgraded: 13.0.s20200530093747 -> 13.0.s20200607031954
[...]
From https://lists.freebsd.org/archives/freebsd-pkgbase/2024-March/000332.html:
this is not an issue, this is expected.
Was base/FreeBSD-runtime vital when this issue was opened?
It is now:
% pkg query -e '%o = base && %V = 1' '%o/%n'
base/FreeBSD-clibs
base/FreeBSD-runtime
% uname -mvKU
FreeBSD 15.0-CURRENT main-n271227-db3a524c8a96 GENERIC-NODEBUG amd64 1500020 1500020
%
It maybe expect, but that wouldn't make it any less of issue if you lost the user database (unless it's unmodified from the one in the package).
in any case this is not a pkg bug, if any this is a pkgbase bug therefore not handled in this repository.