Bug#928368: transition: papi

2019-05-05 Thread Andreas Beckmann
Followup-For: Bug #928368

Hi,

attached is the debdiff from 5.7.0-1 (buster) to 5.7.0-2 which I just
uploaded to experimental (but that will need to go through NEW first).
Note that this is a git diff since it better copes with the rename of
debian/libpapi5.* to debian/libpapiSOVERSION.*


Andreas
diff --git a/debian/changelog b/debian/changelog
index d019e5d..b2b011e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+papi (5.7.0-2) experimental; urgency=medium
+
+  * Restore support for changing the SOVERSION frequently.
+  * Change SONAME to libpapi.so.5.7.  (Closes: #928367)
+  * Bump libpfm4-dev B-D to >= 4.10.1+git7.
+  * Upload to experimental.
+
+ -- Andreas Beckmann   Mon, 06 May 2019 02:14:13 +0200
+
 papi (5.7.0-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index 9cb1a61..8da8e4c 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
  Andreas Beckmann 
 Build-Depends:
  debhelper-compat (= 12),
- libpfm4-dev (>= 4.10.1+git6),
+ libpfm4-dev (>= 4.10.1+git7),
  gfortran,
 Rules-Requires-Root: no
 Standards-Version: 4.3.0
@@ -15,15 +15,17 @@ Homepage: https://icl.utk.edu/papi/software/index.html
 Vcs-Browser: https://salsa.debian.org/hpc-team/papi
 Vcs-Git: https://salsa.debian.org/hpc-team/papi.git
 
-Package: libpapi5
+Package: libpapi5.7
 Section: libs
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends:
  ${shlibs:Depends}, ${misc:Depends}
-Breaks: libpapi5.3
-Replaces: libpapi5.3
+Breaks:
+ libpapi5 (>= 5.7),
+Replaces:
+ libpapi5 (>= 5.7),
 Description: PAPI runtime (shared libraries)
  Performance Application Programming Interface (PAPI) provides the tool
  designer and application engineer with a consistent interface and methodology
@@ -45,7 +47,7 @@ Section: libdevel
 Architecture: any
 Multi-Arch: same
 Depends:
- libpapi5 (= ${binary:Version}),
+ libpapi${papi:SOVERSION} (= ${binary:Version}),
  ${misc:Depends}
 Description: PAPI development files (headers and API documentation)
  Performance Application Programming Interface (PAPI) provides the tool
diff --git a/debian/libpapi5.install b/debian/libpapi5.install
deleted file mode 100644
index 9ea1476..000
--- a/debian/libpapi5.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/*/lib*.so.*
-usr/share/papi/papi_events.csv usr/share/papi
diff --git a/debian/libpapi5.README.Debian 
b/debian/libpapiSOVERSION.README.Debian
similarity index 100%
rename from debian/libpapi5.README.Debian
rename to debian/libpapiSOVERSION.README.Debian
diff --git a/debian/libpapi5.docs b/debian/libpapiSOVERSION.docs
similarity index 100%
rename from debian/libpapi5.docs
rename to debian/libpapiSOVERSION.docs
diff --git a/debian/libpapiSOVERSION.install b/debian/libpapiSOVERSION.install
new file mode 100644
index 000..41ad231
--- /dev/null
+++ b/debian/libpapiSOVERSION.install
@@ -0,0 +1,2 @@
+usr/lib/*/lib*.so.*
+usr/share/papi/papi_events.csv usr/share/papi/@SOVERSION@/
diff --git a/debian/libpapi5.symbols b/debian/libpapiSOVERSION.symbols
similarity index 97%
rename from debian/libpapi5.symbols
rename to debian/libpapiSOVERSION.symbols
index 82c78e4..98d059e 100644
--- a/debian/libpapi5.symbols
+++ b/debian/libpapiSOVERSION.symbols
@@ -1,4 +1,4 @@
-libpapi.so.5 #PACKAGE# #MINVER#
+libpapi.so.@SOVERSION@ #PACKAGE# #MINVER#
 * Build-Depends-Package: libpapi-dev
  PAPIF_ACCUM@Base 0
  PAPIF_ACCUM_COUNTERS@Base 0
@@ -10,7 +10,7 @@ libpapi.so.5 #PACKAGE# #MINVER#
  PAPIF_CREATE_EVENTSET@Base 0
  PAPIF_DESTROY_EVENTSET@Base 0
  PAPIF_ENUM_EVENT@Base 0
- PAPIF_EPC@Base 5.2.0
+ PAPIF_EPC@Base 0
  PAPIF_EVENT_CODE_TO_NAME@Base 0
  PAPIF_EVENT_NAME_TO_CODE@Base 0
  PAPIF_FLIPS@Base 0
@@ -64,7 +64,7 @@ libpapi.so.5 #PACKAGE# #MINVER#
  PAPIF_STOP_COUNTERS@Base 0
  PAPIF_THREAD_ID@Base 0
  PAPIF_THREAD_INIT@Base 0
- PAPIF_UNREGISTER_THREAD@Base 5.6.0
+ PAPIF_UNREGISTER_THREAD@Base 0
  PAPIF_UNREGSTER_THREAD@Base 0
  PAPIF_WRITE@Base 0
  PAPIF_num_cmp_hwctrs@Base 0
@@ -85,7 +85,7 @@ libpapi.so.5 #PACKAGE# #MINVER#
  PAPI_disable_component_by_name@Base 0
  PAPI_enum_cmp_event@Base 0
  PAPI_enum_event@Base 0
- PAPI_epc@Base 5.2.0
+ PAPI_epc@Base 0
  PAPI_event_code_to_name@Base 0
  PAPI_event_name_to_code@Base 0
  PAPI_flips@Base 0
@@ -186,9 +186,9 @@ libpapi.so.5 #PACKAGE# #MINVER#
  papif_enum_event@Base 0
  papif_enum_event_@Base 0
  papif_enum_event__@Base 0
- papif_epc@Base 5.2.0
- papif_epc_@Base 5.2.0
- papif_epc__@Base 5.2.0
+ papif_epc@Base 0
+ papif_epc_@Base 0
+ papif_epc__@Base 0
  papif_event_code_to_name@Base 0
  papif_event_code_to_name_@Base 0
  papif_event_code_to_name__@Base 0
@@ -357,9 +357,9 @@ libpapi.so.5 #PACKAGE# #MINVER#
  papif_unlock@Base 0
  papif_unlock_@Base 0
  papif_unlock__@Base 0
- papif_unregister_thread@Base 5.6
- papif_unregister_thread_@Base 5.6
- papif_unregister_thread__@Base 5.6
+ papif_unregister_thread@Base 0
+ papif_unregister_thread_@Base 0
+ papif_unregister_thread__@Base 0
  

Bug#928368: transition: papi

2019-05-02 Thread Andreas Beckmann
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: transition

Hi,

I recently realized that libpapi5 (5.7.0-1) is not compatible with
applications built against papi 5.6 (or any other mismatching
major.minor version) due to the runtime checks performed in
PAPI_library_init() and the way this is to be called from applications.
Applications will abort after PAPI_library_init() returned an error and
require recompilation against the current version. (I ran into this
incompatibility myself.) #928367
Upstream confirmed that they only intend to maintain ABI compatibility
for major.minor.*.* releases, but not between different minor versions.
The soname therefore should have never been libpapi.so.major but rather
libpapi.so.major.minor

Patching out the check completely is non-trivial since it is some kind
of handshake beween caller and callee (app and lib). I'm pretty sure the
ABI has not changed between 5.5 (stretch) and 5.7, but I wouldn't put my
hand into the fire for it. And upstream has no way to track ABI
independently of major.minor version, given that the runtime check
exists for a long time already.
While I could patch papi to use version 5.6.99.99 internally instead of
5.7.0.0 to restore compatibility with the snapshot we had in buster
previously (only major.minor are being compared), this would still be
incompatible with programs built on stretch which had libpapi5 5.5.*

Given the limited amount of packages involved, I'd prefer to perform a
late but proper transition libpapi5 -> libpapi5.7 for buster.

# Depends:
eztrace: libeztrace0 [amd64 arm64 armel armhf i386 mips mips64el mipsel
ppc64el]

# Build-Depends:
eztrace: libpapi-dev
eztrace-contrib/contrib: libpapi-dev
mpqc3: libpapi-dev

Only one binNMU is needed. mpqc3 links statically (will fix post buster)
and eztrace-contrib probably shares the packaging with eztrace, and IIRC
only builds some addon modules.

If I had seen this coming, I would have done the transition in time for
the 5.6 snapshot we previously had and left 5.7 for bullseye.

Ben file:

title = "papi";
is_affected = .depends ~ "libpapi5" | .depends ~ "libpapi5.7";
is_good = .depends ~ "libpapi5.7";
is_bad = .depends ~ "libpapi5";