Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak version #5017

Closed
theScrabi opened this issue Jan 20, 2019 · 18 comments
Closed

Flatpak version #5017

theScrabi opened this issue Jan 20, 2019 · 18 comments

Comments

@theScrabi
Copy link

theScrabi commented Jan 20, 2019

Hay guys, I had to learn for finals, so I'm procrastinating and wrote a flatpak build file for electrum.
It is not quite 100% working yet as you can not open the open file dialog in the release version, but the rest is working so far. I am not going to send it as a Pullrequest here since buildfiles do not belong into this repository, but in one over at flathub.

Thus the buildfiles are stored in this zip file here:
flatpak_buildfile.zip

This is what the README.md in the file is saying:


Electrum flatpak buildfile

  1. Install dependencies with flatpak install org.kde.Sdk//5.12 org.kde.Platform//5.12
  2. Build it with flatpak-builder build-dir org.electrum.electrum.json. Sometiems you have to install eu-strip command before it can compile.
  3. Run the test build with flatpak-builder --run build-dir org.electrum.electrum.json electrum
  4. Install the test build following this description..

Known issues: In the installed app you cann not open the file diealog since it is showing

(python3:5): GLib-GIO-CRITICAL **: 13:30:41.583: g_unix_is_system_fs_type: assertion 'fs_type != NULL && *fs_type != '\0'' failed

(python3:5): GLib-GIO-CRITICAL **: 13:30:41.583: g_unix_is_system_device_path: assertion 'device_path != NULL && *device_path != '\0'' failed

Segmentation fault (Speicherabzug geschrieben) 

If you are willing to put this into flathub.org you may want to get a repostiroy for the buildfiles here. You may also add a manifest and other stuff before releasing.
Please node that I am not a flatpak guy and not capable of maintaining this script. Please get in contatct with flathub members instead.

@bauerj
Copy link
Collaborator

bauerj commented Jan 20, 2019

Hey,

thanks for working on this! Sadly, we are no "Flatpack guys" ourselves so we won't be able to maintain the package either. It would probably make more sense if someone who's experienced in maintaining Flatpack packages would take care of that.

Would you be willing to get in touch with Flatpack members to get this added as an unofficial package?

@theScrabi
Copy link
Author

Uff I am kind of on top with all of my projects my self. Lets see if someone else is willing to look into this first.

@theScrabi
Copy link
Author

All right, I opened up a pull request at flathub:
flathub/flathub#837

@A6GibKm
Copy link

A6GibKm commented Aug 9, 2019

I am making a flatpak at https://github.com/A6GibKm/flathub/tree/org.electrum.electrum, will push soon.

@A6GibKm
Copy link

A6GibKm commented Aug 9, 2019

I made a PR to flathub flathub/flathub#1102.

@A6GibKm
Copy link

A6GibKm commented Aug 9, 2019

A 256x256 (or a scalable svg) icon should be added upstream. I am not sure if flathub can be builded without one.

The setup.py invoked the variable sys.prefix which was set to /usr, I had to change it to flatpak's /app, I think the setup should use /usr/local anyways.

Any chance of including the appdata in the distributed electrum? This is part of he freedesktop spec and many distros use it.

@A6GibKm
Copy link

A6GibKm commented Aug 11, 2019

At https://flathub.org/apps/details/org.electrum.electrum

@ralyodio
Copy link

I get an error.

$ flatpak run org.electrum.electrum
Gtk-Message: 18:30:00.128: Failed to load module "canberra-gtk-module"
Gtk-Message: 18:30:00.128: Failed to load module "canberra-gtk-module"
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
Could not initialize GLX

@yanchenko-igor
Copy link

i have an issue with flatpak version,

E | plugins.trezor.trezor | error importing trezorlib
Traceback (most recent call last):
  File "/app/lib/python3.7/site-packages/electrum/plugins/trezor/trezor.py", line 24, in <module>
    import trezorlib
ModuleNotFoundError: No module named 'trezorlib'

Could you please include trezorlib? maybe as an extension if not everyone needs it?

@A6GibKm
Copy link

A6GibKm commented Apr 18, 2020

How do you add it to electrum?

@yanchenko-igor
Copy link

The simplest way is to build [full] instead of [fast] (in build command), I'm not sure how to make it an extension though, I never found a documentation.

@A6GibKm
Copy link

A6GibKm commented Apr 18, 2020

I am having problems adding cython, any help would be appreciated.

@yanchenko-igor
Copy link

I am having problems adding cython, any help would be appreciated.

what error do you get? I managed to build it actually.

@A6GibKm
Copy link

A6GibKm commented Apr 18, 2020

  Running setup.py install for Cython ... -Error: module python3-Cython: Child process exited with code 137

Note that things are different when building a flatpak.

@yanchenko-igor
Copy link

I can successfully build cython with this module

{
    "name": "python3-cython",
    "buildsystem": "simple",
    "build-commands": [
        "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} cython"
    ],
    "sources": [
        {
            "type": "file",
            "url": "https://files.pythonhosted.org/packages/d9/82/d01e767abb9c4a5c07a6a1e6f4d5a8dfce7369318d31f48a52374094372e/Cython-0.29.15.tar.gz",
            "sha256": "60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30"
        }
    ]
}

@A6GibKm
Copy link

A6GibKm commented Apr 18, 2020

For some reason I can't even build

id: org.electrum.electrum
runtime: org.freedesktop.Platform
sdk: org.freedesktop.Sdk
runtime-version: "19.08"
command: electrum
finish-args:
        - --socket=x11
        - --socket=pulseaudio
        - --device=dri
        - --share=ipc
        - --share=network
modules:
  - name: python3-cython
    buildsystem: simple
    build-commands:
        - pip3 install --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} cython
    sources:
      - type: file
        url: "https://files.pythonhosted.org/packages/d9/82/d01e767abb9c4a5c07a6a1e6f4d5a8dfce7369318d31f48a52374094372e/Cython-0.29.15.tar.gz"
        sha256: 60d859e1efa5cc80436d58aecd3718ff2e74b987db0518376046adedba97ac30

@A6GibKm
Copy link

A6GibKm commented Apr 18, 2020

Please lets discuss this here flathub/org.electrum.electrum#6

@A6GibKm
Copy link

A6GibKm commented Apr 19, 2020

@bauerj @theScrabi since there is already a working flatpak build at flathub/org.electrum.electrum this issue should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants