<div dir="ltr">I think we should use carton and/or local::lib, and bundle all the dependencies on build time.<div>Building a Docker image? Bundle all deps.</div><div>Building a Debian package? Bundle all deps (we already need to build things for specific perl versions)</div><div>Building a Snap/Flatpack? Bundlfe all deps</div><div><br></div><div>cpanm means installing globally and is possible, but why not just... bundle them.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 9 jun. 2020 a las 3:47, Julian Maurice (<<a href="mailto:julian.maurice@biblibre.com">julian.maurice@biblibre.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm all for installing Perl modules directly from CPAN. I'm less sure <br>
about Carton. Is it really needed ? I believe that `cpanm --installdeps <br>
.` does the same thing.<br>
<br>
Anyway, I think the first step would be to write documentation on how to <br>
use this installation method. Even if not adopted, it can't hurt anyone <br>
to have an alternate method documented.<br>
Can you write it ?<br>
<br>
Le 09/06/2020 à 01:13, <a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a> a écrit :<br>
> It would mean that the Koha community would support "CPAN and Carton" as an installation method or use it as *the* installation method for Koha.<br>
> <br>
> David Cook<br>
> Systems Librarian<br>
> Prosentient Systems<br>
> 72/330 Wattle St<br>
> Ultimo, NSW 2007<br>
> Australia<br>
> <br>
> Office: 02 9212 0899<br>
> Online: 02 8005 0595<br>
> <br>
> -----Original Message-----<br>
> From: Koha-devel <<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-community.org</a>> On Behalf Of Julian Maurice<br>
> Sent: Friday, 5 June 2020 5:12 PM<br>
> To: <a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-community.org</a><br>
> Subject: Re: [Koha-devel] Adopting CPAN and Carton<br>
> <br>
> Hi,<br>
> <br>
> As you said it is already feasible and very easy to do. So what would it mean to "adopt CPAN and Carton" ?<br>
> <br>
> Le 05/06/2020 à 08:10, <a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a> a écrit :<br>
>> Now that I think about it, embedding the Perl modules in the Debian<br>
>> package could be problematic due to dependencies on C libraries.<br>
>> (Currently building Text::Bidi on an OpenSUSE system and it's taking<br>
>> forever.)<br>
>><br>
>> I actually found it pretty challenging to read replies interweaved in<br>
>> emails, so I might not respond to all that.<br>
>><br>
>> But yeah I could see the most likely option being keeping the Debian<br>
>> packages the way they are and just having an alternative Carton style.<br>
>> All that is needed for it really is changing the PERL5LIB<br>
>> environmental variable, so it would be easy enough to do.<br>
>><br>
>> David Cook<br>
>> Systems Librarian<br>
>> Prosentient Systems<br>
>> 72/330 Wattle St<br>
>> Ultimo, NSW 2007<br>
>> Australia<br>
>><br>
>> Office: 02 9212 0899<br>
>> Online: 02 8005 0595<br>
>><br>
>> -----Original Message-----<br>
>> From: Victor Grousset/tuxayo <<a href="mailto:victor@tuxayo.net" target="_blank">victor@tuxayo.net</a>><br>
>> Sent: Friday, 5 June 2020 3:15 PM<br>
>> To: <a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>; 'Koha Devel'<br>
>> <<a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-community.org</a>><br>
>> Subject: Re: Adopting CPAN and Carton<br>
>><br>
>> Hi o/<br>
>><br>
>> On 20-06-05 02:18, <a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a> wrote:<br>
>>> What are people’s thoughts on CPAN and Carton (the Perl version of<br>
>>> Bundler, Composer, NPM, etc)?<br>
>><br>
>> I hope that something like that would be on our reach. And that it<br>
>> will make the majority of the work done to support other Linux<br>
>> distributions, which would be amazing!<br>
>><br>
>>> I like the idea as a way of more easily managing Perl dependencies<br>
>>> regardless of Linux distribution and version; in other words, we<br>
>>> could provide the same dependencies regardless of being on Debian<br>
>>> Jessie/Debian Stretch/Debian Buster or Ubuntu or Fedora or RHEL or<br>
>> OpenSUSE.<br>
>>><br>
>>>    <br>
>>><br>
>>> I suppose the difficulty is how we do a community-friendly deployment?<br>
>>> I see two main options:<br>
>>><br>
>>>    1. Have the Debian package run “carton install” automatically during<br>
>>>       install/upgrade<br>
>>>        1. This could be error prone and difficult to support…  2. Have<br>
>>> the Koha Debian Package Manager run “carton install” when<br>
>>>       building the package, and embed the Perl modules in the Koha package<br>
>>>        1. It’s unknown how much this would increase the size of the Koha<br>
>>>           package<br>
>><br>
>> Interesting, I hope such an unified way will be possible.<br>
>> If not, is the following a valid option?<br>
>> The current way of managing the perl dependencies for Debian doesn't change.<br>
>> And a carton way of managing the perl dependencies will coexist. (does<br>
>> it mean just maintaining the cpanfile? I guess I'm very very wrong<br>
>> here) And packages for the other distros will use carton.<br>
>><br>
>> It would depend of which is more work:<br>
>> Integrating and maintaining the use of carton in the Debian packages<br>
>> Or Maintaining the "full" Debian packages in parallel.<br>
>><br>
>> And also how much is valued the fact that for Debian, the perl deps<br>
>> comes from the repo? (we could keep the versions in sync with Debian,<br>
>> see [1]) Subparts of this:<br>
>> - value of Debian patches<br>
>> - anything else???<br>
>><br>
>><br>
>>> I think retaining Debian packages is important, because we have a<br>
>>> number of non-Perl dependencies, and the Debian packages provide a<br>
>>> lot of very useful automation.<br>
>><br>
>> Thank for addressing the question of "If we can use Carton, why have<br>
>> packages at all?"<br>
>> I trust you and the others for that ^^" I have no idea of whether or<br>
>> not packages are the best option compared to others. Does anyone have<br>
>> feedback about the handling of applications with a lot of deps in<br>
>> other languages than Perl? (that have something similar to Carton)<br>
>><br>
>><br>
>><br>
>>> Personally, I’m moving away from packaging Perl dependencies as<br>
>>> Debian packages for non-Koha projects, because it makes porting the<br>
>>> projects to a newer version of the same OS much more difficult.<br>
>><br>
>>> I know using Debian’s Perl packages have a lot of advantages, as<br>
>>> they’re tested, reviewed, and patched, but I think it might be time<br>
>>> to consider a change.<br>
>><br>
>> [1]The cpanfile could still evolve in sync with the Debian package<br>
>> versions of the perl libs.<br>
>> That doesn't address the point "patched" => are there a lot of patched<br>
>> perl packages in Debian?<br>
>> i.e. enough so that even getting the same versions (as the one in<br>
>> Debian stable or oldstable) from CPAN will lead to issues compared to<br>
>> getting them from the Debian packages?<br>
>><br>
>><br>
>><br>
>> Unrelated idea: if we end up not using the Debian perl packages and<br>
>> not syncing the versions pulled from CPAN with those in Debian, here<br>
>> is how we could manage perl deps.<br>
>> We could have a script that would edit the cpanfile to bump the major<br>
>> version of one package. Or set it to the latest version.<br>
>> And run the tests. And if the tests are alright, keep the new package<br>
>> version and try updating the next package.<br>
>> This way (hopefully) most of the update work of perl deps would be done.<br>
>> Edge cases will be dealt with manually.<br>
>><br>
>> Even if we don't directly need it, it could be a nice tool to detect<br>
>> regressions in our upstream deps way before they fall on us!<br>
>><br>
>> Cheers,<br>
>><br>
>> --<br>
>> Victor Grousset/tuxayo<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Koha-devel mailing list<br>
>> <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
>> <a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>> website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a> git :<br>
>> <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a> bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
>><br>
> <br>
<br>
-- <br>
Julian Maurice<br>
BibLibre<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">Tomás Cohen Arazi</div><div style="font-size:12.8px">Theke Solutions (<a href="http://theke.io/" target="_blank">http://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div></div></div>