diff --git a/.gitignore b/.gitignore index b40ef00..5cc4abd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ /texinfo-7.1.1.tar.xz /texinfo-7.1.1.tar.xz.sig -/texinfo-7.2.tar.xz -/texinfo-7.2.tar.xz.sig diff --git a/sources b/sources index aa3d69e..c5d417c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (texinfo-7.2.tar.xz) = 8e67337ae12a552fc620c43725507a4978710ea6630e98b0f5e98eb3f79a90e191dde5225699aa6217c26f171d277461f76150f0459cd07b40c3234d2f3d89bf -SHA512 (texinfo-7.2.tar.xz.sig) = fcb5bcf655e16f8994b33242516cff7f5dc6684555c889fee4a4e5b01cbc9c8163d6ea5c77722b2bb8d6f65120650de4daff027bee135d1c29f82316211d8fb4 +SHA512 (texinfo-7.1.1.tar.xz) = 05d605fba810f2939cab16ed5ddb341e22d397370648e6e0271c807fa573267e933c75ed7ae682c3c9cfecb568311a8df7abeb8c0556a94ef7169737d5b9c52a +SHA512 (texinfo-7.1.1.tar.xz.sig) = f2ab2c7bf8e9eb4fb98208c5e2bca916d4ae153e0c3fa57f0198eda156fe68ed382785761e7842decb39ffc0796b3711a9ea06face218e41c6905d45169263f7 diff --git a/texinfo-6.5-covscan-fixes.patch b/texinfo-6.5-covscan-fixes.patch new file mode 100644 index 0000000..0a44df2 --- /dev/null +++ b/texinfo-6.5-covscan-fixes.patch @@ -0,0 +1,34 @@ +diff -up texinfo-7.0.92/info/infomap.c.orig texinfo-7.0.92/info/infomap.c +--- texinfo-7.0.92/info/infomap.c.orig 2023-09-14 13:19:30.417330487 +0200 ++++ texinfo-7.0.92/info/infomap.c 2023-09-14 13:19:55.870353408 +0200 +@@ -590,6 +590,7 @@ fetch_user_maps (char *init_file) + compile (inf, filename, &sup_info, &sup_ea); + + free (filename); ++ fclose (inf); + return 1; + } + +diff -up texinfo-7.0.92/info/variables.c.orig texinfo-7.0.92/info/variables.c +--- texinfo-7.0.92/info/variables.c.orig 2023-09-14 13:20:14.464370153 +0200 ++++ texinfo-7.0.92/info/variables.c 2023-09-14 13:21:00.343411464 +0200 +@@ -359,6 +359,7 @@ read_variable_name (char *prompt, WINDOW + { + char *line; + REFERENCE **variables; ++ VARIABLE_ALIST *alist; + + /* Get the completion array of variable names. */ + variables = make_variable_completions_array (); +@@ -382,7 +383,9 @@ read_variable_name (char *prompt, WINDOW + return NULL; + } + +- return variable_by_name (line); ++ alist = variable_by_name (line); ++ free (line); ++ return alist; + } + + /* Make an array of REFERENCE which actually contains the names of the +diff -up texinfo-7.0.92/install-info/install-info.c.orig texinfo-7.0.92/install-info/install-info.c diff --git a/texinfo-6.7-zstd-compression.patch b/texinfo-6.7-zstd-compression.patch deleted file mode 100644 index a08a454..0000000 --- a/texinfo-6.7-zstd-compression.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -up texinfo-6.7/info/filesys.c.omv~ texinfo-6.7/info/filesys.c ---- texinfo-6.7/info/filesys.c.omv~ 2020-01-05 02:24:32.094858726 +0100 -+++ texinfo-6.7/info/filesys.c 2020-01-05 02:25:59.789854472 +0100 -@@ -58,9 +58,11 @@ static COMPRESSION_ALIST compress_suffix - #if STRIP_DOT_EXE - { ".gz", "gunzip" }, - { ".lz", "lunzip" }, -+ { ".zst", "unzstd" }, - #else - { ".gz", "gzip -d" }, - { ".lz", "lzip -d" }, -+ { ".zst", "zstd -d" }, - #endif - { ".xz", "unxz" }, - { ".bz2", "bunzip2" }, -diff -up texinfo-6.7/install-info/install-info.c.omv~ texinfo-6.7/install-info/install-info.c ---- texinfo-6.7/install-info/install-info.c.omv~ 2020-01-05 02:20:38.837870043 +0100 -+++ texinfo-6.7/install-info/install-info.c 2020-01-05 02:24:03.029860136 +0100 -@@ -451,6 +451,16 @@ strip_info_suffix (char *fname) - len -= 4; - ret[len] = 0; - } -+ else if (len > 4 && FILENAME_CMP (ret + len - 4, ".zst") == 0) -+ { -+ len -= 4; -+ ret[len] = 0; -+ } -+ else if (len > 5 && FILENAME_CMP (ret + len - 5, ".zstd") == 0) -+ { -+ len -= 5; -+ ret[len] = 0; -+ } - #ifdef __MSDOS__ - else if (len > 4 && (FILENAME_CMP (ret + len - 4, ".inz") == 0 - || FILENAME_CMP (ret + len - 4, ".igz") == 0)) -@@ -727,6 +737,18 @@ open_possibly_compressed_file (char *fil - *opened_filename = concat (filename, ".lzma", ""); - f = fopen (*opened_filename, FOPEN_RBIN); - } -+ if (!f) -+ { -+ free (*opened_filename); -+ *opened_filename = concat (filename, ".zst", ""); -+ f = fopen (*opened_filename, FOPEN_RBIN); -+ } -+ if (!f) -+ { -+ free (*opened_filename); -+ *opened_filename = concat (filename, ".zstd", ""); -+ f = fopen (*opened_filename, FOPEN_RBIN); -+ } - #ifdef __MSDOS__ - if (!f) - { -@@ -850,6 +872,14 @@ determine_file_type: - *compression_program = "lzma"; - #endif - -+ else if (data[0] == 0x28 && data[1] == 0xb5 && data[2] == 0x2f -+ && data[3] == 0xfd) -+#ifndef STRIP_DOT_EXE -+ *compression_program = "zstd.exe"; -+#else -+ *compression_program = "zstd"; -+#endif -+ - else - *compression_program = NULL; - diff --git a/texinfo-7.1-make-tainted-data-safe.patch b/texinfo-7.1-make-tainted-data-safe.patch deleted file mode 100644 index aafae60..0000000 --- a/texinfo-7.1-make-tainted-data-safe.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up texinfo-7.1/info/makedoc.c.orig texinfo-7.1/info/makedoc.c ---- texinfo-7.1/info/makedoc.c.orig 2023-08-14 20:53:20.000000000 +0200 -+++ texinfo-7.1/info/makedoc.c 2024-10-09 10:13:13.476369921 +0200 -@@ -296,7 +296,7 @@ process_one_file (char *filename, FILE * - char *func, *doc; - char *func_name; - -- for (; offset < (file_size - decl_len); offset++) -+ for (; offset < (file_size - decl_len) && offset < (LONG_MAX - decl_len); offset++) - { - if (buffer[offset] == '\n') - { diff --git a/texinfo-7.1-various-sast-fixes.patch b/texinfo-7.1-various-sast-fixes.patch deleted file mode 100644 index 77c912b..0000000 --- a/texinfo-7.1-various-sast-fixes.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up texinfo-7.1.90/info/infokey.c.orig texinfo-7.1.90/info/infokey.c ---- texinfo-7.1.90/info/infokey.c.orig 2024-10-21 14:26:11.000000000 +0200 -+++ texinfo-7.1.90/info/infokey.c 2024-11-07 12:55:41.197343929 +0100 -@@ -208,7 +208,7 @@ compile (FILE *fp, const char *filename, - int oval = 0; - char comment[10]; - unsigned int clen = 0; -- int seq[20]; -+ int seq[20] = { 0 }; - unsigned int slen = 0; - char act[80]; - unsigned int alen = 0; -diff -up texinfo-7.1.90/info/session.c.orig texinfo-7.1.90/info/session.c ---- texinfo-7.1.90/info/session.c.orig 2024-10-21 14:26:11.000000000 +0200 -+++ texinfo-7.1.90/info/session.c 2024-11-07 12:59:30.401861317 +0100 -@@ -2941,7 +2941,7 @@ DECLARE_INFO_COMMAND (info_menu_sequence - static int - info_handle_pointer (const char *label, WINDOW *window) - { -- char *description; -+ char *description = NULL; - NODE *node; - - if (!strcmp (label, "Up")) -diff -up texinfo-7.1.90/info/util.c.orig texinfo-7.1.90/info/util.c -diff -up texinfo-7.1.90/install-info/install-info.c.orig texinfo-7.1.90/install-info/install-info.c diff --git a/texinfo-7.2-fix-perl-precedence-warnings.patch b/texinfo-7.2-fix-perl-precedence-warnings.patch deleted file mode 100644 index e2a29cb..0000000 --- a/texinfo-7.2-fix-perl-precedence-warnings.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up texinfo-7.2/tp/Texinfo/Convert/Converter.pm.orig texinfo-7.2/tp/Texinfo/Convert/Converter.pm ---- texinfo-7.2/tp/Texinfo/Convert/Converter.pm.orig 2024-12-19 19:31:42.000000000 +0100 -+++ texinfo-7.2/tp/Texinfo/Convert/Converter.pm 2025-08-01 10:31:55.845929864 +0200 -@@ -386,7 +386,7 @@ sub output_tree($$) - - my $fh; - my $encoded_output_file; -- if (! $output_file eq '') { -+ if ($output_file ne '') { - my $path_encoding; - ($encoded_output_file, $path_encoding) - = $self->encoded_output_file_name($output_file); -diff -up texinfo-7.2/tp/Texinfo/Convert/LaTeX.pm.orig texinfo-7.2/tp/Texinfo/Convert/LaTeX.pm ---- texinfo-7.2/tp/Texinfo/Convert/LaTeX.pm.orig 2024-12-19 19:31:42.000000000 +0100 -+++ texinfo-7.2/tp/Texinfo/Convert/LaTeX.pm 2025-08-01 10:32:57.790836873 +0200 -@@ -1085,7 +1085,7 @@ sub output($$) - - my $fh; - my $encoded_output_file; -- if (! $output_file eq '') { -+ if ($output_file ne '') { - my $path_encoding; - ($encoded_output_file, $path_encoding) - = $self->encoded_output_file_name($output_file); diff --git a/texinfo.spec b/texinfo.spec index 719db85..6395081 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -2,8 +2,8 @@ Summary: Tools needed to create Texinfo format documentation files Name: texinfo -Version: 7.2 -Release: 7%{?dist} +Version: 7.1.1 +Release: 1%{?dist} License: GPL-3.0-or-later Url: http://www.gnu.org/software/texinfo/ Source0: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz @@ -13,14 +13,8 @@ Source2: fix-info-dir Patch0: info-6.5-sync-fix-info-dir.patch # Patch1: rhbz#1592433, bug in fix-info-dir --delete Patch1: texinfo-6.5-fix-info-dir.patch -# Patch3: fixes issues detected by static analysis -Patch3: texinfo-7.1-various-sast-fixes.patch -# Patch4: fixes issues detected by static analysis -Patch4: texinfo-7.1-make-tainted-data-safe.patch -# Patch5: fixes Perl precedence warnings (already upstream) -Patch5: texinfo-7.2-fix-perl-precedence-warnings.patch -# Patch6: add support for zstd compression -Patch6: texinfo-6.7-zstd-compression.patch +# Patch2: fixes issues detected by static analysis +Patch2: texinfo-6.5-covscan-fixes.patch BuildRequires: make BuildRequires: gcc @@ -55,8 +49,6 @@ browser program for viewing texinfo files. Summary: Tools for formatting Texinfo documentation files using TeX Requires: texinfo = %{version}-%{release} Requires: tex(tex) tex(epsf.tex) -Requires: /usr/bin/cmp -Requires: /usr/bin/diff Requires(post): %{_bindir}/texconfig-sys Requires(postun): %{_bindir}/texconfig-sys Provides: tex-texinfo @@ -85,10 +77,15 @@ install -Dpm0755 -t contrib %{SOURCE2} %make_build %install +mkdir -p ${RPM_BUILD_ROOT}/sbin + %make_install -mkdir -p %{buildroot}%{tex_texinfo} -install -p -m644 doc/texinfo.tex doc/txi-??.tex %{buildroot}%{tex_texinfo} +mkdir -p $RPM_BUILD_ROOT%{tex_texinfo} +install -p -m644 doc/texinfo.tex doc/txi-??.tex $RPM_BUILD_ROOT%{tex_texinfo} + +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +mv $RPM_BUILD_ROOT%{_bindir}/install-info $RPM_BUILD_ROOT%{_sbindir} install -Dpm0755 -t %{buildroot}%{_sbindir} contrib/fix-info-dir @@ -119,7 +116,6 @@ export ALL_TESTS=yes %{_bindir}/texi2any %{_bindir}/pod2texi %{_datadir}/texinfo -%{_datadir}/texi2any %{_infodir}/texinfo* %{_infodir}/texi2any_api.info* %{_infodir}/texi2any_internals.info* @@ -152,36 +148,8 @@ export ALL_TESTS=yes %{_mandir}/man1/pdftexi2dvi.1* %changelog -* Sat Nov 29 2025 Neal Gompa - 7.2-7 -- Add patch to support zstd compressed info pages - -* Fri Aug 01 2025 Vitezslav Crhonek - 7.2-6 -- Fix FTBFS (Perl precedence warnings) - Resolves: #2385687 - -* Fri Jul 25 2025 Fedora Release Engineering - 7.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Wed Jun 25 2025 Vitezslav Crhonek - 7.2-4 -- Fix texi2dvi missing dependencies - Resolves: #2374602 - -* Tue Jan 21 2025 Vitezslav Crhonek - 7.2-3 -- Changes related to bin and sbin unify - -* Sun Jan 19 2025 Fedora Release Engineering - 7.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Jan 13 2025 Vitezslav Crhonek - 7.2-1 -- Update to texinfo-7.2 - Resolves: #2333829 - -* Tue Oct 15 2024 Vitezslav Crhonek - 7.1.1-2 -- Another batch of fixes for issues detected by static analysis - -* Mon Sep 09 2024 Vitezslav Crhonek - 7.1.1-1 +* Thu Mar 13 2025 Vitezslav Crhonek - 7.1.1-1 - Update to texinfo-7.1.1 - Resolves: #2310652 * Sat Jul 20 2024 Fedora Release Engineering - 7.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild