Liquid Feedback Updaten

Vorarbeit

service lighttpd stop
service lf_updated stop
service lf_notification stop
 
su - www-data
cd /opt/sql_backups
BACKUPTIME=`date +"%F_%H-%M"`
pg_dump liquid_feedback_lsa > backup_${BACKUPTIME}.sql
xz backup_${BACKUPTIME}.sql
exit

Core

export ALT_CORE=v2.1.0
export NEU_CORE=v2.2.3
 
cd /opt
wget http://www.public-software-group.org/pub/projects/liquid_feedback/backend/${NEU_CORE}/liquid_feedback_core-${NEU_CORE}.tar.gz
tar xfz liquid_feedback_core-${NEU_CORE}.tar.gz
rm liquid_feedback_core
ln -s liquid_feedback_core-${NEU_CORE} liquid_feedback_core
 
cd liquid_feedback_core
make
 
cd update
echo "${ALT_CORE} bis ${NEU_CORE}"
su www-data
psql -v ON_ERROR_STOP=1 -f core-update.[REPLACE]-[REPLACE].sql liquid_feedback_lsa # für alle SQL-Files zwischen ALT und NEU durchführen
 
pg_dump --disable-triggers --data-only liquid_feedback_lsa > /opt/sql_backups/tmp.sql
dropdb liquid_feedback_lsa
createdb liquid_feedback_lsa
cd ..
psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback_lsa
exit
su postgres
psql -v ON_ERROR_STOP=1 -f /opt/sql_backups/tmp.sql liquid_feedback_lsa
exit
rm /opt/sql_backups/tmp.sql

Rechte für den API Server vergeben (API Server benutzt hier einen anderen PostgreSQL User):

su - www-data
psql liquid_feedback_lsa
liquid_feedback_lsa=> GRANT ALL ON ALL TABLES IN SCHEMA PUBLIC TO lfapi;
liquid_feedback_lsa=> GRANT ALL ON ALL SEQUENCES IN SCHEMA PUBLIC TO lfapi;
liquid_feedback_lsa=> GRANT ALL ON ALL FUNCTIONS IN SCHEMA PUBLIC TO lfapi;
liquid_feedback_lsa=> \dp # nur zum überprüfen der Rechte
liquid_feedback_lsa=> \q
exit

Frontend

cd /opt
export ALT_FRONTEND=v2.1.1
export NEU_FRONTEND=v2.1.2
wget http://www.public-software-group.org/pub/projects/liquid_feedback/frontend/${NEU_FRONTEND}/liquid_feedback_frontend-${NEU_FRONTEND}.tar.gz
tar xfz liquid_feedback_frontend-${NEU_FRONTEND}.tar.gz
rm liquid_feedback_frontend
ln -s liquid_feedback_frontend-${NEU_FRONTEND} liquid_feedback_frontend
 
cd liquid_feedback_frontend-${NEU_FRONTEND}/config
ln -s /opt/lqfbconf/conf/piraten-lsa.lua piraten-lsa.lua
ln -s /opt/lqfbconf/conf/default.lua default.lua
 
# prüfen ob an der config etwas geändert wurde
diff -up /opt/liquid_feedback_frontend-${ALT_FRONTEND}/config/init.lua init.lua
diff -up /opt/liquid_feedback_frontend-${ALT_FRONTEND}/config/example.lua example.lua
 
cd ../fastpath
mkdir lsa
patch -p0 < /opt/lqfbconf/patches/fastpath.patch
make
mv getpic lsa
 
cd ../locale
patch -p0 < /opt/lqfbconf/patches/locale.patch
make
 
cd ../static
ln -s /opt/lqfbconf/logo.png logo.png
ln -s /opt/lqfbconf/doc doc
 
cd ..
chown www-data:www-data tmp
patch -p1 < /opt/lqfbconf/patches/openusageterms.patch

Nacharbeit

Testen, ob „update“ noch funktioniert:

su - www-data
cd /opt/liquid_feedback_core
./lf_update dbname=liquid_feedback_lsa && echo OK
./lf_update_suggestion_order dbname=liquid_feedback_lsa && echo OK
exit

Wieder alles starten:

service lighttpd start
service lf_updated start
service lf_notification start
it/lqfbupdate.txt · Zuletzt geändert: 21.07.2014 11:31 von Christoph Giesel
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki