DEBREBUILD(1)

πŸ’– DEBREBUILD πŸ’–

okay bestie, welcome to debrebuild, a User Commands girly whose whole personality is rebuilding binary packages. Manual number one, section one, and yes, we're doing this. πŸŽ€


🌸 NAME 🌸

debrebuild β€” use a buildinfo file and snapshot.d.o to recreate binary packages. that's it, that's the job, and she EATS every time. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

debrebuild [options] <buildinfo>

πŸ’… DESCRIPTION πŸ’…

first things first, the little mini-synopsis she drops right there in the description:

debrebuild <--help|-h>

so. you hand her a buildinfo file, and she builds the source package it references β€” inside an environment that's documented in that very same buildinfo file. main character behavior honestly. 🌈

the actual build can be done by sbuild or other builders, in a chroot environment that debootsnap creates. and then?? the generated artifacts get verified against the hashes from the buildinfo file. no cap, hash-checked and everything. πŸ”₯


✨ OPTIONS ✨

  • --help, -h β€” shows you this help and dips. exit, stage left. πŸ‘‹
  • --[no-]respect-build-path β€” whether to set up the build so that it uses the Build-Path from the .buildinfo file you gave her. bless. πŸ’–
  • --buildresult β€” the directory where the build artifacts go. default is ./ (yes, right here, in the group chat, in front of everyone).
  • --cache=PATH β€” directory for caching downloaded .deb packages. if you leave it empty or just don't pass it at all, a temporary directory gets used and then discarded afterwards. she's not clingy, she's efficient. 🧚
  • --builder=BUILDER β€” which building software gets used. possible values are none, sbuild, mmdebstrap, dpkg and sbuild+unshare. the default is none. see section BUILDER for details.
⚠️ Note (important, bestie, read it): debrebuild can parse buildinfo files with and without a GPG signature. however β€” if a signature is present, it gets discarded, because debrebuild does not support verifying it. so if the authenticity or integrity of the buildinfo files actually matters to you, you have to check that stuff before you invoke debrebuild, for example by using dscverify. protect yourself. 🫢

πŸ“ EXAMPLES πŸ“

$ debrebuild --buildresult=./artifacts --builder=mmdebstrap
hello_2.10-2_amd64.buildinfo

πŸ‘‘ BUILDERS πŸ‘‘

debrebuild can use different backends to do the actual package rebuild, and you pick your fave with the --builder option. the default is "none".

  • none β€” dry-run mode. nothing gets built. she's just vibing, observing, manifesting. πŸ’€
  • sbuild β€” use sbuild to build the package. this requires sbuild to be set up with schroot chroots of Debian stable distributions. setup girlies, this one's for you.
  • mmdebstrap β€” use mmdebstrap to build the package. this requires no setup and no superuser privileges. iconic. no notes. ⭐
  • dpkg β€” directly run apt-get and dpkg-buildpackage on the current system, no chroot involved. this requires root privileges. πŸ”₯
  • sbuild+unshare β€” use sbuild with the unshare backend. this creates the chroot and performs the build without superuser privileges and without any setup. the plot twist that slays. πŸ’…

🧚 UNSHARE 🧚

okay, history lesson: before kernel 5.10.1, or before Debian 11 (Bullseye), unprivileged user namespaces were disabled in Debian for security reasons. see Debian bug #898446 for the details if you want the full lore.

to enable user namespaces, run:

$ sudo sysctl -w kernel.unprivileged_userns_clone=1

the sbuild+unshare builder requires having unprivileged user namespaces activated, and the mmdebstrap builder benefits from it. on Ubuntu they're enabled by default, so Ubuntu girlies you're already served. πŸ¦‹


πŸ’€ LIMITATIONS πŸ’€

right now, the code assumes that all packages were at some point part of Debian unstable main. which means it fails for:

  • packages from Debian ports
  • packages from experimental
  • locally built packages
  • packages from third party repositories

enabling support for Debian ports and experimental is conceptually possible and only needs somebody implementing it. so like… bestie? a main character? πŸ‘€βœ¨ anyone?


and that's the whole page, no cap. this was debrebuild version 2.26.11ubuntu1, dated September 2026, manual DEBREBUILD(1). mwah, love u, go rebuild something. πŸ’–πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from