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

Linux Cross-Platform Packaging #34

Closed
benhosmer opened this issue Dec 22, 2017 · 48 comments
Closed

Linux Cross-Platform Packaging #34

benhosmer opened this issue Dec 22, 2017 · 48 comments

Comments

@benhosmer
Copy link
Contributor

A continuation of the need for pre-built rpms that lead to exploration of creating portable linux desktop builds. #14 for historical reference.

@probonopd
Copy link

I am happy to help set up AppImage generation. Would something like Travis CI be suitable or are you using another build pipeline?

@benhosmer
Copy link
Contributor Author

@probonopd I believe zeal uses Travis already: https://travis-ci.org/abn

Here's the thing, I've been working on building flatpak packages for zeal. I've never built flatpak or appimage. I've consumed both. I decided on flatpak because the documentation for appimage was really confusing.

It would be nice to have a hello-world example of how to create an appimage. I do like the fact that appimage seems to be lighter weight for users, since there's nothing to install, unlike flatpak.

My perspective is that no one really cares that much as to which one this project uses. I volunteered to do flatpak since it was my original desire to have rpms that spawned this. If you're willing to help with appimage, I certainly won't turn that down.

@probonopd
Copy link

I decided on flatpak because the documentation for appimage was really confusing.

That is very unfortunate. Can you explain exactly what you were struggling with? We think we have quite extensive documentation in https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages

It would be nice to have a hello-world example of how to create an appimage

Check https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci and especially the real-world examples at https://github.com/probonopd/linuxdeployqt#projects-using-linuxdeployqt

Please let me know what is unclear so that we can improve it.

@probonopd
Copy link

I believe zeal uses Travis already: https://travis-ci.org/abn

Seems to be the private project of Arun Babu Neelicattu, is that where the official Zeal packages get built?

@abn
Copy link
Contributor

abn commented Dec 24, 2017

@probonopd that travis build config corresponds to https://github.com/abn/zeal-rpm and as of now there are no official zeal rpm packages builds. That builds an srpm in a clean room environment based on the zeal-packaging rpm spec file and then triggers a copr build that builds the packages distributed in that repository (unofficial).

@benhosmer @probonopd I believe it is okay to have PoCs of both AppImage and Flatpack versions of the application; and make a decision at a later point as to which one to use or both. Just adding my 2c there.

@probonopd
Copy link

So would a PR for https://github.com/zealdocs/zeal that would implement building on Travis CI be considered?

@trollixx
Copy link
Member

trollixx commented Dec 29, 2017

@probonopd Zeal itself doesn't use Travis (https://travis-ci.org/zealdocs has no projects). And I am not sure what do you mean by "official packages". AFAIK all distros that ship Zeal have their own build services, same for our Ubuntu PPA.

There are only official builds for Windows, but they are unrelated to this discussion.

@probonopd
Copy link

Yes, how can we get Linux builds that are done by upstream (and not by a third party like a distribution) like for Windows?

@trollixx
Copy link
Member

trollixx commented Dec 29, 2017

I guess that depends on actual packaging format. If Travis CI is enough for building and releasing AppImage packages, let's use it. If not, we can either use another public CI service, or our own Digital Ocean VMs. I would prefer some public CI, since it should require less maintenance going forward.

@probonopd
Copy link

probonopd commented Dec 29, 2017

Agree, so let's try to do it on Travis CI.
Started the work here: https://github.com/probonopd/zeal/blob/patch-1/.travis.yml

@probonopd
Copy link

probonopd commented Dec 30, 2017

The AppImage seems to be working for me:
https://github.com/probonopd/zeal/releases

Please test it and report back here. If it works for you, too, I will send a PR.

Screenshot

zeal

@probonopd
Copy link

Minor issue, the correct icon is not used here:

issue

Probably it is attempted to be loaded from /usr/share where it does not reside. Quite possibly the source code would need to be adjusted to use a relative path (relative to the main executable) instead.

@trollixx
Copy link
Member

trollixx commented Jan 8, 2018

