mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2 0/4] P11-kit and libp11
@ 2019-02-05 10:29 Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 1/4] p11-kit: add as new target package Rouven Czerwinski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2019-02-05 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Add libp11 and p11-kit as target packages for ptxdist.
Libp11 contains the openssl-engine pkcs11 module, p11-kit allows the
usage of multiple pkcs11 modules simultaneously.
If both packages are enabled, libp11 provides an option to default to
the p11-kit proxy module.

Changes since V1:
- Fix Spaces to align --->
- Cleanup make files from pregenerated stages
- Use ptxifdef macro for libp11 engine library
all from Michael Olbrich

Regards,
Rouven Czerwinski

Rouven Czerwinski (4):
  p11-kit: add as new target package
  host-p11-kit: remove paths and name definitions
  libp11: add as new target package
  host-libp11: remove paths and names

 rules/host-libp11.make  |  7 +----
 rules/host-p11-kit.make |  7 +----
 rules/libp11.in         | 20 ++++++++++++-
 rules/libp11.make       | 58 ++++++++++++++++++++++++++++++++++++-
 rules/p11-kit.in        | 23 ++++++++++++++-
 rules/p11-kit.make      | 68 ++++++++++++++++++++++++++++++++++++++++++-
 6 files changed, 169 insertions(+), 14 deletions(-)
 create mode 100644 rules/libp11.in
 create mode 100644 rules/libp11.make
 create mode 100644 rules/p11-kit.in
 create mode 100644 rules/p11-kit.make

base-commit: eebcc6a5054db3f9b3cd3617267061fdc51b4701
-- 
git-series 0.9.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v2 1/4] p11-kit: add as new target package
  2019-02-05 10:29 [ptxdist] [PATCH v2 0/4] P11-kit and libp11 Rouven Czerwinski
@ 2019-02-05 10:29 ` Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 2/4] host-p11-kit: remove paths and name definitions Rouven Czerwinski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2019-02-05 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 rules/p11-kit.in   | 23 ++++++++++++++++-
 rules/p11-kit.make | 68 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 91 insertions(+)
 create mode 100644 rules/p11-kit.in
 create mode 100644 rules/p11-kit.make

diff --git a/rules/p11-kit.in b/rules/p11-kit.in
new file mode 100644
index 0000000..ba18320
--- /dev/null
+++ b/rules/p11-kit.in
@@ -0,0 +1,23 @@
+## SECTION=security
+
+menuconfig P11_KIT
+	tristate
+	select LIBFFI
+	prompt "p11-kit                       "
+	help
+	  Provides a way to load and enumerate PKCS#11 modules. Provides a
+	  standard configuration setup for installing PKCS#11 modules in such a
+	  way that they're discoverable.
+
+	  Also solves problems with coordinating the use of PKCS#11 by different
+	  components or libraries living in the same process.
+
+if P11_KIT
+
+config P11_KIT_SYSTEMD_UNIT
+	bool
+	default y
+	depends on SYSTEMD
+	prompt "install systemd unit file for p11-kit"
+
+endif
diff --git a/rules/p11-kit.make b/rules/p11-kit.make
new file mode 100644
index 0000000..b03d8cd
--- /dev/null
+++ b/rules/p11-kit.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_P11_KIT) += p11-kit
+
+#
+# Paths and names
+#
+P11_KIT_VERSION	:= 0.23.15
+P11_KIT_MD5	:= c4c3eecfe6bd6e62e436f62b51980749
+P11_KIT		:= p11-kit-$(P11_KIT_VERSION)
+P11_KIT_SUFFIX	:= tar.gz
+P11_KIT_URL	:= https://github.com/p11-glue/p11-kit/releases/download/$(P11_KIT_VERSION)/$(P11_KIT).$(P11_KIT_SUFFIX)
+P11_KIT_SOURCE	:= $(SRCDIR)/$(P11_KIT).$(P11_KIT_SUFFIX)
+P11_KIT_DIR	:= $(BUILDDIR)/$(P11_KIT)
+P11_KIT_LICENSE	:= BSD-3-Clause
+
+#
+# autoconf
+#
+P11_KIT_CONF_TOOL	:= autoconf
+P11_KIT_CONF_OPT		:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-trust-module \
+	--disable-doc \
+	--disable-doc-html \
+	--disable-doc-pdf \
+	--without-libtasn1 \
+	--with-libffi \
+	--with-systemd \
+
+$(STATEDIR)/p11-kit.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, p11-kit)
+	@$(call install_fixup, p11-kit,PRIORITY,optional)
+	@$(call install_fixup, p11-kit,SECTION,base)
+	@$(call install_fixup, p11-kit,AUTHOR,"Rouven Czerwinski <r.czerwinski@pengutronix.de>")
+	@$(call install_fixup, p11-kit,DESCRIPTION,missing)
+
+	@$(call install_copy, p11-kit, 0, 0, 0755, -, /usr/bin/p11-kit)
+
+	@$(call install_copy, p11-kit, 0, 0, 0755, -, \
+		/usr/libexec/p11-kit/p11-kit-remote)
+	@$(call install_copy, p11-kit, 0, 0, 0755, -, \
+		/usr/libexec/p11-kit/p11-kit-server)
+	@$(call install_copy, p11-kit, 0, 0, 0755, -, \
+		/usr/lib/pkcs11/p11-kit-client.so)
+
+	@$(call install_lib,  p11-kit, 0, 0, 0644, libp11-kit)
+	@$(call install_link, p11-kit, libp11-kit.so.0.3.0, \
+		/usr/lib/p11-kit-proxy.so)
+
+	@$(call install_finish, p11-kit)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
git-series 0.9.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v2 2/4] host-p11-kit: remove paths and name definitions
  2019-02-05 10:29 [ptxdist] [PATCH v2 0/4] P11-kit and libp11 Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 1/4] p11-kit: add as new target package Rouven Czerwinski
@ 2019-02-05 10:29 ` Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 3/4] libp11: add as new target package Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 4/4] host-libp11: remove paths and names Rouven Czerwinski
  3 siblings, 0 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2019-02-05 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Host packages use the definitions of the target packages if available, remove
