Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_shebangs() fails #352

Open
steveo-at-bosch opened this issue Dec 2, 2022 · 2 comments
Open

fix_shebangs() fails #352

steveo-at-bosch opened this issue Dec 2, 2022 · 2 comments

Comments

@steveo-at-bosch
Copy link

steveo-at-bosch commented Dec 2, 2022

Hi,

when calling dpkg-buildpackage -us -uc -b, it fails with

...
Successfully built ad-tools
sed: can't read debian/mypackage/opt/venvs/mypackage/bin/rst2xetex.py: No such file or directory
Traceback (most recent call last):
  File "/usr/bin/dh_virtualenv", line 111, in <module>
    sys.exit(main() or 0)
  File "/usr/bin/dh_virtualenv", line 103, in main
    deploy.fix_shebangs()
  File "/usr/lib/python3/dist-packages/dh_virtualenv/deployment.py", line 234, in fix_shebangs
    subprocess.check_call(['sed', '-i', regex, f])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)

here's the content of my rules

#!/usr/bin/make -f

%:
	dh $@ --with python-virtualenv

and control

Source: mypackage
Section: python
Priority: extra
Maintainer: None <None>
Build-Depends: debhelper (>= 9), python, dh-virtualenv (>= 0.7)
Standards-Version: 3.9.5

Package: mypackage
Architecture: any
Pre-Depends: dpkg (>= 1.16.1), python2.7-minimal | python2.6-minimal, ${misc:Pre-Depends}
Depends: ${python:Depends}, ${misc:Depends}
Description: mydescr
 mydescr

Environment:

Ubuntu 20.04
Debian dpkg-buildpackage version 1.19.7.
dh_virtualenv 1.2.2

@steveo-at-bosch
Copy link
Author

I can reproduce the error with the documentation example from https://dh-virtualenv.readthedocs.io/en/1.2.1/

@aroxby-motorola
Copy link

For anyone who stumbles across this from Google: this is a bug when sed interacts with VirtioFS (like Docker Desktop, see https://forums.docker.com/t/sed-couldnt-open-temporary-file-xyz-permission-denied-when-using-virtiofs/125473/5). The bug runs from sed 4.2.1 until 4.8. You can upgrade sed or use gRPC FUSE instead of VirtioFS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants