From 19fc582cb2dbe20b1773a7ce40f35f1de91237df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= Date: Sat, 13 Mar 2021 01:00:49 +0100 Subject: [PATCH 1/3] New package: libtpms-0.7.7 --- srcpkgs/libtpms-devel | 1 + srcpkgs/libtpms/libtpms-devel | 1 + srcpkgs/libtpms/template | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 120000 srcpkgs/libtpms-devel create mode 120000 srcpkgs/libtpms/libtpms-devel create mode 100644 srcpkgs/libtpms/template diff --git a/srcpkgs/libtpms-devel b/srcpkgs/libtpms-devel new file mode 120000 index 00000000000..a7b2c51dadb --- /dev/null +++ b/srcpkgs/libtpms-devel @@ -0,0 +1 @@ +libtpms \ No newline at end of file diff --git a/srcpkgs/libtpms/libtpms-devel b/srcpkgs/libtpms/libtpms-devel new file mode 120000 index 00000000000..60f3aa620dd --- /dev/null +++ b/srcpkgs/libtpms/libtpms-devel @@ -0,0 +1 @@ +libtpms-devel \ No newline at end of file diff --git a/srcpkgs/libtpms/template b/srcpkgs/libtpms/template new file mode 100644 index 00000000000..576b08151a5 --- /dev/null +++ b/srcpkgs/libtpms/template @@ -0,0 +1,37 @@ +# Template file for 'libtpms' +pkgname=libtpms +version=0.7.7 +revision=1 +build_style=gnu-configure +configure_args="--prefix=/usr --with-openssl --with-tpm2" +hostmakedepends="automake libtool pkg-config" +makedepends="openssl-devel" +short_desc="TPM emulation library" +maintainer="Jiri Belka " +license="BSD-3-Clause" +homepage="https://github.com/stefanberger/libtpms" +distfiles="https://github.com/stefanberger/libtpms/archive/v${version}.tar.gz" +checksum=9f23b97594bb9c6d3c50e33c9be8435f03d91a591c2288b03056321e06c95db3 + +pre_configure() { + autoreconf -fi +} + +post_install() { + vlicense LICENSE +} +libtpms-devel_package() { + depends="libtpms>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove "usr/share/man/man3" + } +} + +if [ "${CROSS_BUILD}" ]; then + configure_args+=" --host=${XBPS_CROSS_TRIPLET}" +fi From 443ebfc78afc44fd3dbc5b2bd44a126726ede5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= Date: Sat, 13 Mar 2021 01:01:00 +0100 Subject: [PATCH 2/3] New package: swtpm-0.5.2 --- srcpkgs/libswtpm | 1 + srcpkgs/libswtpm-devel | 1 + srcpkgs/swtpm/patches/configure.ac.patch | 26 +++++++++++ srcpkgs/swtpm/template | 57 ++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 120000 srcpkgs/libswtpm create mode 120000 srcpkgs/libswtpm-devel create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch create mode 100644 srcpkgs/swtpm/template diff --git a/srcpkgs/libswtpm b/srcpkgs/libswtpm new file mode 120000 index 00000000000..0e4930bcfe7 --- /dev/null +++ b/srcpkgs/libswtpm @@ -0,0 +1 @@ +swtpm \ No newline at end of file diff --git a/srcpkgs/libswtpm-devel b/srcpkgs/libswtpm-devel new file mode 120000 index 00000000000..0e4930bcfe7 --- /dev/null +++ b/srcpkgs/libswtpm-devel @@ -0,0 +1 @@ +swtpm \ No newline at end of file diff --git a/srcpkgs/swtpm/patches/configure.ac.patch b/srcpkgs/swtpm/patches/configure.ac.patch new file mode 100644 index 00000000000..a29510dda4c --- /dev/null +++ b/srcpkgs/swtpm/patches/configure.ac.patch @@ -0,0 +1,26 @@ +--- configure.ac.orig 2021-03-09 00:06:18.716142027 +0100 ++++ configure.ac 2021-03-09 00:07:00.760879684 +0100 +@@ -440,23 +440,6 @@ AC_ARG_WITH([tss-group], + [TSS_GROUP="tss"] + ) + +-case $have_tcsd in +-yes) +- AC_MSG_CHECKING([whether TSS_USER $TSS_USER is available]) +- if ! test $(id -u $TSS_USER); then +- AC_MSG_ERROR(["$TSS_USER is not available"]) +- else +- AC_MSG_RESULT([yes]) +- fi +- AC_MSG_CHECKING([whether TSS_GROUP $TSS_GROUP is available]) +- if ! test $(id -g $TSS_GROUP); then +- AC_MSG_ERROR(["$TSS_GROUP is not available"]) +- else +- AC_MSG_RESULT([yes]) +- fi +- ;; +-esac +- + AC_SUBST([TSS_USER]) + AC_SUBST([TSS_GROUP]) + diff --git a/srcpkgs/swtpm/template b/srcpkgs/swtpm/template new file mode 100644 index 00000000000..a3c35e86f25 --- /dev/null +++ b/srcpkgs/swtpm/template @@ -0,0 +1,57 @@ +# Template file for 'swtpm' +pkgname=swtpm +version=0.5.2 +revision=1 +build_style=gnu-configure +configure_args="--prefix=/usr --with-openssl --with-gnutls --without-cuse + --without-selinux" +make_dirs="/var/lib/swtpm-localca 0750 tss root" +hostmakedepends="automake expect gnutls-tools iproute2 libtool pkg-config + python3-cryptography python3-setuptools python3-Twisted socat" +makedepends="gnutls-devel libseccomp-devel libtasn1-devel libtpms-devel + openssl-devel" +depends="gnutls-tools trousers" +checkdepends="net-tools trousers which" +short_desc="Libtpms-based TPM emulator" +maintainer="Jiri Belka " +license="BSD-3-Clause" +homepage="https://github.com/stefanberger/swtpm" +distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz" +checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af +# requires 'tss' user present +make_check=extended + +conf_files=" + /etc/swtpm_setup.conf + /etc/swtpm-localca.options + /etc/swtpm-localca.conf" + +pre_configure() { + NOCONFIGURE=1 ./autogen.sh +} + +post_install() { + vlicense LICENSE +} + +libswtpm_package() { + short_desc+=" - library" + pkg_install() { + vmove "usr/lib/swtpm/*.so.*" + } +} + +libswtpm-devel_package() { + depends="libswtpm-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include/swtpm + vmove "usr/lib/swtpm/*.so" + vmove "usr/lib/swtpm/*.a" + vmove "usr/share/man/man3" + } +} + +if [ "${CROSS_BUILD}" ]; then + configure_args+=" --host=${XBPS_CROSS_TRIPLET}" +fi From ba912ef481462a10bfe0a6ef85ddc097a47b1ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= Date: Sat, 13 Mar 2021 01:01:10 +0100 Subject: [PATCH 3/3] common/shlibs: libtpms & swtpm --- common/shlibs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/shlibs b/common/shlibs index 86567af2ad0..92708d7968c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3966,3 +3966,5 @@ libsimavrparts.so.1 simavr-1.6_2 libsword-1.8.1.so libsword-1.8.1_6 libpari-gmp.so.7 pari-2.13.0_1 libtree-sitter.so.0 tree-sitter-0.19.0_1 +libtpms.so.0 libtpms-0.7.7_1 +libswtpm_libtpms.so.0 swtpm-0.5.2_1