#1140701 sbuild "working dir" becomes $HOME instead of the current dir

Package:
sbuild
Source:
sbuild
Submitter:
Santiago Ruano Rincón
Date:
2026-06-24 19:03:03 UTC
Severity:
normal
#1140701#5
Date:
2026-06-24 19:02:19 UTC
From:
To:
Dear sbuild maintainers:

My use case is to produce a couple of files from the building process,
generated by debsbom, taking the chroot as input.  Probably the fix for
the bug is not the best way to address my use case, but anyway.  Please
consider the following commands:

sudo apt install python3-cyclonedx-lib python3-spdx-tools debsbom
TEMP_DIR=$(mktemp -d)
cd ${TEMP_DIR}
sbuild --dist=sid --post-build-commands="debsbom generate -t cdx --out - --root %SBUILD_CHROOT_DIR > ./sbom.cdx.json ; debsbom generate -t spdx --out - --root %SBUILD_CHROOT_DIR > ./sbom.spdx.json" debusine

I would expect to have these couple of files created:

${TEMP_DIR}/sbom.cdx.json
${TEMP_DIR}/sbom.spdx.json

However, the files are created in my $HOME.  Of course, this overwrites
existing sbom.{cdx,spdx}.json that I may have there.

Thanks for maintaining sbuild!