Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions SPECS/libtpms/0001-fix-const-qualifier-build-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
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

8 changes: 5 additions & 3 deletions SPECS/libtpms/libtpms.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the package guidelines.


BuildOption(conf): --disable-static
BuildOption(conf): --with-tpm2
Expand Down Expand Up @@ -54,4 +56,4 @@ NOCONFIGURE=1 ./autogen.sh
%{_mandir}/man3/TPM*

%changelog
%{?autochangelog}
%autochangelog
10 changes: 3 additions & 7 deletions SPECS/opensc/opensc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -128,4 +124,4 @@ rm -rf %{buildroot}%{_mandir}/man1/opensc-notify.1*
%{_libdir}/pkcs11/pkcs11-spy.so

%changelog
%{?autochangelog}
%autochangelog