Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [draft] New package: swtpm-0.5.2
@ 2021-03-09  0:42 jirib
  2021-03-10 21:22 ` [PR PATCH] [Updated] " jirib
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: jirib @ 2021-03-09  0:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]

There is a new pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 3179 bytes --]

From e4352fee4c921ce444bd576443e216382036a866 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Tue, 9 Mar 2021 01:10:11 +0100
Subject: [PATCH 1/2] New package: swtpm-0.5.2

---
 srcpkgs/swtpm/patches/configure.ac.patch | 26 ++++++++++++++++++++++++
 srcpkgs/swtpm/template                   | 26 ++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch
 create mode 100644 srcpkgs/swtpm/template

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..a71c856f370
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,26 @@
+# Template file for 'swtpm'
+pkgname=swtpm
+version=0.5.2
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-openssl --with-gnutls --without-cuse"
+make_dirs="/var/lib/swtpm-localca 0750 tss root"
+hostmakedepends="automake libtool pkg-config"
+makedepends="expect gnutls-devel gnutls-tools iproute2 libseccomp-devel libtasn1-devel libtpms-devel openssl-devel python3-cryptography python3-setuptools python3-Twisted socat trousers"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	# no pkcs11 support
+	rm -f ${DESTDIR}/usr/share/swtpm/swtpm-create-tpmca
+	rm -f ${DESTDIR}/usr/share/man/man8/swtpm-create-tpmca.8
+	vlicense LICENSE
+}

From b7097580cc414dd7304edf988e82953c6a9245e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Tue, 9 Mar 2021 01:10:41 +0100
Subject: [PATCH 2/2] common/shlibs: swtpm

---
 common/shlibs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..d24ca95b137 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3966,3 +3966,4 @@ 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
+libswtpm_libtpms.so.0 swtpm-0.5.2_1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
@ 2021-03-10 21:22 ` jirib
  2021-03-10 22:50 ` jirib
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-10 21:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 5048 bytes --]

From 26d9c0562a273d9b5c230318b481f784fab69aa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Wed, 10 Mar 2021 20:21:01 +0100
Subject: [PATCH 1/2] New package: swtpm-0.5.2 and libtpms-0.7.7

---
 srcpkgs/libtpms-devel                    |  1 +
 srcpkgs/libtpms/libtpms-devel            |  1 +
 srcpkgs/libtpms/template                 | 33 ++++++++++++++++++++++++
 srcpkgs/swtpm/patches/configure.ac.patch | 26 +++++++++++++++++++
 srcpkgs/swtpm/template                   | 26 +++++++++++++++++++
 5 files changed, 87 insertions(+)
 create mode 120000 srcpkgs/libtpms-devel
 create mode 120000 srcpkgs/libtpms/libtpms-devel
 create mode 100644 srcpkgs/libtpms/template
 create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch
 create mode 100644 srcpkgs/swtpm/template

diff --git a/srcpkgs/libtpms-devel b/srcpkgs/libtpms-devel
new file mode 120000
index 000000000000..a7b2c51dadbc
--- /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 000000000000..60f3aa620dd7
--- /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 000000000000..1e4fb0f7742b
--- /dev/null
+++ b/srcpkgs/libtpms/template
@@ -0,0 +1,33 @@
+# Template file for 'libtpms'
+pkgname=libtpms
+version=0.7.7
+revision=1
+build_style=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 <jirib79@gmail.com>"
+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"
+	}
+}
diff --git a/srcpkgs/swtpm/patches/configure.ac.patch b/srcpkgs/swtpm/patches/configure.ac.patch
new file mode 100644
index 000000000000..a29510dda4c5
--- /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 000000000000..a71c856f3701
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,26 @@
+# Template file for 'swtpm'
+pkgname=swtpm
+version=0.5.2
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-openssl --with-gnutls --without-cuse"
+make_dirs="/var/lib/swtpm-localca 0750 tss root"
+hostmakedepends="automake libtool pkg-config"
+makedepends="expect gnutls-devel gnutls-tools iproute2 libseccomp-devel libtasn1-devel libtpms-devel openssl-devel python3-cryptography python3-setuptools python3-Twisted socat trousers"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	# no pkcs11 support
+	rm -f ${DESTDIR}/usr/share/swtpm/swtpm-create-tpmca
+	rm -f ${DESTDIR}/usr/share/man/man8/swtpm-create-tpmca.8
+	vlicense LICENSE
+}

From ba000761dce0cbd236325abf2576212b1a4ee9b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Wed, 10 Mar 2021 22:20:57 +0100
Subject: [PATCH 2/2] common/shlibs: swtpm & libtpms

---
 common/shlibs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08bc..cc8de481dfca 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
  2021-03-10 21:22 ` [PR PATCH] [Updated] " jirib
@ 2021-03-10 22:50 ` jirib
  2021-03-11  0:34 ` jirib
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-10 22:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 5210 bytes --]

From 9f8b2f51f22fe5dea9f3855d817e044c52eee775 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Wed, 10 Mar 2021 23:49:38 +0100
Subject: [PATCH 1/2] New package: swtpm-0.5.2

---
 srcpkgs/libtpms-devel                    |  1 +
 srcpkgs/libtpms/libtpms-devel            |  1 +
 srcpkgs/libtpms/template                 | 37 ++++++++++++++++++++++++
 srcpkgs/swtpm/patches/configure.ac.patch | 26 +++++++++++++++++
 srcpkgs/swtpm/template                   | 33 +++++++++++++++++++++
 5 files changed, 98 insertions(+)
 create mode 120000 srcpkgs/libtpms-devel
 create mode 120000 srcpkgs/libtpms/libtpms-devel
 create mode 100644 srcpkgs/libtpms/template
 create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch
 create mode 100644 srcpkgs/swtpm/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..6e5e05e5633
--- /dev/null
+++ b/srcpkgs/libtpms/template
@@ -0,0 +1,37 @@
+# Template file for 'libtpms'
+pkgname=libtpms
+version=0.7.7
+revision=1
+build_style=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 <jirib79@gmail.com>"
+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
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..2656d54de18
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,33 @@
+# Template file for 'swtpm'
+pkgname=swtpm
+version=0.5.2
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-openssl --with-gnutls --without-cuse"
+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"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	# no pkcs11 support
+	rm -f ${DESTDIR}/usr/share/swtpm/swtpm-create-tpmca
+	rm -f ${DESTDIR}/usr/share/man/man8/swtpm-create-tpmca.8
+	vlicense LICENSE
+}
+
+if [ "${CROSS_BUILD}" ]; then
+	configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
+fi

From 794a25bbd9d612d6f84ca46dd901db9589d04f51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Wed, 10 Mar 2021 23:50:19 +0100
Subject: [PATCH 2/2] common/shlibs: swtpm

---
 common/shlibs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..cc8de481dfc 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
  2021-03-10 21:22 ` [PR PATCH] [Updated] " jirib
  2021-03-10 22:50 ` jirib
@ 2021-03-11  0:34 ` jirib
  2021-03-11  1:11 ` jirib
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-11  0:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 5124 bytes --]

From 5810ad03bb80e418649deb5f2080430262f5e284 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Thu, 11 Mar 2021 01:33:17 +0100
Subject: [PATCH 1/2] New package: swtpm-0.5.2 and libtpms-0.7.7

---
 srcpkgs/libtpms-devel                    |  1 +
 srcpkgs/libtpms/libtpms-devel            |  1 +
 srcpkgs/libtpms/template                 | 37 ++++++++++++++++++++++++
 srcpkgs/swtpm/patches/configure.ac.patch | 26 +++++++++++++++++
 srcpkgs/swtpm/template                   | 31 ++++++++++++++++++++
 5 files changed, 96 insertions(+)
 create mode 120000 srcpkgs/libtpms-devel
 create mode 120000 srcpkgs/libtpms/libtpms-devel
 create mode 100644 srcpkgs/libtpms/template
 create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch
 create mode 100644 srcpkgs/swtpm/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..6e5e05e5633
--- /dev/null
+++ b/srcpkgs/libtpms/template
@@ -0,0 +1,37 @@
+# Template file for 'libtpms'
+pkgname=libtpms
+version=0.7.7
+revision=1
+build_style=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 <jirib79@gmail.com>"
+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
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..96fbd03d6d8
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,31 @@
+# Template file for 'swtpm'
+pkgname=swtpm
+version=0.5.2
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-openssl --with-gnutls --without-cuse"
+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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+if [ "${CROSS_BUILD}" ]; then
+	configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
+fi

From 4d4763dd39579bae08944af731aeb8e4f61145c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Thu, 11 Mar 2021 01:33:35 +0100
Subject: [PATCH 2/2] common/shlibs: swtpm & libtpms

