From: Marc Kleine-Budde <m...@pengutronix.de>

---
 patches/tpm2-abrmd-1.1.1-51-g1f83a5f/autogen.sh    |  1 +
 projectroot/etc/group                              |  1 +
 projectroot/etc/passwd                             |  1 +
 .../system-services/com.intel.tss2.Tabrmd.service  |  5 ++
 rules/tpm2-abrmd.in                                | 17 +++++
 rules/tpm2-abrmd.make                              | 72 ++++++++++++++++++++++
 6 files changed, 97 insertions(+)
 create mode 100755 patches/tpm2-abrmd-1.1.1-51-g1f83a5f/autogen.sh
 create mode 100644 
projectroot/usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service
 create mode 100644 rules/tpm2-abrmd.in
 create mode 100644 rules/tpm2-abrmd.make

diff --git a/patches/tpm2-abrmd-1.1.1-51-g1f83a5f/autogen.sh 
b/patches/tpm2-abrmd-1.1.1-51-g1f83a5f/autogen.sh
new file mode 100755
index 000000000..e62625c77
--- /dev/null
+++ b/patches/tpm2-abrmd-1.1.1-51-g1f83a5f/autogen.sh
@@ -0,0 +1 @@
+./bootstrap
diff --git a/projectroot/etc/group b/projectroot/etc/group
index 452be04a2..ad1aee5f4 100644
--- a/projectroot/etc/group
+++ b/projectroot/etc/group
@@ -20,6 +20,7 @@ lock:x:114:
 audio:x:115:
 input:x:116:
 mysql:x:117:
+tss:x:118:
 systemd-journal:x:201:
 systemd-network:x:202:
 systemd-journal-gateway:x:206:
diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd
index 65653c044..dc6a7e2cd 100644
--- a/projectroot/etc/passwd
+++ b/projectroot/etc/passwd
@@ -4,6 +4,7 @@ ftp:x:11:101:ftp user:/home:/bin/false
 www:x:12:102:www user:/home:/bin/false
 sshd:x:100:65534:SSH Server:/var/run/sshd:/bin/false
 mysql:x:101:117:mySQL Server:/var/run/mysql:/bin/false
+tss:x:102:118:TSS Daemon User:/dev/null:/bin/false
 messagebus:x:103:104:messagebus:/dev/null:/bin/false
 systemd-network:x:202:202:systemd-network:/dev/null:/bin/false
 systemd-resolve:x:203:65534:systemd-resolve:/dev/null:/bin/false
diff --git 
a/projectroot/usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service 
b/projectroot/usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service
new file mode 100644
index 000000000..f5749a49f
--- /dev/null
+++ b/projectroot/usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service
@@ -0,0 +1,5 @@
+[D-BUS Service]
+Name=com.intel.tss2.Tabrmd
+Exec=/usr/sbin/tpm2-abrmd
+User=tss
+SystemdService=tpm2-abrmd.service
diff --git a/rules/tpm2-abrmd.in b/rules/tpm2-abrmd.in
new file mode 100644
index 000000000..de76f60a6
--- /dev/null
+++ b/rules/tpm2-abrmd.in
@@ -0,0 +1,17 @@
+## SECTION=tpm
+
+config TPM2_ABRMD
+       tristate
+       select HOST_AUTOTOOLS_AUTOCONF_ARCHIVE
+       select DBUS
+       select GLIB
+       select TPM2_TSS
+       prompt "tpm2-abrmd"
+       help
+         TPM2 Access Broker & Resource Management Daemon implementing
+         the TCG spec.
+
+         This is a system daemon implementing the TPM2 access broker
+         (TAB) & Resource Manager (RM) spec from the TCG. The daemon
+         (tpm2-abrmd) is implemented using Glib and the GObject
+         system.
diff --git a/rules/tpm2-abrmd.make b/rules/tpm2-abrmd.make
new file mode 100644
index 000000000..8d982106a
--- /dev/null
+++ b/rules/tpm2-abrmd.make
@@ -0,0 +1,72 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Marc Kleine-Budde <m...@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_TPM2_ABRMD) += tpm2-abrmd
+
+#
+# Paths and names
+#
+TPM2_ABRMD_VERSION     := 1.1.1-51-g1f83a5f
+TPM2_ABRMD_MD5         := 78fed24c27f35b407a2bc67b153f7521
+TPM2_ABRMD             := tpm2-abrmd-$(TPM2_ABRMD_VERSION)
+TPM2_ABRMD_SUFFIX      := tar.gz
+TPM2_ABRMD_URL         := 
https://github.com/01org/tpm2-abrmd.git;tag=$(TPM2_ABRMD_VERSION)
+TPM2_ABRMD_SOURCE      := $(SRCDIR)/$(TPM2_ABRMD).$(TPM2_ABRMD_SUFFIX)
+TPM2_ABRMD_DIR         := $(BUILDDIR)/$(TPM2_ABRMD)
+TPM2_ABRMD_LICENSE     := BSD-2-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+TPM2_ABRMD_CONF_TOOL   := autoconf
+TPM2_ABRMD_CONF_OPT    := \
+       $(CROSS_AUTOCONF_USR) \
+       --with-dbuspolicydir=/usr/share/dbus-1/system.d \
+       --with-systemdsystemunitdir=/lib/systemd/system \
+       --with-udevrulesdir=/lib/udev/rules.d
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tpm2-abrmd.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, tpm2-abrmd)
+       @$(call install_fixup, tpm2-abrmd,PRIORITY,optional)
+       @$(call install_fixup, tpm2-abrmd,SECTION,base)
+       @$(call install_fixup, tpm2-abrmd,AUTHOR,"Marc Kleine-Budde 
<m...@pengutronix.de>")
+       @$(call install_fixup, tpm2-abrmd,DESCRIPTION,missing)
+
+       @$(call install_lib, tpm2-abrmd, 0, 0, 0644, libtcti-tabrmd)
+       @$(call install_copy, tpm2-abrmd, 0, 0, 0755, -, /usr/sbin/tpm2-abrmd)
+
+       @$(call install_copy, tpm2-abrmd, 0, 0, 0644, -, \
+               /usr/share/dbus-1/system.d/tpm2-abrmd.conf)
+       @$(call install_copy, tpm2-abrmd, 0, 0, 0644, -, \
+               /lib/systemd/system/tpm2-abrmd.service)
+       @$(call install_copy, tpm2-abrmd, 0, 0, 0644, -, \
+               /lib/udev/rules.d/tpm-udev.rules)
+
+       @$(call install_alternative, tpm2-abrmd, 0, 0, 0644, \
+               /usr/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service)
+
+       @$(call install_finish, tpm2-abrmd)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to