diff --git a/.gitignore b/.gitignore index 1668fe6..b40ef00 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/texinfo-7.1.tar.xz -/texinfo-7.1.tar.xz.sig +/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 4af3644..aa3d69e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (texinfo-7.1.tar.xz) = ceab03e8422d800b08c7b44e8263b0a1f35bb7758d83a81136df6f3304a14daecda98a12a282afb85406d2ca2f665b2295e10b6f4064156ea1285d80d5d355db -SHA512 (texinfo-7.1.tar.xz.sig) = 2e2f19a783e57f425afa11871e5cdaceacb79a7bc7389eaf2c3b0e0aba0b08e8afdbdf9e939e75c773f262eb22c351b0fc745604eac76d58f484196733da5130 +SHA512 (texinfo-7.2.tar.xz) = 8e67337ae12a552fc620c43725507a4978710ea6630e98b0f5e98eb3f79a90e191dde5225699aa6217c26f171d277461f76150f0459cd07b40c3234d2f3d89bf +SHA512 (texinfo-7.2.tar.xz.sig) = fcb5bcf655e16f8994b33242516cff7f5dc6684555c889fee4a4e5b01cbc9c8163d6ea5c77722b2bb8d6f65120650de4daff027bee135d1c29f82316211d8fb4 diff --git a/texinfo-6.5-covscan-fixes.patch b/texinfo-6.5-covscan-fixes.patch deleted file mode 100644 index 0a44df2..0000000 --- a/texinfo-6.5-covscan-fixes.patch +++ /dev/null @@ -1,34 +0,0 @@ -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 new file mode 100644 index 0000000..a08a454 --- /dev/null +++ b/texinfo-6.7-zstd-compression.patch @@ -0,0 +1,69 @@ +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 new file mode 100644 index 0000000..aafae60 --- /dev/null +++ b/texinfo-7.1-make-tainted-data-safe.patch @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..77c912b --- /dev/null +++ b/texinfo-7.1-various-sast-fixes.patch @@ -0,0 +1,26 @@ +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 new file mode 100644 index 0000000..e2a29cb --- /dev/null +++ b/texinfo-7.2-fix-perl-precedence-warnings.patch @@ -0,0 +1,24 @@ +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 2dc97b0..719db85 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -2,8 +2,8 @@ Summary: Tools needed to create Texinfo format documentation files Name: texinfo -Version: 7.1 -Release: 3%{?dist} +Version: 7.2 +Release: 7%{?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,8 +13,14 @@ 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 -# Patch2: fixes issues detected by static analysis -Patch2: texinfo-6.5-covscan-fixes.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 BuildRequires: make BuildRequires: gcc @@ -49,6 +55,8 @@ 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 @@ -77,15 +85,10 @@ install -Dpm0755 -t contrib %{SOURCE2} %make_build %install -mkdir -p ${RPM_BUILD_ROOT}/sbin - %make_install -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} +mkdir -p %{buildroot}%{tex_texinfo} +install -p -m644 doc/texinfo.tex doc/txi-??.tex %{buildroot}%{tex_texinfo} install -Dpm0755 -t %{buildroot}%{_sbindir} contrib/fix-info-dir @@ -116,6 +119,7 @@ export ALL_TESTS=yes %{_bindir}/texi2any %{_bindir}/pod2texi %{_datadir}/texinfo +%{_datadir}/texi2any %{_infodir}/texinfo* %{_infodir}/texi2any_api.info* %{_infodir}/texi2any_internals.info* @@ -148,6 +152,37 @@ 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 +- 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