Control: tags -1 + patch pending

Dear Maintainer,

Le mardi 04 mars 2014 à 21:02 +0100, Sébastien Villemot a écrit :

> Le mardi 04 mars 2014 à 18:07 +0100, Julien Cristau a écrit :
> > On Tue, Mar  4, 2014 at 17:55:23 +0100, Sébastien Villemot wrote:
> > 
> > > There seem to be several package (at least blacs-mpi and scalapack,
> > > possibly others) who construct the SONAME at build time using the name
> > > of the default MPI implementation.
> > > 
> > I guess that makes sense if their ABI changes based on the underlying
> > MPI implementation.  But IMO they should fail to build rather than
> > silently build an incompatible binary package if that doesn't match the
> > expected value.
> 
> Ok, I'm reassigning this as a serious bug against blacs-mpi and
> scalapack.

I have prepared a patch for this issue, and uploaded it to DELAYED/7.
Please find attached the debdiff. Don't hesitate to let me know if you
want to delay the upload longer.

Note that I have tried to implement a minimal solution, but it
nevertheless represent substantial changes to the package. In
particular, debian/control is now autogenerated, and the package will
need a sourceful upload everytime an arch undergoes a change of default
MPI implementation.

Another solution to this bug would have been to remove the name of the
MPI implementation from the SONAME. Note that this is only possible if
the ABI exposed by scalapack does not depend on the specific MPI
implementation, something that I could not assess. Also, it seems that
this solution means more changes to the package build system, so I
preferred not to go down that road. But if you think this is a better
solution, please let me know and I can implement it.

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

diff -Nru scalapack-1.8.0/debian/changelog scalapack-1.8.0/debian/changelog
--- scalapack-1.8.0/debian/changelog	2011-12-29 20:29:36.000000000 +0100
+++ scalapack-1.8.0/debian/changelog	2014-03-24 18:20:41.000000000 +0100
@@ -1,3 +1,21 @@
+scalapack (1.8.0-9.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * No longer silently change the SONAME of the MPI scalapack shared
+    library when the default MPI implementation changes on a given arch.
+    (Closes: #740620)
+    + Create two new binary packages libscalapack-openmpi1 and
+      libscalapack-mpich1, corresponding to the two possible SONAMES.
+    + The architecture list for each binary package is stored in debian/rules,
+      and debian/control is now generated from debian/control.in by the clean
+      rule.
+    + Keep a transitional package for libscalapack-mpi1.
+    + Make sure that the package FTBFS if the default MPI implementation
+      changes on a given arch (instead of silently changing the SONAME or
+      creating an empty package).
+
+ -- Sébastien Villemot <sebast...@debian.org>  Mon, 24 Mar 2014 18:20:38 +0100
+
 scalapack (1.8.0-9) unstable; urgency=low
 
   * scalapack failed to build from source with the new mpich2's targets. For
diff -Nru scalapack-1.8.0/debian/control scalapack-1.8.0/debian/control
--- scalapack-1.8.0/debian/control	2011-12-28 23:42:18.000000000 +0100
+++ scalapack-1.8.0/debian/control	2014-03-24 19:24:04.000000000 +0100
@@ -1,3 +1,8 @@
+# This file is autogenerated. DO NOT EDIT!
+#
+# Modifications should be made to debian/control.in instead.
+# This file is regenerated automatically in the clean target.
+
 Source: scalapack
 Section: devel
 Priority: extra
@@ -7,13 +12,43 @@
 Homepage: http://www.netlib.org/scalapack/
 
 Package: libscalapack-mpi1
+Section: oldlibs
+Priority: extra
+Architecture: alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc arm64 hppa m68k powerpcspe ppc64 s390x sparc64
+Depends: ${misc:Depends},
+         libscalapack-openmpi1 [alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc],
+         libscalapack-mpich1 [arm64 hppa m68k powerpcspe ppc64 s390x sparc64]
+Description: Scalable Linear Algebra Package - transitional package
+ This package depends on the version of the shared library compiled against
+ the default MPI implementation.
+
+Package: libscalapack-openmpi1
+Section: libs
+Architecture: alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc
+Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: scalapack1-mpich, scalapack1-lam
+Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Shared libs. for OpenMPI
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI. There are packages for the shared libraries (this one), for
+ the static libraries and the development files and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: libscalapack-mpich1
 Section: libs
-Architecture: any
+Architecture: arm64 hppa m68k powerpcspe ppc64 s390x sparc64
 Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
 Conflicts: scalapack1-mpich, scalapack1-lam
-Replaces: scalapack1-mpich, scalapack1-lam
+Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
 Suggests: scalapack-doc
-Description: Scalable Linear Algebra Package - Shared libs. for MPI
+Description: Scalable Linear Algebra Package - Shared libs. for MPICH
  ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
  clusters.
  .
@@ -25,8 +60,10 @@
 
 Package: libscalapack-mpi-dev
 Section: libdevel
-Architecture: any
-Depends: libscalapack-mpi1 (= ${binary:Version}), libblacs-mpi-dev, ${misc:Depends}
+Architecture: alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc arm64 hppa m68k powerpcspe ppc64 s390x sparc64
+Depends: libscalapack-openmpi1 (= ${binary:Version}) [alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc],
+         libscalapack-mpich1 (= ${binary:Version}) [arm64 hppa m68k powerpcspe ppc64 s390x sparc64],
+         libblacs-mpi-dev, ${misc:Depends}
 Conflicts: scalapack-mpich-dev, scalapack-lam-dev
 Replaces: scalapack-mpich-dev, scalapack-lam-dev
 Suggests: scalapack-doc
@@ -45,7 +82,7 @@
 
 Package: scalapack-mpi-test
 Section: math
-Architecture: any
+Architecture: alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc arm64 hppa m68k powerpcspe ppc64 s390x sparc64
 Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
 Conflicts: scalapack-mpich-test, scalapack-lam-test
 Replaces: scalapack-mpich-test, scalapack-lam-test
diff -Nru scalapack-1.8.0/debian/control.in scalapack-1.8.0/debian/control.in
--- scalapack-1.8.0/debian/control.in	1970-01-01 01:00:00.000000000 +0100
+++ scalapack-1.8.0/debian/control.in	2014-03-24 19:22:23.000000000 +0100
@@ -0,0 +1,160 @@
+Source: scalapack
+Section: devel
+Priority: extra
+Maintainer: Muammar El Khatib <muam...@debian.org>
+Standards-Version: 3.8.4
+Build-Depends: mpi-default-dev, pvm-dev, blacs-pvm-dev, gfortran, liblapack-dev, libblas-dev, debhelper (>= 6), libblacs-mpi-dev
+Homepage: http://www.netlib.org/scalapack/
+
+Package: libscalapack-mpi1
+Section: oldlibs
+Priority: extra
+Architecture: @OPENMPI_ARCHS@ @MPICH_ARCHS@
+Depends: ${misc:Depends},
+         libscalapack-openmpi1 [@OPENMPI_ARCHS@],
+         libscalapack-mpich1 [@MPICH_ARCHS@]
+Description: Scalable Linear Algebra Package - transitional package
+ This package depends on the version of the shared library compiled against
+ the default MPI implementation.
+
+Package: libscalapack-openmpi1
+Section: libs
+Architecture: @OPENMPI_ARCHS@
+Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: scalapack1-mpich, scalapack1-lam
+Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Shared libs. for OpenMPI
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI. There are packages for the shared libraries (this one), for
+ the static libraries and the development files and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: libscalapack-mpich1
+Section: libs
+Architecture: @MPICH_ARCHS@
+Depends: mpi-default-bin, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: scalapack1-mpich, scalapack1-lam
+Breaks: libscalapack-mpi1 (<< 1.8.0-9.1)
+Replaces: scalapack1-mpich, scalapack1-lam, libscalapack-mpi1 (<< 1.8.0-9.1)
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Shared libs. for MPICH
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI. There are packages for the shared libraries (this one), for
+ the static libraries and the development files and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: libscalapack-mpi-dev
+Section: libdevel
+Architecture: @OPENMPI_ARCHS@ @MPICH_ARCHS@
+Depends: libscalapack-openmpi1 (= ${binary:Version}) [@OPENMPI_ARCHS@],
+         libscalapack-mpich1 (= ${binary:Version}) [@MPICH_ARCHS@],
+         libblacs-mpi-dev, ${misc:Depends}
+Conflicts: scalapack-mpich-dev, scalapack-lam-dev
+Replaces: scalapack-mpich-dev, scalapack-lam-dev
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Dev. files for MPICH
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI.
+ .
+ The package is available for LAM and MPICH. This package uses MPICH. There
+ are packages for the shared libraries, for the static libraries and
+ the development files (this one) and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: scalapack-mpi-test
+Section: math
+Architecture: @OPENMPI_ARCHS@ @MPICH_ARCHS@
+Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: scalapack-mpich-test, scalapack-lam-test
+Replaces: scalapack-mpich-test, scalapack-lam-test
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Test files for MPICH
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses MPI.
+ .
+ The package is available for LAM and MPICH. This package uses MPICH. There
+ are packages for the shared libraries, for the static libraries and
+ the development files and for test programs (this one).
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: libscalapack-pvm1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: scalapack-doc
+Conflicts: scalapack1-pvm
+Replaces: scalapack1-pvm
+Description: Scalable Linear Algebra Package - Shared libs. for PVM
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses PVM.
+ .
+ There are packages for the shared libraries (this one), for the static
+ libraries and the development files and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: libscalapack-pvm-dev
+Section: libdevel
+Architecture: any
+Depends: libscalapack-pvm1 (= ${binary:Version}), blacs-pvm-dev, pvm-dev, ${shlibs:Depends}, ${misc:Depends}
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Dev. files for PVM
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses PVM.
+ .
+ There are packages for the shared libraries, for the static libraries and
+ the development files (this one) and for test programs.
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: scalapack-pvm-test
+Section: math
+Architecture: any
+Depends: scalapack-test-common, ${shlibs:Depends}, ${misc:Depends}
+Suggests: scalapack-doc
+Description: Scalable Linear Algebra Package - Test files for PVM
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This
+ package uses PVM.
+ .
+ There are packages for the shared libraries, for the static libraries and
+ the development files and for test programs (this one).
+ .
+ Also included: PBLAS, Parallel Basic Linear Algebra Subprograms.
+
+Package: scalapack-test-common
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: scalapack-lam-test | scalapack-mpich-test | scalapack-pvm-test
+Description: Test data for ScaLAPACK testers
+ ScaLAPACK is the parallel version of LAPACK and is used on Beowulf type
+ clusters.
+ .
+ You can choose between an implementation based on MPI or PVM. This package
+ provides test data for all ScaLAPACK packages (MPICH, LAM and PVM versions).
diff -Nru scalapack-1.8.0/debian/libscalapack-mpi1.dirs scalapack-1.8.0/debian/libscalapack-mpi1.dirs
--- scalapack-1.8.0/debian/libscalapack-mpi1.dirs	2011-09-18 16:28:24.000000000 +0200
+++ scalapack-1.8.0/debian/libscalapack-mpi1.dirs	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib
diff -Nru scalapack-1.8.0/debian/libscalapack-mpich1.install scalapack-1.8.0/debian/libscalapack-mpich1.install
--- scalapack-1.8.0/debian/libscalapack-mpich1.install	1970-01-01 01:00:00.000000000 +0100
+++ scalapack-1.8.0/debian/libscalapack-mpich1.install	2014-03-22 16:03:13.000000000 +0100
@@ -0,0 +1 @@
+libscalapack-mpich.so.* usr/lib
diff -Nru scalapack-1.8.0/debian/libscalapack-openmpi1.install scalapack-1.8.0/debian/libscalapack-openmpi1.install
--- scalapack-1.8.0/debian/libscalapack-openmpi1.install	1970-01-01 01:00:00.000000000 +0100
+++ scalapack-1.8.0/debian/libscalapack-openmpi1.install	2014-03-22 16:03:07.000000000 +0100
@@ -0,0 +1 @@
+libscalapack-openmpi.so.* usr/lib
diff -Nru scalapack-1.8.0/debian/rules scalapack-1.8.0/debian/rules
--- scalapack-1.8.0/debian/rules	2011-12-29 20:24:43.000000000 +0100
+++ scalapack-1.8.0/debian/rules	2014-03-23 16:14:32.000000000 +0100
@@ -14,6 +14,12 @@
 include /usr/share/mpi-default-dev/debian_defaults
 SCALAPACK_MPI=$(ARCH_DEFAULT_MPI_IMPL)
 
+# This list of archs is maintained separately from that of the mpi-defaults
+# package. If there is a mismatch between the two, the package will FTBFS. This
+# is on purpose, to avoid silent breakage. See #740620 for more details.
+OPENMPI_ARCHS=alpha amd64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc sparc
+MPICH_ARCHS=arm64 hppa m68k powerpcspe ppc64 s390x sparc64
+
 build: build-$(SCALAPACK_MPI) build-pvm
 
 build-openmpi: build-stamp-openmpi
@@ -277,6 +283,15 @@
 #	done
 	dh_clean
 
+	{ \
+	  echo "# This file is autogenerated. DO NOT EDIT!" ; \
+	  echo "#" ; \
+	  echo "# Modifications should be made to debian/control.in instead." ; \
+	  echo "# This file is regenerated automatically in the clean target." ; \
+	  echo ; \
+	  sed "s/@OPENMPI_ARCHS@/$(OPENMPI_ARCHS)/g;s/@MPICH_ARCHS@/$(MPICH_ARCHS)/g;" debian/control.in ; } \
+	> debian/control
+
 install: install-dirs install-$(SCALAPACK_MPI) install-pvm
 
 install-dirs: install-dirs-stamp
@@ -303,10 +318,13 @@
 	dh_testdir
 	dh_testroot
 
+	# The shared library is installed via debian/*.install, to avoid
+	# creating an empty package if default MPI implementation changes on
+	# the arch
+	dh_install
+
 	set -e ;\
 	for i in scalapack ; do \
-	  cp -a lib$$i-openmpi.so.* \
-	    `pwd`/debian/libscalapack-mpi1/usr/lib/ ;\
 	  cp -a lib$$i-openmpi.so \
 	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/ ;\
 	done
@@ -349,10 +367,13 @@
 	dh_testdir
 	dh_testroot
 
+	# The shared library is installed via debian/*.install, to avoid
+	# creating an empty package if default MPI implementation changes on
+	# the arch
+	dh_install
+
 	set -e ;\
 	for i in scalapack ; do \
-	  cp -a lib$$i-mpich.so.* \
-	    `pwd`/debian/libscalapack-mpi1/usr/lib/ ;\
 	  cp -a lib$$i-mpich.so \
 	    `pwd`/debian/libscalapack-mpi-dev/usr/lib/ ;\
 	done
diff -Nru scalapack-1.8.0/debian/shlibs.local scalapack-1.8.0/debian/shlibs.local
--- scalapack-1.8.0/debian/shlibs.local	2011-09-18 16:28:24.000000000 +0200
+++ scalapack-1.8.0/debian/shlibs.local	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-libscalapack-mpich 1 libscalapack-mpi1 (>= 1.8.0)
-libscalapack-lam 1 libscalapack-mpi1 (>= 1.8.0)
-libscalapack-openmpi 1 libscalapack-mpi1 (>= 1.8.0)
-libscalapack-pvm 1 libscalapack-pvm1 (>= 1.8.0)

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to