electron-userland/electron-installer-debian

Binary files should not be in /usr/share/

dlech opened this issue · 7 comments

dlech commented

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.

dlech commented

References:

dlech commented

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?

dlech commented

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.

dlech commented

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.