diff --git a/.gitignore b/.gitignore index 783a4ae..8f144f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ *.sw[op] +.DS_Store diff --git a/README.md b/README.md index d928227..a639381 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Shipped version:** 7.0.10~ynh1 +**Shipped version:** 7.0.12~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index aba8361..df9171f 100644 --- a/README_es.md +++ b/README_es.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Versión actual:** 7.0.10~ynh1 +**Versión actual:** 7.0.12~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 2511b69..ab9fb30 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Paketatutako bertsioa:** 7.0.10~ynh1 +**Paketatutako bertsioa:** 7.0.12~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 4bc0903..208ae90 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Un simple service web de streaming audio personnel, écrit en Vue pour le client Destiné aux développeurs web, Koel utilise certaines des technologies web les plus modernes pour accomplir son travail. -**Version incluse :** 7.0.10~ynh1 +**Version incluse :** 7.0.12~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index c8528b0..65d85f7 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Versión proporcionada:** 7.0.10~ynh1 +**Versión proporcionada:** 7.0.12~ynh1 **Demo:** diff --git a/README_id.md b/README_id.md index d37b7c6..af1d344 100644 --- a/README_id.md +++ b/README_id.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Versi terkirim:** 7.0.10~ynh1 +**Versi terkirim:** 7.0.12~ynh1 **Demo:** diff --git a/README_ru.md b/README_ru.md index 21f206e..2f9ebf0 100644 --- a/README_ru.md +++ b/README_ru.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**Поставляемая версия:** 7.0.10~ynh1 +**Поставляемая версия:** 7.0.12~ynh1 **Демо-версия:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 6470a38..36511dd 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th Targeting web developers, Koel embraces some of the more modern web technologies to do its job. -**分发版本:** 7.0.10~ynh1 +**分发版本:** 7.0.12~ynh1 **演示:** diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf deleted file mode 100644 index 076e6a9..0000000 --- a/conf/extra_php-fpm.conf +++ /dev/null @@ -1,5 +0,0 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M -php_admin_value[memory_limit] = 512M diff --git a/conf/nginx.conf b/conf/nginx.conf index f5f5591..82eec07 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -16,7 +16,7 @@ location ^~ __PATH__/ { location ~* \.php$ { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_index index.php; include fastcgi_params; diff --git a/manifest.toml b/manifest.toml index bbd9326..517a30b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Koel" description.en = "Simple web-based personal audio streaming service" description.fr = "Simple service web de streaming audio personnel" -version = "7.0.10~ynh1" +version = "7.0.12~ynh1" maintainers = ["tituspijean"] @@ -21,7 +21,8 @@ cpe = "cpe:2.3:a:koel:koel" fund = "https://opencollective.com/koel" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2.29" +helpers_version = "2.1" architectures = "all" multi_instance = true ldap = false @@ -43,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz" - sha256 = "8c3fe63ed0d416a94f456050ccc622be9a94b7d85f585b444d0317201fafc767" + url = "https://github.com/koel/koel/releases/download/v7.0.12/koel-v7.0.12.tar.gz" + sha256 = "d56921b243954b4fcc0b03caa880e85179caf71ed1a0cdc5ef9893ddb2432bbd" autoupdate.strategy = "latest_github_release" autoupdate.asset = "^koel-v.*tar.gz$" @@ -53,6 +54,7 @@ ram.runtime = "50M" allow_email = true [resources.install_dir] + group = "www-data:r-x" [resources.data_dir] diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 9d63962..82951e9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,49 +1,40 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE DATA DIR #================================================= -ynh_backup --src_path="$data_dir" --is_big +ynh_backup "$data_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info --message="Backing up the MySQL database..." +ynh_print_info "Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql +ynh_mysql_dump_db > db.sql #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index a4fcb69..39d37fc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,25 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index 21704ee..e073788 100755 --- a/scripts/install +++ b/scripts/install @@ -1,64 +1,55 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) +ynh_app_setting_set --key=php_memory_limit --value=512M + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression "Setting up source files..." ynh_setup_source --dest_dir="$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================ -ynh_script_progression --message="Initializing multimedia directories..." --weight=1 +ynh_script_progression "Initializing multimedia directories..." ynh_multimedia_build_main_dir ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="$app" ynh_multimedia_addaccess $app -#================================================= -# APP INITIAL CONFIGURATION #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression "Adding $app's configuration..." app_key=$(ynh_string_random --length=32) -ynh_app_setting_set --app="$app" --key="app_key" --value="$app_key" -ynh_add_config --template="env" --destination="$install_dir/.env" +ynh_app_setting_set --key="app_key" --value="$app_key" +ynh_config_add --template="env" --destination="$install_dir/.env" #================================================= # INITIALIZE THE APP #================================================= -ynh_script_progression --message="Initializing $app..." --weight=1 +ynh_script_progression "Initializing $app..." pushd $install_dir - ynh_exec_as $app php$phpversion artisan koel:init --no-assets --no-interaction --quiet + ynh_exec_as_app php$php_version artisan koel:init --no-assets --no-interaction --quiet popd #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_script_progression "Adding system configurations related to $app..." -ynh_add_fpm_config +ynh_config_add_phpfpm -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last + +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index e7a51e2..d35597a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers @@ -13,14 +7,14 @@ source /usr/share/yunohost/helpers # REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_remove_nginx_config +ynh_config_remove_nginx -ynh_remove_fpm_config +ynh_config_remove_phpfpm -ynh_secure_remove --file="/home/yunohost.multimedia/$app" +ynh_safe_rm "/home/yunohost.multimedia/$app" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 19f0b44..2a5e447 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,37 +1,28 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chown -R $app:www-data "$install_dir" +ynh_restore "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=1 +ynh_script_progression "Restoring the data directory..." -ynh_restore_file --origin_path="$data_dir" --not_mandatory +ynh_restore "$data_dir" chown -R $app:www-data "$data_dir" #================================================= # RESTORING MULTIMEDIA DIRECTORIES #================================================ -ynh_script_progression --message="Restoring multimedia directories..." --weight=1 +ynh_script_progression "Restoring multimedia directories..." ynh_multimedia_build_main_dir ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="$app" @@ -40,35 +31,32 @@ ynh_multimedia_addaccess $app #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 +ynh_script_progression "Restoring the MySQL database..." -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_db_shell < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +ynh_script_progression "Restoring system configurations related to $app..." -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 +ynh_script_progression "Reloading NGINX web server and $app's service..." -# Typically you only have either $app or php-fpm but not both at the same time... -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemctl --service=php$php_version-fpm --action=reload -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 145220e..3e0d740 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,37 +1,28 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) +ynh_app_setting_set_default --key=php_memory_limit --value=512M + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." --weight=1 +ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 +ynh_script_progression "Upgrading system configurations related to $app..." -ynh_add_fpm_config +ynh_config_add_phpfpm -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed" diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op]