Your message dated Mon, 19 Jan 2015 20:31:43 +0100
with message-id <54bd5b9f.90...@wollumbin.marsaxlokk.dhcp.io>
and subject line Re: Bug#561135: [Fwd: Re: Bug#561135: dbconfig only applies 
the latest database upgrades]
has caused the Debian Bug report #561135,
regarding dbconfig only applies the latest database upgrades
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
561135: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561135
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: dbconfig-common
Version: 1.8.41
Severity: grave

Hello,

I have already mailed you about this issue.

I have taken over the maintenance of the otrs2 package. At work we used
2.2 and then we upgraded to 2.3 and to 2.4, without any problems.

In the past (where we switched from 2.0 to 2.2) I noticed, that some
ALTERs on the database were missing and I manualy applied them, without
taking further care about the issue.

In sid there are now the following files available:

/usr/share/dbconfig-common/data/otrs2/install/mysql
/usr/share/dbconfig-common/data/otrs2/install/pgsql
/usr/share/dbconfig-common/data/otrs2/upgrade/mysql/2.1
/usr/share/dbconfig-common/data/otrs2/upgrade/mysql/2.2
/usr/share/dbconfig-common/data/otrs2/upgrade/mysql/2.3
/usr/share/dbconfig-common/data/otrs2/upgrade/mysql/2.4
/usr/share/dbconfig-common/data/otrs2/upgrade/pgsql/2.1
/usr/share/dbconfig-common/data/otrs2/upgrade/pgsql/2.2
/usr/share/dbconfig-common/data/otrs2/upgrade/pgsql/2.3
/usr/share/dbconfig-common/data/otrs2/upgrade/pgsql/2.4

If I switch from 2.2 to 2.3 and then to 2.4, everything is fine. If I
switch directly from 2.2 to 2.4 dbconfig only applies the 2.4 update,
not the 2.3 one, for mysql and pgsql.

I hope you are fine with severity grave, because currently this will
break every otrs2 installation if users upgrade from lenny to squeeze.

The config of otrs looks like this (sorry a bit longer, but not my code :p):


$ cat config
#!/bin/sh

set -e

print_config()
{
  cat << EOF
dbname="$dbname"
dbserver="$dbserver"
dbport="$dbport"
dbuser="$dbuser"
dbpass="$dbpass"
dbtype="$dbtype"
EOF
}

get_config()
{
  set +e

  DSN=$(/usr/share/otrs/bin/otrs.getConfig DatabaseDSN)
  TYPE=$(echo $DSN | awk -F: '{ print $2 }')
  DSNOPTIONS=$(echo $DSN | awk -F: '{ print $3 }')
  eval $DSNOPTIONS
  case $TYPE in
    Pq)    dbtype="pgqsl"
           dbname=${dbname:-otrs}
           ;;
    mysql) dbtype="mysql"
           dbname=${database:-otrs}
           ;;
  esac

  dbserver=${host:-localhost}
  dbuser=$(/usr/share/otrs/bin/otrs.getConfig DatabaseUser)
  dbuser=${dbuser:-otrs}
  dbpass=$(/usr/share/otrs/bin/otrs.getConfig DatabasePw)

  print_config > $TMPFILE

  set -e
}

. /usr/share/debconf/confmodule
dbc_dbtypes="mysql, pgsql"

TMPFILE=$(mktemp)
if [ -f "/etc/otrs/Kernel/Config.pm" ]; then
  get_config
fi

dbc_dbuser="otrs"
dbc_authmethod_user="ident"
dbc_first_version="2.0.4p01-10"
dbc_load_include="sh:$TMPFILE"
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
  . /usr/share/dbconfig-common/dpkg/config
  dbc_go otrs2 "$@"
fi

# FIXME: db_get otrs2/database-type = pgsql
db_get otrs2/pgsql/authmethod-user
METHOD="$RET"
db_get otrs2/db/app-user
USER="$RET"
if [ "$METHOD" = ident -a "$USER" != otrs ]; then
  db_input high otrs2/resetdbuser || true
  db_go || true
  db_get otrs2/resetdbuser
  if [ $RET = true ]; then
    db_set otrs2/db/app-user otrs
  fi
fi


- --
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

E-Mail: pmatth...@debian.org
        patr...@linux-dev.org

Comment:
Always if we think we are right,
we were maybe wrong.
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAksmizQACgkQ2XA5inpabMd08ACfR6pjBXxIhm2ldgbEy8GrjpkD
xRIAn2yxYsm2eYra0EkqJFI1xlVYmmEN
=oPC6
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
On 19-01-15 18:51, Patrick Matthäi wrote:
> I were not able to reproduce it again. So from my side you may close it.

So, closing.

Paul


Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to