[apache2] 01/01: handle doc dir/symlink transitions

Stefan Fritsch sf at moszumanska.debian.org
Sat Nov 8 10:55:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit 6e3483621b4411100977b7ed052a603f1e2093a8
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sat Nov 8 11:49:16 2014 +0100

    handle doc dir/symlink transitions
---
 debian/apache2-suexec.maintscript            |  1 +
 debian/apache2.2-bin.maintscript             |  1 +
 debian/apache2.maintscript                   |  1 +
 debian/changelog                             |  8 +++++
 debian/control                               |  5 +++
 debian/libapache2-mod-macro.maintscript      |  1 +
 debian/libapache2-mod-macro.postinst         | 49 ----------------------------
 debian/libapache2-mod-proxy-html.maintscript |  1 +
 debian/libapache2-mod-proxy-html.postinst    | 49 ----------------------------
 9 files changed, 18 insertions(+), 98 deletions(-)

diff --git a/debian/apache2-suexec.maintscript b/debian/apache2-suexec.maintscript
new file mode 100644
index 0000000..b071ff6
--- /dev/null
+++ b/debian/apache2-suexec.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/apache2-suexec apache2-suexec-pristine 2.4.1-1~
diff --git a/debian/apache2.2-bin.maintscript b/debian/apache2.2-bin.maintscript
new file mode 100644
index 0000000..665f9d3
--- /dev/null
+++ b/debian/apache2.2-bin.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/apache2.2-bin apache2-bin 2.4.4-1~
diff --git a/debian/apache2.maintscript b/debian/apache2.maintscript
new file mode 100644
index 0000000..c69c1f3
--- /dev/null
+++ b/debian/apache2.maintscript
@@ -0,0 +1 @@
+symlink_to_dir /usr/share/doc/apache2 apache2.2-common 2.4.1-1~
diff --git a/debian/changelog b/debian/changelog
index d46eba9..33df649 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apache2 (2.4.10-7) UNRELEASED; urgency=medium
+
+  * Handle transitions of doc dirs and symlinks correctly during upgrade.
+    Use dpkg-maintscript-helper for this and remove existing explicit logic.
+    Closes: #767850
+
+ -- Stefan Fritsch <sf at debian.org>  Sat, 08 Nov 2014 11:46:31 +0100
+
 apache2 (2.4.10-6) unstable; urgency=medium
 
   * Disable SSLv3 in default config. Closes: #765347
diff --git a/debian/control b/debian/control
index 0565513..670dee8 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Homepage: http://httpd.apache.org/
 
 Package: apache2
 Architecture: any
+Pre-Depends: dpkg (>= 1.17.5)
 Depends: ${misc:Depends}, lsb-base, procps [!hurd-i386],
  perl, mime-support, apache2-bin (= ${binary:Version}),
  apache2-utils (>= 2.4), apache2-data (= ${source:Version}),
@@ -111,6 +112,7 @@ Architecture: any
 Section: oldlibs
 Priority: extra
 Breaks: gnome-user-share (<< 3.8.0-2~), libapache2-mod-dnssd (<< 0.6-3.1~)
+Pre-Depends: dpkg (>= 1.17.5)
 Depends: ${misc:Depends}, apache2-bin (>= 2.3~)
 Description: Transitional package for apache2-bin
  This is a transitional package for apache2-bin, and can be safely removed
@@ -218,6 +220,7 @@ Package: libapache2-mod-proxy-html
 Architecture: any
 Section: oldlibs
 Priority: extra
+Pre-Depends: dpkg (>= 1.17.5)
 Depends: ${misc:Depends}, apache2-bin (>= 2.3~)
 Description: Transitional package for apache2-bin
  This is a transitional package for apache2-bin, and can be safely removed
@@ -227,6 +230,7 @@ Package: libapache2-mod-macro
 Architecture: any
 Section: oldlibs
 Priority: extra
+Pre-Depends: dpkg (>= 1.17.5)
 Depends: ${misc:Depends}, apache2-bin (>= 2.3~)
 Description: Transitional package for apache2-bin
  This is a transitional package for apache2-bin, and can be safely removed
@@ -256,6 +260,7 @@ Package: apache2-suexec
 Architecture: any
 Section: oldlibs
 Priority: extra
+Pre-Depends: dpkg (>= 1.17.5)
 Depends: ${misc:Depends},
  apache2-suexec-pristine (= ${binary:Version})
 Description: transitional package for apache2-suexec-pristine
diff --git a/debian/libapache2-mod-macro.maintscript b/debian/libapache2-mod-macro.maintscript
new file mode 100644
index 0000000..4caa0d4
--- /dev/null
+++ b/debian/libapache2-mod-macro.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/libapache2-mod-macro apache2-bin 1:2.4.6-1~
diff --git a/debian/libapache2-mod-macro.postinst b/debian/libapache2-mod-macro.postinst
deleted file mode 100644
index 0ed55d7..0000000
--- a/debian/libapache2-mod-macro.postinst
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/bash
-# postinst script for libapache2-mod-macro
-#
-# see: dh_installdeb(1)
-
-set -e
-
-
-# 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>
-#       * <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
-
-case "$1" in
-    configure)
-        if [ -n "$2" ] && dpkg --compare-versions "$2" lt "1:2.4.6-1" ; then
-                if [ -d /usr/share/doc/libapache2-mod-macro ] ; then
-                        RET=0
-                        rmdir /usr/share/doc/libapache2-mod-macro > /dev/null 2>&1|| RET=$?
-                        if [ $RET = 0 ] ; then
-                                ln -s /usr/share/doc/apache2-bin /usr/share/doc/libapache2-mod-macro
-                        fi
-                fi
-        fi
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/libapache2-mod-proxy-html.maintscript b/debian/libapache2-mod-proxy-html.maintscript
new file mode 100644
index 0000000..cb28c1d
--- /dev/null
+++ b/debian/libapache2-mod-proxy-html.maintscript
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/libapache2-mod-proxy-html apache2-bin 1:2.4.4-3~
diff --git a/debian/libapache2-mod-proxy-html.postinst b/debian/libapache2-mod-proxy-html.postinst
deleted file mode 100644
index 14e5a02..0000000
--- a/debian/libapache2-mod-proxy-html.postinst
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/bash
-# postinst script for libapache2-mod-proxy-html
-#
-# see: dh_installdeb(1)
-
-set -e
-
-
-# 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>
-#       * <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
-
-case "$1" in
-    configure)
-        if [ -n "$2" ] && dpkg --compare-versions "$2" lt "1:2.4.4-2" ; then
-                if [ -d /usr/share/doc/libapache2-mod-proxy-html ] ; then
-                        RET=0
-                        rmdir /usr/share/doc/libapache2-mod-proxy-html > /dev/null 2>&1|| RET=$?
-                        if [ $RET = 0 ] ; then
-                                ln -s /usr/share/doc/apache2-bin /usr/share/doc/libapache2-mod-proxy-html
-                        fi
-                fi
-        fi
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list