fdroid: fix permissions on TMPDIR for Vagrant builds

Our `Makefile` implicitly creates the `TMPDIR` folder.
The issue with that is that if `make fdroid-build-env` is called by
`root` - as it is when being used by F-Droid - then the `TMPDIR`
is also owned by `root`, and because its permissions are `0755` the
`vagrant` user is unable to write to it.

This is why implicit targets like this are a nightmare to debug:
63290fd019/Makefile (L120-L124)

For more details see:
https://gitlab.com/fdroid/fdroidserver/-/issues/910
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/8879
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/9140

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-06-10 15:53:31 +02:00
parent 63290fd019
commit 0e12360ed8
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 2 additions and 2 deletions

View File

@ -166,8 +166,8 @@ fdroid-nix-dir: ##@prepare Create /nix directory for F-Droid Vagrant builders
chown vagrant /nix
fdroid-fix-tmp: SHELL := /bin/sh
fdroid-fix-tmp: ##@prepare Fix /tmp permissions for Vagrant builder
chown -R vagrant /tmp
fdroid-fix-tmp: ##@prepare Fix TMPDIR permissions so Vagrant user is the owner
chown -R vagrant "$(TMPDIR)"
fdroid-build-env: fdroid-max-watches fdroid-nix-dir fdroid-fix-tmp ##@prepare Setup build environment for F-Droud build