4 minutes
Introducing dbranch π₯βπ€
Caveat lector
This post discusses tools reluctantly written with AI assistance. If you don’t entertain using them under any circumstance, and think even reading about them legally compromise your ability to reimplement them yourselves, stop reading now
Today’s post introduces dbranch, a tool to update a Debian package in unstable, and rebuild downstream branches (currently supports Ubuntu PPAs and stable proposed-updates; backports support could be easily added once I have a package that needs it). Eagle-eyed readers might notice the naming similarity with my previous tool ebranch; and the credit for the name and inspiration eventually came from Jens Petersen’s fbrnch.
It’s the latest addition to the Sandogasa set of package maintenance tools and libraries. Previous blog posts discuss tools that are generally Fedora / CentOS centric, though with exceptions (e.g. sandogasa-report can report on GitHub and GitLab activity, and so works for Debian since the VCS for most Debian packages, Salsa, is a GitLab instance.
As I noted earlier, I find LLM use very problematic - but unfortunately necessary in my dayjob, and like it or not it pays the bill. So I’ve been iterating on finding an approach that minimizes the concerns and maximizes the benefits… it’s a work in progress, and I fully accept there are a lot of room for improvements - feedback welcome!
With the previous tools in the series the aim is to automate complex tasks that are tedious to do by hand; the tools would narrate what they are doing when run in verbose mode, but in a descriptive way. But those tools target the Fedora ecosystem, where the main sponsoring company is basically as AI pilled as my employer.
With dbranch - bearing in mind the issue of allowing AI-assisted contributions is not settled - I’d rather err on the safe side. This tool invokes the exact same tools a Debian package maintainer would run (well, one set of such tools, it’s opinionatedly based on my workflows), and when run in --explain mode, shows exactly the commands so someone can learn the ropes by following along. When in this mode, any changes to packaging metadata (e.g. debian/changelog) also results in the diff being shown.
The process of maintaining a Debian package is, after all, quite straightforward to a seasoned developer, but easy to get wrong when one is newer. Speaking for myself, I had a lot of questions in #debian-mentors (and private conversations) - while most of them revolve around creating new packages from scratch, there are some intricacies in less-often-explored paths (e.g. working with proposed updates) that was not obvious to me as someone whose main experience is with another distribution.
And now the workflow is consistent - and practice makes perfect; the more you use this the more you remember the steps!
A transcript is worth a thousand words, of course, so before I go too far:
# updates the VCS checkout at ~/src/debian/pkgs/sugarjar; the Debian branch is debian/unstable; explain every step;
# do all the standard stages (import + build locally + lint + push to Salsa), then upload with dput, then `gbp tag`
$ dbranch -- update -C ~/src/debian/pkgs/sugarjar debian/unstable --explain --stage all,upload,tag --build-suite unstable
# rebuild the current branch in the noble branch (which is assumed to be for Ubuntu noble)
$ dbranch rebuild noble --dry-run # on debian/unstable, damo 3.2.8-1
Β» noble (codename: noble)
$ git checkout noble
$ git merge --signoff --no-edit debian/unstable
Β» Resolve the debian/changelog conflict
$ git add debian/changelog
$ git commit -s --no-edit
Β» Generate the rebuild changelog entry
$ gbp dch --bpo -R -D noble
Β» Normalize the entry to 3.2.8-1~noble+1 / "Rebuild for noble"
$ git commit -s -m 'Update changelog for 3.2.8-1~noble+1 release' debian/changelog
(The commands that a user would need to run to repro are highlighted in green when the actual tool is run)
Feedback time
More details on crates.io and in the development notes. I’m not planning on packaging this officially in Debian yet, but it’s an easy install with cargo install dbranch; I’ve been dogfooding this to update my existing Debian packages (except when changes to patches are needed, or some debugging is required) and it’s been working really well.
Let me know if this is useful to you or if you have requests for improvement or bugfixes! Please file requests at the issue tracker.
This post is day 37 of my #100DaysToOffload challenge. Visit https://100daystooffload.com to get more info, or to get involved.
Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~michel-slm/public-inbox@lists.sr.ht [mailing list etiquette]
Posts are also tooted to @michelin@hachyderm.io or @michel_slm@social.coop
100DaysToOffload debian foss llm package-management ppa rust sandogasa ubuntu
771 Words
2026-06-22 00:00
Comments
You can use your Mastodon account to reply to this post.