aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2023-09-20 12:01:20 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2023-10-18 20:55:04 +0000
commitec1260c3d0c5d8d13f36d23792053c86a5cf0384 (patch)
tree02f48e1bf43792a122074a456968d91e5347d91a
parentad671b01428494c3a278cbc3cdc55e918c0ffb4a (diff)
community/erlang: upgrade to 26.1.2
-rw-r--r--community/erlang/APKBUILD11
-rw-r--r--community/erlang/crypto-unload.patch98
2 files changed, 4 insertions, 105 deletions
diff --git a/community/erlang/APKBUILD b/community/erlang/APKBUILD
index df84dfa9dac..1746734195b 100644
--- a/community/erlang/APKBUILD
+++ b/community/erlang/APKBUILD
@@ -8,8 +8,8 @@
# catch up with. If in doubt, do a test rebuild of community/elixir.
pkgname=erlang
-pkgver=26.0.2
-pkgrel=1
+pkgver=26.1.2
+pkgrel=0
pkgdesc="General-purpose programming language and runtime environment"
url="https://www.erlang.org/"
license="Apache-2.0"
@@ -35,9 +35,7 @@ subpackages="$pkgname-dev
$pkgname-reltool:_mv_erlang_lib
$pkgname-wx:_mv_erlang_lib
"
-source="https://github.com/erlang/otp/releases/download/OTP-$pkgver/otp_src_$pkgver.tar.gz
- crypto-unload.patch
- "
+source="https://github.com/erlang/otp/releases/download/OTP-$pkgver/otp_src_$pkgver.tar.gz"
builddir="$srcdir/otp_src_$pkgver"
@@ -157,6 +155,5 @@ verifydeps() {
}
sha512sums="
-4affbd661cf444c3eadbc23e2cd4a494c953d97c0bb7ef1525f28d7a6b4a9abc1f2200f3e842f72d9a5e1dd18b1147a4433ae8038a75b86c4f7fa843d6035d22 otp_src_26.0.2.tar.gz
-e65ee5527e711225d8c595965b60d6d22dfb6b803d61daa108f465597366c517e858f182226a7eac6d5b0cd66fddff6df1446baeb781e50997dc1957127b2495 crypto-unload.patch
+02e7fe5686e549582f32b8545dbc80227f7a505903d9ab469ef17340aa8920da3be5d1141b2f2a6f9d11842b74c173743ebd813fc6b5f0f6dfeb50294302819b otp_src_26.1.2.tar.gz
"
diff --git a/community/erlang/crypto-unload.patch b/community/erlang/crypto-unload.patch
deleted file mode 100644
index 206f63f12f0..00000000000
--- a/community/erlang/crypto-unload.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Patch-Source: https://github.com/erlang/otp/pull/7450
-https://github.com/erlang/otp/issues/7436
---
-From fae85c2e38795c4d681ca010fb28a559c21375df Mon Sep 17 00:00:00 2001
-From: Sverker Eriksson <sverker@erlang.org>
-Date: Wed, 28 Jun 2023 15:52:30 +0200
-Subject: [PATCH] crypto: Fix segv crash after purge-reload of crypto on musl
-
-Symptom: Different kind of segv crashes after crypto is loaded,
-purged and loaded again.
-
-Problem:
-dlclose on musl libc is a no-op.
-
-Mutex 'mtx_init_curve_types' was destroyed at unload and then not
-re-created at reload as static variable `library_initialized`
-in crypto.c is true because musl dlclose is a no-op and dlopen
-reuses the existing loaded crypto.so library with static variables
-intact.
----
- lib/crypto/c_src/algorithms.c | 17 ++++++++++++++---
- lib/crypto/c_src/algorithms.h | 3 ++-
- lib/crypto/c_src/crypto.c | 4 +++-
- 3 files changed, 19 insertions(+), 5 deletions(-)
-
-diff --git a/lib/crypto/c_src/algorithms.c b/lib/crypto/c_src/algorithms.c
-index 53b574af3aff..188b6c30a124 100644
---- a/lib/crypto/c_src/algorithms.c
-+++ b/lib/crypto/c_src/algorithms.c
-@@ -51,7 +51,6 @@ void init_rsa_opts_types(ErlNifEnv* env);
-
- void init_algorithms_types(ErlNifEnv* env)
- {
-- mtx_init_curve_types = enif_mutex_create("init_curve_types");
- #ifdef HAS_3_0_API
- #else
- init_hash_types(env);
-@@ -62,9 +61,21 @@ void init_algorithms_types(ErlNifEnv* env)
- /* ciphers and macs are initiated statically */
- }
-
--void cleanup_algorithms_types(ErlNifEnv* env)
-+
-+int create_curve_mutex(void)
-+{
-+ if (!mtx_init_curve_types) {
-+ mtx_init_curve_types = enif_mutex_create("init_curve_types");
-+ }
-+ return !!mtx_init_curve_types;
-+}
-+
-+void destroy_curve_mutex(void)
- {
-- enif_mutex_destroy(mtx_init_curve_types);
-+ if (mtx_init_curve_types) {
-+ enif_mutex_destroy(mtx_init_curve_types);
-+ mtx_init_curve_types = NULL;
-+ }
- }
-
- /*================================================================
-diff --git a/lib/crypto/c_src/algorithms.h b/lib/crypto/c_src/algorithms.h
-index 25e1db129955..3c22a9fccc42 100644
---- a/lib/crypto/c_src/algorithms.h
-+++ b/lib/crypto/c_src/algorithms.h
-@@ -23,8 +23,9 @@
-
- #include "common.h"
-
-+int create_curve_mutex(void);
-+void destroy_curve_mutex(void);
- void init_algorithms_types(ErlNifEnv* env);
--void cleanup_algorithms_types(ErlNifEnv* env);
-
- ERL_NIF_TERM hash_algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
- ERL_NIF_TERM pubkey_algorithms(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
-diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
-index a21e9aaf204c..f1ccacfbac79 100644
---- a/lib/crypto/c_src/crypto.c
-+++ b/lib/crypto/c_src/crypto.c
-@@ -214,6 +214,8 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
- if (!create_engine_mutex(env)) {
- return __LINE__;
- }
-+ if (!create_curve_mutex())
-+ return __LINE__;
-
- #ifdef HAS_3_0_API
- prov_cnt = 0;
-@@ -329,7 +331,7 @@ static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data,
- static void unload(ErlNifEnv* env, void* priv_data)
- {
- if (--library_refc == 0) {
-- cleanup_algorithms_types(env);
-+ destroy_curve_mutex();
- destroy_engine_mutex(env);
- }
-