On 2015-05-29, Stuart Henderson s...@spacehopper.org wrote:
On 2015-05-28, Peter Fraser p...@thinkage.ca wrote:
Asterisk seems to run fine on 5.7 with one exception.
I normally have voice mail messages send as emails.
These emails are not being send.
It's fixed in -current, for 5.7 try adding this to modules.conf and
restarting asterisk:
noload = res_xmpp.so
There is a chance that additional noload lines may be needed for anything
else that uses p11-kit.
Alternatively I can put together a diff for p11-kit to work around it.
p11-kit diff here, I think this ought to do the trick, though running
-current may be easier ;)
Index: Makefile
===
RCS file: /cvs/ports/security/p11-kit/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile12 Oct 2014 06:16:19 - 1.39
+++ Makefile29 May 2015 21:55:24 -
@@ -7,6 +7,7 @@ SHARED_ONLY=Yes
COMMENT= library for loading and enumurating of PKCS\#11 modules
DISTNAME= p11-kit-0.22.1
+REVISION= 0
CATEGORIES=security
Index: patches/patch-common_library_c
===
RCS file: patches/patch-common_library_c
diff -N patches/patch-common_library_c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-common_library_c 29 May 2015 21:55:24 -
@@ -0,0 +1,35 @@
+$OpenBSD$
+--- common/library.c.orig Fri Oct 3 19:58:34 2014
common/library.c Fri May 29 22:52:42 2015
+@@ -63,8 +63,6 @@ p11_mutex_t p11_library_mutex;
+ pthread_once_t p11_library_once = PTHREAD_ONCE_INIT;
+ #endif
+
+-unsigned int p11_forkid = 1;
+-
+ static char *
+ thread_local_message (void)
+ {
+@@ -105,13 +103,6 @@ _p11_library_get_thread_local (void)
+ return local;
+ }
+
+-static void
+-count_forks (void)
+-{
+- /* Thread safe, executed in child, one thread exists */
+- p11_forkid++;
+-}
+-
+ void
+ p11_library_init_impl (void)
+ {
+@@ -120,8 +111,6 @@ p11_library_init_impl (void)
+ p11_mutex_init (p11_library_mutex);
+ pthread_key_create (thread_local, free);
+ p11_message_storage = thread_local_message;
+-
+- pthread_atfork (NULL, NULL, count_forks);
+ }
+
+ void
Index: patches/patch-common_library_h
===
RCS file: patches/patch-common_library_h
diff -N patches/patch-common_library_h
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-common_library_h 29 May 2015 21:55:24 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- common/library.h.orig Fri Oct 3 19:58:34 2014
common/library.h Fri May 29 22:52:42 2015
+@@ -44,8 +44,6 @@
+
+ extern p11_mutex_t p11_library_mutex;
+
+-extern unsigned int p11_forkid;
+-
+ #define p11_lock() p11_mutex_lock
(p11_library_mutex);
+
+ #define p11_unlock() p11_mutex_unlock
(p11_library_mutex);
Index: patches/patch-common_mock_c
===
RCS file: patches/patch-common_mock_c
diff -N patches/patch-common_mock_c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-common_mock_c 29 May 2015 21:55:24 -
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- common/mock.c.orig Mon Oct 6 06:29:32 2014
common/mock.c Fri May 29 22:52:42 2015
+@@ -46,7 +46,6 @@
+ #include debug.h
+ #include dict.h
+ #include array.h
+-#include library.h
+
+ #include assert.h
+ #include ctype.h
Index: patches/patch-p11-kit_modules_c
===
RCS file: patches/patch-p11-kit_modules_c
diff -N patches/patch-p11-kit_modules_c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ patches/patch-p11-kit_modules_c 29 May 2015 21:55:24 -
@@ -0,0 +1,152 @@
+$OpenBSD$
+--- p11-kit/modules.c.orig Mon Oct 6 06:29:32 2014
p11-kit/modules.c Fri May 29 22:52:42 2015
+@@ -158,7 +158,7 @@ typedef struct _Module {
+
+ /* Initialization, mutex must be held */
+ p11_mutex_t initialize_mutex;
+- unsigned int initialize_called;
++ bool initialize_called;
+ p11_thread_id_t initialize_thread;
+ } Module;
+
+@@ -247,6 +247,7 @@ free_module_unlocked (void *data)
+ p11_debug_precond (module unloaded without C_Finalize having
been
+ called for each C_Initialize);
+ } else {
++ assert (!mod-initialize_called);
+ assert (mod-initialize_thread == 0);
+ }
+
+@@ -632,7 +633,7 @@ initialize_module_inlock_reentrant (Module *mod)
+ p11_unlock ();
+ p11_mutex_lock (mod-initialize_mutex);
+
+- if (mod-initialize_called != p11_forkid) {
++ if (!mod-initialize_called) {
+ p11_debug (C_Initialize: calling);
+
+ rv = mod-virt.funcs.C_Initialize (mod-virt.funcs,
+@@ -642,12 +643,10 @@ initialize_module_inlock_reentrant (Module *mod)
+
+ /* Module was