Binary files should not be in /usr/share/
dlech opened this issue · 7 comments
What version of electron-installer-debian
are you using?
0.3.1
What version of node
and npm
are you using?
v6.1.0
3.8.6
What operating system are you using?
debian jessie
What did you do? Please include the configuration you are using for electron-installer-debian
.
Built a debian package from an electron package. No special configuration.
electron-installer-debian --src etcher-release/Etcher-linux-x64/ --dest etcher-release/debian/ --arch amd64
What did you expect to happen?
In the package that was created, /usr/share/
should only contain architecture interdependent files.
What actually happened?
/usr/share/
contains architecture dependent binary files.
Installing the electron package to /usr/lib/<package>
instead of /usr/share/<package>
would be more appropriate.
References:
Umm, I was following what atom
does: https://github.com/atom/atom/blob/f58d70a8fdaf50294d2d4447a6efc612f4beb9db/script/lib/create-debian-package.js#L34
Do you think they are wrong?
It is certainly wrong according to FSH and debian policy. I don't think it actually causes any technical problems though. It's just that if I was looking for binaries, /usr/share/
would be the last place I would look.
vscode
seems to install to /usr/share
too: https://github.com/Microsoft/vscode/blob/555b4f0bf9a0bebe95c28d0e66a0336df48eab5c/build/gulpfile.vscode.linux.js#L39-L40
Maybe we are missing something in the guidelines?
I think atom and vscode are missing (or choosing to ignore) the guidelines. 😃
Debian policy is quite clear. From https://www.debian.org/doc/debian-policy/ch-opersys.html#s9.1:
The FHS requirement that architecture-independent application-specific static files be located in /usr/share is relaxed to a suggestion. In particular, a subdirectory of /usr/lib may be used by a package (or a collection of packages) to hold a mixture of architecture-independent and architecture-dependent files. However, when a directory is entirely composed of architecture-independent files, it should be located in /usr/share.
Yup, sounds pretty clear. Any dangerous side effects you can think of? If not, feel free to create a PR and I'll merge it.
Nothing dangerous. The only potential problem I see is that if another package (not created with electron-installed-debian
) has files at /usr/lib/<package>
, then packages that are created with electron-installer-debian
will fail to install because of conflicting files.