From 100c8ec919c66c2d65456af2a7c7d935d64a7998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= Date: Tue, 9 Aug 2022 23:43:53 +0100 Subject: [PATCH] tpm2-tss: update to 3.2.0. --- .../patches/musl-32bit-stat-workaround.patch | 33 +++++++++++++++++++ srcpkgs/tpm2-tss/template | 11 +++++-- 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/tpm2-tss/patches/musl-32bit-stat-workaround.patch 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..8ca4146e2493 100644 --- a/srcpkgs/tpm2-tss/template +++ b/srcpkgs/tpm2-tss/template @@ -1,21 +1,24 @@ # 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" -hostmakedepends="autoconf-archive automake libtool pkg-config doxygen libltdl-devel" +hostmakedepends="shadow autoconf-archive automake libtool pkg-config doxygen libltdl-devel" makedepends="libltdl-devel mbedtls-devel" short_desc="OSS implementation of the TCG TPM2 Software Stack" maintainer="Nathan Owens " license="BSD-2-Clause" homepage="https://github.com/tpm2-software/tpm2-tss" distfiles="${homepage}/archive/${version}.tar.gz" -checksum=2242f2646fc13234dbeaf959d1fb1c23dc07b7786e7acfd98189cdeca1361efd +checksum=521a8ee45285c1225573031e90b0f8b835166225646a1f66fad1c44858766943 system_accounts="_tss" pre_configure() { + vsed -i \ + "s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${version}/" \ + "configure.ac" # fix version ./bootstrap } @@ -24,6 +27,8 @@ pre_build() { } post_install() { + rm -rf ${DESTDIR}/etc/tmpfiles.d + rm -rf ${DESTDIR}/etc/sysusers.d vlicense LICENSE }