Perl scripting within flatpak

Mildred Ki'Lya mildred at mildred.fr
Wed Oct 31 15:32:19 UTC 2018


Hello,

I am trying to write flatpaks manifests for irssi (yesterday I was targetting weechat, but it seems irssi is best). Doing so, I have a few question (some I asked over at GitHub which is probably not the best place, probably). I have a more in deph question now, and I wanted advice in what's best and how Flatpak aims at providing a solution.

Irssi is a chat client that allows scripting in perl. During build, perl appears to be on the Sdk so it does not seem that I need to add a perl installation. However when using `flatpak run` it's no longer using the Sdk but the platform runtime instead. So no perl at runtime and irssi can't start because .so object is not found. Simple solution is to install perl alongside irssi. Perl being a module nested within irssi so when irssi is built, it can refer to the existing perl installation, and not the SDK installation.

Question 1: Shouldn't be Perl be an addon to the runtime? Such as the applications requiring Perl could  share the same perl installation, avoiding duplicating perl in each application build ?

Now, irssi starts nicely, but when I try to use irssi scripts, all the scripts are complaining about missing perl modules. I added a flatpak module for each perl module that I found required by scripts. Those are numerous, and I think that we could share writing the flatpak manifest for them. For example I see Hexchat has perl scripting too. Both applications could benefit from a common collection of Perl modules.

Question 2: Shouldn't common perl modules like this be part of an addon too? Would that make sense? Where would be the home for such a project?

Next, I have a question about how modules are built. In my flatpak manifest file, I have the following module hierarchy:

    - irssi
      - perl installation
    - libwww-perl
    - perl-HTTP-Message
    - perl-URI
    - ...

It means that the perl modules are not built against the perl installation that will be executing in the flatpak, but they are all building using the perl installation bundled within the Sdk. it means that if the Sdk contains perl 5.20 and I'm installing perl 5.28, all the modules will be built and compiled against Perl 5.20 and executed against Perl 5.28. Not really nice and that can cause issues.

Question 3: Can I specify that irssi and all the perl modules share a common module dependency: the perl installation? it seems not possible with the current manifest format. Would moving Perl as a runtime addon fix that issue and is that the recommended move?

Now, last question,

Question 4: This flatpak mnifest will contain a great many perl modules. Is there some quick way to make them available within the flatpak, such as reusing distribution packages? Or perhaps should the flatpak modules be made reusable? Are we not duplicating the linux distributions work, but with flatpak-builder intsead of deb or rpm? Perhaps we can work with distributions so we can share part of the work (legal licencing issues, updates, including security updates, ...).

Thank you.


More information about the Flatpak mailing list