From nobody Fri Aug 12 20:25:15 2022 X-Original-To: freebsd-current@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 4M4FXz73qNz4Z6Tg for ; Fri, 12 Aug 2022 20:25:23 +0000 (UTC) (envelope-from andreas@naund.org) Received: from son.naund.org (son.naund.org [66.79.136.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4M4FXy32QCz3rYH for ; Fri, 12 Aug 2022 20:25:22 +0000 (UTC) (envelope-from andreas@naund.org) Received: by son.naund.org (Postfix, from userid 1000) id 2563840909ED; Fri, 12 Aug 2022 20:25:15 +0000 (UTC) Date: Fri, 12 Aug 2022 20:25:15 +0000 From: Andreas Ott To: freebsd-current@freebsd.org Subject: updating of prebuilt packages with pkg Message-ID: <20220812202515.GC1876@naund.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21-29 X-Rspamd-Queue-Id: 4M4FXy32QCz3rYH X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of andreas@naund.org designates 66.79.136.47 as permitted sender) smtp.mailfrom=andreas@naund.org X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip4:66.79.136.47]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:22211, ipnet:66.79.136.0/24, country:US]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[naund.org]; FREEFALL_USER(0.00)[andreas]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I am not sure if this issue is more for -stable or -ports, so I start here. The visible problem was that after 'pkg upgrade' certbot stopped working. I am running systems that after initial install do binary-only upgrades for both core and ports with freebsd-update(8) and pkg(8). I do not have the /usr/src/ or /usr/ports/ trees installed in order to save space. For policy reasons these use pre-built packages and I will never compile anything from source on these systems. This one is on 12.3-RELEASE . Recently I encountered that the usual cadence of pkg update pkg upgraade pkg autoremove pkg clean left me with several packages in state "?". $ pkg version |grep \? [...] py38-acme-1.22.0,1 ? py38-certbot-1.22.0,1 ? [...] ruby27-bdb-0.6.6_8 ? which tells me that these have been superseded by something else. Tracking this down on a system that does have /usr/ports installed I could find in /usr/ports/UPDATING that in my example the default version of python had been upgraded, see entry 20220626: AFFECTS: users of python [...] For users of pre-build packages: # sh # for i in $(pkg query -g %n 'py38-*'); do pkg set -yn ${i}:py39-${i#py38-}; done # pkg upgrade [...] How would a user of pre-built packages find out about the need to run the 'pkg set' command? The dependency and integrity solver in pkg did not show any notices about it. An example would be p7zip. I believe a similar issue exists if a port gets removed entirely, in which case a previously installed package shows in state "?". No notification is given by pkg about the fact that is was deprecated. Using the instructions above I was able to get back to a working certbot. In the case of ruby27 the pkg commands above handled this gracefully on its own, see /usr/ports/UPDATING entry from 20220421 "ruby: 2.7.x -> 3.0.4_2,1". Thanks, andreas -- andreas@naund.org