1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pixelfed_ynh.git synced 2024-09-03 20:06:04 +02:00

Merge pull request #101 from YunoHost-Apps/fix-install-for-buster

[wip] Fix install for buster
This commit is contained in:
yalh76 2020-03-28 18:57:56 +01:00 committed by GitHub
commit 98f8daad22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 32 deletions

View file

@ -11,9 +11,9 @@
setup_public=1
upgrade=1
# 0.10.6
upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97
# upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97
# 0.10.7
upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8
# upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8
backup_restore=1
multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.

View file

@ -6,7 +6,7 @@
# dependencies used by the app
pkg_dependencies="postgresql redis-server \
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 libwebp6 \
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4|libvpx5 libmagickwand-6.q16-3|libmagickwand-6.q16-6 libwebp6 \
pngquant jpegoptim gifsicle"
extra_pkg_dependencies="php7.3-bcmath php7.3-cli php7.3-curl php7.3-exif php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-pgsql php7.3-simplexml php7.3-xml php7.3-zip php7.3-intl"

View file

@ -56,6 +56,17 @@ ynh_app_setting_set --app="$app" --key=app_key --value="$app_key"
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# INSTALL PHP7.3
#=================================================
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_print_info --message="Installing php7.3..."
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
fi
#=================================================
# INSTALL DEPENDENCIES
#=================================================
@ -63,13 +74,6 @@ ynh_print_info --message="Installing dependencies..."
ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# INSTALL PHP
#=================================================
ynh_print_info --message="Installing php..."
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
#=================================================
# CREATE A POSTGRESQL DATABASE
#=================================================
@ -128,11 +132,6 @@ chown -R "$app": "$final_path"
ynh_install_composer --phpversion="7.3" --workdir="$final_path"
# Fix Google Recaptcha removal
ynh_secure_remove --file="$final_path/bootstrap/cache"
mkdir -p "$final_path/bootstrap/cache"
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
#=================================================
# SPECIFIC SETUP
#=================================================

View file

@ -58,7 +58,9 @@ ynh_print_info --message="Removing dependencies..."
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
ynh_remove_php
if [ "$(lsb_release --codename --short)" != "buster" ]; then
ynh_remove_php
fi
#=================================================
# REMOVE APP MAIN DIR

View file

@ -77,11 +77,15 @@ ynh_print_info --message="Restoring user rights..."
chown -R "$app": "$final_path"
#=================================================
# INSTALL PHP
# INSTALL PHP7.3
#=================================================
ynh_print_info --message="Installing php..."
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_print_info --message="Installing php7.3..."
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
fi
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION

View file

@ -113,6 +113,17 @@ ynh_print_info --message="Upgrading nginx web server configuration..."
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# UPGRADE PHP7.3
#=================================================
if [ "$(lsb_release --codename --short)" = "buster" ]; then
pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies"
else
ynh_print_info --message="Upgrading php7.3..."
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
fi
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@ -120,14 +131,6 @@ ynh_print_info --message="Upgrading dependencies..."
ynh_install_app_dependencies "$pkg_dependencies"
#=================================================
# UPGRADE PHP
#=================================================
ynh_print_info --message="Upgrading php..."
ynh_remove_php
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -153,11 +156,6 @@ ynh_print_info --message="Updating php dependencies..."
chown -R "$app": "$final_path"
# Fix Google Recaptcha removal
ynh_secure_remove --file="$final_path/bootstrap/cache"
mkdir -p "$final_path/bootstrap/cache"
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update"
#=================================================