-
Notifications
You must be signed in to change notification settings - Fork 145
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 Themis Core with BoringSSL #683
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8877deb
More accurate DEB dependencies
ilammy aea370f
More accurate RPM dependencies
ilammy 4afdd5c
Changelog entry
ilammy 3e58664
Build BoringSSL package with suffix
ilammy e9b616a
Exclude OpenSSL from dependencies of BoringSSL flavor
ilammy 19184fa
Make OpenSSL and BoringSSL packages conflicting
ilammy 793201b
Alternative dependencies for non-core packages
ilammy 4878bda
Accurate PHPThemis package dependencies
ilammy b1b7814
Changelog entries
ilammy b1ba750
Merge branch 'master' into boringssl-package
ilammy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -604,26 +604,44 @@ endif | |
# Packaging Themis Core: Linux distributions | ||
# | ||
|
||
ifeq ($(ENGINE),boringssl) | ||
ifeq ($(CRYPTO_ENGINE_LIB_PATH),) | ||
PACKAGE_EMBEDDED_BORINGSSL := yes | ||
endif | ||
endif | ||
|
||
COSSACKLABS_URL = https://www.cossacklabs.com | ||
MAINTAINER = "Cossack Labs Limited <[email protected]>" | ||
LICENSE_NAME = "Apache License Version 2.0" | ||
|
||
DEB_CODENAME := $(shell lsb_release -cs 2> /dev/null) | ||
DEB_ARCHITECTURE = `dpkg --print-architecture 2>/dev/null` | ||
ifneq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
# If we were using native Debian packaging, dpkg-shlibdeps could supply us with | ||
# accurate dependency information. However, we build packages manually, so we | ||
# use dependencies of "libssl-dev" as a proxy. Typically this is "libssl1.1". | ||
DEB_DEPENDENCIES += --depends $(shell apt-cache depends libssl-dev | grep 'Depends:' | cut -d: -f 2- | tr -d ' ') | ||
endif | ||
DEB_DEPENDENCIES += --conflicts $(OTHER_PACKAGE_NAME) | ||
DEB_DEPENDENCIES_DEV += --depends "$(PACKAGE_NAME) = $(VERSION)+$(OS_CODENAME)" | ||
ifneq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
DEB_DEPENDENCIES_DEV += --depends libssl-dev | ||
DEB_DEPENDENCIES_THEMISPP = --depends "$(DEB_DEV_PACKAGE_NAME) = $(VERSION)+$(OS_CODENAME)" | ||
DEB_DEPENDENCIES_JNI += --depends "$(PACKAGE_NAME) >= $(VERSION)+$(OS_CODENAME)" | ||
endif | ||
DEB_DEPENDENCIES_DEV += --conflicts $(OTHER_DEB_DEV_PACKAGE_NAME) | ||
DEB_DEPENDENCIES_THEMISPP = --depends "$(DEB_DEV_PACKAGE_NAME) (= $(VERSION)+$(OS_CODENAME)) | $(OTHER_DEB_DEV_PACKAGE_NAME) (= $(VERSION)+$(OS_CODENAME))" | ||
DEB_DEPENDENCIES_JNI += --depends "$(PACKAGE_NAME) (>= $(VERSION)+$(OS_CODENAME)) | $(OTHER_PACKAGE_NAME) >= ($(VERSION)+$(OS_CODENAME))" | ||
|
||
ifneq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
RPM_DEPENDENCIES += --depends openssl-libs | ||
endif | ||
RPM_DEPENDENCIES += --conflicts $(OTHER_PACKAGE_NAME) | ||
RPM_DEPENDENCIES_DEV += --depends "$(PACKAGE_NAME) = $(RPM_VERSION)-$(RPM_RELEASE_NUM)" | ||
ifneq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
RPM_DEPENDENCIES_DEV += --depends openssl-devel | ||
RPM_DEPENDENCIES_THEMISPP = --depends "$(RPM_DEV_PACKAGE_NAME) = $(RPM_VERSION)-$(RPM_RELEASE_NUM)" | ||
RPM_DEPENDENCIES_JNI += --depends "$(PACKAGE_NAME) >= $(RPM_VERSION)-$(RPM_RELEASE_NUM)" | ||
endif | ||
RPM_DEPENDENCIES_DEV += --conflicts $(OTHER_RPM_DEV_PACKAGE_NAME) | ||
RPM_DEPENDENCIES_THEMISPP = --depends "($(RPM_DEV_PACKAGE_NAME) = $(RPM_VERSION)-$(RPM_RELEASE_NUM) or $(OTHER_RPM_DEV_PACKAGE_NAME) = $(RPM_VERSION)-$(RPM_RELEASE_NUM))" | ||
RPM_DEPENDENCIES_JNI += --depends "($(PACKAGE_NAME) >= $(RPM_VERSION)-$(RPM_RELEASE_NUM) or $(OTHER_PACKAGE_NAME) >= $(RPM_VERSION)-$(RPM_RELEASE_NUM))" | ||
RPM_RELEASE_NUM = 1 | ||
|
||
OS_NAME := $(shell lsb_release -is 2>/dev/null || printf 'unknown') | ||
|
@@ -641,13 +659,26 @@ else ifeq ($(OS_NAME),$(filter $(OS_NAME),RedHatEnterpriseServer CentOS)) | |
RPM_LIBDIR := /$(shell [ $$(arch) == "x86_64" ] && echo "lib64" || echo "lib") | ||
endif | ||
|
||
PACKAGE_NAME = libthemis | ||
DEB_DEV_PACKAGE_NAME = libthemis-dev | ||
RPM_DEV_PACKAGE_NAME = libthemis-devel | ||
ifeq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
PACKAGE_SUFFIX = -boringssl | ||
endif | ||
PACKAGE_NAME = libthemis$(PACKAGE_SUFFIX) | ||
DEB_DEV_PACKAGE_NAME = $(PACKAGE_NAME)-dev | ||
RPM_DEV_PACKAGE_NAME = $(PACKAGE_NAME)-devel | ||
DEB_THEMISPP_PACKAGE_NAME = libthemispp-dev | ||
RPM_THEMISPP_PACKAGE_NAME = libthemispp-devel | ||
JNI_PACKAGE_NAME = libthemis-jni | ||
|
||
ifeq ($(PACKAGE_EMBEDDED_BORINGSSL),yes) | ||
OTHER_PACKAGE_NAME = libthemis | ||
OTHER_DEB_DEV_PACKAGE_NAME = libthemis-dev | ||
OTHER_RPM_DEV_PACKAGE_NAME = libthemis-devel | ||
else | ||
OTHER_PACKAGE_NAME = libthemis-boringssl | ||
OTHER_DEB_DEV_PACKAGE_NAME = libthemis-boringssl-dev | ||
OTHER_RPM_DEV_PACKAGE_NAME = libthemis-boringssl-devel | ||
endif | ||
|
||
PACKAGE_CATEGORY = security | ||
SHORT_DESCRIPTION = Data security library for network communication and data storage | ||
RPM_SUMMARY = Data security library for network communication and data storage. \ | ||
|
@@ -883,10 +914,11 @@ pkginfo: | |
|
||
PHP_VERSION_FULL:=$(shell php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;" 2>/dev/null) | ||
ifeq ($(OS_CODENAME),jessie) | ||
PHP_DEPENDENCIES:=php5 | ||
PHP_DEPENDENCIES += --depends php5 | ||
else | ||
PHP_DEPENDENCIES:=php$(PHP_VERSION_FULL) | ||
PHP_DEPENDENCIES += --depends php$(PHP_VERSION_FULL) | ||
endif | ||
PHP_DEPENDENCIES += --depends "$(PACKAGE_NAME) (>= $(VERSION)+$(OS_CODENAME)) | $(OTHER_PACKAGE_NAME) (>= $(VERSION)+$(OS_CODENAME))" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. magic 🧙♂️ |
||
|
||
PHP_PACKAGE_NAME:=libphpthemis-php$(PHP_VERSION_FULL) | ||
PHP_POST_INSTALL_SCRIPT:=./scripts/phpthemis_postinstall.sh | ||
|
@@ -906,7 +938,7 @@ deb_php: | |
--package $(BIN_PATH)/deb/$(PHP_PACKAGE_NAME)_$(NAME_SUFFIX) \ | ||
--architecture $(DEB_ARCHITECTURE) \ | ||
--version $(VERSION)+$(OS_CODENAME) \ | ||
--depends "$(PHP_DEPENDENCIES)" \ | ||
$(PHP_DEPENDENCIES) \ | ||
--deb-priority optional \ | ||
--after-install $(PHP_POST_INSTALL_SCRIPT) \ | ||
--before-remove $(PHP_PRE_UNINSTALL_SCRIPT) \ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, if engine is boringssl, we'll pack boringssl as embedded library by default, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
ENGINE=boringssl
andENGINE_LIB_PATH
is not set. That is, if the user has requested a build with BoringSSL from Themis submodule, not with some user-provided BoringSSL build from user-specified location.