sirikali icon indicating copy to clipboard operation
sirikali copied to clipboard

Flatpak release

Open aardbol opened this issue 5 years ago • 11 comments

Is it maybe possible to release the app also as a flatpak? This will make the installation and update process much simpler and would be a great way to start 2020!

Happy new year also :-)

aardbol avatar Jan 01 '20 19:01 aardbol

Its on my TODO list.

mhogomchungu avatar Jan 02 '20 06:01 mhogomchungu

I second this :)

kupiqu avatar Apr 01 '20 12:04 kupiqu

Flatpak version would be great (if it is technically possible)!

AsciiWolf avatar Jun 29 '20 15:06 AsciiWolf

I'm gonna try to compile it with SUSE OBS to package it natively as soon as I can spend some time on it

aardbol avatar Aug 04 '20 20:08 aardbol

Below image shows i have managed to successfully build a flatpak for SiriKali but backends do not work with it and they produce the error seen in the image and i am stuck at this point.

To make backends visible to Sirikali in flatpak, you will have to configure flatbak to get access to user home directory and put the backends in "$HOME/bin" or "$HOME/.bin" folders.

The flatpak config file i am using follows after the image.

Screenshot_20200805_071112

{
    "id": "org.qt.SiriKali",
    "branch": "master",
    "runtime": "org.kde.Platform",
    "runtime-version": "5.12",
    "sdk": "org.kde.Sdk",
    "command": "sirikali",
    "finish-args": ["--share=ipc", "--socket=fallback-x11", "--filesystem=/bin","--filesystem=/usr/sbin", "--filesystem=/usr/bin", "--filesystem=/proc/self", "--filesystem=home" ],

    "modules": [
        {
            "name": "sirikali",
            "buildsystem": "cmake",
            "config-opts": ["-DCMAKE_BUILD_TYPE=RELEASE","-DNOKDESUPPORT=TRUE"],
            "sources": [
                { "type": "git", "url": "https://github.com/mhogomchungu/sirikali.git" }
            ]
        }
    ]
}

mhogomchungu avatar Aug 05 '20 04:08 mhogomchungu

@mhogomchungu Nice! You can (and probably should) include the backends directly in the Flatpak. They should work fine as long as they don't require root permissions, custom udev rules or other special things.

AsciiWolf avatar Aug 05 '20 16:08 AsciiWolf

@mhogomchungu, do you have a branch we can take a look at? Also you can submit a Draft Merge Request to Flathub, it would be easier — and probably more people can take a look at.

x80486 avatar Sep 21 '20 00:09 x80486

First things first:

  1. What backend are you using?

  2. These guys at cryptomator[1] have so far failed to make a working fuse based flatbak package for their application and it puts doubts if it is possible to do it.

  3. Do you know of any fuse using flatbak application?.

There is nothing to take a look at because i am not settled on a course of action. SiriKali depends on CLI based external projects and there are two ways to solve this:-

  1. SiriKali should bundle these external applications in its flatpak.
  2. These projects should create flatpak applications and SiriKali should use installed versions.

Bundling other tools does not seem like a very good idea(which ones should i bundle??) and i am currently pursuing option 2. I tried to make a gocryptfs flatpak and it doesnt work and image 1 has the errors i am getting. Gocryptfs has a custom build script[2] and it fails to run for some reason and i suspect the reason if because the flatpak building process does not allow arbitrary network access. I tried to add what is necessary for flatpak to download the required go-fuse package and gocryptfs build script just errors out at another place.

I moved on and tried to create securefs flatpak and it fails because all the runtime i have tried does not have development files for fuse so i can not compile any backend that require fuse development files.

Another issue is that none of the runtimes i have tried ship with "fusermount" binary application. This application is required to be present because it is the one that unmounts file systems and it needs to be suid-root and this maybe a big problem.

Where i am now is trying to build libfuse in a flatpak.

[1] https://github.com/cryptomator/cryptomator/issues/729 [2] https://github.com/rfjakob/gocryptfs/blob/master/build.bash

Image 1: Screenshot_20200922_093800

mhogomchungu avatar Sep 22 '20 07:09 mhogomchungu

This other app that works similar to SiriKali solved the issue using the apps installed on the base system, https://github.com/flathub/io.github.mpobaschnig.Vaults/blob/master/io.github.mpobaschnig.Vaults.json#L79

FacundoAcevedo avatar Jan 23 '22 00:01 FacundoAcevedo

Together with #237 the flatpak just needs --filesystem=home:ro

teohhanhui avatar Oct 29 '23 07:10 teohhanhui

I hope this gets added soon! it seems with:

This other app that works similar to SiriKali solved the issue using the apps installed on the base system, https://github.com/flathub/io.github.mpobaschnig.Vaults/blob/master/io.github.mpobaschnig.Vaults.json#L79

that it is technically possible! a similar implementation should be attempted :)

Cyanide-1 avatar Mar 20 '24 00:03 Cyanide-1