Ask / Submit

File permissions different in the SDK build engine

asked 2019-09-20 00:10:20 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-09-20 06:47:47 +0300

martyone gravatar image

Hello folks,

I have tried to compile libmlocale which is partially autotools based thus it needs running ./configure.

My build fails with:

RPM build errors:
/var/tmp/rpm-tmp.L4oyur: line 41: ./configure: Permission denied
error: Bad exit status from /var/tmp/rpm-tmp.L4oyur (%build)
    Bad exit status from /var/tmp/rpm-tmp.L4oyur (%build)

It turned out that if I ssh to the build machine and check the sources location the file permissions are not having the executable flag:

[mersdk@SailfishSDK libmlocale]$ ls -l
total 196
-rw-r--r-- 1 mersdk 1001 26850 Jan  5  2018 LICENSE.LGPL
-rw-r--r-- 1 mersdk 1001 24890 Sep 19 21:14 Makefile
-rw-r--r-- 1 mersdk 1001   545 Jan  5  2018 README
drwxr-xr-x 1 mersdk 1001  4096 Sep 19 21:14 RPMS
drwxr-xr-x 1 mersdk 1001  4096 Sep 19 20:20 benchmarks
-rw-r--r-- 1 mersdk 1001 18284 Sep 19 20:20 configure
-rw-r--r-- 1 mersdk 1001  4258 Jan  7  2018 debugfiles.list

While on the host:

mm@lapos:~/Projektek/jolla/libmlocale$ ls -l
összesen 204
drwxrwxr-x  8 mm mm  4096 szept 19 22:20 benchmarks
**-rwxr-xr-x  1 mm mm 18284 szept 19 22:20 configure**
-rw-r--r--  1 mm mm  4258 jan    7  2018 debugfiles.list
-rw-r--r--  1 mm mm  4214 jan    7  2018 debuglinks.list
-rw-r--r--  1 mm mm    66 jan    7  2018 debugsources.list
drwxrwxr-x  4 mm mm  4096 jan    5  2018 doc
-rw-r--r--  1 mm mm     0 jan    7  2018 documentation.list
drwxrwxr-x  2 mm mm  4096 szept 19 22:27 lib
-rw-rw-r--  1 mm mm 26850 jan    5  2018 LICENSE.LGPL
-rw-rw-r--  1 mm mm 26210 szept 19 22:25 Makefile

First I suspected the VirtualBox to be responsible for this problem (similar problems can be found on the web). Usually it is recommended to install the Guest additions. It turned out that I run VirtualBox 5.2.32 while the Guest additions installed in the build machine is 5.3.20 (since it is a patch revision difference it should not matter). I have tried to update Guest addidions, but it requres the kernel headers which is not present on the system.

Then it turned out that the files under /home/src have all executable bit set, while paths under /home/mersdk/share/ do not.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted

answered 2019-09-20 06:44:46 +0300

martyone gravatar image

By default, certain file permissions are forced globally to ensure the same build results on all platforms.

While on Linux and macOS it would be possible to transparently handle all file permission bits, on Windows this is not possible and VirtualBox would fall back to the 0777 file permissions globally, which is known to cause more issues with the most common Sailfish SDK use cases.

You can override this behavior by dropping the fmode and dmode mount options in /lib/systemd/system/home-mersdk.service. See also /etc/mersdk.env.systemd.

edit flag offensive delete publish link more


Users can connect many smart devices with their Alexa Amazon App and Echo. For example thermostats, smart lights, cameras connected to Alexa, Robot vacuums. Alexa App will control all these devices like a home automation system. You just have to give a voice command only to Alexa for performing such tasks.

Alexa.Amazon.comAlexa appAlexa Amazon AppAlexa setupEcho Dot setup
Amazon echo dot

maria654 ( 2019-09-20 08:38:01 +0300 )edit

Thanks @martyone for the quick answer!

martonmiklos ( 2019-09-20 09:21:30 +0300 )edit

I have simply dropped the fmode parameter in the systemd service and now all files got executable permissions. With this hack I have been able to build the mlocale just fine.

martonmiklos ( 2019-09-20 21:32:29 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2019-09-20 00:10:20 +0300

Seen: 75 times

Last updated: Sep 20