From b724a90dc77751a9c9f8d50abb3dc32ee17bec3e Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 15 Mar 2023 18:11:14 +0300 Subject: [PATCH] import libksba-1.5.1-4.el9 --- .gitignore | 1 + .libksba.metadata | 1 + SOURCES/libksba-1.3.0-multilib.patch | 23 ++ SOURCES/libksba-1.5.1-coverity.patch | 157 ++++++++++++++ SOURCES/libksba-1.5.1.tar.bz2.sig | Bin 0 -> 119 bytes SPECS/libksba.spec | 310 +++++++++++++++++++++++++++ 6 files changed, 492 insertions(+) create mode 100644 .gitignore create mode 100644 .libksba.metadata create mode 100644 SOURCES/libksba-1.3.0-multilib.patch create mode 100644 SOURCES/libksba-1.5.1-coverity.patch create mode 100644 SOURCES/libksba-1.5.1.tar.bz2.sig create mode 100644 SPECS/libksba.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ec46476 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libksba-1.5.1.tar.bz2 diff --git a/.libksba.metadata b/.libksba.metadata new file mode 100644 index 0000000..f7d66c2 --- /dev/null +++ b/.libksba.metadata @@ -0,0 +1 @@ +740ac2551b33110e879aff100c6a6749284daf97 SOURCES/libksba-1.5.1.tar.bz2 diff --git a/SOURCES/libksba-1.3.0-multilib.patch b/SOURCES/libksba-1.3.0-multilib.patch new file mode 100644 index 0000000..89f4096 --- /dev/null +++ b/SOURCES/libksba-1.3.0-multilib.patch @@ -0,0 +1,23 @@ +diff -up libksba-1.3.0/src/ksba-config.in.multilib libksba-1.3.0/src/ksba-config.in +--- libksba-1.3.0/src/ksba-config.in.multilib 2011-02-25 09:33:11.000000000 +0100 ++++ libksba-1.3.0/src/ksba-config.in 2012-12-03 16:17:52.050832689 +0100 +@@ -15,7 +15,7 @@ cflags="@KSBA_CONFIG_CFLAGS@ @GPG_ERROR_ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + api_version="@KSBA_CONFIG_API_VERSION@" +-my_host="@KSBA_CONFIG_HOST@" ++my_host="none" + + includes="" + libdirs="" +@@ -125,10 +125,6 @@ if test "$echo_cflags" = "yes"; then + fi + + if test "$echo_libs" = "yes"; then +- libdirs="" +- if test "@libdir@" != "/usr/lib" ; then +- libdirs="-L@libdir@" +- fi + tmp="" + for i in $libdirs $libs; do + if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then diff --git a/SOURCES/libksba-1.5.1-coverity.patch b/SOURCES/libksba-1.5.1-coverity.patch new file mode 100644 index 0000000..0baca3e --- /dev/null +++ b/SOURCES/libksba-1.5.1-coverity.patch @@ -0,0 +1,157 @@ +From f47ac49c068f1bc640f391b8b4a9594486ed0bb7 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Tue, 13 Apr 2021 22:33:17 +0200 +Subject: [PATCH 1/5] tests: reset freed pointer for next iteration + +* tests/t-oid.c (main): reset freed pointer for next iteration + +-- + +Signed-off-by: Jakub Jelen +--- + tests/t-oid.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/t-oid.c b/tests/t-oid.c +index 0fe5944..04156b6 100644 +--- a/tests/t-oid.c ++++ b/tests/t-oid.c +@@ -183,6 +183,7 @@ main (int argc, char **argv) + printf (" %02X", buffer[n]); + putchar ('\n'); + free (buffer); ++ buffer = NULL; + } + } + else if (!strcmp (*argv, "--to-str")) +-- +2.30.2 + + +From 8c410c22a0366b4ce43d37b62598d8429c3ffc30 Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Tue, 13 Apr 2021 22:36:56 +0200 +Subject: [PATCH 2/5] time: avoid buffer overrun + +* src/time.c (_ksba_current_time): Use snprintf to avoid buffer overrun + +-- + +Signed-off-by: Jakub Jelen +--- + src/time.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/time.c b/src/time.c +index d793476..f5f3a03 100644 +--- a/src/time.c ++++ b/src/time.c +@@ -160,7 +160,7 @@ _ksba_current_time (ksba_isotime_t timebuf) + #else + tp = gmtime ( &epoch ); + #endif +- sprintf (timebuf,"%04d%02d%02dT%02d%02d%02d", +- 1900 + tp->tm_year, tp->tm_mon+1, tp->tm_mday, +- tp->tm_hour, tp->tm_min, tp->tm_sec); ++ snprintf (timebuf, sizeof(ksba_isotime_t), "%04d%02d%02dT%02d%02d%02d", ++ 1900 + tp->tm_year, tp->tm_mon+1, tp->tm_mday, ++ tp->tm_hour, tp->tm_min, tp->tm_sec); + } +-- +2.30.2 + + +From b8581032f492b4c17d20e966f11afd591ca177ef Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Tue, 13 Apr 2021 22:44:43 +0200 +Subject: [PATCH 3/5] asn1-func: Initialize buffer + +* src/asn1-func.c (_ksba_asn_expand_object_id): Initialize name2 buffer + +-- + +Signed-off-by: Jakub Jelen +--- + src/asn1-func.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/asn1-func.c b/src/asn1-func.c +index e64c479..05ec897 100755 +--- a/src/asn1-func.c ++++ b/src/asn1-func.c +@@ -882,7 +882,7 @@ int + _ksba_asn_expand_object_id (AsnNode node) + { + AsnNode p, p2, p3, p4, p5; +- char name_root[129], name2[129*2+1]; ++ char name_root[129], name2[129*2+1] = ""; + + /* Fixme: Make a cleaner implementation */ + if (!node) +-- +2.30.2 + + +From ff510b0511443c181b9b9af87bd2596b6a5751fc Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Wed, 14 Apr 2021 10:28:10 +0200 +Subject: [PATCH 4/5] ber-decoder: Avoid null pointer dereference on error + +* src/ber-decoder.c (_ksba_ber_decoder_dump): break on error + +-- + +The above branches set err if stuff go wrong, but it is never checked + +Signed-off-by: Jakub Jelen +--- + src/ber-decoder.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/ber-decoder.c b/src/ber-decoder.c +index 755c1d7..87e58a9 100644 +--- a/src/ber-decoder.c ++++ b/src/ber-decoder.c +@@ -1149,6 +1149,8 @@ _ksba_ber_decoder_dump (BerDecoder d, FILE *fp) + err = gpg_error_from_syserror (); + } + } ++ if (err) ++ break; + + for (n=0; !err && n < d->val.length; n++) + { +-- +2.30.2 + + +From 0431c56f4e1b6d6c3ff302648730da36a18ae93c Mon Sep 17 00:00:00 2001 +From: Jakub Jelen +Date: Wed, 14 Apr 2021 10:30:59 +0200 +Subject: [PATCH 5/5] Mark the idential branches as intentional for coverity + +* src/ber-help.c (_ksba_ber_count_tl): Mark identical branches as + intentional for coverity + +-- + +Signed-off-by: Jakub Jelen +--- + src/ber-help.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ber-help.c b/src/ber-help.c +index 1b72bf0..81c31ed 100644 +--- a/src/ber-help.c ++++ b/src/ber-help.c +@@ -440,6 +440,7 @@ _ksba_ber_count_tl (unsigned long tag, + + (void)constructed; /* Not used, but passed for uniformity of such calls. */ + ++ /* coverity[identical_branches] */ + if (tag < 0x1f) + { + buflen++; +-- +2.30.2 + diff --git a/SOURCES/libksba-1.5.1.tar.bz2.sig b/SOURCES/libksba-1.5.1.tar.bz2.sig new file mode 100644 index 0000000000000000000000000000000000000000..7dd08486960dcb93f16f754c392f812d41deb38f GIT binary patch literal 119 zcmeAuWnmEGV2~A4WXWBXm$E!p!y#PSlPRcU`VKV*t6Qv02{}d_3|yQ7Fp-u6j11lP zme${B*gw Ueai^#9eb=Joer#xsmSC301Is}LjV8( literal 0 HcmV?d00001 diff --git a/SPECS/libksba.spec b/SPECS/libksba.spec new file mode 100644 index 0000000..159ff99 --- /dev/null +++ b/SPECS/libksba.spec @@ -0,0 +1,310 @@ +Summary: CMS and X.509 library +Name: libksba +Version: 1.5.1 +Release: 4%{?dist} + +# The library is licensed under LGPLv3+ or GPLv2+, +# the rest of the package under GPLv3+ +License: (LGPLv3+ or GPLv2+) and GPLv3+ +URL: https://www.gnupg.org/ +Source0: https://www.gnupg.org/ftp/gcrypt/libksba/libksba-%{version}.tar.bz2 +Source1: https://www.gnupg.org/ftp/gcrypt/libksba/libksba-%{version}.tar.bz2.sig + +Patch1: libksba-1.3.0-multilib.patch +Patch2: libksba-1.5.1-coverity.patch + +BuildRequires: gcc +BuildRequires: gawk +BuildRequires: libgpg-error-devel >= 1.8 +BuildRequires: libgcrypt-devel >= 1.2.0 +BuildRequires: make + +%description +KSBA (pronounced Kasbah) is a library to make X.509 certificates as +well as the CMS easily accessible by other applications. Both +specifications are building blocks of S/MIME and TLS. + +%package devel +Summary: Development headers and libraries for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +%{summary}. + + +%prep +%setup -q + +%patch1 -p1 -b .multilib +%patch2 -p1 -b .coverity + +# Convert to utf-8 +for file in THANKS; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done + +%build +%configure \ + --disable-dependency-tracking \ + --disable-static + +%make_build + + +%install +%make_install + +rm -f $RPM_BUILD_ROOT%{_infodir}/dir +rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la + + +%check +make check + + +%ldconfig_scriptlets + +%files +%license COPYING COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv3 +%doc AUTHORS ChangeLog NEWS README* THANKS TODO +%{_libdir}/libksba.so.8* + +%files devel +%{_bindir}/ksba-config +%{_libdir}/libksba.so +%{_includedir}/ksba.h +%{_datadir}/aclocal/ksba.m4 +%{_libdir}/pkgconfig/ksba.pc +%{_infodir}/ksba.info* + + +%changelog +* Wed Mar 15 2023 MSVSphere Packaging Team - 1.5.1-4 +- Rebuilt for MSVSphere 9.1. + +* Mon Aug 09 2021 Mohan Boddu - 1.5.1-4 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 1.5.1-3 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Thu Apr 15 2021 Jakub Jelen - 1.5.1-2 +- Address issues reported by coverity + +* Wed Apr 07 2021 Jakub Jelen - 1.5.1-1 +- New upstream release (#1946544) + +* Tue Jan 26 2021 Fedora Release Engineering - 1.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Dec 01 2020 Jakub Jelen - 1.5.0-1 +- New upstream release (#1899183) + +* Tue Oct 6 2020 Tomas Mraz - 1.4.0-1 +- New upstream version 1.4.0 + +* Tue Jul 28 2020 Fedora Release Engineering - 1.3.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 1.3.5-12 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Wed Jan 29 2020 Fedora Release Engineering - 1.3.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.3.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.3.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.3.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1.3.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1.3.5-6 +- Switch to %%ldconfig_scriptlets + +* Thu Aug 03 2017 Fedora Release Engineering - 1.3.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.3.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.3.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 2 2017 Tomáš Mráz - 1.3.5-2 +- mark license files as such in the file list (#1418513) + +* Mon Aug 29 2016 Tomáš Mráz - 1.3.5-1 +- new upstream release fixing minor security issues + +* Thu May 12 2016 Tomáš Mráz - 1.3.4-1 +- new upstream release fixing minor security issues + +* Thu Feb 04 2016 Fedora Release Engineering - 1.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Apr 14 2015 Tomáš Mráz - 1.3.3-1 +- new upstream release fixing minor security issues + +* Wed Nov 26 2014 Tomáš Mráz - 1.3.2-1 +- new upstream release fixing a security issue + +* Fri Sep 19 2014 Tomáš Mráz - 1.3.1-1 +- new upstream release + +* Sun Aug 17 2014 Fedora Release Engineering - 1.3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 1.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Dec 3 2012 Tomas Mraz - 1.3.0-2 +- fix multilib conflict in libksba-config + +* Wed Nov 21 2012 Tomas Mraz - 1.3.0-1 +- new upstream version + +* Thu Jul 19 2012 Fedora Release Engineering - 1.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 16 2011 Tomas Mraz - 1.2.0-1 +- new upstream version + +* Thu Jun 02 2011 Rex Dieter 1.0.8-3 +- libksba-devel multilib conflict (#601976) + +* Tue Feb 08 2011 Fedora Release Engineering - 1.0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 23 2010 Rex Dieter - 1.0.8-1 +- libksba-1.0.8 + +* Fri Jan 8 2010 Tomas Mraz - 1.0.7-1 +- new upstream version + +* Thu Dec 17 2009 Rex Dieter - 1.0.6-4 +- better (upstreamable) multilib patch +- tighten %%files a bit + +* Mon Aug 10 2009 Ville Skyttä - 1.0.6-3 +- Convert specfile to UTF-8. + +* Fri Jul 24 2009 Fedora Release Engineering - 1.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat Jun 20 2009 Rex Dieter - 1.0.6-1 +- libksba-1.0.6 +- -devel: fix info scriptlet + +* Wed Feb 25 2009 Fedora Release Engineering - 1.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Jan 09 2009 Rex Dieter 1.0.5-1 +- libksba-1.0.5 + +* Tue Sep 23 2008 Rex Dieter 1.0.4-1 +- libksba-1.0.4 + +* Thu Apr 03 2008 Rex Dieter 1.0.3-2 +- multiarch conflicts (#342201) + +* Tue Feb 12 2008 Rex Dieter 1.0.3-1 +- libksba-1.0.3 + +* Fri Feb 08 2008 Rex Dieter 1.0.2-4 +- respin (gcc43) + +* Sat Aug 25 2007 Rex Dieter 1.0.2-3 +- BR: gawk + +* Sat Aug 25 2007 Rex Dieter 1.0.2-2 +- respin (ppc32, BuildID) +- License: GPLv3 + +* Fri Jul 06 2007 Rex Dieter 1.0.2-1 +- libksba-1.0.2 + +* Fri Dec 01 2006 Rex Dieter 1.0.1-1 +- libksba-1.0.1 + +* Mon Oct 02 2006 Rex Dieter 1.0.0-1.1 +- respin + +* Thu Aug 31 2006 Rex Dieter 1.0.0-1 +- libksba-1.0.0 + +* Tue Aug 29 2006 Rex Dieter 0.9.15-3 +- fc6 respin + +* Tue Jun 20 2006 Rex Dieter 0.9.15-2 +- 0.9.15 + +* Wed Mar 1 2006 Rex Dieter 0.9.13-2.1 +- fc5: gcc/glibc respin + +* Wed Nov 30 2005 Rex Dieter 0.9.13-2 +- remove hacks +- drop self Obsoletes + +* Wed Nov 30 2005 Rex Dieter 0.9.13-1 +- 0.9.13 + +* Fri Aug 26 2005 Rex Dieter 0.9.11-3 +- botched Obsoletes good, let's try again. + +* Fri Aug 26 2005 Rex Dieter 0.9.11-2 +- revert to 0.9.11 (0.9.12 makes gnupg2 fail on x86_64) using Obsoletes + to avoid Epoch or other ugly means. + +* Mon Aug 8 2005 Rex Dieter 0.9.12-1 +- 0.9.12 +- --disable-static + +* Thu Apr 21 2005 Rex Dieter 0.9.11-1 +- 0.9.11 +- drop upstreamed acquote patch + +* Thu Apr 7 2005 Michael Schwendt - 0.9.9-2 +- rebuilt + +* Tue Feb 1 2005 Michael Schwendt - 0:0.9.9-1 +- Minus BR libtool, add epoch to -devel req, fix underquoted ksba.m4. + +* Fri Oct 22 2004 Rex Dieter 0:0.9.9-0.fdr.2 +- remove hard-coded .gz from %%post/%%postun +- add %%check section + +* Tue Oct 19 2004 Rex Dieter 0:0.9.9-0.fdr.1 +- 0.9.9 + +* Thu Mar 20 2003 Ville Skyttä - 0.4.7-0.fdr.1 +- Update to 0.4.7, and to current Fedora guidelines. +- Exclude %%{_libdir}/*.la. + +* Wed Feb 12 2003 Warren Togami 0.4.6-1.fedora.3 +- temporary workaround to lib/dir conflict problem + +* Sat Feb 8 2003 Ville Skyttä - 0.4.6-1.fedora.1 +- First Fedora release.