From nobody Sun Dec 03 15:48:12 2023 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 4Sjrmz277rz532C2 for ; Sun, 3 Dec 2023 15:48:35 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx2.enfer-du-nord.net (mx2.enfer-du-nord.net [135.125.211.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sjrmy72dvz4fP7 for ; Sun, 3 Dec 2023 15:48:34 +0000 (UTC) (envelope-from trashcan@ellael.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (p5b2e5e4f.dip0.t-ipconnect.de [91.46.94.79]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.enfer-du-nord.net (Postfix) with ESMTPSA id 4Sjrml1WbXz1ghk; Sun, 3 Dec 2023 16:48:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellael.org; s=dkim; t=1701618503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d2cUQ2L6o/qWcgAddZG/TY5Emw9beyJrduHZh+IzxLA=; b=YmfUQcis51y2JowUYtLJPLTp3l3YnYAjeR9c/Ensa5EJxY8FmNkTBnVmon10tAb0koCByp P3lAlCDbRr0OUMMSew4S767X78cAQjCfmL8/flxJbQci2CvtnE+tztz6LPc+PE53swfR9f I7Cfyr9z4qCCh2frHq+ujGsjcJKX7WE7KkH01/LaFjSbgs1DZFTVS7OT82UQjO2RwKLwyl D3bj+iQHwSfz8sEFLRpkNoQEZPSDCd2UXgjtBqGcCDmle+zHjoTyMBoyPeUieRVTgLr4gL YgcWX9GhudvbzcHjmgry4Y8VxejMh1CGEBgKMxeqZZk7x8FcjlhwmcDJ8jIBgg== Content-Type: text/plain; charset=utf-8 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 \(3731.700.6\)) Subject: Re: Setting of DEFAULT_VERSIONS of php and poudriere's ports compilation woes in my setup From: Michael Grimm In-Reply-To: Date: Sun, 3 Dec 2023 16:48:12 +0100 Cc: ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <420DE888-DFEC-417F-B557-50FFCB416FB8@ellael.org> To: Guido Falsi X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:135.125.128.0/17, country:FR] X-Rspamd-Queue-Id: 4Sjrmy72dvz4fP7 Guido Falsi wrote: > On 02/12/23 21:37, Michael Grimm wrote: >> Hi, >> I am following the git repository for ports and using poudriere to = compile those. >> Today I stumbled over: >> 20231125: >> AFFECTS: users of lang/php81 >> AUTHOR: bofh@FreeBSD.org >> The default version of PHP has been switched from 8.1 to 8.2. >> [=E2=80=A6] >> I had had the following definition for default php version in my = poudriere make.conf: >> DEFAULT_VERSIONS+=3D php=3D81 [=E2=80=A6] >> Now, I *removed* 'php=3D81' from DEFAULT_VERSIONS and ended up with = the following errors from poudriere: >> Warning: (local/wpm): Error: local/wpm depends on nonexistent origin = 'lang/php8.2-extensions'; >> Please contact maintainer of the port to fix this. >> Warning: (mail/roundcube@php8.2): Error: Invalid FLAVOR 'php8.2' for = mail/roundcube >> Error: Fatal errors encountered gathering ports metadata >> Understandable to me because all relevant ports are named as = 'php82'... >> I do have that local port local/wpm defined as follows: >> [=E2=80=A6] >> RUN_DEPENDS+=3D php${ = }-extensions>0:${PORTSDIR}/lang/php${PHP_DEFAULT}-extensions >> RUN_DEPENDS+=3D = roundcube-php${PHP_DEFAULT}>0:${PORTSDIR}/mail/roundcube@php${PHP_DEFAULT}= >> [=E2=80=A6] >> Adding 'DEFAULT_VERSIONS+=3D php=3D82 [=E2=80=A6]' to my poudriere = make.conf resolves this issue. >> It looks like $PHP_DEFAULT in port definition without = 'DEFAULT_VERSIONS+=3D php=3D82' in make.conf translates to an erroneous = 'php8.2' and runs into errors. >> Whereas the explicit definition of 'DEFAULT_VERSIONS+=3D php=3D82' in = make.conf is resulting in a $PHP_DEFAULT translating to 'php82' which = successfully compiles those ports without complaints. >> I really don't understand what I am doing wrong. And I would = appreciate if someone could explain it to me. >=20 > AFAIK to depend on php components younshould leverage USES=3Dphp, and = define the actual required modules in USE_PHP. >=20 > If your port only works with some PHP versions you should list the = unsupported ones in IGNORE_WITH_PHP. >=20 > Depending on php-extensions is not really good practice, since what is = actually installed by it depends on options. It really is just a = convenience metaport for final users. >=20 > Anyway PHP_DEFAULT is defined in the framework Makefiles, so to use = that variable you need to put it after ".include ". But = I don't think that's the best strategy, you'd be better off leveraging = USES=3Dphp and flavorizing your port, using PHP_VER. >=20 > Not many live examples in the ports tree, but maybe you can find some = inspiration in some of these Makefiles: >=20 > databases/pear-DoctrineDBAL/Makefile > devel/php-composer/Makefile >=20 > Hope this information helps. Yes, it helped a lot in understanding the backgrounds and thus solving = my issue. Thanks for that! FYI: local/wpm serves as a metaport for all essential ports running in = one of my service jails FTR: I ended up in adding USES=3Dpython and using the correct variable = PHP_VER instead of PHP_VERSION # USES needed to follow default PHP versions USES=3D php [=E2=80=A6] RUN_DEPENDS+=3D = php${PHP_VER}-extensions>0:${PORTSDIR}/lang/php${PHP_VER}-extensions RUN_DEPENDS+=3D = roundcube-php${PHP_VER}>0:${PORTSDIR}/mail/roundcube@php${PHP_VER} [=E2=80=A6] In addition I did reduce those ports activated in php extensions to the = bare minimum needed in this service jail. Thanks again and regards, Michael