Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2023 21:19:07 +0100
From:      Guido Falsi <mad@madpilot.net>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        Freebsd Ports <freebsd-ports@freebsd.org>
Subject:   Re: Example for port which needs to run php-composer?
Message-ID:  <6dc882c8-901d-4990-b3b5-8dee969fb9c4@madpilot.net>
In-Reply-To: <06cd2a94e7a8690a5912f4a3239c9d5c@Leidinger.net>
References:  <43086cf9d76027a50a0b6d2329601a30@Leidinger.net> <a7baad94-ee5b-4dcd-a9a7-dffdd3fd47ed@madpilot.net> <06cd2a94e7a8690a5912f4a3239c9d5c@Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/12/23 18:59, Alexander Leidinger wrote:
> Am 2023-12-11 14:43, schrieb Guido Falsi:
>> As a side note, if what you are trying to port is a pure PHP project 
>> using composer, I'm not sure creating pa port of it is really a good 
>> idea. The whole idea of composer is that it is handling dependencies 
>> and also can be configured by the user with various tweaks. It is 
>> preferable to "git clone" the project and manually run "composer 
>> install" (or whatever is needed).
> 
> That's how I use what I want to port myself. But this is not very user 
> friendly for those types which simply want to install a package and play 
> with it.

I do not completely agree with this but this is not important. (see below)

> 
>> On the other hand, if what you're trying to port is a bigger project 
>> with a php+composer part making a port could make sense, but why 
>> upstream is not creating a proper distribution with all required files?
> 
> It's a plugin for the roundcube webmail package.
> 
> I don't like such external package things which can not be used by a 
> distro-packaging mechanism... and saying that it is the responsability 
> of upstream to provide something which can be used by a distro-packaging 
> mechanism fails unfortunately at the reality (keeping this up-to-date in 
> terms of security or changing APIs is a nightmare for a tiny 
> hobby-project or something which is "good enough as it is, no real 
> development going on"-stuff, so I understand if they tell that the 
> install instructions include the run of composer)...
> 

I did not mean to start a discussion about the merits of this, and will 
not express further opinions.

Anyway the fact is the ports system has its mechanisms, and expects 
everything fetched to be checksummed, and forbids to download things in 
other parts of the build. The ports tree also strives for repeatability 
of the builds, at least in principle.

If you expect the port to do "composer upgrade" this cannot be allowed 
in the official tree and will fail on the cluster. You could do that on 
your local machine, although it's not really supported.

I gave you suggestions on how to work around these 
(properties|features|limitations|rules|whatever) of the ports tree. I 
would be more interested to hear if you found those useful or not.

-- 
Guido Falsi <mad@madpilot.net>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6dc882c8-901d-4990-b3b5-8dee969fb9c4>