From owner-svn-ports-head@freebsd.org Tue Sep 17 19:57:44 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F50B12D54D; Tue, 17 Sep 2019 19:57:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Xv6J1XJwz4ct9; Tue, 17 Sep 2019 19:57:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17D9C19D71; Tue, 17 Sep 2019 19:57:44 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8HJvhHS000113; Tue, 17 Sep 2019 19:57:43 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8HJvgVB000104; Tue, 17 Sep 2019 19:57:42 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201909171957.x8HJvgVB000104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 17 Sep 2019 19:57:42 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head/security: . tpm2-abrmd tpm2-abrmd/files X-SVN-Commit-Revision: 512239 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2019 19:57:44 -0000 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 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 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"> + + +- ++ + + + 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 +-#include + #include + #include + #include +@@ -13,6 +12,7 @@ + #include + + #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 + #include + #include ++#if defined(__FreeBSD__) ++#include ++#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