020-script-patches.patch (3537B)
1 diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh 2 --- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200 3 +++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200 4 @@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") 5 TOPDIR=$(dirname "${INSTALLPATH}") 6 default_ccnet_conf_dir=${TOPDIR}/ccnet 7 default_conf_dir=${TOPDIR}/conf 8 -seaf_fsck=${INSTALLPATH}/seafile/bin/seaf-fsck 9 +seaf_fsck=/usr/bin/seaf-fsck 10 11 export PATH=${INSTALLPATH}/seafile/bin:$PATH 12 export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} 13 diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh 14 --- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200 15 +++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200 16 @@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}") 17 TOPDIR=$(dirname "${INSTALLPATH}") 18 default_ccnet_conf_dir=${TOPDIR}/ccnet 19 default_conf_dir=${TOPDIR}/conf 20 -seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc 21 +seaf_gc=/usr/bin/seafserv-gc 22 seaf_gc_opts="" 23 24 export PATH=${INSTALLPATH}/seafile/bin:$PATH 25 diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 26 --- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200 27 +++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200 28 @@ -40,15 +40,10 @@ function check_python_executable() { 29 function check_python_module () { 30 module=$1 31 name=$2 32 - hint=$3 33 printf " Checking python module: ${name} ... " 34 if ! $PYTHON -c "import ${module}" 2>/dev/null 1>&2; then 35 echo 36 printf "\033[33m ${name} \033[m is not installed, Please install it first.\n" 37 - if [[ "${hint}" != "" ]]; then 38 - printf "${hint}" 39 - echo 40 - fi 41 err_and_quit; 42 fi 43 echo -e "Done." 44 @@ -70,14 +65,10 @@ function check_python () { 45 if [[ $PYTHON == "python2.6" ]]; then 46 py26="2.6" 47 fi 48 - hint="\nOn Debian/Ubntu: apt-get install python-setuptools\nOn CentOS/RHEL: yum install python${py26}-distribute" 49 - check_python_module pkg_resources setuptools "${hint}" 50 - 51 - hint="\nOn Debian/Ubntu: apt-get install python-imaging\nOn CentOS/RHEL: yum install python${py26}-imaging" 52 - check_python_module PIL python-imaging "${hint}" 53 54 - hint='\nOn Debian/Ubuntu:\n\nsudo apt-get install python-mysqldb\n\nOn CentOS/RHEL:\n\nsudo yum install MySQL-python' 55 - check_python_module MySQLdb python-mysqldb "${hint}" 56 + check_python_module pkg_resources setuptools 57 + check_python_module PIL python-imaging 58 + check_python_module MySQLdb python-mysqldb 59 fi 60 echo 61 } 62 @@ -85,5 +76,6 @@ function check_python () { 63 check_python; 64 65 export PYTHON=$PYTHON 66 +export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH" 67 68 exec $PYTHON "$python_script" 69 diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh 70 --- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200 71 +++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200 72 @@ -1,4 +1,4 @@ 73 -#!/bin/sh 74 +#!/bin/bash 75 # 76 # This shell script and corresponding sqlite2mysql.py are used to 77 # migrate Seafile data from SQLite to MySQL.