Orphaning bcachefs-tools in Debian

Around a decade ago, I was happy to learn about bcache – a Linux block cache system that implements tiered storage (like a pool of hard disks with SSDs for cache) on Linux. At that stage, ZFS on Linux was nowhere close to where it is today, so any progress on gaining more ZFS features in general Linux systems was very welcome. These days we care a bit less about tiered storage, since any cost benefit in using anything else than nvme tends to quickly evaporate compared to time you eventually lose on it.

In 2015, it was announced that bcache would grow into its own filesystem. This was particularly exciting and it caused quite a buzz in the Linux community, because it brought along with it more features that compare with ZFS (and also btrfs), including built-in compression, built-in encryption, check-summing and RAID implementations.

Unlike ZFS, it didn’t have a dkms module, so if you wanted to test bcachefs back then, you’d have to pull the entire upstream bcachefs kernel source tree and compile it. Not ideal, but for a promise of a new, shiny, full-featured filesystem, it was worth it.

In 2019, it seemed that the time has come for bcachefs to be merged into Linux, so I thought that it’s about time we have the userspace tools (bcachefs-tools) packaged in Debian. Even if the Debian kernel wouldn’t have it yet by the time the bullseye (Debian 11) release happened, it might still have been useful for a future backported kernel or users who roll their own.

By total coincidence, the first git snapshot that I got into Debian (version 0.1+git20190829.aa2a42b) was committed exactly 5 years ago today.

It was quite easy to package it, since it was written in C and shipped with a makefile that just worked, and it made it past NEW into unstable in 19 January 2020, just as I was about to head off to FOSDEM as the pandemic started, but that’s of course a whole other story.

Fast-forwarding towards the end of 2023, version 1.2 shipped with some utilities written in Rust, this caused a little delay, since I wasn’t at all familiar with Rust packaging yet, so I shipped an update that didn’t yet include those utilities, and saw this as an opportunity to learn more about how the Rust eco-system worked and Rust in Debian.

So, back in April the Rust dependencies for bcachefs-tools in Debian didn’t at all match the build requirements. I got some help from the Rust team who says that the common practice is to relax the dependencies of Rust software so that it builds in Debian. So errno, which needed the exact version 0.2, was relaxed so that it could build with version 0.4 in Debian, udev 0.7 was relaxed for 0.8 in Debian, memoffset from 0.8.5 to 0.6.5, paste from 1.0.11 to 1.08 and bindgen from 0.69.9 to 0.66.

I found this a bit disturbing, but it seems that some Rust people have lots of confidence that if something builds, it will run fine. And at least it did build, and the resulting binaries did work, although I’m personally still not very comfortable or confident about this approach (perhaps that might change as I learn more about Rust).

With that in mind, at this point you may wonder how any distribution could sanely package this. The problem is that they can’t. Fedora and other distributions with stable releases take a similar approach to what we’ve done in Debian, while distributions with much more relaxed policies (like Arch) include all the dependencies as they are vendored upstream.

As it stands now, bcachefs-tools is impossible to maintain in Debian stable. While my primary concerns when packaging, are for Debian unstable and the next stable release, I also keep in mind people who have to support these packages long after I stopped caring about them (like Freexian who does LTS support for Debian or Canonical who has long-term Ubuntu support, and probably other organisations that I’ve never even heard of yet). And of course, if bcachfs-tools don’t have any usable stable releases, it doesn’t have any LTS releases either, so anyone who needs to support bcachefs-tools long-term has to carry the support burden on their own, and if they bundle it’s dependencies, then those as well.

I’ll admit that I don’t have any solution for fixing this. I suppose if I were upstream I might look into the possibility of at least supporting a larger range of recent dependencies (usually easy enough if you don’t hop onto the newest features right away) so that distributions with stable releases only need to concern themselves with providing some minimum recent versions, but even if that could work, the upstream author is 100% against any solution other than vendoring all its dependencies with the utility and insisting that it must only be built using these bundled dependencies. I’ve made 6 uploads for this package so far this year, but still I constantly get complaints that it’s out of date and that it’s ancient. If a piece of software is considered so old that it’s useless by the time it’s been published for two or three months, then there’s no way it can survive even a usual stable release cycle, nevermind any kind of long-term support.

