From 9e520094bd68f9d5ca1842de6f37954222d675ad Mon Sep 17 00:00:00 2001 From: Dmitry Samoylik Date: Thu, 26 Dec 2024 16:55:35 +0300 Subject: [PATCH] import recode-3.7.14-6.el10 --- .gitignore | 1 + .recode.metadata | 1 + ...close-input-stream-when-we-opened-it.patch | 31 ++ ....7.13-Rename-coliding-hash-functions.patch | 15 + SPECS/recode.spec | 388 ++++++++++++++++++ 5 files changed, 436 insertions(+) create mode 100644 .gitignore create mode 100644 .recode.metadata create mode 100644 SOURCES/0001-src-task.c-only-close-input-stream-when-we-opened-it.patch create mode 100644 SOURCES/recode-3.7.13-Rename-coliding-hash-functions.patch create mode 100644 SPECS/recode.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0657a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/recode-3.7.14.tar.gz diff --git a/.recode.metadata b/.recode.metadata new file mode 100644 index 0000000..d9237d1 --- /dev/null +++ b/.recode.metadata @@ -0,0 +1 @@ +43a291ddc3baeb3679b3803efa6e1c0b67e2bd53 SOURCES/recode-3.7.14.tar.gz diff --git a/SOURCES/0001-src-task.c-only-close-input-stream-when-we-opened-it.patch b/SOURCES/0001-src-task.c-only-close-input-stream-when-we-opened-it.patch new file mode 100644 index 0000000..3ebd1c0 --- /dev/null +++ b/SOURCES/0001-src-task.c-only-close-input-stream-when-we-opened-it.patch @@ -0,0 +1,31 @@ +From 80516f601ce5f1cee44848615dffe4252f2d205f Mon Sep 17 00:00:00 2001 +From: Reuben Thomas +Date: Fri, 17 Feb 2023 12:52:19 +0000 +Subject: [PATCH] src/task.c: only close input stream when we opened it (fix + #48) + +Thanks to Remi Collet for the bug report and fix. +--- + src/task.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/task.c b/src/task.c +index 2977a03..e302858 100644 +--- a/src/task.c ++++ b/src/task.c +@@ -353,9 +353,10 @@ recode_perform_task (RECODE_TASK task) + SUBTASK_RETURN (subtask); + } + +- /* Close the input file. */ ++ /* Close the input file when we opened it. */ + +- if (subtask->input.file) ++ if (subtask->input.file && subtask->input.name && ++ subtask->input.name[0]) + fclose (subtask->input.file); + } + #endif +-- +2.39.1 + diff --git a/SOURCES/recode-3.7.13-Rename-coliding-hash-functions.patch b/SOURCES/recode-3.7.13-Rename-coliding-hash-functions.patch new file mode 100644 index 0000000..aa545aa --- /dev/null +++ b/SOURCES/recode-3.7.13-Rename-coliding-hash-functions.patch @@ -0,0 +1,15 @@ +diff -ur a/lib/hash.h b/lib/hash.h +--- a/lib/hash.h 2023-01-04 23:06:45.000000000 +0100 ++++ b/lib/hash.h 2023-01-17 13:04:05.200398680 +0100 +@@ -24,6 +24,11 @@ + #ifndef HASH_H_ + # define HASH_H_ + ++#define hash_lookup recode_hash_lookup ++#define hash_delete recode_hash_delete ++#define hash_free recode_hash_free ++#define hash_insert recode_hash_insert ++ + # include + + # ifdef __cplusplus diff --git a/SPECS/recode.spec b/SPECS/recode.spec new file mode 100644 index 0000000..2f852aa --- /dev/null +++ b/SPECS/recode.spec @@ -0,0 +1,388 @@ +Name: recode +Version: 3.7.14 +Release: 6%{?dist} +Summary: Conversion between character sets and surfaces +# COPYING: GPLv3 text +# COPYING-LIB: LGPLv3 text +# doc/recode.info: OFSFDL +# doc/recode.texi: OFSFDL +# lib/error.h: GPLv3+ +# lib/strerror-override.c: GPLv3+ +# lib/vasnprintf.c: GPLv3+ +# src/ansellat1.l: BSD +# src/lat1asci.c: GPLv3+ +# src/merged.c: BSD +# src/recode.h: LGPLv3+ +# src/ucs.c: LGPLv3+ +## Not in any binary package +# aclocal.m4: FSFULLR +# build-aux/bootstrap.in: MIT or GPLv3+ (bundled gnulib-modules/bootstrap) +# build-aux/compile: GPLv2+ with exceptions +# build-aux/config.guess: GPLv3+ with exceptions +# build-aux/config.rpath: FSFULLR +# build-aux/config.sub: GPLv3+ with exceptions +# build-aux/depcomp: GPLv2+ with exceptions +# build-aux/extract-trace: MIT or GPLv3+ (bundled gnulib-modules/bootstrap) +# build-aux/funclib.sh: MIT or GPLv3+ (bundled gnulib-modules/bootstrap) +# build-aux/inline-source: MIT or GPLv3+ (bundled gnulib-modules/bootstrap) +# build-aux/install-sh: MIT +# build-aux/ltmain.sh: GPLv2+ with exceptions and GPLv3+ with exceptions +# and GPLv3+ +# build-aux/mdate-sh: GPLv2+ with exceptions +# build-aux/missing: GPLv2+ with exceptions +# build-aux/options-parser: MIT or GPLv3+ (bundled gnulib-modules/bootstrap) +# build-aux/texinfo.tex: GPLv3+ with exceptions +# config.rpath: FSFULLR +# configure: FSFUL and GPLv2+ with exceptions +# doc/Makefile.am: GPLv3+ +# doc/Makefile.in: FSFULLR and GPLv3+ +# doc/texinfo.tex: GPLv2+ with exceptions +# INSTALL: FSFAP +# Makefile.am: GPLv3+ +# m4/gettext.m4: FSFULLR +# m4/gnulib-cache.m4: GPLv3+ with exceptions +# m4/libtool.m4: GPLv2+ with exceptions and FSFUL +# m4/mbstate_t.m4: FSFULLR +# m4/minmax.m4: FSFULLR +# m4/ssize_t.m4: FSFULLR +# m4/sys_stat_h.m4: FSFULLR +# tables.py: GPLv3+ +# tests/Makefile.am: GPLv3+ +# tests/Makefile.in: FSFULLR and GPLv3+ +# tests/Recode.pyx: GPLv3+ +License: GPL-3.0-or-later AND LGPL-3.0-or-later AND BSD-2-Clause AND LicenseRef-OFSFDL +URL: https://github.com/rrthomas/recode +Source: %{url}/releases/download/v%{version}/recode-%{version}.tar.gz +Patch: recode-3.7.13-Rename-coliding-hash-functions.patch +# https://github.com/rrthomas/recode/issues/48 +Patch: 0001-src-task.c-only-close-input-stream-when-we-opened-it.patch + + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: coreutils +BuildRequires: gcc +BuildRequires: gettext-devel +# help2man is executed from ./src/Makefile if main.c or configure.ac is newer +# than recode.1. +BuildRequires: make +BuildRequires: libtool +BuildRequires: texinfo +# Tests: +BuildRequires: python3-Cython +BuildRequires: python3-devel >= 3.7.5 +BuildRequires: python3-setuptools + +%description +The recode tool and library convert files between character sets and surfaces. +It recognizes or produces over 200 different character sets (or about 300 if +combined with an iconv library) and transliterates files between almost any +pair. When exact transliteration is not possible, it gets rid of the offending +character or falls back on an approximations. + +%package devel +Summary: Header files for development using recode library +# Header files are LGPLv3+ +License: LGPL-3.0-or-later +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package provides the header files for a recode library. + +%prep +%autosetup -p1 -n %{name}-%{version} +autoreconf -fi + +%build +export PYTHON=%{__python3} +%configure \ + --without-dmalloc \ + --disable-gcc-warnings \ + --enable-largefile \ + --enable-nls \ + --disable-rpath \ + --enable-shared \ + --disable-static +%{make_build} + +%check +make check + +%install +%{make_install} +%find_lang %{name} + +# remove unpackaged file from the buildroot +rm -r $RPM_BUILD_ROOT%{_infodir}/dir + +# remove libtool archives +rm $RPM_BUILD_ROOT%{_libdir}/*.la + +%files -f %{name}.lang +%license COPYING COPYING-LIB +# Changelog is not helpful +%doc AUTHORS NEWS README THANKS TODO +%{_mandir}/*/* +%{_infodir}/recode.info* +%{_bindir}/* +%{_libdir}/librecode.so.3 +%{_libdir}/librecode.so.3.* + +%files devel +%{_libdir}/*.so +%{_includedir}/* + +%changelog +* Thu Dec 26 2024 Dmitriy Samoylik - 3.7.14-6 +- Rebuilt for MSVSphere 10 + +* Fri Jul 19 2024 Fedora Release Engineering - 3.7.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jul 17 2024 Miroslav Suchý - 3.7.14-5 +- convert license to SPDX + +* Fri Jan 26 2024 Fedora Release Engineering - 3.7.14-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 3.7.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 3.7.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Feb 22 2023 Ondrej Pohorelsky - 3.7.14-1 +- 3.7.14 bump +- Adds upstream patch to prevent double free +- Require python3-setuptools unconditionaly +- Resolves: rhbz#2170818, rhbz#2166136 + +* Tue Jan 17 2023 Ondrej Pohorelsky - 3.7.13-1 +- 3.7.13 bump +- Resolves: rhbz#2158811 + +* Thu Oct 27 2022 Ondrej Pohorelsky - 3.7.12-3 +- Adds BuildRequire for Python 3.12 + +* Sat Jul 23 2022 Fedora Release Engineering - 3.7.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Feb 21 2022 Ondrej Pohorelsky - 3.7.12-1 +- 3.7.12 bump +- Resolves: rhbz#2055897 + +* Tue Feb 08 2022 Ondrej Pohorelsky - 3.7.11-1 +- 3.7.11 bump +- Resolves: rhbz#2043834 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.7.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.7.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 08 2021 Ondrej Pohorelsky - 3.7.9-1 +- 3.7.9 bump +- Resolves: rhbz#1967383 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.7.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Nov 12 2020 Ondrej Pohorelsky - 3.7.8-1 +- 3.7.8 bump + +* Thu Jul 30 2020 Petr Pisar - 3.7.7-1 +- 3.7.7 bump + +* Wed Jul 29 2020 Petr Pisar - 3.7.6-4 +- Correct a description + +* Wed Jul 29 2020 Fedora Release Engineering - 3.7.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 3.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Sep 13 2019 Petr Pisar - 3.7.6-1 +- 3.7.6 + +* Thu Sep 12 2019 Petr Pisar - 3.7.5-1 +- 3.7.5 bump +- Fix a possible buffer overflow in transform_utf16_java() +- Fix a type mismatch in tests + +* Mon Sep 02 2019 Petr Pisar - 3.7.4-1 +- 3.7.4 bump + +* Mon Sep 02 2019 Petr Pisar - 3.7.3-1 +- 3.7.3 bump + +* Tue Aug 20 2019 Petr Pisar - 3.7.2-1 +- 3.7.2 bump +- Change a soname because recode-3.7 changed an ABI + (https://github.com/rrthomas/recode/issues/22) + +* Fri Aug 16 2019 Petr Pisar - 3.7.1-1 +- 3.7.1 bump (bug #1379055) +- License changed to GPLv3+ and LGPLv3+ and BSD and OFSFDL + +* Fri Jul 26 2019 Fedora Release Engineering - 3.6-50 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 3.6-49 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 3.6-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Igor Gnatenko - 3.6-47 +- Escape macros in %%changelog + +* Tue Oct 03 2017 Zoltan Kota - 3.6-46 +- Apply patch to fix bug #1422550 + +* Thu Aug 03 2017 Fedora Release Engineering - 3.6-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.6-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 3.6-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.6-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 3.6-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 3.6-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.6-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Dec 18 2013 Jiri Popelka - 3.6-38 +- Fix FTBFS if "-Werror=format-security" flag is used (#1037305). + +* Sun Aug 04 2013 Fedora Release Engineering - 3.6-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Feb 25 2013 Zoltan Kota 3.6-36 +- Fix failed Fedora_19_Mass_Rebuild [bug #914431]. + +* Thu Feb 14 2013 Fedora Release Engineering - 3.6-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jul 23 2012 Zoltan Kota 3.6-34 +- Add patch for fixing build with new automake. + (Fixes failed Fedora_18_Mass_Rebuild.) + +* Sat Jul 21 2012 Fedora Release Engineering - 3.6-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon May 21 2012 Zoltan Kota 3.6-32 +- Corrected summary of the devel subpackage. Fixing bug #817947. + +* Sat Jan 14 2012 Fedora Release Engineering - 3.6-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 3.6-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jul 7 2010 Zoltan Kota 3.6-29 +- Fix build on x86_64. Run autoreconf to update config files. + autoconf >= 2.64 needs to patch the flex.m4 file. + Fixing FTBFS bug #564601. + +* Sun Jul 26 2009 Fedora Release Engineering - 3.6-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 3.6-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 20 2008 Fedora Release Engineering - 3.6-26 +- Autorebuild for GCC 4.3 + +* Wed Jan 16 2008 Zoltan Kota 3.6-25 +- add patch for gcc43 + +* Wed Aug 22 2007 Zoltan Kota 3.6-24 +- update license tag +- rebuild + +* Tue Apr 03 2007 Zoltan Kota 3.6-23 +- rebuild + +* Fri Sep 01 2006 Zoltan Kota 3.6-22 +- rebuild + +* Mon Feb 13 2006 Zoltan Kota 3.6-21 +- rebuild + +* Thu Dec 22 2005 Zoltan Kota 3.6-20 +- rebuild + +* Fri Aug 26 2005 Zoltan Kota 3.6-19 +- fix requires +- disable static libs and remove libtool archives +- add %%doc + +* Fri Aug 26 2005 Zoltan Kota 3.6-18 +- add dist tag +- specfile cleanup + +* Thu May 26 2005 Bill Nottingham 3.6-17 +- rebuild for Extras + +* Mon Mar 07 2005 Than Ngo 3.6-16 +- cleanup + +* Sat Mar 05 2005 Than Ngo 3.6-15 +- rebuilt + +* Wed Feb 09 2005 Than Ngo 3.6-14 +- rebuilt + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Than Ngo 3.6-11 +- add a patch file from kota@szbk.u-szeged.hu (bug #115524) + +* Thu Nov 20 2003 Thomas Woerner 3.6-10 +- Fixed RPATH (missing make in %%build) + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 11 2002 Tim Powers 3.6-7 +- rebuild on all arches +- remove unpackaged file from the buildroot + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon Apr 15 2002 Bill Nottingham 3.6-4 +- add ldconfig %%post/%%postun + +* Tue Feb 26 2002 Than Ngo 3.6-3 +- rebuild + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Tue Nov 13 2001 Than Ngo 3.6-1 +- initial RPM for 8.0