[Fusionforge-commits] FusionForge branch master updated. fba37cfb59726b3945a1c21290d71d0f96c4d1b4
Sylvain Beucler
beuc-inria at fusionforge.org
Tue Nov 18 16:06:31 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via fba37cfb59726b3945a1c21290d71d0f96c4d1b4 (commit)
from 9618b0a23782c1ec9e0a162cc41620fb79728a8f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fba37cfb59726b3945a1c21290d71d0f96c4d1b4
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date: Tue Nov 18 16:06:21 2014 +0100
install: upgrade system for configuration files
diff --git a/src/debian/fusionforge-mta-exim4.postinst b/src/debian/fusionforge-mta-exim4.postinst
index 23006c5..80f1448 100644
--- a/src/debian/fusionforge-mta-exim4.postinst
+++ b/src/debian/fusionforge-mta-exim4.postinst
@@ -20,6 +20,8 @@ set -e
case "$1" in
configure)
+ PREVVER=$2
+ [ -n "$PREVVER" ] && $(forge_get_config source_path)/post-install.d/mta-exim4/upgrade.sh $PREVVER
$(forge_get_config source_path)/post-install.d/mta-exim4/mta-exim4.sh configure
;;
diff --git a/src/debian/fusionforge-shell.postinst b/src/debian/fusionforge-shell.postinst
index 026af37..050503d 100644
--- a/src/debian/fusionforge-shell.postinst
+++ b/src/debian/fusionforge-shell.postinst
@@ -20,6 +20,8 @@ set -e
case "$1" in
configure)
+ PREVVER=$2
+ [ -n "$PREVVER" ] && $(forge_get_config source_path)/post-install.d/shell/upgrade.sh $PREVVER
DESTDIR=$(mktemp -d)
$(forge_get_config source_path)/post-install.d/shell/shell.sh configure $DESTDIR
for i in $(find $DESTDIR -type f); do
diff --git a/src/post-install.d/mta-postfix/upgrade.sh b/src/post-install.d/mta-postfix/upgrade.sh
new file mode 100755
index 0000000..a2d46ef
--- /dev/null
+++ b/src/post-install.d/mta-postfix/upgrade.sh
@@ -0,0 +1,33 @@
+#! /bin/bash
+# Upgrade Postfix configuration
+#
+# Copyright (C) 2014 Inria (Sylvain Beucler)
+#
+# This file is part of FusionForge. FusionForge is free software;
+# you can redistribute it and/or modify it under the terms of the
+# GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the Licence, or (at your option)
+# any later version.
+#
+# FusionForge is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with FusionForge; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -e
+
+PREVVER=${1:-0.0}
+
+# 5.3 -> 6.0
+if [ $(php -r "print version_compare('$PREVVER', '5.3.50');") -eq -1 ]; then
+ rm -f $(forge_get_config data_path)/etc/postfix-transport*
+ sed -i /etc/postfix/main.cf \
+ -e 's/\(^### \(BEGIN\|END\)\) GFORGE BLOCK/\1 FUSIONFORGE BLOCK/' \
+ -e '/^### GFORGE ADDITION.*/d' \
+ -e 's/proxy:pgsql:pgsql_gforge_users/proxy:pgsql:pgsql_fusionforge_users/' \
+ -e "s,hash:$(forge_get_config data_path)/etc/postfix-transport,hash:/etc/postfix/fusionforge-lists-transport,"
+fi
diff --git a/src/post-install.d/shell/upgrade.sh b/src/post-install.d/shell/upgrade.sh
new file mode 100755
index 0000000..f140cd9
--- /dev/null
+++ b/src/post-install.d/shell/upgrade.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+# Upgrade NSS+PostgreSQL configuration
+#
+# Copyright (C) 2014 Inria (Sylvain Beucler)
+#
+# This file is part of FusionForge. FusionForge is free software;
+# you can redistribute it and/or modify it under the terms of the
+# GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the Licence, or (at your option)
+# any later version.
+#
+# FusionForge is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with FusionForge; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -e
+
+PREVVER=${1:-0.0}
+
+# 5.3 -> 6.0
+if [ $(php -r "print version_compare('$PREVVER', '5.3.50');") -eq -1 ]; then
+ sed -i -e 's/\(#.*\)GForge/\1FusionForge/' /etc/nsswitch.conf
+fi
diff --git a/src/rpm/fusionforge.spec.in b/src/rpm/fusionforge.spec.in
index 82de74b..d9f658a 100644
--- a/src/rpm/fusionforge.spec.in
+++ b/src/rpm/fusionforge.spec.in
@@ -157,6 +157,7 @@ This package provides shell accounts authenticated via the PostGreSQL
database to FusionForge users.
%files shell -f shell.rpmfiles
%post shell
+%{_datadir}/%{name}/post-install.d/shell/upgrade.sh
%{_datadir}/%{name}/post-install.d/shell/shell.sh configure
%preun shell
if [ $1 -eq 0 ] ; then
@@ -217,6 +218,7 @@ This package configures the Postfix mail transfer agent to run
FusionForge.
%files mta-postfix -f mta-postfix.rpmfiles
%post mta-postfix
+%{_datadir}/%{name}/post-install.d/mta-postfix/upgrade.sh
%{_datadir}/%{name}/post-install.d/mta-postfix/mta-postfix.sh configure
%preun mta-postfix
if [ $1 -eq 0 ] ; then %{_datadir}/%{name}/post-install.d/mta-postfix/mta-postfix.sh $i remove; fi
-----------------------------------------------------------------------
Summary of changes:
src/debian/fusionforge-mta-exim4.postinst | 2 ++
src/debian/fusionforge-shell.postinst | 2 ++
.../{common/common.sh => mta-postfix/upgrade.sh} | 19 ++++++++++++++-----
.../{common/common.sh => shell/upgrade.sh} | 14 +++++++++-----
src/rpm/fusionforge.spec.in | 2 ++
5 files changed, 29 insertions(+), 10 deletions(-)
copy src/post-install.d/{common/common.sh => mta-postfix/upgrade.sh} (58%)
copy src/post-install.d/{common/common.sh => shell/upgrade.sh} (76%)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list