From 052bc0f5da7c9809fd9778159737bf1426bd3491 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 27 Jun 2021 11:57:49 +0200 Subject: [PATCH 1/9] Add templates --- .github/ISSUE_TEMPLATE.md | 55 +++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 +++++ check_process | 8 +-- doc/DISCLAIMER.md | 6 ++ doc/DISCLAIMER_fr.md | 6 ++ .../screenshots/screenshot_01.png | Bin manifest.json | 13 ++-- pull_request_template.md | 16 ----- scripts/_common.sh | 53 -------------- scripts/install | 47 ++++++------- scripts/restore | 45 ++++++------ scripts/upgrade | 65 ++++++++++-------- 12 files changed, 173 insertions(+), 157 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md rename screenshot_01.png => doc/screenshots/screenshot_01.png (100%) delete mode 100644 pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/check_process b/check_process index 52741e9..53ade2f 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e9e3275 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,6 @@ +## YunoHost specific features + +* YunoHost LDAP accounts supported: **Yes** +* [Multimedia](https://github.com/YunoHost-Apps/yunohost.multimedia) handled +* Memory RAM limit set to 256 MB because Airsonic was often killed by lack of RAM (hello OOM killer) +* See https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..b1f1a70 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,6 @@ +## Fonctionnalités spécifiques à YunoHost + +* Comptes LDAP YunoHost pris en charge : **oui** +* [Multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) géré +* Limite de mémoire RAM fixée à 256 Mb car Airsonic quittait souvant par manque de RAM (bonjour OOM killer) +* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ \ No newline at end of file diff --git a/screenshot_01.png b/doc/screenshots/screenshot_01.png similarity index 100% rename from screenshot_01.png rename to doc/screenshots/screenshot_01.png diff --git a/manifest.json b/manifest.json index 3974e8b..c474638 100644 --- a/manifest.json +++ b/manifest.json @@ -8,13 +8,20 @@ }, "version": "10.6.2~ynh2", "url": "http://airsonic.github.io", + "upstream": { + "license": "GPL-3.0-or-later", + "website": "https://airsonic.github.io/", + "demo": "https://airsonic.github.io/demo/", + "admindoc": "https://airsonic.github.io/docs/", + "code": "https://github.com/airsonic/airsonic" + }, "license": "GPL-3.0-or-later", "maintainer": { "name": "Gofannon", "email": "gofannon@riseup.net" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ @@ -36,10 +43,6 @@ { "name": "admin", "type": "user", - "help": { - "en": "This user will have full control on this application and will be able to configure it.", - "fr": "Cet utilisateur aura le controle total de l'application et pourra la configurer." - }, "example": "johndoe" }, { diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/_common.sh b/scripts/_common.sh index 019d16b..4b38524 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,56 +18,3 @@ pkg_dependencies="openjdk-8-jre|openjdk-11-jre ffmpeg" #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Install or update the main directory yunohost.multimedia -# -# usage: ynh_multimedia_build_main_dir -ynh_multimedia_build_main_dir () { - local ynh_media_release="v1.2" - local checksum="806a827ba1902d6911095602a9221181" - - # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1 - - # Check the control sum - echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ - || ynh_die "Corrupt source" - - # Check if the package acl is installed. Or install it. - ynh_package_is_installed 'acl' \ - || ynh_package_install acl - - # Extract - mkdir yunohost.multimedia-master - tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1 - ./yunohost.multimedia-master/script/ynh_media_build.sh -} - -# Add a directory in yunohost.multimedia -# This "directory" will be a symbolic link to a existing directory. -# -# usage: ynh_multimedia_addfolder "Source directory" "Destination directory" -# -# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias. -# | arg: -d, --dest_dir= - Destination directory - The name and the place of the symbolic link, relative to "/home/yunohost.multimedia" -ynh_multimedia_addfolder () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= ) - local source_dir - local dest_dir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir" -} - -# Grant write access to multimedia directories to a specified user -# -# usage: ynh_multimedia_addaccess user_name -# -# | arg: user_name - User to be granted write access -ynh_multimedia_addaccess () { - local user_name=$1 - groupadd -f multimedia - usermod -a -G multimedia $user_name -} diff --git a/scripts/install b/scripts/install index 4b0ffdd..6d583ee 100644 --- a/scripts/install +++ b/scripts/install @@ -72,6 +72,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=43 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=3 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -81,6 +89,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -90,27 +102,18 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 ynh_add_nginx_config #================================================= -# CREATE DEDICATED USER +# CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Configuring system user..." --weight=3 +ynh_script_progression --message="Creating a data directory..." --weight=1 -# Create a system user -ynh_system_user_create --username=$app - -#================================================= -# SPECIFIC SETUP -#================================================= -# CREATE DIRECTORIES -#================================================= +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} -#================================================= -# SECURING FILES AND DIRECTORIES -#================================================= - -chown -R $app:www-data /home/yunohost.app/$app -chmod 764 /home/yunohost.app/$app +chmod 764 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -120,6 +123,7 @@ ynh_script_progression --message="Adding multimedia directories..." --weight=3 ynh_multimedia_build_main_dir ynh_multimedia_addfolder --source_dir="/home/yunohost.app/$app/Podcasts" --dest_dir="share/Podcasts" ynh_multimedia_addfolder --source_dir="/home/yunohost.app/$app/Playlists" --dest_dir="share/Playlists" + # Allow airsonic to write into these directories ynh_multimedia_addaccess $app @@ -141,7 +145,7 @@ if [ -x /usr/bin/lame ]; then # Check if 'lame' is installed and executable fi # Ensure links belong to the $app user -chown $app: $final_path/transcode +chown $app $final_path/transcode #================================================= # SETUP SYSTEMD @@ -159,15 +163,6 @@ ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/defaul # Copy configuration file of airsonic ynh_add_config --template="../conf/airsonic.properties" --destination="$final_path/airsonic.properties" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R $app: $final_path - #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/restore b/scripts/restore index 46f09eb..29ff7cb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -49,6 +50,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -56,20 +65,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # SPECIFIC RESTORATION @@ -99,7 +97,7 @@ if [ -x /usr/bin/lame -a ! -e $final_path/transcode/lame ]; then # Check if 'l fi # Ensure links belong to the $app user -chown $app: $final_path/transcode +chown $app $final_path/transcode #================================================= # RESTORE SYSTEMD @@ -130,19 +128,18 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= -# RESTORE DATA +# RESTORE THE DATA DIRECTORY #================================================= +ynh_script_progression --message="Restoring the data directory..." --time --weight=1 # Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. -ynh_restore_file --origin_path="/home/yunohost.app/$app" --not_mandatory +ynh_restore_file --origin_path="$datadir" --not_mandatory -#================================================= -# RESTORE USER RIGHTS -#================================================= +mkdir -p $datadir -mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} -chown -R $app:www-data /home/yunohost.app/$app -chmod -R 764 /home/yunohost.app/$app +chmod 764 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -153,7 +150,7 @@ ynh_multimedia_build_main_dir ynh_multimedia_addfolder --source_dir="/home/yunohost.app/$app/Podcasts" --dest_dir="share/Podcasts" ynh_multimedia_addfolder --source_dir="/home/yunohost.app/$app/Playlists" --dest_dir="share/Playlists" # Allow airsonic to write into these directories -ynh_multimedia_addaccess $app +ynh_multimedia_addaccess --user_name=$app #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index a4af9c8..d3f4583 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) port=$(ynh_app_setting_get --app=$app --key=port) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION @@ -38,6 +39,17 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If public_path doesn't exist, create it +if [ -z "$datadir" ]; then + datadir=/home/yunohost.app/$app + mkdir -p $datadir/{Podcasts,Playlists} + chmod 764 "$datadir" + chmod -R o-rwx "$datadir" + chown -R $app:www-data "$datadir" + ynh_app_setting_set --app=$app --key=datadir --value=$datadir + cp -a "/home/yunohost.$app" "$datadir" +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -70,6 +82,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -82,6 +102,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -97,28 +121,20 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=4 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +# #================================================= +# # SPECIFIC UPGRADE +# #================================================= +# # CREATE DIRECTORIES +# #================================================= -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +# mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} -#================================================= -# SPECIFIC UPGRADE -#================================================= -# CREATE DIRECTORIES -#================================================= +# #================================================= +# # SECURING FILES AND DIRECTORIES +# #================================================= -mkdir -p /home/yunohost.app/$app/{Podcasts,Playlists} - -#================================================= -# SECURING FILES AND DIRECTORIES -#================================================= - -chown -R $app:www-data /home/yunohost.app/$app -chmod 764 /home/yunohost.app/$app +# chown -R $app:www-data /home/yunohost.app/$app +# chmod 764 /home/yunohost.app/$app #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -160,7 +176,7 @@ if [ -x /usr/bin/lame -a ! -e $final_path/transcode/lame ]; then # Check if 'l fi # Ensure links belong to the $app user -chown $app: $final_path/transcode +chown $app $final_path/transcode #================================================= # STORE THE CONFIG FILE CHECKSUM @@ -187,15 +203,6 @@ ynh_add_systemd_config ynh_add_config --template="../conf/systemd-sysconfig" --destination="/etc/default/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R $app: $final_path - #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #================================================= From dc6aae4461156108cd393a2bfb4cf011f26623a7 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 27 Jun 2021 09:57:56 +0000 Subject: [PATCH 2/9] Auto-update README --- README.md | 64 +++++++++++++++++++++------------------------------- README_fr.md | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 38 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index b23e7ee..f570b48 100644 --- a/README.md +++ b/README.md @@ -1,68 +1,56 @@ + + # Airsonic for YunoHost [![Integration level](https://dash.yunohost.org/integration/airsonic.svg)](https://dash.yunohost.org/appci/app/airsonic) ![](https://ci-apps.yunohost.org/ci/badges/airsonic.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/airsonic.maintain.svg) [![Install Airsonic with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) -> *This package allow you to install Airsonic quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install Airsonic quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Airsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room. +Stream and manage your music collection -Airsonic is designed to handle very large music collections (hundreds of gigabytes). Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins, Airsonic supports on-the-fly conversion and streaming of virtually any audio format, including WMA, FLAC, APE, Musepack, WavPack and Shorten. +**Shipped version:** 10.6.2~ynh2 -If you have constrained bandwidth, you may set an upper limit for the bit rate of the music streams. Airsonic will then automatically re sample the music to a suitable bit rate. - -In addition to being a streaming media server, Airsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Airsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes. - -**Shipped version:** 10.6.2 +**Demo:** https://airsonic.github.io/demo/ ## Screenshots -![Sreenshot of home page of Airsonic](screenshot_01.png) +![](./doc/screenshots/screenshot_01.png) -## Demo - -* [Official demo](https://airsonic.github.io/demo/) - -## Configuration - -How to configure this app: by an admin panel. - -## Documentation - -* Official documentation: https://airsonic.github.io/docs +## Disclaimers / important information ## YunoHost specific features -* YunoHost LDAP accounts supported: you can login with them +* YunoHost LDAP accounts supported: **Yes** * [Multimedia](https://github.com/YunoHost-Apps/yunohost.multimedia) handled * Memory RAM limit set to 256 MB because Airsonic was often killed by lack of RAM (hello OOM killer) - * See https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ +* See https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ -## Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/airsonic.svg)](https://ci-apps.yunohost.org/ci/apps/airsonic/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/airsonic.svg)](https://ci-apps-arm.yunohost.org/ci/apps/airsonic/) - -## Links +## Documentation and resources +* Official app website: https://airsonic.github.io/ +* Official admin documentation: https://airsonic.github.io/docs/ +* Upstream app code repository: https://github.com/airsonic/airsonic +* YunoHost documentation for this app: https://yunohost.org/app_airsonic * Report a bug: https://github.com/YunoHost-Apps/airsonic_ynh/issues -* App website: https://airsonic.github.io/ -* Upstream app repository: https://github.com/airsonic/airsonic -* YunoHost website: https://yunohost.org/ ---- +## Developer info -## Developers info - -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing). To try the testing branch, please proceed like that. - -```bash +``` sudo yunohost app install https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing --debug or sudo yunohost app upgrade airsonic -u https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..2b95d6d --- /dev/null +++ b/README_fr.md @@ -0,0 +1,51 @@ +# Airsonic pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/airsonic.svg)](https://dash.yunohost.org/appci/app/airsonic) ![](https://ci-apps.yunohost.org/ci/badges/airsonic.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/airsonic.maintain.svg) +[![Installer Airsonic avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=airsonic) + +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* + +> *Ce package vous permet d'installer Airsonic rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Streamez et gérez votre collection de musique + +**Version incluse :** 10.6.2~ynh2 + +**Démo :** https://airsonic.github.io/demo/ + +## Captures d'écran + +![](./doc/screenshots/screenshot_01.png) + +## Avertissements / informations importantes + +## Fonctionnalités spécifiques à YunoHost + +* Comptes LDAP YunoHost pris en charge : **oui** +* [Multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) géré +* Limite de mémoire RAM fixée à 256 Mb car Airsonic quittait souvant par manque de RAM (bonjour OOM killer) +* Voir https://www.reddit.com/r/airsonic/comments/doscco/jvm_memory_issues/ +## Documentations et ressources + +* Site officiel de l'app : https://airsonic.github.io/ +* Documentation officielle de l'admin : https://airsonic.github.io/docs/ +* Dépôt de code officiel de l'app : https://github.com/airsonic/airsonic +* Documentation YunoHost pour cette app : https://yunohost.org/app_airsonic +* Signaler un bug : https://github.com/YunoHost-Apps/airsonic_ynh/issues + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing --debug +ou +sudo yunohost app upgrade airsonic -u https://github.com/YunoHost-Apps/airsonic_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file From cef29542848e099961cbeb94fd1b771f494b578d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 27 Jun 2021 12:02:37 +0200 Subject: [PATCH 3/9] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 29ff7cb..9eaae0a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -130,7 +130,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." --time --weight=1 +ynh_script_progression --message="Restoring the data directory..." --weight=1 # Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. ynh_restore_file --origin_path="$datadir" --not_mandatory From b042df59cc04fadc4d2233eca8430f3aa3725935 Mon Sep 17 00:00:00 2001 From: massyas Date: Tue, 10 Aug 2021 11:19:14 +0200 Subject: [PATCH 4/9] Fix last DSub releases not able to connect with LDAP DSub v. 5.5.2 has been recently pushed to F-Droid instead of v 5.0.3 with a lot of change but it's now not able to connect to Airsonic server when LDAP is used as set here in yunohost package. See https://github.com/airsonic/airsonic/issues/260 for details. The changes use sub_filter directive to make the server think it's madsonic and use old auth method. SSOWAT user panel has been disable since it contains also a sub_filter_once directive --- conf/nginx.conf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b846dca..b2901aa 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,7 +17,14 @@ location __PATH__/ { # See https://github.com/YunoHost-Apps/airsonic_ynh/issues/4 client_max_body_size 500M; + # Fix last DSub releases not able to connect with LDAP + # See https://github.com/airsonic/airsonic/issues/260 + sub_filter_types text/xml application/json; + sub_filter_once off; + sub_filter 'subsonic' 'madsonic'; + # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # Removed since sub_filter_once directive is also used in this file +# include conf.d/yunohost_panel.conf.inc; # proxy_set_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' www.gstatic.com; img-src 'self' *.akamaized.net; style-src 'self' 'unsafe-inline' fonts.googleapis.com; font-src 'self' fonts.gstatic.com; frame-src 'self'; object-src 'none'"; -} \ No newline at end of file +} From d7637776418a43c077dbbb680747a9886faa9253 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 20 Sep 2021 18:46:11 +0200 Subject: [PATCH 5/9] Fix --- manifest.json | 6 ++---- scripts/restore | 2 -- scripts/upgrade | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/manifest.json b/manifest.json index c474638..b8d7e21 100644 --- a/manifest.json +++ b/manifest.json @@ -31,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -42,8 +41,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/restore b/scripts/restore index 9eaae0a..00b312d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,8 +37,6 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " diff --git a/scripts/upgrade b/scripts/upgrade index 6310742..c06bdad 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,6 +28,22 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_clean_check_starting + + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -57,22 +73,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting - - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= From 0c69d8344c53f0fbb44fe401bc49eb58a83cbf04 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Oct 2021 22:36:24 +0200 Subject: [PATCH 6/9] Add final_path var --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index c06bdad..013069b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) admin=$(ynh_app_setting_get --app=$app --key=admin) port=$(ynh_app_setting_get --app=$app --key=port) datadir=$(ynh_app_setting_get --app=$app --key=datadir) From f2462be383f34dd7debf12dc11a392a51e93551c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 Nov 2021 16:57:32 +0100 Subject: [PATCH 7/9] Update change_url --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index 13a569b..563965e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,6 +30,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) # service_config=$(ynh_app_setting_get --app=$app --key=service_config) port=$(ynh_app_setting_get --app=$app --key=port) +path_url=$(ynh_app_setting_get --app=$app --key=path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From 3d2de4a48048e101b3119c2539257e14bfa458c5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 17:56:53 +0100 Subject: [PATCH 8/9] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index b8d7e21..797e2f3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Stream and manage your music collection", "fr": "Streamez et gérez votre collection de musique" }, - "version": "10.6.2~ynh2", + "version": "10.6.2~ynh3", "url": "http://airsonic.github.io", "upstream": { "license": "GPL-3.0-or-later", From cdec790ade0dc62fb619402d4a188d4b5bd13b46 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 14 Nov 2021 16:56:56 +0000 Subject: [PATCH 9/9] 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 f570b48..07a30c5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Stream and manage your music collection -**Shipped version:** 10.6.2~ynh2 +**Shipped version:** 10.6.2~ynh3 **Demo:** https://airsonic.github.io/demo/ diff --git a/README_fr.md b/README_fr.md index 2b95d6d..6333cfb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Streamez et gérez votre collection de musique -**Version incluse :** 10.6.2~ynh2 +**Version incluse :** 10.6.2~ynh3 **Démo :** https://airsonic.github.io/demo/