Skip to content

Commit

Permalink
* Wed Jul 8 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 1.3-…
Browse files Browse the repository at this point in the history
…14.sme

- Upgrade to sogo 2.3.0, alteration table needed
- thank to ian case <ianc@caseinfo.net>
  • Loading branch information
stephdl committed Jul 8, 2015
1 parent cac187a commit 6497e7c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
14 changes: 14 additions & 0 deletions root/etc/e-smith/events/actions/sogo_upgrade_2.3
@@ -0,0 +1,14 @@
# This script updates c_partstates to mediumtext
# adds c_description to Calendar quick tables
# http://www.sogo.nu/bugs/view.php?id=3175
# the field length was actually changed in v2.2.18

MYSQLSOGOPASS=$(/sbin/e-smith/config getprop sogod DbPassword)

tables=$(/usr/bin/mysql -B -N -usogo -p${MYSQLSOGOPASS} sogo -e "SELECT SUBSTRING_INDEX(c_quick_location, '/', -1) FROM sogo_folder_info WHERE c_path3 = 'Calendar'")

for table in $tables;
do
/usr/bin/mysql -usogo -p${MYSQLSOGOPASS} sogo -e "ALTER TABLE $table MODIFY c_partstates mediumtext" 2>/dev/null
/usr/bin/mysql -usogo -p${MYSQLSOGOPASS} sogo -e "ALTER TABLE $table ADD COLUMN c_description mediumtext" 2>/dev/null
done
@@ -0,0 +1,4 @@
#! /bin/sh

exec /etc/e-smith/events/actions/sogo_upgrade_2.3

21 changes: 15 additions & 6 deletions smeserver-sogo.spec
@@ -1,11 +1,12 @@
# $Id$
%define name smeserver-sogo
%define version 1.3
%define release 14


Name: smeserver-sogo
Version: 1.3
Release: 12%{?dist}
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Summary: SME Server SOGo Groupware

Group: Networking/Daemons
License: GPLv3+
URL: http://www.smeserver.org
Expand All @@ -16,7 +17,7 @@ Epoch: 9
BuildRequires: e-smith-devtools
Requires: smeserver-release >= 9
Requires: e-smith-ldap
Requires: sogo >= 2.2.0
Requires: sogo >= 2.3.0
Requires: sogo-tool
Requires: memcached
Requires: sogo-activesync
Expand Down Expand Up @@ -63,11 +64,15 @@ if [ $1 == 1 ]; then #first install
/var/lib/sogo/smeserver/sogo_mysql_update_privileges.sql
/sbin/e-smith/expand-template \
/etc/e-smith/sql/init/31sogo_upgrade
/sbin/e-smith/expand-template \
/etc/e-smith/sql/init/32sogo_upgrade_2.3
/sbin/service mysql.init start
/sbin/e-smith/signal-event sogo-modify
elif [ $1 -gt 1 ]; then #update
/sbin/e-smith/expand-template \
/etc/e-smith/sql/init/31sogo_upgrade
/sbin/e-smith/expand-template \
/etc/e-smith/sql/init/32sogo_upgrade_2.3
/sbin/service mysql.init start
/etc/e-smith/events/actions/initialize-default-databases &> /dev/null || :
/sbin/e-smith/signal-event sogo-modify || :
Expand All @@ -89,6 +94,10 @@ fi


%changelog
* Wed Jul 8 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 1.3-14.sme
- Upgrade to sogo 2.3.0, alteration table needed
- thank to ian case <ianc@caseinfo.net>

* Sat Feb 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 1.3-12.sme
- Remove a sogo user when a SME Server user is removed

Expand Down

0 comments on commit 6497e7c

Please sign in to comment.