From bd8bea9af22d7f05f5e1b59179a4268b885989f5 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Fri, 14 Apr 2017 15:58:41 +0200 Subject: [PATCH 1/6] Fix Check process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 7b16822..f714ae4 100644 --- a/check_process +++ b/check_process @@ -7,7 +7,7 @@ server_name="Seafile" admin="john" (USER) admin_password="Sup3rS3cr3t" (PASSWORD) - is_public="1" (PUBLIC|public=1|private=0) + public_site="1" (PUBLIC|public=1|private=0) architecture="x86-64" ; Checks pkg_linter=1 From 2dfe5ab33aea5e146a95f9d0bcc2bc299b2d4f9e Mon Sep 17 00:00:00 2001 From: Josue-T Date: Wed, 26 Apr 2017 18:26:01 +0200 Subject: [PATCH 2/6] Update to seafile 6.0.9 and fix issue https://github.com/YunoHost-Apps/seafile_ynh/issues/24 (#25) * Fix error with package check * Update check_process * Update to seafile 6.0.9 and fix issue https://github.com/YunoHost-Apps/seafile_ynh/issues/24 --- scripts/_common.sh | 10 +++++----- scripts/restore | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 0e1e07c..e38945a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,11 +1,11 @@ #!/bin/bash -seafile_version=6.0.8 +seafile_version=6.0.9 ## Adapt md5sum while you update app -x86_64sum="353de460ed8a08f176103e96f1384ff3" -i386sum="9a4bc83576ec74b46a907ca081d4914d" -armsum="d7a0bd1d0a3948e1d3bc175e6d1ddca8" +x86_64sum="8d1547c51feecaff757eb64381ce154c" +i386sum="8a0b9e08d9c80790752b435c3e148328" +armsum="15ca4b69585a990e00474e4cfc4be9eb" init_script() { # Exit on command errors and treat unset variables as an error @@ -33,7 +33,7 @@ set_configuration() { } get_source() { - if [[ $1 == 'arm' ]] + if [[ $1 == 'rpi' ]] then wget -q -O '/tmp/seafile_src.tar.gz' 'https://github.com/haiwen/seafile-rpi/releases/download/v'$2'/seafile-server_'$2'_stable_pi.tar.gz' md5sum=$armsum diff --git a/scripts/restore b/scripts/restore index df56646..41e1441 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,12 +7,12 @@ ######## We implement manually this fonctions -seafile_version=6.0.7 +seafile_version=6.0.9 ## Adapt md5sum while you update app -x86_64sum="4ca3c1fc93e5b786eb5d3509f4a3b01a" -i386sum="743565be00189698318c8def0fbdaac0" -armsum="ee3ef5330a51498faf861594e0fe744a" +x86_64sum="8d1547c51feecaff757eb64381ce154c" +i386sum="8a0b9e08d9c80790752b435c3e148328" +armsum="15ca4b69585a990e00474e4cfc4be9eb" init_script() { # Exit on command errors and treat unset variables as an error @@ -40,7 +40,7 @@ set_configuration() { } get_source() { - if [[ $1 == 'arm' ]] + if [[ $1 == 'rpi' ]] then wget -q -O '/tmp/seafile_src.tar.gz' 'https://github.com/haiwen/seafile-rpi/releases/download/v'$2'/seafile-server_'$2'_stable_pi.tar.gz' md5sum=$armsum From d498be179bc3981cb507b5e2d8d9210c0a7d7790 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Fri, 5 May 2017 15:47:07 +0200 Subject: [PATCH 3/6] Clean upgrade script (#26) * Clean upgrade script --- conf/minor-upgrade.exp | 12 ++++++++++ scripts/upgrade | 53 +++++++++++------------------------------- 2 files changed, 26 insertions(+), 39 deletions(-) create mode 100644 conf/minor-upgrade.exp diff --git a/conf/minor-upgrade.exp b/conf/minor-upgrade.exp new file mode 100644 index 0000000..0d3cd97 --- /dev/null +++ b/conf/minor-upgrade.exp @@ -0,0 +1,12 @@ +#!/usr/bin/expect +set timeout 5 + +set seafile_dir [lindex $argv 0] +set mysql_password [lindex $argv 1] + +spawn $seafile_dir/upgrade/minor-upgrade.sh + +expect "to contiune" +send "\r"; + +interact diff --git a/scripts/upgrade b/scripts/upgrade index dfd0edc..e06d718 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,66 +29,41 @@ sudo mv seafile-server-$seafile_version/* $final_path/seafile-server-$seafile_ve sudo mv '/tmp/seafile_src.tar.gz' $final_path/installed/seafile-server_${seafile_version}.tar.gz # permission to execute update script and expect helper -sudo chmod +x ../conf/upgrade_4.1.1.exp -sudo chmod +x ../conf/upgrade_4.2.1.exp -sudo chmod +x ../conf/upgrade_4.3.2.exp -sudo chmod +x ../conf/upgrade_4.4.3.exp -sudo chmod +x ../conf/upgrade_5.0.3.exp -sudo chmod +x ../conf/upgrade_5.1.exp -sudo chmod +x ../conf/upgrade_6.0.exp -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.0_4.1.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.1_4.2.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.2_4.3.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.3_4.4.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_4.4_5.0.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_5.0_5.1.sh -sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_5.1_6.0.sh -# do the upgrade +sudo chmod +x ../conf/upgrade_*.exp +sudo chmod +x ../conf/minor-upgrade.exp +sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/upgrade_*.sh +sudo chmod +x $final_path/seafile-server-$seafile_version/upgrade/minor-upgrade.sh + +# do the upgrade ( the ";&" syntax mean when it go in the frist cas how are true it do the next case) case $installed_version in "4.0."* ) # Update seafile by script sudo ../conf/upgrade_4.1.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_4.3.2.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& "4.1."* ) # Update seafile by script sudo ../conf/upgrade_4.2.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_4.3.2.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& "4.3."* ) # Update seafile by script sudo ../conf/upgrade_4.4.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& "4.4."* ) # Update seafile by script sudo ../conf/upgrade_5.0.3.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& "5.0."* ) # Update seafile by script sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd - sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& "5.1."* ) # Update seafile by script - sudo ../conf/upgrade_5.1.exp $final_path/seafile-server-$seafile_version $root_pwd sudo ../conf/upgrade_6.0.exp $final_path/seafile-server-$seafile_version $root_pwd -;; +;& esac +sudo ../conf/minor-upgrade.exp $final_path/seafile-server-$seafile_version $root_pwd + ## Install webdav and logrotate if not installed if [[ $installed_version = "4.0."* ]] || [[ $installed_version = "4.1."* ]] then From 58b3ee2f43166dd86424d8aa1f67e5479d749f78 Mon Sep 17 00:00:00 2001 From: Rafi59 Date: Wed, 24 May 2017 23:00:12 +0200 Subject: [PATCH 4/6] Update ssowat conf (#27) * Update ssowat conf --- conf/add_sso_conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/add_sso_conf.py b/conf/add_sso_conf.py index 09e9666..53ffe23 100644 --- a/conf/add_sso_conf.py +++ b/conf/add_sso_conf.py @@ -2,11 +2,11 @@ import json with open("/etc/ssowat/conf.json.persistent", "r") as jsonFile: data = json.load(jsonFile) - if "unprotected_urls" in data: - data["unprotected_urls"].append("/seafhttp") + if "skipped_urls" in data: + data["skipped_urls"].append("/seafhttp") else: - data["unprotected_urls"] = ["/seafhttp"] - data["unprotected_urls"].append("/seafdav") + data["skipped_urls"] = ["/seafhttp"] + data["skipped_urls"].append("/seafdav") with open("/etc/ssowat/conf.json.persistent", "w") as jsonFile: - jsonFile.write(json.dumps(data, indent=4, sort_keys=True)) \ No newline at end of file + jsonFile.write(json.dumps(data, indent=4, sort_keys=True)) From 15381618c9d72c953d1830d51ce3ba8f7e1da895 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Fri, 26 May 2017 12:36:04 +0200 Subject: [PATCH 5/6] Update remove_sso_conf.py --- conf/remove_sso_conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/remove_sso_conf.py b/conf/remove_sso_conf.py index ff59377..d3f27c1 100644 --- a/conf/remove_sso_conf.py +++ b/conf/remove_sso_conf.py @@ -2,8 +2,8 @@ import json with open("/etc/ssowat/conf.json.persistent", "r") as jsonFile: data = json.load(jsonFile) - data["unprotected_urls"].remove("/seafhttp") - data["unprotected_urls"].remove("/seafdav") + data["skipped_urls"].remove("/seafhttp") + data["skipped_urls"].remove("/seafdav") with open("/etc/ssowat/conf.json.persistent", "w") as jsonFile: - jsonFile.write(json.dumps(data, indent=4, sort_keys=True)) \ No newline at end of file + jsonFile.write(json.dumps(data, indent=4, sort_keys=True)) From 8bf60f706d81ea6138cedddef0fac6695d0326b9 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Sat, 1 Jul 2017 11:57:40 +0200 Subject: [PATCH 6/6] Update Source Solve Issue https://github.com/YunoHost-Apps/seafile_ynh/issues/28 --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e38945a..9c8196b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -39,10 +39,10 @@ get_source() { md5sum=$armsum elif [[ $1 == 'x86-64' ]] then - wget -q -O '/tmp/seafile_src.tar.gz' 'https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_'$2'_x86-64.tar.gz' + wget -q -O '/tmp/seafile_src.tar.gz' 'https://download.seadrive.org/seafile-server_'$2'_x86-64.tar.gz' md5sum=$x86_64sum else - wget -q -O '/tmp/seafile_src.tar.gz' 'https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_'$2'_i386.tar.gz' + wget -q -O '/tmp/seafile_src.tar.gz' 'https://download.seadrive.org/seafile-server_'$2'_i386.tar.gz' md5sum=$i386sum fi