5 ms·
Packaging for debian anything non trivial is damn too hard. It took me 5 days to figure out how to package a complete web app with params, upgrades, post insta
by BiteCode_dev 6y ago
Packaging for debian anything non trivial is damn too hard.
It took me 5 days to figure out how to package a complete web app with params, upgrades, post install transpiling, db init, etc.
And I haven't put that on a private repo yet, it's yet another annoying thing to do.
Nothing is well documented, doc is old and confusing, the tooling is archaic and wants to inflict pain (debconf anyone ?), the life cycle of a Deb package is atrocious to get right.
And you have to do all that in raw bash scripts. Not there are no alternatives, any scripting language is potentially usable, but the support is poor enough to deter you from them.
It's not I don't want to contribute to the ecosystem, but I won't invest the colossal effort and exercice in frustration to overcome the barrier to entry. My packages don't even need to go to the official repo, just let me do my things in peace.
Make a python lib that let you describe a package, hook on life cycle events to run code, with clear documented recipes et where to put what types of files, and let me run that to generate the Deb. Event web pack is easier to use for God sake.
I'm not even touching the process of packaging something to be included in debian repositories here, which is another beat entirely.
Quit the smug act, debian packagers. You don't know better.
You do know better on how to design a distro and protect the official repository. Great. I praised you for that for decades.
But you know nothing about making your users life easy. You just don't. So ask them, and fix that, or don't complain about no contrib. This is not news, we raised our voices for years.
I contribute all the time to Foss in code and doc, I donate in mass. We ARE willing to help. And we do.
It's not us. It's you.
- glandium 6y ago> And you have to do all that in raw bash scripts. If only that were true. The entrypoint in Debian packaging is a damn Makefile. I've been a Debian Developer for 16 years, and creating packages for more than that. Saying that I like it or that there aren't problems would be the archetype of Stockholm Syndrome.
- secondcoming 6y agoI had to create a custom package of some C++ header files. I failed. I was shocked at how hard it was.
- Fronzie 6y agoFor my (local) C++ projects, I use CMake to make .deb packages. It is easy enough, uninstalls cleanly, so does the job.
- vbernat 6y agoAs for building packages for your own use, the tooling is not that difficult. The documentation is just oriented to contribute packages for Debian itself. This implies some unwanted complexity and navigating outdated documentation. Packaging for Debian becomes simpler, but it's heavily rooted into having multiple files describing the package, use of a tarball as the source package and having each language comes with its own helper and documentation. Here is a "pragmatic" way to write Debian packages without relying on non-Debian tools: https://vincent.bernat.ch/en/blog/2019-pragmatic-debian-packaging https://vincent.bernat.ch/en/blog/2019-pragmatic-debian-pack... (I am the author). But other than that, I quite agree with your stance: we (Debian) makes life of our contributors harder than it should be. Unfortunately, there is no awareness in the project for that. People trying to change that just silent themselves, like https://michael.stapelberg.ch/posts/2019-03-10-debian-winding-down/ https://michael.stapelberg.ch/posts/2019-03-10-debian-windin....
- qznc 6y agoI also made myself a deb packager script in 100 lines: https://github.com/qznc/simpledeb https://github.com/qznc/simpledeb It doesn't cover anything fancy like post-install actions though.
- BiteCode_dev 6y agoThanks for this tutorial, it covers a lot.
- raverbashing 6y agoI'll put it like this: Debian bureaucracy makes your usual governmental bureaucracy seems sane and sensible in comparison No accountability, tightly knit cabal with high barrier to entry, refractory to external opinions, etc
- neilwilson 6y agoYes. It’s a living breathing example of how Anarchy operates. Which was the intention I believe - hence why https://packages.debian.org/stable/doc/anarchism https://packages.debian.org/stable/doc/anarchism is a package.
- qznc 6y agoOn the other hand, Debian is a large community of volunteers providing a distro on democratic principles for a long time successfully. Comparable distros are either companies (Ubuntu, RedHat, SuSE) or heroic deeds of one or few people (Slackware). I find that an amazing even if it is heavily burdened by technical debt these days.
- BiteCode_dev 6y agoOh, sure. But that's beyond the point that if what they really desire is contribution, which they have been claiming for years, they should make it less painful to package software for the plateform, which we have been claiming for years.
- laykg 6y agoI think many package managers take longer than a week to figure out. RPM is more difficult that deb, setuptools takes months to understand it fully and is changing constantly. Meson, Conan, winget+msi, and the hundreds of other mixtures of build system + package manager also take long to understand. And you have to understand each of them. Homebrew does not even want package authors to create packages themselves. It may be a matter of perception: If you count all web searches, interactions with CI, conference talks that help you understand a more recent package manager, it will also add up to 5 days. Creating a deb is more boring, it's just the machine and you.
- BiteCode_dev 6y agoI'm not counting the research I did prior the 5 days to actually understand deb packaging, only the 5 days trying to package something.
- linkdd 6y agoBack in the day, I created my packages manually (creating the TAR archives, the preinstall/postinstall scripts, and putting all of that in an AR archive, renaming it to .deb). I never even read the documentation, I just did: $ file some.deb $ ar --output somedir some.deb $ ls somedir Definitely not the recommended way, but I never spent more than 10min on a Debian package (installed with dpkg and not through repositories).
- spyc 6y agoYou have some points here, but the Bash part is _not_ the problem. Bash is everywhere and the true fix to that bit is to learn Bash: It's not hard and I benefit from my Bash skills everyday, it's one of the best things to invest even a bit in. Just don't write "actual software" in Bash.
- BiteCode_dev 6y agoOh, but bash is definitively part of the problem. I'm pretty proficient in bash myself, and error handling, debugging, decoupling and refactoring in bash are all horrible. It's just not design for being good at a script with more than a couple of lines. The fact we do use it for such purpose does not make it good at it. The fact it has no namespace, the lack of decent data structures and the very limited functions also all leads to making it a poor foundation to build a lib on. Hence deb packages don't have any kind of framework for basic things: you are on your own.
- joana035 6y agoWell, just me finding it a joy to work with? All the dh helpers that basically does the hard work, I just need to update one or two things in control file and that is it. I have packages closure, Java, python, php, c and very complex piece of software with weird version formats and so far Debian packages cover all those cases for me. I find that is pretty easy to complain about things we don't know, or rant when frustrated, but after investing a bit o time to learn and understand how it works pays off.
- bfrog 6y agoCreating arch or nix packages is a breeze in comparison. I'd argue nix is what everyone wants whether they know it or not. All this container junk is a recipe for disaster.