From nobody Tue May 30 09:22:49 2023 X-Original-To: questions@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 4QVn4F2l77z4Y9KY for ; Tue, 30 May 2023 09:22:53 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from wilbur.contactoffice.com (wilbur.contactoffice.com [212.3.242.68]) (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 4QVn4D2xsxz3rPM for ; Tue, 30 May 2023 09:22:52 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Authentication-Results: mx1.freebsd.org; dkim=fail ("body hash did not verify") header.d=mailfence.com header.s=20210208-e7xh header.b=sSY5c4I9; spf=pass (mx1.freebsd.org: domain of sysadmin.lists@mailfence.com designates 212.3.242.68 as permitted sender) smtp.mailfrom=sysadmin.lists@mailfence.com; dmarc=pass (policy=quarantine) header.from=mailfence.com Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id 3042410A8 for ; Tue, 30 May 2023 11:22:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1685438571; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:To:Subject:From; l=2000; bh=IvC6G4W7nOBkS39kv5b0pqpqSvffX9ogi1//vZ6Tl/I=; b=sSY5c4I9oB51mBieBX176pwej60AnVPVI4t2bTrYgsz7yQhosVDSXja+F5lOMkgV OQipBncrJqWfoq+dsn/Vfvo9/L4wA0m4AYV20ACYmVy2n71sXdThmC5thyP6qZcZjWa YvolY9XBPoBFH/24n2+52gRChOsCUsg4xu4/+ytqFJjo/SpqWrn2EJ6uxyJO0kdqtSc 4D8o9vc8+ZJP4KQMj4cgUEfwbHnoHScT8l5/BonY6uuutX3PvieV+BNcQIEooYoOCMl yvTyLyV5WJJZNDuDJqv3ZJsL0AulHQNKRjvidaSYWyCvuDsThBTIa6Fa7fpKk22nGP/ 7rYQKGLfsA== Date: Tue, 30 May 2023 11:22:49 +0200 (CEST) Message-ID: <1653882830.656908.1685438569298@ichabod.co-bxl> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit To: questions@freebsd.org Subject: pkg-ugprade checksums From: Sysadmin Lists X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Spamd-Result: default: False [-3.81 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.972]; NEURAL_HAM_LONG(-0.95)[-0.951]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26:c]; RCVD_IN_DNSWL_LOW(-0.10)[212.3.242.68:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; DMARC_POLICY_ALLOW(0.00)[mailfence.com,quarantine]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_REJECT(0.00)[mailfence.com:s=20210208-e7xh]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[mailfence.com:-]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4QVn4D2xsxz3rPM X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N How does pkg-upgrade check checksums? From man 8 pkg-upgrade: Packages are fetched from the repositories into the local package cache if they are not already present, or if the checksum of the cached package file differs from the one in the repository. But, the packagesite.yaml of my Poudriere repo has: "name":"vim-x11" "version":"9.0.1366" "sum":"ae560492c77e7629a4c7b8162b256acbd39e4656c55516afcb8729121afc94dd" And the locally cached package has: # sha256 -r /var/cache/pkg/vim-x11* 3bbe31951bc5fd6b08c412fcb0c6f8b494cdb15eafdd4bbacdf1657fe567af43 /var/cache/pkg/vim-x11-9.0.1366.pkg Yet it doesn't get upgraded: # pkg update -fr Poudriere-quarterly Updating Poudriere-quarterly repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.pkg: 100% 153 KiB 157.1kB/s 00:01 Processing entries: 100% Poudriere-quarterly repository update completed. 568 packages processed. All repositories are up to date. # pkg upgrade -r Poudriere-quarterly vim-x11 Updating Poudriere-quarterly repository catalogue... Poudriere-quarterly repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) Your packages are up to date. # truss -fs 256 pkg update -fr Poudriere-quarterly Shows packagesite.yaml.pkg downloaded to /tmp/, presumably runs its checks, then deletes it. If I force re-installation, it downloads the new package and installs it. # pkg install -fr Poudriere-quarterly vim-x11 So, why is pkg-upgrade's checksums check failing? And why isn't there a persistent packagesite.pkg on the client for pkg-update to compare to (to see if it needs updating) as implied by: Package repository catalogues will be automatically updated whenever pkg upgrade is run by a user ID with write access to the package database I looked at pkghash.h and upgrade.c but don't see where the hash check is failing. -- Sent with https://mailfence.com Secure and private email