Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2019 19:57:42 +0000 (UTC)
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512239 - in head/security: . tpm2-abrmd tpm2-abrmd/files
Message-ID:  <201909171957.x8HJvgVB000104@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lwhsu
Date: Tue Sep 17 19:57:41 2019
New Revision: 512239
URL: https://svnweb.freebsd.org/changeset/ports/512239

Log:
  Add security/tpm2-abrmd, TPM2 Access Broker & Resource Manager Deamon
  
  Submitted by:	Tadeusz Struk <tadeusz.struk@intel.com>
  Differential Revision:	https://reviews.freebsd.org/D21651

Added:
  head/security/tpm2-abrmd/
  head/security/tpm2-abrmd/Makefile   (contents, props changed)
  head/security/tpm2-abrmd/distinfo   (contents, props changed)
  head/security/tpm2-abrmd/files/
  head/security/tpm2-abrmd/files/patch-dist_tpm2-abrmd.conf   (contents, props changed)
  head/security/tpm2-abrmd/files/patch-src_tpm2-header.c   (contents, props changed)
  head/security/tpm2-abrmd/files/patch-src_util.h   (contents, props changed)
  head/security/tpm2-abrmd/files/tpm2-abrmd.in   (contents, props changed)
  head/security/tpm2-abrmd/pkg-descr   (contents, props changed)
  head/security/tpm2-abrmd/pkg-plist   (contents, props changed)
Modified:
  head/security/Makefile

Modified: head/security/Makefile
==============================================================================
--- head/security/Makefile	Tue Sep 17 19:52:16 2019	(r512238)
+++ head/security/Makefile	Tue Sep 17 19:57:41 2019	(r512239)
@@ -1281,6 +1281,7 @@
     SUBDIR += tor-devel
     SUBDIR += totp-cli
     SUBDIR += tpm-tools
+    SUBDIR += tpm2-abrmd
     SUBDIR += tpm2-tools
     SUBDIR += tpm2-tss
     SUBDIR += trezord

Added: head/security/tpm2-abrmd/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/Makefile	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,40 @@
+# $FreeBSD$
+
+PORTNAME=	tpm2-abrmd
+DISTVERSION=	2.2.0
+CATEGORIES=	security
+MASTER_SITES=	https://github.com/tpm2-software/tpm2-abrmd/releases/download/${DISTVERSION}/
+
+MAINTAINER=	tstruk@gmail.com
+COMMENT=	TPM2 Access Broker & Resource Manager Deamon
+
+LICENSE=	BSD2CLAUSE
+
+LIB_DEPENDS=	libtss2-esys.so:security/tpm2-tss \
+		libgio-2.0.so:devel/glib20
+RUN_DEPENDS=	dbus-daemon:devel/dbus
+
+USES=		gmake libtool pkgconfig gnome
+USE_LDCONFIG=	yes
+USE_GNOME=	glib20
+USE_RC_SUBR=	tpm2-abrmd
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-dbuspolicydir=${PREFIX}/etc/dbus-1/system.d
+
+GROUPS=		_tss
+USERS=		_tss
+
+SUB_LIST=	DBUS_DAEMON=dbus
+
+post-install:
+	@${RM} ${STAGEDIR}${PREFIX}/lib/systemd/system-preset/tpm2-abrmd.preset
+	@${RM} ${STAGEDIR}${PREFIX}/lib/systemd/system/tpm2-abrmd.service
+	@${RM} ${STAGEDIR}${PREFIX}/share/dbus-1/system-services/com.intel.tss2.Tabrmd.service
+	@${RMDIR} ${STAGEDIR}${PREFIX}/lib/systemd/system
+	@${RMDIR} ${STAGEDIR}${PREFIX}/lib/systemd/system-preset
+	@${RMDIR} ${STAGEDIR}${PREFIX}/lib/systemd
+	@${RMDIR} ${STAGEDIR}${PREFIX}/share/dbus-1/system-services
+	@${RMDIR} ${STAGEDIR}${PREFIX}/share/dbus-1
+
+.include <bsd.port.mk>

Added: head/security/tpm2-abrmd/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/distinfo	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1566436559
+SHA256 (tpm2-abrmd-2.2.0.tar.gz) = 2a75a09802290d88f7806d1294b0070f92dd3f138a211834caa4cc04bd876ed1
+SIZE (tpm2-abrmd-2.2.0.tar.gz) = 569459

Added: head/security/tpm2-abrmd/files/patch-dist_tpm2-abrmd.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/files/patch-dist_tpm2-abrmd.conf	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,11 @@
+--- dist/tpm2-abrmd.conf.orig	2019-08-27 23:12:36 UTC
++++ dist/tpm2-abrmd.conf
+@@ -2,7 +2,7 @@
+  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">;
+ <busconfig>
+   <!-- ../system.conf have denied everything, so we just punch some holes -->
+-  <policy user="tss">
++  <policy user="_tss">
+     <allow own="com.intel.tss2.Tabrmd"/>
+   </policy>
+   <policy user="root">

Added: head/security/tpm2-abrmd/files/patch-src_tpm2-header.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/files/patch-src_tpm2-header.c	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,18 @@
+--- src/tpm2-header.c.orig	2019-08-22 04:36:24 UTC
++++ src/tpm2-header.c
+@@ -4,7 +4,6 @@
+  * All rights reserved.
+  */
+ #include <assert.h>
+-#include <endian.h>
+ #include <glib.h>
+ #include <inttypes.h>
+ #include <stddef.h>
+@@ -13,6 +12,7 @@
+ #include <tss2/tss2_tpm2_types.h>
+ 
+ #include "tpm2-header.h"
++#include "util.h"
+ 
+ /**
+  * Extract the 'tag' field from the tpm command header. This is a

Added: head/security/tpm2-abrmd/files/patch-src_util.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/files/patch-src_util.h	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,20 @@
+--- src/util.h.orig	2019-08-22 19:25:53 UTC
++++ src/util.h
+@@ -9,8 +9,17 @@
+ #include <glib.h>
+ #include <gio/gio.h>
+ #include <tss2/tss2_tpm2_types.h>
++#if defined(__FreeBSD__)
++#include <sys/endian.h>
++#endif
+ 
+ #include "control-message.h"
++
++#if defined(__FreeBSD__)
++#ifndef POLLRDHUP
++#define POLLRDHUP 0
++#endif
++#endif
+ 
+ /* Use to suppress "unused parameter" warnings: */
+ #define UNUSED_PARAM(p) ((void)(p))

Added: head/security/tpm2-abrmd/files/tpm2-abrmd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/files/tpm2-abrmd.in	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: tpm2_abrmd
+# REQUIRE: DAEMON %%DBUS_DAEMON%%
+# KEYWORD: shutdown
+#
+# Add the following to /etc/rc.conf[.local] to enable this service
+#
+# tpm2_abrmd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=tpm2_abrmd
+desc=TPM2 Access Broker & Resource Management Daemon
+rcvar=tpm2_abrmd_enable
+load_rc_config ${name}
+
+: ${tpm2_abrmd_enable:=NO}
+
+command=%%PREFIX%%/sbin/tpm2-abrmd
+tpm2_abrmd_user=_tss
+
+run_rc_command "$1"

Added: head/security/tpm2-abrmd/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/pkg-descr	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,3 @@
+TPM2 Access Broker & Resource Management Daemon implementing the TCG spec.
+
+WWW: https://github.com/tpm2-software/tpm2-abrmd

Added: head/security/tpm2-abrmd/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/tpm2-abrmd/pkg-plist	Tue Sep 17 19:57:41 2019	(r512239)
@@ -0,0 +1,11 @@
+include/tss2/tss2-tcti-tabrmd.h
+etc/dbus-1/system.d/tpm2-abrmd.conf
+lib/libtss2-tcti-tabrmd.a
+lib/libtss2-tcti-tabrmd.so
+lib/libtss2-tcti-tabrmd.so.0
+lib/libtss2-tcti-tabrmd.so.0.0.0
+libdata/pkgconfig/tss2-tcti-tabrmd.pc
+man/man3/Tss2_Tcti_Tabrmd_Init.3.gz
+man/man7/tss2-tcti-tabrmd.7.gz
+man/man8/tpm2-abrmd.8.gz
+sbin/tpm2-abrmd



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909171957.x8HJvgVB000104>