[opensuse-buildservice] Flatpak and OBS (a short status)
Hi, I investigated flatpak and OSTree. The objective is to integrate flatpak builds into OBS. Here is what I have: - a working Runtime (Leap 42.1) - a working SDK (Leap 42.1) Both are based on the work of Frederic's last hackweek project. It just needed a little fixing and tweaking. SDK and Runtime are stored in an OSTree. OSTree is a git inspired content-addressed versioning filesystem. (https://developer.gnome.org/ostree/2014.4/) I also managed to build a screen flatpak application with the SDK and was able to run it with the openSUSE Runtime. The build is controlled by a manifest file which is in JSON. It contains the global options like app-id, used runtime, used sdk and the modules that are needed. The modules are build sequential. Each module has options itself (like name and build-options) and the sources. Sources can be archives, git repos, bzr sources, files, scripts, shell commands and patches. The application that was built is put into an OSTree repository defined by the flatpak-builder call. Flatpak uses namespaces and cgroups to isolate the application from the operating system. For the interaction between the application and the operating system D-Bus is used. A few limitations / thoughts: - The user needs to install the application *AND* the runtime. Which means we have to provide the runtime too. (OSTree provided in rpm?) - flatpak was/is designed to fit graphical desktop applications. So providing daemons and deliver service files will not work. In the past weeks I learned a lot about flatpak/OSTree and how to use it. But there is still a way to go. I have forked the repository from Frederic and pushed my work in there. You find the github repository here: https://github.com/lethliel/opensuse-flatpak-runtime Under examples/ you will find the working screen manifest. There is also a more complex manifest example. (Which fails at module glib2; source "shell". I don't know why) But it gives an overview of the layout and sources that are possible. If you get it to run, please feel free to contribute to my git repository. At the moment I don't have the time to work on this any further and I wanted to share the progress with the community. Greetings, Marco -- Marco Strigl SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nuremberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Dienstag, 6. September 2016, 16:57:08 CEST wrote Marco Strigl:
Hi,
I investigated flatpak and OSTree. The objective is to integrate flatpak builds into OBS. Here is what I have:
- a working Runtime (Leap 42.1) - a working SDK (Leap 42.1)
Both are based on the work of Frederic's last hackweek project. It just needed a little fixing and tweaking. SDK and Runtime are stored in an OSTree. OSTree is a git inspired content-addressed versioning filesystem. (https://developer.gnome.org/ostree/2014.4/)
I also managed to build a screen flatpak application with the SDK and was able to run it with the openSUSE Runtime.
The build is controlled by a manifest file which is in JSON. It contains the global options like app-id, used runtime, used sdk and the modules that are needed. The modules are build sequential. Each module has options itself (like name and build-options) and the sources. Sources can be archives, git repos, bzr sources, files, scripts, shell commands and patches.
The application that was built is put into an OSTree repository defined by the flatpak-builder call.
Did you investigate if it is possible at all to build a flatpak package using flatpak-builder without internet at all? (requirement for OBS to gain reproducable builds)
Flatpak uses namespaces and cgroups to isolate the application from the operating system. For the interaction between the application and the operating system D-Bus is used.
A few limitations / thoughts: - The user needs to install the application *AND* the runtime. Which means we have to provide the runtime too. (OSTree provided in rpm?)
Possible, I did something similar for snap packages utelizing deb packages (since it is/was not yet possible to build snaps via rpms).
- flatpak was/is designed to fit graphical desktop applications. So providing daemons and deliver service files will not work.
well, IMHO okay. It could be extended if that is wanted later...
In the past weeks I learned a lot about flatpak/OSTree and how to use it. But there is still a way to go. I have forked the repository from Frederic and pushed my work in there.
You find the github repository here: https://github.com/lethliel/opensuse-flatpak-runtime Under examples/ you will find the working screen manifest. There is also a more complex manifest example. (Which fails at module glib2; source "shell". I don't know why) But it gives an overview of the layout and sources that are possible. If you get it to run, please feel free to contribute to my git repository.
At the moment I don't have the time to work on this any further and I wanted to share the progress with the community.
thanks a lot for the effore adrian -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 09/07/2016 11:03 AM, Adrian Schröter wrote:
On Dienstag, 6. September 2016, 16:57:08 CEST wrote Marco Strigl:
Hi,
I investigated flatpak and OSTree. The objective is to integrate flatpak builds into OBS. Here is what I have:
- a working Runtime (Leap 42.1) - a working SDK (Leap 42.1)
Both are based on the work of Frederic's last hackweek project. It just needed a little fixing and tweaking. SDK and Runtime are stored in an OSTree. OSTree is a git inspired content-addressed versioning filesystem. (https://developer.gnome.org/ostree/2014.4/)
I also managed to build a screen flatpak application with the SDK and was able to run it with the openSUSE Runtime.
The build is controlled by a manifest file which is in JSON. It contains the global options like app-id, used runtime, used sdk and the modules that are needed. The modules are build sequential. Each module has options itself (like name and build-options) and the sources. Sources can be archives, git repos, bzr sources, files, scripts, shell commands and patches.
The application that was built is put into an OSTree repository defined by the flatpak-builder call.
Did you investigate if it is possible at all to build a flatpak package using flatpak-builder without internet at all? (requirement for OBS to gain reproducable builds)
Yes. It is possible to build without any internet connection. As long as you have the sources local (like tgz archives) it is not a problem.
Flatpak uses namespaces and cgroups to isolate the application from the operating system. For the interaction between the application and the operating system D-Bus is used.
A few limitations / thoughts: - The user needs to install the application *AND* the runtime. Which means we have to provide the runtime too. (OSTree provided in rpm?)
Possible, I did something similar for snap packages utelizing deb packages (since it is/was not yet possible to build snaps via rpms).
Ok. When we go further with this I will ask you for your assistance in providing OSTree repos in rpms.
- flatpak was/is designed to fit graphical desktop applications. So providing daemons and deliver service files will not work.
well, IMHO okay. It could be extended if that is wanted later...
In the past weeks I learned a lot about flatpak/OSTree and how to use it. But there is still a way to go. I have forked the repository from Frederic and pushed my work in there.
You find the github repository here: https://github.com/lethliel/opensuse-flatpak-runtime Under examples/ you will find the working screen manifest. There is also a more complex manifest example. (Which fails at module glib2; source "shell". I don't know why) But it gives an overview of the layout and sources that are possible. If you get it to run, please feel free to contribute to my git repository.
At the moment I don't have the time to work on this any further and I wanted to share the progress with the community.
thanks a lot for the effore adrian
Greetings, Marco -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
Marco Strigl