You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AppImageKit draws in useless libraries from apt the binary doesn't even need, just because Library Y is in Package X which contains 10 other libraries the application isn't linked to. Those just take up space and are completely useless.
I could copy the libaries into the AppDir manually like I used to do, but this has shown not to work well in the past with newer distros containing newer versions of libraries needed. And the libraries to compile can only be found on a specific distro (namely the one which has the libraries specified in the script).
AppImages compiled against the Flatpak runtime/SDK, now that's something I would like.
AppImageKit draws in useless libraries from apt the binary doesn't even need
That must be a misunderstanding, AppImageKit "draws in" nothing since AppImageKit just converts AppDirs into AppImages. How you put together your AppDir is none of AppImageKit's business...
just because Library Y is in Package X which contains 10 other libraries the application isn't linked to. Those just take up space and are completely useless.
You can delete them as part of the AppImage generation process. Just delete them.
What is in which "package" is determined by the packages, not by AppImageKit.
I could copy the libaries into the AppDir manually like I used to do, but this has shown not to work well in the past with newer distros containing newer versions of libraries needed.
Please give a concrete example with as many details as possible.
And the libraries to compile can only be found on a specific distro (namely the one which has the libraries specified in the script).
I don't understand, can you please explain/give an example?
AppImages compiled against the Flatpak runtime/SDK, now that's something I would like.
Might be doable, but then your AppImage would not run "anywhere" but only on systems with a) Flatpak and b) the appropriate Flatpak runtimes installed.
AppImages compiled against the Flatpak runtime/SDK, now that's something I would like.
Might be doable, but then your AppImage would not run "anywhere" but only on systems with a) Flatpak and b) the appropriate Flatpak runtimes installed.
I think he meant extracting the binaries from the app + runtime into an appimage.
I'm not sure that is going to work well though. First of all, the runtimes are explicitly not minimal, in that a runtime has things that your specific app may not need. Also, the runtime ships its own libc and dynamic linker, and I don't think you can do that in an AppImage, can you?
I think he meant extracting the binaries from the app + runtime into an appimage.
That should be possible (although I am not convinced that it would be worth the effort):
Extract the contents of the Flatpak package and of the runtime
Determine (e.g., using ldd, strace and similar tools) the set of files from the runtime that is needed to run the app; in this case, "everything" down to glibc
Arrange everything as an AppDir
Convert the AppDir into an AppImage using appimagetool
I'm not sure that is going to work well though. First of all, the runtimes are explicitly not minimal, in that a runtime has things that your specific app may not need. Also, the runtime ships its own libc and dynamic linker, and I don't think you can do that in an AppImage, can you?
You can ship anything you want inside an AppImage; it's just that we don't recommend to do that. One just needs to make sure that the libc and linker inside the AppImage does not get mixed with libc/linker components from the outside.
What would be cool though would be a minimal GTK Flatpak runtime of the "oldest still-supported LTS release", e.g., debian oldstable, CentOS 6.x, Ubuntu LTS-3, etc. - in this case binaries compiled against such a runtime could be converted into an AppImage that could, without bundling the Flatpak runtime, libc, or linker into the AppImage, probably reasonably be expected to run on newer systems as well.
General background information:
Given that AppImage is really just a self-mounting filesystem image, the person putting together an AppImage is free to choose how to produce the binaries that go inside the AppImage.
There are different ways to generate an AppImage of an application:
You don't necessarily need to extract the flatpak stuff. Just run the AppDir generation script inside the flatpak sandbox. i.e. flatpak run --command=./generate-appdir org.the.App
The runtime contains more than libraries, that you may also need. For instance there are runtime-loadable plugins, python files, icons, locales, etc. A simple ldd kind of script is bound to miss a lot of things.
I don't see how you can ship a custom libc in and AppImage, seeing as it is tied to the exact version of the dynamc linker in the runtime, and the path to the dynamic linker is hardcoded into the binaries (INTERP). You'd need to automatically patch the ELF headers or something, which seems a bit scary.
flatpak apps are typically not relocatable. The runtime stuff is hardcoded to look in /usr, and the app is built into the /app prefix. This would not be the setup thats used when running the AppImage, so, while you could get the binaries from flatpak you still need manual work to make your app work as an AppImage.
Is there a way to access the contents of a flatpak file on a system that does not support the extended attributes (i.e., every Live system)?
Yes, a simple ldd kind of script is bound to miss a lot of things; this is why converting debs into an AppImage might be easier than converting a flatpak package and some parts of its runtime into an AppImage.
We're not scared of scary things ;-)
True about the relocateability; in the order of preference a) upstreams could use something like binreloc b) we could LD_RRELOAD something like this (discussion), c) we can binary patch the absolute to relative paths (talk about scary!)
Should have gotten here earlier, didn't have time really
I want a system like AppImage, but something that would install the libraries on the user's system instead of bundling them into the AppImage itself.
Think of the following scenario:
A user downloads a AppImage from a website
He finds that the AppImage doesn't run on his system, because his distro is too new and the creator of the AppImage copied the libraries from his Ubuntu 16.04 installation, and at the time of his testing, it did work on most distros
Hundreds of forum threads ("AppImage not working HELP")
It becomes a mess to maintain, so they decide to use AppImageAssistant to automatically get libraries from apt/the .deb package instead.
The resulting AppImage works, but is now large enough to contain a barebones Ubuntu chroot.
Later on the user finds something broke in this dev release, and wants to download a older version. Has to download the same 200MB AppImage again.
There should be something that works similiar to AppImage and Flatpak. Let's call it flap (Flatpak and AppImage)
The usage would be very simple:
User downloads .flap file. It contains information on what runtime it uses, and the libraries not included in the runtime. (As modules, like Flatpak)
Executes it. Turns out the runtime required to run the application is missing, so a nice little popup appears telling the user it is required to use the application and if to install it per user or system-wide (A link on where to get it could be added to the .json/Metadata)
Runs
Optionally this would integrate with already existing Flatpak runtimes.
From a packager point of view, it would follow the same style as Flatpak (flatpak-builder)
The user wouldn't have to install the runtime again for further releases and the flap file would be vastly smaller in comparison to an AppImage. This is similiar to when on Windows, an application requires the .NET 4 Framework and it asks you if you want to install it.
He finds that the AppImage doesn't run on his system, because his distro is too new and the creator of the AppImage copied the libraries from his Ubuntu 16.04 installation, and at the time of his testing, it did work on most distros
The problem alwas never is that the target system is too new, since newer base systems should never cease to run older applications (if they do, it's something that needs to be fixed!)
Hundreds of forum threads ("AppImage not working HELP")
Is that a hypothetical question or are you aware of such an AppImage? Most likely the AppImage in question is made wrongly
It becomes a mess to maintain, so they decide to use AppImageAssistant to automatically get libraries from apt/the .deb package instead.
AppImageAssistant is deprecated and should not be used anymore.
The resulting AppImage works, but is now large enough to contain a barebones Ubuntu chroot.
That's not my experience with AppImage in practice.
Later on the user finds something broke in this dev release, and wants to download a older version. Has to download the same 200MB AppImage again.
Why not just keep the older AppImages around? With package managers, installing a newer version removes the older version. With AppImage, you can keep both.
User downloads .flap file. It contains information on what runtime it uses, and the libraries not included in the runtime. (As modules, like Flatpak)
Executes it. Turns out the runtime required to run the application is missing, so a nice little popup appears telling the user it is required to use the application and if to install it per user or system-wide (A link on where to get it could be added to the .json/Metadata)
Runs
How would this be much different from .deb/.rpm packages?
The user wouldn't have to install the runtime again for further releases and the flap file would be vastly smaller in comparison to an AppImage.
Yes, and it would almost never run without downloading additional stuff. Hence you would need to be online all the time, and couldn't go to a Internet Cafe, download your app and trust that it will run without additional stuff.
How would this be much different from .deb/.rpm packages?
It uses runtimes supplied by flatpak and not distro specific stuff. So it would work everywhere
Yes, and it would almost never run without downloading additional stuff. Hence you would need to be online all the time, and couldn't go to a Internet Cafe, download your app and trust that it will run without additional stuff.
That seems to be a misunderstanding. An application would be linked against the flatpak runtime. Libraries not in the runtime would be shipped inside the image (like in AppImage).
Also, what kind of Internet cafe doesn't have Internet? This doesn't make sense. If you know there will be slow internet, no way to get the runtime installed in time etc., you can just use an AppImage.
In 90% of use-cases, the user is sitting at home, using his personal device. There aren't many Flatpak runtimes anyways, most Flatpaks I've seen use the Gnome runtime, and there you should target the lowest verson available anyways.
I agree that the entire point of AppImages is to have all dependencies inside of it and making sure it runs everywhere. But I don't see much point in bundling ALL libraries with it. I don't want to download a huge AppImage everytime I want to try a new development release, especially considering that I already downloaded a previous version which contains the same libraries. A shared runtime would take up less space at one point.
AppImageAssistant is deprecated and should not be used anymore.
I didn't know that. What's the recommended way now?
I agree that the entire point of AppImages is to have all dependencies inside of it and making sure it runs everywhere. But I don't see much point in bundling ALL libraries with it.
We don't recommend to bundle all libraries, only those which cannot be expected to be part of each target system in a recent enough version.
I don't want to download a huge AppImage everytime I want to try a new development release, especially considering that I already downloaded a previous version which contains the same libraries.
If you are concerned about download size, check out binary delta updates using AppImageUpdate. Imagine a 6 GB app or game, which provides a nightly AppImage. You only download the bytes that actually have changed from nightly to nightly.
If you are concerned about storage space, then Flatpak may be better suited for you.
@probonopd at the end of the day flatpaks are just ostree branches, and you can explore/explode the using the ostree command line. As long as you don't use local repos of type bare-user it should work fine without xattrs.
I don't agree with your reasoning about too new dependencies though, which is the fundamental difference between flatpak and AppImage. I've worked for a distro for over 15 years, and I know that things change in incompatible ways. Sometimes by accident, sometimes for "good" reasons. You can blame the author of the app that he depended on the wrong thing, or you can blame the thing that changed. Neither of these help the end user though, so I choose to blame the tools that make it so hard to package things in a robust fashion. This is the reason that when you run a flatpak app you run the exact same bits that the author tested.
at the end of the day flatpaks are just ostree branches, and you can explore/explode the using the ostree command line. As long as you don't use local repos of type bare-user it should work fine without xattrs.
Using an Ubuntu Live ISO, I ended up with Unable to set xattr: Operation not supported . Is there another way to extract an ostree branch?
I've worked for a distro for over 15 years, and I know that things change in incompatible ways. Sometimes by accident, sometimes for "good" reasons. You can blame the author of the app that he depended on the wrong thing, or you can blame the thing that changed.
If version 2 of the operating system ceases to run applications correctly that version 1 of the operating system was able to run properly, then I blame the operating system. This is what Windows and macOS users expect from an operating system, and if Linux-based desktop OSes want to be competitive, they need to deliver on this. An application also needs to be engineered with this in mind, and it requires thoughtfulness on the part of the developer. Mozilla Firefox seems to "get it".
Imagine a Mac user who upgrades the OS, and afterwards an application does not run properly anymore. He will certainly view this as a bug. Why should we not care about this in Linux-based OSes? By the way, Linus himself dislikes "breaking the userspace" as much as I do.
This mode uses xattrs to store file ownership and permissions, so you can commit to it as a user (its optimized for user checkouts like checkout -U). You can also use --mode=bare which stores ownership and permission as-is (optimized for regular checkout), but then you need to run the command as root as flatpak normally uses uid 0 as owner. You can use --mode=archive-z2 though, which has zero requirements on the filesystem (its the format used for e.g. http repos).
As for operating system compatibility, I completely agree with you, and if you pick the right OS (for instance RHEL/CentOS or an Ubuntu LTS) and stay within that, then its mostly true too. I think we do worse than windows, but better than macOS in this.
However, my target for flatpak is not an OS in the traditional sense, but more of a project, i.e. the concept of anyone running a modern linux distro/desktop. In that universe there are zero guarantees about these kind of things as there are diverging opinions about everything and nobody in control. This is the reality, and wishing it to be otherwise is fine, but doesn't change reality. When your app breaks for a user because someone else did something stupid, then blaming the someone else does not help your users.
Continuing from above, this converts the GIMP nightly flatpak to an AppImage:
cd gimpdir/
wget -c https://github.com/probonopd/AppImages/raw/master/functions.sh
. ./functions.sh
cd files/
get_apprun
mkdir -p usr/
mv etc/ bin/ lib/ share/ usr/
get_desktop
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 usr/bin/gimp-2.9
cp /usr/lib/x86_64-linux-gnu/libjpeg.so.8 usr/lib/libjpeg.so.62
find . -type f -exec sed -i -e 's|/app|././|g' {} \;
copy_deps
delete_blacklisted
cp ./usr/share/app-info/icons/flatpak/128x128/org.gimp.GimpDevel.png .
cd ..
mv files/ GIMP.AppDir
APP=GIMP generate_type2_appimage
Obviously it is a bit rough around the edges (e.g., doesn't find some paths) but it runs in principle - so nothing that couldn't be solved technically, as long as the runtime it was compiled for is not newer than the target systems for the AppImage.
@probonopd That is an ostree repo, kinda like the .git directory. You can list the branches (refs) in it with ostree --repo=DIR refs and then check one out (there should be only one if you created from a flatpak bundle) with ostree --repo=DIR checkout -U REF DESTDIR
Even with these errors, it works most of the time, I know how these errors occurred, but I have no idea how to fix, i need a Way to start a dbus section under chroot
Do you have an idea why?
Yes, is intentionally for while, this is only a PoC they not search for desktop file and other important things, start-app.sh does near to samething that AppRun
We can also work around this by starting with the contents of /app and finding its dependencies on the runtime (this is the approach I have been experimenting with).
Also, the runtime ships its own libc and dynamic linker, and I don't think you can do that in an AppImage, can you?
Yes, we can do that. This has always been possible with AppImage. After all, an AppImage is really just a filesystem image that executes whatever someone has put inside. It is perfectly fine to put a full runtime in there, including ld-linux and everything. (So far, we have simply recommended against doing so for space saving reasons - in reality, the overhead can be pretty low though.) Here are some experimental AppImages that contain what was inside a Flatpak /app, as well as a subset of the Flatpak runtime:
I don't agree with your reasoning about too new dependencies though, which is the fundamental difference between flatpak and AppImage. I've worked for a distro for over 15 years, and I know that things change in incompatible ways.
Now, they seem to be broken in various subtle ways. I suspect this is because we are not running them trough bubblewrap or something like it.
Which brings me to the questions:
Given an /app and a /runtime directory, can one somehow execute bubblewrap so that it runs the main executable as if it was invoked through Flatpak?
Can bubblewrap be made to work without the need for suid, e.g., if one entirely disregards the security aspect? Then we could put bubblewrap into the AppImage, execute it, and call it a day
If not, can a replacement for bubblewrap be written e.g,. in the form of a patched ld-linux or LD_PRELOAD that, given an /app and a /runtime directory, could run the main executable?
Why do I think running bubblewrap (or an unprivileged replacement of it) is needed:
Applications may have /app paths compiled in, as @alexlarsson said Flatpak doesn't require apps to be relocatable in the filesystem
Applications may launch other binaries (e.g., Peek is launching ffmpeg). This currently fails because Peek launches ffmpeg directly, without us having a chance to invoke it through our privately bundled ld-linux
the path to the dynamic linker is hardcoded into the binaries (INTERP). You'd need to automatically patch the ELF headers or something, which seems a bit scary.
Hence the question, can we use bubblewrap to do the job.
Activity
probonopd commentedon Nov 23, 2016
That must be a misunderstanding, AppImageKit "draws in" nothing since AppImageKit just converts AppDirs into AppImages. How you put together your AppDir is none of AppImageKit's business...
You can delete them as part of the AppImage generation process. Just delete them.
What is in which "package" is determined by the packages, not by AppImageKit.
Please give a concrete example with as many details as possible.
I don't understand, can you please explain/give an example?
Might be doable, but then your AppImage would not run "anywhere" but only on systems with a) Flatpak and b) the appropriate Flatpak runtimes installed.
alexlarsson commentedon Nov 25, 2016
I think he meant extracting the binaries from the app + runtime into an appimage.
I'm not sure that is going to work well though. First of all, the runtimes are explicitly not minimal, in that a runtime has things that your specific app may not need. Also, the runtime ships its own libc and dynamic linker, and I don't think you can do that in an AppImage, can you?
probonopd commentedon Nov 25, 2016
That should be possible (although I am not convinced that it would be worth the effort):
appimagetoolYou can ship anything you want inside an AppImage; it's just that we don't recommend to do that. One just needs to make sure that the libc and linker inside the AppImage does not get mixed with libc/linker components from the outside.
What would be cool though would be a minimal GTK Flatpak runtime of the "oldest still-supported LTS release", e.g., debian oldstable, CentOS 6.x, Ubuntu LTS-3, etc. - in this case binaries compiled against such a runtime could be converted into an AppImage that could, without bundling the Flatpak runtime, libc, or linker into the AppImage, probably reasonably be expected to run on newer systems as well.
General background information:
Given that AppImage is really just a self-mounting filesystem image, the person putting together an AppImage is free to choose how to produce the binaries that go inside the AppImage.
There are different ways to generate an AppImage of an application:
See https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages for more information and examples.
alexlarsson commentedon Nov 25, 2016
Some comments:
You don't necessarily need to extract the flatpak stuff. Just run the AppDir generation script inside the flatpak sandbox. i.e.
flatpak run --command=./generate-appdir org.the.AppThe runtime contains more than libraries, that you may also need. For instance there are runtime-loadable plugins, python files, icons, locales, etc. A simple ldd kind of script is bound to miss a lot of things.
I don't see how you can ship a custom libc in and AppImage, seeing as it is tied to the exact version of the dynamc linker in the runtime, and the path to the dynamic linker is hardcoded into the binaries (INTERP). You'd need to automatically patch the ELF headers or something, which seems a bit scary.
flatpak apps are typically not relocatable. The runtime stuff is hardcoded to look in /usr, and the app is built into the /app prefix. This would not be the setup thats used when running the AppImage, so, while you could get the binaries from flatpak you still need manual work to make your app work as an AppImage.
probonopd commentedon Nov 25, 2016
Thanks @alexlarsson.
Is there a way to access the contents of a flatpak file on a system that does not support the extended attributes (i.e., every Live system)?
Yes, a simple ldd kind of script is bound to miss a lot of things; this is why converting debs into an AppImage might be easier than converting a flatpak package and some parts of its runtime into an AppImage.
We're not scared of scary things ;-)
True about the relocateability; in the order of preference a) upstreams could use something like binreloc b) we could LD_RRELOAD something like this (discussion), c) we can binary patch the absolute to relative paths (talk about scary!)
Anti-Ultimate commentedon Nov 26, 2016
Should have gotten here earlier, didn't have time really
I want a system like AppImage, but something that would install the libraries on the user's system instead of bundling them into the AppImage itself.
Think of the following scenario:
There should be something that works similiar to AppImage and Flatpak. Let's call it flap (Flatpak and AppImage)
The usage would be very simple:
Optionally this would integrate with already existing Flatpak runtimes.
From a packager point of view, it would follow the same style as Flatpak (flatpak-builder)
The user wouldn't have to install the runtime again for further releases and the flap file would be vastly smaller in comparison to an AppImage. This is similiar to when on Windows, an application requires the .NET 4 Framework and it asks you if you want to install it.
probonopd commentedon Nov 26, 2016
The problem alwas never is that the target system is too new, since newer base systems should never cease to run older applications (if they do, it's something that needs to be fixed!)
Is that a hypothetical question or are you aware of such an AppImage? Most likely the AppImage in question is made wrongly
AppImageAssistant is deprecated and should not be used anymore.
That's not my experience with AppImage in practice.
Why not just keep the older AppImages around? With package managers, installing a newer version removes the older version. With AppImage, you can keep both.
How would this be much different from .deb/.rpm packages?
Yes, and it would almost never run without downloading additional stuff. Hence you would need to be online all the time, and couldn't go to a Internet Cafe, download your app and trust that it will run without additional stuff.
Anti-Ultimate commentedon Nov 26, 2016
It uses runtimes supplied by flatpak and not distro specific stuff. So it would work everywhere
That seems to be a misunderstanding. An application would be linked against the flatpak runtime. Libraries not in the runtime would be shipped inside the image (like in AppImage).
Also, what kind of Internet cafe doesn't have Internet? This doesn't make sense. If you know there will be slow internet, no way to get the runtime installed in time etc., you can just use an AppImage.
In 90% of use-cases, the user is sitting at home, using his personal device. There aren't many Flatpak runtimes anyways, most Flatpaks I've seen use the Gnome runtime, and there you should target the lowest verson available anyways.
I agree that the entire point of AppImages is to have all dependencies inside of it and making sure it runs everywhere. But I don't see much point in bundling ALL libraries with it. I don't want to download a huge AppImage everytime I want to try a new development release, especially considering that I already downloaded a previous version which contains the same libraries. A shared runtime would take up less space at one point.
probonopd commentedon Nov 26, 2016
We don't recommend to bundle all libraries, only those which cannot be expected to be part of each target system in a recent enough version.
If you are concerned about download size, check out binary delta updates using AppImageUpdate. Imagine a 6 GB app or game, which provides a nightly AppImage. You only download the bytes that actually have changed from nightly to nightly.
If you are concerned about storage space, then Flatpak may be better suited for you.
alexlarsson commentedon Nov 26, 2016
@probonopd at the end of the day flatpaks are just ostree branches, and you can explore/explode the using the ostree command line. As long as you don't use local repos of type bare-user it should work fine without xattrs.
I don't agree with your reasoning about too new dependencies though, which is the fundamental difference between flatpak and AppImage. I've worked for a distro for over 15 years, and I know that things change in incompatible ways. Sometimes by accident, sometimes for "good" reasons. You can blame the author of the app that he depended on the wrong thing, or you can blame the thing that changed. Neither of these help the end user though, so I choose to blame the tools that make it so hard to package things in a robust fashion. This is the reason that when you run a flatpak app you run the exact same bits that the author tested.
probonopd commentedon Nov 26, 2016
@alexlarsson
Last time I tried
Using an Ubuntu Live ISO, I ended up with
Unable to set xattr: Operation not supported. Is there another way to extract an ostree branch?If version 2 of the operating system ceases to run applications correctly that version 1 of the operating system was able to run properly, then I blame the operating system. This is what Windows and macOS users expect from an operating system, and if Linux-based desktop OSes want to be competitive, they need to deliver on this. An application also needs to be engineered with this in mind, and it requires thoughtfulness on the part of the developer. Mozilla Firefox seems to "get it".
Imagine a Mac user who upgrades the OS, and afterwards an application does not run properly anymore. He will certainly view this as a bug. Why should we not care about this in Linux-based OSes? By the way, Linus himself dislikes "breaking the userspace" as much as I do.
alexlarsson commentedon Nov 26, 2016
This mode uses xattrs to store file ownership and permissions, so you can commit to it as a user (its optimized for user checkouts like checkout -U). You can also use --mode=bare which stores ownership and permission as-is (optimized for regular checkout), but then you need to run the command as root as flatpak normally uses uid 0 as owner. You can use --mode=archive-z2 though, which has zero requirements on the filesystem (its the format used for e.g. http repos).
As for operating system compatibility, I completely agree with you, and if you pick the right OS (for instance RHEL/CentOS or an Ubuntu LTS) and stay within that, then its mostly true too. I think we do worse than windows, but better than macOS in this.
However, my target for flatpak is not an OS in the traditional sense, but more of a project, i.e. the concept of anyone running a modern linux distro/desktop. In that universe there are zero guarantees about these kind of things as there are diverging opinions about everything and nobody in control. This is the reality, and wishing it to be otherwise is fine, but doesn't change reality. When your app breaks for a user because someone else did something stupid, then blaming the someone else does not help your users.
probonopd commentedon Nov 29, 2016
alexlarsson commentedon Nov 30, 2016
Hehe, i see what you mean, its not exactly obvious how to use it.
Here is a sample to get started:
alexlarsson commentedon Nov 30, 2016
In fact, once you've done that you can even run the app (if you have the right runtime installed) by doing:
flatpak build -r gimpdir gimp-2.9probonopd commentedon Nov 30, 2016
Continuing from above, this converts the GIMP nightly flatpak to an AppImage:
Obviously it is a bit rough around the edges (e.g., doesn't find some paths) but it runs in principle - so nothing that couldn't be solved technically, as long as the runtime it was compiled for is not newer than the target systems for the AppImage.
[-]"AppImageKit draws in useless libraries from apt"[/-][+]flatpak2AppImage proof-of-concept[/+]probonopd commentedon Dec 3, 2016
@alexlarsson how would I extract https://github.com/gnumdk/lollypop-data/raw/master/org.gnome.Lollypop.flatpak? I am only getting files with cryptic names like
./objects/1c/3383ad809a2b148736d8b0958bc2c67d8e6898d18e50114848256764f6c120.filez.A command like
ostree extract org.gnome.Lollypop.flatpakwould really come handy.Newer AppImages have
--appimage-extractfor similar functionality.alexlarsson commentedon Dec 3, 2016
@probonopd That is an ostree repo, kinda like the .git directory. You can list the branches (refs) in it with
ostree --repo=DIR refsand then check one out (there should be only one if you created from a flatpak bundle) withostree --repo=DIR checkout -U REF DESTDIRTheAssassin commentedon Jun 5, 2017
Related to #166.
sudo-give-me-coffee commentedon Mar 17, 2020
I wrote a PoC script with an approach "semi automagically" to do this:
https://github.com/sudo-give-me-coffee/flatpak2appdir
probonopd commentedon Mar 18, 2020
Trying to run it on Travis CI using https://github.com/probonopd/flatpak2appdir/blob/patch-2/.travis.yml, getting
Do you have an idea what this means?
Full log:
https://travis-ci.com/github/probonopd/flatpak2appdir/builds/153835938
probonopd commentedon Mar 18, 2020
Looks like I succeeded making an AppDir, however AppRun is missing:
https://travis-ci.com/github/probonopd/flatpak2appdir/builds/153838734
Do you have an idea why?
sudo-give-me-coffee commentedon Mar 18, 2020
Even with these errors, it works most of the time, I know how these errors occurred, but I have no idea how to fix, i need a Way to start a dbus section under chroot
Yes, is intentionally for while, this is only a PoC they not search for desktop file and other important things,
start-app.shdoes near to samething thatAppRunprobonopd commentedon Mar 18, 2020
This is so cool. 💯 @sudo-give-me-coffee, let's create the virtual counterpart of https://www.ikea.com/ms/en_US/customer-service/our-services/assembly.html :-)
I have sent a pull request to enable CI on your repo:
sudo-give-me-coffee/flatpak2appdir#2
probonopd commentedon Mar 22, 2020
In the meantime, I have been experimenting with a cleaner way to do this, possibly without the need for LD_PRELOAD.
@alexlarsson
"Almost" solved. Let's say, we can find a solution to that. Right now we have two different approaches that are working to some degree:
/appand finding its dependencies on the runtime (this is the approach I have been experimenting with).@alexlarsson is correct though,
So the list of files may need some manual per-app tweaking.
@alexlarsson
Yes, we can do that. This has always been possible with AppImage. After all, an AppImage is really just a filesystem image that executes whatever someone has put inside. It is perfectly fine to put a full runtime in there, including ld-linux and everything. (So far, we have simply recommended against doing so for space saving reasons - in reality, the overhead can be pretty low though.) Here are some experimental AppImages that contain what was inside a Flatpak
/app, as well as a subset of the Flatpak runtime:https://github.com/probonopd/assembly-service/releases/tag/continuous
This should address @alexlarsson's concern
Now, they seem to be broken in various subtle ways. I suspect this is because we are not running them trough bubblewrap or something like it.
Which brings me to the questions:
/appand a/runtimedirectory, can one somehow execute bubblewrap so that it runs the main executable as if it was invoked through Flatpak?/appand a/runtimedirectory, could run the main executable?Why do I think running bubblewrap (or an unprivileged replacement of it) is needed:
/apppaths compiled in, as @alexlarsson said Flatpak doesn't require apps to be relocatable in the filesystemffmpeg). This currently fails because Peek launchesffmpegdirectly, without us having a chance to invoke it through our privately bundledld-linuxThis is what @alexlarsson pointed out:
Hence the question, can we use bubblewrap to do the job.
Any ideas/help appreciated.