Github messages for voidlinux
 help / color / mirror / Atom feed
From: motorto <motorto@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] tpm2-tss: update to 3.2.0.
Date: Sat, 10 Sep 2022 23:59:53 +0200	[thread overview]
Message-ID: <20220910215953.hAuCyrbK_u4tMCzXaw9Wgj-Dd0ZvxVu_P4hXRxLpw5E@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38567@inbox.vuxu.org>

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

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

https://github.com/motorto/void-packages tpm2-tss_update_autoconf
https://github.com/void-linux/void-packages/pull/38567

tpm2-tss: update to 3.2.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - armv6l
 
Because of the rebuild because of the autoconf update (#38412), the current version doesn't  compile with autoconf-2.7.1 so updating it so that it can be built with the new version. (easier than patching the software)

Someone could check if this package works properly ?

@ndowens You being the package maintainer does it look okay to you

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

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

From 7c654a02f0ad71e2dd656de3711671815271398f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= <acerqueira021@gmail.com>
Date: Tue, 9 Aug 2022 23:43:53 +0100
Subject: [PATCH] tpm2-tss: update to 3.2.0.

---
 .../dont-run-sysusers-in-Makefile.patch       | 58 +++++++++++++++++++
 .../patches/musl-32bit-stat-workaround.patch  | 33 +++++++++++
 srcpkgs/tpm2-tss/template                     |  9 ++-
 3 files changed, 97 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/tpm2-tss/patches/dont-run-sysusers-in-Makefile.patch
 create mode 100644 srcpkgs/tpm2-tss/patches/musl-32bit-stat-workaround.patch

diff --git a/srcpkgs/tpm2-tss/patches/dont-run-sysusers-in-Makefile.patch b/srcpkgs/tpm2-tss/patches/dont-run-sysusers-in-Makefile.patch
new file mode 100644
index 000000000000..0ba1f836abb2
--- /dev/null
+++ b/srcpkgs/tpm2-tss/patches/dont-run-sysusers-in-Makefile.patch
@@ -0,0 +1,58 @@
+diff --git a/Makefile.am b/Makefile.am
+index ce19aac3..22a8c075 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -498,10 +498,9 @@ fapi-config.json: dist/fapi-config.json.in
+ 		-e 's|[@]userstatedir@|$(userstatedir)|g' \
+ 		< "$<" > "$@"
+ 
+-sysusers_DATA = dist/sysusers.d/tpm2-tss.conf
+ tmpfiles_DATA = tpm2-tss-fapi.conf
+ 
+-EXTRA_DIST += dist/sysusers.d/tpm2-tss.conf dist/tmpfiles.d/tpm2-tss-fapi.conf.in
++EXTRA_DIST += dist/tmpfiles.d/tpm2-tss-fapi.conf.in
+ CLEANFILES += tpm2-tss-fapi.conf
+ 
+ # We have to do this ourselves, in order to get absolute paths
+@@ -726,13 +725,6 @@ EXTRA_DIST += dist/tpm-udev.rules
+ 
+ install-dirs:
+ if HOSTOS_LINUX
+-if SYSD_SYSUSERS
+-	@echo "systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf"
+-	@systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf || echo "WARNING Failed to create the tss user and group"
+-else
+-	@echo "call make_tss_user_and_group"
+-	@$(call make_tss_user_and_group) || echo "WARNING Failed to create the tss user and group"
+-endif
+ if SYSD_TMPFILES
+ 	@echo "systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf"
+ 	@systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf|| echo "WARNING Failed to create the FAPI directories with the correct permissions"
+diff --git a/configure.ac b/configure.ac
+index 6482944f..44c0e383 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -483,22 +483,9 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer
+       [AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])])
+ 
+ # Check for systemd helper tools used by make install
+-AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes)
+-AM_CONDITIONAL(SYSD_SYSUSERS, test "x$systemd_sysusers" = "xyes")
+ AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes)
+ AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes")
+ 
+-# Check all tools used by make install
+-AS_IF([test "$HOSTOS" = "Linux"],
+-    [ AC_CHECK_PROG(useradd, useradd, yes)
+-      AC_CHECK_PROG(groupadd, groupadd, yes)
+-      AC_CHECK_PROG(adduser, adduser, yes)
+-      AC_CHECK_PROG(addgroup, addgroup, yes)
+-      AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ],
+-         [AC_MSG_ERROR([addgroup or groupadd are needed.])])
+-      AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ],
+-         [AC_MSG_ERROR([adduser or useradd are needed.])])])
+-
+ AC_SUBST([PATH])
+ 
+ dnl --------- Doxy Gen -----------------------
+
diff --git a/srcpkgs/tpm2-tss/patches/musl-32bit-stat-workaround.patch b/srcpkgs/tpm2-tss/patches/musl-32bit-stat-workaround.patch
new file mode 100644
index 000000000000..44b5e4dee746
--- /dev/null
+++ b/srcpkgs/tpm2-tss/patches/musl-32bit-stat-workaround.patch
@@ -0,0 +1,33 @@
+From: https://git.alpinelinux.org/aports/tree/community/tpm2-tss/musl-32bit-stat-workaround.patch
+
+diff --git a/Makefile-test.am b/Makefile-test.am
+index 020b6680..135195ee 100644
+--- a/Makefile-test.am
++++ b/Makefile-test.am
+@@ -648,7 +648,8 @@ test_unit_fapi_io_LDFLAGS = $(TESTS_LDFLAGS) $(JSONC_LIBS) $(CURL_LIBS) \
+                             -Wl,--wrap=write \
+                             -Wl,--wrap=fileno \
+                             -Wl,--wrap=fclose \
+-                            -Wl,--wrap=stat
++                            -Wl,--wrap=stat \
++                            -Wl,--wrap=__stat_time64
+ test_unit_fapi_io_SOURCES = test/unit/fapi-io.c \
+                             src/tss2-fapi/ifapi_json_deserialize.c \
+                             src/tss2-fapi/ifapi_json_serialize.c \
+diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c
+index 41600ca9..08936d7e 100644
+--- a/test/unit/fapi-io.c
++++ b/test/unit/fapi-io.c
+@@ -57,6 +57,12 @@ int
+     return 0;
+ }
+ 
++int
++ __wrap___stat_time64(const char *pathname, struct stat *statbuf, ...)
++{
++    return __wrap_stat(pathname, statbuf);
++}
++
+ FILE *
+ __real_fopen(const char *pathname, const char* mode, ...);
+ FILE *
diff --git a/srcpkgs/tpm2-tss/template b/srcpkgs/tpm2-tss/template
index b22b99847776..c487b682d192 100644
--- a/srcpkgs/tpm2-tss/template
+++ b/srcpkgs/tpm2-tss/template
@@ -1,6 +1,6 @@
 # Template file for 'tpm2-tss'
 pkgname=tpm2-tss
