[DRE-commits] r4369 - in trunk/redmine/debian: . conf
Jérémy Lal
kapouer-guest at alioth.debian.org
Mon Nov 23 00:20:46 UTC 2009
Author: kapouer-guest
Date: 2009-11-23 00:20:46 +0000 (Mon, 23 Nov 2009)
New Revision: 4369
Added:
trunk/redmine/debian/conf/database-sqlite.yml.template
Modified:
trunk/redmine/debian/changelog
trunk/redmine/debian/conf/database.yml.template
trunk/redmine/debian/postinst
Log:
* start upstream update.
* dbfile in database.yml is deprecated.
Modified: trunk/redmine/debian/changelog
===================================================================
--- trunk/redmine/debian/changelog 2009-11-22 18:17:42 UTC (rev 4368)
+++ trunk/redmine/debian/changelog 2009-11-23 00:20:46 UTC (rev 4369)
@@ -1,7 +1,9 @@
-redmine (0.9.0~svn2907-2) UNRELEASED; urgency=low
+redmine (0.9.0~svn2968-1) UNRELEASED; urgency=low
+ * Upstream update.
+ * Stop using deprecated dbfile param in database.yml.
* Fix typo in po templates. (Closes #553376)
* Adds pt, de, sv translations. (Closes: #553375, #551002, #552736)
- * Upstream update, minor bug fixes.
+
-- Lucas Nussbaum <lucas at lucas-nussbaum.net> Sat, 10 Oct 2009 19:46:19 +0200
Added: trunk/redmine/debian/conf/database-sqlite.yml.template
===================================================================
--- trunk/redmine/debian/conf/database-sqlite.yml.template (rev 0)
+++ trunk/redmine/debian/conf/database-sqlite.yml.template 2009-11-23 00:20:46 UTC (rev 4369)
@@ -0,0 +1,8 @@
+production:
+ adapter: _DBC_DBTYPE_
+ database: _DBC_BASEPATH_/_DBC_DBNAME_
+# host: _DBC_DBSERVER_
+# port: _DBC_DBPORT_
+# username: _DBC_DBUSER_
+# password: _DBC_DBPASS_
+ encoding: utf8
Modified: trunk/redmine/debian/conf/database.yml.template
===================================================================
--- trunk/redmine/debian/conf/database.yml.template 2009-11-22 18:17:42 UTC (rev 4368)
+++ trunk/redmine/debian/conf/database.yml.template 2009-11-23 00:20:46 UTC (rev 4369)
@@ -5,5 +5,4 @@
port: _DBC_DBPORT_
username: _DBC_DBUSER_
password: _DBC_DBPASS_
- dbfile: _DBC_BASEPATH_/_DBC_DBNAME_
encoding: utf8
Modified: trunk/redmine/debian/postinst
===================================================================
--- trunk/redmine/debian/postinst 2009-11-22 18:17:42 UTC (rev 4368)
+++ trunk/redmine/debian/postinst 2009-11-23 00:20:46 UTC (rev 4369)
@@ -113,8 +113,16 @@
mkdir -p $fRailsEtc
chown -f www-data:www-data $fRailsEtc
fYml=$fRailsEtc/database.yml.new
+ lTemplate="database.yml.template"
+ # if dbtype=sqlite3, use dbbasepath, else dbname
+ fCode=0
+ db_get redmine/instances/$lInstance/database-type || fCode=$?
+ if [ $fCode -eq 0 -a "$RET" = "sqlite3" ]; then
+ lTemplate="database-sqlite.yml.template"
+ fi
+
dbc_generate_include=template:$fYml
- dbc_generate_include_args="-o template_infile=/usr/share/redmine/templates/database.yml.template"
+ dbc_generate_include_args="-o template_infile=/usr/share/redmine/templates/${lTemplate}"
dbc_generate_include_owner="root:www-data"
dbc_generate_include_perms="640"
dbc_dbfile_owner="root:www-data"
@@ -147,10 +155,10 @@
withdb=1
case "$hasdb" in
mysql|postgresql|pgsql)
- sed -i -r -e 's/pgsql/postgresql/g' -e 's/^[^#]+(dbfile: [^:]*)$/# \1/g' $fYml
+ sed -i -r -e 's/pgsql/postgresql/g' $fYml
;;
sqlite3)
- sed -i -r -e 's/^[^#]+((database|host|port|username|password): [^:]*)$/# \1/g' $fYml
+ sed -i -r -e 's/^[^#]+((host|port|username|password): [^:]*)$/# \1/g' $fYml
;;
esac
fi
More information about the Pkg-ruby-extras-commits
mailing list