Glad there is better tooling, but in 5 years, when I'll need it, I'm pretty sure I won't know how to use it.
I've had to build a deb package once. It's crazy how few docs and resources there are to do so, and how of poor quality they are.
The package format itself is quite complex, and you don't know if you must do something imperatively or decoratively, when to trigger it in the workflow of the install, if it makes sense to use debconf or not, how to use debconf with something else than bash, good practices, where to put things, to copy files, etc. And that's before you have to deal with dependencies.
Then you have to repeat that for rpm.
No wonder people are attracted to flatpak and snap.
Creating a installer for mac, windows and linux is a hell of a work. Not to mention making sure it compiles and run on all those platforms.
Maybe you want a non deb specific packager. cpack (cmake packager) can generate Windows, OSX, DEB, RPM and simple archives. There is also fpm that doesn't support Windows, but supports plenty of packet managers. And possibly many others.
AppImage, FlatPak and Snap may actually be worse in that regard, because they are like other distros you have to take into account. So now, you may have to do all of them: deb, rpm, flatpak, snap, appimage, tgz, whatever that's on Windows and OSX, maybe a Docker container too, app stores and mobile stuff, and upload to some npm, maven, crate.io,... It makes generic package manager even more important.
The dh tools have a lot of magic to them. Arguably it works rather well, but figuring out how exactly to build a package correctly is difficult. The documentation is pretty bad, so if you want to do anything slightly different than the standard, your going spelunking in the debian directory of existing packages.
Debian could fix a lot of the troubles with the existing Debian Helper tools by improving the documentation.
> I've had to build a deb package once. It's crazy how few docs and resources there are to do so, and how of poor quality they are.
After doing the first one, I was able to build binary, Debian packages in 5 minutes tops, while chatting with a friend during the process, too.
flatpak and snap are designed to solve different problems than OS native packaging paradigms.
Also, .deb and .rpm are much more capable and sophisticated than they look on the surface. Lastly, extracting a source and binary Debian package provides great documentation in itself.
Lastly, use lintian. That thing is a godsend (and does binary static analysis, too!).
For me rpm was relatively easy to grasp, it's basically a shell script and each section has a specific job (building, preparing, copying files etc.)
No matter how much I tried I could never grasp deb packaging. The documentation is very sparse and the debhelper commands seem like magic. I couldn't find out what all the different files like .dirs or .install did, so I just gave up.
I find RPM specs to be pretty frustrating. Easy cases like packaging GNU Hello is fine, but things get out of control really fast once you fall off the happy path. RPM specs are based simple text substitution. It lacks the flexibility to make adjustments to the build, the power to build good abstractions, and comes with all the same drawbacks of the C preprocessor. On top of that, documentation is lacking for basic macros, language ecosystem support is spotty and scattered across various obscure projects, and SCL packaging is a complete nightmare. The whole design seems dated compared to other solutions.
At that point, why even use package managers? That approach won't benefit from existing packaging infrastructure at all. Might as well distribute binaries in tarballs instead for simplicity.
The easiest package format I've ever came across was the tgz format from Slackware. From what I remember, you just build and install your software in a fake root then tar gzip it up.
This is because it doesn't do very much. Arch Linux's PKGBUILD and Alpine's APKBUILD are an excellent improvement on that, still very simple to use and learn. In most cases the source package consists of a single shell script (unlike Debian's splintered hell) where you have to define half a dozen fields and a couple of functions (build && install).
I basically have to relearn Debian packaging from scratch every time I have to do that, but learn Alpine and/or Arch once and you're all set.
It's the same process for all package builders: install build-time dependencies, unpack source archive with a program, configure it, build it, install it to a fake root, validate it, archive it to the package, sign it, then publish it to a repository, update repository index.
https://nixos.org/download#download-nix <--- I'm bookmarking this cause I keep forgetting that Nix can run atop other systems. I have no excuse to not give it a try
Binary deb packages are extremely simple. It's just a cpio archive with a couple of tarballs & almost every system integration is implicit. Very easy to build by hand.
Last time I shipped a debian package to clients we just had the build system spit out a ready made binary .deb. Much, much easier than faffing about with dhbuild etc.
My work workflow use `dpkg-deb`: I just create a "build/DEBIAN" directory, populate it with the control file and any post/pre scripts I need, put everything else in the "build" directory where it goes on the end filesystem and then do "dpkg-deb build ." I put all this into a script and do "fakeroot <SCRIPTNAME>".
I usually start with the `dh_make` generated skeleton and incrementally add overrides as I iterate with `gbp buildpackage`. It's not pretty, but it's what I know.
One thing that is not generally considered is that while it's quick to switch language, it's not true for ecosystems.
Yes, you can be productive in python syntax quickly, but I've seen enought people failing at building a sane python project I know that other things take more time: libs, tooling, workflow, typical error, debugging, deployment strats, etc.
So you do want at least one specialist in the team to drive the generalists.
That explains my view that it takes months to learn a language whilst others say it takes days.
You can't be proficient in a language until you can write programs in to and that includes being able to build and use common libraries, debug in it and use common tools well.
Someone who has been learning for 20 or 30 years probably can pick up a new ecosystem easier. “I can learn it in a day because I’ve been learning for 30 years”, etc.
My public administration clients do exactly that with my profile: they want to hire me but must pretend they consider competition, so they publish my resume as a requirement.
Actually DuckDB has its own database format for persistence and can support writes. It’s not obvious from their documentation. People told me that on HN not long ago, as I thought the same than you.
There is not a single animal that wants to be eaten, what are you talking about?
We just draw a line saying: this is ok, this is not, arbitrarily. Nobody, nothing, wants to suffer. That's one of the rare things life universally agrees on.
There is no need for words to express that.
And I think it's ok to do so, but if we can eat whales, octopus, and take cows and chickens and make their existence hell until we consume them, labeling a spider as "evil" because it likes eating humans is far fetched.
I mean, my moral framework may be simple, but it's consistent, and more importantly, it makes it morally impermissible to kill and eat me.
If the giant spiders were unintelligent, they'd not be moral actors, and then eating people might be a bad thing, but it wouldn't be a morally bad (evil) thing.
If their prey weren't intelligent, my moral framework doesn't (currently) include an absolute prohibition on killing and eating animals, so that would be morally acceptable.
But because both the spider and their prey were intelligent, my rules kick in and it is immoral for the spiders to eat people, or vice versa.
(Now, there may be a loophole in that killing people for the purposes of eating them is always unacceptable, but there are circumstances where it is at least forgivable to kill [eg, self defense], and also circumstances where it is likewise acceptable to eat already dead intelligent creatures, but you have to be careful not to create a moral hazard where the killing is done on a pretext.)
The fact that it's what makes it not evil is a huge philosophical debate.
Also we did enslaved our own, raped them, and killed them, pretending they were not intelligent and didn't have a soul.
We do eat octopus, which have demonstrated level of intelligence close to a human child.
Also, suffering is not proportional to intelligence, are you evil because you make life suffers, or because it understands how you do it ?
I don't think it's that clear cut. And I'm not sure we would stop to eat beef if tomorrow somebody proved they are quite smart.
The orgies of meat we bath into based on factories that turn chickens and cows existences into support to grow protein and nothing else does remind me of the spider.
I've had to build a deb package once. It's crazy how few docs and resources there are to do so, and how of poor quality they are.
The package format itself is quite complex, and you don't know if you must do something imperatively or decoratively, when to trigger it in the workflow of the install, if it makes sense to use debconf or not, how to use debconf with something else than bash, good practices, where to put things, to copy files, etc. And that's before you have to deal with dependencies.
Then you have to repeat that for rpm.
No wonder people are attracted to flatpak and snap.
Creating a installer for mac, windows and linux is a hell of a work. Not to mention making sure it compiles and run on all those platforms.
Sometimes more than coding the program itself.