[tryton-debian-vcs] tryton-server branch debian_maintscript_767003 created. debian/3.4.0-1-2-g99b65ed

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Mon Oct 27 14:48:14 UTC 2014


The following commit has been merged in the debian_maintscript_767003 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=debian/3.4.0-1-2-g99b65ed
commit 99b65ed0bd4f4cb91fd66108f9ce86385e8d63c1
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Oct 27 11:52:10 2014 +0100

    Using dpkg-maintscript-helper to move the old configuration file.
    
    The old file is saved as backup to /etc/tryton/trytond.conf.pre34 in
    case it was changed.

diff --git a/debian/NEWS b/debian/NEWS
index 6ba6f48..c901acf 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -6,11 +6,12 @@ tryton-server (3.4.0-1) unstable; urgency=medium
   The format of the configuration file changed to a simple ini style
   format. There is no automatic migration of old configuration settings.
   So be sure to adapt /etc/tryton/trytond.conf (or whatever configuration
-  file you may use) to the new format.
+  file you may use) to the new format (the old configuration file was saved
+  to /etc/tryton/trytond.conf.pre34 in case it was changed).
 
   As for each major release don't forget to backup your database(s) and
   then run the database update with
-  # trytond --all -d <your_database_name>
+  # trytond -c /etc/tryton/trytond.conf --all -d <your_database_name>
   and restart the server with
   # service tryton-server restart
 
diff --git a/debian/tryton-server.maintscript b/debian/tryton-server.maintscript
new file mode 100644
index 0000000..e10c85c
--- /dev/null
+++ b/debian/tryton-server.maintscript
@@ -0,0 +1 @@
+mv_conffile /etc/trytond.conf /etc/tryton/trytond.conf.pre34
diff --git a/debian/tryton-server.postrm b/debian/tryton-server.postrm
index 1ee15cf..d328945 100644
--- a/debian/tryton-server.postrm
+++ b/debian/tryton-server.postrm
@@ -4,8 +4,10 @@ set -e
 
 TRYTON_USER="tryton"
 TRYTON_OLDCONFFILE="/etc/trytond.conf"
-TRYTON_CONFFILE="/etc/tryton/trytond.conf"
-TRYTON_LOGCONFFILE="/etc/tryton/trytond_log.conf"
+TRYTON_CONFDIR="/etc/tryton"
+TRYTON_CONFFILE="${TRYTON_CONFDIR}/trytond.conf"
+TRYTON_LOGCONFFILE="${TRYTON_CONFDIR}/trytond_log.conf"
+TRYTON_CONFFILEPRE34="${TRYTON_CONFDIR}/trytond.conf.pre34"
 TRYTON_LOGDIR="/var/log/tryton"
 TRYTON_HOMEDIR="/var/lib/tryton"
 
@@ -26,8 +28,14 @@ case "${1}" in
 		# Removing log directory
 		rmdir --ignore-fail-on-non-empty ${TRYTON_LOGDIR} > /dev/null 2>&1 || true
 
+		# Removing (potentially) leftover old configuration backup
+		rm -f "${TRYTON_CONFFILEPRE34}"
+		
 		# Removing (potentially) empty directories
-		rmdir --ignore-fail-on-non-empty ${TRYTON_HOMEDIR} > /dev/null 2>&1 || true
+		for _ITEM in "${TRYTON_CONFDIR}" "${TRYTON_LOGDIR}"
+		do
+			rmdir --ignore-fail-on-non-empty ${_ITEM} > /dev/null 2>&1 || true
+		done
 		;;
 
 	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
commit 49f39fc2522c6bddfed15c508b9f30a45d47b7a6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Oct 27 11:05:00 2014 +0100

    Adding path to the configuration file to the commands in the README.

diff --git a/debian/tryton-server.README.Debian b/debian/tryton-server.README.Debian
index bf81015..6486fa0 100644
--- a/debian/tryton-server.README.Debian
+++ b/debian/tryton-server.README.Debian
@@ -87,7 +87,7 @@ Client and are not mandatory to be done on the command line.
 
   * Initializing the database:
 
-    # /usr/bin/trytond -u res -d tryton
+    # /usr/bin/trytond -c /etc/tryton/trytond.conf -u res -d tryton
 
     Note: Use the database name you chose in the previous step (here as default: tryton).
     You will be asked for the admin password for this database.
@@ -101,7 +101,7 @@ Upgrade
     version string) you have to update your database(s).
     After the categorically recommended backup do:
 
-    # /usr/bin/trytond --all -d tryton
+    # /usr/bin/trytond -c /etc/tryton/trytond.conf --all -d tryton
 
     Remember to replace tryton with the name of your database.
 
-- 
tryton-server



More information about the tryton-debian-vcs mailing list