Skip to content

Conversation

@jirkasilhan
Copy link

Adds current version for correct transitive dependencies.

Without this patch shlib file doesnt contain minimal compatible version of cassandra-cpp-driver and transitive dependencies may be broken.

@mpenick
Copy link
Contributor

mpenick commented Apr 29, 2019

Thanks! I'll take a look today and get this merged in.

@jirkasilhan
Copy link
Author

Ok, i'm looking forward for the merge...

Copy link
Contributor

@mpenick mpenick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, What Debian-based system are you using? On Ubuntu 18.04 this seems to run dh_makeshlibs properly. The Depends: looks the same with or without this change, but I'm not super familiar with deb packaging.

Depends: libc6 (>= 2.17), libgcc1 (>= 1:3.0), libssl1.1 (>= 1.1.0), libstdc++6 (>= 5), libuv1

sed -i s/@DEB_VERSION_UPSTREAM@/$(DEB_VERSION_UPSTREAM)/ debian/cassandra-cpp-driver-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*.pc

override_dh_makeshlibs:
dh_makeshlibs -V
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a tab here instead of spaces for maximum compatibility. I get an error on my system.

 fakeroot debian/rules clean
debian/rules:36: *** missing separator.  Stop.
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1152:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is not fix of driver dependencies. It fixes the generation of shlibs file distributed in driver package.

Default behavior of makeshlibs depends on convention of placing major version of library in binary package name - i.e.- for development package mylib-dev with version 1.2.3 you have binary package named mylib1.

This convention solves the problem of linking binary incompatible versions of library to your executable, so you can make dependency on mylib based just on the package name (mylib1). This is default behaviour of dh_makeshlibs - it will generate file of dependencies and name of binary package.

But this is different in cassandra cpp driver - you have binary incompatible versions with same package name (but different version). In this case, you need to set the version of driver in shlibs file - so dependent packages will depend on version which was used during their build.

I will fix the tabs/spaces...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, whitespace is fixed...

…version for correct transitive dependencies.
@mpenick mpenick merged commit 7dab135 into datastax:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants