From defa9c8ad9a168a2b48d1cd7af2a44c6d79ab11b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 04 2021 04:05:15 +0000 Subject: import libunistring-0.9.10-15.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..390df27 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libunistring-0.9.10.tar.xz diff --git a/.libunistring.metadata b/.libunistring.metadata new file mode 100644 index 0000000..75ac82a --- /dev/null +++ b/.libunistring.metadata @@ -0,0 +1 @@ +16dc423d3ebd23f365b0ffe7d584428b427f4bde SOURCES/libunistring-0.9.10.tar.xz diff --git a/SOURCES/fix-memory-leak-in-vasnprintf.patch b/SOURCES/fix-memory-leak-in-vasnprintf.patch new file mode 100644 index 0000000..66649ba --- /dev/null +++ b/SOURCES/fix-memory-leak-in-vasnprintf.patch @@ -0,0 +1,85 @@ +diff -ru libunistring-0.9.10/lib/vasnprintf.c libunistring-0.9.10.new/lib/vasnprintf.c +--- libunistring-0.9.10/lib/vasnprintf.c 2018-05-25 18:02:16.000000000 +0200 ++++ libunistring-0.9.10.new/lib/vasnprintf.c 2021-06-14 17:06:43.084948649 +0200 +@@ -1864,7 +1864,7 @@ + + /* Ensures that allocated >= needed. Aborts through a jump to + out_of_memory if needed is SIZE_MAX or otherwise too big. */ +-#define ENSURE_ALLOCATION(needed) \ ++#define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \ + if ((needed) > allocated) \ + { \ + size_t memory_size; \ +@@ -1875,17 +1875,19 @@ + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ + if (size_overflow_p (memory_size)) \ +- goto out_of_memory; \ ++ oom_statement \ + if (result == resultbuf || result == NULL) \ + memory = (DCHAR_T *) malloc (memory_size); \ + else \ + memory = (DCHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ +- goto out_of_memory; \ ++ oom_statement \ + if (result == resultbuf && length > 0) \ + DCHAR_CPY (memory, result, length); \ + result = memory; \ + } ++#define ENSURE_ALLOCATION(needed) \ ++ ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; ) + + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) + { +@@ -2137,7 +2139,8 @@ + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2263,7 +2266,8 @@ + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2389,7 +2393,8 @@ + } + if (converted != result + length) + { +- ENSURE_ALLOCATION (xsum (length, converted_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), ++ { free (converted); goto out_of_memory; }); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } +@@ -2914,7 +2919,8 @@ + } + } + # else +- ENSURE_ALLOCATION (xsum (length, tmpdst_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), ++ { free (tmpdst); goto out_of_memory; }); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + length += tmpdst_len; +@@ -5368,7 +5374,8 @@ + errno = saved_errno; + return NULL; + } +- ENSURE_ALLOCATION (xsum (length, tmpdst_len)); ++ ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), ++ { free (tmpdst); goto out_of_memory; }); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + count = tmpdst_len; +libunistring-0.9.10.new/lib のみに存在: vasnprintf.c.orig diff --git a/SPECS/libunistring.spec b/SPECS/libunistring.spec new file mode 100644 index 0000000..1ec6e05 --- /dev/null +++ b/SPECS/libunistring.spec @@ -0,0 +1,181 @@ +# This spec file has been automatically updated +Version: 0.9.10 +Release: 15%{?dist} +Name: libunistring +Summary: GNU Unicode string library +License: GPLv2+ or LGPLv3+ +URL: https://www.gnu.org/software/libunistring/ +Source0: https://ftp.gnu.org/gnu/libunistring/%{name}-%{version}.tar.xz +Patch0: fix-memory-leak-in-vasnprintf.patch +BuildRequires: gcc +BuildRequires: make +Provides: bundled(gnulib) + +%description +This portable C library implements Unicode string types in three flavours: +(UTF-8, UTF-16, UTF-32), together with functions for character processing +(names, classifications, properties) and functions for string processing +(iteration, formatted output, width, word breaks, line breaks, normalization, +case folding and regular expressions). + +%package devel +Summary: GNU Unicode string library - development files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development files for programs using libunistring. + +%prep +%setup -q +%patch0 -p1 -b .fix-memory-leak-in-vasnprintf + +%build +%configure --disable-static --disable-rpath +%make_build + +%install +%make_install +rm -f $RPM_BUILD_ROOT%{_infodir}/dir +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.la +# Move staged docs so not picked up by %%doc in main package +mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} __doc + +%files +%license COPYING COPYING.LIB +%doc AUTHORS NEWS README +%{_libdir}/%{name}.so.* + +%files devel +%doc HACKING DEPENDENCIES THANKS ChangeLog +%doc __doc/* +%{_infodir}/%{name}.info* +%{_libdir}/%{name}.so +%{_includedir}/unistring +%{_includedir}/*.h + +%ldconfig_scriptlets + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 0.9.10-15 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Mon Jun 21 2021 Mike FABIAN - 0.9.10-14 +- Related rhbz#1938800: Fix CI tests and convert them to tmt + +* Mon Jun 14 2021 Mike FABIAN - 0.9.10-13 +- Related rhbz#1938800: Fix spelling in license GPLV2+ -> GPLv2+ + +* Mon Jun 14 2021 Mike FABIAN - 0.9.10-12 +- Fix memory leak in vasnprint. Resolves: rhbz#1938800 + (Backported from upstream: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4d288a80bf7ebe29334b9805cdcc70eacb6059c1) + +* Fri Apr 16 2021 Mohan Boddu - 0.9.10-11 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.9.10-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.9.10-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 0.9.10-8 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Wed Jan 29 2020 Fedora Release Engineering - 0.9.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.9.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.9.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jul 31 2018 Florian Weimer - 0.9.10-4 +- Rebuild with fixed binutils + +* Sat Jul 28 2018 Igor Gnatenko - 0.9.10-3 +- Replace obsolete scriptlets + +* Fri Jul 13 2018 Fedora Release Engineering - 0.9.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon May 28 2018 Daiki Ueno - 0.9.10-1 +- Update to upstream 0.9.10 release + +* Thu Mar 01 2018 Daiki Ueno - 0.9.9-1 +- Update to upstream 0.9.9 release + +* Wed Feb 07 2018 Fedora Release Engineering - 0.9.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 0.9.8-2 +- Switch to %%ldconfig_scriptlets + +* Sat Dec 2 2017 Daiki Ueno - 0.9.8-1 +- Update to 0.9.8 + +* Thu Aug 03 2017 Fedora Release Engineering - 0.9.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.9.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 17 2017 Daiki Ueno - 0.9.7-1 +- Update to 0.9.7 +- Update license to "GPLv2+ or LGPLv2+" + +* Wed Feb 01 2017 Stephen Gallagher - 0.9.4-4 +- Add missing %%license macro + +* Thu Feb 04 2016 Fedora Release Engineering - 0.9.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Sep 02 2014 Pádraig Brady - 0.9.4-1 +- Latest upstream + +* Sun Aug 17 2014 Fedora Release Engineering - 0.9.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.9.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Aug 29 2013 Pádraig Brady 0.9.3-9 +- Adjust to avoid duplicate docs caused by %%doc macro changes in Fedora 20 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.9.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.9.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 0.9.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 26 2012 Akira TAGOH - 0.9.3-5 +- Fix a typo in %%preun. (#737638) + +* Tue May 15 2012 Mikolaj Izdebski - 0.9.3-4 +- Add bundled(gnulib) provides + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun May 23 2010 Pádraig Brady 0.9.3-1 +- Update to 0.9.3 + +* Thu Nov 19 2009 Pádraig Brady 0.9.1-3 +- Remove glibc-devel and texinfo build deps + +* Thu Nov 19 2009 Pádraig Brady 0.9.1-2 +- Changes as per initial review by panemade@gmail.com + +* Tue Nov 17 2009 Pádraig Brady 0.9.1-1 +- Initial version