108 points · by droelf · 5y ago · 38 comments
That's not packaging.
Goog packaging deals with that for you.
If you think about it it's kind of crazy that we are reinventing the wheel with every language, OS, game store, extension marketplace etc.
A lot of Linux enthusiasts get lost in the idea that there should be one and only one package manager. But actually it's more that there should be a standard protocol for package discovery, distribution and updating; and package managers can just be an interface to those.
Like I said in my post, it's a "single package manager to rule them all" is the wrong goal. What you want is a common protocol, and multiple implementations of it.
"I want an app store" = spin up your favourite PackManProtocol server, configure it to your needs, done.
The basics of package management are all very similar and can be covered by core use cases. The solution would need to be extensible enough to be usable beyond those. But having restrictions can also be good for an ecosystem (preventing weird-feature creep).
PackageKit exists as a standard protocol on top of myriad package managers. Most major distro package managers (apt, yum/dnf, apk, pacman) have a package kit wrapper, and UI tools such as Gnome Software or KDE Discover exist that use this abstraction.
The missing piece here is that it still requires packages to be built in all the different formats that these abstracted package managers require.
While they accomplish the same thing, RPM's are actually pretty different from .deb since they're binary files. There's more metadata encoded in the package themselves, as well as a built in signature. .debs are, at their core, still just fancy tarballs organized in a specific manner.
Honestly though, RPM's are kind of a mess and pretty difficult to implement without using one of the reference programs, along with containing a lot of extraneous info that you need to fill out. There's a great blog post out there describing someone's attempt to create RPM's from scratch and their gradual descent into insanity. Though, the extra metadata has it's features (better search, dependency resolution, etc).
./configure
make
make install
For example if a configure script has a dependency on a library... then what? It doesn't help me find and install the right version of that dependency, does it? In my experience it just says 'dependency not installed'.
If you're missing a dependency, you'll need to download, configure, make, install it.
It also doesn't handle dependencies, if the library uses libfoo@v0.0.1 and I have libfoo@v0.0.2 installed, this will happily attempt to continue. This isn't a solved problem, by any stretch of the imagination.
Python packaging would be way less painful if people had been given those key informations. Not painless mind you, but from missing a leg to balls itching.
A single tool for publishing to the registry would push the package to IPFS, get the returned CID (hash of the package) and store the hash with some package meta data in a blockchain. Storing the hash in a blockchain would provide confidence the package has not been tampered with assuming no 51% attack and that client implementations always verify the hash against the package bytes. By making the hash immutable and linked to the content address of the package we have more confidence in the integrity of our packages.
Then we add an HTTPS bridge so that client implementations can easily migrate to consuming packages via this new distributed registry.
I am exploring this now so if anyone is interested in this kind of distributed language-agnostic package registry drop me a line at muji [at] tmpfs.org.