From 879f0e651bf22d77a72327b7de80b9d65292f24f Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Jun 2026 20:00:04 +0300 Subject: [PATCH] Switch to new package format --- pkg.info => info.yml | 4 ++- source.sh => recipe.sh | 3 +- ...ilation-error-in-TPMLIB_GetPlaintext.patch | 33 +++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) rename pkg.info => info.yml (90%) rename source.sh => recipe.sh (88%) create mode 100644 source-files/0001-fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch diff --git a/pkg.info b/info.yml similarity index 90% rename from pkg.info rename to info.yml index 3028950..20555f0 100644 --- a/pkg.info +++ b/info.yml @@ -1,9 +1,11 @@ name: libtpms description: 'Library provides software emulation of a Trusted Platform Module (TPM 1.2 and TPM 2.0) ' version: 0.10.2 -revision: 1 +revision: 2 url: https://github.com/stefanberger/libtpms license: BSD-3-Clause +maintainers: + - enumdev@enumerated.dev architecture: any type: source depends: diff --git a/source.sh b/recipe.sh similarity index 88% rename from source.sh rename to recipe.sh index 5c2eea5..f677331 100644 --- a/source.sh +++ b/recipe.sh @@ -1,4 +1,4 @@ -# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT @@ -6,6 +6,7 @@ # This function is used for putting downloaded files to the correct location or applying patches prepare() { cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/0001-fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch autoreconf -fi } diff --git a/source-files/0001-fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch b/source-files/0001-fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch new file mode 100644 index 0000000..dba78b5 --- /dev/null +++ b/source-files/0001-fix-a-compilation-error-in-TPMLIB_GetPlaintext.patch @@ -0,0 +1,33 @@ +From fc8820cfaa8b5e17328f731df93911f6ab92443b Mon Sep 17 00:00:00 2001 +From: Stefan Berger +Date: Fri, 2 Jan 2026 11:37:31 -0500 +Subject: [PATCH] Fix a compilation error in TPMLIB_GetPlaintext + +Fix a compilation error that newer gcc versions may complain about: + +tpm_library.c: In function 'TPMLIB_GetPlaintext': +tpm_library.c:441:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] + 441 | start = strstr(stream, starttag); + | ^ +At top level: +cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics +cc1: all warnings being treated as errors + +Signed-off-by: Stefan Berger +--- + src/tpm_library.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tpm_library.c b/src/tpm_library.c +index f48f4fd38..7b2ea687e 100644 +--- a/src/tpm_library.c ++++ b/src/tpm_library.c +@@ -435,7 +435,7 @@ static unsigned char *TPMLIB_GetPlaintext(const char *stream, + const char *endtag, + size_t *length) + { +- char *start, *end; ++ const char *start, *end; + unsigned char *plaintext = NULL; + + start = strstr(stream, starttag);