From nobody Thu Sep 29 04:43:49 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 4MdLNZ3dFQz4d5V4 for ; Thu, 29 Sep 2022 04:43:58 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from xmailer.gwdg.de (xmailer.gwdg.de [134.76.10.29]) (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 4MdLNY51QYz3pSZ for ; Thu, 29 Sep 2022 04:43:57 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from excmbx-03.um.gwdg.de ([134.76.9.218] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1odlOs-000DlA-IK; Thu, 29 Sep 2022 06:43:54 +0200 Received: from [172.20.100.8] (10.250.9.200) by EXCMBX-03.um.gwdg.de (134.76.9.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.2507.12; Thu, 29 Sep 2022 06:43:54 +0200 Message-ID: <65597c37-813b-d0ed-ea9f-8591b68cf097@gwdg.de> Date: Thu, 29 Sep 2022 06:43:49 +0200 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:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: Python version dependencies in pkg Content-Language: de-DE To: Dan Mahoney CC: "ports@FreeBSD.org" References: <8B490359-27A3-410C-AE98-C1362D4FA9F0@gushi.org> <89D2B2D7-FA3D-46F5-A93B-4846950A157C@gushi.org> Reply-To: "Hurling, Rainer" From: Rainer Hurling In-Reply-To: <89D2B2D7-FA3D-46F5-A93B-4846950A157C@gushi.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.250.9.200] X-ClientProxiedBy: excmbx-16.um.gwdg.de (134.76.9.227) To EXCMBX-03.um.gwdg.de (134.76.9.218) X-Virus-Scanned: (clean) by clamav X-Rspamd-Queue-Id: 4MdLNY51QYz3pSZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rhurlin@gwdg.de designates 134.76.10.29 as permitted sender) smtp.mailfrom=rhurlin@gwdg.de X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; R_SPF_ALLOW(-0.20)[+ip4:134.76.10.0/23]; RCVD_IN_DNSWL_MED(-0.20)[134.76.10.29:from]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; HAS_REPLYTO(0.00)[rhurlin@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:680, ipnet:134.76.0.0/16, country:DE]; MLMMJ_DEST(0.00)[ports@freebsd.org]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[gwdg.de]; FROM_HAS_DN(0.00)[]; HAS_XOIP(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; FREEFALL_USER(0.00)[rhurlin]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Dan, Am 28.09.22 um 23:01 schrieb Dan Mahoney: > > >> On Sep 26, 2022, at 20:22, Kevin Oberman > > wrote: >> >> On Mon, Sep 26, 2022, 18:13 Dan Mahoney > > wrote: >> >> >> >>> On Sep 26, 2022, at 09:27, Kevin Oberman >> > wrote: >>> >>> On Mon, Sep 26, 2022 at 2:58 AM Dan Mahoney >> > wrote: >>> >>> All, >>> >>> A quick question: >>> >>> If a pkg depends on python, but not a specific version, it >>> will simply pick a version to install (I guess, whatever >>> version was the default when the pkg was built, 3.8 right >>> now), correct? >>> >>> If you have 3.9 installed, that will satifsfy dependencies, >>> and it won't install python3.8, correct? Or are the dependent >>> versions for interpretec languages in pkg locked to whatever >>> the default is? >>> >>> Assuming "any python will work", If you have 3.8 installed, >>> and later install 3.9 -- is there any easy way to point your >>> package at the new version as the new dependency, without >>> deinstalling/reinstalling it? >>> >>> -Dan >>> >>> >>> It will use the version specified as default in >>> /usr/ports/Mk/bsd.default-versions.mk >>> . >> >> To be clear, I'm talking about pkg install, not port building. >> >> So I understand -- that value is somehow baked in to the package >> tree somewhere?  Because pkg alone doesn't look at the ports tree >> on the installing machine(you do not need to have ports extracted >> to install packages), nor do I believe it looks at make.conf, >> >> If so, where in pkg do I find the default version?  Is it >> somewhere in the repository that's fetched before I install any >> packages? >> >> -Dan >> >> >> You are correct.  But the packages are built using the same Makefile >> and the same defaults as when built from ports for the specified >> version of FreeBSD as if it was built from ports. The Mk files are >> updated with ports, so all packages change when the change is >> committed to the defaults file, though they will only take effect when >> the quarter changes unless you're using LATEST packages. > > 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"? 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: DEFAULT_VERSIONS+= python=3.10 python3=3.10 > > 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. To update from one Python version to another, there are descriptions in /usr/ports/UPDATING, see entry from 20220626. 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 hope I have not misunderstood your request and that these hints are somehow useful ;) Best wishes, Rainer > > -Dan