Bump mayan version to 3.3.2

This major release brought some dependency and syntax updates
This commit is contained in:
2019-12-05 10:43:05 +01:00
parent 30fa3e3551
commit 0d534be7a9

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
toolName="Mayan EDMS" toolName="Mayan EDMS"
toolVersion="3.2.11" toolVersion="3.3.2"
toolRoot="/opt/mayan-edms" toolRoot="/opt/mayan-edms"
toolMediaFolder="/opt/mayan-edms/media" toolMediaFolder="/opt/mayan-edms/media"
@@ -19,9 +19,9 @@ step_1() {
step_2_info() { echo "Get $toolName binary dependencies"; } step_2_info() { echo "Get $toolName binary dependencies"; }
step_2() { step_2() {
exe apt install g++ gcc ghostscript gnupg1 graphviz libfuse2 \ exe apt install exiftool g++ gcc ghostscript gnupg1 graphviz libfuse2 \
libjpeg-dev libmagic1 libpq-dev libpng-dev libtiff-dev \ libjpeg-dev libmagic1 libpq-dev libpng-dev libtiff-dev \
poppler-utils postgresql python-dev python-virtualenv redis-server \ poppler-utils postgresql python3-dev python3-virtualenv redis-server \
sane-utils supervisor tesseract-ocr tesseract-ocr-deu zlib1g-dev -y sane-utils supervisor tesseract-ocr tesseract-ocr-deu zlib1g-dev -y
} }
@@ -29,7 +29,7 @@ step_3_info() { echo "Create virtual environment"; }
step_3() { step_3() {
exe adduser mayan --disabled-password --disabled-login --no-create-home --gecos -G users"" exe adduser mayan --disabled-password --disabled-login --no-create-home --gecos -G users""
exe mkdir -p ${toolRoot} exe mkdir -p ${toolRoot}
exe virtualenv ${toolRoot} exe virtualenv ${toolRoot} -p $(which python3)
saveReturn $? saveReturn $?
endReturn endReturn
exe chown -R mayan:mayan ${toolRoot} exe chown -R mayan:mayan ${toolRoot}
@@ -50,7 +50,7 @@ step_5() {
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 mayan-edms exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 mayan-edms
saveReturn $? saveReturn $?
endReturn endReturn
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 psycopg2==2.7.3.2 redis==2.10.6 exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir --no-use-pep517 psycopg2==2.8.3 redis==3.2.1
saveReturn $? saveReturn $?
endReturn endReturn
@@ -64,11 +64,10 @@ step_6_info() { echo "Supervisord configuration for $toolName"; }
step_6() { step_6() {
addConf -c "" "$supervisordConfLoc" addConf -c "" "$supervisordConfLoc"
toolScript "platformtemplate supervisord > ${supervisordConfLoc}" toolScript "platformtemplate supervisord > ${supervisordConfLoc}"
exe sed -i "s/\(^ *MAYAN_DATABASE_PASSWORD=\)\(.*\),$/\1\"\2\",/" "${supervisordConfLoc}"
} }
supervisordConfLoc="/etc/supervisor/conf.d/mayan.conf" supervisordConfLoc="/etc/supervisor/conf.d/mayan.conf"
step_7_info() { echo "$toolName configuration file"; } step_7_info() { echo "Redis configuration file"; }
step_7() { step_7() {
addConf -a "$redisConf" "$redisConfLoc" addConf -a "$redisConf" "$redisConfLoc"
@@ -82,7 +81,7 @@ redisConfLoc="/etc/redis/redis.conf"
redisConf="\ redisConf="\
maxmemory-policy allkeys-lru maxmemory-policy allkeys-lru
save \"\" save \"\"
databases 1" databases 2"
step_10_info() { echo "Update $toolName"; } step_10_info() { echo "Update $toolName"; }
step_10_alias() { ALIAS="update"; } step_10_alias() { ALIAS="update"; }
@@ -168,11 +167,12 @@ toolScript() {
if [ ! -z "$1" ] ; then if [ ! -z "$1" ] ; then
readDatabaseInfos readDatabaseInfos
fi fi
exep "sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=${postgresDb} \
MAYAN_DATABASE_PASSWORD=\"${postgresPass}\" MAYAN_DATABASE_USER=${postgresUser} \ exep "sudo -u mayan \
MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=${toolMediaFolder} \ MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'${postgresDb}','PASSWORD':'${postgresPass}','USER':'${postgresUser}','HOST':'127.0.0.1'}}\" \
MAYAN_MEDIA_ROOT=${toolMediaFolder} \
${toolRoot}/bin/mayan-edms.py $*" ${toolRoot}/bin/mayan-edms.py $*"
} }
VERSION_SEQREV=4 VERSION_SEQREV=6
. sequencer.sh . sequencer.sh