From 0e12360ed8eeeb261b699ea3ad2ab79634bac08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 10 Jun 2021 15:53:31 +0200 Subject: [PATCH] fdroid: fix permissions on TMPDIR for Vagrant builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/status-im/status-react/blob/63290fd019d26647e0b8a3d5f1e323b762644337/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 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 229844b44f..2b5c50e2ad 100644 --- a/Makefile +++ b/Makefile @@ -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