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

Re: Bug#577209: nmu: Please schedule binNMUs against libdbi-perl



reopen 577209
reassign 577209 libdbi-perl 1.610.90-1
retitle 577209 libdbi-perl: DBI<>DBD ABI change breaks partial upgrades
severity 577209 serious
thanks

The sid breakage should be gone with the binNMUs, but I think the partial
upgrade issue is RC, so reopening and reassigning.

On Sun, Apr 11, 2010 at 01:03:29AM +0200, gregor herrmann wrote:
> On Sun, 11 Apr 2010 00:30:50 +0200, gregor herrmann wrote:
> 
> > > I suppose just adding libdbi-perl Breaks: entries for the current versions
> > > of libdbd-*-perl would be enough.
> > Ok, I'll do this.

Unfortunately it's not enough: the other direction may break too.

 ii  libdbd-pg-perl       2.17.1-1+b1          Perl DBI driver for the PostgreSQL database server
 ii  libdbi-perl          1.609-1              Perl Database Interface (DBI)
 
 % perl -MDBI -e 'DBI->connect("dbi:Pg:foo")'
 install_driver(Pg) failed: DBI/DBD internal version mismatch (DBI is v94/s208, DBD Pg.xsi expected v95/s208) you probably need to rebuild the DBD driver (or possibly the DBI).
 Compilation failed in require at (eval 3) line 3.

This also means that if any of the binNMUs migrate to testing before
libdbi-perl 1.610.90-2 they will be broken there.
 
So AFAICS we need (at a minimum) both
 - Breaks: entries in libdbi-perl and
 - sourceful uploads of all the libdbd-*-perl packages with bumped build
   and runtime dependencies as was already done for libdbd-mysql-perl

> +Breaks: libdbd-mysql-perl (<< 4.013-2), libdbd-odbc-perl (<< 1.23-1+),
> + libdbd-pg-perl (<< 2.17.1-1+), libdbd-sqlite2-perl (<< 2:0.33-8+),
> + libdbd-sqlite3-perl (<< 1.29-1+), libdbd-sybase-perl (<< 1.00-3+b2),
> + libdbd-oracle-perl (<< 1.21-2+)

Please note that libdbd-sybase-perl has different binNMU versions on
different architectures (and that << +b2 isn't actually correct for any
of them if I read http://packages.debian.org/libdbd-sybase-perl correctly.)

Using the binNMU suffixes here seems rather fragile to me.  I think it's
going to break for derivative distributions as their binNMUs aren't in
sync with ours.

Also, stable updates could be a problem at least for libdbd-sybase-perl
and libdbd-oracle-perl which have the same source version in all the
suites. If the lenny version gets a security fix and increments the
source version, the Breaks in squeeze no longer affects it and it breaks
on partial lenny->squeeze upgrades.

As we seem to need sourceful uploads for all the affected packages after
all, I think libdbi-perl should just Break: all the earlier versions.
Determining the correct numbers can only be done afterwards, so it
may make sense to postpone this step.

At this point, I think that implementing the perl-dbdabi-xxx scheme
has very little extra cost. Again, the benefit is that another version
change in the future (however improbable) can be handled with simple
binNMUs with no need for new Breaks entries or anything like that.

Proof of concept attached as patches against libdbi-perl and
libdbd-pg-perl. Eyeballs and comments would be welcome.
-- 
Niko Tyni   ntyni@debian.org
diff -Nru libdbi-perl-1.610.90/debian/changelog libdbi-perl-1.610.90/debian/changelog
--- libdbi-perl-1.610.90/debian/changelog	2010-04-09 00:43:47.000000000 +0300
+++ libdbi-perl-1.610.90/debian/changelog	2010-04-11 22:36:01.000000000 +0300
@@ -1,3 +1,17 @@
+libdbi-perl (1.610.90-2) UNRELEASED; urgency=low
+
+  * Address breakage in the DBD<>DBI binary interface on partial upgrades
+    (see #577209):
+    + Provides: perl-dbdabi-95 so that libdbd-*-perl plugins can depend on that
+    + the recommended way binNMU safe way to generate the perl-dbdabi-*
+      dependency is to include /usr/share/libdbi-perl/perl-dbdabi.make
+      in debian/rules and use PERL_DBDABI_DEPENDS 
+    + Breaks: entries against older libdbd-*-perl versions still need
+      to be added later once all of them have switched to the
+      perl-dbdabi-* scheme.
+
+ -- Niko Tyni <ntyni@debian.org>  Sun, 11 Apr 2010 09:38:45 +0300
+
 libdbi-perl (1.610.90-1) unstable; urgency=low
 
   [ Ryan Niebur ]
diff -Nru libdbi-perl-1.610.90/debian/clean libdbi-perl-1.610.90/debian/clean
--- libdbi-perl-1.610.90/debian/clean	1970-01-01 02:00:00.000000000 +0200
+++ libdbi-perl-1.610.90/debian/clean	2010-04-11 21:55:19.000000000 +0300
@@ -0,0 +1 @@
+debian/perl-dbdabi.make
diff -Nru libdbi-perl-1.610.90/debian/control libdbi-perl-1.610.90/debian/control
--- libdbi-perl-1.610.90/debian/control	2010-04-09 00:18:00.000000000 +0300
+++ libdbi-perl-1.610.90/debian/control	2010-04-11 22:10:46.000000000 +0300
@@ -6,7 +6,7 @@
  Damyan Ivanov <dmn@debian.org>, Niko Tyni <ntyni@debian.org>,
  gregor herrmann <gregoa@debian.org>, Ryan Niebur <ryan@debian.org>,
  Jonathan Yu <jawnsy@cpan.org>
-Build-Depends: perl, debhelper (>= 7),
+Build-Depends: perl, debhelper (>= 7.0.50~),
  libplrpc-perl, libtest-pod-perl, libtest-pod-coverage-perl,
  perl (>= 5.10.1) | libtest-simple-perl (>= 0.84)
 Standards-Version: 3.8.4
@@ -17,6 +17,7 @@
 Package: libdbi-perl
 Architecture: any
 Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, libplrpc-perl
+Provides: perl-dbdabi-${perl-dbdabi-version}
 Description: Perl Database Interface (DBI)
  DBI (DataBase Interface) is a Perl framework that provides a common interface
  to access various backend databases in a uniform manner. DBD (DataBase Driver)
diff -Nru libdbi-perl-1.610.90/debian/get-dbdabi-version.cpp libdbi-perl-1.610.90/debian/get-dbdabi-version.cpp
--- libdbi-perl-1.610.90/debian/get-dbdabi-version.cpp	1970-01-01 02:00:00.000000000 +0200
+++ libdbi-perl-1.610.90/debian/get-dbdabi-version.cpp	2010-04-11 22:27:22.000000000 +0300
@@ -0,0 +1,7 @@
+// this script gets piped through cpp to sh
+// cpp reads DBIXS.h and substitutes DBISTATE_VERSION, sh echoes it out
+cat >/dev/null <<END-OF-DBI
+#include "../DBIXS.h"
+END-OF-DBI
+
+echo DBISTATE_VERSION
diff -Nru libdbi-perl-1.610.90/debian/libdbi-perl.install libdbi-perl-1.610.90/debian/libdbi-perl.install
--- libdbi-perl-1.610.90/debian/libdbi-perl.install	1970-01-01 02:00:00.000000000 +0200
+++ libdbi-perl-1.610.90/debian/libdbi-perl.install	2010-04-11 21:55:26.000000000 +0300
@@ -0,0 +1 @@
+debian/perl-dbdabi.make /usr/share/libdbi-perl
diff -Nru libdbi-perl-1.610.90/debian/rules libdbi-perl-1.610.90/debian/rules
--- libdbi-perl-1.610.90/debian/rules	2010-04-09 00:17:47.000000000 +0300
+++ libdbi-perl-1.610.90/debian/rules	2010-04-11 21:54:28.000000000 +0300
@@ -1,4 +1,14 @@
 #!/usr/bin/make -f
 
+DBDABI_VERSION = $(shell cpp `perl -MExtUtils::Embed -e ccopts` debian/get-dbdabi-version.cpp | sh)
+
 %:
 	dh $@
+
+override_dh_auto_build:
+	dh_auto_build
+	echo PERL_DBDABI_DEPENDS=perl-dbdabi-$(DBDABI_VERSION) > debian/perl-dbdabi.make
+
+override_dh_gencontrol:
+	dh_gencontrol -- -Vperl-dbdabi-version=$(DBDABI_VERSION)
+
diff -Nru libdbd-pg-perl-2.17.1/debian/changelog libdbd-pg-perl-2.17.1/debian/changelog
--- libdbd-pg-perl-2.17.1/debian/changelog	2010-04-08 22:28:06.000000000 +0300
+++ libdbd-pg-perl-2.17.1/debian/changelog	2010-04-11 22:33:04.000000000 +0300
@@ -1,3 +1,11 @@
+libdbd-pg-perl (2.17.1-2) UNRELEASED; urgency=low
+
+  * New dependency on perl-dbdabi-* to handle future DBD<>DBI
+    version changes in a binNMU safe way. (See #577209)
+    + needs a build-dependency on libdbi-perl (>= 1.610.90-2).
+
+ -- Niko Tyni <ntyni@debian.org>  Sun, 11 Apr 2010 19:48:48 +0300
+
 libdbd-pg-perl (2.17.1-1) unstable; urgency=low
 
   [ Jonathan Yu ]
diff -Nru libdbd-pg-perl-2.17.1/debian/control libdbd-pg-perl-2.17.1/debian/control
--- libdbd-pg-perl-2.17.1/debian/control	2010-04-08 22:37:45.000000000 +0300
+++ libdbd-pg-perl-2.17.1/debian/control	2010-04-11 19:46:42.000000000 +0300
@@ -2,8 +2,8 @@
 Section: perl
 Priority: optional
 Build-Depends: perl, debhelper (>= 7.0.50), libtest-yaml-meta-perl,
- perl (>= 5.10) | libversion-perl, libtest-pod-coverage-perl, libdbi-perl,
- libpq-dev (>= 8.0), libtest-pod-perl
+ perl (>= 5.10) | libversion-perl, libtest-pod-coverage-perl,
+ libdbi-perl (>= 1.610.90-2), libpq-dev (>= 8.0), libtest-pod-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
 Uploaders: Ivan Kohler <ivan-debian@420.am>, Gunnar Wolf <gwolf@debian.org>,
  Damyan Ivanov <dmn@debian.org>, Krzysztof Krzyżaniak (eloy) <eloy@debian.org>,
@@ -18,7 +18,7 @@
 Package: libdbd-pg-perl
 Architecture: any
 Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends},
- libdbi-perl, perl (>= 5.10) | libversion-perl
+ libdbi-perl, ${dbdabi:Depends}, perl (>= 5.10) | libversion-perl
 Description: Perl DBI driver for the PostgreSQL database server
  DBD::Pg is a Perl DBI Database Driver module that works with the DBI module to
  provide access to PostgreSQL databases. It enables you to control a PostgreSQL
diff -Nru libdbd-pg-perl-2.17.1/debian/rules libdbd-pg-perl-2.17.1/debian/rules
--- libdbd-pg-perl-2.17.1/debian/rules	2009-08-04 21:46:33.000000000 +0300
+++ libdbd-pg-perl-2.17.1/debian/rules	2010-04-11 22:30:45.000000000 +0300
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+# for PERL_DBDABI_DEPENDS
+include /usr/share/libdbi-perl/perl-dbdabi.make
+
 PG_INCLUDEDIR = $(shell pg_config --includedir)
 PG_LIBDIR = $(shell pg_config --libdir)
 
@@ -11,3 +14,6 @@
 
 override_dh_auto_test:
 	TEST_AUTHOR=1 dh_auto_test
+
+override_dh_gencontrol:
+	dh_gencontrol -- -Vdbdabi:Depends=$(PERL_DBDABI_DEPENDS)

Reply to: