[pkg-kolab] r1467 - kolab-webclient/trunk/debian

Mathieu Parent sathieu at alioth.debian.org
Mon Jan 4 10:58:03 UTC 2010


Author: sathieu
Date: 2010-01-04 10:58:03 +0000 (Mon, 04 Jan 2010)
New Revision: 1467

Modified:
   kolab-webclient/trunk/debian/changelog
   kolab-webclient/trunk/debian/control
   kolab-webclient/trunk/debian/kolab-webclient.postinst
   kolab-webclient/trunk/debian/kolab-webclient.prerm
Log:
Use the newly integraded 'alternatives' for horde apps configuration 
      files


Modified: kolab-webclient/trunk/debian/changelog
===================================================================
--- kolab-webclient/trunk/debian/changelog	2009-12-10 19:17:56 UTC (rev 1466)
+++ kolab-webclient/trunk/debian/changelog	2010-01-04 10:58:03 UTC (rev 1467)
@@ -1,12 +1,8 @@
-kolab-webclient (1.2.0-20090514+debian0-2~pre11) UNRELEASED; urgency=low
+kolab-webclient (1.2.0-20090514+debian0-2~pre12) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
   * Fix "Permissions wrong on /var/log/kolab-webclient/horde.log"
     by depending on kronolith2 >= 2.3.1-1 (Closes: #542188)
-  * Fix of kolab/issue3758 in ingo1, turba2, imp4:
-    - Bump depends to imp4 (>= 4.3.4+debian0-2~), ingo1 (>= 1.2.1-2~) and
-      turba2 (>= 2.3.1-2~)
-    - Removed sources.php, backends.php and servers.php and stop diverting
   * Depends on dimp1 and sork-passwd-h3 (instead of Recommends) to match
     upstream
   * New way to handle configuration files:
@@ -14,7 +10,9 @@
     - Make necessary change to include path
     - Don't divert horde's conffiles by default
     - Don't use registry.d as all apps are enabled by default
-    - Very hackish way of handling horde's config in maintainers scripts
+    - Use the newly integraded 'alternatives' for horde apps configuration
+      files
+    - Depends on the necessary versions 
   * Cosmetic:
     - Add Vcs-{Browser,Svn}
     - Updated Standards-Version to 3.8.3: no changes

Modified: kolab-webclient/trunk/debian/control
===================================================================
--- kolab-webclient/trunk/debian/control	2009-12-10 19:17:56 UTC (rev 1466)
+++ kolab-webclient/trunk/debian/control	2010-01-04 10:58:03 UTC (rev 1467)
@@ -11,7 +11,8 @@
 
 Package: kolab-webclient
 Architecture: all
-Depends: ${misc:Depends}, horde3, dimp1, imp4 (>= 4.3.4+debian0-2~), ingo1 (>= 1.2.1-2~), kronolith2 (>= 2.3.1-1~), mnemo2, nag2, sork-passwd-h3, turba2 (>= 2.3.1-2~),
+Depends: ${misc:Depends}, horde3 (>= 3.3.6+debian0-1~),
+ dimp1 (>= 1.1.4+debian0-1~), imp4 (>= 4.3.6+debian0-1~), ingo1 (>= 1.2.3+debian0-1~), kronolith2 (>= 2.3.3+debian0-1~), mnemo2 (>= 2.2.3+debian0-1~), nag2 (>= 2.3.4+debian0-1~), sork-passwd-h3 (>= 3.1.2-1~), turba2 (>= 2.3.3+debian0-1~),
  php-db, php5-sqlite, sqlite, php-net-sieve, php-net-smtp
 Recommends: aspell, mimp1
 Suggests: kolabd,

Modified: kolab-webclient/trunk/debian/kolab-webclient.postinst
===================================================================
--- kolab-webclient/trunk/debian/kolab-webclient.postinst	2009-12-10 19:17:56 UTC (rev 1466)
+++ kolab-webclient/trunk/debian/kolab-webclient.postinst	2010-01-04 10:58:03 UTC (rev 1467)
@@ -7,16 +7,6 @@
 
 sqlite_db_path=/var/lib/kolab-webclient/storage/horde.db
 
-horde_config=/etc/horde
-kolab_webclient_config=/etc/kolab-webclient
-
-add_horde_diversion() {
-    dpkg-divert --add --package kolab-webclient --rename \
-        --divert "$horde_config/$1.pre-kolab-webclient" "$horde_config/$1"
-    [ \! -e "$horde_config/$1" -o -L "$horde_config/$1" ] && ln -sf "$kolab_webclient_config/$1" "$horde_config/$1"
-
-}
-
 initialize_horde_db() {
     if [ -e "$sqlite_db_path" ]; then
         echo "SQLite database $sqlite_db_path already exists."
@@ -39,45 +29,36 @@
 	fi
 }
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
+register_horde_config() {
+        #Horde configs
+        update-alternatives --install /usr/share/horde3/config \
+            horde3-config /etc/kolab-webclient/horde3 10
+        update-alternatives --install /usr/share/horde3/dimp/config \
+            dimp1-config /etc/kolab-webclient/dimp1 10
+        update-alternatives --install /usr/share/horde3/imp/config \
+            imp4-config /etc/kolab-webclient/imp4 10
+        update-alternatives --install /usr/share/horde3/ingo/config \
+            ingo1-config /etc/kolab-webclient/ingo1 10
+        update-alternatives --install /usr/share/horde3/kronolith/config \
+            kronolith2-config /etc/kolab-webclient/kronolith2 10
+        #update-alternatives --install /usr/share/horde3/mimp/config \
+        #    mimp1-config /etc/kolab-webclient/mimp1 10
+        update-alternatives --install /usr/share/horde3/mnemo/config \
+            mnemo2-config /etc/kolab-webclient/mnemo2 10
+        update-alternatives --install /usr/share/horde3/nag/config \
+            nag2-config /etc/kolab-webclient/nag2 10
+        update-alternatives --install /usr/share/horde3/passwd/config \
+            sork-passwd-h3-config /etc/kolab-webclient/passwd3 10
+        update-alternatives --install /usr/share/horde3/turba/config \
+            turba2-config /etc/kolab-webclient/turba2 10
+}
 
-
 case "$1" in
     configure)
         initialize_horde_db
         configure_apache
         configure_kolab