@probonopd I finally got a chance to test your build, and for the most parts it works quite well, so I like the idea. Here's some observations:

  • App indicator for some reason could not update its menu, and always displayed "Show Zeal" option.
  • I didn't encounter your problem with the tray icon.
  • Qt WebKit is super old and buggy, if we bundle all dependencies anyway, then we should include the most recent veresions.

Tested on Ubuntu 16.04 x64 with Unity.

@probonopd
Copy link

Isn't the icon on my screenshot the "app indicator"?

Which Qt/WebKit version should we use? If I am not mistaken, Qt moved from WebKit to WebEngine (Chromium based) in newer versions.

In any case @trollixx, do you think you could take over from https://github.com/probonopd/zeal/blob/patch-1/.travis.yml and make changes as you see fit?

@trollixx
Copy link
Member

trollixx commented Jan 8, 2018

Isn't the icon on my screenshot the "app indicator"?

No idea. The icon is fine on Arch Linux + AwesomeWM as well.

Which Qt/WebKit version should we use? If I am not mistaken, Qt moved from WebKit to WebEngine (Chromium based) in newer versions.

Qt WebKit is being revived. See this article. Arch Linux now ships the updated version by default.

In any case @trollixx, do you think you could take over from https://github.com/probonopd/zeal/blob/patch-1/.travis.yml and make changes as you see fit?

I guess I can give it a try. Not sure on the timeline.

By the way, is there a way to bundle OpenSSL in AppImage as well? On my Arch you package couldn't connect to the Internet, because it wanted OpenSSL 1.0, and I have 1.1.

@probonopd
Copy link

Thanks for the update on Qt WebKit. Interesting.

By the way, is there a way to bundle OpenSSL in AppImage as well?

Yes, but I'd ask you to exactly describe your system and the errors you are getting on https://github.com/probonopd/linuxdeployqt/issues/, possibly (if it looks to be related) in probonopd/linuxdeployqt#110. Thanks!

@trollixx
Copy link
Member

trollixx commented Jan 8, 2018

@probonopd I created a ticket explaining what's going on on Arch Linux. There's really no good workaround rather than bundling either OpenSSL 1.0 or 1.1, depending on Qt version. How do I tell linuxdeployqt to include OpenSSL? Worth noting, that it's a runtime, not a link dependency.

The wiki doesn't mention OpenSSL 1.1 at all.

@probonopd
Copy link

probonopd commented Jan 9, 2018

Are you saying that applications compiled for OpenSSL 1.0 refuse to run on OpenSSL 1.1 systems in general? Wouldn't that be an OpenSSL bug? (In my opinition, if I compile anything against version n of a library, I expect my application to still run with version n+.1 of said library - otherwise the library cannot be relied on.)

Relevant details:
https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#No_longer_works

Certainly something we might want to mention on https://github.com/AppImage/AppImageKit/wiki/Desktop-Linux-Platform-Issues

@trollixx
Copy link
Member

trollixx commented Jan 9, 2018

@probonopd Not a bug, just confusing versioning OpenSSL uses.

So we do need to bundle OpenSSL to be able to run on systems, that don't have v1.0 or v1.1 (depending on the system AppImage is packaged on).

You mentioned above that bundling is possible, but I don't see how. There's only a switch to include system libraries, but again Qt is not linked to OpenSSL, so that would not work.

@probonopd
Copy link

probonopd commented Jan 9, 2018

You mentioned above that bundling is possible, but I don't see how.

Just put it inside the AppDir prior to it being converted to an AppImage. You may need to modify it so that it will search for certificates in all the different places in which different Linux distributions tend to scatter them around.

@probonopd
Copy link

probonopd commented Jan 9, 2018

On my Arch you package couldn't connect to the Internet, because it wanted OpenSSL 1.0, and I have 1.1.

I think OpenSSL 1.1 is broken if it cannot run applications that are compiled against OpenSSL 1.0.

Please add this example to https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#No_longer_works. They are explicitly asking for it:

If you find your library or program used to work with OpenSSL 1.0.2 but no longer works with OpenSSL 1.1.0, then please add details to discussion below at Things that no longer work.

Thank you.

@probonopd
Copy link

probonopd commented Jan 9, 2018

Qt WebKit is being revived. See this article. Arch Linux now ships the updated version by default.

