Date: Wed, 22 Apr 2026 10:01:20 -0700 From: Mark Millard <marklmi@yahoo.com> To: Anton Shterenlikht <lists@cmplx.uk> Cc: stable@freebsd.org, pkgbase@freebsd.org Subject: Re: [HEADS UP] stable/15: new base packages for PAM, zstd Message-ID: <4d128a79-a9c0-4d03-8b5f-02255267511d@yahoo.com> In-Reply-To: <aejfPFFoJtahvEbn@cmplx.uk> References: <adTq6tMP4GWQS35e@amaryllis.le-fay.org> <aeedOZ7VcQAOsQCV@cmplx.uk> <3847a70c-f2d8-4c4a-a5f0-56a4a90168b0@yahoo.com> <aeh6ddAuDClL4YFn@cmplx.uk> <583fb3e0-0a81-4ad5-9d1a-34bf3f82a14f@yahoo.com> <aejfPFFoJtahvEbn@cmplx.uk>
index | next in thread | previous in thread | raw e-mail
On 4/22/26 07:46, Anton Shterenlikht wrote: > On Wed, Apr 22, 2026 at 05:47:09AM -0700, Mark Millard wrote: >> On 4/22/26 00:36, Anton Shterenlikht wrote: >>> On Tue, Apr 21, 2026 at 12:52:43PM -0700, Mark Millard wrote: >>>>> >>>>> I recently upgraded Lenovo T480 laptop from some 14.x relase to 15.0-RELEASE-p4. >>>>> I'm still figuring out the use of pkg for base upgrades. >>>>> >>>>> For a few weeks all was working more or less well (some unexpected >>>>> reboots, but I had no time to dig into that). >>>>> >>>>> After reading your mail, I typed the pkg query command you suggested, >>>>> which returned nothing. >>>>> I then did "pkg install FreeBSD-set-minimal". >>>>> When that completed, I realised that my user is gone.... >>>>> >>>>> Looking at /etc/passwd and /etc/master.passwd I see that indeed >>>>> my user is not there anymore. >>>> >>>> Did you end up with the likes of: >>>> >>>> /etc/passwd.pkgsave >>>> /etc/master.passwd.pkgsave >>> >>> Yes, I have /etc/master.passwd.pkgsave >>> >>> So what happened? >> >> After pkgbase updates, one should always scan for *.pkgsave and *.pkgnew >> files (say via find) and then deal with possibly >> merging/updating/restoring the content --or possibly just deleting the >> *.pkgsave/*.pkgnew file, as appropriate based on the content. >> >>> Is it expected that "pkg install FreeBSD-set-minimal" >>> should erase all ordinary users from /etc/master.passwd >>> and save the original file as /etc/master.passwd.pkgsave? >>> >>> Was I wrong to do "pkg install FreeBSD-set-minimal" on 15.0-RELEASE-p4? >>> >>> Shall I just copy the /etc/master.passwd.pkgsave back to /etc/master.passwd? >> >> >> Do not forget to do something like: >> >> # pwd_mkdb -p /etc/master.passwd.pkgsave >> >> That would regenerate /etc/spwd.db (secure database) , /etc/pwd.db >> (insecure database), and /etc/master.passwd --and the -p means it would >> also regenerate a matching /etc/passwd as well. >> >> Once you know the password related files are okay, you may want to >> delete /etc/master.passwd.pkgsave . >> >> >> You should also check if this pkgbase update or prior ones left any >> other *.pkgsave or *.pkgnew files for you do deal with for finishing the >> file updates involved. pkgbase does not deal with picking how some >> configuration file updates should be done. > > Mark, thank you. > > I missed that this is documented in: > https://wiki.freebsd.org/action/show/pkgbase?action=show&redirect=PkgBase#A.pkgsave_files It is too bad that the pkg upgrade and the pkg install man pages do not document the .pkgsave and .pkgnew behavior and how to handle handle them. The wiki is not part of what installs on the local FreeBSD system as documentation. Far more files than the wiki materials list can be affected, including scripts and such. I've also had examples of configuration files: /etc/group.pkgsave /etc/group /etc/hosts.pkgsave /etc/hosts /etc/sysctl.conf.pkgsave /etc/sysctl.conf /etc/shells.pkgsave /etc/shells /etc/ssh/sshd_config.pkgsave /etc/ssh/sshd_config So, after adjustment, also needing: service sshd restart /.profile.pkgsave /.profile /.shrc.pkgsave /.shrc /root/.profile.pkgsave /root/.profile /root/.shrc.pkgsave /root/.shrc /usr/home/root/.profile.pkgsave /usr/home/root/.profile /usr/home/root/.shrc.pkgsave /usr/home/root/.shrc /etc/rc.subr.pkgsave /etc/rc.subr /etc/rc.pkgsave /etc/rc /etc/defaults/rc.conf.pkgsave /etc/defaults/rc.conf /etc/kyua/kyua.conf.pkgsave /etc/kyua/kyua.conf /etc/periodic/daily/223.backup-zfs.pkgsave /etc/periodic/daily/223.backup-zfs /etc/mail/*.pkgsave /etc/mtree/*.pkgsave Most of those I've not had an example of in a long time. Even normal system programs/libraries can get such *.pkg* files. For example, if one has patched a program or library locally and then a later update has to deal with the patched file. The patched file can be saved (.pkgsave) or the new file can be separately saved (.pkgnew). Checking for such files via find or the like is a good idea. Similar points apply to any chroot worlds and/or jail worlds that happen to be pkgbase based. > > Anton > > > -- === Mark Millard marklmi at yahoo.comhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d128a79-a9c0-4d03-8b5f-02255267511d>
