-
Notifications
You must be signed in to change notification settings - Fork 57
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
Turn all applications into application bundles #203
Comments
As for using Jitsi Meet on FreeBSD (helloSystem):
and then doing |
I am not sure there is a simple or easy way to package things into Bundles. In general, the build script/makefile has to specifically target a Bundle. One of the things I hope airyxOS will accomplish is to make it a more common way to package software. That said... have a look at what GoboLinux does. A scheme like that lets multiple versions of things co-exist. Although they are not movable like true Bundles or AppDirs are, something like this is 80% of the way to a bundle. The rest could be a clever AppRun script that sets up the right LD_LIBRARY_PATHs and launches the app, plus whatever app-specific tweaking is needed for each one to work properly. If your libraries are all done the same way, apps won't break unless you remove the versions they use. You can add new software without affecting old. Maybe something like this could be a start towards making "real" bundles? |
Disclaimer: I think using appimages would solve this problem. Side note: |
AppImages use the same bundle concept, only they are in one file that gets mounted as a disk instead of a folder. |
So in response to your comment, yeah, that's the idea. |
Unfortunately, many apps don't respond well to being put in bundles, or AppImages, because they use hard-coded paths and stuff. Also, probono made AppImage, so if that was the canonical option, he would have gone with it. |
Lol your right i overlooked that iceberg🤣 I Will go back to being silent |
AppImages are basically a workaround for certain constraints on the "Desktop Linux Platform", which in reality is a giant mess of different distributions that cannot agree on anything and are made by competing vendors, and most of which won't put any efforts into making application bundles a reality. On FreeBSD/helloSystem, we have another set of constraints, which allows other solutions. Here, the concern is more how we can re-use the large catalog of ports and packages by making them into bundles without too much manual interaction. GoboLinux needs everything to be recompiled. I don't have the resources for that. I am looking for ways to convert existing packages. Thinking along the lines of overlay/union filesystems, user-mode chroots, LD_PRELOAD filesystem redirections, and things like that. |
We maybe could use a chroot sandbox, that way the apps are effectively installed but in a folder you can move anywhere, and we could have some "common" filesystems containing base stuff a little bit like flatpak runtimes, but there'd need to be less of them. |
Exactly - I was thinking about something along those lines. Especially since non-root chroots are said to be coming to FreeBSD. |
I'd like to know more about these 'non-root chroots' |
Yes and no. It's relatively simple to bundle most autotools or cmake based packages. Firefox is little short of a nightmare, and Thunderbird to go with it. I haven't figured out a good solution for qmake yet, and of course nothing works anywhere other than /usr if it uses hardcoded paths to such locations. Most packages that can go in /opt can be bundled. |
Making a proof-of-concept Firefox.appcc @mszoek Say I have the We can produce a simple application bundle from the existing pkg with:
Works :+1 We can now open Firefox 92.0 from the System menu, and can use Now, the real fun begins when we need to bundle dependencies as well. So, we need a way to calculate the dependencies taking into consideration the set of packages that helloSystem comes with (not the set of packages that happen to be locally installed at the point of making the application bundle, or else the application bundle will only run on that very machine). How can we do this? |
That's certainly one way of doing it, albeit a high-overhead one (every installed, "historically grown" helloSystem installation would need to keep a pristine helloSystem image around just for the purpose of making application bundles). If I am not mistaken, pkg keeps the information about what has been installed on the system in a sqlite database. If we can trick it into using the sqlite database of a pristine helloSystem ISO, then we should be golden - wdyt? |
This concept will become really interesting once there is non-root (unprivileged) chroot. If I remember correctly, @emaste mentioned recently that this is in the works. (People have been dreaming about this for almost 20 years.) |
That's essentially why a chroot works. It's an alternate version of the package DB and installed packages. I must have misunderstood what you're trying to do here because the comment about every helloSystem install needing a pristine chroot puzzles me. Are you trying to dynamically make bundles on the end-user system? I had assumed we were talking about making app bundles on a build system for distribution. If the goal is just to figure out the delta in packages from "pristine install" then yes, running something like |
https://cgit.freebsd.org/src/commit/?id=a40cf4175c90142442d0c6515f6c83956336699b was committed in July. |
https://user-images.githubusercontent.com/192271/133346768-0d240cc8-06fb-4544-a86c-ae4a4d8f5692.png
No such crash here, on any system. The given preference is a default. |
Yes, the idea is that you have one pristine root folder (ideally mounted read-only from an image) and every individual app, as well as the system itself, (although the latter would probably need an initramfs, which I'm not sure FreeBSD does) and you union mount everything on that. |
High overhead? If flatpak had one runtime for a clean, say, Fedora install the overhead would be tiny, particularly if it was the same set of files ostree used for the root filesystem. |
Indeed, my idea is that the user runs
That's it! Thanks a lot. |
It would be a cool hack for sure. So the idea is to unpack the app pkg and relocate its files into an AppDir type structure, plus install any dependent packages? |
Exactly. Unpack into an AppDir, along with all dependencies that are not part of the ISO. |
Then maybe we could make a graphical frontend for pkg... ...like the AppShop was going to be ;~) |
|
Work has begun to produce application bundles.
Maybe it can be a frontend for https://github.com/helloSystem/Applications/releases/ one day? |
Potentially. But having seen your script, there's a lot of conditional branches being run for specific apps. So long as that is used, with every single app made you end up having to keep adding new pieces of code for tiny compatibility things. I'd imagine if you wanted it on a reasonable scale as far as how many apps there are, that is not the way to go about it. I do see that much of that script is copying certain icons, but I could make a python program to parse the freedesktop stuff and then it's just a matter of running that. Or maybe you could rewrite the shell script in python and add that functionality. I'm a little busy with exams at the moment but should soon be free to do more work for this project. Anyway, any case in which you need to change the core components (as this I believe shall one time soon become) in order to tailor for specific apps will, not can, but will, present problems. |
In fact, we already have that in The bash script is really a proof-of-concept because it was quicker to code. |
It's also the question whether we want to run this on the server or on the local machine (with a GUI like the current application installer GUI). |
Ideally server side if it takes a long time and works only for specific apps, but if you can get it to work universally, then it should be run client side to ease the demand on the server. |
https://github.com/therontarigo/freebsd-user-namespace may also be useful for situations in which an application insists on loading its resources from compiled-in absolute paths:
This works by using Reference: |
Will this increase the size of the ISO? helloSystem/ISO#80
|
Cross-reference: #272 |
Point in case:
From one day to the next, Firefox stopped working because I had installed some other applications using
pkg install
, which had seemingly upgraded some system libraries, resulting in the old Firefox version no longer working properly.Hence I was factually forced to update Firefox as well.
As a result, meet.jit.si no longer works in Firefox, now giving this:
about:config
,network.http.spdy.enforce-tls-profile
makes Firefox crash.It had been working before.
There is no obvious way to downgrade Firefox. (Correction: actually there is the
firefox-esr
package, but that's only the case for very, very few apps.)This is exactly what makes me dislike the concept of traditional package managers for managing graphical user-facing applicatiions.
For this exact reason we need to come up with a system that turns each application into an Application Bundle and makes it possible to:
How to do this best, in a way that works for most already-ported applications without too much manual effort?
cc @mszoek
The text was updated successfully, but these errors were encountered: