From aeaddee8a5db011e5284b5cb9d82832fc2d39ee9 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 31 Jul 2023 08:46:53 +0200 Subject: [PATCH] p11-kit: Update to 0.25.0 0006-p11-kit-relocation.patch: refresh patch 0010-fix-transport-test.patch: code is gone Fixes #17877 --- .../0006-p11-kit-relocation.patch | 26 +++++++++---------- .../0010-fix-transport-test.patch | 16 ------------ mingw-w64-p11-kit/PKGBUILD | 17 ++++++------ 3 files changed, 21 insertions(+), 38 deletions(-) delete mode 100644 mingw-w64-p11-kit/0010-fix-transport-test.patch diff --git a/mingw-w64-p11-kit/0006-p11-kit-relocation.patch b/mingw-w64-p11-kit/0006-p11-kit-relocation.patch index 64c80ee98a..e0743143aa 100644 --- a/mingw-w64-p11-kit/0006-p11-kit-relocation.patch +++ b/mingw-w64-p11-kit/0006-p11-kit-relocation.patch @@ -78,9 +78,9 @@ diff -Naur p11-kit-0.20.3-orig/p11-kit/modules.c p11-kit-0.20.3/p11-kit/modules. return_val_if_fail (mod != NULL, CKR_HOST_MEMORY); if (!p11_path_absolute (path)) { -- p11_debug ("module path is relative, loading from: %s", P11_MODULE_PATH); -- path = expand = p11_path_build (P11_MODULE_PATH, path, NULL); -+ char * mods_path = p11_path_relocation(P11_MODULE_PATH); +- p11_debug ("module path is relative, loading from: %s", p11_module_path); +- path = expand = p11_path_build (p11_module_path, path, NULL); ++ char * mods_path = p11_path_relocation(p11_module_path); + p11_debug ("module path is relative, loading from: %s", mods_path); + path = expand = p11_path_build (mods_path, path, NULL); return_val_if_fail (path != NULL, CKR_HOST_MEMORY); @@ -140,22 +140,22 @@ diff -Naur p11-kit-0.20.3-orig/trust/module.c p11-kit-0.20.3/trust/module.c gl.tokens = NULL; if (gl.sessions == NULL || gl.tokens == NULL) { -diff -Naur p11-kit-0.21.3-orig/trust/extract.c p11-kit-0.21.3/trust/extract.c ---- p11-kit-0.21.3-orig/trust/extract.c 2013-06-21 20:49:16.000000000 +0400 -+++ p11-kit-0.21.3/trust/extract.c 2014-08-07 11:59:59.028400000 +0400 -@@ -298,14 +298,15 @@ +--- p11-kit-0.25.0/trust/extract.c.orig 2023-07-31 08:29:50.653517400 +0200 ++++ p11-kit-0.25.0/trust/extract.c 2023-07-31 08:31:08.482475500 +0200 +@@ -315,7 +315,8 @@ * For compatibility with people who deployed p11-kit 0.18.x * before trust stuff was put into its own branch. */ -- path = p11_path_build (PRIVATEDIR, "p11-kit-extract-trust", NULL); +- path = p11_path_build (PRIVATEDIR, "p11-kit-extract-trust" EXEEXT, NULL); + const char * _privdir = p11_path_relocation(PRIVATEDIR); -+ path = p11_path_build (_privdir, "p11-kit-extract-trust", NULL); ++ path = p11_path_build (_privdir, "p11-kit-extract-trust" EXEEXT, NULL); return_val_if_fail (path != NULL, 1); execv (path, argv); error = errno; - +@@ -323,7 +324,7 @@ if (error == ENOENT) { free (path); + /* "trust-extract-compat" is supposed to be a script, not a binary */ - path = p11_path_build (PRIVATEDIR, "trust-extract-compat", NULL); + path = p11_path_build (_privdir, "trust-extract-compat", NULL); return_val_if_fail (path != NULL, 1); @@ -166,7 +166,7 @@ diff -Naur p11-kit-0.20.3-orig/trust/p11-kit-trust.module p11-kit-0.20.3/trust/p +++ p11-kit-0.20.3/trust/p11-kit-trust.module 2014-08-07 11:59:59.028400000 +0400 @@ -1,7 +1,7 @@ # See pkcs11.conf(5) to understand this file - + # This is a module config for the 'included' p11-kit trust module -module: p11-kit-trust.so +module: p11-kit-trust.dll @@ -180,8 +180,8 @@ diff -Naur p11-kit-0.20.3-orig/p11-kit/p11-kit.c p11-kit-0.20.3/p11-kit/p11-kit. args = calloc (argc + 2, sizeof (char *)); return_val_if_fail (args != NULL, 1); -- args[0] = BINDIR "/trust"; -+ args[0] = p11_path_relocation(BINDIR "/trust"); +- args[0] = BINDIR "/trust" EXEEXT; ++ args[0] = p11_path_relocation(BINDIR "/trust" EXEEXT); memcpy (args + 1, argv, sizeof (char *) * argc); args[argc + 1] = NULL; diff --git a/mingw-w64-p11-kit/0010-fix-transport-test.patch b/mingw-w64-p11-kit/0010-fix-transport-test.patch deleted file mode 100644 index 0b62f0dbfc..0000000000 --- a/mingw-w64-p11-kit/0010-fix-transport-test.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- p11-kit-0.22.1/p11-kit/test-transport.c.orig 2014-11-11 10:58:28.829400000 +0300 -+++ p11-kit-0.22.1/p11-kit/test-transport.c 2014-11-11 11:05:49.139400000 +0300 -@@ -74,7 +74,13 @@ - test.user_config = p11_path_build (test.directory, "pkcs11.conf", NULL); - p11_test_file_write (NULL, test.user_config, data, strlen (data)); - -+#ifdef __MINGW32__ -+ const char *envstr; -+ envstr = "P11_KIT_PRIVATEDIR=" BUILDDIR "/p11-kit"; -+ putenv(envstr); -+#else - setenv ("P11_KIT_PRIVATEDIR", BUILDDIR "/p11-kit", 1); -+#endif - data = "remote: |" BUILDDIR "/p11-kit/p11-kit" EXEEXT " remote " P11_MODULE_PATH "/mock-two" SHLEXT "\n"; - p11_test_file_write (test.user_modules, "remote.module", data, strlen (data)); - data = "remote: |" BUILDDIR "/p11-kit/p11-kit" EXEEXT " remote " P11_MODULE_PATH "/mock-five" SHLEXT "\nx-init-reserved: initialize-arg"; diff --git a/mingw-w64-p11-kit/PKGBUILD b/mingw-w64-p11-kit/PKGBUILD index 5c2f7cf05c..a6b1b278d0 100644 --- a/mingw-w64-p11-kit/PKGBUILD +++ b/mingw-w64-p11-kit/PKGBUILD @@ -5,8 +5,8 @@ _realname=p11-kit pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.24.1 -pkgrel=5 +pkgver=0.25.0 +pkgrel=1 pkgdesc="Library to work with PKCS#11 modules (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -30,23 +30,23 @@ source=(https://github.com/p11-glue/p11-kit/releases/download/${pkgver}/${_realn pathtools.h 0006-p11-kit-relocation.patch 0007-mmap-CreateFile-with-FILE_SHARE_READ.patch - 0010-fix-transport-test.patch 0011-p11-kit-spawn-external.patch 0012-no-version-script.patch 0013-fix-reallocarray-decl.patch 0014-meson-build.patch) -validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF' - '462225C3B46F34879FC8496CD605848ED7E69871') -sha256sums=('d8be783efd5cd4ae534cee4132338e3f40f182c3205d23b200094ec85faaaef8' +validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF' # Stef Walter + '462225C3B46F34879FC8496CD605848ED7E69871' # Daiki Ueno + '5D46CB0F763405A7053556F47A75A648B3F9220C' # Zoltan Fridrich +) +sha256sums=('d55583bcdde83d86579cabe3a8f7f2638675fef01d23cace733ff748fc354706' 'SKIP' '195b2e8695f701caf545e2a468383ad29457febd9b1ee57de1986de04ad3c31c' 'aa92f986d3f7dfc119e86f9a8f3987e6ac2562149921820eadbe09218c4df99c' 'ea4593324db6d2d193733561f0352c6d679d1fb00aed0a2bae0d28aecbe92721' '08209cbf1633fa92eae7e5d28f95f8df9d6184cc20fa878c99aec4709bb257fd' '965d3921ec4fdeec94a2718bc2c85ce5e1a00ea0e499330a554074a7ae15dfc6' - '973ece44451b6e9be0a4aa60b289c52fe2f5c273437566715f870f7c5bd614e5' + '34e96b51f3f513bf479d1e6b647b4a417cec5d0139d1e3aa78fd4e449cf89f3b' '2b0fc5c54776aca54e306315338323075e7412d8d800f490a31870008c34f8d1' - '6c4b94bb8aee1981c07215d2c8449614f1a604a705f05806f6f1e8299b729698' '3c4821c36f76fd45c0d1ec83474773e45ccefde4ac92ca88b8493425f7553cb9' '15a2729f39e260f7fe8d55a91a399f2512854da626a69bc215470f902fc178cd' '83ecf11aaf9a1c6f617790048e80febd7320edae6ba203958349264170956911' @@ -66,7 +66,6 @@ prepare() { patch -p1 -i ${srcdir}/0004-fix-abspath-check.all.patch patch -p1 -i ${srcdir}/0006-p11-kit-relocation.patch patch -p1 -i ${srcdir}/0007-mmap-CreateFile-with-FILE_SHARE_READ.patch - patch -p1 -i ${srcdir}/0010-fix-transport-test.patch patch -p1 -i ${srcdir}/0011-p11-kit-spawn-external.patch patch -p1 -i ${srcdir}/0012-no-version-script.patch patch -p1 -i ${srcdir}/0013-fix-reallocarray-decl.patch