-        #add_horde_diversion horde3/conf.php
-        #add_horde_diversion dimp1/conf.php
-        #add_horde_diversion imp4/conf.php
-        #add_horde_diversion ingo1/conf.php
-        #add_horde_diversion kronolith2/conf.php
-        #add_horde_diversion mnemo2/conf.php
-        #add_horde_diversion nag2/conf.php
-        #add_horde_diversion passwd3/conf.php
-        #add_horde_diversion turba2/conf.php
-        
-        #overriding horde's symlinks
-        ln -sTfv /etc/kolab-webclient/horde3     /usr/share/horde3/config
-        ln -sTfv /etc/kolab-webclient/dimp1      /usr/share/horde3/dimp/config
-        ln -sTfv /etc/kolab-webclient/imp4       /usr/share/horde3/imp/config
-        ln -sTfv /etc/kolab-webclient/ingo1      /usr/share/horde3/ingo/config
-        ln -sTfv /etc/kolab-webclient/kronolith2 /usr/share/horde3/kronolith/config
-        #ln -sTfv /etc/kolab-webclient/mimp1      /usr/share/horde3/mimp/config
-        ln -sTfv /etc/kolab-webclient/mnemo2     /usr/share/horde3/mnemo/config
-        ln -sTfv /etc/kolab-webclient/nag2       /usr/share/horde3/nag/config
-        ln -sTfv /etc/kolab-webclient/passwd3    /usr/share/horde3/passwd/config
-        ln -sTfv /etc/kolab-webclient/turba2     /usr/share/horde3/turba/config
+        register_horde_config
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
@@ -89,9 +70,7 @@
     ;;
 esac
 
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
 #DEBHELPER#
 
 exit 0
+

Modified: kolab-webclient/trunk/debian/kolab-webclient.prerm
===================================================================
--- kolab-webclient/trunk/debian/kolab-webclient.prerm	2009-12-10 19:17:56 UTC (rev 1466)
+++ kolab-webclient/trunk/debian/kolab-webclient.prerm	2010-01-04 10:58:03 UTC (rev 1467)
@@ -5,49 +5,23 @@
 
 set -e
 
-horde_config=/etc/horde
-
-rm_horde_diversion() {
-    [ -L "$horde_config/$1" ] && rm "$horde_config/$1"
-    dpkg-divert --remove --package kolab-webclient --rename \
-        --divert "$horde_config/$1.pre-kolab-webclient" "$horde_config/$1"
+unregister_horde_config() {
+        #Horde configs
+        update-alternatives --remove horde3-config     /etc/kolab-webclient/horde3
+        update-alternatives --remove dimp1-config      /etc/kolab-webclient/dimp1
+        update-alternatives --remove imp4-config       /etc/kolab-webclient/imp4
+        update-alternatives --remove ingo1-config      /etc/kolab-webclient/ingo1
+        update-alternatives --remove kronolith2-config /etc/kolab-webclient/kronolith2
+        #update-alternatives --remove mimp1-config      /etc/kolab-webclient/mimp1 10
+        update-alternatives --remove mnemo2-config     /etc/kolab-webclient/mnemo2
+        update-alternatives --remove nag2-config       /etc/kolab-webclient/nag2
+        update-alternatives --remove sork-passwd-h3-config /etc/kolab-webclient/passwd3
+        update-alternatives --remove turba2-config     /etc/kolab-webclient/turba2
 }
 
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
 case "$1" in
     remove)
-        #rm_horde_diversion dimp1/conf.php
-        #rm_horde_diversion horde3/conf.php
-        #rm_horde_diversion imp4/conf.php
-        #rm_horde_diversion ingo1/conf.php
-        #rm_horde_diversion kronolith2/conf.php
-        #rm_horde_diversion mnemo2/conf.php
-        #rm_horde_diversion nag2/conf.php
-        #rm_horde_diversion passwd3/conf.php
-        #rm_horde_diversion turba2/conf.php
-        
-        #reverting back to horde's symlinks
-        ln -sTfv /etc/horde/horde3     /usr/share/horde3/config
-        ln -sTfv /etc/horde/dimp1      /usr/share/horde3/dimp/config
-        ln -sTfv /etc/horde/imp4       /usr/share/horde3/imp/config
-        ln -sTfv /etc/horde/ingo1      /usr/share/horde3/ingo/config
-        ln -sTfv /etc/horde/kronolith2 /usr/share/horde3/kronolith/config
-        #ln -sTfv /etc/horde/mimp1      /usr/share/horde3/mimp/config
-        ln -sTfv /etc/horde/mnemo2     /usr/share/horde3/mnemo/config
-        ln -sTfv /etc/horde/nag2       /usr/share/horde3/nag/config
-        ln -sTfv /etc/horde/passwd3    /usr/share/horde3/passwd/config
-        ln -sTfv /etc/horde/turba2     /usr/share/horde3/turba/config
+        unregister_horde_config
     ;;
 
     upgrade|deconfigure)
@@ -62,9 +36,6 @@
     ;;
 esac
 
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
 #DEBHELPER#
 
 exit 0




More information about the pkg-kolab-devel mailing list