From 2d7bf0ea4ec270553e882c6b346a8d27b6fecfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:00:55 +0100 Subject: [PATCH 1/3] cleaning --- manifest.toml | 9 ++++++--- scripts/install | 8 ++------ scripts/remove | 4 ---- scripts/upgrade | 7 ++----- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/manifest.toml b/manifest.toml index 58b1591..900877b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Ampache" description.en = "Web based audio/video streaming application" description.fr = "Application de streaming audio et vidéo" -version = "6.1.0~ynh1" +version = "6.2.0~ynh1" maintainers = [] @@ -20,8 +20,11 @@ code = "https://github.com/ampache/ampache" yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = true + sso = false + disk = "50M" ram.build = "500M" ram.runtime = "50M" @@ -43,8 +46,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/ampache/ampache/releases/download/6.1.0/ampache-6.1.0_all_php8.2.zip" - sha256 = "312b2eb738fa9bf32bf044262cb6e849a32673f19e7548c4a8d06ff21dfb2239" + url = "https://github.com/ampache/ampache/releases/download/6.2.0/ampache-6.2.0_all_php8.2.zip" + sha256 = "4b91e0fbe6d16c7c5d3d377219852304d7394663c544c3da2b82097b75706270" in_subdir = false autoupdate.strategy = "latest_github_tag" diff --git a/scripts/install b/scripts/install index 1f4f660..3e90867 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,6 @@ ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key #================================================= ynh_script_progression --message="Setting up source files..." --weight=2 -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" @@ -37,10 +36,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config -# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -50,7 +47,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Loading default database..." --weight=2 -# Load default ampache database ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name < "$install_dir/resources/sql/ampache.sql" #================================================= @@ -65,7 +61,7 @@ ynh_multimedia_build_main_dir #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=2 -ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" +ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" chmod 600 "$install_dir/config/ampache.cfg.php" chown $app: "$install_dir/config/ampache.cfg.php" diff --git a/scripts/remove b/scripts/remove index c08db99..8de2086 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,16 +16,12 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 -# Remove the app-specific logrotate config ynh_remove_logrotate -# Remove the dedicated NGINX config ynh_remove_nginx_config -# Remove the dedicated PHP-FPM config ynh_remove_fpm_config -# Remove the log files ynh_secure_remove --file="/var/log/$app" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2dcfdd8..9cdba68 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep="config/ampache.cfg.php" fi @@ -48,10 +47,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config -# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -76,7 +73,7 @@ fi #(cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) -#ynh_add_config --template="../conf/ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" +#ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" #chmod 600 "$install_dir/config/ampache.cfg.php" #chown $app: "$install_dir/config/ampache.cfg.php" From 58c1cea2e5ef4289b00fdbe93f61db06b65822e8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 22 Dec 2023 13:01:02 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 417543c..c194897 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Ampache is a web based audio/video streaming application and file manager allowi * Integrate with YunoHost users - same username and password * Allow one user to be the administrator (set at the installation) -**Shipped version:** 6.1.0~ynh1 +**Shipped version:** 6.2.0~ynh1 **Demo:** https://ampache.org/demo.html diff --git a/README_fr.md b/README_fr.md index 1b17d32..10da8b0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Ampache est une application Web de streaming audio/vidéo et un gestionnaire de * Intégration avec les utilisateurs YunoHost - mêmes nom d'utilisateur et mot de passe * Autoriser un utilisateur à être l'administrateur (défini lors de l'installation) -**Version incluse :** 6.1.0~ynh1 +**Version incluse :** 6.2.0~ynh1 **Démo :** https://ampache.org/demo.html From bac7d1d486e49c558f33791bafa87706ce9bbd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:53:00 +0100 Subject: [PATCH 3/3] fix --- conf/extra_php-fpm.conf | 4 ++++ conf/nginx.conf | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 conf/extra_php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..700c37c --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M diff --git a/conf/nginx.conf b/conf/nginx.conf index 4bd58b3..e71b042 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,6 +9,10 @@ location __PATH__/ { rewrite ^__PATH__/play/ssid/(.*)/type/(.*)/oid/([0-9]+)/uid/([0-9]+)/client/(.*)/noscrobble/([0-1])/transcode_to/(w+)/bitrate/([0-9]+)/player/(.*)/name/(.*)$ __PATH__/play/index.php?ssid=$1&type=$2&oid=$3&uid=$4&client=$5&noscrobble=$6&transcode_to=$7&bitrate=$8&player=$9&name=$10 last; 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/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$;