From b8eaa8838501444c7d0dc417ec1c2e6772237bf7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 28 Jul 2019 17:25:29 +0200 Subject: [PATCH 1/9] Upgrade to 0.19.1 --- README.md | 2 +- conf/app-frontend.src | 4 ++-- conf/app.src | 4 ++-- conf/env.prod | 26 ++++++++++++++++++-------- manifest.json | 2 +- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3944d1b..0127b53 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A modern, convivial and free music server on YunoHost Installation requires a dedicated domain for now. I hope subpath installation will be possible in the future. -**Shipped version:** 0.19.0 (this is an Alpha version!) +**Shipped version:** 0.19.1 (this is an Alpha version!) ## Screenshots diff --git a/conf/app-frontend.src b/conf/app-frontend.src index 0e4e936..4166d39 100644 --- a/conf/app-frontend.src +++ b/conf/app-frontend.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.19.0/download?job=build_front -SOURCE_SUM=2a664eb81f46c1f7c9d52d472a2a9958356eb409fed36bb2acba7bde87c7d7c6 +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.19.1/download?job=build_front +SOURCE_SUM=ae1e81cb78d4a7e6862b9a2980eb47be500313c4db276649391ff0c2f1033c26 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/conf/app.src b/conf/app.src index a58615a..c94e0e5 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.19.0/funkwhale-0.19.0.tar.gz -SOURCE_SUM=f74be13077819de07dfb377b6a20410543c3e43defa9a74b99588dd9c9b47291 +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.19.1/funkwhale-0.19.1.tar.gz +SOURCE_SUM=a5f2b8b51f4259b0964f7adeceeaadab6b39de3417b019b4ec505d5154adff82 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/conf/env.prod b/conf/env.prod index 457c026..4a62772 100644 --- a/conf/env.prod +++ b/conf/env.prod @@ -4,10 +4,8 @@ # If you're tweaking this file from the template, ensure you edit at least the # following variables: # - DJANGO_SECRET_KEY -# - DJANGO_ALLOWED_HOSTS # - FUNKWHALE_HOSTNAME # - EMAIL_CONFIG and DEFAULT_FROM_EMAIL if you plan to send emails) - # On non-docker setup **only**, you'll also have to tweak/uncomment those variables: # - DATABASE_URL # - CACHE_URL @@ -18,7 +16,6 @@ # - MUSIC_DIRECTORY_PATH and MUSIC_DIRECTORY_SERVE_PATH if you plan to use # in-place import # - # Docker only # ----------- @@ -37,7 +34,9 @@ # example: FUNKWHALE_API_PORT=5678 FUNKWHALE_API_IP=127.0.0.1 FUNKWHALE_API_PORT=__PORT__ - +# The number of web workers to start in parallel. Higher means you can handle +# more concurrent requests, but also leads to higher CPU/Memory usage +FUNKWHALE_WEB_WORKERS=1 # Replace this by the definitive, public domain you will use for # your instance FUNKWHALE_HOSTNAME=__DOMAIN__ @@ -53,7 +52,7 @@ FUNKWHALE_PROTOCOL=https # EMAIL_CONFIG=smtp+ssl://user@:password@youremail.host:465 # EMAIL_CONFIG=smtp+tls://user@:password@youremail.host:587 -# The email address to use to send systme emails. By default, we will +# The email address to use to send system emails. # DEFAULT_FROM_EMAIL=noreply@yourdomain # Depending on the reverse proxy used in front of your funkwhale instance, @@ -73,9 +72,20 @@ DATABASE_URL=postgresql://__DBUSER__:__DBPWD__@:5432/__DBNAME__ # Cache configuration # Examples: # CACHE_URL=redis://:/ -# CACHE_URL=redis://localhost:6379/0 +# CACHE_URL=redis://localhost:6379/0c +# With a password: +# CACHE_URL=redis://:password@localhost:6379/0 +# (the extra semicolon is important) # Use the next one if you followed Debian installation guide +# CACHE_URL=redis://127.0.0.1:6379/__REDIS_DB__ +# +# If you want to use Redis over unix sockets, you'll actually need two variables: +# For the cache part: +# CACHE_URL=redis:///run/redis/redis.sock?db=0 +# For the Celery/asynchronous tasks part: +# CELERY_BROKER_URL=redis+socket:///run/redis/redis.sock?virtual_host=0 + # Where media files (such as album covers or audio tracks) should be stored # on your system? @@ -109,8 +119,8 @@ RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f # You can safely leave those settings uncommented if you don't plan to use # in place imports. # Typical docker setup: -# MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music -# MUSIC_DIRECTORY_SERVE_PATH=/music # docker-only +# MUSIC_DIRECTORY_PATH=/music # docker-only +# MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music # Typical non-docker setup: # MUSIC_DIRECTORY_PATH=/srv/funkwhale/data/music # # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed diff --git a/manifest.json b/manifest.json index df7f8fa..36d161c 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.19.0~ynh1", + "version": "0.19.1~ynh1", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { From 342d65347c4212e6cc4218d3ff39767888b5d2ff Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Wed, 28 Aug 2019 23:50:20 +0200 Subject: [PATCH 2/9] fix channel redis issue --- conf/app-frontend.src | 2 +- conf/nginx.conf | 6 +- manifest.json | 5 +- .../extra_files/app/api/requirements/base.txt | 75 +++++++++++++++++++ 4 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 sources/extra_files/app/api/requirements/base.txt diff --git a/conf/app-frontend.src b/conf/app-frontend.src index 4166d39..c705905 100644 --- a/conf/app-frontend.src +++ b/conf/app-frontend.src @@ -1,5 +1,5 @@ SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.19.1/download?job=build_front -SOURCE_SUM=ae1e81cb78d4a7e6862b9a2980eb47be500313c4db276649391ff0c2f1033c26 +SOURCE_SUM=5ee39dd1cca26b244c53b24539e01906d3d0b04c9df5290e0070290a38fd1c83 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/conf/nginx.conf b/conf/nginx.conf index f23364a..598f581 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,8 +9,8 @@ location / { location /front/ { alias __FINALPATH__/code/front/dist/; expires 30d; - add_header Pragma public; - add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + more_set_headers Pragma public; + more_set_headers Cache-Control "public, must-revalidate, proxy-revalidate"; } location /federation/ { @@ -50,4 +50,4 @@ location /_protected/music/ { location /staticfiles/ { # django static files alias __FINALPATH__/code/data/static/; -} \ No newline at end of file +} diff --git a/manifest.json b/manifest.json index 36d161c..5697050 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.19.1~ynh1", + "version": "0.19.1~ynh2", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { @@ -43,6 +43,9 @@ "ask": { "en": "Is it a public application?" }, + "help": { + "en": "Allows non loggued users to access the user interface (mandatory for federation)" + }, "default": true } ] diff --git a/sources/extra_files/app/api/requirements/base.txt b/sources/extra_files/app/api/requirements/base.txt new file mode 100644 index 0000000..e5a02f2 --- /dev/null +++ b/sources/extra_files/app/api/requirements/base.txt @@ -0,0 +1,75 @@ +# Bleeding edge Django +django>=2.2.1,<2.3 + +# Configuration +django-environ>=0.4,<0.5 + +# Images +Pillow>=5.4,<5.5 + +# For user registration, either via email or social +# Well-built with regular release cycles! +django-allauth>=0.39,<0.40 + + +# Python-PostgreSQL Database Adapter +psycopg2-binary>=2.8,<=2.9 + +# Time zones support +pytz==2019.1 + +# Redis support +django-redis>=4.10,<4.11 +redis>=3.2,<3.3 +kombu>=4.5,<4.6 + +celery>=4.3,<4.4 + + +# Your custom requirements go here +django-cors-headers>=2.5.3,<2.6 +musicbrainzngs==0.6 +djangorestframework>=3.9,<3.10 +djangorestframework-jwt>=1.11,<1.12 +pendulum>=2,<3 +persisting-theory>=0.2,<0.3 +django-versatileimagefield>=1.10,<1.11 +django-filter>=2.1,<2.2 +django-rest-auth>=0.9,<0.10 +ipython>=7,<8 +mutagen>=1.42,<1.43 + + +django-taggit>=0.24,<0.25 +pymemoize==1.0.3 + +django-dynamic-preferences>=1.7,<1.8 +raven>=6.10,<7 +python-magic==0.4.15 +# XXX: until https://github.com/django/channels/issues/1240 is fixed +channels==2.1.6 +# suggestion by Eliot Berriot, this dep will be remove in next version anyway +# channels_redis>=2.3,<2.4 +channels_redis==2.3.2 + +daphne>=2.2,<2.3 + +cryptography>=2,<3 +# requests-http-signature==0.0.3 +# clone until the branch is merged and released upstream +git+https://github.com/EliotBerriot/requests-http-signature.git@signature-header-support +django-cleanup==3.2.0 + +# for LDAP authentication +python-ldap==3.2.0 +django-auth-ldap==1.7.0 +pydub==0.23.1 + +pyld==1.0.4 +aiohttp==3.5.4 +autobahn>=19.3.3 + +django-oauth-toolkit==1.2 +django-storages==1.7.1 +boto3<3 +unicode-slugify From 178050c3ad248a2e30df64875970588b90b66d1f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Thu, 29 Aug 2019 23:08:20 +0200 Subject: [PATCH 3/9] remove old test --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 7b27725..8e54ddb 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,6 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=99bae16efca321ce50ba9a98c62996169195e0ba backup_restore=1 multi_instance=1 incorrect_path=0 From a633376109d1f7d7cffee874e60787338d6fa937 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Thu, 31 Oct 2019 18:25:28 +0100 Subject: [PATCH 4/9] Upgrade to 2.29 --- README.md | 2 +- check_process | 16 +++++--------- conf/app-frontend.src | 4 ++-- conf/app.src | 4 ++-- conf/funkwhale-server.service | 8 ++++--- conf/nginx.conf | 8 +++++++ manifest.json | 2 +- scripts/install | 12 ---------- scripts/upgrade | 22 +++++++++---------- .../extra_files/app/api/requirements/base.txt | 22 +++++++++++-------- 10 files changed, 47 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 0127b53..58a8694 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A modern, convivial and free music server on YunoHost Installation requires a dedicated domain for now. I hope subpath installation will be possible in the future. -**Shipped version:** 0.19.1 (this is an Alpha version!) +**Shipped version:** 0.20.0 (this is an Alpha version!) ## Screenshots diff --git a/check_process b/check_process index 8e54ddb..a5bcf67 100644 --- a/check_process +++ b/check_process @@ -16,23 +16,14 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=4d4bf0981e2d3a00eaae6b19bd54344fe55d6530 backup_restore=1 multi_instance=1 incorrect_path=0 port_already_use=0 change_url=0 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto -# Level 4: https://github.com/YunoHost-Apps/funkwhale_ynh/issues/21 - Level 4=1 - Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 + ;;; Options Email=jean-baptiste@holcroft.fr Notification=all @@ -45,4 +36,7 @@ manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 ; commit=99bae16efca321ce50ba9a98c62996169195e0ba name=Upgrade from 0.18.3 +manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 + ; commit=4d4bf0981e2d3a00eaae6b19bd54344fe55d6530 + name=Upgrade from 0.19.1 manifest_arg=domain=DOMAIN&path=/&admin=USER&is_public=1 diff --git a/conf/app-frontend.src b/conf/app-frontend.src index c705905..d2e7ef4 100644 --- a/conf/app-frontend.src +++ b/conf/app-frontend.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.19.1/download?job=build_front -SOURCE_SUM=5ee39dd1cca26b244c53b24539e01906d3d0b04c9df5290e0070290a38fd1c83 +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.20.0/download?job=build_front +SOURCE_SUM=b42e10e3c57103eb8e39a1987aebae819843bb90fd9d3116ac233df5d7c9091e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/conf/app.src b/conf/app.src index c94e0e5..4a05ea0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.19.1/funkwhale-0.19.1.tar.gz -SOURCE_SUM=a5f2b8b51f4259b0964f7adeceeaadab6b39de3417b019b4ec505d5154adff82 +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.20.0/funkwhale-0.20.0.tar.gz +SOURCE_SUM=d010f9db31473b86cdbad7f1bab1b2df3326604e8b0db18acb7f56b77e75c048 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/conf/funkwhale-server.service b/conf/funkwhale-server.service index a48c1f5..88c482d 100644 --- a/conf/funkwhale-server.service +++ b/conf/funkwhale-server.service @@ -9,8 +9,10 @@ Group=__APP__ WorkingDirectory=__FINALPATH__/code/api EnvironmentFile=__FINALPATH__/code/config/.env -ExecStart=__FINALPATH__/code/virtualenv/bin/daphne -b ${FUNKWHALE_API_IP} -p ${FUNKWHALE_API_PORT} config.asgi:application --proxy-headers \ - --verbosity 1 --access-log=/var/log/__APP__/server.log +ExecStart=__FINALPATH__/code/virtualenv/bin/gunicorn config.asgi:application \ + -w ${FUNKWHALE_WEB_WORKERS} \ + -k uvicorn.workers.UvicornWorker \ + -b ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT} #NoNewPrivileges=true #PrivateDevices=true @@ -27,4 +29,4 @@ StandardError=syslog SyslogIdentifier=__APP__-server [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/conf/nginx.conf b/conf/nginx.conf index 598f581..d8c830f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,6 +11,14 @@ location /front/ { expires 30d; more_set_headers Pragma public; more_set_headers Cache-Control "public, must-revalidate, proxy-revalidate"; + more_set_headers Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:"; + more_set_headers Referrer-Policy "strict-origin-when-cross-origin"; + more_set_headers X-Frame-Options "SAMEORIGIN"; +} + +location /front/embed.html { + more_set_headers X-Frame-Options "ALLOW"; + alias __FINALPATH__/front/dist/embed.html; } location /federation/ { diff --git a/manifest.json b/manifest.json index 5697050..1a77c80 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.19.1~ynh2", + "version": "0.20.0~ynh1", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 9e61390..bb0d178 100644 --- a/scripts/install +++ b/scripts/install @@ -160,17 +160,6 @@ ynh_replace_string --match_string="__DBNAME__" --replace_string="$app" ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$configfile" ynh_replace_string --match_string="__KEY__" --replace_string="$key" --target_file="$configfile" -loadfile="$final_path/code/load_env" - -cat > "$loadfile" <<'EOL' -#!/bin/bash -export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs) -EOL - -chmod +x "$loadfile" - -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$loadfile" - #================================================= # CONFIGURE ADMIN USER #================================================= @@ -179,7 +168,6 @@ admin_mail=$(ynh_user_get_info --username="$admin" --key="mail") ( set +o nounset source "${final_path}/code/virtualenv/bin/activate" - source "$loadfile" set -o nounset cd "$final_path/code/" diff --git a/scripts/upgrade b/scripts/upgrade index f3df721..3c1c93e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,6 +77,16 @@ ynh_abort_if_errors # Normalize the URL path syntax path_url=$(ynh_normalize_url_path "$path_url") +#================================================= +# CHECK THE PATH +#================================================= + +# see 0.20.0: https://docs.funkwhale.audio/changelog.html#automatically-load-env-file +loadfile="$final_path/code/load_env" +if [ -e "$loadfile" ] ; then + ynh_secure_remove --file="$loadfile" +fi + #================================================= # CLOSE A PORT #================================================= @@ -184,17 +194,6 @@ ynh_replace_string --match_string="__DBNAME__" --replace_string="$app" ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$configfile" ynh_replace_string --match_string="__KEY__" --replace_string="$key" --target_file="$configfile" -loadfile="$final_path/code/load_env" - -cat > "$loadfile" <<'EOL' -#!/bin/bash -export $(cat "__FINALPATH__/code/config/.env" | grep -v ^# | xargs) -EOL - -chmod +x "$loadfile" - -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$loadfile" - #================================================= # MIGRATE #================================================= @@ -202,7 +201,6 @@ ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" ( set +o nounset source "${final_path}/code/virtualenv/bin/activate" - source "$loadfile" set -o nounset cd "$final_path/code" diff --git a/sources/extra_files/app/api/requirements/base.txt b/sources/extra_files/app/api/requirements/base.txt index e5a02f2..7c67ebf 100644 --- a/sources/extra_files/app/api/requirements/base.txt +++ b/sources/extra_files/app/api/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -django>=2.2.1,<2.3 +django>=2.2.4,<2.3 # Configuration django-environ>=0.4,<0.5 @@ -29,7 +29,7 @@ celery>=4.3,<4.4 # Your custom requirements go here django-cors-headers>=2.5.3,<2.6 musicbrainzngs==0.6 -djangorestframework>=3.9,<3.10 +djangorestframework>=3.10,<3.11 djangorestframework-jwt>=1.11,<1.12 pendulum>=2,<3 persisting-theory>=0.2,<0.3 @@ -39,26 +39,30 @@ django-rest-auth>=0.9,<0.10 ipython>=7,<8 mutagen>=1.42,<1.43 - -django-taggit>=0.24,<0.25 pymemoize==1.0.3 -django-dynamic-preferences>=1.7,<1.8 +django-dynamic-preferences>=1.7.1,<1.8 raven>=6.10,<7 python-magic==0.4.15 # XXX: until https://github.com/django/channels/issues/1240 is fixed channels==2.1.6 -# suggestion by Eliot Berriot, this dep will be remove in next version anyway -# channels_redis>=2.3,<2.4 -channels_redis==2.3.2 - +channels_redis>=2.3,<2.4 daphne>=2.2,<2.3 +# uvicorn +gunicorn + +# YNH specific +uvicorn==0.8.6 +service_identity +# END YunoHost specific cryptography>=2,<3 # requests-http-signature==0.0.3 # clone until the branch is merged and released upstream git+https://github.com/EliotBerriot/requests-http-signature.git@signature-header-support django-cleanup==3.2.0 +requests>=2.22<2.23 +pyOpenSSL>=19<20 # for LDAP authentication python-ldap==3.2.0 From 11e43fa315166e88e18de53722590faf4cbd6531 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 2 Nov 2019 14:12:01 +0100 Subject: [PATCH 5/9] update to 0.20.1 --- conf/app-frontend.src | 4 ++-- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app-frontend.src b/conf/app-frontend.src index d2e7ef4..fdd0398 100644 --- a/conf/app-frontend.src +++ b/conf/app-frontend.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.20.0/download?job=build_front -SOURCE_SUM=b42e10e3c57103eb8e39a1987aebae819843bb90fd9d3116ac233df5d7c9091e +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/0.20.1/download?job=build_front +SOURCE_SUM=22d774590b943fa6d64f634a7175b1d100089fe33734ce9889d050063ff50ce7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/conf/app.src b/conf/app.src index 4a05ea0..8f8baca 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.20.0/funkwhale-0.20.0.tar.gz -SOURCE_SUM=d010f9db31473b86cdbad7f1bab1b2df3326604e8b0db18acb7f56b77e75c048 +SOURCE_URL=https://dev.funkwhale.audio/funkwhale/funkwhale/-/archive/0.20.1/funkwhale-0.20.1.tar.gz +SOURCE_SUM=4fe4c9069957060b3ab31cbc39f01d621aed01c39fc0177628fd96777fdffc7e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 1a77c80..50017d5 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.20.0~ynh1", + "version": "0.20.1~ynh1", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { From be482df34fc283074017ffb7b6e730a36c4d1c30 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 2 Nov 2019 14:38:47 +0100 Subject: [PATCH 6/9] If it ain't broke, don't fix it --- manifest.json | 2 +- scripts/install | 6 +++--- scripts/remove | 6 +++--- scripts/restore | 6 +++--- scripts/upgrade | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/manifest.json b/manifest.json index 50017d5..7d1cfc6 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.20.1~ynh1", + "version": "0.20.1~ynh2", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index bb0d178..2ce874a 100644 --- a/scripts/install +++ b/scripts/install @@ -224,9 +224,9 @@ yunohost service add "$app-beat" --log "/var/log/$app/beat.log" #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --action="start" --service_name="${app}-beat" --log_path="systemd" --line_match="celery beat process" -ynh_systemd_action --action="start" --service_name="${app}-server" --log_path="systemd" --line_match="Listening on TCP address" -ynh_systemd_action --action="start" --service_name="${app}-worker" --log_path="systemd" --line_match="celery worker" +ynh_systemd_action --action="start" --service_name="${app}-beat" +ynh_systemd_action --action="start" --service_name="${app}-server" +ynh_systemd_action --action="start" --service_name="${app}-worker" #================================================= # SETUP FAIL2BAN diff --git a/scripts/remove b/scripts/remove index e9d86dc..e23ea64 100644 --- a/scripts/remove +++ b/scripts/remove @@ -53,9 +53,9 @@ fi #================================================= ynh_print_info --message="Stopping and removing the systemd service" -ynh_systemd_action --action="stop" --service_name="${app}-beat" --log_path="systemd" --line_match="Stopped Funkwhale" -ynh_systemd_action --action="stop" --service_name="${app}-server" --log_path="systemd" --line_match="Stopped Funkwhale" -ynh_systemd_action --action="stop" --service_name="${app}-worker" --log_path="systemd" --line_match="Stopped Funkwhale" +ynh_systemd_action --action="stop" --service_name="${app}-beat" +ynh_systemd_action --action="stop" --service_name="${app}-server" +ynh_systemd_action --action="stop" --service_name="${app}-worker" # Remove the dedicated systemd config ynh_remove_systemd_config --service="$app-server" diff --git a/scripts/restore b/scripts/restore index 98fe8d2..d135d4e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -148,9 +148,9 @@ yunohost service add "$app-beat" --log "/var/log/$app/beat.log" #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --action="start" --service_name="${app}-beat" --log_path="systemd" --line_match="celery beat process" -ynh_systemd_action --action="start" --service_name="${app}-server" --log_path="systemd" --line_match="Listening on TCP address" -ynh_systemd_action --action="start" --service_name="${app}-worker" --log_path="systemd" --line_match="celery worker" +ynh_systemd_action --action="start" --service_name="${app}-beat" +ynh_systemd_action --action="start" --service_name="${app}-server" +ynh_systemd_action --action="start" --service_name="${app}-worker" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 3c1c93e..dc32818 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,9 +104,9 @@ fi #================================================= ynh_print_info --message="Stopping a systemd service..." -ynh_systemd_action --action="stop" --service_name="${app}-beat" --log_path="systemd" --line_match="Stopped Funkwhale" -ynh_systemd_action --action="stop" --service_name="${app}-server" --log_path="systemd" --line_match="Stopped Funkwhale" -ynh_systemd_action --action="stop" --service_name="${app}-worker" --log_path="systemd" --line_match="Stopped Funkwhale" +ynh_systemd_action --action="stop" --service_name="${app}-beat" +ynh_systemd_action --action="stop" --service_name="${app}-server" +ynh_systemd_action --action="stop" --service_name="${app}-worker" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -280,9 +280,9 @@ fi #================================================= ynh_print_info --message="Starting a systemd service..." -ynh_systemd_action --action="start" --service_name="${app}-beat" --log_path="systemd" --line_match="celery beat process" -ynh_systemd_action --action="start" --service_name="${app}-server" --log_path="systemd" --line_match="Listening on TCP address" -ynh_systemd_action --action="start" --service_name="${app}-worker" --log_path="systemd" --line_match="celery worker" +ynh_systemd_action --action="start" --service_name="${app}-beat" +ynh_systemd_action --action="start" --service_name="${app}-server" +ynh_systemd_action --action="start" --service_name="${app}-worker" #================================================= # RELOAD NGINX From e20af67e9441eb4ca708a8dc9c3b5f5ee4fdd4b8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 2 Nov 2019 15:09:14 +0100 Subject: [PATCH 7/9] Remove manual modification of nginx domain file Fix #84 --- manifest.json | 2 +- scripts/_common.sh | 34 ---------------------------------- scripts/install | 3 --- scripts/remove | 3 --- scripts/upgrade | 6 ------ 5 files changed, 1 insertion(+), 47 deletions(-) diff --git a/manifest.json b/manifest.json index 7d1cfc6..21b29a0 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.20.1~ynh2", + "version": "0.20.1~ynh3", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index e98f8be..180e689 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,40 +15,6 @@ pkg_dependencies="build-essential curl ffmpeg \ # PERSONAL HELPERS #================================================= -# funkwhale needs edits to the domain config file -# this function removes funkwhale specifics -funkwhale_nginx_domain_cleaning() { - local line - local tempFile - local nginxConf - - nginxConf="/etc/nginx/conf.d/$domain.conf" - tempFile="$nginxConf.temp" - - line=$(sed -n '/server /=' "$nginxConf" | head -n 1) - - tail -n +"$line" "$nginxConf" > "$tempFile" - mv "$tempFile" "$nginxConf" -} - -# funkwhale needs edits to the domain config file -# this function adds funkwhale specifics -funkwhale_nginx_domain_configure() { - local tempFile - local nginxConf - - nginxConf="/etc/nginx/conf.d/$domain.conf" - tempFile="$nginxConf.temp" - - echo " -# required for websocket support -map \$http_upgrade \$connection_upgrade { - default upgrade; - '' close; -} -" | cat - "$nginxConf" > "$tempFile" - mv "$tempFile" "$nginxConf" -} #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/install b/scripts/install index 2ce874a..c0a1315 100644 --- a/scripts/install +++ b/scripts/install @@ -106,9 +106,6 @@ ynh_setup_source --dest_dir="$final_path/code" --source_id="app-frontend" #================================================= ynh_print_info --message="Configuring nginx web server..." -# add funkwhale specifics at the beginning of the domain configuration -funkwhale_nginx_domain_configure - # Create a dedicated nginx config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index e23ea64..8cd36d7 100644 --- a/scripts/remove +++ b/scripts/remove @@ -103,9 +103,6 @@ ynh_secure_remove --file="/var/log/$app" #================================================= ynh_print_info --message="Removing nginx web server configuration" -# remove domain specific configuration -funkwhale_nginx_domain_cleaning - # Remove the dedicated nginx config ynh_remove_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index dc32818..956e563 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,12 +128,6 @@ ynh_setup_source --dest_dir="$final_path/code" --source_id="app-frontend" #================================================= ynh_print_info --message="Upgrading nginx web server configuration..." -# remove domain specific configuration -funkwhale_nginx_domain_cleaning - -# add funkwhale specifics at the beginning of the domain configuration -funkwhale_nginx_domain_configure - # Create a dedicated nginx config ynh_add_nginx_config From d07ce7505cb68bb7dc7600e889d8ccc8bad095e4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 2 Nov 2019 16:05:23 +0100 Subject: [PATCH 8/9] we are now in 0.20.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58a8694..1d7fa0c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A modern, convivial and free music server on YunoHost Installation requires a dedicated domain for now. I hope subpath installation will be possible in the future. -**Shipped version:** 0.20.0 (this is an Alpha version!) +**Shipped version:** 0.20.1 (this is an Alpha version!) ## Screenshots From d7beb7f51f321b08cc08072f2a7c9815e6505b1f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sun, 3 Nov 2019 08:37:59 +0100 Subject: [PATCH 9/9] yunohost requirement is now 3.6 --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 21b29a0..455698f 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "A modern, convivial and free music server" }, - "version": "0.20.1~ynh3", + "version": "0.20.1~ynh4", "url": "https://funkwhale.audio", "license": "AGPL-3.0-or-later", "maintainer": { @@ -13,7 +13,7 @@ "email": "jean-baptiste@holcroft.fr" }, "requirements": { - "yunohost": ">= 3.5" + "yunohost": ">= 3.6" }, "multi_instance": true, "services": [