Am 13.01.22 um 10:36 schrieb Henrik Rosenke:
> Hello,
> 
> what is the correct way to handle pkg checksum mismatches in pkgbase? (pkg
> check -sa)
> For example after installing bash or editing /etc/hosts there are checksum
> mismatches:
> 
>     FreeBSD-clibs-12.2.s20220105232846: checksum mismatch for /etc/hosts
>     FreeBSD-clibs-12.2.s20220105232846: checksum mismatch for /etc/shells
> 
> I workaround this after setting up the jail by executing pkg check -r but this
> doesnt seem right to me. Also this doesnt handle modifications made 
> afterwards.
> In normal pkgs we got the ability to provide a default and modify this, for
> this files no checksums are stored from what i know.
I'm not a pkgbase user, but I'd think that this could be fixed
by using @sample to have e.g. /etc/hosts.sample with a checksum,
which is copied to /etc/hosts if that file does not exist during
installation.

This logic works great for ports, but had the disadvantage of
doubling the number of files in /etc that are installed that way,
since the .sample file will have to stay as part of the installed
pkgbase package and may occasionally be updated.

That would also allow a special version of etcupdate to detect
changed .sample files and to perform a 3-way merge on the installed
files as is possible when building from source.

Regards, STefan

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to