-16
submitted 6 months ago by theshatterstone54@feddit.uk to c/linux@lemmy.ml

You know what I just realised? These "universal formats" were created to make it easier for developers to package software for Linux, and there just so happens to be this thing called the Open Build Service by OpenSUSE, which allows you to package for Debian and Ubuntu (deb), Fedora and RHEL (rpm) and SUSE and OpenSUSE (also rpm). And then the dudes that do AUR packages can take a deb package and write a PKGBUILD that installs it on Arch and Artix. I think I just solved the universal packaging problem.

And maybe we can get OBS to add PKGBUILD support....

Also, feel free to let me know what you think about it as I'm genuinely curious: did I miss anything obvious? Thanks

all 11 comments
sorted by: hot top controversial new old
[-] thingsiplay@beehaw.org 20 points 6 months ago

Why would PKGBUILD solve the issue? The packaging issues are still the same, as every distro has different package names, revisions and not all packages in their repository. The dependencies are not solved with this.

[-] thfi@discuss.tchncs.de 2 points 6 months ago

If at all, you want to use Gentoo's ebuild system, which can be seen as some kind of superset of PKGBUILDs. I guess one could write a Python script that “dumbs down” ebuild scripts to PKGBUILDs for simple packages (excluding complex stuff like kernel, KDE, …). The main challenge, as pointed to before, would be maintaining a table mapping package names between distributions in order to get the dependencies right.

[-] Shareni@programming.dev 12 points 6 months ago

standards

Also, different solutions have different benefits and downsides, and are better in different scenarios.

[-] coolmojo@lemmy.world 7 points 6 months ago

FlatPak and snaps are not only solving the universal packing problem, but in addition: providing necessary libraries which are not present on the main system; an be installed on multiple architectures (x86, arm, etc); sandboxed.

[-] ulkesh@beehaw.org 4 points 6 months ago

The way I see it, the issue here is that everyone is trying to solve packaging from the developer perspective. I understand why they do, but the only way to solve this is to instead look at it from the user’s perspective.

Apps should be dead simple to find, dead simple to install, dead simple to maintain and use, and dead simple to remove.

This is why snap and flatpak and appimage are things. The problem here is that they each have various issues within them that break one or more of those tenets from the user’s perspective.

Trying to resolve packaging by going back to same methods that have existed for decades and wrapping them in a bow may help developers in some fashion, but the end users are still going to lament dealing with apps on Linux because it’s not solved — for them.

[-] digdilem@lemmy.ml 1 points 6 months ago

I like this perspective, but it's the developers who get to choose in the world of FOSS software, and I suspect most would rather develop than package.

Learning the different formats, methods and then committing to re-packaging every update for eternity when you're often a single person or a very small group is a big ask on top of developing the software too, so they're going to select a method that's easiest for them.

So if there was a user-led method, it would still need to appeal to developers as well.

[-] Fredol@lemmy.world 4 points 6 months ago

I can't believe sometimes I am part of the same community as people like you

[-] Max_P@lemmy.max-p.me 2 points 6 months ago

The problem is that you can't just convert a deb to rpm or whatever. Well you can and it usually does work, but not always. Tools for that have existed for a long time, and there's plenty of packages in the AUR that just repacks a deb, usually proprietary software, sometimes with bundled hacks to make it run.

There's no guarantee that the libraries of a given distro are at all compatible with the ones of another. For example, Alpine and Void use musl while most others use glibc. These are not binary compatible at all. That deb will never run on Alpine, you need to recompile the whole thing against musl.

What makes a distro a distro is their choice of package manager, the way of handling dependencies, compile flags, package splitting, enabled feature sets, and so on. If everyone used the same binaries for compatibility we wouldn't have distros, we would have a single distro like Windows but open-source but heaven forbid anyone dares switching the compiler flags so it runs 0.5% faster on their brand new CPU.

The Flatpak approach is really more like "fine we'll just ship a whole Fedora-lite base system with the apps". Snaps are similar but they use Ubuntu bases instead (obviously). It's solving a UX problem, using a particular solution, but it's not the solution. It's a nice tool to have so developers can ship a reference environment in which the software is known to run well into and users that just want it to work can use those. But the demand for native packages will never go away, and people will still do it for fun. That's the nature of open-source. It's what makes distros like NixOS, Void, Alpine, Gentoo possible: everyone can try a different way of doing things, for different usecases.

If we can even call it a "problem". It's my distro's job to package the software, not the developer's. That's how distros work, that's what they signed up for by making a distro. To take Alpine again for example, they compile all their packages against musl instead of glibc, and it works great for them. That shouldn't become the developer's problem to care what kind of libc their software is compiled against. Using a Flatpak in this case just bypasses Alpine and musl entirely because it's gonna use glibc from the Fedora base system layer. Are you really running Alpine and musl at that point?

And this is without even touching the different architectures. Some distros were faster to adopt ARM than others for example. Some people run desktop apps on PowerPC like old Macs. Fine you add those to the builds and now someone wants a RISC-V build, and a MIPS build.

There are just way too many possibilities to ever end up with an universal platform that fits everyone's needs. And that's fine, that's precisely why developers ship source code not binaries.

[-] krolden@lemmy.ml 2 points 6 months ago

install gentoo

[-] MonkderDritte@feddit.de 1 points 5 months ago

Different library versions etc.

this post was submitted on 18 May 2024
-16 points (36.2% liked)

Linux

48179 readers
923 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS