From nobody Mon Jan 17 15:22:25 2022 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AD3B819680EE for ; Mon, 17 Jan 2022 15:22:29 +0000 (UTC) (envelope-from rosenke@dssgmbh.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jcwd05L1Yz4YBW; Mon, 17 Jan 2022 15:22:28 +0000 (UTC) (envelope-from rosenke@dssgmbh.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id D3E586BC620; Mon, 17 Jan 2022 16:22:27 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id Bxv0hIGEwKUj; Mon, 17 Jan 2022 16:22:26 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id A9CD36BC621; Mon, 17 Jan 2022 16:22:26 +0100 (CET) Received: from mail.incore (localhost [127.0.0.1]) by mail.local.incore (Postfix) with ESMTP id A35E714A32; Mon, 17 Jan 2022 16:22:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dssgmbh.de; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:references:content-language:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=dkim; t=1642432946; bh=n18ULT+cPOroB39wVTTzYo3p2uDTEySAddpoR0 MSC5Q=; b=XmJTngE12CUOqS/uWpqmlrpgGhKiVFNeblzIepI2Ho82581qXfoPYc U7yUYIWxIQIAEIAPS+wO1N6loaIqUwQPnof1Ba4D6BQVTlQCLGRcIvcpELMKrO4E NXegB1OWme4LdIGmh7tg184TYeTKjEB4B2cdStweNv5x4rL2Rz3YI= Received: from mail.local.incore ([127.0.0.1]) by mail.incore (mail.incore [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RRh0DQwstEd4; Mon, 17 Jan 2022 16:22:26 +0100 (CET) Received: from [192.168.0.51] (bsdrosen.incore [192.168.0.51]) by mail.local.incore (Postfix) with ESMTPSA id 58232149E1; Mon, 17 Jan 2022 16:22:26 +0100 (CET) Message-ID: <399b948e-7ff8-d905-3b17-888fe8411cbd@dssgmbh.de> Date: Mon, 17 Jan 2022 16:22:25 +0100 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: pkgbase checksums Content-Language: de-DE To: Baptiste Daroussin Cc: ports@freebsd.org, manu@freebsd.org References: <5fc8453b-1aab-bce9-59e9-1ee36161a580@FreeBSD.org> <20220113125730.zh4zmxj5d4473nmr@aniel.nours.eu> <5e0f8e42-0162-74d8-5fc7-1c2b62afd7dc@dssgmbh.de> <20220117152044.5njhh72fw7hm4tae@aniel.nours.eu> From: Rosenke In-Reply-To: <20220117152044.5njhh72fw7hm4tae@aniel.nours.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Jcwd05L1Yz4YBW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dssgmbh.de header.s=dkim header.b=XmJTngE1; dmarc=none; spf=pass (mx1.freebsd.org: domain of rosenke@dssgmbh.de designates 195.145.1.138 as permitted sender) smtp.mailfrom=rosenke@dssgmbh.de X-Spamd-Result: default: False [-3.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[dssgmbh.de:s=dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:195.145.1.138:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dssgmbh.de]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[dssgmbh.de:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[ports]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:3320, ipnet:195.145.0.0/16, country:DE]; RCVD_COUNT_SEVEN(0.00)[7]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 17.01.22 16:20, Baptiste Daroussin wrote: > On Mon, Jan 17, 2022 at 04:17:46PM +0100, Rosenke wrote: >> On 17.01.22 16:12, Rosenke wrote: >>> On 13.01.22 13:57, Baptiste Daroussin wrote: >>>> 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 >>> I tried it again with pkg 1.17.5 and FreeBSD 12.3 packages but got the >>> same Error. The @config section is included in the packages: >>> pkg info -R FreeBSD-clibs >>> config: [ >>>     "/etc/nsswitch.conf", >>>     "/etc/libmap.conf", >>>     "/etc/hosts", >>>     "/etc/protocols", >>>     "/etc/netconfig", >>>     "/etc/hosts.equiv", >>>     "/etc/rpc", >>>     "/etc/mac.conf", >>>     "/etc/shells", >>>     "/etc/networks" >>> ] >>> >>> In total these are now 9 cheksum mismatches in the pkgbase jail: >>> === root@dsssrvt4j1 (pts/2) ~ 19(3) -> pkg check -sa >>> Checking all packages:   1% >>> FreeBSD-clibs-12.2.s20220114103031: checksum mismatch for /etc/hosts >>> FreeBSD-clibs-12.2.s20220114103031: checksum mismatch for /etc/shells >>> Checking all packages:  78% >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for /.profile >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for >>> /etc/locate.rc >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for >>> /etc/login.conf >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for >>> /etc/sysctl.conf >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for >>> /etc/syslog.conf >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for /etc/ttys >>> FreeBSD-runtime-12.2.s20220114103031: checksum mismatch for >>> /root/.profile >>> Checking all packages: 100% >>> >> Whoops,  copied the wrong output: >> === root@dsssrvt4j1 (pts/1) ~ 1(3) -> pkg check -sa >> Checking all packages:   1% >> FreeBSD-clibs-12.3.s20220117084939: checksum mismatch for /etc/hosts >> FreeBSD-clibs-12.3.s20220117084939: checksum mismatch for /etc/shells >> Checking all packages:  78% >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/locate.rc >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/login.conf >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/motd >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/sysctl.conf >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/syslog.conf >> FreeBSD-runtime-12.3.s20220117084939: checksum mismatch for /etc/ttys >> Checking all packages: 100% >> > Here we are ;), the bug is on my side then :D, we pkg devs (I said we because > maybe manu will be faster than me on this) will dive in the code and fix. > > Best regards > Bapt Thank you very much. The concept of pkgbase is great, loving it on jails with zfs so far. -- Mit freundlichen Grüßen Henrik Rosenke / Operating Data-Service GmbH Beethovenstr. 2a 23617 Stockelsdorf Tel. +49 451/49001-34 Fax. +49 451/49001-26 Email:rosenke@dssgmbh.de /www.dssgmbh.de Amtsgericht Lübeck, HRB 318 BS Geschäftsführer: Wilfried Paepcke, Dr. Andreas Longwitz, Dr. Hans-Martin Rasch, Dr. Uwe Szyszka