From b95a3b04973ba53a81402fa3ccdcedd59f3afef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 11 May 2021 21:18:48 +0200 Subject: [PATCH 1/4] Fix seafdav config --- conf/nginx.conf | 22 +++++++--------------- conf/nginx_add_webdav | 24 ++++++++---------------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 72de3d8..d21490c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -30,21 +30,13 @@ location __PATH__/media/ { } location /seafdav { - fastcgi_pass 127.0.0.1:__WEBDAV_PORT__; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_script_name; - - fastcgi_param SERVER_PROTOCOL $server_protocol; - fastcgi_param QUERY_STRING $query_string; - fastcgi_param REQUEST_METHOD $request_method; - fastcgi_param CONTENT_TYPE $content_type; - fastcgi_param CONTENT_LENGTH $content_length; - fastcgi_param SERVER_ADDR $server_addr; - fastcgi_param SERVER_PORT $server_port; - fastcgi_param SERVER_NAME $server_name; - - fastcgi_param HTTPS on; - + proxy_pass http://127.0.0.1:__WEBDAV_PORT__/seafdav; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 1200s; client_max_body_size 0; access_log /var/log/nginx/seafdav.access.log; diff --git a/conf/nginx_add_webdav b/conf/nginx_add_webdav index d3e9091..7901504 100644 --- a/conf/nginx_add_webdav +++ b/conf/nginx_add_webdav @@ -1,21 +1,13 @@ location /seafdav { - fastcgi_pass 127.0.0.1:WEBDAV_PORT; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_script_name; - - fastcgi_param SERVER_PROTOCOL $server_protocol; - fastcgi_param QUERY_STRING $query_string; - fastcgi_param REQUEST_METHOD $request_method; - fastcgi_param CONTENT_TYPE $content_type; - fastcgi_param CONTENT_LENGTH $content_length; - fastcgi_param SERVER_ADDR $server_addr; - fastcgi_param SERVER_PORT $server_port; - fastcgi_param SERVER_NAME $server_name; - - fastcgi_param HTTPS on; - + proxy_pass http://127.0.0.1:__WEBDAV_PORT__/seafdav; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 1200s; client_max_body_size 0; access_log /var/log/nginx/seafdav.access.log; error_log /var/log/nginx/seafdav.error.log; -} \ No newline at end of file +} From af76a0a6acb50fcbfd59a3106b479b6591435732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 26 Jun 2021 12:22:45 +0200 Subject: [PATCH 2/4] Upgrade to seafile 8.0.5 --- README.md | 2 +- conf/arm.src | 4 ++-- conf/arm64.src | 4 ++-- conf/x86-64.src | 4 ++-- manifest.json | 2 +- scripts/_common.sh | 9 +++++++-- scripts/backup | 1 + scripts/restore | 1 + scripts/upgrade | 8 ++++---- 9 files changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9d40391..4681356 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Seafile is an open Source Cloud Storage application. It's a Enterprise file sync and share platform with high reliability and performance. It's a file hosting platform with high reliability and performance. Put files on your own server. Sync and share files across different devices, or access all the files as a virtual disk. -**Shipped version:** 7.1.5 +**Shipped version:** 8.0.5 Screenshots ----------- diff --git a/conf/arm.src b/conf/arm.src index cc50123..de18587 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v7.1.5/seafile-server-7.1.5-buster-armv7.tar.gz -SOURCE_SUM=4baec21c1acaec6f50c7a1b229a728417d8fbf87fe3be98f128bc9d2ad399681 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7.tar.gz +SOURCE_SUM=3a2117d573b54c46a4d1e937e4679601b7b9bb73e8f0b379cd94a39c6470c5c6 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/arm64.src b/conf/arm64.src index cc50123..de18587 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v7.1.5/seafile-server-7.1.5-buster-armv7.tar.gz -SOURCE_SUM=4baec21c1acaec6f50c7a1b229a728417d8fbf87fe3be98f128bc9d2ad399681 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7.tar.gz +SOURCE_SUM=3a2117d573b54c46a4d1e937e4679601b7b9bb73e8f0b379cd94a39c6470c5c6 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/x86-64.src b/conf/x86-64.src index 5efd091..84ccc51 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_7.1.5_x86-64.tar.gz -SOURCE_SUM=edf020de2324be33df3f6854c6383affca088807bfc1e27a375fbb0f44af0cb0 +SOURCE_URL=https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_8.0.5_x86-64.tar.gz +SOURCE_SUM=4065e877e9675afba958aa1007db0d3a53949f8987d7f9849dfa29a6a13a06bf # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index afeb0a3..57737cd 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "packaging_format": 1, "license": "AGPL-3.0,Apache-2.0,MIT,GPL-2.0", "url": "https://www.seafile.com", - "version": "7.1.5~ynh1", + "version": "8.0.5~ynh1", "description": { "en": "Open Source Cloud Storage", "fr": "Stockage Cloud Open Source" diff --git a/scripts/_common.sh b/scripts/_common.sh index d82f45a..8fe4517 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -36,7 +36,7 @@ install_dependance() { libjpeg62-turbo-dev zlib1g-dev # For building pillow ynh_add_swap 2000 # We need to do that because we can have some issue about the permission access to the pip cache without this - set_permission + chown -R $seafile_user:$seafile_user $final_path # Note that we install imageio to force the dependance, without this imageio 2.8 is installed and it need python3.5 sudo -u $seafile_user pip3 install --user --no-warn-script-location --upgrade future mysqlclient pymysql Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha python3-ldap @@ -53,7 +53,12 @@ mv_expect_scripts() { set_permission() { chown -R $seafile_user:$seafile_user $final_path - chmod -R o= $final_path + chmod -R g-wx,o= $final_path + setfacl -m user:www-data:rX $final_path + setfacl -m user:www-data:rX $final_path/seafile-server-$seafile_version + setfacl -m user:www-data:rX $final_path/seafile-server-latest/seahub + setfacl -R -m user:www-data:rX $final_path/seafile-server-latest/seahub/media + # check that this directory exist because in some really old install the data could still be in the main seafile directory # We also check at the install time when data directory is not already initialised if [ -e /home/yunohost.app/seafile-data ]; then diff --git a/scripts/backup b/scripts/backup index 4492a2d..f051206 100644 --- a/scripts/backup +++ b/scripts/backup @@ -20,6 +20,7 @@ ynh_print_info --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd) final_path=$(ynh_app_setting_get --app $app --key final_path) +seafile_version=$(ynh_app_upstream_version) seafile_user=$app if [[ ! "$(systemctl status seafile)" =~ "Active: inactive (dead)" ]] || [[ ! "$(systemctl status seahub)" =~ "Active: failed (Result: signal)" ]]; then diff --git a/scripts/restore b/scripts/restore index 246a38d..60adb58 100644 --- a/scripts/restore +++ b/scripts/restore @@ -22,6 +22,7 @@ path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app -- seafile_data=/home/yunohost.app/seafile-data db_pwd=$(ynh_app_setting_get --app $app --key mysqlpwd) final_path=$(ynh_app_setting_get --app $app --key final_path) +seafile_version=$(ynh_app_upstream_version) seafile_user=$app architecture=$(ynh_detect_arch) diff --git a/scripts/upgrade b/scripts/upgrade index 02622cc..ab78fc3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -214,10 +214,10 @@ EOF fi ln -s $seafile_data $final_path/seafile-data ;& -# "7.1."* ) -# sudo -u $seafile_user $expect_scripts_dir/upgrade_8.0.exp $final_path/seafile-server-$seafile_version -# echo "FILTER = permission=cn=$app.main,ou=permission,dc=yunohost,dc=org" | tee -a $final_path/conf/ccnet.conf -# ;& +"7.1."* ) + sudo -u $seafile_user $expect_scripts_dir/upgrade_8.0.exp $final_path/seafile-server-$seafile_version + echo "FILTER = permission=cn=$app.main,ou=permission,dc=yunohost,dc=org" | tee -a $final_path/conf/ccnet.conf +;& esac sudo -u $seafile_user $expect_scripts_dir/minor-upgrade.exp $final_path/seafile-server-$seafile_version From 922d2c59b159d4c34fe88d86d886e061cf5a95d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 6 Jul 2021 09:24:42 +0200 Subject: [PATCH 3/4] Fix permission url --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab78fc3..585b0b4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -314,7 +314,7 @@ if ! ynh_permission_exists --permission=file_server; then else ynh_permission_url --permission=file_server --url=$domain/seafhttp --auth_header=false ynh_permission_update --permission=file_server --label="File server" --show_tile=false --protected=true - ynh_permission_url --permission=webdav --url=$domain/seafhttp --auth_header=false + ynh_permission_url --permission=webdav --url=$domain/seafdav --auth_header=false ynh_permission_update --permission=webdav --label="Webdav" --show_tile=false --protected=true ynh_permission_url --permission=media --url=/media --auth_header=true ynh_permission_update --permission=media --label="Media" --show_tile=false --protected=true From 06a8f81d0723af5ffd57fc07c5fcd57f94138080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 12 Jul 2021 22:15:54 +0200 Subject: [PATCH 4/4] Fix link download arm package --- conf/arm.src | 4 ++-- conf/arm64.src | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/arm.src b/conf/arm.src index de18587..dc7b2f6 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7.tar.gz -SOURCE_SUM=3a2117d573b54c46a4d1e937e4679601b7b9bb73e8f0b379cd94a39c6470c5c6 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7l.tar.gz +SOURCE_SUM=53a909c0bcb796b21fec3518e9092ec20f8a8b933dc61ea26f3a04aab66efc79 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/arm64.src b/conf/arm64.src index de18587..dc7b2f6 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7.tar.gz -SOURCE_SUM=3a2117d573b54c46a4d1e937e4679601b7b9bb73e8f0b379cd94a39c6470c5c6 +SOURCE_URL=https://github.com/haiwen/seafile-rpi/releases/download/v8.0.5/seafile-server-8.0.5-buster-armv7l.tar.gz +SOURCE_SUM=53a909c0bcb796b21fec3518e9092ec20f8a8b933dc61ea26f3a04aab66efc79 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum