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

Bug#928368: transition: papi



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 <anbe@debian.org>  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 <anbe@debian.org>
 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..0000000
--- 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 0000000..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
  papif_unregster_thread@Base 0
  papif_unregster_thread_@Base 0
  papif_unregster_thread__@Base 0
diff --git a/debian/patches/0001-set-SONAME-to-libpapi.so.-PAPIVER-.-PAPIREV.patch b/debian/patches/0001-set-SONAME-to-libpapi.so.-PAPIVER-.-PAPIREV.patch
new file mode 100644
index 0000000..fd22b66
--- /dev/null
+++ b/debian/patches/0001-set-SONAME-to-libpapi.so.-PAPIVER-.-PAPIREV.patch
@@ -0,0 +1,126 @@
+From 197b0eae7405ee6b8845d820f3939c6e068ec225 Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <a.beckmann@fz-juelich.de>
+Date: Tue, 30 Apr 2019 03:29:52 +0200
+Subject: [PATCH] set SONAME to libpapi.so.$(PAPIVER).$(PAPIREV)
+
+the version check in PAPI_library_init() requires matching
+PAPI_VER_CURRENT, therefore libpapi.so.5 from papi-5.6.x and papi-5.7.x
+are not interchangeable, but require applications to be recompiled
+
+change the SONAME to contain the two version components that define
+PAPI_VER_CURRENT, thereafter upgrading the shared library to a new
+version does no longer break existing applications (which will pick up
+the new SONAME upon recompilation)
+
+introduce a new variable PAPISOVER and use it in all places where
+the SONAME is being used
+
+drop unused symlinks with three version components:
+$(PAPIVER).$(PAPIREV).$(PAPIAGE)
+---
+ src/Makefile.in    |  1 +
+ src/Makefile.inc   | 14 ++++++--------
+ src/Rules.perfmon2 |  2 +-
+ src/configure.in   |  4 +++-
+ 4 files changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 9545eb99d..7131c2471 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -75,6 +75,7 @@ PMAPI     = @PMAPI@
+ PMINIT    = @PMINIT@
+ SETPATH = @SETPATH@
+ SHLIB = @SHLIB@
++PAPISOVER = @PAPISOVER@
+ VLIB = @VLIB@
+ SHLIBDEPS = @SHLIBDEPS@
+ SHOW_CONF = @SHOW_CONF@
+diff --git a/src/Makefile.inc b/src/Makefile.inc
+index 278acdd12..90b3fad42 100644
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -54,13 +54,13 @@ $(LIBRARY): $(OBJECTS)
+ 	rm -f $(LIBRARY)
+ 	$(AR) $(ARG64) rv $(LIBRARY) $(OBJECTS)
+ 
+-shared: libpapi.so libpapi.so.$(PAPIVER)
++shared: libpapi.so libpapi.so.$(PAPISOVER)
+ 
+-libpapi.so libpapi.so.$(PAPIVER): $(SHLIB)
++libpapi.so libpapi.so.$(PAPISOVER): $(SHLIB)
+ 	ln -sf $(SHLIB) $@
+ 
+ $(SHLIB): $(HEADERS) $(SOURCES) $(SHLIBOBJS)
+-	rm -f $(SHLIB) libpapi.so libpapi.so.$(PAPIVER); 
++	rm -f $(SHLIB) libpapi.so libpapi.so.$(PAPISOVER)
+ 	$(CC_SHR) $(LIBCFLAGS) $(OPTFLAGS) $(SOURCES) $(SHLIBOBJS) -o $@ $(SHLIBDEPS) $(LDFLAGS)
+ 	@set -ex; if test "$(POST_BUILD)" != "" ; then \
+ 		-$(POST_BUILD) ; \
+@@ -254,7 +254,7 @@ ifneq (${COMPONENTS},)
+ endif
+ 
+ clean: comp_tests_clean native_clean
+-	rm -rf $(LIBRARY) $(SHLIB) libpapi.so libpapi.so.$(PAPIVER) $(OBJECTS) core rii_files genpapifdef *~ so_locations papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.c
++	rm -rf $(LIBRARY) $(SHLIB) libpapi.so libpapi.so.$(PAPISOVER) $(OBJECTS) core rii_files genpapifdef *~ so_locations papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.c
+ 	$(MAKE) -C ../doc clean
+ 	$(MAKE) -C ctests clean
+ 	$(MAKE) -C ftests clean
+@@ -310,8 +310,7 @@ install-lib: native_install
+ 		cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC); \
+ 		chmod go+r $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) ; \
+ 		cd $(DESTDIR)$(LIBDIR); \
+-		ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE); \
+-		ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER); \
++		ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPISOVER); \
+ 		ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so; \
+ 	fi
+ 
+@@ -345,8 +344,7 @@ install-pkgconf:
+ 	-mkdir -p $(DESTDIR)$(LIBPC)
+ 	-chmod go+rx $(DESTDIR)$(LIBPC)
+ 	cp papi.pc $(DESTDIR)$(LIBPC)/papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc
+-	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).pc;
+-	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPIVER).pc;
++	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPISOVER).pc;
+ 	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi.pc;
+ 
+ #
+diff --git a/src/Rules.perfmon2 b/src/Rules.perfmon2
+index 4f86b6c87..710129540 100644
+--- a/src/Rules.perfmon2
++++ b/src/Rules.perfmon2
+@@ -60,7 +60,7 @@ endif
+ 	-install -d $(DESTDIR)$(LIBDIR)
+ ifneq (,$(findstring shared,$(LIBS)))
+ 	cp -p $(SHLIB) $(DESTDIR)$(LIBDIR)/libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC)
+-	cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPIVER)
++	cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so.$(PAPISOVER)
+ 	cd $(DESTDIR)$(LIBDIR); ln -sf libpapi.so.$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC) libpapi.so
+ endif
+ 	-install -d $(DESTDIR)$(DATADIR)
+diff --git a/src/configure.in b/src/configure.in
+index e263d433f..fd35a60f4 100644
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -1262,7 +1262,8 @@ CTEST_TARGETS="all"
+ FTEST_TARGETS="all"
+ LIBRARY=libpapi.a
+ SHLIB='libpapi.so.AC_PACKAGE_VERSION'
+-VLIB='libpapi.so.$(PAPIVER)'
++PAPISOVER='$(PAPIVER).$(PAPIREV)'
++VLIB='libpapi.so.$(PAPISOVER)'
+ OMPCFLGS=-fopenmp
+ CC_R='$(CC) -pthread'
+ CC_SHR='$(CC) -fPIC -DPIC -shared -Wl,-soname -Wl,$(VLIB) -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
+@@ -1769,6 +1770,7 @@ AC_SUBST(CPU)
+ AC_SUBST(FILENAME)
+ AC_SUBST(LIBRARY)
+ AC_SUBST(SHLIB)
++AC_SUBST(PAPISOVER)
+ AC_SUBST(VLIB)
+ AC_SUBST(PAPICFLAGS)
+ AC_SUBST(OPTFLAGS)
+-- 
+2.11.0
+
diff --git a/debian/patches/do-not-ignore-failures.patch b/debian/patches/do-not-ignore-failures.patch
index 968fabc..f2e202e 100644
--- a/debian/patches/do-not-ignore-failures.patch
+++ b/debian/patches/do-not-ignore-failures.patch
@@ -21,7 +21,7 @@ Description: do not ignore any errors in the Makefiles
  	@set -ex; if test -r $(LIBRARY) ; then \
  		cp $(LIBRARY) $(DESTDIR)$(LIBDIR); \
  		chmod go+r $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
-@@ -326,11 +326,11 @@ install-tests:  install-comp_tests
+@@ -325,11 +325,11 @@ install-tests:  install-comp_tests
  	$(SETPATH) $(MAKE) -C ctests install
  	$(SETPATH) $(MAKE) -C ftests install
  	$(SETPATH) $(MAKE) -C validation_tests install
@@ -38,7 +38,7 @@ Description: do not ignore any errors in the Makefiles
  
  # Component tests installing
  install-comp_tests:
-@@ -342,8 +342,8 @@ endif
+@@ -341,8 +341,8 @@ endif
  
  install-pkgconf:
  	@echo "pkcongfig being installed in: \"$(DESTDIR)$(LIBPC)\"";
@@ -47,8 +47,8 @@ Description: do not ignore any errors in the Makefiles
 +	mkdir -p $(DESTDIR)$(LIBPC)
 +	chmod go+rx $(DESTDIR)$(LIBPC)
  	cp papi.pc $(DESTDIR)$(LIBPC)/papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc
- 	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).pc;
- 	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPIVER).pc;
+ 	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi-$(PAPISOVER).pc;
+ 	cd $(DESTDIR)$(LIBPC); ln -sf papi-$(PAPIVER).$(PAPIREV).$(PAPIAGE).$(PAPIINC).pc papi.pc;
 --- a/src/components/Makefile_comp_tests
 +++ b/src/components/Makefile_comp_tests
 @@ -8,14 +8,14 @@ tests: $(NAME)_tests
diff --git a/debian/patches/for-debian-no-rpath.patch b/debian/patches/for-debian-no-rpath.patch
index 4232ec6..b550e82 100644
--- a/debian/patches/for-debian-no-rpath.patch
+++ b/debian/patches/for-debian-no-rpath.patch
@@ -1,8 +1,8 @@
 On Debian, we do not want an rpath for standard lib dir
 --- a/src/configure.in
 +++ b/src/configure.in
-@@ -1236,7 +1236,7 @@ SHLIB='libpapi.so.AC_PACKAGE_VERSION'
- VLIB='libpapi.so.$(PAPIVER)'
+@@ -1266,7 +1266,7 @@ PAPISOVER='$(PAPIVER).$(PAPIREV)'
+ VLIB='libpapi.so.$(PAPISOVER)'
  OMPCFLGS=-fopenmp
  CC_R='$(CC) -pthread'
 -CC_SHR='$(CC) -fPIC -DPIC -shared -Wl,-soname -Wl,$(VLIB) -Xlinker "-rpath" -Xlinker "$(LIBDIR)"'
diff --git a/debian/patches/series b/debian/patches/series
index e74f3db..7ad4abf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001-set-SONAME-to-libpapi.so.-PAPIVER-.-PAPIREV.patch
 fix-typos.patch
 for-debian-no-rpath.patch
 for-debian-do-not-embed-libpfm4.patch
diff --git a/debian/rules b/debian/rules
index c62fcee..7957fcc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,8 @@
 # output every command that modifies files on the build system.
 #export DH_VERBOSE = 1
 
+SOVERSION	 = 5.7
+
 # see FEATURE AREAS in dpkg-buildflags(1)
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
@@ -59,3 +61,21 @@ override_dh_installchangelogs:
 
 override_dh_compress:
 	dh_compress -X.c -X.h -X.F -XMakefile
+
+override_dh_gencontrol:
+	dh_gencontrol -- \
+		-V'papi:SOVERSION=$(SOVERSION)'
+
+
+TEMPLATES	:= $(wildcard debian/libpapiSOVERSION.*)
+GENERATED	 = $(subst SOVERSION,$(SOVERSION),$(TEMPLATES))
+
+libpapi$(SOVERSION).%: libpapiSOVERSION.%
+	sed 's/@SOVERSION@/$(SOVERSION)/g' $< > $@
+
+build-generated: $(GENERATED) ;
+clean-generated:
+	$(RM) $(GENERATED)
+
+override_dh_auto_configure: build-generated
+clean: clean-generated

Reply to: