Adding Flatpaks to BUILDISO

So, I was wondering, what are the mechanisms one would use to include Flatpaks as part of an ISO?

I have been able to create packages using AppImages and including them on my ISO build, but the time has come that I may want to add my first Flatpak as part of my ISO.

The Wiki: https://wiki.manjaro.org/index.php/Build_Manjaro_ISOs_with_buildiso
has no mention of it and I can’t find any documentation on how to do this.

Any suggestions?

-John

None, from a technical perspective. However, you might wish to see what @philm has to suggest. As I understand it, he was considering flatpak by default for Manjaro, at one time.

I’ll refrain from adding my personal opinions on that.

Cheers.

1 Like

That is easy - there is no such option

This is an all manual task

  1. add the necessary packages to the Packages-Desktop file
    pamac search flatpak --no-aur
    
  2. build your iso using the -x argument
  3. install the intended flatpak(s) on your local system.
  4. locate the files/folders added by the flatpak install command (/var/lib/flatpak)
  5. copy the added files to the $buildroot/buildiso/$PROFILE/x86_64/desktopfs
  6. build the iso using the -zc arguments

Be aware that the size of the ISO will increase dramatically - possibly why there is no option with buildiso to preinstall flatpaks.

I just ran a test

  • installed flatpak support (nothing huge)
  • installed 2 apps sublime text and sublime merge from flathub.

The size of /var/lib/flatpak exploded to 3.5G - the cost of providing preinstalled flatpaks should definately be considered.

Additional info

1 Like

BUILDISO doesn’t have the feature yet. It has the feature for adding snaps, though. On our upcoming immutable version of Manjaro we have a process to add flatpak packages by default to a disk image.

1 Like

Thank you all for the info and update.

It would seem to me, that this is a limiting factor for Flatpaks, it will be difficult for Distro’s to include packages in their ISO’s, especially if the package is only available as a Flatpak.

I think AppImage, when installed as a regular Arch Package, seems to have an advantage here.

-John

Only a think, you can try to use penguins-eggs for your user case.
This tool is like the systemback ubuntu app, simple all is in your installation is used for create a redistributable iso.

Disclaimer: i don’t know if you do your customization into a git repository because with penguins-eggs is not possible since is a copy 1:1 of your system ( whitout your personal data of course )

Could you not offer a separate ISO with a default flatpak (or appimage) selection – an offline repo of sorts – some distributions still employ this concept, albeit not with containerised apps.

One of the advantages might be that this offline repo ISO would likely not need rebuilding as often as the OS.

Well, I currently have a separate repo for my little spin of Cinnamon.
Adding an AppImage to an ISO is as simple as building a .pkg.tar.zst package with the appimage inside instead of a binary. It installs as a normal package, it runs as a normal package, has menu item etc. To the user, it is completely transparent, there is no difference between a regular package and an AppImage.

This allows AppImages to be included in the ISO because the package name is the only difference.

Cinelerra is a good example. It is an AppImage that is included in my ISO as cin-appimage. Works perfectly even in live mode.

FlatPaks you just can’t do this.

Fair enough; AppImage may be larger than the binary counterpart, but at least they are more manageable. As a user, I avoid Flatpak in favour of AppImage.

I just thought that (depending on quantity of apps concerned) the separate ISO might have been a valid alternative.

Cheers.

I agree with you, even though I am rather package format agnostic, I tend to lean towards AppImages especially when it comes to larger, more complex packages.

Remember, the binary packages don’t usually have all of the dependencies included, so when you account for totality of what the package requires, it’s really not that bad, especially when you consider that the trade off is simplicity.

-John