diff --git a/.gitignore b/.gitignore index b40ef00..bacab2d 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 +/texinfo-7.0.2.tar.xz +/texinfo-7.0.2.tar.xz.sig diff --git a/sources b/sources index aa3d69e..81075c3 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.0.2.tar.xz) = 26dd5bb1392f2197ecde296ba157d4533f4b11fadf1238481da4cf2b3796c665ce96049df8d2f9a6d4fa22b7e9013d9978d195e525288663f0a54482bbc22b2b +SHA512 (texinfo-7.0.2.tar.xz.sig) = 93ec60133d9f05e77e2b11879069cdccbf3066fd33716b91aa7ae0878da931e80f58fed246be592a3fbcba3d17eec30cd51cef2ceab04ff3fe0b22e83c22cab2 diff --git a/texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch b/texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch new file mode 100644 index 0000000..ab8e072 --- /dev/null +++ b/texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch @@ -0,0 +1,44 @@ +diff -up texinfo-6.1/install-info/install-info.c.orig texinfo-6.1/install-info/install-info.c +--- texinfo-6.1/install-info/install-info.c.orig 2016-06-22 09:49:38.766013018 +0200 ++++ texinfo-6.1/install-info/install-info.c 2016-06-22 14:11:58.673780736 +0200 +@@ -973,18 +973,23 @@ output_dirfile (char *dirfile, int dir_n + int n_entries_added = 0; + int i; + FILE *output; ++ char *dirfile_tmp = NULL; ++ ++ asprintf (&dirfile_tmp, "%s.tmp", dirfile); ++ if (!dirfile_tmp) ++ xalloc_die (); + + if (compression_program) + { +- char *command = concat (compression_program, ">", dirfile); ++ char *command = concat (compression_program, ">", dirfile_tmp); + output = popen (command, "w"); + } + else +- output = fopen (dirfile, "w"); ++ output = fopen (dirfile_tmp, "w"); + + if (!output) + { +- perror (dirfile); ++ perror (dirfile_tmp); + exit (EXIT_FAILURE); + } + +@@ -1095,6 +1100,13 @@ output_dirfile (char *dirfile, int dir_n + pclose (output); + else + fclose (output); ++ ++ if (rename (dirfile_tmp, dirfile) < 0) ++ { ++ perror (dirfile_tmp); ++ exit (EXIT_FAILURE); ++ } ++ free (dirfile_tmp); + } + + /* Read through the input LINES, to find the section names and the diff --git a/texinfo-6.5-covscan-fixes.patch b/texinfo-6.5-covscan-fixes.patch new file mode 100644 index 0000000..63e5167 --- /dev/null +++ b/texinfo-6.5-covscan-fixes.patch @@ -0,0 +1,45 @@ +diff -up texinfo-6.7.90/info/infomap.c.orig texinfo-6.7.90/info/infomap.c +--- texinfo-6.7.90/info/infomap.c.orig 2019-12-01 12:26:46.000000000 +0100 ++++ texinfo-6.7.90/info/infomap.c 2021-02-24 12:56:06.865568572 +0100 +@@ -589,6 +589,7 @@ fetch_user_maps (char *init_file) + compile (inf, filename, &sup_info, &sup_ea); + + free (filename); ++ fclose (inf); + return 1; + } + +diff -up texinfo-6.7.90/info/variables.c.orig texinfo-6.7.90/info/variables.c +--- texinfo-6.7.90/info/variables.c.orig 2021-02-24 13:00:21.056060523 +0100 ++++ texinfo-6.7.90/info/variables.c 2021-02-24 13:36:27.089318922 +0100 +@@ -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-6.7.90/install-info/install-info.c.orig texinfo-6.7.90/install-info/install-info.c +--- texinfo-6.7.90/install-info/install-info.c.orig 2021-02-24 13:36:42.839472560 +0100 ++++ texinfo-6.7.90/install-info/install-info.c 2021-02-24 13:41:36.219280631 +0100 +@@ -1717,6 +1728,8 @@ reformat_new_entries (struct spec_entry + + format_entry (name, name_len, desc, desc_len, calign, align, + maxwidth, &entry->text, &entry->text_len); ++ free (desc); ++ free (name); + } + } + 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.0.2-undef-val-array-ref.patch b/texinfo-7.0.2-undef-val-array-ref.patch new file mode 100644 index 0000000..0710efd --- /dev/null +++ b/texinfo-7.0.2-undef-val-array-ref.patch @@ -0,0 +1,11 @@ +diff -up texinfo-7.0.2/tp/Texinfo/ParserNonXS.pm.orig texinfo-7.0.2/tp/Texinfo/ParserNonXS.pm +--- texinfo-7.0.2/tp/Texinfo/ParserNonXS.pm.orig 2023-01-22 11:42:42.000000000 +0100 ++++ texinfo-7.0.2/tp/Texinfo/ParserNonXS.pm 2023-02-22 12:22:13.711852621 +0100 +@@ -4357,6 +4357,7 @@ sub _process_remaining_on_line($$$$) + and ($current->{'parent'}->{'type'} eq 'menu_comment' + or $current->{'parent'}->{'type'} eq 'menu_entry_description') + and $asterisk ++ and $current->{'contents'} + and @{$current->{'contents'}} + and $current->{'contents'}->[-1]->{'type'} + and $current->{'contents'}->[-1]->{'type'} eq 'empty_line' 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..f5895bb 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -2,25 +2,23 @@ Summary: Tools needed to create Texinfo format documentation files Name: texinfo -Version: 7.2 -Release: 7%{?dist} -License: GPL-3.0-or-later +Version: 7.0.2 +Release: 2%{?dist} +License: GPLv3+ Url: http://www.gnu.org/software/texinfo/ Source0: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz Source1: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz.sig Source2: fix-info-dir -# Patch0: we need to fix template fix-info-dir generates -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 +# Patch0: rhbz#1348671, because of OSTree +Patch0: texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch +# Patch1: we need to fix template fix-info-dir generates +Patch1: info-6.5-sync-fix-info-dir.patch +# Patch2: rhbz#1592433, bug in fix-info-dir --delete +Patch2: 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 +Patch3: texinfo-6.5-covscan-fixes.patch +# Patch4: fixes possible use of an undefined value as an ARRAY reference in ParserNonXS.pm +Patch4: texinfo-7.0.2-undef-val-array-ref.patch BuildRequires: make BuildRequires: gcc @@ -55,8 +53,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 +81,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 +120,6 @@ export ALL_TESTS=yes %{_bindir}/texi2any %{_bindir}/pod2texi %{_datadir}/texinfo -%{_datadir}/texi2any %{_infodir}/texinfo* %{_infodir}/texi2any_api.info* %{_infodir}/texi2any_internals.info* @@ -152,57 +152,6 @@ 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 - -* Sat Jan 27 2024 Fedora Release Engineering - 7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Oct 24 2023 Vitezslav Crhonek - 7.1-1 -- Update to texinfo-7.1 - Resolves: #2244846 - -* Sat Jul 22 2023 Fedora Release Engineering - 7.0.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed May 31 2023 Vitezslav Crhonek - 7.0.3-2 -- SPDX migration - -* Thu Mar 30 2023 Vitezslav Crhonek - 7.0.3-1 -- Update to texinfo-7.0.3 - Resolves: #2181837 - * Wed Feb 22 2023 Vitezslav Crhonek - 7.0.2-2 - Fix possible use of an undefined value as an ARRAY reference in ParserNonXS.pm (causes FTBFS of a2ps)