Article View: linux.debian.bugs.dist
Article #616Bug#1150722: dh-virtualenv: buildsystem leaves the build path in activate scripts and long-path scripts
From: Nico Della Torre
Date: Mon, 12 Oct 2026 18:20
Date: Mon, 12 Oct 2026 18:20
51 lines
3422 bytes
3422 bytes
Package: dh-virtualenv
Version: 1.2.2-3
Severity: normal
The dh_virtualenv debhelper buildsystem (dh $@ --buildsystem=dh_virtualenv)
only rewrites the "#!.../bin/python" shebangs when it copies the
virtualenv to its final location. Two kinds of files keep the build
directory:
1. bin/activate, bin/activate.csh, bin/activate.fish, bin/activate.nu
and bin/activate.xsh are never changed, so after installing the
package sourcing them sets VIRTUAL_ENV to the build directory, e.g.
/build/foo/build/usr/share/python/foo, and python from the
virtualenv is not found, in bash, fish and tcsh alike.
2. When the build path is longer than the shebang limit, pip writes the
console scripts with a /bin/sh trampoline instead of a shebang:
#!/bin/sh
'''exec' /very/long/build/path/usr/share/python/foo/bin/python "$0" "$@"
' '''
The exec line is not rewritten, so the installed scripts (the
package entry points, but also bin/pip) fail with:
exec: /very/long/build/path/.../bin/python: Permission denied
Steps to reproduce: build a package with
export DH_VIRTUALENV_INSTALL_SUFFIX = foo
%:
dh $@ --buildsystem=dh_virtualenv
install it and source /usr/share/python/foo/bin/activate. For the
second issue, build it from a directory whose path is longer than about
100 characters.
-- System Information:
Debian Release: forky/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 7.2.9+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Technical Details
Message-ID:
<NNsMV-57uw-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Nico Della Torre <nicoz91@ubuntu.com> Newsgroups: linux.debian.bugs.dist Subject: Bug#1150722: dh-virtualenv: buildsystem leaves the build path in activate scripts and long-path scripts Date: Mon, 12 Oct 2026 20:20:01 +0200 Message-ID: <NNsMV-57uw-1@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Oct 12 18:11:19 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.651 Reply-To: Nico Della Torre <nicoz91@ubuntu.com>, 1150722@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+python@tracker.debian.org X-Debian-Pr-Message: report 1150722 X-Debian-Pr-Package: dh-virtualenv X-Debian-Pr-Source: dh-virtualenv Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: reportbug 13.2.0+nmu1 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996443 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 51 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 12 Oct 2026 20:09:08 +0200 X-Original-Message-ID: <179182854831.89901.13703973474781249571.reportbug@ryzendeb.linuxlab>