provide old ABI levels via backward compatibility of new DPDK libraries. 60/5060/1
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Tue, 7 Feb 2017 14:00:39 +0000 (15:00 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Tue, 7 Feb 2017 14:48:12 +0000 (15:48 +0100)
The cross dependencies in DPDK libraries would force us to conflict
with older ABI versions to avoid double ld.so resolution
(https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039659.html)

The conflicts would make the old versions and thereby the dependent
applications non-installable until there is a rebuild (as other updates
would do).
But for our case that would deny most benefits of version named
libraries.

Instead of adding a conflicts - whenever possible - provide a backward
compatible wrapper symlinking to the new (ABI compatible) implementation.

Change-Id: If9fa9cb9474ad0ac555bdf1a0c72f701ddaf2926
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/control
debian/libethdev4.links.in [new file with mode: 0644]
debian/librte-cryptodev1.links.in [new file with mode: 0644]
debian/librte-eal2.links.in [new file with mode: 0644]
debian/rules

index 5160a70..37c14d3 100644 (file)
@@ -782,3 +782,66 @@ Description: Data Plane Development Kit (librte_pdump runtime library)
  in user-space and communicate directly with dedicated network interfaces.
  .
  This package contains the runtime libraries for librte_pdump.
+
+# All following packages are for ABI compatibility to older releases.
+# Newer DPDK versions are ABI compatible to older ones for at least one release
+# and more if maintainable.
+#
+# The cross dependencies in DPDK libraries would otherwise force us to conflict
+# with older ABI versions to avoid double ld.so resolution
+# (https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039659.html).
+#
+# But the conflicts in debian/control would make the old versions and thereby
+# the dependent applications non-installable until there is a rebuild (as other
+# updates would do).
+# But for our case that would deny most benefits of version named libraries
+# (e.g. the ability to have both).
+#
+# Instead of adding conflicts fields - whenever possible - provide a backward
+# compatible wrapper symlinking to the new (ABI compatible) implementation.
+#
+# Still as soon as (all) dependendent packages are rebuilt these compat
+# wrappers can be autoremoved (apt will take care of that)
+
+Package: libethdev4
+Architecture: amd64 arm64 i386 ppc64el
+Multi-Arch: same
+Homepage: http://dpdk.org/doc/api/rte__ethdev_8h.html
+Pre-Depends: ${misc:Pre-Depends}
+Depends: librte-ethdev5, ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libdpdk0
+Description: Data Plane Development Kit (libethdev runtime library)
+ DPDK is a set of libraries for fast packet processing. Applications run
+ in user-space and communicate directly with dedicated network interfaces.
+ .
+ This package contains an ABI compatbility link for an older version of the
+ runtime libraries for libethdev.
+
+Package: librte-cryptodev1
+Architecture: amd64 arm64 i386 ppc64el
+Multi-Arch: same
+Homepage: http://dpdk.org/doc/api/rte__cryptodev_8h.html
+Pre-Depends: ${misc:Pre-Depends}
+Depends: librte-cryptodev2, ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libdpdk0
+Description: Data Plane Development Kit (librte-cryptodev runtime library)
+ DPDK is a set of libraries for fast packet processing. Applications run
+ in user-space and communicate directly with dedicated network interfaces.
+ .
+ This package contains an ABI compatbility link for an older version of the
+ the runtime libraries for librte_cryptodev.
+
+Package: librte-eal2
+Architecture: amd64 arm64 i386 ppc64el
+Multi-Arch: same
+Homepage: http://dpdk.org/doc/api/rte__eal_8h.html
+Pre-Depends: ${misc:Pre-Depends}
+Depends: librte-eal3, ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libdpdk0
+Description: Data Plane Development Kit (librte-eal runtime library)
+ DPDK is a set of libraries for fast packet processing. Applications run
+ in user-space and communicate directly with dedicated network interfaces.
+ .
+ This package contains an ABI compatbility link for an older version of the
+ runtime libraries for librte_eal.
+
diff --git a/debian/libethdev4.links.in b/debian/libethdev4.links.in
new file mode 100644 (file)
index 0000000..6f482f9
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH@/librte_ethdev.so.5 usr/lib/@DEB_HOST_MULTIARCH@/libethdev.so.4
diff --git a/debian/librte-cryptodev1.links.in b/debian/librte-cryptodev1.links.in
new file mode 100644 (file)
index 0000000..ddde252
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH@/librte_cryptodev.so.2 usr/lib/@DEB_HOST_MULTIARCH@/librte_cryptodev.so.1
diff --git a/debian/librte-eal2.links.in b/debian/librte-eal2.links.in
new file mode 100644 (file)
index 0000000..c6cd36a
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/@DEB_HOST_MULTIARCH@/librte_eal.so.3 usr/lib/@DEB_HOST_MULTIARCH@/librte_eal.so.2
index 4033b17..321f368 100755 (executable)
@@ -126,6 +126,12 @@ override_dh_auto_clean:
        sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control
        test -L config/defconfig_$(DPDK_CONFIG) && rm -f config/defconfig_$(DPDK_CONFIG) || true
 
+override_dh_clean:
+       dh_clean
+       rm -f debian/libethdev4.links
+       rm -f debian/librte-cryptodev1.links
+       rm -f debian/librte-eal2.links
+
 override_dh_auto_configure:
        # Add support for a custom defconfig file in the debian directory.
 ifneq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
@@ -264,6 +270,15 @@ ifneq (,$(KVERS))
                debian/dpdk-modules-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net
 endif
 
+debian/libethdev4.links: debian/libethdev4.links.in
+       sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@
+debian/librte-cryptodev1.links: debian/librte-cryptodev1.links.in
+       sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@
+debian/librte-eal2.links: debian/librte-eal2.links.in
+       sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@
+override_dh_link: debian/libethdev4.links debian/librte-cryptodev1.links debian/librte-eal2.links
+       dh_link
+
 override_dh_dkms:
        dh_dkms -V $(VERSION)