Disable the shib module name on upgrade
authorRuss Allbery <rra@debian.org>
Wed, 15 Oct 2008 03:48:32 +0000 (20:48 -0700)
committerRuss Allbery <rra@debian.org>
Wed, 15 Oct 2008 05:22:16 +0000 (22:22 -0700)
* Add a postinst to disable the old configuration on upgrade and enable
  the module if it had been enabled under the old configuration name.

debian/changelog
debian/libapache2-mod-shib2.postinst [new file with mode: 0755]

index 8ef4de8..a990718 100644 (file)
@@ -14,8 +14,6 @@ shibboleth-sp2 (2.1.dfsg1-1) UNRELEASED; urgency=low
   [ Ferenc Wagner ]
   * Follow the libshibsp1->2 package rename in the dh_makeshlibs invocation.
   * Remove the Shibboleth minor version number from README.Debian.
-  * Add directory /var/log/shibboleth to libapache2-mod-shib2 (thanks to Peter
-    Schober for noticing)
   * Comment out the reference to WS-Trust.xsd from the catalog.xml file in
     shibboleth-sp2-schemas and document how to enable it again.
 
@@ -23,11 +21,18 @@ shibboleth-sp2 (2.1.dfsg1-1) UNRELEASED; urgency=low
 
 shibboleth-sp2 (2.0.dfsg1-4) UNRELEASED; urgency=low
 
+  [ Ferenc Wagner ]
   * Rename debian/shib.load to debian/shib2.load to avoid clashing with the
     libapache2-mod-shib package.  Otherwise its Apache config file breaks our
     module.
+  * Add directory /var/log/shibboleth to libapache2-mod-shib2 (thanks to Peter
+    Schober for noticing)
+
+  [ Russ Allbery ]
+  * Add a postinst to disable the old configuration on upgrade and enable
+    the module if it had been enabled under the old configuration name.
 
- -- Ferenc Wagner <wferi@niif.hu>  Thu, 09 Oct 2008 19:05:09 +0200
+ -- Ferenc Wagner <wferi@niif.hu>  Tue, 14 Oct 2008 17:45:22 +0200
 
 shibboleth-sp2 (2.0.dfsg1-3) unstable; urgency=low
 
diff --git a/debian/libapache2-mod-shib2.postinst b/debian/libapache2-mod-shib2.postinst
new file mode 100755 (executable)
index 0000000..b217189
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+# Prior to 2.0.dfsg1-4, we named our Apache configuration files shib instead
+# of shib2.  We therefore need to unlink the old configuration files, and if
+# they were linked in, we should link in the new ones.
+if [ "$1" = "configure" ] ; then
+    if dpkg --compare-versions "$2" lt-nl 2.0.dfsg1-4 ; then
+        if [ -f /etc/apache2/mods-enabled/shib.load ] ; then
+            a2enmod shib2
+        fi
+        a2dismod shib || true
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0