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

package Qownnotes as appimage (feature request) #534

Closed
stavpup opened this Issue Mar 4, 2017 · 39 comments

Comments

Projects
None yet
6 participants
@stavpup

stavpup commented Mar 4, 2017

Using AppImageKit you can package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, Ubuntu, Fedora, debian and derivatives

Relative links

http://appimage.org

https://en.wikipedia.org/wiki/AppImage

https://github.com/probonopd/AppImageKit

@pbek

This comment has been minimized.

Owner

pbek commented Mar 4, 2017

Why don't you use the snap package, if you want a generic package? Which operating system are you currently using that isn't supported?

@probonopd

This comment has been minimized.

probonopd commented Mar 5, 2017

@pbek multiple options here:

  • You could bundle the continuous Travis CI builds as an AppImage -- see this Pull Request for another project which does it in a 32-line .travis.yml script (I would have sent a PR for your .travis.yml but it looks a bit... overwhelming)
  • Seeing that you are using openSUSE Build Service (OBS), you could be adventurous and try the new OBS AppImage target by @adrianschroeter (but likely will need his help at this stage because it is all still very fresh)
  • You could write a .yml file that would convert existing deb packages to an AppImage

Providing an AppImage would have, among others, these advantages:

  • Works for most Linux distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Just one format for all major distributions
  • Works out of the box, no installation of runtimes needed (unlike Snap and Flatpak)
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs (unlike Flatpak)
  • Can use the same AppImages when dual-booting multiple distributions

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 5, 2017

Thank you for your research, maybe I'll look into the process in the future.

@pbek pbek added the enhancement label Mar 6, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Mar 6, 2017

meanwhile you can use the native Debian packages ;)

@adrians

This comment has been minimized.

adrians commented Mar 6, 2017

Hey guys,

Just FYI, I think you made a typo in this bug-report, and mentioned me instead of someone else.
If you tag the correct person, they might even know what's going on :) .

Keep up the good work,
AdrianS

@philiptruax

This comment has been minimized.

philiptruax commented Mar 6, 2017

Snap packages work on all of the distros listed above, including Debian as listed at snapcraft.io. While there are certainly benefits to packaging in different formats, wouldn't the appropriate thing to do be to do so oneself instead of suggesting a lone dev who is providing rapid updates to a product with little to no assistance? The software already works on linux, MacOS, Windows, and the source is available to build from and I'm certain @pbek has no interest in getting involved in the forever war that is linux unified app packages.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 6, 2017

Thank you, @philiptruax :)

@stavpup

This comment has been minimized.

stavpup commented Mar 6, 2017

@philiptruax I appreciate your comment, so I would like to ask you if you have tried any of the distros listed yourself ever and if you have installed Qownnotes with snapd in them. And the "do it yourself" quote is talking nonsense, because if I had the know-how I would do it myself. Probably would make my own Qownnotes ;-) Also very nice of you to portray me as a bad person because I suggested something. Really..

@pbek I have tried the debian packages, but there are dependency issues because debian stable is usually far behind ubuntu.

@philiptruax

This comment has been minimized.

philiptruax commented Mar 6, 2017

@stavpup I'm not suggesting you're a bad person. Installation formats are a really common question on almost any single software project. You're not a bad person for asking. What is a fact though is that developers, especially open source developers, have a limited amount of time and passion. I brought up packaging as a thing a person can do as it's a very newbie friendly way to be able to contribute to a software product you enjoy, and I certainly hope you enjoy it. If it's feasible then you can perhaps describe a way that @pbek would be able to integrate into his already established workflow, or even better, take some of that work out of his flow.

Believe me when I say that what sounds trivial in development almost never is. It's also a really huge minefield to bring up installation formats simply because it's always a loaded political question, regardless of the merits for or against the product (see systemd or pulse audio for further examples).

The issues you're describing are exactly the type of issues that are common with a very stable, production ready environment like Debian. Software packages get to it slow, but issues tend to be significantly lessened because they've been worked out ahead of time. On the other side of the coin you have rolling distributions like Arch which get the latest and greatest version every time you update. This can, but not necessarily does, lead to some more risk associated. You may find that Debian Sid is a nice middle ground as you would get fairly quick and up to date packages while not taking on the risk of the experimental branch of the product.

My goal with my comment is to simply state that as packaging goes there are many solutions that already exist that do not require changes to the current build setup. I didn't suggest that the feature was without merit, I suggested that to get you up to the best possible version of the software available for you, there were already options that should exist. If you find these lacking please, by all means, submit a bug report of any problems and I'll work with you to resolve them. I'll do as much work as I can take off @pbek so that he can focus on making QON even better. :) Have a nice day.

@probonopd

This comment has been minimized.

probonopd commented Mar 7, 2017

Done it, wasn't hard:
https://github.com/probonopd/QOwnNotes/blob/patch-1/.travis.yml

This .travis.yml builds an AppImage on Travis CI and uploads it to transfer.sh on each git push. The download URL of the AppImage can be seen in the Travis CI build log, but something like this could be used to push each build on the GitHub Releases page.

Since is is built on Ubuntu 12.04 it should run on most distributions that have come out in the last 5 or so years.

What is a fact though is that developers, especially open source developers, have a limited amount of time and passion.

This is why I think making AppImages should be made as easy as using them, and linuxdeployqt exists for exactly this reason.

So what do you think, time to replace this

distros

by this

dld

and be done with it?

@pbek

This comment has been minimized.

Owner

pbek commented Mar 7, 2017

@probonopd, thank you for your travis template, looks easy enough to get it working for QON. I'll see how to integrate that into the current deployment process, release it on GitHub and get it into the webpage. There is no automated update process to update app images, right?
Btw. great work on linuxdeployqt!

Do you have the link to a prepared QON app image you created and uploaded to transfer.sh to test with?
EDIT: Found it on https://travis-ci.org/probonopd/QOwnNotes/builds/208412765: https://transfer.sh/2MLMa/qownnotes-git.81c6987-x86-64.appimage

Leaves us with the problem that we are stuck with Qt 5.6.2 (https://launchpad.net/~beineri/+archive/ubuntu/opt-qt562) on Travis CI and that there is no automated update update process for an app image yet...

And of course the app image's size isn't 200kB, but 27MB... ;)

@pbek

This comment has been minimized.

Owner

pbek commented Mar 7, 2017

@probonopd, when I run the app image under KDE Neon there are almost no icons in the toolbars and menus (even if set to use the internal icons). And the UI theme of QON didn't match the UI theme (Breeze) of KDE Neon... How does it look for you?

@probonopd

This comment has been minimized.

probonopd commented Mar 7, 2017

If you build it on trusty om Travis CI, then you could use the Qt 5.8 for /opt ppa from beineri.

AppImageUpdate can do binary delta updates, which means that you only download the approx. 200 KB from build to build. The optional appimaged daemon can integrate it nicely into the system:

Yes, I also get the missing icons. Don't know why that is, are you loading them from an absolute position (in the system) rather than from a path relative to the application itself?

Regarding the theming, Qt 5.8 looks much more native for me. We could also bundle some theme plugins.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 8, 2017

If you build it on trusty om Travis CI, then you could use the Qt 5.8 for /opt ppa from beineri.

is't Travis CI (with sudo environment) based on Precise?

AppImageUpdate can do binary delta updates, which means that you only download the approx. 200 KB from build to build. The optional appimaged daemon can integrate it nicely into the system:

thank you for the information, more to research...

Yes, I also get the missing icons. Don't know why that is, are you loading them from an absolute position (in the system) rather than from a path relative to the application itself?

by default the freedesktop theme icons are used, if non are found icons from a qrc are used

Regarding the theming, Qt 5.8 looks much more native for me. We could also bundle some theme plugins.

ideally it should look "native" regardless the Qt version...
does appimage use some kind of confinement by default? (like snap does)

@probonopd

This comment has been minimized.

probonopd commented Mar 8, 2017

is't Travis CI (with sudo environment) based on Precise?

Yes, but with dist: trusty you can get it to use trusty instead.

if non are found icons from a qrc are used

Are you using a path relative to the executable for this? Because absolute paths won't work (the icons are not in /usr/...)

does appimage use some kind of confinement by default? (like snap does)

No. But there is optional support for Firejail.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 8, 2017

Trusty

Oh, there is a beta for that... https://docs.travis-ci.com/user/trusty-ci-environment/
I didn't know, thank you!

Icons

The path is relative in the qrc:

confinement

I wonder why the styling settings aren't used then, because if I use a "native" package or build it myself QOwnNotes is styled like a KDE app when used under KDE and like a Gnome app under Gnome...
With the app image I kind of have the same issue like with the Snap, that uses a very basic styling.

@stavpup

This comment has been minimized.

stavpup commented Mar 8, 2017

side by side ubuntu mate and debian stable inside vbox https://ibin.co/3EspcSIjC63v.png

@pbek

This comment has been minimized.

Owner

pbek commented Mar 8, 2017

What happens when you enable the internal icon theme in the Interface settings?

@stavpup

This comment has been minimized.

stavpup commented Mar 8, 2017

It is exactly the same as before

@probonopd

This comment has been minimized.

probonopd commented Mar 8, 2017

By looking at the icons, it seems like the missing icons are from a different icon set than the working icons.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 8, 2017

Freedesktop theme icon handlers are used. But with the settings internal icons should be used... (like for Windows and macOS)

@stavpup

This comment has been minimized.

stavpup commented Mar 9, 2017

Windows and ubuntu version side by side. The icons that are the same are the ones that are missing https://ibin.co/3F03eUkRaBNx.png

@probonopd

This comment has been minimized.

probonopd commented Mar 9, 2017

Are these icons in a different file format than the others? Then we might need to bundle a Qt plugin to read that format.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 9, 2017

The icons are all svg from the Breeze and Breeze Dark themes.

@stavpup

This comment has been minimized.

stavpup commented Mar 10, 2017

So Freedesktop theme icons are system icons and the Breeze icons are the internal icon theme. But they don't work as predicted in linux.

@pbek

This comment has been minimized.

Owner

pbek commented Mar 10, 2017

So far they work everywhere except with the app image...

@stavpup

This comment has been minimized.

stavpup commented Mar 10, 2017

No, on ubuntu they are mixed freedesktop and Breeze, and changing to internal icons does not do anything different https://ibin.co/3F03eUkRaBNx.png

@Atheror

This comment has been minimized.

Atheror commented May 5, 2017

Qownnotes is a MUST HAVE for me. I'm trying void linux right now, but there is no flatpak or appimage for qownnotes. I will try to build from sources.

@pbek

This comment has been minimized.

Owner

pbek commented May 5, 2017

On which flavor of Linux are you on, @Atheror?

@Atheror

This comment has been minimized.

Atheror commented May 8, 2017

Hello @pbek. I'm using Void Linux with LXQt as Desktop environment but I use qownotes daily on other distros as Manjaro with KDE Plasma and Debian testing with Xfce.
Qownnotes successfully installed from sources on Void Linux.

@pbek

This comment has been minimized.

Owner

pbek commented May 8, 2017

Nice, @Atheror ;)

@pbek

This comment has been minimized.

Owner

pbek commented Jul 2, 2017

@probonopd, I finally managed to get together an AppImage with the help of OBS and your template.
You can download it at: http://download.opensuse.org/repositories/home:/pbek:/QOwnNotes/AppImage/

Unfortunately SQLite isn't yet working, do you have any idea what package is needed in the AppImage?
You'll find the configuration here: https://build.opensuse.org/package/view_file/home:pbek:QOwnNotes/desktop/appimage.yml?expand=1

@probonopd

This comment has been minimized.

probonopd commented Jul 2, 2017

Great work, @pbek.

# Extract the AppImage
linux@linux:~> /home/linux/Downloads/QOwnNotes-1498501942.2c6228d6-Build7.1.glibc2.14-x86_64.AppImage --appimage-extract

# Check what is going on
linux@linux:~> strace -f ./squashfs-root/AppRun 2>&1 | grep sql
[pid 26134] stat("/home/linux/squashfs-root/usr/plugins/sqldrivers/.",  <unfinished ...>
[pid 26134] stat("/home/linux/squashfs-root/usr/bin/sqldrivers/.",  <unfinished ...>

linux@linux:~> find /home/linux/squashfs-root/usr/plugins/sqldrivers/
find: ‘/home/linux/squashfs-root/usr/plugins/sqldrivers/’: No such file or directory

linux@linux:~> find /home/linux/squashfs-root/usr/bin/sqldrivers/
find: ‘/home/linux/squashfs-root/usr/bin/sqldrivers/’: No such file or directory

So, in summary it looks like usr/bin/sqldrivers/ directory and its contents are missing in the AppImage, which may well be a linuxdeployqt bug. It should be deployed here. Can you spot what is going wrong?

@pbek

This comment has been minimized.

Owner

pbek commented Jul 2, 2017

Thank you for your valuable insight! I still think some QtSql-Sqlite package could be missing and that is the reason for the missing sqldrivers directories but I wasn't able to find out what package that might be...

Your AppImage didn't have a Sqlite problem, am I correct?

@probonopd

This comment has been minimized.

probonopd commented Jul 2, 2017

Your AppImage didn't have a Sqlite problem, am I correct?

Correct,
https://transfer.sh/xxTvA/QOwnNotes-git.81c6987-x86_64.AppImage
contains

  • usr/plugins/sqldrivers/libqsqlite.so
  • usr/plugins/sqldrivers/libqsqlmysql.so
  • usr/plugins/sqldrivers/libqsqlodbc.so
  • usr/plugins/sqldrivers/libqsqltds.so
@pbek

This comment has been minimized.

Owner

pbek commented Jul 3, 2017

Hm, leaves us with the question which package is missing in the yml file.

@pbek

This comment has been minimized.

Owner

pbek commented Jul 3, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Jul 3, 2017

17.07.0

  • there now is a repository with QOwnNotes built as AppImage for 32 and 64 bit systems
    • please visit the AppImage installation page
      for instructions
    • if you run QOwnNotes from the AppImage the automatic updater will be
      enabled by default and you will be led the the AppImage download page if
      there is a new version of the application available

@pbek pbek added this to the 17.07.0 milestone Jul 3, 2017

@pbek pbek closed this Jul 6, 2017

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