I am trying to compile Zeal with the official Qt 5.10.0 from http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5100.

I can see components called "qtwebengine", "qtwebview" and "qtwebchannel" but nothing named "qtwebkit".

The build fails with

CMake Error at /home/travis/Qt/5.10.0/gcc_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5WebKit" with
  any of the following names:
    Qt5WebKitConfig.cmake
    qt5webkit-config.cmake
  Add the installation prefix of "Qt5WebKit" to CMAKE_PREFIX_PATH or set
  "Qt5WebKit_DIR" to a directory containing one of the above files.  If
  "Qt5WebKit" provides a separate development package or SDK, be sure it has
  been installed.

What do I need to do?

@trollixx
Copy link
Member

trollixx commented Jan 9, 2018

It's not yet shipped as part of the official SDK, although some distributions (Arch, Debian) already package it. So for now you need to build it yourself or use prebuilt binaries.

@trollixx
Copy link
Member

@benhosmer Just curious, have you had any luck with Flatpack?

@benhosmer
Copy link
Contributor Author

@trollixx I think I started a skeleton, but abandoned it when @probonopd volunteered to do appimage.

@trollixx
Copy link
Member

I think it would make sense to provide all popular packaging options, just cover wider audience.

@mrkz
Copy link

mrkz commented Jan 31, 2018

looking forward to have a Flatpak app as well :)

@probonopd
Copy link

If someone gets this to build on Ubuntu 14.04 (trusty) on Travis CI, I'm happy to take over from there and do the AppImage.

Here is what I have so far:
https://github.com/probonopd/zeal/blob/qt5100/.travis.yml

So for now you need to build it yourself or use prebuilt binaries.

I don't know what I need to do exactly. Can you send a PR to my file above?

@trollixx
Copy link
Member

@probonopd Ubuntu 14.04 is too old. We need Qt 5.6 minimum. And in a couple months we'll bump to 5.9.

Another thing that should be addressed is Qt WebKit. We need to bundle with 5.212 which has A LOT of bug fixes and improvements compared to any previous version.

Ideally I would prefer to have a custom built Qt as well. We can drop a bunch of features Zeal doesn't need, e.g. QML.

@probonopd
Copy link

@probonopd Ubuntu 14.04 is too old. We need Qt 5.6 minimum. And in a couple months we'll bump to 5.9.

Qt 5.10 is available for trusty, either from qt.io or from https://launchpad.net/~beineri/+archive/ubuntu/opt-qt591-trusty (soon).

@barthalion
Copy link

I can look at adding Zeal to Flathub, even more so if someone from Zeal team would be interested in co-maintaining it. With KDE runtime available, it wouldn't need more attention than changing tag/commit used to build from.

While I maintain Arch package, I find any distribution specific work on leaf packages waste of time and I'd like to orphan it at some point.

@trollixx
Copy link
Member

@barthalion I am all for publishing Zeal to as many places as possible, I am just concerned about the cost of maintenance. Updating a PKGBUILD takes a couple of minutes, if maintaining the Flatpack is about the same effort, then I can take care of it.

@abn
Copy link
Contributor

abn commented Apr 28, 2018

@trollixx I have a prototype flatpak packaging working at https://github.com/abn/zeal-packaging/tree/flatpak/flatpak having to rebuild qtwebkit every time makes me think that should be build and managed elsewhere as an extension to the KDE runtime. Will improve on it and send a PR soon.

@abn
Copy link
Contributor

abn commented Apr 29, 2018

Looks like I missed work being done in zealdocs/zeal#911. Will review status across projects.

@asashnov
Copy link

asashnov commented Oct 3, 2018

If someone gets this to build on Ubuntu 14.04 (trusty) on Travis CI, I'm happy to take over from there and do the AppImage.

Here is what I have so far:
https://github.com/probonopd/zeal/blob/qt5100/.travis.yml

This is the really cool implementation of what official Qt Installer does in Bash!

@trollixx
Copy link
Member

trollixx commented Oct 13, 2018

Zeal has been published to Flathub.

@probonopd
Copy link

Zeal AppImage has been published to https://github.com/probonopd/zeal/releases/tag/continuous.

