From 7b91ed696bc6ff6e00bea6772956dadef5ef2fe5 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 22 Sep 2026 06:39:12 +0100 Subject: [PATCH] fix(packaging): make bump-changelog.sh work non-interactively Now that tools/version.sh reports a real rolling version, this script's dch path actually runs (previously it was always the no-op branch, so the bug was latent). Two fixes: - dch --ignoretime does not exist (unknown option on noble devscripts); drop it. - Without DEBEMAIL/DEBNAME dch prints warnings and waits for a keypress ("Did you see those 2 warnings? Press RETURN"), which would hang an unattended CI build. Set them from the debian/control Maintainer so dch runs non-interactively and the changelog entry carries the right identity. Verified end-to-end in the jazzy build image: version.sh -> 26.09.06, bump-changelog stamps the changelog to 26.09.06 (non-interactively, stdin closed), dpkg-buildpackage builds, the .deb installs, and a find_package consumer runs. Re-running the bump is a no-op ("Changelog already at 26.09.06"). Co-authored-by: openhands --- tools/bump-changelog.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/bump-changelog.sh b/tools/bump-changelog.sh index 3066ba4..a101e4b 100755 --- a/tools/bump-changelog.sh +++ b/tools/bump-changelog.sh @@ -12,6 +12,20 @@ CURRENT="$(head -n1 "${ROOT}/debian/changelog" | sed -nE 's/^[A-Za-z0-9._+-]+ \( if [ "${VERSION}" = "${CURRENT}" ]; then echo "Changelog already at ${VERSION}." else - dch --distribution noble --ignoretime -v "${VERSION}" \ + # dch identity: prefer the package maintainer (single source of truth in + # debian/control). Setting DEBNAME/DEBEMAIL keeps dch non-interactive -- + # without them dch prints warnings and waits for a keypress, which would + # hang unattended builds. + MAINTAINER="$(sed -nE 's/^Maintainer:[[:space:]]*(.*)$/\1/p' "${ROOT}/debian/control" | head -n1)" + EMAIL_RE='<([^>]+)>' + if [[ "${MAINTAINER}" =~ ${EMAIL_RE} ]]; then + NAME="${MAINTAINER%% <}*" + EMAIL="${BASH_REMATCH[1]}" + else + NAME="$(git -C "${ROOT}" config user.name || echo maintainer)" + EMAIL="$(git -C "${ROOT}" config user.email || echo maintainer@example.com)" + fi + DEBNAME="${NAME}" DEBEMAIL="${EMAIL}" \ + dch --distribution noble -v "${VERSION}" \ "Bumped to rolling version ${VERSION}." fi