build: fail fast in deb Makefile and allow overriding the Python interpreter - #102
Closed
Willi Mann (wmann-celonis) wants to merge 1 commit into
Closed
build: fail fast in deb Makefile and allow overriding the Python interpreter#102Willi Mann (wmann-celonis) wants to merge 1 commit into
Willi Mann (wmann-celonis) wants to merge 1 commit into
Conversation
…rpreter The deb build masked its real failure: with `.ONESHELL:` and no `set -e`, a failing `sdist_dsc` step (missing or Python-3.12-incompatible stdeb) let the recipe continue until `dpkg-buildpackage` ran in the repo root, which has no `debian/changelog`, producing a misleading "changelog missing" error. - Set `.SHELLFLAGS := -ec` so recipes abort at the first failing command - Add `PYTHON ?= python3` (used for both sdist_dsc calls) so the build can target an interpreter with a working stdeb, e.g. `make PYTHON=python3.11 all` Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
No longer needed due to #104 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
maketo build the.debpackages fails with a misleadingdebian/changelogmissing error. That is a downstream symptom, not the root cause.The
debian/changelog(and the rest of the package'sdebian/tree) is generated bystdeb'ssdist_dscstep. That step is what actually fails — but the recipes use.ONESHELL:withoutset -e, so on failure the recipe keeps going:cd deb_dist/<pkg>-*silently no-ops (the glob never matches), anddpkg-buildpackagethen runs in the repo root, whosedebian/has onlycompat+homccd.serviceand nochangelog. Hence the confusing error.sdist_dscfails for environment reasons such as:python3thatmakeinvokes not havingstdebinstalled (error: invalid command 'sdist_dsc'), orstdeb 0.10.0being incompatible with Python 3.12+ (AttributeError: module 'configparser' has no attribute 'SafeConfigParser').Fix
Makefile hardening only — surface the real failure and make the interpreter selectable:
.SHELLFLAGS := -ecso recipes abort at the first failing command instead of limping into the changelog error.PYTHON ?= python3, used for bothsdist_dsccalls, so the build can target an interpreter with a working stdeb, e.g.make PYTHON=python3.11 all.Notes
stdebwork on Python 3.12; producing.debs still requires an interpreter ≤ 3.11 with a working stdeb (or a jammy build environment as the README assumes). The build now reports that clearly rather than masking it.🤖 Generated with Claude Code