Skip to content

Commit d6d9cb6

Browse files
fix: sbuild/gbp wrapper now correctly builds quilt-format debian packages in docker
- Fixed the wrapper to avoid host-side build-dependency checks by adding --no-clean-source to sbuild. - Ensured gbp buildpackage creates .dsc and .orig.tar.xz before invoking sbuild, so quilt-format packages build correctly. - Removed incorrect use of -d (which was being passed to sbuild instead of dpkg-buildpackage). - Now, sbuild runs entirely inside the chroot, and all Build-Depends are resolved in the container, not on the host. - The build now fails only if dependencies are missing in the target distro, not due to wrapper or Docker issues. - This enables proper cross-building and native builds for both quilt and native source formats. - Improved error handling and logging for easier debugging of Docker and sbuild failures. Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
1 parent a88ad9a commit d6d9cb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docker_deb_build.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,12 @@ def build_package_in_docker(image_base: str, source_dir: str, output_dir: str, b
268268
# The --git-builder value is a single string passed to gbp
269269
extra_repo_option = " ".join(f"--extra-repository='{repo}'" for repo in extra_repo) if extra_repo else ""
270270
lintian_option = '--no-run-lintian' if not run_lintian else ""
271-
sbuild_cmd = f"sbuild --build-dir=/workspace/output --host=arm64 --build={build_arch} --dist={distro} {lintian_option} {extra_repo_option}"
271+
# --no-clean-source: skip dpkg-buildpackage --clean on host (avoids build-dep check outside chroot)
272+
sbuild_cmd = f"sbuild --no-clean-source --build-dir=/workspace/output --host=arm64 --build={build_arch} --dist={distro} {lintian_option} {extra_repo_option}"
272273

273274
# Ensure git inside the container treats the mounted checkout as safe
274275
git_safe_cmd = "git config --global --add safe.directory /workspace/src"
275-
gbp_cmd = f"{git_safe_cmd} && gbp buildpackage --git-ignore-branch --git-builder=\"{sbuild_cmd}\""
276+
gbp_cmd = f"{git_safe_cmd} && gbp buildpackage --git-no-pristine-tar --git-ignore-branch --git-builder=\"{sbuild_cmd}\""
276277

277278
# Decide which build command to run based on debian/source/format in the source tree.
278279
# Prefer 'native' -> run sbuild directly. If the source format uses 'quilt', use gbp.

0 commit comments

Comments
 (0)