Date: Thu, 13 Jan 2022 13:57:30 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Stefan Esser <se@FreeBSD.org> Cc: Henrik Rosenke <rosenke@dssgmbh.de>, FreeBSD <freebsd-ports@freebsd.org> Subject: Re: pkgbase checksums Message-ID: <20220113125730.zh4zmxj5d4473nmr@aniel.nours.eu> In-Reply-To: <5fc8453b-1aab-bce9-59e9-1ee36161a580@FreeBSD.org> References: <a0cc9488-ec23-3ae7-7e0c-f31d0b8e666f@dssgmbh.de> <5fc8453b-1aab-bce9-59e9-1ee36161a580@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 13, 2022 at 11:33:55AM +0100, Stefan Esser wrote: > 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 We have @config for base were pkg will do a 3 way merge, just those files are probably not marked as @config and should. (@config is native while @sample is external and define only in the ports tree) if they are marked as such, then it means we have a bug in pkg checksum as it should not check the checksum of the files marked @config Best regards, Bapt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220113125730.zh4zmxj5d4473nmr>