The whole Debian package infrastructure is remarkable complete and capable, but it's dense and the documentation is not great. The git-buildpackage is barely documented, at least not in a manor which where a newbie can just build a package and be sure that an upgrade will work in the future.
Also personally I'd avoid using git buildpackage at the beginning since it's rather complicated and not everyone uses it (although those who do are very vocal!)
You don't need git at all, but if you want something easier, create a repo on salsa and keep the debian/ directory there and that's it.
10 years ago, when I wanted to package my utility, there were 3-4 documentation snippets, each of which usually used different set of utilities.
- Should I create the package boilerplate with dh_make or debmake? The structure they create differs.
- What's the name of command which I use to update the version in changelog? deb... no, dh_... no, ... it's `dch`!
- You manage patches with `quilt`, but where do I get `dquilt` mentioned in the documentation? It's not in any package! Oh, it just an alias you should grab from `Chapter 3. Modifying the source` documentation and add into your .bashrc! And also `~/.quiltrc-dpkg`, or nothing would work.
- Packaging: dpkg-buildpackage, debmake, or maybe pbuilder?
- How do I append CFLAGS? It's DEB_CFLAGS_MAINT_APPEND, thanks dh_make comment inside the rule file! Too bad if you've created the structure with debmake!
- dpkg-gensymbols: warning: some new symbols appeared in the symbols file
- dh_missing: error: missing files, aborting
But to Debian's credit, once you've done everything more or less correctly, you can use all the power of the build system. It's very easy to cross-compile software, just a matter of a single command. On other systems it's usually much harder.
Will it automatially restart the .service file of the daemon you just upgraded? Will it autodetect which python modules it requires to install?
Arch/pacman packages are quite simple which makes the maintenance burden less. However, when compared to more mainstream distros like OpenSUSE and Fedora, Debian's package recipes are more unwieldy and arcane. Why do we need to put things in the upstream source in the first place? Why do we use scripts that don't make sense and full of legacy in 2025?
I deal with Yocto almost daily, still most Debian packages are a mistery to me. Don't even mention things like getting an almost upstream Linux kernel (like a vanilla release + some patches on top) to be ported as a normal Debian package.
Makes plenty of sense to me.
90% of the scripts are to do that, or to recompile .pyc files when you install a new module or when you install a new version of python.
2. Use needsrestart (isn't this what Debian uses also?)
3. I don't package python things, I wouldn't know. Maybe, maybe not.
Do the above have different trade offs that are not best fit for everyone? Yes, of course. I used Debian for about a decade, and Arch for almost as long, and have found everything clear and well documented. All the various functionality I want is typically implemented by a simple tool designed for that one job, with a nice wiki page/entry that I could find trivially.
I did not write my post in order to start a "distribution debate". I had the sense that the contents of debian/ in the OP were not fully given, because there was a lot there, and I wanted to know if that was true, and if so, why. Having a pretty short and self-explanatory single file alternative to look at might prompt someone to pipe up and say "look, the Debian equivalent is short/long/simple/complex" in a clear way, which would be interesting because I consider such Arch examples to be near ideal.
Unfortunately, it’s not easy to discover what automatic things are happening and what they’re doing. (If you look at the debian files for a package without packaging knowledge, you often can’t tell how the package is made. Arch Linux PKGBUILD files for example are much easier to understand without prior knowledge.)
This isn’t necessarily a problem, but the documentation is poor as well, which means the barrier to entry is artificially high.
At least that was my impression from a few years ago. Maybe things are better now.
I'm maintaining cargo-deb that builds a .deb from a Rust/Cargo binary project with no configuration needed.
[I used to maintain sbuild and was the author of schroot back in the day]