aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2023-07-30 00:24:21 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2023-08-01 17:17:16 +0200
commit8167714d9cc4a418f36d5603b6d5d6a677a04bb4 (patch)
tree0fd42dd6e5187e8cfb84ae532b46a9f00a8c6e0a
parent4731320c0efc12c22283f263106be1c0195467e6 (diff)
downloadhardware_replicant_libsamsung-ipc-8167714d9cc4a418f36d5603b6d5d6a677a04bb4.tar.gz
hardware_replicant_libsamsung-ipc-8167714d9cc4a418f36d5603b6d5d6a677a04bb4.tar.bz2
hardware_replicant_libsamsung-ipc-8167714d9cc4a418f36d5603b6d5d6a677a04bb4.zip
scripts: guix.scm: switch from OpenSSL to LibreSSL
Without that fix, it links against OpenSSL 3.0 which deprecated MD5_Init, MD5_Update and MD5_Final. And so we end up with warnings like that: samsung-ipc/rfs.c: In function ‘ipc_nv_data_md5_calculate’: samsung-ipc/rfs.c:75:9: error: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] [...] samsung-ipc/rfs.c:76:9: error: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] [...] samsung-ipc/rfs.c:78:9: error: ‘MD5_Final’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] but since we use -Werror the build fails. If we simply update libsamsung-ipc to use the newer OpenSSL API, then it will not compile anymore on older Android versions. So to update libsamsung-ipc we would need to be compatible with both older and newer OpenSSL APIs, and that requires a bit more work. So if we don't want to do that work now, we need a drop-in replacement package that implements the old OpenSSL API. In addition using OpenSSL 3.x also bring up licensing consideration as OpenSSL 3.x versions have changed license from the OpenSSL license (which was compatible with the GPLv2) to the Apache 2.0 license (which is only compatible with the GPLv3). So that can limit the integration of libsamsung-ipc into daemons like oFono that don't want to link against GPLv3+ libraries. To avoid these downsides we have the choice between two drop-in replacement packages: openssl-1.1 and libressl. Since OpenSSL 1.1.1 will be supported until the 11th September 2023[1], we use LibreSSL in the hope that they will keep the MD5_* interfaces longer. [1]https://www.openssl.org/source/ Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--scripts/guix.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/guix.scm b/scripts/guix.scm
index bc2f7c3..6343208 100644
--- a/scripts/guix.scm
+++ b/scripts/guix.scm
@@ -175,7 +175,7 @@
python
python-sh
valgrind))
- (inputs (list curl openssl))
+ (inputs (list curl libressl))
(arguments
(list #:phases #~(modify-phases %standard-phases
(add-before 'build 'fix-valgrind
@@ -218,8 +218,9 @@ found in many Samsung smartphones and tablets.")
pkg-config
python
python-sh))
- (inputs (list curl openssl
- `(,(canonical-package openssl) "static")))
+ ;; The libressl package contains .a in
+ ;; /gnu/store/[...]-libressl-[...]/lib/*.a
+ (inputs (list curl libressl))
(arguments
(list #:modules '((ice-9 popen)
(ice-9 rdelim)
@@ -267,7 +268,7 @@ found in many Samsung smartphones and tablets.")
(inherit libsamsung-ipc)
(name "libsamsung-ipc-gcc-android")
(build-system android-ndk-build-system)
- (inputs (list android-libutils curl openssl))
+ (inputs (list android-libutils curl libressl))
(native-inputs '())
(arguments
(list #:make-flags #~(list #$%common-strict-cflags
@@ -304,7 +305,7 @@ found in many Samsung smartphones and tablets.")
(inherit libsamsung-ipc)
(name "libsamsung-ipc-clang-android")
(build-system android-ndk-build-system)
- (inputs (list android-libutils clang curl openssl))
+ (inputs (list android-libutils clang curl libressl))
(native-inputs '())
(arguments
(list #:make-flags #~(list #$%common-strict-cflags