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

Provide a Flatpak as software package for Linux #105

Open
vladimiroff opened this issue Oct 4, 2019 · 10 comments
Open

Provide a Flatpak as software package for Linux #105

vladimiroff opened this issue Oct 4, 2019 · 10 comments

Comments

@vladimiroff
Copy link

Flatpak is a technology for building, distributing, installing and running applications – primarily targeted at the Linux desktop and desktop applications.

Doing this will enable usage on other than debian or debian-based distributions.

@KNO56
Copy link

KNO56 commented Oct 9, 2019

Would really appreciate if someone would make this happen! I'm having issues with running on my Arch install; both the package in the AUR, attempting to install the .deb with debtap, and running the Windows version in Wine fail for me.

@onlykey
Copy link
Collaborator

onlykey commented Oct 10, 2019

@KNO56 There is also a CLI app, I know we have some users on Arch using that - https://github.com/trustcrypto/python-onlykey

@vladimiroff
Copy link
Author

@KNO56 the package in AUR stopped working at some point due to fontconfig updates. I've pushed an update to 5.2.0 which should work fine now.

Creating the AUR package is tedious, though. It actually downloads the .deb file built obviously for debian-based distributions, unpacks it and packs it back for Arch. That seems strange at first, why bother getting the .deb package and then unpack it, instead of just calling npm build and package it?

The reason is that the release command for linux actually only works under Debian (or Ubuntu or any other derivative) and uses the assumption that this is going to be used on such distribution by directly calling dpkg-deb. Creating release task just for arch is would need pretty much copy-pasting release_linux.js and change it slightly. Probably introducing flags for the release command for arch would work, too.

However, that means we've just covered two major distributions. What about the rest? This made me to request a Flatpak package which would benefit users of all distributions. On a second thought AppImage would work, too.

@onlykey
Copy link
Collaborator

onlykey commented Oct 18, 2019

@vladimiroff We did publish a snapcraft package, I would like to do a Flatpak as well but just finding the time to do this. Any assistance here would be great, here is the snapcraft.yaml, it simply extracts the .deb and links to the command and the desktop file.

name: onlykey-app
version: '5.2.0'
summary: Setup and configure OnlyKey
description: |
 Use this app to setup and configure OnlyKey for password management and 2-factor authentication.

grade: stable
confinement: devmode

parts:
  onlykey-app:
    plugin: dump
    source: OnlyKey_5.2.0_amd64.deb
    source-type: deb
    after:
      - nwjs-support
      - desktop-gtk3
    stage-packages:
      - gir1.2-gnomekeyring-1.0
      - libasound2
      - libgconf-2-4
      - libgl1-mesa-glx
      - libglu1-mesa
      - libgnome-keyring0
      - libcap2
      - libgcrypt20
      - libnotify4
      - libnspr4
      - libnss3
      - libpulse0
      - libxtst6
      - libxss1

apps:
  onlykey-app:
    command: bin/desktop-launch  $SNAP/opt/OnlyKey/nw
    desktop: usr/share/applications/OnlyKey.desktop
    environment:
      TMPDIR: $XDG_RUNTIME_DIR

Documentation has been updated to include snap instructions - https://docs.crp.to/linux.html

@KNO56
Copy link

KNO56 commented Oct 20, 2019

@KNO56 the package in AUR stopped working at some point due to fontconfig updates. I've pushed an update to 5.2.0 which should work fine now.

Many thanks @vladimiroff, it works like a charm now!
Also thanks for the prompt reply @onlykey, and thanks again for providing this product, truly a great creation!

@Sami32
Copy link

Sami32 commented Jul 19, 2022

https://keepassxc.org/blog/

"Our experience shows that Flatpak has been a more stable platform than Snap, which has had many deployment bugs over the years, so we decided to deprecate it in favour of Flatpak."

@onlykey
Copy link
Collaborator

onlykey commented Dec 22, 2022

I'm not familiar with how to deploy a flatpak. Anyone from the community with experience with this that wants to try this? Not sure if you could convert DEB to flatpak from releases here https://github.com/trustcrypto/OnlyKey-App/releases/tag/v5.3.6

@x80486
Copy link

x80486 commented Dec 23, 2022

They are usually published on Flathub, because it's the most popular store for these applications. You can also host it yourself.

You can definitely start with a DEB, but ideally building from sources should be the end game. Also, since this is a security-sensitive application I highly doubt they would accept anyone but the owners maintaining it.

I can start it and take it to completion, at least from the DEB approach. Then the build from sources with any adjustments that it might need could be accomplished down the path.

@onlykey
Copy link
Collaborator

onlykey commented Dec 23, 2022

@x80486 Great, thank you! If you can share the script or method you use to generate the Flatpak I can take it from there.

@Ian2020
Copy link

Ian2020 commented Oct 20, 2023

Hi, I took a shot at this and have produced a working flatpak of the latest version (5.5.0). Build instructions and other details are all in my repo:

https://github.com/Ian2020/io.onlykey.OnlyKey-App

I'm looking for feedback, it seems to work for me but please raise any issues in my repo though rather then here.

It would be great if onlykey could take on the maintenance of this so we can ultimately have an official version available on flathub. I don't think people would trust a build from me or a third-party of such a security app.

There were quite a few hurdles to making this. The main one is that the nw dependency had a broken installer which I had to fix by pointing the build at my own fork of their code. They have now fixed the issue but it's not yet released. So I think an official build might want to wait for the next release of NWJS at least.

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

No branches or pull requests

6 participants