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

Add the packaging metadata to build the QGIS snap #3545

Closed
wants to merge 8 commits into from

Conversation

come-maiz
Copy link

This is a package for the secure installation of apps that works in most Linux distributions.
Landing it upstream will enable builds for adventurous users.

@come-maiz
Copy link
Author

I've been trying to make a snap for qgis. You can find more information about snaps and snapcraft here: http://snapcraft.io/

Now I'm able to launch the application, but I'm getting a few errors: https://gist.github.com/elopio/e054f40e11761f2aa02a04d8339a880f

Would you be interested in providing a snap for your users? It has a few nice features, like transactional and automatic updates, complete isolation from other snaps, you can release on your own schedule independent of the distros release dates, and you have full control over your dependencies. We can upload this to the edge channel in the store, which is great for crowd testing and early adopters, while we make fix the remaining problems and make it to the stable release. I would love to have a recent QGIS always in my machine.

If you have any doubts or comments, please let me know :)

@nyalldawson
Copy link
Collaborator

Love it!

Some missing dependencies are

  • libqca-qt5-2-plugins
  • python3-gdal
  • qttools5-dev
  • python3-yaml

There may be others, but those may help....

@nyalldawson
Copy link
Collaborator

Quick question - I don't know much about the snap architecture, but does it allow the package to use a newer Qt version than is available in the ubuntu repos? Ideally this should use 5.7 due to a severe bug in Qt 5.5/5.6 (https://bugreports.qt.io/browse/QTBUG-47192)

@come-maiz
Copy link
Author

Thanks @nyalldawson. I'm about to leave for dinner. I will add the deps and try again when I'm back.
You can ship whatever qt version you like. The easiest is to use the build-packages from ubuntu like I did, but you can add another part called qt, and install it in any way you like.

@pcav
Copy link
Member

pcav commented Sep 30, 2016

IMHO snap is an excellent and much needed way to install multiple versions of QGIS, and it would help a lot testing QGIS3: would it be possible for you to provide development snaps?
Thanks.

@tomchadwin
Copy link
Contributor

This sounds perfect - thanks, @ElOpio!

@tjyrinki
Copy link

As a sidenote you can follow QTBUG-47192 progress (well, the upstream bug is marked Invalid but yes there were big changes in 5.7) in https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1620173 - I'm thinking of trying backporting the related patches again after 16.10 is released, but it caused too much trouble at the late time to be included. Of course, eventually Qt 5.7 will be there in 17.04 too, but let's see if we'll get some sort of other option for snaps before that.

@nirvn
Copy link
Contributor

nirvn commented Sep 30, 2016

@tjyrinki , great; thanks for the efforts your putting into this, it is greatly appreciated over here.

@come-maiz
Copy link
Author

Hey, sorry for the late reply.
I'm trying different combinations of packages, and every trial takes some time.
Now I'm getting this:

sip: Unable to find file "QtCore/QtCoremod.sip"

Any idea what's the package that provides that?

@come-maiz
Copy link
Author

@pcav maybe you can push to the store also a qgis3 package. Where is the branch for qgis3?
The idea of the store is that each snap has four channels: edge, beta, candidate and stable. As a user, it's really simple to jump from one channel to the other depending on how brave you are feeling. Every time a new version is pushed to a channel, all the users will get an automatic update.

@pcav
Copy link
Member

pcav commented Oct 1, 2016

@ElOpio, this would be excellent. The branch is in the main repo. I'm available for testing, not so much to learn packaging (I have my share of the burden already, sorry).
Thanks.

@m-kuhn
Copy link
Member

m-kuhn commented Oct 3, 2016

@ElOpio I'm really excited to see effort being put into this kind of modern, portable packaging. Can you provide instructions for how this is built?

An idea I had for quite some time is to use this kind of builds on our continuous integration test infrastructure. I hope that it will be easier to inject up-to-date dependencies and as a nice side-effect we could possibly even upload the build artifacts (packages) for the latest and greatest master builds somewhere.

@come-maiz
Copy link
Author

@luipir
Copy link
Contributor

luipir commented Oct 4, 2016

Authentication System: DISABLED would be related with

QCA's qca-ossl (OpenSSL) plugin is missing ?

@come-maiz
Copy link
Author

Alright, progress my friends!
I am no longer getting any python errors on launch. Now to fix the other two.

@tjyrinki
Copy link

Ok if you have plenty of extra free time (and build time) available I've announced the first draft of "qt57" cloud part being available: https://lists.ubuntu.com/archives/snapcraft/2016-October/001294.html

That is, Qt 5.7.1 that is built as part of your app build with [after: qt57](and see the github example for parts/plugins and launcher)

It works for my simple test case, but I can assure you it can't be completely easy or fast for all use cases, since I only just got it working :)

@keshavbhatt
Copy link

i need this [after: qt57] for my application how can i use it please help :(

@come-maiz
Copy link
Author

Hello again!

Soon, I will have more time to dig into the remaining problems, because my holidays start next week.
However, I need some help, specially to find debug information to understand them.

In particular, I'm right now looking at why this fails:
https://github.com/qgis/QGIS/blob/master/src/core/auth/qgsauthmanager.cpp#L119
Any help will be appreciated.

@nyalldawson
Copy link
Collaborator

@ElOpio We are cleaning up the queue of open pull requests and are closing PRs which have not seen activity in a long time. Please reopen if you get a chance to continue this (valuable!) work.

@nyalldawson nyalldawson closed this Aug 6, 2017
@come-maiz
Copy link
Author

Thanks @nyalldawson

To continue, I will need help from somebody with more knowledge about the codebase. So, I guess it's ok to leave it closed. In the future, if somebody from your team thinks the snap will be useful, you can always ping me.

pura vida.

@mbernasocchi
Copy link
Member

@ElOpio what sort of help do you need? Snap is getting quite a lot of traction and ith would be good to offer this

@mbernasocchi
Copy link
Member

maybe we could also join forces with @Wollac from Wollac/snap-qgis

@come-maiz
Copy link
Author

@mbernasocchi it is getting a lot of traction, right? we are so excited here, many more important announcements coming soon :)

I think the first thing should be for you or somebody from the team to register the name in dashboard.snapcraft.io. Then, land the snapcraft.yaml in your repo and enable it on build.snapcraft.io, so we can get started testing the latest changes from the edge channel. And finally, to get it released on stable so it appears on user searches and is installable with one click, we need the devs to help us understand the remaining error messages.

As always, I'm happy to help. And the work from @Wollac looks very nice, it would be awesome to collaborate with him too.

@Wollac
Copy link

Wollac commented Jan 31, 2018

@mbernasocchi I've been using and testing my version of QGIS as a snap for several months now without any issues!
By renaming the qca library path, I got rid of the OpenSSL message, but this is currently very "hard coded"...
@ElOpio I totally agree, getting it into edge would be awesome to get things rolling and more feedback. I would be happy to work on this with you guys.

@come-maiz
Copy link
Author

@Wollac good job. I gave up there, thanks a lot.

@luipir
Copy link
Contributor

luipir commented Feb 1, 2018

@Wollac I missed the point... what was the OpenSSL message you received? that auth system is disabled? now do you have auth plugin listed in the about about?

@Wollac
Copy link

Wollac commented Feb 1, 2018

@luipir exactly, the snap used to say Authentication System: DISABLED, as it apparently could not find the libqca-ossl.so. Moving the qca libraries to a different folder fixed that issue and the message disappeared. However, I cannot find anything concerning qca or auth in the "About QGIS".

@luipir
Copy link
Contributor

luipir commented Feb 1, 2018

@Wollac without QCA you shouldn't be able to build all the qgis authentication system and related c++ plugins. I didn't test the snap, but probably the "error" have to be looked in the cmake/FindQCA.cmake to find the lib correctly. My libqca-ossl.so in:
/usr/lib/x86_64-linux-gnu/qca/crypto/libqca-ossl.so
/usr/lib/x86_64-linux-gnu/qca-qt5/crypto/libqca-ossl.so
with all related plugins

@Wollac
Copy link

Wollac commented Feb 1, 2018

@luipir it is not a build but a run time issue: during the build CMake correctly detects the QCA OpenSSL plugin under /usr/lib/x86_64-linux-gnu/qca/crypto and everything builds. When executing the snap, for some weird reason (snap? qt?), those plugins are expected under usr/lib/x86_64-linux-gnu/qt4/plugins/crypto. I haven't tried it with Qt 5, though...

@Lvaskz
Copy link

Lvaskz commented Sep 24, 2018

Hi, any progress?

@nyalldawson
Copy link
Collaborator

No, I don't believe anyone is working on this now. There's 3.2.3 flatpaks available though: https://flathub.org/apps/details/org.qgis.qgis

@Lvaskz
Copy link

Lvaskz commented Sep 24, 2018

yes,I know. Thanks

@jawz101
Copy link

jawz101 commented Oct 29, 2019

I wish this was still going to happen. snap makes package installs a heck of a lot easier to keep up-to-date regardless of OS versions and a little easier to install than flatpaks

@m-kuhn
Copy link
Member

m-kuhn commented Oct 29, 2019

If you or anyone wants to work on snap (or appimage), don't hesitate to ask questions to get started, we'll all be here to help.

@Lvaskz
Copy link

Lvaskz commented Oct 30, 2019

I wish this was still going to happen.

Me too, the problem is that the person trying to make this possible is not working on it.

(or appimage),

I really believe that this format should be in the main page to download appimages about qgis. I guess qgis team is working on it ? not?

@m-kuhn
Copy link
Member

m-kuhn commented Oct 31, 2019

I am not aware of any ongoing efforts, but the good news is, anybody can be part of team QGIS!

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

Successfully merging this pull request may close these issues.

None yet