From 54a6abf89fb2dbe150aabb746f0adc36429882a8 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 22 Sep 2026 07:36:47 +0100 Subject: [PATCH] fix(packaging): dch maintainer name (DEBFULLNAME) and trailing asterisk Follow-up to the non-interactive bump-changelog fix; the changelog entry was being written as 'root <...>' with a stray asterisk: - dch takes the maintainer NAME from DEBFULLNAME, not DEBNAME (which it ignores), so the name fell back to the passwd entry of the build user (root in the container/CI). - NAME="${MAINTAINER%% <}*" parsed as ${MAINTAINER%% <} plus a literal '*' (the '}' ends the expansion), appending an asterisk to the name. Verified in the builder image: the entry is now '-- Murilo M Marinho ', the bump stays fully non-interactive (stdin closed), and re-running is a no-op. Co-authored-by: openhands --- tools/bump-changelog.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/bump-changelog.sh b/tools/bump-changelog.sh index a101e4b..61a8b26 100755 --- a/tools/bump-changelog.sh +++ b/tools/bump-changelog.sh @@ -13,19 +13,20 @@ if [ "${VERSION}" = "${CURRENT}" ]; then echo "Changelog already at ${VERSION}." else # 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. + # debian/control). Setting DEBFULLNAME/DEBEMAIL keeps dch non-interactive + # (it takes the name from DEBFULLNAME, not DEBNAME) -- 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%% <}*" + 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}" \ + DEBFULLNAME="${NAME}" DEBEMAIL="${EMAIL}" \ dch --distribution noble -v "${VERSION}" \ "Bumped to rolling version ${VERSION}." fi