Flatpak package for Linux releases #102949

Open
opened 2022-12-05 14:15:59 +01:00 by Brecht Van Lommel · 17 comments

Blender on Linux is already available as a Snap package. Flatpak seems to be the more popular format at least on non-Ubuntu based distributions, so it would sense to officially support it as well.

There is no concrete timeline for this, but has come up a few times among developers, so good to have a task.

  • Flatpak sets different XDG variables for config and other files. Consider using same directories as other Blender installs instead. But can we access the unmodified XDG variable somehow?
  • Packaging script in Blender repository
  • Take over maintenance of existing Flathub package?
  • Buildbot integration
    • Package
    • Upload to download.blender.org?
    • Release to Flathub
Blender on Linux is already available as a Snap package. Flatpak seems to be the more popular format at least on non-Ubuntu based distributions, so it would sense to officially support it as well. There is no concrete timeline for this, but has come up a few times among developers, so good to have a task. - [ ] Flatpak sets different XDG variables for config and other files. Consider using same directories as other Blender installs instead. But can we access the unmodified XDG variable somehow? - [ ] Packaging script in Blender repository - [ ] Take over maintenance of existing Flathub package? - [ ] Buildbot integration - [ ] Package - [ ] Upload to download.blender.org? - [ ] Release to Flathub
Brecht Van Lommel changed title from Official flatpak package for Linux releases to Flatpak package for Linux releases 2022-12-05 14:29:31 +01:00

Flatpak containers are somewhat more popular than Snap packages, but just as undesirable,
because both container systems slow down the system and become extremely bloated over time.

I would suggest using the Appimage format instead of Flatpak or Snap containers.
This would also have the advantage that everything that is needed can always be packed into the
Appimage, and this Appimages can also be updated without any problems.

Appimages also run on all Linux systems (!)

Flatpak containers are somewhat more popular than Snap packages, but just as undesirable, because both container systems slow down the system and become extremely bloated over time. I would suggest using the Appimage format instead of Flatpak or Snap containers. This would also have the advantage that everything that is needed can always be packed into the Appimage, and this Appimages can also be updated without any problems. Appimages also run on all Linux systems (!)
Author
Owner

Do appimages do much beyond the Linux release package we already provide? We have a self contained package that can be run on many Linux distributions.

My understanding is that unlike snap/flatpak, it's not really meant for app stores or automatic system integration into launchers, menus, command line.

Do appimages do much beyond the Linux release package we already provide? We have a self contained package that can be run on many Linux distributions. My understanding is that unlike snap/flatpak, it's not really meant for app stores or automatic system integration into launchers, menus, command line.

The question is why snap or flatpak containers at all?
Both container systems offer no advantage over the existing zip/tar archive. This is then only a format that must be
maintained and updated.

Distributions like Linux Mint refuse the integration into the system because of the proprietary character of Snap Container,
because only Canonical determines what comes into the Snapstore and what not. Faltpak is more open, because everyone
can provide a Flatpak.

The only advantage of Snap and Flatpak could be the possibility that one can install several versions side by side,
however one buys this advantage with enormous memory consumption and complex maintenance of the components.
in addition, the disadvantage that both Snap and Flatpak have problems with access to system folders, so where is the
advantage of Snap or Flatpak?

Appimages are less complex to maintain, and can be updated automatically using appimage-update. The advantage of
Appimages is that you can put different variants of help files or dlls in the Appimage, and that everything you need to run the program is included; this makes Appimages distribution independent.

With Appimaged (Systemd) and Appimage-Kit you can integrate it in the same way as Flatpak, but without the need for an additional runtime environment or root privileges.

But why use Snap, Flatpak, or Appimage Container at all?

The question is why snap or flatpak containers at all? Both container systems offer no advantage over the existing zip/tar archive. This is then only a format that must be maintained and updated. Distributions like Linux Mint refuse the integration into the system because of the proprietary character of Snap Container, because only Canonical determines what comes into the Snapstore and what not. Faltpak is more open, because everyone can provide a Flatpak. The only advantage of Snap and Flatpak could be the possibility that one can install several versions side by side, however one buys this advantage with enormous memory consumption and complex maintenance of the components. in addition, the disadvantage that both Snap and Flatpak have problems with access to system folders, so where is the advantage of Snap or Flatpak? Appimages are less complex to maintain, and can be updated automatically using appimage-update. The advantage of Appimages is that you can put different variants of help files or dlls in the Appimage, and that everything you need to run the program is included; this makes Appimages distribution independent. With Appimaged (Systemd) and Appimage-Kit you can integrate it in the same way as Flatpak, but without the need for an additional runtime environment or root privileges. But why use Snap, Flatpak, or Appimage Container at all?
Author
Owner

I don't really want to discuss the merits of Snap and Flatpak in general, that's been done enough in many other places. There are users/developers that like and use them, and others that don't.

The appimage update mechanism looks interesting, but seems like it would requite some additional work for us to serve those updates. I'm not sure we want to set up and maintain infrastructure like that for one platform / package combination.

I don't really want to discuss the merits of Snap and Flatpak in general, that's been done enough in many other places. There are users/developers that like and use them, and others that don't. The appimage update mechanism looks interesting, but seems like it would requite some additional work for us to serve those updates. I'm not sure we want to set up and maintain infrastructure like that for one platform / package combination.

Hey folks, Bart from Flathub team here. I'm happy to answer to any questions and also help integrate Blender's CI with Flathub publishing system, similarly to what OBS and Firefox do. Blender on Flathub is already re-using your binary artifacts since some time, so it would make total sense to skip the middleman that is the additional GitHub repo with the manifest.

Flatpak sets different XDG variables for config and other files. Consider using same directories as other Blender installs instead.

As the upstream, it's ultimately your decision, but I'd suggest sticking to the convention Flatpak uses. This way, if you decide to also publish LTS branch under a separate ID, it will use different configuration files than the regular Blender release, and would also allow users to launch Blender and Blender LTS simultaneously.

Hey folks, Bart from Flathub team here. I'm happy to answer to any questions and also help integrate Blender's CI with Flathub publishing system, similarly to what OBS and Firefox do. Blender on Flathub is already re-using your binary artifacts since some time, so it would make total sense to skip the middleman that is the additional GitHub repo with the manifest. > Flatpak sets different XDG variables for config and other files. Consider using same directories as other Blender installs instead. As the upstream, it's ultimately your decision, but I'd suggest sticking to the convention Flatpak uses. This way, if you decide to also publish LTS branch under a separate ID, it will use different configuration files than the regular Blender release, and would also allow users to launch Blender and Blender LTS simultaneously.
Author
Owner

Thanks @barthalion. To be clear it might be a while until we actually start working on this.

Blender already uses different config files for different versions, to support running multiple Blender versions, so that's not really a problem. What happens is that users can install Blender in multiple ways, or download a daily build from blender.org, or even have 3rd party installers that make assumptions about where for Blender add-ons should be installed.

Thanks @barthalion. To be clear it might be a while until we actually start working on this. Blender already uses different config files for different versions, to support running multiple Blender versions, so that's not really a problem. What happens is that users can install Blender in multiple ways, or download a daily build from blender.org, or even have 3rd party installers that make assumptions about where for Blender add-ons should be installed.

To be clear it might be a while until we actually start working on this.

That's fine, just making myself available here if any questions pop in.

Blender already uses different config files for different versions

That's fair; ultimately, we're a platform provider, not packaging police.

> To be clear it might be a while until we actually start working on this. That's fine, just making myself available here if any questions pop in. > Blender already uses different config files for different versions That's fair; ultimately, we're a platform provider, not packaging police.
Philipp Oeser removed the
Interest
Platforms, Builds & Tests
label 2023-02-10 08:58:21 +01:00

Distributions like Linux Mint refuse the integration into the system because of the proprietary character of Snap Container, because only Canonical determines what comes into the Snapstore and what not. Faltpak is more open, because everyone can provide a Flatpak.

Hi, Linux Mint user here. It should be noted that LM's Update Manager is compatible with Flatpak so Flatpak updates show up alongside APT/PPA updates.

