1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mediawiki_ynh.git synced 2024-09-03 19:46:05 +02:00

Merge pull request #62 from YunoHost-Apps/testing

Testing
This commit is contained in:
yalh76 2022-06-23 20:15:02 +02:00 committed by GitHub
commit a9360a4c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 69 additions and 70 deletions

View file

@ -36,8 +36,9 @@ def generate_ext_source(asset_url: str, src_filename: str) -> None:
SOURCE_URL={asset_url} SOURCE_URL={asset_url}
SOURCE_SUM={sha256sum_of_url(asset_url)} SOURCE_SUM={sha256sum_of_url(asset_url)}
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true
""")) """))

View file

@ -5,7 +5,7 @@
is_public=1 is_public=1
language="fr" language="fr"
admin="john" admin="john"
password="jztI4OHHr2RfhrqK5wgX" password="1Strong-Password"
wiki_name="MyYunoWiki" wiki_name="MyYunoWiki"
; Checks ; Checks
pkg_linter=1 pkg_linter=1

View file

@ -3,4 +3,5 @@ SOURCE_SUM=583f074bcafcec17da50142a56f5bbfde5c3366977d61d912d7e56fcca3bda1b
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPAuthentication2-REL1_35-03fba4b.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPAuthentication2-REL1_38-502759b.tar.gz
SOURCE_SUM=bbda25c02d85c31bef158b03958edfa3e46831ef53672f8cc8c24c6adda6d244 SOURCE_SUM=2212a2baa6b070d08fe36b8f3cf236a76a7aa58cdc5953c65a9a66d16cee3dc6
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPAuthorization-REL1_37-ba9cdb5.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPAuthorization-REL1_37-ba9cdb5.tar.gz
SOURCE_SUM=b5134407376f33e0c43c7c85fb965757a6ffd83d13280ff26e84d1ced4747bb8 SOURCE_SUM=b5134407376f33e0c43c7c85fb965757a6ffd83d13280ff26e84d1ced4747bb8
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPGroups-REL1_37-ad40602.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPGroups-REL1_37-ad40602.tar.gz
SOURCE_SUM=d98161ae03319bfd92c140210224c3da5fb42c015d2c606eaa64692f69a00dec SOURCE_SUM=d98161ae03319bfd92c140210224c3da5fb42c015d2c606eaa64692f69a00dec
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPProvider-REL1_35-1300b26.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPProvider-REL1_35-1300b26.tar.gz
SOURCE_SUM=6c42b82a4d7753c280731c8f8bda5640cfb2822a6e130e30c95d58476ab7725f SOURCE_SUM=6c42b82a4d7753c280731c8f8bda5640cfb2822a6e130e30c95d58476ab7725f
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPUserInfo-REL1_37-255e2b9.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/LDAPUserInfo-REL1_37-255e2b9.tar.gz
SOURCE_SUM=3751415aa48d1d552c185ce884a3a7ed5745a3baf91c72aa7820b8f89fd548a4 SOURCE_SUM=3751415aa48d1d552c185ce884a3a7ed5745a3baf91c72aa7820b8f89fd548a4
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -9,6 +9,9 @@ location __PATH__/ {
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ @rewrite___NAME__; try_files $uri $uri/ @rewrite___NAME__;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_37-a932c78.tar.gz SOURCE_URL=https://extdist.wmflabs.org/dist/extensions/PluggableAuth-REL1_37-a932c78.tar.gz
SOURCE_SUM=fbfce41876ff07be8d69a29b8b35054a68543d2cc91aa0280e73793d42c6e48e SOURCE_SUM=fbfce41876ff07be8d69a29b8b35054a68543d2cc91aa0280e73793d42c6e48e
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=.tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -7,8 +7,6 @@
# dependencies used by the app # dependencies used by the app
pkg_dependencies="diffutils imagemagick acl" pkg_dependencies="diffutils imagemagick acl"
YNH_PHP_VERSION="7.3"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -104,14 +104,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -121,6 +113,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config --usage=low --footprint=low
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================

View file

@ -30,7 +30,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
@ -44,13 +43,6 @@ test ! -d $final_path \
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -70,6 +62,16 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# SPECIFIC RESTORATION
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=10
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -81,14 +83,11 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#================================================= #=================================================
# SPECIFIC RESTORATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
# REINSTALL DEPENDENCIES ynh_script_progression --message="Restoring the NGINX web server configuration..."
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=10
# Define and install dependencies ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE MYSQL DATABASE # RESTORE THE MYSQL DATABASE

View file

@ -27,7 +27,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
wiki_name=$(ynh_app_setting_get --app=$app --key=wiki_name) wiki_name=$(ynh_app_setting_get --app=$app --key=wiki_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
secret=$(ynh_app_setting_get --app=$app --key=secret) secret=$(ynh_app_setting_get --app=$app --key=secret)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
@ -59,6 +58,13 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
# If db_name doesn't exist, create it # If db_name doesn't exist, create it
if [ -z "$db_name" ]; then if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app) db_name=$(ynh_sanitize_dbid --db_name=$app)
@ -91,13 +97,6 @@ if [[ -n "$ldap_user" ]]; then
ynh_app_setting_delete --app=$app --key=ldap_password ynh_app_setting_delete --app=$app --key=ldap_password
fi fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -131,14 +130,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
@ -155,19 +146,19 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
#================================================= #=================================================
# SPECIFIC UPGRADE # NGINX CONFIGURATION
#================================================= #=================================================
# REMOVE LEGACY LDAP USER ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
#=================================================
#================================================= # Create a dedicated NGINX config
# STORE THE CONFIG FILE CHECKSUM ynh_add_nginx_config
#=================================================
ynh_backup_if_checksum_is_different --file="$final_path/LocalSettings.php"
#================================================= #=================================================
# REPLACE CONFIGURATION SETTINGS # SPECIFIC UPGRADE
#================================================= #=================================================
ynh_script_progression --message="Upgrading application files..." --weight=4 # UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=4
if [ "$path_url" = "/" ]; then if [ "$path_url" = "/" ]; then
# MediaWiki expects a "" for the root URL which is typically assumed to be # MediaWiki expects a "" for the root URL which is typically assumed to be