Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Nico Della Torre
Mon, 12 Oct 2026 18:20
Bug#1150722: dh-virtualenv: buildsystem leaves the build path in activate scripts and long-path scripts
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads