https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263879
Bug ID: 263879
Summary: pkgbase removes critical etc files upon upgrade
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Upgrading a pkgbase system, I lost /etc/group and /etc/master.passwd, among
other files, because pkg split the FreeBSD-runtime upgrade job:
- FreeBSD-runtime-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-runtime-dev-14.snap20220503053224 [installed] on
/usr/libdata/pkgconfig/zlib.pc
- FreeBSD-runtime-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-runtime-dev-14.snap20220509053256 [FreeBSD-base] on
/usr/libdata/pkgconfig/zlib.pc
- FreeBSD-libmagic-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-libmagic-dev-14.snap20220503053224 [installed] on
/usr/libdata/pkgconfig/libmagic.pc
- FreeBSD-libmagic-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-libmagic-dev-14.snap20220509053256 [FreeBSD-base] on
/usr/libdata/pkgconfig/libmagic.pc
- FreeBSD-liblzma-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-liblzma-dev-14.snap20220503053224 [installed] on
/usr/libdata/pkgconfig/liblzma.pc
- FreeBSD-liblzma-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflicts
with FreeBSD-liblzma-dev-14.snap20220509053256 [FreeBSD-base] on
/usr/libdata/pkgconfig/liblzma.pc
- FreeBSD-hyperv-tools-14.snap20220509053256 [FreeBSD-base] conflicts with
FreeBSD-runtime-14.snap20220503053224 [installed] on /etc/devd/hyperv.conf
...
[1/389] Deinstalling FreeBSD-runtime-14.snap20220503053224...
[1/389] Deleting files for FreeBSD-runtime-14.snap20220503053224: 100%
[2/389] Deinstalling FreeBSD-runtime-dev-14.snap20220503053224...
[2/389] Deleting files for FreeBSD-runtime-dev-14.snap20220503053224: 100%
[3/389] Deinstalling FreeBSD-libmagic-dev-14.snap20220503053224...
[3/389] Deleting files for FreeBSD-libmagic-dev-14.snap20220503053224: 100%
[4/389] Deinstalling FreeBSD-liblzma-dev-14.snap20220503053224...
[4/389] Deleting files for FreeBSD-liblzma-dev-14.snap20220503053224: 100%
[4/389] Installing FreeBSD-runtime-14.snap20220509053256...
[4/389] Extracting FreeBSD-runtime-14.snap20220509053256: 0%
pkg: getgrnam_r(wheel): No such file or directory
...
So this seems to be a consequence of
https://cgit.freebsd.org/src/commit/?id=7ac164dc8e2ec3e6d3cda1d9ca13d461a534a6e8
. In particular, pkg sees that hyperv.conf moved out of FreeBSD-runtime, so to
both upgrade FreeBSD-runtime and FreeBSD-hyperv-tools, pkg deleted the former
and reinstalled it, so all the etc files that it manages get reset to their
defaults. A workaround is to delete FreeBSD-hyperv-tools before upgrading.
In this case, it looks simply like a deficiency of the solver. Moving
hyperv.conf just means that pkg must upgrade FreeBSD-runtime before
FreeBSD-hyperv-tools; it does not need to delete then install FreeBSD-runtime.
More generally, pkg/pkgbase really need some mechanism to avoid deleting
critical files.
--
You are receiving this mail because:
You are the assignee for the bug.