@trollixx
Copy link
Member

@probonopd It looks to me like you built v0.5.0, not the latest v0.6.1.

@probonopd
Copy link

probonopd commented Oct 13, 2018

Oops! Forgot to update.

@probonopd
Copy link

v0.6.1 will appear on https://github.com/probonopd/zeal/releases/tag/continuous shortly. Let me know if you would like a pull request that would produce those automatically.

@trollixx
Copy link
Member

I'd like to start with packaging CI builds into AppImage, so we can provide easy-to-run test binaries similarly to what we have for Windows.

I've just consolidated Linux and Windows CI's at AppVeyor, and I hope copy-pasting from @probonopd's .travis.yml will just work :)

The OpenSSL 1.0 vs 1.1 thingie is a bit of a concern though.

@probonopd
Copy link

Might be useful, e.g., for Clear Linux OS. clearlinux/distribution#415

@xgdgsc
Copy link

xgdgsc commented Jul 20, 2019

Is 0.6.1 in appimage released? I still see this bug zealdocs/zeal#892

@probonopd
Copy link

I still cannot see any AppImages on https://github.com/zealdocs/zeal/releases unfortunately. What would be needed to get them there?

@trollixx
Copy link
Member

Closing this as we already have the Flatpak package. Progress on Snap can be tracked in zealdocs/zeal#1062.

Because we only supports Qt version included in the most recent Ubuntu LTS release, it makes Zeal incompatible with AppImage packaging tools, and their hard-coded checks for the oldest supported LTS release (based on glibc version I believe). At this time I have no desire to work around the restrictions of the tools, or depend on archaic Qt versions.

@probonopd
Copy link

probonopd commented Sep 15, 2019

Closing this as we already have the Flatpak package. Progress on Snap can be tracked in zealdocs/zeal#1062.

This is not comparable to AppImage. It does not make portable, one-file applications.

Because we only supports Qt version included in the most recent Ubuntu LTS release, it makes Zeal incompatible with AppImage packaging tools

I think there is a big misunderstanding. Ubuntu 18.04.3 LTS is currently the latest LTS release. According to https://packages.ubuntu.com/search?keywords=qt, it comes with Qt 5.9.x.

To compile applications that run on all still-supported LTS releases of Ubuntu, we need to compile on the oldest still-supported LTS release, which currently is Ubuntu 16.04.x. This does not mean we need to use the Qt that came with it, but we can also use a newer Qt that works on Ubuntu 16.04.x. This is because a subset of Qt will be bundled and shipped along with the application.

Qt 5.11.3 for /opt Xenial is currently the latest that is available from https://launchpad.net/~beineri.

and their hard-coded checks for the oldest supported LTS release (based on glibc version I believe). At this time I have no desire to work around the restrictions of the tools, or depend on archaic Qt versions.

Again, you can use very recent versions of Qt on all still-supported LTS releases of Ubuntu.

It is general best practice to develop applications for the oldest still-supported distributions, not for the latest bleeding edge stuff. This is to ensure that all users (as opposed to just those running the latest and greatest operating systems) can use the applications.

Would you be interested in an AppImage in case I send a PR?

Actually, it's kinda funny, because I already made one some time ago, showing that it is working:

https://github.com/probonopd/zeal/releases/tag/continuous

@trollixx
Copy link
Member

Would you be interested in an AppImage in case I send a PR?

If you are willing to maintain it, then of course! :) Almost all packages at this point are not maintained by me.

Not sure if it's a good idea to rely on 3rd party Qt builds, but at the same time that PPA have been around for quite some time.

It's unlikely that I would get to working on preparing AppImage packages myself, but if packaging can be integrated in the existing CI pipeline, and not require any work beyond then initial setup, I'm all for it.

@probonopd
Copy link

It's unlikely that I would get to working on preparing AppImage packages myself, but if packaging can be integrated in the existing CI pipeline, and not require any work beyond then initial setup, I'm all for it.

Yes, it can be automated. I have been using Travis CI. Would that be acceptable for you or does it need to go through Shippable?

This is the file that does it:
https://github.com/probonopd/zeal/blob/patch-1/.travis.yml

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

No branches or pull requests

8 participants