With this in mind (not even considering some hostile emails that I recently received from the upstream developer or his public rants on lkml and reddit), I decided to remove bcachefs-tools from Debian completely. Although after discussing this with another DD, I was convinced to orphan it instead, which I have now done. I made an upload to experimental so that it’s still available if someone wants to work on it (without having to go through NEW again), it’s been removed from unstable so that it doesn’t migrate to testing, and the ancient (especially by bcachefs-tools standards) versions that are in stable and oldstable will be removed too, since they are very likely to cause damage with any recent kernel versions that support bcachefs.

And so, my adventure with bcachefs-tools comes to an end. I’d advise that if you consider using bcachefs for any kind of production use in the near future, you first consider how supportable it is long-term, and whether there’s really anyone at all that is succeeding in providing stable support for it.

You may also like...

13 Responses

  1. @blog as far as I've understood, the problem is the fact that Cargo dependencies have to be packaged by debian as well, right?

    Since Rust normally uses static linking for crates, would a solution be to include in the source files all the relevant cargo deps (without a dev package for each)?

    How are node-based programs packaged in Debian? AFAIK, node uses npm which is tragically known for really big and deep dependency tree, so the situation there should be way worse…

  2. @blog oof, this brings back unpleasant memories of when @Conan_Kudo and I tried to package bcachefs-utils in a sane way for Fedora ?

  3. @blog I can sort of understand that our upstreams doesn't want to support a large range of dependencies, as it would cause a combinatoric explosion of versions to run the CI/CD tests for.

    But it's also madness for a distribution to vendor exact versions of all dependencies in every binary that we ship. The security story in nixos doesn't look fun: https://fosdem.org/2024/schedule/event/fosdem-2024-1983-remediating-thousands-of-untracked-security-vulnerabilities-in-nixpkgs/

    I think that might be worth it to try to raise awareness on how a holistic security process should be supported in cargo.

    • @blog To more concrete, this was the slide I was thinking of:

      • @alexanderkjall @blog Yikes, that talk contains some scary content, I didn't realise Nixos doesn't check uploads and that people can just include anything from Flatpacks to binaries from .debs (even non-free) in their Nixos packages! Sounds like they need something like Debian's ftpmaster team to review packages and a stronger packaging policy!

      • @alexanderkjall The one ca. 16mn explaining that “nixpkgs does not currently document a preference for building from source” is another serious issue, IMO.

        @blog

        • @civodul @blog Yeah I agree but I didn't intend this to become a nixos-bash thread :).

          The original question about how to both make life easy for application developers (easy to use lots of dependencies) and easy for OS maintainers (not having to handle multiple versions of each dependency) is worth thinking about.

          • @civodul @blog

            Maybe we need better automation for handling part of the workload. For example if all of our upstream used renovatebot in their CI/CD system so that they knew about security problems in their dependency trees proactivly, that would for example shift some of the work of maintainers to the developers.

  1. 30 August 2024

    […] ???? […]

  2. 31 August 2024
  3. 1 September 2024

    […] файловой системой Bcachefs. В качестве причины удаления называется невозможность дальнейшего сопровождения пакета в […]

  4. 2 September 2024

    […] Das Paket bcachefs-tools gilt mit Debian 12.7 als obsolet. Es findet sich dafür bei Debian kein Maintainer mehr und es ist in der Ankündigung zusätzlich als “buggy”gekennzeichnet. Der Maintainer der bcachefs-tools, Jonathan Carter, der auch schon Debian Projektleiter war, nennt die Umstellung von C auf Rust als Grund für die Entfernung aus dem “stable” Channel. Die Tools seien nun als verwaist markiert und er habe sie nach “experimental” hochgeladen, so dass das Paket immer noch verfügbar sei, wenn jemand daran arbeiten möchte. Es sei aber aus “unstable” entfernt worden, so dass es nicht nach “testing” wandere. “Und so geht mein Abenteuer mit bcachefs-tools zu Ende”, schreibt Carter. […]

Leave a Reply