> Distributions like Linux Mint refuse the integration into the system because of the proprietary character of Snap Container, because only Canonical determines what comes into the Snapstore and what not. Faltpak is more open, because everyone can provide a Flatpak. Hi, Linux Mint user here. It should be noted that LM's Update Manager is compatible with Flatpak so Flatpak updates show up alongside APT/PPA updates.

Adding Niels De Graef to the conversation here. He pointed me to the current non-official package and how it doesn't show as "Verified".

It is not clear to me from the task description if there are things others could do to help with this - in particular the first two topics since they could be tackled as a pull request with the building script similar to how we do other platforms.

Adding [Niels De Graef](https://projects.blender.org/nielsdg) to the conversation here. He pointed me to the [current non-official package](https://flathub.org/apps/org.blender.Blender) and how it doesn't show as "Verified". It is not clear to me from the task description if there are things others could do to help with this - in particular the first two topics since they could be tackled as a pull request with the building script similar to [how we do other platforms](https://projects.blender.org/blender/blender/src/branch/main/release/freedesktop/snap).
Author
Owner

Others could indeed help with the first two tasks.

Others could indeed help with the first two tasks.

Hey y'all, I work on packaging Bforartists (a Blender fork, but focused solely on UI) as a Flatpak.

There are a couple of things that (as far as I'm aware) we can't do since they need to be implemented Blender side, most notably XDG Portals.

XDG Portals are a more secure method for sandboxed formats like Flatpak and Snap to access files on the host system. The idea is instead of giving a program complete access to the system all the time, the program will request a file and xdg-desktop-portal will give access to it (essentially fine-tuned file access permissions). An end user wouldn't notice, as it would appear like the program has full access.

Normally, calling the GTK or Qt file pickers would do this out of the box, but since Blender uses its own file picker, we have to make much larger sandbox holes than normal. In the past, this was also bad for user experience, as users would be wondering why they couldn't access removable media (which without portals requires full host access)

Hey y'all, I work on packaging Bforartists (a Blender fork, but focused solely on UI) as a Flatpak. There are a couple of things that (as far as I'm aware) we can't do since they need to be implemented Blender side, most notably [XDG Portals](https://docs.flatpak.org/en/latest/portal-api-reference.html). XDG Portals are a more secure method for sandboxed formats like Flatpak and Snap to access files on the host system. The idea is instead of giving a program complete access to the system all the time, the program will request a file and `xdg-desktop-portal` will give access to it (essentially fine-tuned file access permissions). An end user wouldn't notice, as it would appear like the program has full access. Normally, calling the GTK or Qt file pickers would do this out of the box, but since Blender uses its own file picker, we have to make much larger sandbox holes than normal. In the past, this was also bad for user experience, as users would be wondering why they couldn't access removable media (which without portals requires full host access)

Appimages also run on all Linux systems (!)

Sadly, Appimages typically only run if you have a distro with glibc, which means users on distros like Void Linux and Alpine can't use Appimages (they can use Flatpak however, since Flatpaks bundle their own glibc, and that's what the Alpine wiki suggests as well). While one could argue that it's the user's fault for using a non-standard distro, it's generally better if one can provide support to those users.

> Appimages also run on all Linux systems (!) Sadly, Appimages typically only run if you have a distro with `glibc`, which means users on distros like Void Linux and Alpine can't use Appimages (they can use Flatpak however, since Flatpaks bundle their own `glibc`, and that's what the Alpine wiki suggests as well). While one could argue that it's the user's fault for using a non-standard distro, it's generally better if one can provide support to those users.
Author
Owner

Sandboxing has not been a goal for us, the idea was just to continue with unsandboxed packages.

For simpler applications the main thing you might do is just go open and save one file. But with Blender you also load images, library links, asset libraries, save render and node output, have add-ons access various files, etc. It becomes rather impractical to go through portals for all those things.

For advanced use cases Blender is more like an IDE or other software where you automate things rather than users explicitly opening and saving each file. Someone using Blender in a studio pipeline would not want to use such a sandboxed version.

Sandboxing has not been a goal for us, the idea was just to continue with unsandboxed packages. For simpler applications the main thing you might do is just go open and save one file. But with Blender you also load images, library links, asset libraries, save render and node output, have add-ons access various files, etc. It becomes rather impractical to go through portals for all those things. For advanced use cases Blender is more like an IDE or other software where you automate things rather than users explicitly opening and saving each file. Someone using Blender in a studio pipeline would not want to use such a sandboxed version.

@ Mahid Sheikh
you can always install glibc, but the conflicts with Appimages and Alpine-Linux already solved:

https://github.com/AppImage/AppImageKit/issues/1015
https://github.com/orb-community/pktvisor/issues/88

Appimages are always the better way, you can pack all dependencies and libs inside the Appimage ; )

I still don't see the need for a Blender version as a Flatpak, Snap, or Appimage...

@ Mahid Sheikh you can always install glibc, but the conflicts with Appimages and Alpine-Linux already solved: https://github.com/AppImage/AppImageKit/issues/1015 https://github.com/orb-community/pktvisor/issues/88 Appimages are always the better way, you can pack all dependencies and libs inside the Appimage ; ) I still don't see the need for a Blender version as a Flatpak, Snap, or Appimage...
Member

Please stay on topic here, this thread is about discussing Flatpak packaging, not Appimage or Snap.

Please stay on topic here, this thread is about discussing Flatpak packaging, not Appimage or Snap.

Appimages are always the better way, you can pack all dependencies and libs inside the Appimage ; )

Same with Flatpaks. Sure, they're installed "seperately", but Flatpak will reuse dependencies and even install only part of a dependency if possible, whereas AppImage just bundles them regardless (similar to Electron bundling Chromium with every program)

Anyhow, the point of packaging is to bring software to a wider audience (I think even the most dieheart AppImage fans would agree with that statement). Flatpak is preinstalled on most major distros (with the exception of a couple), can be installed through a GUI from a central repository like Flathub, and has automatic desktop integration (I'm aware appimage launcher exists, but not even Arch Linux packages that officially). This reduces the barrier to using Blender significantly for users, as it's basically install and use. There's also discovery advantages; for example, the Flathub repo puts the currently unofficial Blender Flatpak really high up in "Graphics and Photography" section (which is basically free advertising).

Of course, nothing is requiring upstream to make the Flatpak build of Blender "official" (most distro packaged versions of Blender could be called "unofficial" technically), but then again, nothing is requiring upstream to make Linux builds beyond tar, so debating over "what is the absolute best format" is really a mute issue (if someone wants an Appimage, someone will make it eventually, that's one of the nice things about GPL). However, I think official Flatpak support would help Blender reach a wider audience, and would pay off in the end.

> Appimages are always the better way, you can pack all dependencies and libs inside the Appimage ; ) Same with Flatpaks. Sure, they're installed "seperately", but Flatpak will reuse dependencies and even install only part of a dependency if possible, whereas AppImage just bundles them regardless (similar to Electron bundling Chromium with every program) Anyhow, the point of packaging is to bring software to a wider audience (I think even the most dieheart AppImage fans would agree with that statement). Flatpak is preinstalled on most major distros (with the exception of a couple), can be installed through a GUI from a central repository like Flathub, and has automatic desktop integration (I'm aware appimage launcher exists, but not even Arch Linux packages that officially). This reduces the barrier to using Blender significantly for users, as it's basically install and use. There's also discovery advantages; for example, the Flathub repo puts the currently unofficial Blender Flatpak really high up in "Graphics and Photography" section (which is basically free advertising). Of course, nothing is requiring upstream to make the Flatpak build of Blender "official" (most distro packaged versions of Blender could be called "unofficial" technically), but then again, nothing is requiring upstream to make Linux builds beyond `tar`, so debating over "what is the *absolute best format*" is really a mute issue (if someone wants an Appimage, someone will make it eventually, that's one of the nice things about GPL). However, I think official Flatpak support would help Blender reach a wider audience, and would pay off in the end.

For advanced use cases Blender is more like an IDE or other software where you automate things rather than users explicitly opening and saving each file. Someone using Blender in a studio pipeline would not want to use such a sandboxed version.

Fair, sandboxing in that case would be difficult

> For advanced use cases Blender is more like an IDE or other software where you automate things rather than users explicitly opening and saving each file. Someone using Blender in a studio pipeline would not want to use such a sandboxed version. Fair, sandboxing in that case would be difficult
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#102949
No description provided.