Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 May 2022 13:48:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 263879] pkgbase removes critical etc files upon upgrade
Message-ID:  <bug-263879-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263879

            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: bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org

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] conflic=
ts
with FreeBSD-libmagic-dev-14.snap20220503053224 [installed] on
/usr/libdata/pkgconfig/libmagic.pc
  - FreeBSD-libmagic-dev-lib32-14.snap20220509053256 [FreeBSD-base] conflic=
ts
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...=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
[1/389] Deleting files for FreeBSD-runtime-14.snap20220503053224: 100%=20=
=20=20=20=20=20=20=20=20=20
[2/389] Deinstalling FreeBSD-runtime-dev-14.snap20220503053224...=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
[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=3D7ac164dc8e2ec3e6d3cda1d9ca13d461a=
534a6e8
.  In particular, pkg sees that hyperv.conf moved out of FreeBSD-runtime, s=
o to
both upgrade FreeBSD-runtime and FreeBSD-hyperv-tools, pkg deleted the form=
er
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-runti=
me.

More generally, pkg/pkgbase really need some mechanism to avoid deleting
critical files.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-263879-227>