[DRE-commits] r4190 - in trunk/redmine/debian: . po
Jérémy Lal
kapouer-guest at alioth.debian.org
Tue Sep 22 22:56:29 UTC 2009
Author: kapouer-guest
Date: 2009-09-22 22:56:29 +0000 (Tue, 22 Sep 2009)
New Revision: 4190
Added:
trunk/redmine/debian/preinst
Modified:
trunk/redmine/debian/README.Debian
trunk/redmine/debian/config
trunk/redmine/debian/control
trunk/redmine/debian/po/fr.po
trunk/redmine/debian/po/templates.pot
trunk/redmine/debian/postinst
trunk/redmine/debian/templates
Log:
Users of old redmine package will see their instance moved to the default one.
Modified: trunk/redmine/debian/README.Debian
===================================================================
--- trunk/redmine/debian/README.Debian 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/README.Debian 2009-09-22 22:56:29 UTC (rev 4190)
@@ -6,6 +6,9 @@
A debconf facility is provided to be able to configure several redmine
instances. Use dpkg-reconfigure to define the instances identifiers.
+Note for users of previous, unreleased redmine debian packages :
+the old configuration is moved to the "default" instance.
+
By default, redmine admin account log/pass is admin/admin
For web server configuration, examples are
Modified: trunk/redmine/debian/config
===================================================================
--- trunk/redmine/debian/config 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/config 2009-09-22 22:56:29 UTC (rev 4190)
@@ -31,10 +31,43 @@
fState=$(($STATE % 10))
fNextState=$((($fIndex+1)*10))
if [ $STATE -eq 1 ]; then
+ # upgrade debconf db if we detect an old redmine version (<= 0.9.0~svn2819) was installed
+ # detection
+ db_get redmine/dbconfig-install || true
+ if [ $? -eq 0 ]; then
+ # remove deprecated debconf templates
+ db_unregister redmine/reconfigure-webserver || true
+ db_unregister redmine/restart-webserver || true
+ db_unregister redmine/webserver-install || true
+ # copy all current questions to instances/default ones
+ # get old questions
+ fOldQuest=$(debconf-show redmine)
+ OLD_IFS=$IFS
+ IFS="\n"
+ # for each line, we want to get the three fields, seen, question, value
+ for lLine in $fOldQuest; do
+ lSeen="${lLine%% *}"
+ if [ "$lSeen" = "*" ]; then lSeen="true"; else lSeen="false";fi
+ lStr="${lLine#${lSeen} }"
+ lName="${lStr%%: *}"
+ lVal="${lStr#*: }"
+ lNewname="redmine/instances/default${lName#redmine}"
+ db_set "$lNewname" "$lVal"
+ db_set "$lNewname" seen "$lSeen"
+ db_unregister "$lName"
+ done
+ IFS=$OLD_IFS
+
+ # setup default as an old instance
+ db_set redmine/current-instances "default"
+ db_set redmine/migrate "true"
+ db_input high redmine/notify-migration || true
+ fi
db_get redmine/current-instances || true
gOldInstances="${RET}"
- db_set redmine/current-instances $gOldInstances
+ # what is that for ? we just got it.
+ # db_set redmine/current-instances $gOldInstances
db_input medium redmine/current-instances || true
if db_go; then
STATE=$fNextState
Modified: trunk/redmine/debian/control
===================================================================
--- trunk/redmine/debian/control 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/control 2009-09-22 22:56:29 UTC (rev 4190)
@@ -10,6 +10,7 @@
Package: redmine
Architecture: all
+Pre-Depends: debconf
Depends: ruby, ruby1.8 (>= 1.8.7), rake (>=0.8.3), rails (>= 2.2.3), libjs-prototype (> 1.6), dbconfig-common, libdbd-sqlite3-ruby, libdbd-pg-ruby, libdbd-mysql-ruby, sqlite3 | postgresql-client | mysql-client, ${misc:Depends}
Recommends: libfcgi-ruby, libapache2-mod-fcgid, postgresql (>= 8) | mysql-server (>= 4)
Suggests: libsvn-ruby (>= 1.3), librmagick-ruby, libopenid-ruby, thin | mongrel | httpd-cgi
Modified: trunk/redmine/debian/po/fr.po
===================================================================
--- trunk/redmine/debian/po/fr.po 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/po/fr.po 2009-09-22 22:56:29 UTC (rev 4190)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: redmine 0.9.0-1\n"
"Report-Msgid-Bugs-To: redmine at packages.debian.org\n"
-"POT-Creation-Date: 2009-08-10 09:18+0200\n"
+"POT-Creation-Date: 2009-09-20 13:26+0200\n"
"PO-Revision-Date: 2009-02-26 15:56+0100\n"
"Last-Translator: Jérémy Lal <jeremy.lal at m4x.org>\n"
"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
@@ -10,51 +10,70 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "Redmine package now supports mutiple instances."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"You are migrating from an unsupported version. However, the current instance "
+"will be now called the \"default\" instance. Please check your web server "
+"configuration files, see README.Debian."
+msgstr ""
+
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Redmine instances to be deconfigured:"
msgstr "Instances redmine qui seront déconfigurées:"
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Configuration files for these instances will be removed."
msgstr "Les fichiers de configuration pour ces instances seront supprimés."
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Database (de)configuration will be asked accordingly."
msgstr "Chaque base de données sera (dé)configurée respectivement."
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "Redmine instances to be configured or upgraded:"
msgstr "Instances redmine qui seront configurées ou mises à jour:"
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "Space-separated list of instances identifiers."
msgstr "Liste d'identifiants d'instances, séparés par des espaces."
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid ""
-"Each instance has its configuration files in /etc/redmine/<instance-identifier>/"
-msgstr "Les fichiers de configuration de chaque instance sont dans /etc/redmine/<identifiant-instance>/"
+"Each instance has its configuration files in /etc/redmine/<instance-"
+"identifier>/"
+msgstr ""
+"Les fichiers de configuration de chaque instance sont dans /etc/redmine/"
+"<identifiant-instance>/"
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "To deconfigure an instance, remove its identifier from this list."
-msgstr "Pour déconfigurer une instance, enlever son identifiant de cette liste."
+msgstr ""
+"Pour déconfigurer une instance, enlever son identifiant de cette liste."
#. Type: select
#. Description
-#: ../templates:3001
+#: ../templates:4001
msgid "Default redmine language:"
msgstr "Langage par défaut de Redmine:"
Modified: trunk/redmine/debian/po/templates.pot
===================================================================
--- trunk/redmine/debian/po/templates.pot 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/po/templates.pot 2009-09-22 22:56:29 UTC (rev 4190)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: redmine at packages.debian.org\n"
-"POT-Creation-Date: 2009-08-10 09:23+0200\n"
+"POT-Creation-Date: 2009-09-20 13:26+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,39 +16,54 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "Redmine package now supports mutiple instances."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"You are migrating from an unsupported version. However, the current instance "
+"will be now called the \"default\" instance. Please check your web server "
+"configuration files, see README.Debian."
+msgstr ""
+
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Redmine instances to be deconfigured:"
msgstr ""
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Configuration files for these instances will be removed."
msgstr ""
#. Type: string
#. Description
-#: ../templates:1001
+#: ../templates:2001
msgid "Database (de)configuration will be asked accordingly."
msgstr ""
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "Redmine instances to be configured or upgraded:"
msgstr ""
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "Space-separated list of instances identifiers."
msgstr ""
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid ""
"Each instance has its configuration files in /etc/redmine/<instance-"
"identifier>/"
@@ -56,12 +71,12 @@
#. Type: string
#. Description
-#: ../templates:2001
+#: ../templates:3001
msgid "To deconfigure an instance, remove its identifier from this list."
msgstr ""
#. Type: select
#. Description
-#: ../templates:3001
+#: ../templates:4001
msgid "Default redmine language:"
msgstr ""
Modified: trunk/redmine/debian/postinst
===================================================================
--- trunk/redmine/debian/postinst 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/postinst 2009-09-22 22:56:29 UTC (rev 4190)
@@ -32,13 +32,13 @@
fRailsLog=/var/log/redmine
fRailsVar=/var/lib/redmine
fRailsCache=/var/cache/redmine
+fRailsRun=/var/run/redmine
case "$1" in
configure)
- mkdir -p /var/run/redmine/sockets
- chown -f www-data:www-data /var/run/redmine/sockets
- mkdir -p /var/run/redmine
- chown -f www-data:www-data /var/run/redmine
+ mkdir -p $fRailsRun/sockets
+ chown -f www-data:www-data $fRailsRun
+ chown -f www-data:www-data $fRailsRun/sockets
if [ ! -e $fRailsLog ]; then
mkdir -p $fRailsLog
chown -f www-data:www-data $fRailsLog
@@ -72,7 +72,7 @@
cd $savedir
;;
- abort-upgrade|abort-remove|abort-deconfigure|configure)
+ abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
Added: trunk/redmine/debian/preinst
===================================================================
--- trunk/redmine/debian/preinst (rev 0)
+++ trunk/redmine/debian/preinst 2009-09-22 22:56:29 UTC (rev 4190)
@@ -0,0 +1,43 @@
+#!/bin/sh
+# preinst script for redmine
+#
+# see: dh_installdeb(1)
+
+set -e
+set -x
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+ upgrade)
+ dpkg --compare-versions "$2" le "0.9.0~svn2819" || true
+ db_get redmine/migrate || true
+ if [ $? -neq 0 -a "$RET" != "true" ]; then
+ break
+ fi
+ db_unregister redmine/migrate
+ if [ -e /etc/redmine/database.yml ]; then
+ mkdir -p /etc/redmine/default/database.yml
+ mv /etc/redmine/database.yml /etc/redmine/default/database.yml
+ fi
+ if [ -e /var/lib/redmine/files ]; then
+ mkdir -p /var/lib/redmine/default
+ mv /var/lib/redmine/files /var/lib/redmine/default
+ fi
+ ;;
+
+ install|abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0
+
+
Modified: trunk/redmine/debian/templates
===================================================================
--- trunk/redmine/debian/templates 2009-09-22 22:56:25 UTC (rev 4189)
+++ trunk/redmine/debian/templates 2009-09-22 22:56:29 UTC (rev 4190)
@@ -1,3 +1,11 @@
+Template: redmine/notify-migration
+Type: note
+_Description: Redmine package now supports mutiple instances.
+ .
+ You are migrating from an unsupported version.
+ However, the current instance will be now called the "default" instance.
+ Please check your web server configuration files, see README.Debian.
+
Template: redmine/old-instances
Type: string
_Description: Redmine instances to be deconfigured:
More information about the Pkg-ruby-extras-commits
mailing list