From 26a7d92b0b8e52cca1e4fb5d73f997b89230d655 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Tue, 13 Oct 2026 13:21:50 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20the=20Linux=20packages=20shipping=20a=20s?= =?UTF-8?q?tray=20copy=20of=20Python=20as=20venv/bin/=F0=9D=9C=8Bthon.=20#?= =?UTF-8?q?10414=20(#10564)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.14's venv module creates a "𝜋thon" symlink next to python, python3 and python3.X (CPython gh-119535). The hash bang fixup runs "sed -i" over venv/bin/*, which replaces every symlink with a regular copy of its target; the python* links are recreated afterwards, but the new alias was not, so packages built against Python 3.14 shipped a full copy of the interpreter under that name, and dpkg on Ubuntu 26.04 fails to unpack it. Nothing uses the alias, so remove it when the venv is created. --- pkg/linux/build-functions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index 2eb3fa0a7..3d24f064f 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -102,6 +102,16 @@ _create_python_virtualenv() { # file inside the venv's own site-packages (which we do own), added # once pip/wheel are installed below. "${SYSTEM_PYTHON_PATH}" -m venv venv + + # Python 3.14's venv module adds a novelty "𝜋thon" alias (U+1D70B, see + # CPython gh-119535) alongside python/python3/python3.X. Nothing uses it, + # and the "sed -i" hash bang fixup below turns the symlink into a full + # copy of the interpreter which, unlike the python* links, is never put + # back. dpkg on Ubuntu 26.04 then fails to unpack it with EPERM (#10414), + # so remove it. The name is given as raw UTF-8 bytes so that it matches + # whatever the build shell's locale is. + rm -f "venv/bin/"$'\360\235\234\213'"thon" + # shellcheck disable=SC1091 . venv/bin/activate