From 40e60aeab204863f3353ce21759c0341c6f277bc Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 23 Nov 2019 22:00:02 +0100 Subject: [PATCH] p11-kit: bump version. 5 tests failed. --- ....23.12.recipe => p11_kit-0.23.18.1.recipe} | 8 +- ...12.patchset => p11_kit-0.23.18.1.patchset} | 111 +++++++++--------- 2 files changed, 63 insertions(+), 56 deletions(-) rename app-crypt/p11-kit/{p11_kit-0.23.12.recipe => p11_kit-0.23.18.1.recipe} (96%) rename app-crypt/p11-kit/patches/{p11_kit-0.23.12.patchset => p11_kit-0.23.18.1.patchset} (71%) diff --git a/app-crypt/p11-kit/p11_kit-0.23.12.recipe b/app-crypt/p11-kit/p11_kit-0.23.18.1.recipe similarity index 96% rename from app-crypt/p11-kit/p11_kit-0.23.12.recipe rename to app-crypt/p11-kit/p11_kit-0.23.18.1.recipe index b6b6d71a9..44ce1b655 100644 --- a/app-crypt/p11-kit/p11_kit-0.23.12.recipe +++ b/app-crypt/p11-kit/p11_kit-0.23.18.1.recipe @@ -7,7 +7,7 @@ COPYRIGHT="2017 Red Hat, Inc." LICENSE="BSD (3-clause)" REVISION="1" SOURCE_URI="https://github.com/p11-glue/p11-kit/releases/download/$portVersion/p11-kit-$portVersion.tar.gz" -CHECKSUM_SHA256="58bae22f19db1de1a1103e7ca4149eed6e303e727878c2cd5ea9e6fe445fd403" +CHECKSUM_SHA256="34c3bd8c0050dd7c4e6228aecf0f168de0a1b34562ddbf74a1c70904c2523c6f" SOURCE_DIR="p11-kit-$portVersion" PATCHES="p11_kit-$portVersion.patchset" @@ -54,6 +54,7 @@ BUILD_REQUIRES=" devel:libtasn1$secondaryArchSuffix " BUILD_PREREQUIRES=" + cmd:autoconf cmd:aclocal cmd:awk cmd:find @@ -123,3 +124,8 @@ INSTALL() packageEntries devel \ $developDir } + +TEST() +{ + make check +} diff --git a/app-crypt/p11-kit/patches/p11_kit-0.23.12.patchset b/app-crypt/p11-kit/patches/p11_kit-0.23.18.1.patchset similarity index 71% rename from app-crypt/p11-kit/patches/p11_kit-0.23.12.patchset rename to app-crypt/p11-kit/patches/p11_kit-0.23.18.1.patchset index db73f167e..9ee289853 100644 --- a/app-crypt/p11-kit/patches/p11_kit-0.23.12.patchset +++ b/app-crypt/p11-kit/patches/p11_kit-0.23.18.1.patchset @@ -1,4 +1,4 @@ -From 4ed9659faca9f08a3c7c127b3e8c0e92a25b39f9 Mon Sep 17 00:00:00 2001 +From 9b14c97533a276e797732ad11dd0b653a9015bcd Mon Sep 17 00:00:00 2001 From: sfanxiang Date: Tue, 2 Jan 2018 12:51:02 +0000 Subject: port to Haiku @@ -17,7 +17,7 @@ index 7fe2eea..f4c6789 100644 #ifdef HAVE_UCRED_H # include diff --git a/p11-kit/server.c b/p11-kit/server.c -index e64890c..c02aec0 100644 +index 75b93d6..0e0d806 100644 --- a/p11-kit/server.c +++ b/p11-kit/server.c @@ -56,6 +56,7 @@ @@ -28,50 +28,50 @@ index e64890c..c02aec0 100644 #include #include #include -@@ -271,7 +272,7 @@ create_socket (const char *address, +@@ -279,7 +280,7 @@ create_socket (const char *address, } umask (066); - rc = bind (sd, (struct sockaddr *)&sa, SUN_LEN (&sa)); + rc = bind (sd, (struct sockaddr *)&sa, sizeof(sa)); if (rc == -1) { - p11_message_err (errno, "could not create socket %s", socket_file); - return -1; + close (sd); + p11_message_err (errno, "could not bind socket %s", socket_file); -- -2.15.0 +2.24.0 -From 2aec2e7ee7fb0f360ccff22578a2a05e04a04b21 Mon Sep 17 00:00:00 2001 +From 8ac008f97dc467957b5a10f62a8f0465df355fcd Mon Sep 17 00:00:00 2001 From: sfanxiang Date: Tue, 2 Jan 2018 14:38:35 +0000 Subject: fix frob_setuid dependency diff --git a/Makefile.in b/Makefile.in -index 1df290e..d425140 100644 +index d70782f..ca9f404 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -591,7 +591,7 @@ am_frob_setuid_OBJECTS = p11-kit/frob-setuid.$(OBJEXT) - frob_setuid_OBJECTS = $(am_frob_setuid_OBJECTS) +@@ -621,7 +621,7 @@ am_p11_kit_frob_setuid_OBJECTS = p11-kit/frob-setuid.$(OBJEXT) + p11_kit_frob_setuid_OBJECTS = $(am_p11_kit_frob_setuid_OBJECTS) am__DEPENDENCIES_6 = libp11-kit-testable.la libp11-test.la \ libp11-common.la $(am__DEPENDENCIES_1) --frob_setuid_DEPENDENCIES = $(am__DEPENDENCIES_6) -+frob_setuid_DEPENDENCIES = $(am__DEPENDENCIES_6) libp11-library.la - am__frob_token_SOURCES_DIST = trust/frob-token.c - @WITH_TRUST_MODULE_TRUE@am_frob_token_OBJECTS = \ - @WITH_TRUST_MODULE_TRUE@ trust/frob_token-frob-token.$(OBJEXT) +-p11_kit_frob_setuid_DEPENDENCIES = $(am__DEPENDENCIES_6) ++p11_kit_frob_setuid_DEPENDENCIES = $(am__DEPENDENCIES_6) libp11-library.la + am_p11_kit_p11_kit_OBJECTS = p11-kit/lists.$(OBJEXT) \ + p11-kit/p11-kit.$(OBJEXT) $(am__objects_1) + p11_kit_p11_kit_OBJECTS = $(am_p11_kit_p11_kit_OBJECTS) -- -2.15.0 +2.24.0 -From 92abf95c6d47aa20b2441f6bbb02737d31671fbe Mon Sep 17 00:00:00 2001 +From c47bcefb32515b71b151b3c354d17ebe7aa5c85f Mon Sep 17 00:00:00 2001 From: sfanxiang Date: Wed, 3 Jan 2018 13:57:49 +0000 Subject: avoid segfault caused by ffi closures diff --git a/p11-kit/virtual.c b/p11-kit/virtual.c -index 67b3eed..4ac86b8 100644 +index a7bca48..c4e92f9 100644 --- a/p11-kit/virtual.c +++ b/p11-kit/virtual.c @@ -65,6 +65,10 @@ @@ -86,10 +86,10 @@ index 67b3eed..4ac86b8 100644 #define MAX_FUNCTIONS 66 #define MAX_ARGS 10 -- -2.15.0 +2.24.0 -From 9ccbe8f3a7939e94e75a5a14900abe142e2cbeea Mon Sep 17 00:00:00 2001 +From 8b646b6c3ca9b07d685b4874459b8c876a19bbe2 Mon Sep 17 00:00:00 2001 From: sfanxiang Date: Thu, 4 Jan 2018 12:42:37 +0000 Subject: use __thread instead of pthread_getspecific() @@ -100,7 +100,7 @@ in this program, but doing the same with __thread doesn't. This is just a workaround. diff --git a/common/library.c b/common/library.c -index 1f0ba41..bd70df1 100644 +index c1275f3..5b69965 100644 --- a/common/library.c +++ b/common/library.c @@ -58,8 +58,6 @@ typedef struct { @@ -109,10 +109,10 @@ index 1f0ba41..bd70df1 100644 -static p11_local * _p11_library_get_thread_local (void); - - p11_mutex_t p11_library_mutex; + #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + p11_mutex_t p11_library_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - p11_mutex_t p11_virtual_mutex; -@@ -77,9 +75,8 @@ extern locale_t p11_message_locale; +@@ -85,9 +83,8 @@ extern locale_t p11_message_locale; static char * thread_local_message (void) { @@ -124,12 +124,12 @@ index 1f0ba41..bd70df1 100644 } static char * -@@ -96,24 +93,6 @@ uninit_common (void) - - #ifdef OS_UNIX - +@@ -119,23 +116,7 @@ _p11_library_get_thread_local (void) + return &local; + } + #else -static pthread_key_t thread_local = 0; -- + -static p11_local * -_p11_library_get_thread_local (void) -{ @@ -145,50 +145,51 @@ index 1f0ba41..bd70df1 100644 - - return local; -} -- + #endif + static void - count_forks (void) - { -@@ -128,7 +107,6 @@ p11_library_init_impl (void) - p11_debug ("initializing library"); - p11_mutex_init (&p11_library_mutex); - p11_mutex_init (&p11_virtual_mutex); +@@ -153,7 +134,6 @@ p11_library_init_impl (void) + P11_RECURSIVE_MUTEX_INIT (p11_library_mutex); + P11_RECURSIVE_MUTEX_INIT (p11_virtual_mutex); + #ifndef P11_TLS_KEYWORD - pthread_key_create (&thread_local, free); + #endif p11_message_storage = thread_local_message; #ifdef HAVE_STRERROR_L - p11_message_locale = newlocale (LC_ALL_MASK, "POSIX", (locale_t) 0); -@@ -148,15 +126,10 @@ p11_library_uninit (void) - { +@@ -175,9 +155,6 @@ p11_library_uninit (void) uninit_common (); + #ifndef P11_TLS_KEYWORD - /* Some cleanup to pacify valgrind */ - free (pthread_getspecific (thread_local)); - pthread_setspecific (thread_local, NULL); -- + #endif + #ifdef HAVE_STRERROR_L - freelocale (p11_message_locale); +@@ -185,7 +162,6 @@ p11_library_uninit (void) #endif p11_message_storage = dont_store_message; + #ifndef P11_TLS_KEYWORD - pthread_key_delete (thread_local); + #endif p11_mutex_uninit (&p11_virtual_mutex); p11_mutex_uninit (&p11_library_mutex); - } -- -2.15.0 +2.24.0 -From dcfe67ade5775de359887eb6dca4e178fd133b6f Mon Sep 17 00:00:00 2001 +From 2b19ec4b17ced537506f7f417149949aac72259c Mon Sep 17 00:00:00 2001 From: sfanxiang Date: Thu, 4 Jan 2018 13:40:33 +0000 Subject: trust/save: don't use hard links on Haiku diff --git a/trust/save.c b/trust/save.c -index abff864..7efc30a 100644 +index bb77348..2946a42 100644 --- a/trust/save.c +++ b/trust/save.c -@@ -166,7 +166,7 @@ filo_free (p11_save_file *file) - free (file); +@@ -184,7 +184,7 @@ dir_free (p11_save_dir *dir) { + free (dir); } -#ifdef OS_UNIX @@ -196,7 +197,7 @@ index abff864..7efc30a 100644 static int on_unique_try_link (void *data, -@@ -184,7 +184,7 @@ on_unique_try_link (void *data, +@@ -202,7 +202,7 @@ on_unique_try_link (void *data, return 1; /* All done */ } @@ -205,7 +206,7 @@ index abff864..7efc30a 100644 static int on_unique_try_rename (void *data, -@@ -204,7 +204,7 @@ on_unique_try_rename (void *data, +@@ -222,7 +222,7 @@ on_unique_try_rename (void *data, return 1; /* All done */ } @@ -214,7 +215,7 @@ index abff864..7efc30a 100644 bool p11_save_finish_file (p11_save_file *file, -@@ -231,7 +231,7 @@ p11_save_finish_file (p11_save_file *file, +@@ -249,7 +249,7 @@ p11_save_finish_file (p11_save_file *file, p11_message_err (errno, "couldn't write file: %s", file->temp); ret = false; @@ -223,7 +224,7 @@ index abff864..7efc30a 100644 /* Set the mode of the file, readable by everyone, but not writable */ } else if (chmod (file->temp, S_IRUSR | S_IRGRP | S_IROTH) < 0) { p11_message_err (errno, "couldn't set file permissions: %s", file->temp); -@@ -263,7 +263,7 @@ p11_save_finish_file (p11_save_file *file, +@@ -281,7 +281,7 @@ p11_save_finish_file (p11_save_file *file, } unlink (file->temp); @@ -232,7 +233,7 @@ index abff864..7efc30a 100644 /* Windows does not do atomic renames, so delete original file first */ } else { -@@ -290,7 +290,7 @@ p11_save_finish_file (p11_save_file *file, +@@ -308,7 +308,7 @@ p11_save_finish_file (p11_save_file *file, unlink (file->temp); } @@ -242,10 +243,10 @@ index abff864..7efc30a 100644 if (ret && path_out) { -- -2.15.0 +2.24.0 -From 83b286e7300d0b609eec4d6dfdc6fce4381de0ae Mon Sep 17 00:00:00 2001 +From f8463ea9d066263cb4ef08e3598c1ad899124415 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Tue, 29 May 2018 16:08:23 +0000 Subject: fix incorrect printf format for pid_t. @@ -274,5 +275,5 @@ index bcf6e21..cf18090 100644 vfprintf (stderr, format, args); va_end (args); -- -2.17.0 +2.24.0