From a0a6f19285405d1d9cceaf42eefae5bbc7c5246a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 4 Jul 2023 00:26:27 +0200 Subject: [PATCH 1/2] install: attempt to fix issues with git dubious ownership --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 14eea94..7550dd0 100755 --- a/scripts/install +++ b/scripts/install @@ -69,13 +69,14 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path -git config --system --add safe.directory $final_path # Note: We use git instead of ynh_setup_source, cause this repo use submodules git clone https://github.com/zamentur/libreto.git "$final_path" --quiet +chown -R $app:www-data "$final_path" + pushd "$final_path" - git checkout $COMMIT --quiet - git submodule update --init --recursive --quiet + ynh_exec_as $app git checkout $COMMIT --quiet + ynh_exec_as $app git submodule update --init --recursive --quiet popd chmod 750 "$final_path" From ff1981efbe75e26da9929efd76268fcfb61509fd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 4 Jul 2023 00:27:13 +0200 Subject: [PATCH 2/2] upgrade: attempt to fix issues with git dubious ownership --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 35ca7e3..e3a8997 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,14 +75,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 - git config --system --add safe.directory $final_path + chown -R $app:www-data "$final_path" # Download, check integrity, uncompress and patch the source from app.src pushd "$final_path" - git checkout master - git pull --quiet - git checkout $COMMIT --quiet - git submodule update --init --recursive --quiet + ynh_exec_as $app git checkout master + ynh_exec_as $app git pull --quiet + ynh_exec_as $app git checkout $COMMIT --quiet + ynh_exec_as $app git submodule update --init --recursive --quiet popd fi