Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can anyone experienced with debian package development, point me to some valid, recent and Best Practice™ guides or blog posts explaining how to package stuff for Debian?


If you want to package something from upstream git then you might want to check out https://optimizedbyotto.com/post/debian-packaging-from-git/ it is relatively new and uses a modernish tooling.

The policy manual serves as both ruleset but also explains lots of things w.r.t. packaging, as that's part of the ruleset: https://www.debian.org/doc/debian-policy/index.html#

For actually uploading new packages to the archive you need to be "DD" (Debian Developer), which is a bit more involved process to go through. "DM"s (Debian Maintainer) is easier and can do already lots of things. It's also possible to start out by finding an existing DD that sponsors your upload, i.e. checks your final packaging work and if it looks alright will upload it in your name to the repositories.

You might also check out the wiki of Debian, it's sometimes a bit dated and got lots of info packed in, but can still be valuable if you're willing to work through the outdated bits. E.g.: https://wiki.debian.org/DebianMentorsFaq


The native Debian package tooling is very far from sane, even compared to other distros - and they actively refuse to make it saner (instead just adding layers of cruft without addressing the core problems). You're probably best off using `checkinstall` or similar, and adding dependencies by hand.


is RPM that much saner? which RPM based distribution comes with long term support suitable for servers that also includes btrfs? (i used to use centos, but since red hat removed btrfs from the kernel, refusing to support it, i had to switch to debian, because i depend on btrfs support)


Note that I'm only talking about package-building itself here, not the practical distributions built thereupon; if that is considered, the tradeoffs are quite different. IMO the deb-using world is more useful than the rpm-using world, especially for non-server environments in particular. This is also where Nix beat Guix despite Nix's packaging language making TeX look sane.

But yes, RPM itself is better than Deb if only because there's a single .spec file rather than a sea of embedded nonsense. It's still not as nice as many "port" packaging systems (e.g. the BSDs, but also Gentoo), but most of those cheat by not having to deal with arbitrary binary packages. Still, binary packages are hardly an excuse for the ludicrous contortions the standard deb-building tools choose to require.


> which RPM based distribution comes with long term support suitable for servers that also includes btrfs?

Sounds like OpenSUSE to me. I tend to favor the fast-updating versions, but I'm pretty sure openSUSE Leap is exactly what you're asking for.


You can also use opensuse slowroll. Like Tumbleweed but only monthly updates.


Oracle Linux (gasp). They employ some of the main developers of btrfs, "their" distribution is just a RHEL rebuild with some patches (including btrfs), and it is very quick at delivering updates (they're usually several hours behind RHEL, while the next best — AlmaLinux — takes a day or two. Other rebuilds, very much including the somehow heavily hyped Rocky, are much slower).

I don't think there are many alternatives. OpenSUSE isn't supported for very long, and there really isn't anything else if you want btrfs, no Debian or its derivatives, and fire & forget kind of distribution.

Edit: Also look at Alpine Linux, if supports btrfs and has one of the best package formats that is an absolute joy to write (way easier than rpm or deb).

It's pretty different in some areas (no systemd and musl being two examples), check if that's fine for you.


Well openSUSE Leap 16.0 will be launched in October 1st, it will be supported for some time. At least 7 years.


I don't think they promise more than three years? (Not a criticism in the slightest, I don't demand anything from unpaid volunteers.)

"RHEL" is supported for 10, and if Oracle screws us over (I can believe in that possibility), ELevate lets you migrate sideways to any supported alternative.

It really depends on the use case.


It uses semantic versioning. Maybe that's where our different assessments lie.

For example, 15.6 was still stuck on GCC 7. Guess when 15.0 was released. Also, stuck on Python 3.6, which was released around the same time.


thank you for that answer. yes oracle is well hmm :-o

alpine feels a bit to opinionated for my taste. i just found this though: https://mrgecko.org/blog/2024/add-btrfs-support-to-rocky-and... centos has a SIG that provides kernels with btrfs which can be used with alma and rocky. that sounds promising.



If you just want to put a binary in a .deb, for internal usage, check out https://vincent.bernat.ch/en/blog/2019-pragmatic-debian-pack.... I went through it in the last year, worked fine to build for bookworm.


Not linked yet is the Debian Packaging Portal: https://wiki.debian.org/Packaging

There's two tutorials/walkthroughs linked from there:

- how to build an existing Debian package: https://wiki.debian.org/BuildingTutorial

- how to package new software for Debian: https://www.debian.org/doc/manuals/debmake-doc/ch05.en.html


Debreate




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: