From nobody Sat Dec 02 21:17:13 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 4SjN6v0jw4z52f5p for ; Sat, 2 Dec 2023 21:17:27 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mail.madpilot.net (vogon.madpilot.net [IPv6:2a01:4f8:1c1c:11e5::1]) (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 4SjN6s6s62z4kX6 for ; Sat, 2 Dec 2023 21:17:25 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; none Received: from mail (mail [IPv6:fd5c:5351:d272::3]) by mail.madpilot.net (Postfix) with ESMTP id 4SjN6j0k1pz6ftG; Sat, 2 Dec 2023 22:17:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject:date:date :message-id:received; s=bjowvop61wgh; t=1701551834; x= 1703366235; bh=NBPymcxxQL0z63531NqH2deLT2UEaH3thzzbvqlH9PQ=; b=Q zsnl1xtOs47Z89s5nTIoT74QVK3JWwhQzZ5t2KWA4/Deqr6IfmAtpt295Pbe5S3l wmwskAESdKfLO+dH4TWo/GoFSSA0Ws6jHxqkkVfI1bWn1uKZVip4augKkWzUgoXg Yd+L3XfSQtWGVRAcsfJ8hoZOPxTBEnrZwxLlYSqOH2C0qiVROj5JfkVURN07+Mix m+ArnA+ac9sZU1u5Lm4WwTWO5XI3lp2A2+tYjm0F9NAqJR0AF8ZL1PoeRSh97vtN bRcr4MiWXyyuDwMz8QBv34MUZvIef12pddrSiWNuF/ZUPUJodQM7hJSv/dSjMG0g BHoaAWV3LVshMV3w2pSwg== Received: from mail.madpilot.net ([IPv6:fd5c:5351:d272::3]) by mail (mail.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavisd-new, port 10026) with ESMTP id JztrhMu2q-BK; Sat, 2 Dec 2023 22:17:14 +0100 (CET) Message-ID: Date: Sat, 2 Dec 2023 22:17:13 +0100 Subject: Re: Setting of DEFAULT_VERSIONS of php and poudriere's ports compilation woes in my setup To: Michael Grimm , ports@freebsd.org References: <420DE888-DFEC-417F-B557-50FFCB416FB8@ellael.org> Content-Language: en-US From: Guido Falsi Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeAQTAQIAIgUCT4b6XQIbAwYL CQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQGuaGDlbL0pOWigf/YVTVf3+ZRnzeGP7CjGV1 Wrrxzjc8h8W64NZasV0XLHGFjl5MYwtm9jJ9gbL8Ubtqstey7lYpjOk2fG6YDhY5eptWCpR6 1QqYrioukhCfKbodSk6PnIZcx719nJVK2P7ihdFEN78TavpBwqIf9hGEcKkMpbRFQv1mYvXD hKVwQGY+8bkH/a/pAWmIyD4qMfKCMurH5DexxEt5SYWu5BB5hd/DWyZ0wuZ+F79KMPzLBPJW 5cpdLNbrvenSqFZGJEGht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Md/6VAxn0 hkoBKhEy5LkWjM9CHppu+bBkQ91/kj2uJQSXO8euonwHHS3c+6N2i2H7I0emcHGu07wuRB2t Dnw/RLBxohffdPZT2kbxuG7lhVHzwVDw5DRwSw8GkOdy In-Reply-To: <420DE888-DFEC-417F-B557-50FFCB416FB8@ellael.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Queue-Id: 4SjN6s6s62z4kX6 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 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. > […] > > > I had had the following definition for default php version in my poudriere make.conf: > DEFAULT_VERSIONS+= php=81 […] > > > Now, I *removed* 'php=81' 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: > […] > RUN_DEPENDS+= php${ }-extensions>0:${PORTSDIR}/lang/php${PHP_DEFAULT}-extensions > RUN_DEPENDS+= roundcube-php${PHP_DEFAULT}>0:${PORTSDIR}/mail/roundcube@php${PHP_DEFAULT} > […] > > > Adding 'DEFAULT_VERSIONS+= php=82 […]' to my poudriere make.conf resolves this issue. > > > It looks like $PHP_DEFAULT in port definition without 'DEFAULT_VERSIONS+= php=82' in make.conf translates to an erroneous 'php8.2' and runs into errors. > > Whereas the explicit definition of 'DEFAULT_VERSIONS+= php=82' 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. > > AFAIK to depend on php components younshould leverage USES=php, and define the actual required modules in USE_PHP. If your port only works with some PHP versions you should list the unsupported ones in IGNORE_WITH_PHP. 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. 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=php and flavorizing your port, using PHP_VER. Not many live examples in the ports tree, but maybe you can find some inspiration in some of these Makefiles: databases/pear-DoctrineDBAL/Makefile devel/php-composer/Makefile Hope this information helps. -- Guido Falsi