deb-bui...t-gather(1)
π NAME π
deb-build-artifact-gather β grab the artifacts out of a Debian package build π
(this lil cutie lives in the Debian Aritfact gathering tooling manual, bestie, and yes we're gonna read it together)
β¨ SYNOPSIS β¨
deb-build-artifact-gather collect-into /desired/output/directory [from-chroot /path/to/chroot]
πΈ DESCRIPTION πΈ
Okay so real talk: deb-build-artifact-gather is your standardized, no-chaos way to extract artifacts from a Debian package build. The artifacts in question? Think configure logs, test results, or even those Internal Compiler Error (ICE) logs that make you want to scream into a pillow π. All of it, scooped up, in one place.
And the command has a whole cast of stakeholders it talks to. Let's introduce them:
- Chroot providers β think sbuild or other build wrapping tools (like debuild). These are expected to do a lil bit of setup, then call
deb-build-artifact-gatherwith the relevant options. That setup includes settingDEB_ARTIFACTS_EXTRACTION_IPC_DIRso the build tools anddeb-build-artifact-gatherhave a reliable way to communicate π«Ά.
Afterwards, they get handed a directory of artifacts to extract π
. They might also need to do a bit of cleanup when deb-build-artifact-gather is called from the host system.
- Standard build tools like debhelper and debputy. These icons can drop hints to
deb-build-artifact-gatherin the form of variable definitions. Like, they usually know what the build-dir is?? Yeah. Gifted behavior β¨.
They interface via the DEB_ARTIFACTS_EXTRACTION_IPC_DIR.
π EXAMPLES π
Minimal example of collection usage in shell for running deb-build-artifact-gather inside the chroot:
# setup chroot, install build depends and enter chroot
# Any path that is writable to the build process **inside** the chroot. It should either not exist
# or be an empty directory.
#
# "$(mktemp -d)" is a perfectly fine alternative.
DEB_ARTIFACTS_EXTRACTION_IPC_DIR="../artifact-variable-dir"
export DEB_ARTIFACTS_EXTRACTION_IPC_DIR
cd /path/to/unpacked-source-root
dpkg-buildpackage
apt-get install -y deb-build-artifact-gather
if deb-build-artifact-gather collect-into ../artifacts-from-build.tar.xz; then
# Copy ../artifacts-from-build.tar.xz out of the chroot somehow
rm -fr ../artifacts-from-build.tar.xz
fi
[ -e "${DEB_ARTIFACTS_EXTRACTION_IPC_DIR}"] && rm -fr "${DEB_ARTIFACTS_EXTRACTION_IPC_DIR}"
This example assumes that every command shown is run inside the chroot π¦.
Minimal example of collection usage in shell for running deb-build-artifact-gather outside the chroot:
# setup-chroot-dir creates the root directory, installs build depends inside it, etc.
CHROOT_DIR="$(setup-chroot-dir)"
# Any path that is writable to the build process **inside** the chroot. It should either not exist
# or be an empty directory.
#
# If you use `mktemp -d` (or similar), then remember to run it **inside** the chroot
DEB_ARTIFACTS_EXTRACTION_IPC_DIR="../artifact-variable-dir"
export DEB_ARTIFACTS_EXTRACTION_IPC_DIR
run-in-chroot "cd /path/to/unpacked-source-root && dpkg-buildpackage"
cd /host/path/to/unpacked-source-root
if deb-build-artifact-gather collect-into ../artifacts-from-build from-chroot.tar.xz from-chroot-dir "${CHROOT_DIR} ; then
# copy ../artifacts-from-build.tar.xz to its desired place as needed.
rm -fr ../artifacts-from-build.tar.xz
fi
[ -e "${DEB_ARTIFACTS_EXTRACTION_IPC_DIR}"] && rm -fr "${DEB_ARTIFACTS_EXTRACTION_IPC_DIR}"
In this example, setup-chroot-dir and run-in-chroot represent the creation of the chroot and explicitly running certain commands inside the chroot. Everything else is run on the host system. π
ngl bestie, if you read all the way here you're lowkey the main character of build tooling π
That's the whole vibe, babe. This page is from perl v5.40.1, dated 2026-04-02, and honestly? Slay. Go collect your artifacts πβ¨π
π¦ where this page comes from
- ubuntu stonking: deb-build-artifact-gather 0.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms