Control: tags -1 + patch

On 2018-03-07 18:54 +0100, Sven Joachim wrote:

> Package: libcdk5
> Version: 5.0.20161210-5
>
> There is a new ncurses version in experimental which changes the soname
> of the libraries from 5 to 6.  One notable change between libncurses5
> and libncurses6 is that the "chtype" data type has changed from unsigned
> long to unsigned int.  This affects the cdk library, which makes use of
> chtype all over the place.
>
> If libcdk5 has been rebuilt against libncurses6 but the application
> using it has not, or vice versa, they disagree about what "chtype" is,
> and bad things can happen on 64-bit architectures, where
> sizeof(long) != sizeof(int).
>
> For testing purposes, I have built the example programs in libcdk5-doc
> on amd64 with libncurses6 and the libcdk5 library which is still linked
> against libncurses5.  While most of them seem to work, I got a segfault
> in demos/clock and a bus error in buttonbox_ex.
>
> My conclusion is that it is very risky to allow such combinations, and
> to rule them out I propose to change the package name of the cdk
> library, say to libcdk5a.  It would then have to build-depend on
> libncurses-dev (>= 6.1+20180210) to ensure that it is linked against
> libncurses6 and not libncurses5.  Of course this can only be uploaded
> to experimental for now, but should go to unstable when the ncurses
> transition starts there.

Attached is a patch which should do the trick.  Maybe there are other
ways to address the incompatibility, but renaming the libcdk5 library
package looks both safe and simple to me.

Cheers,
       Sven

>From 0be150d0078ebf4711f08a0aa2e795cdd948ab9d Mon Sep 17 00:00:00 2001
From: Sven Joachim <[email protected]>
Date: Wed, 7 Mar 2018 19:02:30 +0100
Subject: [PATCH] Rename the library package to libcdk5a

The change of the "chtype" data type in libncurses6 means that it is
not safe to have the cdk library and applications using it linked
against different ncurses versions.

To ensure that both the library and the application are linked against
libncurses6 rather than libncurses5, rename the library package and
bump the build-dependency.

Add a lintian override for the resulting
package-name-doesnt-match-sonames warning.
---
 debian/control                               | 8 +++++---
 debian/{libcdk5.install => libcdk5a.install} | 0
 debian/libcdk5a.lintian-overrides            | 3 +++
 debian/{libcdk5.symbols => libcdk5a.symbols} | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)
 rename debian/{libcdk5.install => libcdk5a.install} (100%)
 create mode 100644 debian/libcdk5a.lintian-overrides
 rename debian/{libcdk5.symbols => libcdk5a.symbols} (99%)

diff --git a/debian/control b/debian/control
index 194ad46..6dd5a6f 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,17 @@ Section: libs
 Priority: optional
 Maintainer: Herbert Parentes Fortes Neto <[email protected]>
 Standards-Version: 4.1.3
-Build-Depends: debhelper (>= 9), libncurses5-dev, pkg-config
+Build-Depends: debhelper (>= 9), libncurses-dev (>= 6.1+20180210), pkg-config
 Homepage: http://invisible-island.net/cdk
 Vcs-Git: https://salsa.debian.org/debian/libcdk5.git
 Vcs-Browser: https://salsa.debian.org/debian/libcdk5
 
-Package: libcdk5
+Package: libcdk5a
 Architecture: any
 Multi-Arch: same
 Depends: ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libcdk5
+Replaces: libcdk5
 Description: C-based curses widget library
  CDK stands for "Curses Development Kit". CDK sits on top of the curses
  library and provides 22 ready to use widgets for rapid application
@@ -22,7 +24,7 @@ Description: C-based curses widget library
 Package: libcdk5-dev
 Architecture: any
 Section: libdevel
-Depends: libcdk5 (= ${binary:Version}), libncurses5-dev, ${misc:Depends}
+Depends: libcdk5a (= ${binary:Version}), libncurses5-dev, ${misc:Depends}
 Description: C-based curses widget library (development files)
  CDK stands for "Curses Development Kit". CDK sits on top of the curses
  library and provides 22 ready to use widgets for rapid application
diff --git a/debian/libcdk5.install b/debian/libcdk5a.install
similarity index 100%
rename from debian/libcdk5.install
rename to debian/libcdk5a.install
diff --git a/debian/libcdk5a.lintian-overrides b/debian/libcdk5a.lintian-overrides
new file mode 100644
index 0000000..d6057a5
--- /dev/null
+++ b/debian/libcdk5a.lintian-overrides
@@ -0,0 +1,3 @@
+# library package had to be renamed for libncurses6 transition
+# see https://bugs.debian.org/892280
+libcdk5a: package-name-doesnt-match-sonames libcdk5
diff --git a/debian/libcdk5.symbols b/debian/libcdk5a.symbols
similarity index 99%
rename from debian/libcdk5.symbols
rename to debian/libcdk5a.symbols
index 962abd4..f68b0e2 100644
--- a/debian/libcdk5.symbols
+++ b/debian/libcdk5a.symbols
@@ -1,4 +1,4 @@
-libcdk.so.5 libcdk5 #MINVER#
+libcdk.so.5 libcdk5a #MINVER#
  Beep@Base 5.0.20161120
  CDKDEBUG@Base 5.0.20161120
  CDKVersion@Base 5.0.20161120
-- 
2.16.2

Reply via email to