Control: tag -1 +patch

Hi,

Attached an NMU patch against 2.5.2~svn+54698.ds4-2 (which is now both in
testing and sid).

I wasn't able to reproduce the upgrade issue so I won't NMU unless someone
that can do so verifies the fix. Damyan, you're of course welcome to take over
if you find the time.

-- 
Every great idea is worthless without someone to do the work. --Neil Williams
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/changelog sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/changelog
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/changelog	2013-03-18 16:23:51.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/changelog	2013-03-21 18:46:06.000000000 +0100
@@ -1,3 +1,19 @@
+firebird2.5 (2.5.2~svn+54698.ds4-2.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Apply fixes from Debian git repo:
+    + [4b23b851] Damyan Ivanov <d...@debian.org>:
+       *.postinst: prevent leaving empty directories from pre-common-doc times
+    + [1723e16d]: Damyan Ivanov <d...@debian.org>:
+       import functions.sh before using migrateDocSymlink
+       also include the usual boilerplate
+    + [78abe27e] Slávek Banko <slavek.ba...@axis.cz>:
+       add dependency -common on packages that use common functions.sh
+  * In migrateDocSymlink(), remove multi-arch string from pkg name, if any
+  * All the above close #692948 (high urgency due to RC severity)
+
+ -- Serafeim Zanikolas <s...@debian.org>  Thu, 21 Mar 2013 17:32:04 +0100
+
 firebird2.5 (2.5.2~svn+54698.ds4-2) unstable; urgency=high
 
   * High urgency for upload fixing security issues
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/control sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/control
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/control	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/control	2013-03-21 18:05:59.000000000 +0100
@@ -175,6 +175,7 @@ Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Description: Firebird UDF support library
  Firebird is a relational database offering many ANSI SQL-99 features that
@@ -210,6 +211,7 @@ Description: common files for firebird 2
 Package: firebird2.5-server-common
 Architecture: any
 Depends: adduser, ${misc:Depends}, ${shlibs:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Conflicts: firebird2.1-server-common,
  firebird2.0-server-common
@@ -231,6 +233,7 @@ Conflicts: firebird-udf, firebird-utils,
  firebird2.1-classic, firebird2.1-super,
  firebird2.0-super, firebird2.0-classic
 Depends: ${misc:Depends}, ${shlibs:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Description: common files for firebird 2.5 "classic" and "superclassic"
  This package contains the command line utilities and UDFs (user-defined
@@ -249,6 +252,7 @@ Replaces: firebird2.0-dev, firebird2.1-d
 Provides: firebird2.1-dev, firebird2.5-dev
 Depends: libfbclient2 (= ${binary:Version}), libib-util,
  ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Suggests: libfbembed2.5, firebird2.5-examples
 Description: Development files for Firebird - an RDBMS based on InterBase 6.0 code
@@ -261,6 +265,7 @@ Package: firebird2.5-examples
 Section: doc
 Architecture: all
 Depends: ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Recommends: firebird-dev
 Description: Examples for Firebird - an RDBMS based on InterBase 6.0 code
@@ -275,6 +280,7 @@ Package: firebird2.5-doc
 Section: doc
 Architecture: all
 Depends: ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version})
 Description: Documentation files for firebird database version 2.5
  Various documents for firebird 2.5. These include the list of enhancements
@@ -307,6 +313,7 @@ Section: debug
 Priority: extra
 Architecture: any
 Depends: ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version}),
  firebird2.5-super (= ${binary:Version}),
  libfbclient2-dbg
@@ -325,6 +332,7 @@ Architecture: any
 Depends: ${misc:Depends},
  firebird2.5-classic (= ${binary:Version}) | firebird2.5-superclassic (= ${binary:Version}),
  firebird2.5-classic-common (= ${binary:Version}),
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version}),
  libfbembed2.5 (= ${binary:Version})
 Provides: firebird-dbg
@@ -340,6 +348,7 @@ Section: debug
 Priority: extra
 Architecture: any
 Depends: ${misc:Depends},
