-
Notifications
You must be signed in to change notification settings - Fork 414
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 ability to exclude libs from a user specified list of folders. #292
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution, although I don't know Snapcraft well enough to make full sense of it. In order to leave little room for users to produce non-working AppImages, I'd rather hardcode the @zyga what do you think? |
Your proposal would work for me, provided $SNAPCRAFT_PART_INSTALL was fetched from the environment. It wouldn't help the use case in #242. It might or might not work in the future when snapcraft supports a newer core that may or not be named core18. However, my use case is a bit odd. I am not using Qt from ubuntu packages. I am taking advantage of the knowledge in linuxdeployqt to minimize the bits of Qt that get deployed, and to deploy the necessary bits that aren't so easy to trace through ldd, e.g. plugins, QtWebEngineProcess, etc. Also note that I had to structure my snapcraft parts in a bit of an odd way to get the -exclude-folders to work as mentioned above. snapcraft has methods to deploy Qt apps, but they appear to force me to use Qt from ubuntu packages, which aren't new enough for my app. Thus I haven't evaluated them. So to claim this is the right way to work with snapcraft as implied by a general -snap option is perhaps a bit too presumptuous. On the other hand, I was encouraged about a general need when I saw the same need to exclude libs from a given folder in #242. Therefore I would support a general -exclude-folders option, but I wouldn't claim enough knowledge of snapcraft to claim that the hardcoding you suggest is going to be useful in general with snapcraft. |
I need to preface this by saying that I am really not experienced in Snapcraft or snaps at all, but maybe @zyga can add perspective. If I am getting it right, then you have essentially two options:
What you are proposing seems to be something different? |
I have little snapcraft experience as well, but what I see the options are:
1. use Qt provided by Ubuntu 16.04, declare the required stage-packages,
and let snapcraft take care of things. Possibly using snapcraft/parts
desktop-qt5. I think any Qt minimization is only done through
minimizing the stage-pacakges you, any part you include, declare. The
packages you stage and their dependencies (in the ubuntu package sense),
which are not provided by the core, will be included in your snap.
2. use different version of Qt. Possibly using snapcraft/parts qt58 or
something like it, but this takes forever as it compiles Qt from
source. I think this flow requires the snap creator to decide which
bits of the locally compiled Qt to include in the snap. This seems like
a job linuxdeployqt. In my case I include a part in my snap that
installs a binary Qt from download.qt.io (using either the offline or
online installer). This allows me to use any version of Qt available,
and to avoid the compile time penalty for Qt which is very severe.
The setup for my snap is at
https://github.com/tsteven4/gpsbabel/tree/snapcraft/snap. suggestions
welcome.
…On 5/13/2018 11:53 PM, probonopd wrote:
I need to preface this by saying that I am really not experienced in
Snapcraft or snaps at all, but maybe @zyga <https://github.com/zyga>
can add perspective. If I am getting it right, then you have
essentially two options:
1. Use the Qt provided by Ubuntu as a snap
2. Bundle your own (minimized) Qt inside the snap of your application
(kinda what |linuxdeployqt|does - I assume you could just put the
resulting AppDir into a snap?)
What you are proposing seems to be something different?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#292 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AM92Md1Lw6lfTd4axHFn5HlaSOy9XboVks5tyRu_gaJpZM4T873E>.
|
I guess we need some advice from someone who knows how the snap system is supposed to work ;-) in the meantime, have you tried AppImage? ;-> |
I tried AppImage, I reported the only trouble in #35. Much easier than snapcraft, and a smaller image as well. I first tried Centos 6 because of the comments on https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages. However the resulting appimage crashed on closing. I then tried Centos 7, and the appimage seems to work without issue. Would you recommend Ubuntu 14.04 or Centos 7 for a base system to maximize compatibility given my trouble with Centos 6? |
I've personally had great results with Ubuntu 14.04 and Qt from https://launchpad.net/~beineri/ but that doesn't mean that CentOS 7 couldn't also work. I just haven't had the need to try it. So Ubuntu 14.04 is the best-tested option. |
This accomplishes one of the goals of #242 in a more generalized way. It allows a list of folder names to be given instead of a single folder.
This is useful to me when using snapcraft on a Qt based project. By using this new option with the values:
-exclude-folders=$SNAPCRAFT_PART_INSTALL,/snap/core
linuxdeployqt will excluded libraries from the core and libraries from packages added with stage-packages which are in $SNAPCRAFT_PART_INSTALL during the build. The libraries from /snap/core won't be included in the snap. The libraries from any staged packages will be in the snap, but snapcraft will deal with them. linuxdeployqt deals only with all the Qt bits.
To get this to work for snapcraft the Qt bits must have been staged by another part that is built before the part using linuxdeployqt. This is necessary so they are not in $SNAPCRAFT_PART_INSTALL for the part using linuxdeployqt, but they will be in $SNAPCRAFT_STAGE.