Closed samtygier closed 3 years ago
I am all in favour of ways to make it easier for people to install and use b-em.
I don't remember setting these specific file permissions and I have not run into problems but then, when installing to /usr/local... I am running the install command as root so it doesn't have any problem with file permissions. Do I take it the flatpak building is installing into a temporary installation area before then packing that up into some kind of archive?
I did just check and my /usr/bin directory has files owned by root and writable by root. The important think about files in a package is that they cannot be overwritten by a normal, unprivileged user, so as long as they are owned by root, i.e. being writable does not open up a 2nd user that is able to write them then I can't see a problem with making the change.
Do I take it the flatpak building is installing into a temporary installation area before then packing that up into some kind of archive?
Yes, I think that's right.
I am attempting to make a flatpak of b-em, but I am hitting an issue with installed file permissions.
The chmod calls in Makefile.am set some of the data files to 444 (read only) and directories to 555 (read and list). This upsets
flatpak-builder
in a number of places, e.g. during the buildError: renameat(checkout-union-2xYf1Q, b-em.cfg): Permission denied
and when trying to build again
Couldn't empty app dir 'build-dir': unlinkat: Permission denied
I think most linux tools assume that files get installed with
write
set for the owner (root), i.e. 644 and 755Just removing the 2 chmod lines from Makefile.am fixes this for me, or modifying them to 644 and 755 (probably safer). I wondered if there was a specific reason they were added? Would you accept a patch modifying them or would you prefer the flatpak build script did the modification.