---
 common/shlibs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..cc8de481dfc 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (2 preceding siblings ...)
  2021-03-11  0:34 ` jirib
@ 2021-03-11  1:11 ` jirib
  2021-03-11 15:51 ` sgn
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-11  1:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

New comment by jirib on void-packages repository

https://github.com/void-linux/void-packages/pull/29338#issuecomment-796344373

Comment:
Tests do not fail locally, is it possible how get `tests/*.log` files?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (3 preceding siblings ...)
  2021-03-11  1:11 ` jirib
@ 2021-03-11 15:51 ` sgn
  2021-03-11 16:01 ` [PR PATCH] [Updated] " jirib
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2021-03-11 15:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/29338#issuecomment-796836285

Comment:
Please:
- one commit per package; and
- `build_style=gnu-configure`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (4 preceding siblings ...)
  2021-03-11 15:51 ` sgn
@ 2021-03-11 16:01 ` jirib
  2021-03-12 20:13 ` jirib
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-11 16:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 5692 bytes --]

From abfa948169b475efa33f02919e8bcaa279d8635c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Thu, 11 Mar 2021 17:01:05 +0100
Subject: [PATCH 1/2] common/shlibs: libtpms & swtpm

---
 common/shlibs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index 42f37d8a08b..cc8de481dfc 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

From 72ec7b6ac781ce1aa4d2220141714f2c91d8d196 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Thu, 11 Mar 2021 17:01:29 +0100
Subject: [PATCH 2/2] New package: swtpm-0.5.2 and libtpms-0.7.7

---
 srcpkgs/libtpms-devel                    |  1 +
 srcpkgs/libtpms/libtpms-devel            |  1 +
 srcpkgs/libtpms/template                 | 37 +++++++++++++++
 srcpkgs/swtpm/patches/configure.ac.patch | 26 ++++++++++
 srcpkgs/swtpm/template                   | 60 ++++++++++++++++++++++++
 5 files changed, 125 insertions(+)
 create mode 120000 srcpkgs/libtpms-devel
 create mode 120000 srcpkgs/libtpms/libtpms-devel
 create mode 100644 srcpkgs/libtpms/template
 create mode 100644 srcpkgs/swtpm/patches/configure.ac.patch
 create mode 100644 srcpkgs/swtpm/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..6e5e05e5633
--- /dev/null
+++ b/srcpkgs/libtpms/template
@@ -0,0 +1,37 @@
+# Template file for 'libtpms'
+pkgname=libtpms
+version=0.7.7
+revision=1
+build_style=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 <jirib79@gmail.com>"
+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
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..6d6dd380846
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,60 @@
+# Template file for 'swtpm'
+pkgname=swtpm
+version=0.5.2
+revision=1
+build_style=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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" make check VERBOSE=1
+}
+
+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
+	vmove usr/lib/pkgconfig
+	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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (5 preceding siblings ...)
  2021-03-11 16:01 ` [PR PATCH] [Updated] " jirib
@ 2021-03-12 20:13 ` jirib
  2021-03-12 21:07 ` jirib
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 20:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6506 bytes --]

From 6760342a49c62edc94dc1e6af857e1963882903a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 21:11:17 +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 000000000000..a7b2c51dadbc
--- /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 000000000000..60f3aa620dd7
--- /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 000000000000..576b08151a50
--- /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 <jirib79@gmail.com>"
+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 d01ddecc7ca99dd49034c9e766c31e54436b690f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 21:12:02 +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                   | 59 ++++++++++++++++++++++++
 4 files changed, 87 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 000000000000..0e4930bcfe73
--- /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 000000000000..0e4930bcfe73
--- /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 000000000000..a29510dda4c5
--- /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 000000000000..e7fa7007de1a
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,59 @@
+# 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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" make check VERBOSE=1
+}
+
+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 1bd1f5ddb36078c627a0cd98046509f48747af43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 21:12:33 +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 86567af2ad0f..92708d7968cc 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (6 preceding siblings ...)
  2021-03-12 20:13 ` jirib
@ 2021-03-12 21:07 ` jirib
  2021-03-12 21:31 ` jirib
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6638 bytes --]

From bba48885f9f605fb8c1fe6a2e05c694f8237da4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:06:18 +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 <jirib79@gmail.com>"
+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 403c232ac99d5d2ea269f5263d1cbe12ee3057c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:06:51 +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                   | 65 ++++++++++++++++++++++++
 4 files changed, 93 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..7e3f2a2f7fe
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,65 @@
+# 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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	if [ "${XLINT}" ]; then
+		SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" \
+		make check VERBOSE=1 TSS_USER=root TSS_GROUP=root
+	else
+		SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" \
+		make check VERBOSE=1
+	fi
+}
+
+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 c91e23a68a47ebdc1fb58ea4fa30a6c0f19d1171 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:07:08 +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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (7 preceding siblings ...)
  2021-03-12 21:07 ` jirib
@ 2021-03-12 21:31 ` jirib
  2021-03-12 21:52 ` jirib
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 21:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6641 bytes --]

From 37a192b4c27263ecd9ac835b01c25a5c8cb3344c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:30:12 +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 000000000000..a7b2c51dadbc
--- /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 000000000000..60f3aa620dd7
--- /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 000000000000..576b08151a50
--- /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 <jirib79@gmail.com>"
+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 47eb1f40966afa7b1e18e183f91da5e3f0ad4c46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:30:27 +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                   | 64 ++++++++++++++++++++++++
 4 files changed, 92 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 000000000000..0e4930bcfe73
--- /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 000000000000..0e4930bcfe73
--- /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 000000000000..a29510dda4c5
--- /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 000000000000..797abc7dba72
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,64 @@
+# 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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	make_check_args="VERBOSE=1"
+	if [ ! "${XLINT}" ]; then
+		make_check_args+=" TSS_USER=root TSS_GROUP=root"
+	fi
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" \
+		${make_cmd} ${make_check_args} check
+}
+
+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 5c28f87e246683e1a15e14ea05f3abf23554ff01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:30:34 +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 86567af2ad0f..92708d7968cc 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (8 preceding siblings ...)
  2021-03-12 21:31 ` jirib
@ 2021-03-12 21:52 ` jirib
  2021-03-12 22:50 ` jirib
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 21:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6611 bytes --]

From 55948d1841f5662e093206bed9ac3d0c8313dd00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:51:22 +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 <jirib79@gmail.com>"
+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 6207e3c3ddb31323f36c2b1d745f6f6d299cbe1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:51:37 +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                   | 63 ++++++++++++++++++++++++
 4 files changed, 91 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..6d149db6997
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,63 @@
+# 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="which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	make_check_args="VERBOSE=1"
+	if [ "${XLINT}" ]; then
+		make_check_args+=" TSS_USER=root TSS_GROUP=root"
+	fi
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" make check ${make_check_args}
+}
+
+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 86c972ada5260451fc1958121e6a3d2cca416bce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 22:51:49 +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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (9 preceding siblings ...)
  2021-03-12 21:52 ` jirib
@ 2021-03-12 22:50 ` jirib
  2021-03-12 22:55 ` jirib
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 22:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6634 bytes --]

From 51995ed710817229786f460da62cf9b148fcd057 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:50:06 +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 <jirib79@gmail.com>"
+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 4067728b4cfada16ee2138cc12d578b74c8bfc7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:50:18 +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                   | 63 ++++++++++++++++++++++++
 4 files changed, 91 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..da004ef6b64
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,63 @@
+# 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="netstat-tools trousers which"
+short_desc="Libtpms-based TPM emulator"
+maintainer="Jiri Belka <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	make_check_args="VERBOSE=1"
+	if [ "${XLINT}" ]; then
+		sed -i 's/tss/root/' ${wrksrc}/tests/test_config
+	fi
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" make check ${make_check_args}
+}
+
+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 e335775633df6652c0da9f28582b0f3cfe8dcd68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:50:25 +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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (10 preceding siblings ...)
  2021-03-12 22:50 ` jirib
@ 2021-03-12 22:55 ` jirib
  2021-03-13  0:02 ` jirib
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-12 22:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6646 bytes --]

From 918ad5110b575adb84ae724a9996eebc1c7ebee2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:54:51 +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 000000000000..a7b2c51dadbc
--- /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 000000000000..60f3aa620dd7
--- /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 000000000000..576b08151a50
--- /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 <jirib79@gmail.com>"
+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 e454b8e7382395c20e3b91d80f77486b7dda64b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:55:05 +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                   | 63 ++++++++++++++++++++++++
 4 files changed, 91 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 000000000000..0e4930bcfe73
--- /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 000000000000..0e4930bcfe73
--- /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 000000000000..a29510dda4c5
--- /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 000000000000..6e337de77de9
--- /dev/null
+++ b/srcpkgs/swtpm/template
@@ -0,0 +1,63 @@
+# 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 <jirib79@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/stefanberger/swtpm"
+distfiles="https://github.com/stefanberger/swtpm/archive/v${version}.tar.gz"
+checksum=2e5ccf591e34c25bd9ae78a0aff9ff1d037dacd90b5e05b9fdc9bcece239f0af
+
+conf_files="
+	/etc/swtpm_setup.conf
+	/etc/swtpm-localca.options
+	/etc/swtpm-localca.conf"
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+do_check() {
+	make_check_args="VERBOSE=1"
+	if [ "${XLINT}" ]; then
+		sed -i 's/tss/root/' ${wrksrc}/tests/test_config
+	fi
+	SWTPM_TEST_SECCOMP_OPT="--seccomp action=none" make check ${make_check_args}
+}
+
+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 69acc29508d7b96dfe985605982ff71051082364 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
Date: Fri, 12 Mar 2021 23:55:13 +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 86567af2ad0f..92708d7968cc 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (11 preceding siblings ...)
  2021-03-12 22:55 ` jirib
@ 2021-03-13  0:02 ` jirib
  2021-03-13  0:15 ` jirib
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-13  0:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

There is an updated pull request by jirib against master on the void-packages repository

https://github.com/jirib/void-packages swtpm
https://github.com/void-linux/void-packages/pull/29338

[draft] New package: swtpm-0.5.2
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-swtpm-29338.patch --]
[-- Type: text/x-diff, Size: 6472 bytes --]

From 19fc582cb2dbe20b1773a7ce40f35f1de91237df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= <jirib79@gmail.com>
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 <jirib79@gmail.com>"
+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?= <jirib79@gmail.com>
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 <jirib79@gmail.com>"
+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?= <jirib79@gmail.com>
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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (12 preceding siblings ...)
  2021-03-13  0:02 ` jirib
@ 2021-03-13  0:15 ` jirib
  2021-03-13  0:18 ` jirib
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-13  0:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

New comment by jirib on void-packages repository

https://github.com/void-linux/void-packages/pull/29338#issuecomment-797827097

Comment:
> Please:
> 
> * one commit per package; and
> * `build_style=gnu-configure`

Done. Thx.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (13 preceding siblings ...)
  2021-03-13  0:15 ` jirib
@ 2021-03-13  0:18 ` jirib
  2021-03-22 19:50 ` jirib
  2021-03-22 19:50 ` [PR PATCH] [Closed]: " jirib
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-13  0:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

New comment by jirib on void-packages repository

https://github.com/void-linux/void-packages/pull/29338#issuecomment-797827959

Comment:
> Tests do not fail locally, is it possible how get `tests/*.log` files?

IIUC there's no 'tss' user in build env. But even if we would do `sed -i 's/tss/root/' ${wrksrc}/tests/test_config`, some tests would fail because they spawn `tcsd` and `tcsd` internally [checks](https://github.com/srajiv/trousers/blob/1722374cb9dbab6053a71d9422efc3c50e912197/src/tcsd/tcsd_conf.c#L767) the owner of `tcsd` config file is `tss` user. Thus, `make_check=extended`.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (14 preceding siblings ...)
  2021-03-13  0:18 ` jirib
@ 2021-03-22 19:50 ` jirib
  2021-03-22 19:50 ` [PR PATCH] [Closed]: " jirib
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-22 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

New comment by jirib on void-packages repository

https://github.com/void-linux/void-packages/pull/29338#issuecomment-804348851

Comment:
I'm not going to continue with this. If anybody is interested in it, feel free to reuse this PR.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Closed]: [draft] New package: swtpm-0.5.2
  2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
                   ` (15 preceding siblings ...)
  2021-03-22 19:50 ` jirib
@ 2021-03-22 19:50 ` jirib
  16 siblings, 0 replies; 18+ messages in thread
From: jirib @ 2021-03-22 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

There's a closed pull request on the void-packages repository

[draft] New package: swtpm-0.5.2
https://github.com/void-linux/void-packages/pull/29338

Description:
Fixes #28955.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-03-22 19:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  0:42 [PR PATCH] [draft] New package: swtpm-0.5.2 jirib
2021-03-10 21:22 ` [PR PATCH] [Updated] " jirib
2021-03-10 22:50 ` jirib
2021-03-11  0:34 ` jirib
2021-03-11  1:11 ` jirib
2021-03-11 15:51 ` sgn
2021-03-11 16:01 ` [PR PATCH] [Updated] " jirib
2021-03-12 20:13 ` jirib
2021-03-12 21:07 ` jirib
2021-03-12 21:31 ` jirib
2021-03-12 21:52 ` jirib
2021-03-12 22:50 ` jirib
2021-03-12 22:55 ` jirib
2021-03-13  0:02 ` jirib
2021-03-13  0:15 ` jirib
2021-03-13  0:18 ` jirib
2021-03-22 19:50 ` jirib
2021-03-22 19:50 ` [PR PATCH] [Closed]: " jirib

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).