Hello community, here is the log from the commit of package boringssl for openSUSE:Factory checked in at 2019-12-04 13:55:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/boringssl (Old) and /work/SRC/openSUSE:Factory/.boringssl.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "boringssl" Wed Dec 4 13:55:47 2019 rev:8 rq:753912 version:20190916 Changes: -------- --- /work/SRC/openSUSE:Factory/boringssl/boringssl.changes 2019-11-06 13:55:00.188084705 +0100 +++ /work/SRC/openSUSE:Factory/.boringssl.new.4691/boringssl.changes 2019-12-04 14:21:04.798473536 +0100 @@ -1,0 +2,13 @@ +Wed Dec 4 07:55:10 UTC 2019 - Klaus Kämpf <[email protected]> + +- fix s390x and ppc64le build + * 0003-enable-s390x-builds.patch + * 0004-fix-alignment-for-ppc64le.patch + +- rename add-soversion-option.patch + to 0001-add-soversion-option.patch + +- rename 0001-crypto-Fix-aead_test-build-on-aarch64.patch + to 0002-crypto-Fix-aead_test-build-on-aarch64.patch + +------------------------------------------------------------------- Old: ---- 0001-crypto-Fix-aead_test-build-on-aarch64.patch add-soversion-option.patch New: ---- 0001-add-soversion-option.patch 0002-crypto-Fix-aead_test-build-on-aarch64.patch 0003-enable-s390x-builds.patch 0004-fix-alignment-for-ppc64le.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ boringssl.spec ++++++ --- /var/tmp/diff_new_pack.yzqm8c/_old 2019-12-04 14:21:05.358474008 +0100 +++ /var/tmp/diff_new_pack.yzqm8c/_new 2019-12-04 14:21:05.358474008 +0100 @@ -25,14 +25,16 @@ License: OpenSSL URL: https://boringssl.googlesource.com/boringssl/ Source: %{name}-%{version}.tar.xz -Patch0: add-soversion-option.patch -Patch1: 0001-crypto-Fix-aead_test-build-on-aarch64.patch +Patch1: 0001-add-soversion-option.patch +Patch2: 0002-crypto-Fix-aead_test-build-on-aarch64.patch +Patch3: 0003-enable-s390x-builds.patch +Patch4: 0004-fix-alignment-for-ppc64le.patch BuildRequires: cmake >= 3.0 BuildRequires: gcc-c++ BuildRequires: go BuildRequires: libunwind-devel BuildRequires: ninja -ExclusiveArch: %{ix86} x86_64 aarch64 +ExclusiveArch: %{ix86} x86_64 aarch64 s390x ppc64le %description BoringSSL is an implementation of the Secure Sockets Layer (SSL) and @@ -57,8 +59,10 @@ %prep %setup -q -%patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %define _lto_cflags %{nil} ++++++ 0001-add-soversion-option.patch ++++++ >From e23b950bc30e196937861b7b167a5f520c8b2118 Mon Sep 17 00:00:00 2001 From: Michal Rostecki <[email protected]> Date: Tue, 6 Nov 2018 20:29:25 +0100 Subject: [PATCH] cmake: Add SOVERSION option The SOVERSION option allows to version the shared library. Version defined there is 0 and the versioned library files have extension `so.0`. Optional soversion is helpful for packaging and making a difference between `lib*` package (which contains `.so.0` file) and `*-devel` package (which contains `.so` file). Change-Id: If52a0657de0f524a2c40cb51a6e9c36aac87024d --- BUILDING.md | 3 +++ CMakeLists.txt | 8 ++++++++ crypto/CMakeLists.txt | 6 ++++++ decrepit/CMakeLists.txt | 6 ++++++ ssl/CMakeLists.txt | 6 ++++++ 5 files changed, 29 insertions(+) Index: boringssl-20190916/BUILDING.md =================================================================== --- boringssl-20190916.orig/BUILDING.md +++ boringssl-20190916/BUILDING.md @@ -78,6 +78,9 @@ Windows, where functions need to be tagg shared library, define `BORINGSSL_SHARED_LIBRARY` in any code which `#include`s the BoringSSL headers. +If you want to build a shared library with versioned `.so` files (`.so.0`), pass +`-DSOVERSION=1`. + In order to serve environments where code-size is important as well as those where performance is the overriding concern, `OPENSSL_SMALL` can be defined to remove some code that is especially large. Index: boringssl-20190916/CMakeLists.txt =================================================================== --- boringssl-20190916.orig/CMakeLists.txt +++ boringssl-20190916/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.0) +set(boringssl_SOVERSION 1) + # Defer enabling C and CXX languages. project(BoringSSL NONE) @@ -536,6 +538,12 @@ endif() # Add minimal googletest targets. The provided one has many side-effects, and # googletest has a very straightforward build. add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc) +if(BUILD_SHARED_LIBS AND SOVERSION) + set_target_properties( + boringssl_gtest PROPERTIES + SOVERSION ${boringssl_SOVERSION} + ) +endif() target_include_directories(boringssl_gtest PRIVATE third_party/googletest) include_directories(third_party/googletest/include) Index: boringssl-20190916/crypto/CMakeLists.txt =================================================================== --- boringssl-20190916.orig/crypto/CMakeLists.txt +++ boringssl-20190916/crypto/CMakeLists.txt @@ -420,6 +420,12 @@ add_library( ${CRYPTO_ARCH_SOURCES} ${CRYPTO_FIPS_OBJECTS} ) +if(BUILD_SHARED_LIBS AND SOVERSION) + set_target_properties( + crypto PROPERTIES + SOVERSION ${boringssl_SOVERSION} + ) +endif() if(FIPS_SHARED) # Rewrite libcrypto.so to inject the correct module hash value. This assumes Index: boringssl-20190916/decrepit/CMakeLists.txt =================================================================== --- boringssl-20190916.orig/decrepit/CMakeLists.txt +++ boringssl-20190916/decrepit/CMakeLists.txt @@ -21,6 +21,12 @@ add_library( x509/x509_decrepit.c xts/xts.c ) +if(BUILD_SHARED_LIBS AND SOVERSION) + set_target_properties( + decrepit PROPERTIES + SOVERSION ${boringssl_SOVERSION} + ) +endif() add_dependencies(decrepit global_target) Index: boringssl-20190916/ssl/CMakeLists.txt =================================================================== --- boringssl-20190916.orig/ssl/CMakeLists.txt +++ boringssl-20190916/ssl/CMakeLists.txt @@ -40,6 +40,12 @@ add_library( tls13_enc.cc tls13_server.cc ) +if(BUILD_SHARED_LIBS AND SOVERSION) + set_target_properties( + ssl PROPERTIES + SOVERSION ${boringssl_SOVERSION} + ) +endif() add_dependencies(ssl global_target) ++++++ 0001-crypto-Fix-aead_test-build-on-aarch64.patch -> 0002-crypto-Fix-aead_test-build-on-aarch64.patch ++++++ ++++++ 0003-enable-s390x-builds.patch ++++++ >From 47c30871e5c56a2d6578fedd89e52b10e5580558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <[email protected]> Date: Wed, 4 Dec 2019 08:19:54 +0100 Subject: [PATCH 3/4] enable s390x builds similar to the aarch64 patch, covering - recognition of architecture - adapting memory alignment --- CMakeLists.txt | 2 ++ crypto/cipher_extra/aead_test.cc | 2 ++ crypto/poly1305/poly1305_test.cc | 9 +++++++-- include/openssl/base.h | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c06b700e5144..80c9383b9af8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -469,6 +469,8 @@ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips") set(ARCH "generic") elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc64le") set(ARCH "ppc64le") +elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "s390x") + set(ARCH "s390x") else() message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR}) endif() diff --git a/crypto/cipher_extra/aead_test.cc b/crypto/cipher_extra/aead_test.cc index fd20ebc77b67..4c079e843321 100644 --- a/crypto/cipher_extra/aead_test.cc +++ b/crypto/cipher_extra/aead_test.cc @@ -31,6 +31,8 @@ #if defined(OPENSSL_AARCH64) #define ALIGN_BYTES 16 +#elif defined(OPENSSL_S390X) +#define ALIGN_BYTES 8 #else #define ALIGN_BYTES 64 #endif diff --git a/crypto/poly1305/poly1305_test.cc b/crypto/poly1305/poly1305_test.cc index 198cca12dae5..43cd95c8eb86 100644 --- a/crypto/poly1305/poly1305_test.cc +++ b/crypto/poly1305/poly1305_test.cc @@ -25,6 +25,11 @@ #include "../test/file_test.h" #include "../test/test_util.h" +#if defined(OPENSSL_S390X) +#define ALIGN_BYTES 8 +#else +#define ALIGN_BYTES 16 +#endif static void TestSIMD(unsigned excess, const std::vector<uint8_t> &key, const std::vector<uint8_t> &in, @@ -63,7 +68,7 @@ static void TestSIMD(unsigned excess, const std::vector<uint8_t> &key, CRYPTO_poly1305_update(&state, in.data() + done, in.size() - done); // |CRYPTO_poly1305_finish| requires a 16-byte-aligned output. - alignas(16) uint8_t out[16]; + alignas(ALIGN_BYTES) uint8_t out[16]; CRYPTO_poly1305_finish(&state, out); EXPECT_EQ(Bytes(out), Bytes(mac)) << "SIMD pattern " << excess << " failed."; } @@ -82,7 +87,7 @@ TEST(Poly1305Test, TestVectors) { CRYPTO_poly1305_init(&state, key.data()); CRYPTO_poly1305_update(&state, in.data(), in.size()); // |CRYPTO_poly1305_finish| requires a 16-byte-aligned output. - alignas(16) uint8_t out[16]; + alignas(ALIGN_BYTES) uint8_t out[16]; CRYPTO_poly1305_finish(&state, out); EXPECT_EQ(Bytes(out), Bytes(mac)) << "Single-shot Poly1305 failed."; diff --git a/include/openssl/base.h b/include/openssl/base.h index cb1affacacce..2e29644ceadf 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -99,6 +99,9 @@ extern "C" { #elif (defined(__PPC64__) || defined(__powerpc64__)) && defined(_LITTLE_ENDIAN) #define OPENSSL_64_BIT #define OPENSSL_PPC64LE +#elif defined(__S390X__) || defined(__s390x__) +#define OPENSSL_64_BIT +#define OPENSSL_S390X #elif defined(__mips__) && !defined(__LP64__) #define OPENSSL_32_BIT #define OPENSSL_MIPS -- 2.24.0 ++++++ 0004-fix-alignment-for-ppc64le.patch ++++++ >From c1f2622b3431ba2b57d1ba78695d40fad16ed2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <[email protected]> Date: Wed, 4 Dec 2019 08:23:17 +0100 Subject: [PATCH 4/4] fix alignment for ppc64le --- crypto/cipher_extra/aead_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/cipher_extra/aead_test.cc b/crypto/cipher_extra/aead_test.cc index 4c079e843321..2c7e116a4aad 100644 --- a/crypto/cipher_extra/aead_test.cc +++ b/crypto/cipher_extra/aead_test.cc @@ -29,7 +29,7 @@ #include "../test/test_util.h" #include "../test/wycheproof_util.h" -#if defined(OPENSSL_AARCH64) +#if defined(OPENSSL_AARCH64) || defined(OPENSSL_PPC64LE) #define ALIGN_BYTES 16 #elif defined(OPENSSL_S390X) #define ALIGN_BYTES 8 -- 2.24.0
