[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1038041: bookworm-pu: package unixodbc/2.3.11-2+deb12u1



Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: unixodbc@packages.debian.org
Control: affects -1 + src:unixodbc

I'd like to fix two bugs in the stable version of unixodbc (2.3.11-2).

[ Reason ]
(1) Users who upgrade their system from old versions of Debian (e.g. Lenny,
Squeeze, Wheezy etc.) with odbcinst1debian1 installed are unable to upgrade to
bookworm due to a missing Breaks+Replaces against two binary packages.

Although odbcinst1debian1 hasn't existed for years, dpkg complains because
/etc/odbc.ini is also in unixodbc-common, and /usr/bin/odbcinst is also in
odbcinst.

(2) Due to an oversight on my part, the stable version of unixodbc-common has
an obsolete conffile.

[ Impact ]
(1) Users with odbcinst1debian1 installed cannot upgrade to bookworm without
removing the binary package (which really shouldn't be installed anyway). Note
that the number of uses actually affected by this bug will be very small.

(2) No impact.

[ Tests ]
(1) Testing of staged upgrades with piuparts.

(2) Manual testing of package upgrades and purging with rm_conffile in relevant
maintscripts.

[ Risks ]
The changes are minimal and well tested.

[ Checklist ]
  [ x ] *all* changes are documented in the d/changelog
  [ x ] I reviewed all changes and I approve them
  [ x ] attach debdiff against the package in stable
  [ x ] the issue is verified as fixed in unstable
diff -Nru unixodbc-2.3.11/debian/changelog unixodbc-2.3.11/debian/changelog
--- unixodbc-2.3.11/debian/changelog	2022-05-23 21:14:45.000000000 +1000
+++ unixodbc-2.3.11/debian/changelog	2023-06-15 21:05:33.000000000 +1000
@@ -1,3 +1,11 @@
+unixodbc (2.3.11-2+deb12u1) bookworm; urgency=medium
+
+  * unixodbc-common, odbcinst: Add Breaks+Replaces against odbcinst1debian1
+      (Closes: #1037172).
+  * unixodbc-common: Remove obsolete conffile (Closes: #1009152).
+
+ -- Hugh McMaster <hugh.mcmaster@outlook.com>  Thu, 15 Jun 2023 21:05:33 +1000
+
 unixodbc (2.3.11-2) unstable; urgency=medium
 
   * debian/control: Update Standards-Version to 4.6.1 (no changes needed).
diff -Nru unixodbc-2.3.11/debian/control unixodbc-2.3.11/debian/control
--- unixodbc-2.3.11/debian/control	2022-05-23 21:14:45.000000000 +1000
+++ unixodbc-2.3.11/debian/control	2023-06-15 19:50:03.000000000 +1000
@@ -88,6 +88,8 @@
 Multi-Arch: foreign
 Section: utils
 Depends: unixodbc-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
+Replaces: odbcinst1debian1
+Breaks: odbcinst1debian1
 Description: Helper program for accessing ODBC configuration files
  UnixODBC is an implementation of the Open Database Connectivity standard,
  a database abstraction layer that allows applications to be used with
@@ -122,8 +124,8 @@
 Architecture: all
 Multi-Arch: foreign
 Depends: ${misc:Depends}
-Replaces: odbcinst (<< 2.3.9-1~), odbcinst1debian2 (<< 2.3.9-1~)
-Breaks: odbcinst (<< 2.3.9-1~), odbcinst1debian2 (<< 2.3.9-1~)
+Replaces: odbcinst (<< 2.3.9-1~), odbcinst1debian1, odbcinst1debian2 (<< 2.3.9-1~)
+Breaks: odbcinst (<< 2.3.9-1~), odbcinst1debian1, odbcinst1debian2 (<< 2.3.9-1~)
 Description: Common ODBC configuration files
  UnixODBC is an implementation of the Open Database Connectivity standard,
  a database abstraction layer that allows applications to be used with
diff -Nru unixodbc-2.3.11/debian/unixodbc-common.postinst unixodbc-2.3.11/debian/unixodbc-common.postinst
--- unixodbc-2.3.11/debian/unixodbc-common.postinst	2022-05-23 21:06:12.000000000 +1000
+++ unixodbc-2.3.11/debian/unixodbc-common.postinst	2023-06-15 20:00:39.000000000 +1000
@@ -6,4 +6,11 @@
     touch /etc/odbcinst.ini
 fi
 
+dpkg-maintscript-helper rm_conffile \
+    /etc/odbcinst.ini 2.3.11-2+deb12u1~ unixodbc-common -- "$@"
+
+if [ "$1" = "configure" -o "$1" = "abort-upgrade" ] && [ -n "$2" ]; then
+    cp -a /tmp/odbcinst.ini.bak /etc/odbcinst.ini
+fi
+
 #DEBHELPER#
diff -Nru unixodbc-2.3.11/debian/unixodbc-common.postrm unixodbc-2.3.11/debian/unixodbc-common.postrm
--- unixodbc-2.3.11/debian/unixodbc-common.postrm	2022-05-23 21:06:12.000000000 +1000
+++ unixodbc-2.3.11/debian/unixodbc-common.postrm	2023-06-15 20:00:34.000000000 +1000
@@ -6,4 +6,7 @@
     rm -f /etc/odbcinst.ini
 fi
 
+dpkg-maintscript-helper rm_conffile \
+    /etc/odbcinst.ini 2.3.11-2+deb12u1~ unixodbc-common -- "$@"
+
 #DEBHELPER#
diff -Nru unixodbc-2.3.11/debian/unixodbc-common.preinst unixodbc-2.3.11/debian/unixodbc-common.preinst
--- unixodbc-2.3.11/debian/unixodbc-common.preinst	1970-01-01 10:00:00.000000000 +1000
+++ unixodbc-2.3.11/debian/unixodbc-common.preinst	2023-06-15 20:00:30.000000000 +1000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "upgrade" ] && [ -e /etc/odbcinst.ini ]; then
+    cp -a /etc/odbcinst.ini /tmp/odbcinst.ini.bak
+fi
+
+dpkg-maintscript-helper rm_conffile \
+    /etc/odbcinst.ini 2.3.11-2+deb12u1~ unixodbc-common -- "$@"
+
+#DEBHELPER#

Reply to: