From nobody Thu Sep 29 19:52:01 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 4MdkXX1gJkz4V5p5 for ; Thu, 29 Sep 2022 19:52:12 +0000 (UTC) (envelope-from freebsd@gushi.org) Received: from prime.gushi.org (prime.gushi.org [IPv6:2620:137:6000:10::142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "prime.gushi.org", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MdkXW2PCxz3Br3 for ; Thu, 29 Sep 2022 19:52:11 +0000 (UTC) (envelope-from freebsd@gushi.org) Received: from smtpclient.apple ([IPv6:2601:602:87f:b05d:556d:a852:98aa:bea1]) (authenticated bits=0) by prime.gushi.org (8.16.1/8.16.1) with ESMTPSA id 28TJq6Ki007381 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 29 Sep 2022 12:52:07 -0700 (PDT) (envelope-from freebsd@gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org 28TJq6Ki007381 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1664481128; bh=jGKNMbH3G6cpjJvoTqi3nvsSwJZNxTP4ddVyrK7chTw=; h=Subject:From:In-Reply-To:Date:Cc:References:To; z=Subject:=20Re:=20Python=20version=20dependencies=20in=20pkg|From: =20Dan=20Mahoney=20|In-Reply-To:=20<20220929083 939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net>|Date:=20T hu,=2029=20Sep=202022=2012:52:01=20-0700|Cc:=20ports@freebsd.org|R eferences:=20<8B490359-27A3-410C-AE98-C1362D4FA9F0@gushi.org>=0D=0 A=20=0D=0A=20=0D =0A=20=0D=0A=20<89D2B2D7-FA3D-46F5-A93B-4846950A157C@gushi.org>= 0D=0A=20<65597c37-813b-d0ed-ea9f-8591b68cf097@gwdg.de>=0D=0A=20<20 220929083939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net>| To:=20Alexander=20Leidinger=20; b=fEoIrM4tlvXwtDCqipjAj7nPnIPfAj5oG+OK4fQw0UxDyM033gkGQdpp3dP/uRXyz UZNSLK6vld9f5IRJLUyBoV34GIaQ5kwIp7xMCEabPc2WXWuMDEFHLo4DIzEWhKDRVW 3wkLC8/z6f9tgpWfqDpVrLgZZZ3rnjPObBJX1w/A5gtbQ2FZM1GP8GLN+dWxZJeiSt 1HUTu38RsjAqwH5CHe64n+QNA715X05biDg0QDfvqDi3ce54GS1GpYOX8X5hM+HVGe +vMFc6Kh7XjhmmwjCptpvqSdUh77GyLa9bM+aL1FZ/VLgwZusAkB8VbCMrKX4zWP7a pvbg/KpZrcEdA== X-Authentication-Warning: prime.gushi.org: Host [IPv6:2601:602:87f:b05d:556d:a852:98aa:bea1] claimed to be smtpclient.apple Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Python version dependencies in pkg From: Dan Mahoney In-Reply-To: <20220929083939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net> Date: Thu, 29 Sep 2022 12:52:01 -0700 Cc: ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8B490359-27A3-410C-AE98-C1362D4FA9F0@gushi.org> <89D2B2D7-FA3D-46F5-A93B-4846950A157C@gushi.org> <65597c37-813b-d0ed-ea9f-8591b68cf097@gwdg.de> <20220929083939.Horde.Viq2uLBgUctcrsgmaJxN_1u@webmail.leidinger.net> To: Alexander Leidinger X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MdkXW2PCxz3Br3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gushi.org header.s=prime2014 header.b=fEoIrM4t; dmarc=pass (policy=none) header.from=gushi.org; spf=pass (mx1.freebsd.org: domain of freebsd@gushi.org designates 2620:137:6000:10::142 as permitted sender) smtp.mailfrom=freebsd@gushi.org X-Spamd-Result: default: False [-6.20 / 15.00]; DWL_DNSWL_MED(-2.00)[gushi.org:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gushi.org,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gushi.org:s=prime2014]; RCVD_IN_DNSWL_MED(-0.20)[2620:137:6000:10::142:from]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[ports@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:393507, ipnet:2620:137:6000::/44, country:US]; HAS_XAW(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gushi.org:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On Sep 28, 2022, at 23:39, Alexander Leidinger = wrote: >=20 > Quoting Rainer Hurling (from Thu, 29 Sep 2022 = 06:43:49 +0200): >=20 >> Hi Dan, >>=20 >> Am 28.09.22 um 23:01 schrieb Dan Mahoney: >>>=20 >>>=20 >>>> On Sep 26, 2022, at 20:22, Kevin Oberman > wrote: >>>>=20 >>>> On Mon, Sep 26, 2022, 18:13 Dan Mahoney > wrote: >>>=20 >>> Okay, so in either the package file, or the repo file, is there a = bit that says "whatever is the default" or that explicitly says "if = there's not a python, install 3.8"? >>=20 >> There is PYTHON_DEFAULT (set to 3.9 ATM) in = ports/Mk/bsd.default-versions.mk. You can override this for example by = an entry in /etc/make.conf: >>=20 >> DEFAULT_VERSIONS+=3D python=3D3.10 python3=3D3.10 That's ports. I'm asking about packages. =20 >>=20 >>>=20 >>> I realize I'm asking weird minute questions, but I'm noticing that = across our fleet we have some blend of machines that are 3.7, 3.8, and = 3.9, and trying to just remove 3.7 attempts to deinstall packages that = would work with 3.8. >>=20 >> To update from one Python version to another, there are descriptions = in /usr/ports/UPDATING, see entry from 20220626 Once again, that's ports. There's no notes in the package tree about = the change in defaults. >> After changing Python itself (i.e. from 3.7 to 3.9), rebuilding = depending py3x-packages will do this version change for you (i.e. from = py3.7-* to py3.9-*, ...). It works via the so called flavors. I'm asking on ports@ because there's not any kind of pkgs@ mailing list. = I feel like I'm not being clear as to why. > To extend a little bit on that: > "pkg info | grep py3" will give you a list of ports which are = depending on a specific python version. If it lists py37-xxx it means = the xxx port depends upon python 3.7. If you then delete python 3.7 pkg = will also ask you if it is ok to delete all the py37-* ports. No, it will give me a list of *packages*, except it won't. Case in point: bind-tools (which in turn is a dependency of bind9) # pkg info | grep bind-tools bind-tools-9.16.27_1 Command line tools from BIND: delv, dig, = host, nslookup... # pkg all-depends bind-tools libxml2-2.9.13_1 python38-3.8.13 libidn2-2.3.2 py38-ply-3.11 libuv-1.42.0 libedit-3.1.20210910,1 json-c-0.15_1 # The latest version of bind-tools no longer requires python at all (bind = 9.18 has rewritten all the utilities in C once again), so I can't just = experiment with this. But trying to do a pkg delete python3.8 attempted to delete bind-tools, = and I was looking for the magic incantation that says "without = reinstalling bind-tools, how can I re-point it at the python39 variants = of that package". On a box without a ports tree. Only using pkg. If the answer is "you really can't unless you run poudriere and tell it = to build a different package with a different dependent version of = python", then so be it. But I'd like to be able to install py39-ply, = and python39, and have bind-tools not try to deinstall, and instead just = re-point itself. Now, I know this is not the same as a library that can = build linked against two ssl's where there are real = compile-time/link-time differences. This is because one particular file = in bind-tools is a python script. If the answer is "some dumb ports will always depend on whatever the = default version was on the build farm, so you MUST have those versions = installed" that's an answer. I know ports support "flavors" but there's no py38-bind-tools, which led = me to believe there was a looser coupling. My secondary question: when a pkg is nailed to the "Default" version, = does that result in the pkg file itself actually saying 3.8, or just a = reference that says "the default was used, but any python will do, but = you have to manually edit the pkgdb to update the dependencies". If I had manually installed py39-ply and python3.9, would bind-tools = have still required python3.8 and py38-ply? > So for a given system with already installed ports it is not simply = installing python 3.9 and deleting 3.7. It is also updating all the = ports which depend upon 3.7. Again, that's ports. My question the whole time has been "how does this = knob, specifed in the ports tree, ultimately translate into the pkg = tree", where there is no ports tree present and make.conf is not = consulted. I am asking about either fields in the pkg file itself, or in the pkg = database. -Dan