the definitions from the host package.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 rules/host-p11-kit.make | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/rules/host-p11-kit.make b/rules/host-p11-kit.make
index 3aa0d5d..2e2e483 100644
--- a/rules/host-p11-kit.make
+++ b/rules/host-p11-kit.make
@@ -16,13 +16,6 @@ HOST_PACKAGES-$(PTXCONF_HOST_P11_KIT) += host-p11-kit
 #
 # Paths and names
 #
-HOST_P11_KIT_VERSION	:= 0.23.13
-HOST_P11_KIT_MD5	:= 9fb1daab59c6b9d90261f6bddf00d0f1
-HOST_P11_KIT		:= p11-kit-$(HOST_P11_KIT_VERSION)
-HOST_P11_KIT_SUFFIX	:= tar.gz
-HOST_P11_KIT_URL	:= https://github.com/p11-glue/p11-kit/releases/download/0.23.13//$(HOST_P11_KIT).$(HOST_P11_KIT_SUFFIX)
-HOST_P11_KIT_SOURCE	:= $(SRCDIR)/$(HOST_P11_KIT).$(HOST_P11_KIT_SUFFIX)
-HOST_P11_KIT_DIR	:= $(HOST_BUILDDIR)/$(HOST_P11_KIT)
 
 # ----------------------------------------------------------------------------
 # Prepare
-- 
git-series 0.9.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v2 3/4] libp11: add as new target package
  2019-02-05 10:29 [ptxdist] [PATCH v2 0/4] P11-kit and libp11 Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 1/4] p11-kit: add as new target package Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 2/4] host-p11-kit: remove paths and name definitions Rouven Czerwinski