+ firebird2.5-common (= ${source:Version}),
  firebird2.5-common-doc (= ${source:Version}),
  libfbclient2 (= ${binary:Version})
 Breaks: firebird2.5-super-dbg (<< 2.5.1.26349-0~rc1.ds4-2~)
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-common.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-common.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-common.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-common.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-dbg.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-dbg.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-dbg.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic-dbg.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic.postinst	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-classic.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -43,6 +43,8 @@ debhelper_hook()
 
 case "$1" in
     configure)
+        migrateDocSymlink
+
         if [ -z "${2:-}" ]; then
             # first install. set DB dirs permissions
             fixPermsFirstInstall
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-common.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-common.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-common.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-common.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-doc.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-doc.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-doc.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-doc.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-examples.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-examples.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-examples.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-examples.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-server-common.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-server-common.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-server-common.postinst	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-server-common.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -7,6 +7,11 @@ fi
 
 set -e
 set -u
+
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -47,6 +52,8 @@ debhelper_hook()
 
 case "$1" in
     configure)
+        migrateDocSymlink
+
         checkFirebirdAccount
     ;;
 esac
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-superclassic.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-superclassic.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-superclassic.postinst	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-superclassic.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -43,6 +43,8 @@ debhelper_hook()
 
 case "$1" in
     configure)
+        migrateDocSymlink
+
         if [ -z "${2:-}" ]; then
             # first install. set DB dirs permissions
             fixPermsFirstInstall
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super-dbg.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super-dbg.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super-dbg.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super-dbg.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=super
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super.postinst	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird2.5-super.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -43,6 +43,8 @@ debhelper_hook()
 
 case "$1" in
     configure)
+        migrateDocSymlink
+
         if [ -z "${2:-}" ]; then
             # first install. set DB dirs permissions
             fixPermsFirstInstall
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird-dev.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird-dev.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird-dev.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/firebird-dev.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/functions.sh sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/functions.sh
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/functions.sh	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/functions.sh	2013-03-21 18:05:59.000000000 +0100
@@ -62,6 +62,25 @@ fixPermsConfigure()
 
 }
 
+migrateDocSymlink() {
+    local PKG=`basename "$0" | sed 's/:.*$//'`
+    PKG=${PKG%.postinst}
+    local TARGET="firebird${FB_VER}-common-doc"
+
+    local D="/usr/share/doc/$PKG"
+    if [ ! -L "$D" -a -d "$D" ]; then
+        echo "Found legacy directory $D which needs to be replaced by a symlink to $TARGET"
+        if rmdir "$D" >/dev/null 2>&1 ; then
+            echo "Directory is empty, replacing with a symlink"
+            ln -s "$TARGET" "$D"
+        else
+            echo "Directory not empty, moving away with .bak extension"
+            mv --backup=existing "$D" "$D.bak"
+            ln -s "$TARGET" "$D"
+        fi
+    fi
+}
+
 #---------------------------------------------------------------------------
 # set new SYSDBA password with gsec
 
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2-dbg.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2-dbg.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2-dbg.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2-dbg.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbclient2.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbembed2.5.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbembed2.5.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbembed2.5.postinst	1970-01-01 01:00:00.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libfbembed2.5.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
+
+case "$1" in
+    configure)
+        migrateDocSymlink
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nurp sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libib-util.postinst sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libib-util.postinst
--- sid/firebird2.5-2.5.2~svn+54698.ds4/debian/libib-util.postinst	2013-03-18 15:24:11.000000000 +0100
+++ sid-patched/firebird2.5-2.5.2~svn+54698.ds4/debian/libib-util.postinst	2013-03-21 18:05:59.000000000 +0100
@@ -2,6 +2,14 @@
 # postinst script for libib-util
 
 set -e
+set -u
+
+if [ -n "${DEBIAN_FIREBIRD_DEBUG:-}" ]; then
+    set -x
+fi
+FB_VER=2.5
+FB_FLAVOUR=classic
+. /usr/share/firebird${FB_VER}-common/functions.sh
 
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
@@ -18,6 +26,8 @@ set -e
 
 case "$1" in
     configure)
+        migrateDocSymlink
+
         ldconfig
     ;;
 

Reply via email to