dh_fixperms unsets X permission to node.js scripts

Bug #1675340 reported by Andrey
6
This bug affects 1 person
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/scriptname.js: Permission denied

Revision history for this message
Niels Thykier (niels-thykier) wrote :

This was fixed in debhelper/10.9 (per https://bugs.debian.org/840913), which is available in Bionic.

Changed in debhelper (Ubuntu):
status: New → Fix Released
no longer affects: debhelper
Revision history for this message
Niels Thykier (niels-thykier) wrote :

Sorry, misread the bug and unfortunately it seems I cannot undo the fact that bug is closed.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

reopened.

Changed in debhelper (Ubuntu):
status: Fix Released → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.