dh_fixperms unsets X permission to node.js scripts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debhelper (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 16.04.2 LTS
debhelper version 9.20160115ubuntu3
Expected: executable *.js scripts retain X permission
Happened: permissions of all *.js files are set to 0644
1) Node.js packages are often contain javascript files which supposed to be run just like ordinary shell, python or perl scripts without explicit interpreter designation (i.e. './scriptname.js' instead of 'nodejs ./scriptname.js')
2) These scripts may or may not include '.js' extension in their names, nevertheless they are still executable scripts and should have X permission.
3) dh_fixperms, which is a part of package debhelper shipped with ubuntu 16.04, unsets that permission to all *.js files because it treats them like "Web application related files".
4) This new behaviour of dh_fixperms (compared with older Ubuntu releases) makes described above node.js scripts broken if they happened to be a part of deb package, because they can no longer be called without interpreter:
$ ./bin/scriptname.js
-bash: ./bin/scriptnam
This was fixed in debhelper/10.9 (per https:/ /bugs.debian. org/840913), which is available in Bionic.