@ 2019-02-05 10:29 ` Rouven Czerwinski
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 4/4] host-libp11: remove paths and names Rouven Czerwinski
  3 siblings, 0 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2019-02-05 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 rules/libp11.in   | 20 +++++++++++++++++-
 rules/libp11.make | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 78 insertions(+)
 create mode 100644 rules/libp11.in
 create mode 100644 rules/libp11.make

diff --git a/rules/libp11.in b/rules/libp11.in
new file mode 100644
index 0000000..147f50a
--- /dev/null
+++ b/rules/libp11.in
@@ -0,0 +1,20 @@
+## SECTION=security
+
+menuconfig LIBP11
+	tristate
+	prompt "libp11                        "
+	select OPENSSL
+	help
+	  libp11 is a library implementing a thin layer on top of PKCS#11 API to
+	  make using PKCS#11 implementations easier.
+	  It also includes a pkcs#11 engine implementation for openssl.
+
+if LIBP11
+
+config LIBP11_PROXY_MODULE
+	bool
+	default y
+	depends on P11_KIT
+	prompt "Default to p11-kit proxy module"
+
+endif
diff --git a/rules/libp11.make b/rules/libp11.make
new file mode 100644
index 0000000..6a7c39e
--- /dev/null
+++ b/rules/libp11.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBP11) += libp11
+
+#
+# Paths and names
+#
+LIBP11_VERSION	:= 0.4.9
+LIBP11_MD5	:= 757b23242758a52599cb35f61de11ba2
+LIBP11		:= libp11-$(LIBP11_VERSION)
+LIBP11_SUFFIX	:= tar.gz
+LIBP11_URL	:= https://github.com/OpenSC/libp11/releases/download/$(LIBP11)/$(LIBP11).$(LIBP11_SUFFIX)
+LIBP11_SOURCE	:= $(SRCDIR)/$(LIBP11).$(LIBP11_SUFFIX)
+LIBP11_DIR	:= $(BUILDDIR)/$(LIBP11)
+LIBP11_LICENSE	:= LGPL-2.1-only
+
+#
+# autoconf
+#
+LIBP11_CONF_TOOL	:= autoconf
+LIBP11_CONF_OPT		:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-strict \
+	--disable-pedantic \
+	--disable-api-doc \
+	--with-enginesdir=/usr/lib/engines \
+	--with-pkcs11-module=$(call ptx/ifdef,PTXCONF_LIBP11_PROXY_MODULE,p11-kit-proxy.so)
+
+$(STATEDIR)/libp11.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libp11)
+	@$(call install_fixup, libp11,PRIORITY,optional)
+	@$(call install_fixup, libp11,SECTION,base)
+	@$(call install_fixup, libp11,AUTHOR,"Rouven Czerwinski <r.czerwinski@pengutronix.de>")
+	@$(call install_fixup, libp11,DESCRIPTION,missing)
+
+	@$(call install_lib,  libp11, 0, 0, 0644, libp11)
+	@$(call install_copy, libp11, 0, 0, 0644, -, \
+		/usr/lib/engines/pkcs11.so)
+
+	@$(call install_link, libp11, pkcs11.so, \
+		/usr/lib/engines/libpkcs11.so)
+
+	@$(call install_finish, libp11)
+
+	@$(call touch)
-- 
git-series 0.9.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v2 4/4] host-libp11: remove paths and names
  2019-02-05 10:29 [ptxdist] [PATCH v2 0/4] P11-kit and libp11 Rouven Czerwinski
                   ` (2 preceding siblings ...)
  2019-02-05 10:29 ` [ptxdist] [PATCH v2 3/4] libp11: add as new target package Rouven Czerwinski
@ 2019-02-05 10:29 ` Rouven Czerwinski
  3 siblings, 0 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2019-02-05 10:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Rouven Czerwinski

Host packages use the definitions of target packages if available, remove the
host definitions for libp11

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 rules/host-libp11.make | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/rules/host-libp11.make b/rules/host-libp11.make
index 284284f..da3b961 100644
--- a/rules/host-libp11.make
+++ b/rules/host-libp11.make
@@ -16,13 +16,6 @@ HOST_PACKAGES-$(PTXCONF_HOST_LIBP11) += host-libp11
 #
 # Paths and names
 #
-HOST_LIBP11_VERSION	:= 0.4.9
-HOST_LIBP11_MD5		:= 757b23242758a52599cb35f61de11ba2
-HOST_LIBP11		:= libp11-$(HOST_LIBP11_VERSION)
-HOST_LIBP11_SUFFIX	:= tar.gz
-HOST_LIBP11_URL		:= https://github.com/OpenSC/libp11/releases/download/$(HOST_LIBP11)/$(HOST_LIBP11).$(HOST_LIBP11_SUFFIX)
-HOST_LIBP11_SOURCE	:= $(SRCDIR)/$(HOST_LIBP11).$(HOST_LIBP11_SUFFIX)
-HOST_LIBP11_DIR		:= $(HOST_BUILDDIR)/$(HOST_LIBP11)
 
 # ----------------------------------------------------------------------------
 # Prepare
-- 
git-series 0.9.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-05 10:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 10:29 [ptxdist] [PATCH v2 0/4] P11-kit and libp11 Rouven Czerwinski
2019-02-05 10:29 ` [ptxdist] [PATCH v2 1/4] p11-kit: add as new target package Rouven Czerwinski
2019-02-05 10:29 ` [ptxdist] [PATCH v2 2/4] host-p11-kit: remove paths and name definitions Rouven Czerwinski
2019-02-05 10:29 ` [ptxdist] [PATCH v2 3/4] libp11: add as new target package Rouven Czerwinski
2019-02-05 10:29 ` [ptxdist] [PATCH v2 4/4] host-libp11: remove paths and names Rouven Czerwinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox