[DRE-commits] [SCM] redmine.git branch, master-stable, updated. debian/1.4.4+dfsg1-1-3-g880b7c4
Jérémy Lal
kapouer at melix.org
Sat Jan 19 12:50:53 UTC 2013
The following commit has been merged in the master-stable branch:
commit c6535b5da755fd761a4324208a370ff5a52b15cf
Author: Jérémy Lal <kapouer at melix.org>
Date: Sat Jan 19 13:47:22 2013 +0100
Manage and set dbuser default value like dbname. (Closes: #695774)
diff --git a/debian/config b/debian/config
index de9c845..7afe7ba 100644
--- a/debian/config
+++ b/debian/config
@@ -116,7 +116,14 @@ while [ "$STATE" != "0" -a "$STATE" != "$OUTSTATE" ]; do
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
dbc_dbtypes="sqlite3, pgsql, mysql"
dbc_authmethod_user="password"
- dbc_dbuser=redmine
+ # per-instance dbuser to avoid #695774 - and behave like dbname
+ fCode=0
+ db_get redmine/instances/$fInstance/db/app-user || fCode=$?
+ if [ $fCode -eq 0 -a -n "$RET" ]; then
+ dbc_dbuser="$RET"
+ else
+ dbc_dbuser=redmine_$fInstance
+ fi
# use same dbname if one has been registered in debconf before
# this is also needed for migration from version <= 0.9.0~svn2819
fCode=0
diff --git a/debian/postinst b/debian/postinst
index b028a5b..9fe1fcc 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -161,7 +161,14 @@ for lInstance in $gInstances; do
dbc_dbfile_owner="root:www-data"
# this is for sqlite3 to be r/w for www-data
dbc_dbfile_perms="0660"
- dbc_dbuser=redmine
+ # per-instance dbuser to avoid #695774 - and behave like dbname
+ fCode=0
+ db_get redmine/instances/$lInstance/db/app-user || fCode=$?
+ if [ $fCode -eq 0 -a -n "$RET" ]; then
+ dbc_dbuser="$RET"
+ else
+ dbc_dbuser=redmine_$lInstance
+ fi
# make sure mysql or pgsql database charset is UTF8
dbc_mysql_createdb_encoding="UTF8"
dbc_pgsql_createdb_encoding="UTF8"
--
redmine.git
More information about the Pkg-ruby-extras-commits
mailing list