-version=3.0.3
+version=3.2.0
 revision=1
 build_style=gnu-configure
 configure_args="--disable-weakcrypto --with-crypto=mbed --disable-fapi"
@@ -10,12 +10,15 @@ short_desc="OSS implementation of the TCG TPM2 Software Stack"
 maintainer="Nathan Owens <ndowens@artixlinux.org>"
 license="BSD-2-Clause"
 homepage="https://github.com/tpm2-software/tpm2-tss"
-distfiles="${homepage}/archive/${version}.tar.gz"
-checksum=2242f2646fc13234dbeaf959d1fb1c23dc07b7786e7acfd98189cdeca1361efd
+distfiles="https://github.com/tpm2-software/tpm2-tss/archive/${version}.tar.gz"
+checksum=521a8ee45285c1225573031e90b0f8b835166225646a1f66fad1c44858766943
 
 system_accounts="_tss"
 
 pre_configure() {
+	vsed -i \
+		"s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${version}/" \
+		"configure.ac" # fix version
 	./bootstrap
 }
 

  parent reply	other threads:[~2022-09-10 21:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 22:47 [PR PATCH] " motorto
2022-08-21  6:31 ` tranzystorek-io
2022-08-21 10:51 ` motorto
2022-08-21 10:53 ` tranzystorek-io
2022-08-21 11:25 ` [PR PATCH] [Updated] " motorto
2022-08-21 11:25 ` motorto
2022-08-21 11:27 ` [PR PATCH] [Updated] " motorto
2022-09-10 13:46 ` [PR REVIEW] " paper42
2022-09-10 13:46 ` paper42
2022-09-10 13:46 ` paper42
2022-09-10 19:37 ` [PR PATCH] [Updated] " motorto
2022-09-10 19:37 ` motorto
2022-09-10 19:42 ` [PR PATCH] [Updated] " motorto
2022-09-10 19:43 ` motorto
2022-09-10 21:35 ` [PR REVIEW] " paper42
2022-09-10 21:59 ` motorto [this message]
2022-09-10 22:00 ` motorto
2022-09-13 20:11 ` [PR PATCH] [Merged]: " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220910215953.hAuCyrbK_u4tMCzXaw9Wgj-Dd0ZvxVu_P4hXRxLpw5E@z \
    --to=motorto@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).