Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package libraries to arch-specific directories #512

Merged
merged 2 commits into from
Jul 26, 2019

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Jul 25, 2019

Let's install libraries into the directories expected by Linux distributions when we prepare packages.

Debian-based systems use multiarch approach with shared libraries installed under /usr/lib/${compiler-target-triple}. This allows installation of libraries for multiple architectures simultaneously, hence the name. GCC makes it easy to obtain the target triple.

CentOS uses Filesystem Hierarchy Standard (well, it is Red Hat) which tells that packages should install libraries to /usr/lib64 on 64-bit systems and to /usr/lib on 32-bit ones. We support only one 64-bit architecture on Linux machines so we can check for it.

With these changes tools like pkg-config should work automatically because all libraries are installed to their expected places.

Let's install libraries into the directories expected by Linux
distributions when we prepare packages.

Debian-based systems use "multiarch" approach with shared libraries
installed under "/usr/lib/${compiler-target-triple}". This allows
installation of libraries for multiple architectures simulataneously,
hence the name. GCC makes it easy to obtain the target triple.

CentOS uses Filesystem Hierarchy Standard (well, it *is* Red Hat)
which tells that packages should install libraries to "/usr/lib64"
on 64-bit systems and to "/usr/lib" on 32-bit ones. We support only
one 64-bit architecture on Linux machines so we can check for it.

With these changes tools like "pkg-config" should work automatically
because all libraries are installed to their expected places.
@ilammy ilammy added the installation Installation of Themis core and wrapper packages label Jul 25, 2019
@ilammy ilammy requested a review from shadinua July 25, 2019 14:33
@vixentael
Copy link
Contributor

does this affect on compatibility for users that already have Themis installed?

Copy link
Collaborator

@Lagovas Lagovas left a comment

Choose a reason for hiding this comment

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

lgtm

@ilammy
Copy link
Collaborator Author

ilammy commented Jul 25, 2019

@vixentael,

does this affect on compatibility for users that already have Themis installed?

No, it does not. When upgrading Themis package 0.11 → 0.12 the package manager will remove the libraries from their old location and will put them into the new location. Both locations are in the search paths so any existing software using Themis will just find the libraries in their new locations. The old locations that we have been using are compatibility locations, and the new ones are canonical, proper locations.

Update pkg-config templates to use actual "libdir" and "includedir"
variables. Currently we expect them to be hardcoded and depend only
on the prefix, but that's not the case right now. Use the values
used by Makefile when installing. Now pkg-config files will have
correct paths when building multiarch packages.
@ilammy ilammy requested a review from storojs72 as a code owner July 26, 2019 05:51
Copy link
Contributor

@vixentael vixentael left a comment

Choose a reason for hiding this comment

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

👀

@ilammy ilammy merged commit 15da9f1 into cossacklabs:master Jul 26, 2019
@ilammy ilammy deleted the lib-paths branch July 26, 2019 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Installation of Themis core and wrapper packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants