pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/swtpm sysutils/swtpm: import swtpm-0.7.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6576f6d85fca
branches:  trunk
changeset: 373024:6576f6d85fca
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Feb 05 03:13:12 2022 +0000

description:
sysutils/swtpm: import swtpm-0.7.0

The SWTPM package provides TPM emulators with different front-end interfaces
to libtpms. TPM emulators provide socket interfaces (TCP/IP and Unix) and
the Linux CUSE interface for the creation of multiple native /dev/vtpm* devices.

The SWTPM package also provides several tools for using the TPM emulator,
creating certificates for a TPM, and simulating the manufacturing of
a TPM by creating a TPM's EK and platform certificates etc.

diffstat:

 sysutils/swtpm/DESCR                             |   7 ++
 sysutils/swtpm/Makefile                          |  58 ++++++++++++++++++++++++
 sysutils/swtpm/PLIST                             |  27 +++++++++++
 sysutils/swtpm/distinfo                          |   7 ++
 sysutils/swtpm/patches/patch-configure.ac        |  17 +++++++
 sysutils/swtpm/patches/patch-samples_Makefile.am |  15 ++++++
 6 files changed, 131 insertions(+), 0 deletions(-)

diffs (155 lines):

diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/DESCR      Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,7 @@
+The SWTPM package provides TPM emulators with different front-end interfaces
+to libtpms. TPM emulators provide socket interfaces (TCP/IP and Unix) and
+the Linux CUSE interface for the creation of multiple native /dev/vtpm* devices.
+
+The SWTPM package also provides several tools for using the TPM emulator,
+creating certificates for a TPM, and simulating the manufacturing of
+a TPM by creating a TPM's EK and platform certificates etc.
diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/Makefile   Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,58 @@
+# $NetBSD: Makefile,v 1.1 2022/02/05 03:13:12 ryoon Exp $
+
+GITHUB_PROJECT=        swtpm
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+DISTNAME=      swtpm-0.7.0
+CATEGORIES=    sysutils
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=stefanberger/}
+
+MAINTAINER=    ryoon%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/stefanberger/swtpm/
+COMMENT=       Software TPM (Trusted Platform Module) emulator
+LICENSE=       modified-bsd
+
+BUILD_DEPENDS+=                tcl-expect-[0-9]*:../../lang/tcl-expect
+BUILD_DEPENDS+=                socat-[0-9]*:../../net/socat
+
+SUBST_CLASSES+=                varbase
+SUBST_STAGE.varbase=   pre-configure
+SUBST_MESSAGE.varbase= Use VARBASE
+SUBST_FILES.varbase+=  configure.ac
+SUBST_VARS.varbase=    VARBASE
+
+BUILD_DEFS+=           VARBASE
+
+USE_LANGUAGES+=                c
+
+# Avoid `error: 'saved_stack.30' may be used uninitialized in this function [-Werror=maybe-uninitialized]` or similar errors
+BUILDLINK_TRANSFORM+=  rm:-Werror
+
+USE_LIBTOOL=           yes
+USE_TOOLS=             automake bash gawk gmake pkg-config
+GNU_CONFIGURE=         yes
+CONFIGURE_SCRIPT=      autogen.sh
+CONFIGURE_ARGS+=       --without-cuse
+CONFIGURE_ARGS+=       --with-tss-user=${REAL_ROOT_USER}
+CONFIGURE_ARGS+=       --with-tss-group=${REAL_ROOT_GROUP}
+# Avoid `error: stack protector not protecting local variables: variable length buffer [-Werror=stack-protector]` errors
+CONFIGURE_ARGS+=       --disable-hardening
+
+REPLACE_BASH+=         samples/*
+
+EGDIR=         ${PREFIX}/share/examples/swtpm
+CONF_FILES+=   ${EGDIR}/swtpm-localca.conf \
+               ${PKG_SYSCONFDIR}/swtpm-localca.conf
+CONF_FILES+=   ${EGDIR}/swtpm-localca.options \
+               ${PKG_SYSCONFDIR}/swtpm-localca.options
+CONF_FILES+=   ${EGDIR}/swtpm_setup.conf \
+               ${PKG_SYSCONFDIR}/swtpm_setup.conf
+
+OWN_DIRS_PERMS+=       ${VARBASE}/lib/swtpm-localca \
+                       ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
+
+.include "../../security/gnutls/buildlink3.mk"
+.include "../../security/libtasn1/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../sysutils/libtpms/buildlink3.mk"
+.include "../../textproc/json-glib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/PLIST      Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,27 @@
+@comment $NetBSD: PLIST,v 1.1 2022/02/05 03:13:12 ryoon Exp $
+bin/swtpm
+bin/swtpm_bios
+bin/swtpm_cert
+bin/swtpm_ioctl
+bin/swtpm_localca
+bin/swtpm_setup
+include/swtpm/tpm_ioctl.h
+lib/swtpm/libswtpm_libtpms.la
+man/man3/swtpm_ioctls.3
+man/man8/swtpm-create-tpmca.8
+man/man8/swtpm-localca.8
+man/man8/swtpm-localca.conf.8
+man/man8/swtpm-localca.options.8
+man/man8/swtpm.8
+man/man8/swtpm_bios.8
+man/man8/swtpm_cert.8
+man/man8/swtpm_ioctl.8
+man/man8/swtpm_localca.8
+man/man8/swtpm_setup.8
+man/man8/swtpm_setup.conf.8
+share/examples/swtpm/swtpm-localca.conf
+share/examples/swtpm/swtpm-localca.options
+share/examples/swtpm/swtpm_setup.conf
+share/swtpm/swtpm-create-tpmca
+share/swtpm/swtpm-create-user-config-files
+share/swtpm/swtpm-localca
diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/distinfo   Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2022/02/05 03:13:12 ryoon Exp $
+
+BLAKE2s (swtpm-0.7.0.tar.gz) = 7de143702ab83692b0e9baf6046fdd47d9fe783102ae391c746616fd78ddc207
+SHA512 (swtpm-0.7.0.tar.gz) = 32096309bf710e51d7565f013db32627423682fb2bfa9358976126102a0bf07401146bae9346af389c932c038f3d03217739375cef01a2ff10b01c7bd004b55e
+Size (swtpm-0.7.0.tar.gz) = 353641 bytes
+SHA1 (patch-configure.ac) = 00a5e52528150a356926a07b816268304456047c
+SHA1 (patch-samples_Makefile.am) = 4c2559decb43286f431dfabcec703e65f1a3ace2
diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/patches/patch-configure.ac Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-configure.ac,v 1.1 2022/02/05 03:13:12 ryoon Exp $
+
+* Use VARBASE for pkgsrc.
+
+--- configure.ac.orig  2021-09-20 11:26:56.000000000 +0000
++++ configure.ac
+@@ -119,9 +119,7 @@ fi
+ if test "$prefix" = "" && test "$datarootdir" = '${prefix}/share'; then
+       datarootdir="/usr/share"
+ fi
+-if test "$prefix" = "/usr" && test "$localstatedir" = '${prefix}/var'; then
+-      localstatedir="/var"
+-fi
++localstatedir="@VARBASE@"
+ if test "x$prefix" = "xNONE"; then
+       prefix="/usr/local"
+ fi
diff -r 15f0d3455019 -r 6576f6d85fca sysutils/swtpm/patches/patch-samples_Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/swtpm/patches/patch-samples_Makefile.am  Sat Feb 05 03:13:12 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-samples_Makefile.am,v 1.1 2022/02/05 03:13:12 ryoon Exp $
+
+* Install config files into under ${PREFIX}/share/examples/swtpm for pkgsrc.
+
+--- samples/Makefile.am.orig   2021-11-09 15:49:45.000000000 +0000
++++ samples/Makefile.am
+@@ -5,7 +5,7 @@
+ #
+ 
+ samplesconfdir = $(datadir)/@PACKAGE@
+-samplessysconfdir = $(sysconfdir)
++samplessysconfdir = $(DATAROOTDIR)/examples/swtpm
+ 
+ samplesconf_SCRIPTS = \
+       swtpm-create-tpmca \



Home | Main Index | Thread Index | Old Index