[arch-commits] Commit in lib32-p11-kit/repos (9 files)

Jan Steffens heftig at archlinux.org
Tue Sep 10 18:19:07 UTC 2019


    Date: Tuesday, September 10, 2019 @ 18:19:06
  Author: heftig
Revision: 509183

archrelease: copy trunk to multilib-testing-x86_64

Added:
  lib32-p11-kit/repos/multilib-testing-x86_64/
  lib32-p11-kit/repos/multilib-testing-x86_64/0001-meson-Fix-dictionary-syntax.patch
    (from rev 509182, lib32-p11-kit/trunk/0001-meson-Fix-dictionary-syntax.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0002-meson-Install-p11-kit-client-module.patch
    (from rev 509182, lib32-p11-kit/trunk/0002-meson-Install-p11-kit-client-module.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch
    (from rev 509182, lib32-p11-kit/trunk/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0004-meson-Don-t-prefix-p11_user_config.patch
    (from rev 509182, lib32-p11-kit/trunk/0004-meson-Don-t-prefix-p11_user_config.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0005-meson-Build-and-install-man-pages.patch
    (from rev 509182, lib32-p11-kit/trunk/0005-meson-Build-and-install-man-pages.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0006-meson-Install-p11-kit-server-units.patch
    (from rev 509182, lib32-p11-kit/trunk/0006-meson-Install-p11-kit-server-units.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/0007-Build-and-install-libnssckbi-p11-kit.so.patch
    (from rev 509182, lib32-p11-kit/trunk/0007-Build-and-install-libnssckbi-p11-kit.so.patch)
  lib32-p11-kit/repos/multilib-testing-x86_64/PKGBUILD
    (from rev 509182, lib32-p11-kit/trunk/PKGBUILD)

-----------------------------------------------------------------+
 0001-meson-Fix-dictionary-syntax.patch                          |   38 +
 0002-meson-Install-p11-kit-client-module.patch                  |   27 +
 0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch |   84 +++
 0004-meson-Don-t-prefix-p11_user_config.patch                   |   25 +
 0005-meson-Build-and-install-man-pages.patch                    |  243 ++++++++++
 0006-meson-Install-p11-kit-server-units.patch                   |   34 +
 0007-Build-and-install-libnssckbi-p11-kit.so.patch              |  100 ++++
 PKGBUILD                                                        |   73 +++
 8 files changed, 624 insertions(+)

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0001-meson-Fix-dictionary-syntax.patch (from rev 509182, lib32-p11-kit/trunk/0001-meson-Fix-dictionary-syntax.patch)
===================================================================
--- multilib-testing-x86_64/0001-meson-Fix-dictionary-syntax.patch	                        (rev 0)
+++ multilib-testing-x86_64/0001-meson-Fix-dictionary-syntax.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,38 @@
+From f2ee0a01272f4bbd018fb438344615cca8a74185 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <dueno at redhat.com>
+Date: Mon, 9 Sep 2019 17:22:27 +0200
+Subject: [PATCH 1/7] meson: Fix dictionary syntax
+
+Reported by Jan Alexander Steffens.
+---
+ doc/manual/meson.build | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/manual/meson.build b/doc/manual/meson.build
+index 2214b75..0c83699 100644
+--- a/doc/manual/meson.build
++++ b/doc/manual/meson.build
+@@ -39,17 +39,17 @@ content_files = [
+ configure_file(
+   input: 'version.xml.in',
+   output: '@BASENAME@',
+-  configuration: {'VERSION', meson.project_version()})
++  configuration: {'VERSION': meson.project_version()})
+ 
+ configure_file(
+   input: 'userdir.xml.in',
+   output: '@BASENAME@',
+-  configuration: {'p11_user_config', p11_user_config})
++  configuration: {'p11_user_config': p11_user_config})
+ 
+ configure_file(
+   input: 'sysdir.xml.in',
+   output: '@BASENAME@',
+-  configuration: {'p11_system_config', p11_system_config})
++  configuration: {'p11_system_config': p11_system_config})
+ 
+ glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
+ fixxref_args = [
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0002-meson-Install-p11-kit-client-module.patch (from rev 509182, lib32-p11-kit/trunk/0002-meson-Install-p11-kit-client-module.patch)
===================================================================
--- multilib-testing-x86_64/0002-meson-Install-p11-kit-client-module.patch	                        (rev 0)
+++ multilib-testing-x86_64/0002-meson-Install-p11-kit-client-module.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,27 @@
+From a0d4d089903e53fb7aaa758354f69c00eab4e93a Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 2/7] meson: Install p11-kit-client module
+
+---
+ p11-kit/meson.build | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/p11-kit/meson.build b/p11-kit/meson.build
+index f410ee7..beb0fb2 100644
+--- a/p11-kit/meson.build
++++ b/p11-kit/meson.build
+@@ -86,7 +86,9 @@ if host_system != 'windows'
+                 'client.c', 'client-init.c',
+                 name_prefix: '',
+                 include_directories: [configinc, commoninc],
+-                link_with: [libp11_kit_internal])
++                link_with: [libp11_kit_internal],
++                install: true,
++                install_dir: p11_module_path)
+ endif
+ 
+ fixtures_dir = meson.current_source_dir() / 'fixtures'
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch (from rev 509182, lib32-p11-kit/trunk/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch)
===================================================================
--- multilib-testing-x86_64/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch	                        (rev 0)
+++ multilib-testing-x86_64/0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,84 @@
+From 7d4768712006b16856c4b8cbe7143d11c11def7f Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 3/7] meson: PKCS#11 modules should only export
+ C_GetFunctionList
+
+---
+ p11-kit/meson.build    | 10 ++++++++++
+ p11-kit/p11-module.def |  2 ++
+ p11-kit/p11-module.map |  6 ++++++
+ trust/meson.build      |  6 +++++-
+ 4 files changed, 23 insertions(+), 1 deletion(-)
+ create mode 100644 p11-kit/p11-module.def
+ create mode 100644 p11-kit/p11-module.map
+
+diff --git a/p11-kit/meson.build b/p11-kit/meson.build
+index beb0fb2..e2d807b 100644
+--- a/p11-kit/meson.build
++++ b/p11-kit/meson.build
+@@ -81,12 +81,22 @@ meson.add_install_script(
+   datadir / 'p11-kit' / 'modules'
+ )
+ 
++p11_module_symbol_map = meson.current_source_dir() / 'p11-module.map'
++p11_module_ldflags = cc.get_supported_link_arguments([
++  '-Wl,--version-script,' + p11_module_symbol_map
++])
++p11_module_symbol_def = meson.current_source_dir() / 'p11-module.def'
++
+ if host_system != 'windows'
+   shared_module('p11-kit-client',
+                 'client.c', 'client-init.c',
+                 name_prefix: '',
+                 include_directories: [configinc, commoninc],
++                link_args: p11_module_ldflags,
++                link_depends: [p11_module_symbol_map,
++                               p11_module_symbol_def],
+                 link_with: [libp11_kit_internal],
++                vs_module_defs: p11_module_symbol_def,
+                 install: true,
+                 install_dir: p11_module_path)
+ endif
+diff --git a/p11-kit/p11-module.def b/p11-kit/p11-module.def
+new file mode 100644
+index 0000000..c4a8158
+--- /dev/null
++++ b/p11-kit/p11-module.def
+@@ -0,0 +1,2 @@
++EXPORTS
++C_GetFunctionList
+diff --git a/p11-kit/p11-module.map b/p11-kit/p11-module.map
+new file mode 100644
+index 0000000..8b9c384
+--- /dev/null
++++ b/p11-kit/p11-module.map
+@@ -0,0 +1,6 @@
++{
++	global:
++		C_GetFunctionList;
++	local:
++		*;
++};
+diff --git a/trust/meson.build b/trust/meson.build
+index b6cb260..c5b978b 100644
+--- a/trust/meson.build
++++ b/trust/meson.build
+@@ -48,9 +48,13 @@ shared_module('p11-kit-trust',
+               libtrust_sources,
+               'module-init.c',
+               name_prefix: '',
+-	      c_args: p11_kit_trust_c_args,
++              c_args: p11_kit_trust_c_args,
+               dependencies: [libp11_library_dep] + libtasn1_deps,
++              link_args: p11_module_ldflags,
++              link_depends: [p11_module_symbol_map,
++                             p11_module_symbol_def],
+               link_with: libtrust_data,
++              vs_module_defs: p11_module_symbol_def,
+               install: true,
+               install_dir: prefix / p11_module_path)
+ 
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0004-meson-Don-t-prefix-p11_user_config.patch (from rev 509182, lib32-p11-kit/trunk/0004-meson-Don-t-prefix-p11_user_config.patch)
===================================================================
--- multilib-testing-x86_64/0004-meson-Don-t-prefix-p11_user_config.patch	                        (rev 0)
+++ multilib-testing-x86_64/0004-meson-Don-t-prefix-p11_user_config.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,25 @@
+From e1877fb7b84237bb40c88436e0a56aa999801595 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 4/7] meson: Don't prefix p11_user_config
+
+---
+ p11-kit/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/p11-kit/meson.build b/p11-kit/meson.build
+index e2d807b..18b3d26 100644
+--- a/p11-kit/meson.build
++++ b/p11-kit/meson.build
+@@ -300,7 +300,7 @@ pkg.generate(libraries: libp11_kit,
+ 
+ pkcs11_conf_example_conf = configuration_data({
+   'p11_system_config_file': prefix / p11_system_config_file,
+-  'p11_user_config': prefix / p11_user_config
++  'p11_user_config': p11_user_config
+ })
+ pkcs11_conf_example = configure_file(input: 'pkcs11.conf.example.in',
+                                      output: '@BASENAME@',
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0005-meson-Build-and-install-man-pages.patch (from rev 509182, lib32-p11-kit/trunk/0005-meson-Build-and-install-man-pages.patch)
===================================================================
--- multilib-testing-x86_64/0005-meson-Build-and-install-man-pages.patch	                        (rev 0)
+++ multilib-testing-x86_64/0005-meson-Build-and-install-man-pages.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,243 @@
+From 53eacdcfad8a437c58b3983405e5fee7de0cf843 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 5/7] meson: Build and install man pages
+
+---
+ doc/manual/meson.build | 185 ++++++++++++++++++++++++++---------------
+ meson.build            |   5 +-
+ meson_options.txt      |   4 +
+ 3 files changed, 122 insertions(+), 72 deletions(-)
+
+diff --git a/doc/manual/meson.build b/doc/manual/meson.build
+index 0c83699..5a249cf 100644
+--- a/doc/manual/meson.build
++++ b/doc/manual/meson.build
+@@ -1,75 +1,122 @@
+-ignore_headers = [
+-  'private.h',
+-  'pkcs11.h',
+-  'conf.h',
+-  'debug.h',
+-  'dict.h',
+-  'filter.h',
+-  'log.h',
+-  'mock.h',
+-  'modules.h',
+-  'pkcs11.h',
+-  'pkcs11i.h',
+-  'pkcs11x.h',
+-  'private.h',
+-  'client.h',
+-  'proxy.h',
+-  'rpc.h',
+-  'rpc-message.h',
+-  'util.h',
+-  'virtual.h',
+-  'virtual-fixed.h',
+-  'array.h',
+-  'compat.h'
+-]
++if get_option('gtk_doc')
++  ignore_headers = [
++    'private.h',
++    'pkcs11.h',
++    'conf.h',
++    'debug.h',
++    'dict.h',
++    'filter.h',
++    'log.h',
++    'mock.h',
++    'modules.h',
++    'pkcs11.h',
++    'pkcs11i.h',
++    'pkcs11x.h',
++    'private.h',
++    'client.h',
++    'proxy.h',
++    'rpc.h',
++    'rpc-message.h',
++    'util.h',
++    'virtual.h',
++    'virtual-fixed.h',
++    'array.h',
++    'compat.h'
++  ]
+ 
+-content_files = [
+-  'p11-kit-config.xml',
+-  'p11-kit-sharing.xml',
+-  'p11-kit-devel.xml',
+-  'p11-kit-proxy.xml',
+-  'p11-kit-trust.xml',
+-  'p11-kit-remoting.xml',
+-  'p11-kit.xml',
+-  'pkcs11.conf.xml',
+-  'trust.xml',
+-  'annotation-glossary.xml'
+-]
++  content_files = [
++    'p11-kit-config.xml',
++    'p11-kit-sharing.xml',
++    'p11-kit-devel.xml',
++    'p11-kit-proxy.xml',
++    'p11-kit-trust.xml',
++    'p11-kit-remoting.xml',
++    'p11-kit.xml',
++    'pkcs11.conf.xml',
++    'trust.xml',
++    'annotation-glossary.xml'
++  ]
+ 
+-configure_file(
+-  input: 'version.xml.in',
+-  output: '@BASENAME@',
+-  configuration: {'VERSION': meson.project_version()})
++  configure_file(
++    input: 'version.xml.in',
++    output: '@BASENAME@',
++    configuration: {'VERSION': meson.project_version()})
+ 
+-configure_file(
+-  input: 'userdir.xml.in',
+-  output: '@BASENAME@',
+-  configuration: {'p11_user_config': p11_user_config})
++  configure_file(
++    input: 'userdir.xml.in',
++    output: '@BASENAME@',
++    configuration: {'p11_user_config': p11_user_config})
+ 
+-configure_file(
+-  input: 'sysdir.xml.in',
+-  output: '@BASENAME@',
+-  configuration: {'p11_system_config': p11_system_config})
++  configure_file(
++    input: 'sysdir.xml.in',
++    output: '@BASENAME@',
++    configuration: {'p11_system_config': p11_system_config})
+ 
+-glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
+-fixxref_args = [
+-  '--html-dir=' + (prefix / gnome.gtkdoc_html_dir(meson.project_name())),
+-  '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')),
+-]
++  glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
++  fixxref_args = [
++    '--html-dir=' + (prefix / gnome.gtkdoc_html_dir(meson.project_name())),
++    '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')),
++  ]
+ 
+-gnome.gtkdoc('p11-kit',
+-             main_xml: 'p11-kit-docs.xml',
+-             namespace: 'p11_kit',
+-             src_dir: 'p11-kit',
+-             dependencies: libffi_deps + dlopen_deps,
+-             scan_args: [
+-               '--ignore-headers=' + ' '.join(ignore_headers),
+-               '--rebuild-types',
+-               '--deprecated-guards="P11_KIT_DISABLE_DEPRECATED"'
+-             ],
+-             scanobjs_args: [
+-               '--version'
+-             ],
+-             content_files: content_files,
+-             fixxref_args: fixxref_args,
+-             install: true)
++  gnome.gtkdoc('p11-kit',
++              main_xml: 'p11-kit-docs.xml',
++              namespace: 'p11_kit',
++              src_dir: 'p11-kit',
++              dependencies: libffi_deps + dlopen_deps,
++              scan_args: [
++                '--ignore-headers=' + ' '.join(ignore_headers),
++                '--rebuild-types',
++                '--deprecated-guards="P11_KIT_DISABLE_DEPRECATED"'
++              ],
++              scanobjs_args: [
++                '--version'
++              ],
++              content_files: content_files,
++              fixxref_args: fixxref_args,
++              install: true)
++endif
++
++if get_option('man')
++  xsltproc = find_program('xsltproc')
++  xsltproc_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
++  if run_command([xsltproc, '--nonet', xsltproc_xsl]).returncode() != 0
++    error('Docbook stylesheet for manpages is missing')
++  endif
++
++  xsltproc_flags = [
++    '--nonet',
++    '--stringparam', 'man.output.quietly', '1',
++    '--stringparam', 'funcsynopsis.style', 'ansi',
++    '--stringparam', 'man.th.extra1.suppress', '1',
++    '--stringparam', 'man.authors.section.enabled', '0',
++    '--stringparam', 'man.copyright.section.enabled', '0',
++    '--path', meson.current_build_dir(),
++  ]
++
++  man_pages = {
++    '1': ['trust'],
++    '5': ['pkcs11.conf'],
++    '8': ['p11-kit'],
++  }
++
++  foreach section, pages: man_pages
++    foreach page: pages
++      man_src = '@0 at .xml'.format(page)
++      man_dst = '@0 at .@1@'.format(page, section)
++      man_section = 'man at 0@'.format(section)
++      custom_target(man_dst,
++                    command: [
++                      xsltproc,
++                      xsltproc_flags,
++                      '-o', '@OUTPUT@',
++                      xsltproc_xsl,
++                      '@INPUT@',
++                    ],
++                    input: man_src,
++                    output: man_dst,
++                    install: true,
++                    install_dir: join_paths(mandir, man_section),
++                    build_be_default: true)
++    endforeach
++  endforeach
++endif
+diff --git a/meson.build b/meson.build
+index 6bd7057..8d22971 100644
+--- a/meson.build
++++ b/meson.build
+@@ -56,6 +56,7 @@ bindir = get_option('bindir')
+ libdir = get_option('libdir')
+ libexecdir = get_option('libexecdir')
+ sysconfdir = get_option('sysconfdir')
++mandir = get_option('mandir')
+ pkgdatadir = datadir / meson.project_name()
+ privatedir = libexecdir / meson.project_name()
+ 
+@@ -358,7 +359,5 @@ subdir('p11-kit')
+ if with_trust_module
+   subdir('trust')
+ endif
+-if get_option('gtk_doc')
+-  subdir('doc/manual')
+-endif
++subdir('doc/manual')
+ subdir('po')
+diff --git a/meson_options.txt b/meson_options.txt
+index deda646..bc79665 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -45,3 +45,7 @@ option('systemd', type : 'feature',
+ option('gtk_doc', type : 'boolean',
+        value : false,
+        description : 'Build documentation using gtk-doc')
++
++option('man', type : 'boolean',
++       value : false,
++       description : 'Build manpages using xsltproc')
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0006-meson-Install-p11-kit-server-units.patch (from rev 509182, lib32-p11-kit/trunk/0006-meson-Install-p11-kit-server-units.patch)
===================================================================
--- multilib-testing-x86_64/0006-meson-Install-p11-kit-server-units.patch	                        (rev 0)
+++ multilib-testing-x86_64/0006-meson-Install-p11-kit-server-units.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,34 @@
+From 20f3c418a1577e0fa48a8e9a734bd6d5278a1ca9 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 6/7] meson: Install p11-kit-server units
+
+---
+ p11-kit/meson.build | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/p11-kit/meson.build b/p11-kit/meson.build
+index 18b3d26..48a3c75 100644
+--- a/p11-kit/meson.build
++++ b/p11-kit/meson.build
+@@ -176,6 +176,17 @@ executable('p11-kit-server-testable',
+            dependencies: [libp11_tool_dep] + libsystemd_deps + libffi_deps + dlopen_deps,
+            link_with: libp11_kit_testable)
+ 
++if with_systemd
++  p11_kit_server_service_conf = configuration_data({
++    'bindir': prefix / bindir
++  })
++  p11_kit_server_service = configure_file(input: 'p11-kit-server.service.in',
++                                          output: '@BASENAME@',
++                                          configuration: p11_kit_server_service_conf)
++  install_data([p11_kit_server_service, 'p11-kit-server.socket'],
++               install_dir: systemduserunitdir)
++endif
++
+ # Check if compilation succeeds with CRYPTOKI_GNU=1
+ 
+ pkcs11_gnu_headers = [
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/0007-Build-and-install-libnssckbi-p11-kit.so.patch (from rev 509182, lib32-p11-kit/trunk/0007-Build-and-install-libnssckbi-p11-kit.so.patch)
===================================================================
--- multilib-testing-x86_64/0007-Build-and-install-libnssckbi-p11-kit.so.patch	                        (rev 0)
+++ multilib-testing-x86_64/0007-Build-and-install-libnssckbi-p11-kit.so.patch	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,100 @@
+From 0c5ffab2467a4989c4428c5b284838e32dfe0002 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Sep 2019 18:08:25 +0000
+Subject: [PATCH 7/7] Build and install libnssckbi-p11-kit.so
+
+Create an additional library which is a copy of p11-kit-trust.so but
+uses the same label for root certs as libnssckbi.so:
+  "Builtin Object Token" instead of "Default Trust".
+
+https://bugs.freedesktop.org/show_bug.cgi?id=66161
+---
+ trust/Makefile.am | 14 ++++++++++++++
+ trust/meson.build | 13 +++++++++++++
+ trust/module.c    | 12 +++++++++++-
+ 3 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/trust/Makefile.am b/trust/Makefile.am
+index c4a65a3..303e1d0 100644
+--- a/trust/Makefile.am
++++ b/trust/Makefile.am
+@@ -66,6 +66,20 @@ p11_kit_trust_la_LDFLAGS = \
+ 
+ p11_kit_trust_la_SOURCES = $(TRUST_SRCS) trust/module-init.c
+ 
++libnssckbi_compatdir = $(libdir)
++libnssckbi_compat_LTLIBRARIES = \
++	libnssckbi-p11-kit.la
++
++libnssckbi_p11_kit_la_CFLAGS = \
++	-DLIBNSSCKBI_COMPAT \
++	$(p11_kit_trust_la_CFLAGS)
++
++libnssckbi_p11_kit_la_LIBADD = $(p11_kit_trust_la_LIBADD)
++
++libnssckbi_p11_kit_la_LDFLAGS = $(p11_kit_trust_la_LDFLAGS)
++
++libnssckbi_p11_kit_la_SOURCES = $(p11_kit_trust_la_SOURCES)
++
+ libtrust_testable_la_LDFLAGS = \
+ 	-no-undefined
+ 
+diff --git a/trust/meson.build b/trust/meson.build
+index c5b978b..14993e5 100644
+--- a/trust/meson.build
++++ b/trust/meson.build
+@@ -58,6 +58,19 @@ shared_module('p11-kit-trust',
+               install: true,
+               install_dir: prefix / p11_module_path)
+ 
++shared_module('libnssckbi-p11-kit',
++              libtrust_sources,
++              'module-init.c',
++              name_prefix: '',
++              c_args: p11_kit_trust_c_args + ['-DLIBNSSCKBI_COMPAT'],
++              dependencies: [libp11_library_dep] + libtasn1_deps,
++              link_args: p11_module_ldflags,
++              link_depends: [p11_module_symbol_map,
++                             p11_module_symbol_def],
++              link_with: libtrust_data,
++              vs_module_defs: p11_module_symbol_def,
++              install: true)
++
+ libtrust_testable_c_args = [
+   '-DP11_DEFAULT_TRUST_PREFIX="@0@"'.format(meson.current_build_dir() / 'default'),
+   '-DP11_SYSTEM_TRUST_PREFIX="@0@"'.format(meson.current_build_dir() / 'system')
+diff --git a/trust/module.c b/trust/module.c
+index ec3333d..9204673 100644
+--- a/trust/module.c
++++ b/trust/module.c
+@@ -201,7 +201,11 @@ create_tokens_inlock (p11_array *tokens,
+ 		int flags;
+ 	} labels[] = {
+ 		{ "~/", "User Trust", P11_TOKEN_FLAG_NONE },
++#ifdef LIBNSSCKBI_COMPAT
++		{ P11_DEFAULT_TRUST_PREFIX, "Builtin Object Token", P11_TOKEN_FLAG_WRITE_PROTECTED },
++#else
+ 		{ P11_DEFAULT_TRUST_PREFIX, "Default Trust", P11_TOKEN_FLAG_WRITE_PROTECTED },
++#endif
+ 		{ P11_SYSTEM_TRUST_PREFIX, "System Trust", P11_TOKEN_FLAG_NONE },
+ 		{ NULL },
+ 	};
+@@ -534,8 +538,14 @@ sys_C_GetSlotInfo (CK_SLOT_ID id,
+ 		info->flags = CKF_TOKEN_PRESENT;
+ 		memcpy ((char*)info->manufacturerID, MANUFACTURER_ID, 32);
+ 
++#ifdef LIBNSSCKBI_COMPAT
++		/* Change description to match libnssckbi so HPKP works in Chromium */
++		if (strcmp (p11_token_get_label (token), "Builtin Object Token") == 0)
++			path = "NSS Builtin Objects";
++		else
++#endif
++			path = p11_token_get_path (token);
+ 		/* If too long, copy the first 64 characters into buffer */
+-		path = p11_token_get_path (token);
+ 		length = strlen (path);
+ 		if (length > sizeof (info->slotDescription))
+ 			length = sizeof (info->slotDescription);
+-- 
+2.23.0
+

Copied: lib32-p11-kit/repos/multilib-testing-x86_64/PKGBUILD (from rev 509182, lib32-p11-kit/trunk/PKGBUILD)
===================================================================
--- multilib-testing-x86_64/PKGBUILD	                        (rev 0)
+++ multilib-testing-x86_64/PKGBUILD	2019-09-10 18:19:06 UTC (rev 509183)
@@ -0,0 +1,73 @@
+# Maintainer: Florian Pritz <bluewind at xinu.at>
+# Contributor: Christoph Vigano <mail at cvigano.de>
+
+pkgname=lib32-p11-kit
+pkgver=0.23.17
+pkgrel=1
+pkgdesc="Provides a way to load and enumerate PKCS#11 modules (32-bit)"
+arch=(x86_64)
+url="https://p11-glue.freedesktop.org"
+license=(BSD)
+depends=(lib32-glibc lib32-libtasn1 lib32-libffi lib32-systemd p11-kit)
+makedepends=(git meson)
+source=("git+https://github.com/p11-glue/p11-kit?signed#tag=$pkgver"
+        0001-meson-Fix-dictionary-syntax.patch
+        0002-meson-Install-p11-kit-client-module.patch
+        0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch
+        0004-meson-Don-t-prefix-p11_user_config.patch
+        0005-meson-Build-and-install-man-pages.patch
+        0006-meson-Install-p11-kit-server-units.patch
+        0007-Build-and-install-libnssckbi-p11-kit.so.patch)
+sha256sums=('SKIP'
+            '866c22c2e8aac80d7defe4a73299094b036c3dca547b79a38e1b55251b21d0b0'
+            '8a956ed3e8656d8cdf25f10b6efe50731bcc9b3b58cf66565624129d904e9e1c'
+            'f7476b2861d2cd8c26a0b1521df784369b40519e1f9308ca6814d654c7d0709f'
+            'dee618d30971f619c4f4cf286d688ae127a5d58482a95a2bc49d2a1de6c6f9f9'
+            '00c1cab9f1b40ce4c0c07b98a889f377a5e2e6f2d5b21b923f38df6ac9a5f073'
+            '80044d4d485c52d2a51f1b61660d4312d191d743cdfa4008128c81cda2b4dc30'
+            '74f1c3ca6875e3c716eeadc910f8a55a31c5f96275501c17797fb4a8c7683152')
+validpgpkeys=('C0F67099B808FB063E2C81117BFB1108D92765AF'  # Stef Walter
+              '462225C3B46F34879FC8496CD605848ED7E69871') # Daiki Ueno
+
+prepare() {
+  cd p11-kit
+
+  patch -Np1 -i ../0001-meson-Fix-dictionary-syntax.patch
+  patch -Np1 -i ../0002-meson-Install-p11-kit-client-module.patch
+  patch -Np1 -i ../0003-meson-PKCS-11-modules-should-only-export-C_GetFuncti.patch
+  patch -Np1 -i ../0004-meson-Don-t-prefix-p11_user_config.patch
+  patch -Np1 -i ../0005-meson-Build-and-install-man-pages.patch
+  patch -Np1 -i ../0006-meson-Install-p11-kit-server-units.patch
+
+  # Build and install an additional library (libnssckbi-p11-kit.so) which
+  # is a copy of p11-kit-trust.so but uses the same label for root certs as
+  # libnssckbi.so ("Builtin Object Token" instead of "Default Trust")
+  # https://bugs.freedesktop.org/show_bug.cgi?id=66161
+  patch -Np1 -i ../0007-Build-and-install-libnssckbi-p11-kit.so.patch
+}
+
+build() {
+  export CC="gcc -m32"
+  export CXX="g++ -m32"
+  export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
+
+  arch-meson p11-kit build \
+    --libdir=/usr/lib32 \
+    -D trust_paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source
+  ninja -C build
+}
+
+check() {
+  meson test -C build --print-errorlogs
+}
+
+package() {
+  DESTDIR="$pkgdir" meson install -C build
+
+  rm -rf "$pkgdir"/etc "$pkgdir"/usr/{bin,include,lib,share}
+
+  mkdir -p "$pkgdir/usr/share/licenses"
+  ln -s p11-kit "$pkgdir/usr/share/licenses/$pkgname"
+}
+
+# vim:set ts=2 sw=2 et:


More information about the arch-commits mailing list