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.spec b/texinfo.spec index c562655..719db85 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -3,7 +3,7 @@ Summary: Tools needed to create Texinfo format documentation files Name: texinfo Version: 7.2 -Release: 6%{?dist} +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 @@ -19,6 +19,8 @@ Patch3: texinfo-7.1-various-sast-fixes.patch 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 @@ -150,6 +152,9 @@ 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