diff --git a/SPECS/libtpms/0001-fix-const-qualifier-build-error.patch b/SPECS/libtpms/0001-fix-const-qualifier-build-error.patch new file mode 100644 index 000000000..c6a78cc8e --- /dev/null +++ b/SPECS/libtpms/0001-fix-const-qualifier-build-error.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: HNO3Miracle +Date: Tue, 7 Apr 2026 18:08:00 +0800 +Subject: [PATCH] fix const qualifier build error + +Recent GCC/glibc toolchains diagnose assigning strstr() results to a +non-const pointer when the input stream is const. Keep the pointers +const through the parsing path. + +--- + 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 dce19bb..e4db2af 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); +-- +2.49.0 + diff --git a/SPECS/libtpms/libtpms.spec b/SPECS/libtpms/libtpms.spec index 115af84d9..e5f97ce85 100644 --- a/SPECS/libtpms/libtpms.spec +++ b/SPECS/libtpms/libtpms.spec @@ -6,14 +6,16 @@ # SPDX-License-Identifier: MulanPSL-2.0 Name: libtpms -Version: 0.10.1 +Version: 0.10.2 Release: %autorelease Summary: Library providing Trusted Platform Module (TPM) functionality License: BSD-3-Clause URL: https://github.com/stefanberger/libtpms -#!RemoteAsset +#!RemoteAsset: sha256:edac03680f8a4a1c5c1d609a10e3f41e1a129e38ff5158f0c8deaedc719fb127 Source: https://github.com/stefanberger/libtpms/archive/refs/tags/v%{version}.tar.gz BuildSystem: autotools +# Fix const-qualifier build failure with newer GCC/glibc toolchains. +Patch0: 0001-fix-const-qualifier-build-error.patch BuildOption(conf): --disable-static BuildOption(conf): --with-tpm2 @@ -54,4 +56,4 @@ NOCONFIGURE=1 ./autogen.sh %{_mandir}/man3/TPM* %changelog -%{?autochangelog} +%autochangelog diff --git a/SPECS/opensc/opensc.spec b/SPECS/opensc/opensc.spec index 113effa1a..9f6344989 100644 --- a/SPECS/opensc/opensc.spec +++ b/SPECS/opensc/opensc.spec @@ -6,12 +6,12 @@ # SPDX-License-Identifier: MulanPSL-2.0 Name: opensc -Version: 0.26.1 +Version: 0.27.1 Release: %autorelease Summary: Smart card library and applications License: LGPL-2.1-or-later AND BSD-3-Clause URL: https://github.com/OpenSC/OpenSC -#!RemoteAsset +#!RemoteAsset: sha256:9b72f1b5d92569de67a42bf0edb21ecdc685ad03378343416362a99b90b1fad1 Source0: https://github.com/OpenSC/OpenSC/archive/refs/tags/%{version}.tar.gz Source1: opensc.module BuildSystem: autotools @@ -20,10 +20,6 @@ BuildSystem: autotools Patch0: 0001-opensc-0.19.0-pinpad.patch # Disable cache bacause cache brings trouble. Patch1: 0002-opensc-0.22.0-file-cache.patch -# Fix C23 and GCC 14 build errors. -Patch2: 0003-opensc-0.26.1-compiler.patch -# Fix bash completion function name. -Patch3: 0004-opensc-0.26.1-bash-completion.patch BuildOption(conf): --disable-static BuildOption(conf): --disable-autostart-items @@ -128,4 +124,4 @@ rm -rf %{buildroot}%{_mandir}/man1/opensc-notify.1* %{_libdir}/pkcs11/pkcs11-spy.so %changelog -%{?autochangelog} +%autochangelog