diff --git a/.gitignore b/.gitignore index b40ef00..d3b8ba7 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-6.6.tar.xz +/texinfo-6.6.tar.xz.sig diff --git a/fix-info-dir b/fix-info-dir deleted file mode 100755 index 0659552..0000000 --- a/fix-info-dir +++ /dev/null @@ -1,316 +0,0 @@ -#!/bin/sh -#fix-info-dir (GNU texinfo) -VERSION=1.1 -#Copyright (C) 1998, 2003 Free Software Foundation, Inc. -#fix-info-dir comes with NO WARRANTY, to the extent permitted by law. -#You may redistribute copies of fix-info-dir -#under the terms of the GNU General Public License. -#For more information about these matters, see the files named COPYING." -#fix-info-dir was derived from update-info and gen-dir-node -# The skeleton file contains info topic names in the -# order they should appear in the output. There are three special -# lines that alter the behavior: a line consisting of just "--" causes -# the next line to be echoed verbatim to the output. A line -# containing just "%%" causes all the remaining filenames (wildcards -# allowed) in the rest of the file to be ignored. A line containing -# just "!!" exits the script when reached (unless preceded by a line -# containing just "--"). -#Author: Richard L. Hawes, rhawes@dmapub.dma.org. - -# ###SECTION 1### Constants -set -h 2>/dev/null -# ENVIRONMENT -if test -z "$TMPDIR"; then - TMPDIR="/usr/tmp" -fi -if test -z "$LINENO"; then - LINENO="0" -fi - -MENU_BEGIN='^\*\([ ]\)\{1,\}Menu:' -MENU_FILTER1='s/^\*\([ ]\)\{1,\}/* /' -MENU_FILTER2='s/\([ ]\)\{1,\}$//g' - -TMP_FILE1="${TMPDIR}/fx${$}.info" -TMP_FILE2="${TMPDIR}/fy${$}.info" -TMP_FILE_LIST="$TMP_FILE1 $TMP_FILE2" - -TRY_HELP_MSG="Try --help for more information" - -# ###SECTION 100### main program -#variables set by options -CREATE_NODE="" -DEBUG=":" -MODE="" -# -Total="0" -Changed="" - -while test "$*"; do - case "$1" in - -c|--create) CREATE_NODE="y";; - --debug) set -eux; DEBUG="set>&2";; - -d|--delete) MODE="Detect_Invalid";; - +d);; - --version) -cat<&2 - echo "$TRY_HELP_MSG">&2 - exit 2;; - *) break;; - esac - shift -done - -ORIGINAL_DIR=`pwd` - -if test "$#" -gt "0"; then - INFO_DIR="$1" - shift -else - INFO_DIR=$DEFAULT_INFO_DIR -fi - -if test ! -d "${INFO_DIR}"; then - DIR_FILE=`basename ${INFO_DIR}`; - INFO_DIR=`dirname ${INFO_DIR}`; -else - DIR_FILE="dir" -fi - -cd "$INFO_DIR"||exit - - -if test "$CREATE_NODE"; then - if test "$#" -gt "0"; then - if test `expr $1 : /` = '1'; then - SKELETON="$1" - else - SKELETON="$ORIGINAL_DIR/$1" - fi - if test ! -r "$SKELETON" && test -f "$SKELETON"; then - echo "$0:$LINENO: $SKELETON is not readable">&2 - exit 2 - fi - shift - else - SKELETON=/dev/null - - fi -else - if test ! -f "$DIR_FILE"; then - echo "$0:$LINENO: $DIR_FILE is irregular or nonexistant">&2 - exit 2 - elif test ! -r "$DIR_FILE"; then - echo "$0:$LINENO: $DIR_FILE is not readable">&2 - exit 2 - elif test ! -w "$DIR_FILE"; then - echo "$0:$LINENO: $DIR_FILE is not writeable">&2 - exit 2 - fi -fi - -if test "$#" -gt "0"; then - echo "$0:$LINENO: Too many parameters">&2 - echo "$TRY_HELP_MSG">&2 - exit 2 -fi - -if test -f "$DIR_FILE"; then - cp "$DIR_FILE" "$DIR_FILE.old" - echo "Backed up $DIR_FILE to $DIR_FILE.old." -fi - -if test "$CREATE_NODE"; then - if test "$MODE"; then - echo "$0:$LINENO: ERROR: Illogical option combination: -d -c">&2 - echo "$TRY_HELP_MSG">&2 - exit 2 - fi - echo "Creating new Info Node: `pwd`/$DIR_FILE" - Changed="y" - -{ - - ### output the dir header - echo "-*- Text -*-" - echo "This file was generated automatically by $0." - echo "This version was generated on `date`" - echo "by `whoami`@`hostname` for `pwd`" - - cat<" visits the Emacs topic, etc. - - In Emacs, you can click mouse button 2 on a menu item or cross reference - to select it. - -* Menu: The list of major topics begins on the next line. - -DIR_FILE_END_OF_FILE - -### go through the list of files in the skeleton. If an info file -### exists, grab the ENTRY information from it. If an entry exists -### use it, otherwise create a minimal $DIR_FILE entry. - - # Read one line from the file. This is so that we can echo lines with - # whitespace and quoted characters in them. - while read fileline; do - # flag fancy features - if test ! -z "$echoline"; then # echo line - echo "$fileline" - echoline="" - continue - elif test "${fileline}" = "--"; then - # echo the next line - echoline="1" - continue - elif test "${fileline}" = "%%"; then - # skip remaining files listed in skeleton file - skip="1" - continue - elif test "${fileline}" = "!!"; then - # quit now - break - fi - - # handle files if they exist - for file in $fileline""; do - fname= - if test -z "$file"; then - break - fi - # Find the file to operate upon. - if test -r "$file"; then - fname="$file" - elif test -r "${file}.info"; then - fname="${file}.info" - elif test -r "${file}.gz"; then - fname="${file}.gz" - elif test -r "${file}.info.gz"; then - fname="${file}.info.gz" - else - echo "$0:$LINENO: can't find info file for ${file}?">&2 - continue - fi - - # if we found something and aren't skipping, do the entry - if test "$skip"; then - continue - fi - - infoname=`echo $file|sed -e 's/.info$//'` - entry=`zcat -f $fname|\ - sed -e '1,/START-INFO-DIR-ENTRY/d'\ - -e '/END-INFO-DIR-ENTRY/,$d'` - if [ ! -z "${entry}" ]; then - echo "${entry}" - else - echo "* ${infoname}: (${infoname})." - fi - Total=`expr "$Total" + "1"` - done - done -}>$DIR_FILE<$SKELETON -fi - -trap ' eval "$DEBUG"; rm -f $TMP_FILE_LIST; exit ' 0 -trap ' rm -f $TMP_FILE_LIST - exit ' 1 -trap ' rm -f $TMP_FILE_LIST - echo "$0:$LINENO: received INT signal.">&2 - exit ' 2 -trap ' rm -f $TMP_FILE_LIST - echo "$0:$LINENO: received QUIT signal.">&2 - exit ' 3 - -sed -e "1,/$MENU_BEGIN/d" -e "$MENU_FILTER1" -e "$MENU_FILTER2"<$DIR_FILE\ -|sed -n -e '/\* /{ -s/).*$//g -s/\.gz$// -s/\.info$// -s/^.*(//p -}'|sort -u>$TMP_FILE1 -ls -F|sed -e '/\/$/d' -e '/[-.][0-9]/d'\ - -e "/^$DIR_FILE\$/d" -e "/^$DIR_FILE.old\$/d"\ - -e 's/[*@]$//' -e 's/\.gz$//' -e 's/\.info$//'|sort>$TMP_FILE2 - -if test -z "$MODE"; then - #Detect Missing - DONE_MSG="total menu item(s) were inserted into `pwd`/$DIR_FILE" - for Info_Name in `comm -13 $TMP_FILE1 $TMP_FILE2`; do - if test -r "$Info_Name"; then - Info_File="$Info_Name" - elif test -r "${Info_Name}.info"; then - Info_File="${Info_Name}.info" - elif test -r "${Info_Name}.gz"; then - Info_File="${Info_Name}.gz" - elif test -r "${Info_Name}.info.gz"; then - Info_File="${Info_Name}.info.gz" - else - echo "$0:$LINENO: can't find info file for ${Info_Name}?">&2 - continue - fi - Changed="y" - if install-info $Info_File $DIR_FILE; then - Total=`expr "$Total" + "1"` - fi - done -else - # Detect Invalid - DONE_MSG="total invalid menu item(s) were removed from `pwd`/$DIR_FILE" - for Info_Name in `comm -23 $TMP_FILE1 $TMP_FILE2`; do - Changed="y" - if install-info --remove $Info_Name $DIR_FILE; then - Total=`expr "$Total" + "1"` - fi - done -fi - -# print summary -if test "$Changed"; then - echo "$Total $DONE_MSG" -else - echo "Nothing to do" -fi -rm -f $TMP_FILE_LIST -eval "$DEBUG" -exit 0 diff --git a/sources b/sources index aa3d69e..b522b9d 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-6.6.tar.xz) = 96e0764d0808152d3662e65c3287fb0f86ed918912cdc036380637dbadaacd6a489b516543c07b08105686575e8d495a945f73e23ff0909d5a0f12026e4131e0 +SHA512 (texinfo-6.6.tar.xz.sig) = b4af1d28e4cc20b6e86255b907542122aa1da423652ea962b885b2f2d1cc135747d12c4eb78a24c25320b981e2448ce87f66bf9ac264527f989dc7439cefd03b diff --git a/texinfo-4.12-zlib.patch b/texinfo-4.12-zlib.patch new file mode 100644 index 0000000..78ef437 --- /dev/null +++ b/texinfo-4.12-zlib.patch @@ -0,0 +1,236 @@ +diff -up texinfo-6.5.91/install-info/install-info.c.orig texinfo-6.5.91/install-info/install-info.c +--- texinfo-6.5.91/install-info/install-info.c.orig 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/install-info/install-info.c 2019-01-14 09:31:45.322849494 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #define TAB_WIDTH 8 + +@@ -681,15 +682,15 @@ The first time you invoke Info you start + + Return either stdin reading the file, or a non-stdin pipe reading + the output of the compression program. */ +-FILE * ++void * + open_possibly_compressed_file (char *filename, + void (*create_callback) (char *), +- char **opened_filename, char **compression_program) ++ char **opened_filename, char **compression_program, int *is_pipe) + { + char *local_opened_filename, *local_compression_program; + int nread; + char data[13]; +- FILE *f; ++ gzFile *f; + + /* We let them pass NULL if they don't want this info, but it's easier + to always determine it. */ +@@ -697,48 +698,48 @@ open_possibly_compressed_file (char *fil + opened_filename = &local_opened_filename; + + *opened_filename = filename; +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + { + *opened_filename = concat (filename, ".gz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".xz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".bz2", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".lz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".lzma", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + #ifdef __MSDOS__ + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".igz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".inz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + #endif /* __MSDOS__ */ + if (!f) +@@ -754,7 +755,7 @@ open_possibly_compressed_file (char *fil + (*create_callback) (filename); + + /* And try opening it again. */ +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + return 0; + } +@@ -764,26 +765,26 @@ open_possibly_compressed_file (char *fil + + /* Read first few bytes of file rather than relying on the filename. + If the file is shorter than this it can't be usable anyway. */ +- nread = fread (data, sizeof (data), 1, f); +- if (nread != 1) ++ nread = gzread (f, data, sizeof (data)); ++ if (nread != sizeof (data)) + { +- if (nread == 0) ++ if (nread >= 0) + { + /* Try to create the file if its empty. */ +- if (feof (f) && create_callback) ++ if (gzeof (f) && create_callback) + { +- if (fclose (f) != 0) ++ if (gzclose (f) < 0) + return 0; /* unknown error closing file */ + + if (remove (filename) != 0) + return 0; /* unknown error deleting file */ + + (*create_callback) (filename); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + return 0; +- nread = fread (data, sizeof (data), 1, f); +- if (nread == 0) ++ nread = gzread (f, data, sizeof (data)); ++ if (nread <= 0) + return 0; + goto determine_file_type; /* success */ + } +@@ -854,35 +855,40 @@ determine_file_type: + *compression_program = NULL; + + /* Seek back over the magic bytes. */ +- if (fseek (f, 0, 0) < 0) ++ if (gzseek (f, 0, SEEK_SET) == -1) + return 0; + + if (*compression_program) + { /* It's compressed, so open a pipe. */ ++ FILE *p; + char *command = concat (*compression_program, " -d", ""); + +- if (fclose (f) < 0) ++ if (gzclose (f) < 0) + return 0; +- f = freopen (*opened_filename, FOPEN_RBIN, stdin); +- if (!f) ++ p = freopen (*opened_filename, FOPEN_RBIN, stdin); ++ if (!p) + return 0; +- f = popen (command, "r"); +- if (!f) ++ p = popen (command, "r"); ++ if (!p) + { + /* Used for error message in calling code. */ + *opened_filename = command; + return 0; + } ++ else ++ *is_pipe = 1; ++ return p; + } + else + { +-#if O_BINARY ++#if 0 && O_BINARY + /* Since this is a text file, and we opened it in binary mode, + switch back to text mode. */ + f = freopen (*opened_filename, "r", f); + if (! f) + return 0; + #endif ++ *is_pipe = 0; + } + + return f; +@@ -901,7 +907,8 @@ readfile (char *filename, int *sizep, + void (*create_callback) (char *), char **opened_filename, + char **compression_program) + { +- FILE *f; ++ void *f; ++ int pipe_p; + int filled = 0; + int data_size = 8192; + char *data = xmalloc (data_size); +@@ -909,14 +916,20 @@ readfile (char *filename, int *sizep, + /* If they passed the space for the file name to return, use it. */ + f = open_possibly_compressed_file (filename, create_callback, + opened_filename, +- compression_program); ++ compression_program, ++ &pipe_p); + + if (!f) + return 0; + + for (;;) + { +- int nread = fread (data + filled, 1, data_size - filled, f); ++ int nread; ++ ++ if (pipe_p) ++ nread = fread (data + filled, 1, data_size - filled, f); ++ else ++ nread = gzread (f, data + filled, data_size - filled); + if (nread < 0) + return 0; + if (nread == 0) +@@ -935,8 +948,10 @@ readfile (char *filename, int *sizep, + /* We need to close the stream, since on some systems the pipe created + by popen is simulated by a temporary file which only gets removed + inside pclose. */ +- if (f != stdin) ++ if (pipe_p) + pclose (f); ++ else ++ gzclose (f); + + *sizep = filled; + return data; +diff -up texinfo-6.5.91/install-info/Makefile.in.orig texinfo-6.5.91/install-info/Makefile.in +--- texinfo-6.5.91/install-info/Makefile.in.orig 2019-01-14 09:32:31.729895052 +0100 ++++ texinfo-6.5.91/install-info/Makefile.in 2019-01-14 09:32:52.574914503 +0100 +@@ -218,7 +218,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" + PROGRAMS = $(bin_PROGRAMS) + am_ginstall_info_OBJECTS = install-info.$(OBJEXT) + ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS) +-ginstall_info_LDADD = $(LDADD) ++ginstall_info_LDADD = $(LDADD) -lz + am__DEPENDENCIES_1 = + ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) diff --git a/texinfo-6.0-disable-failing-info-test.patch b/texinfo-6.0-disable-failing-info-test.patch new file mode 100644 index 0000000..5a8b72a --- /dev/null +++ b/texinfo-6.0-disable-failing-info-test.patch @@ -0,0 +1,25 @@ +diff -up texinfo-6.5.92/install-info/tests/Makefile.in.orig texinfo-6.5.92/install-info/tests/Makefile.in +--- texinfo-6.5.92/install-info/tests/Makefile.in.orig 2019-02-01 16:16:49.000000000 +0100 ++++ texinfo-6.5.92/install-info/tests/Makefile.in 2019-02-18 10:33:52.078877104 +0100 +@@ -1229,8 +1229,8 @@ ii-0021-test ii-0022-test ii-0023-test i + ii-0026-test ii-0027-test ii-0028-test ii-0029-test ii-0030-test \ + ii-0031-test ii-0032-test ii-0033-test ii-0034-test ii-0035-test \ + ii-0036-test ii-0037-test ii-0038-test ii-0039-test ii-0040-test \ +-ii-0041-test ii-0042-test ii-0043-test ii-0044-test ii-0045-test \ +-ii-0046-test ii-0047-test ii-0048-test ii-0049-test ii-0050-test \ ++ii-0042-test ii-0043-test ii-0044-test ii-0045-test \ ++ii-0046-test ii-0047-test ii-0048-test ii-0049-test \ + ii-0051-test ii-0052-test ii-0053-test ii-0054-test ii-0055-test \ + ii-0056-test ii-0057-test + +diff -up texinfo-6.5.92/tp/tests/Makefile.in.orig texinfo-6.5.92/tp/tests/Makefile.in +--- texinfo-6.5.92/tp/tests/Makefile.in.orig 2019-02-01 16:16:50.000000000 +0100 ++++ texinfo-6.5.92/tp/tests/Makefile.in 2019-02-18 10:33:13.774827269 +0100 +@@ -1374,7 +1374,6 @@ one_test_files_generated_list = \ + test_scripts/layout_formatting_html32.sh \ + test_scripts/layout_formatting_regions.sh \ + test_scripts/layout_formatting_exotic.sh \ +- test_scripts/layout_formatting_fr_icons.sh \ + test_scripts/layout_formatting_chm.sh \ + test_scripts/layout_formatting_nodes.sh \ + test_scripts/layout_formatting.sh \ 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..522d511 --- /dev/null +++ b/texinfo-6.5-covscan-fixes.patch @@ -0,0 +1,168 @@ +diff -up texinfo-6.5.91/contrib/fix-info-dir.p7 texinfo-6.5.91/contrib/fix-info-dir +--- texinfo-6.5.91/contrib/fix-info-dir.p7 2019-01-21 10:52:18.453973008 +0100 ++++ texinfo-6.5.91/contrib/fix-info-dir 2019-01-21 10:52:18.456973012 +0100 +@@ -28,7 +28,6 @@ if test -z "$LINENO"; then + fi + + MENU_BEGIN='^\*\([ ]\)\{1,\}Menu:' +-MENU_ITEM='^\* ([^ ]).*:([ ])+\(' + MENU_FILTER1='s/^\*\([ ]\)\{1,\}/* /' + MENU_FILTER2='s/\([ ]\)\{1,\}$//g' + +diff -up texinfo-6.5.91/info/infomap.c.p7 texinfo-6.5.91/info/infomap.c +--- texinfo-6.5.91/info/infomap.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/infomap.c 2019-01-21 10:52:18.457973013 +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.5.91/info/makedoc.c.p7 texinfo-6.5.91/info/makedoc.c +--- texinfo-6.5.91/info/makedoc.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/makedoc.c 2019-01-21 10:52:18.457973013 +0100 +@@ -425,7 +425,11 @@ process_one_file (char *filename, FILE * + + offset++; + if (offset >= file_size) +- break; ++ { ++ free (func_name); ++ free (func); ++ break; ++ } + + doc = xmalloc (1 + (offset - point)); + strncpy (doc, buffer + point, offset - point); +diff -up texinfo-6.5.91/info/m-x.c.p7 texinfo-6.5.91/info/m-x.c +--- texinfo-6.5.91/info/m-x.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/m-x.c 2019-01-21 10:52:18.457973013 +0100 +@@ -79,7 +79,10 @@ DECLARE_INFO_COMMAND (describe_command, + InfoCommand *cmd = named_function (line); + + if (!cmd) +- return; ++ { ++ free (line); ++ return; ++ } + + window_message_in_echo_area ("%s: %s.", + line, function_documentation (cmd)); +diff -up texinfo-6.5.91/info/nodes.c.p7 texinfo-6.5.91/info/nodes.c +--- texinfo-6.5.91/info/nodes.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/nodes.c 2019-01-21 10:52:18.457973013 +0100 +@@ -303,7 +303,10 @@ get_nodes_of_tags_table (FILE_BUFFER *fi + for (p = 0; nodedef[p] && nodedef[p] != INFO_TAGSEP; p++) + ; + if (nodedef[p] != INFO_TAGSEP) +- continue; ++ { ++ free (entry); ++ continue; ++ } + + entry->nodename = xmalloc (p + 1); + strncpy (entry->nodename, nodedef, p); +@@ -477,6 +480,7 @@ get_tags_of_indirect_tags_table (FILE_BU + } + file_buffer->subfiles = NULL; + free_file_buffer_tags (file_buffer); ++ free (subfiles); + return; + } + +diff -up texinfo-6.5.91/info/session.c.p7 texinfo-6.5.91/info/session.c +--- texinfo-6.5.91/info/session.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/session.c 2019-01-21 10:52:18.458973014 +0100 +@@ -3552,6 +3552,7 @@ DECLARE_INFO_COMMAND (info_goto_invocati + if (!line) + { + info_abort_key (window, 0); ++ free (default_program_name); + return; + } + if (*line) +diff -up texinfo-6.5.91/info/variables.c.p7 texinfo-6.5.91/info/variables.c +--- texinfo-6.5.91/info/variables.c.p7 2019-01-13 12:43:10.000000000 +0100 ++++ texinfo-6.5.91/info/variables.c 2019-01-21 10:52:18.459973015 +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.5.91/install-info/install-info.c.p7 texinfo-6.5.91/install-info/install-info.c +--- texinfo-6.5.91/install-info/install-info.c.p7 2019-01-21 10:52:18.447973002 +0100 ++++ texinfo-6.5.91/install-info/install-info.c 2019-01-21 10:52:18.460973016 +0100 +@@ -864,10 +864,16 @@ determine_file_type: + char *command = concat (*compression_program, " -d", ""); + + if (gzclose (f) < 0) +- return 0; ++ { ++ free (command); ++ return 0; ++ } + p = freopen (*opened_filename, FOPEN_RBIN, stdin); + if (!p) +- return 0; ++ { ++ free (command); ++ return 0; ++ } + p = popen (command, "r"); + if (!p) + { +@@ -877,6 +883,7 @@ determine_file_type: + } + else + *is_pipe = 1; ++ free (command); + return p; + } + else +@@ -920,7 +927,10 @@ readfile (char *filename, int *sizep, + &pipe_p); + + if (!f) +- return 0; ++ { ++ free (data); ++ return 0; ++ } + + for (;;) + { +@@ -980,6 +990,7 @@ output_dirfile (char *dirfile, int dir_n + { + char *command = concat (compression_program, ">", dirfile_tmp); + output = popen (command, "w"); ++ free (command); + } + else + output = fopen (dirfile_tmp, "w"); +@@ -1721,6 +1732,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.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..a1841f8 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -1,33 +1,30 @@ -%global tex_texinfo %{_datadir}/texlive/texmf-dist/tex/texinfo +%global tex_texinfo %{_datadir}/texmf/tex/texinfo Summary: Tools needed to create Texinfo format documentation files Name: texinfo -Version: 7.2 -Release: 7%{?dist} -License: GPL-3.0-or-later +Version: 6.6 +Release: 1%{?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 -# 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 +Patch0: texinfo-4.12-zlib.patch +# Patch1: this is needed just for koji/mock, all tests pass fine in local build +Patch1: texinfo-6.0-disable-failing-info-test.patch +# Patch2: rhbz#1348671, because of OSTree +Patch2: texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch +# Patch3: we need to fix template fix-info-dir generates +Patch3: info-6.5-sync-fix-info-dir.patch +# Patch4: rhbz#1592433, bug in fix-info-dir --delete +Patch4: texinfo-6.5-fix-info-dir.patch +# Patch5: fixes issues detected by static analysis +Patch5: texinfo-6.5-covscan-fixes.patch -BuildRequires: make BuildRequires: gcc BuildRequires: perl-generators -BuildRequires: ncurses-devel, help2man, perl(Data::Dumper) +BuildRequires: zlib-devel, ncurses-devel, help2man, perl(Data::Dumper) BuildRequires: perl(Locale::Messages), perl(Unicode::EastAsianWidth), perl(Text::Unidecode) -BuildRequires: perl(Storable), perl(Unicode::Normalize), perl(File::Copy) +BuildRequires: perl(Storable) # Texinfo perl packages are not installed in default perl library dirs %global __provides_exclude ^perl\\(.*Texinfo.*\\)$ @@ -44,7 +41,6 @@ are going to write documentation for the GNU Project. %package -n info Summary: A stand-alone TTY-based reader for GNU texinfo documentation -Provides: /sbin/install-info %description -n info The GNU project uses the texinfo file format for much of its @@ -55,13 +51,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 -Provides: texlive-texinfo -Obsoletes: texlive-texinfo <= 9:2019-15 %description tex Texinfo is a documentation system that can produce both online @@ -72,10 +63,7 @@ The texinfo-tex package provides tools to format Texinfo documents for printing using TeX. %prep -%setup -q -mkdir contrib -install -Dpm0755 -t contrib %{SOURCE2} -%autopatch -p1 +%autosetup -p1 %build %configure --with-external-Text-Unidecode \ @@ -85,10 +73,14 @@ 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} + +mv $RPM_BUILD_ROOT%{_bindir}/install-info $RPM_BUILD_ROOT/sbin install -Dpm0755 -t %{buildroot}%{_sbindir} contrib/fix-info-dir @@ -119,10 +111,7 @@ export ALL_TESTS=yes %{_bindir}/texi2any %{_bindir}/pod2texi %{_datadir}/texinfo -%{_datadir}/texi2any %{_infodir}/texinfo* -%{_infodir}/texi2any_api.info* -%{_infodir}/texi2any_internals.info* %{_mandir}/man1/makeinfo.1* %{_mandir}/man5/texinfo.5* %{_mandir}/man1/texi2any.1* @@ -132,13 +121,13 @@ export ALL_TESTS=yes %license COPYING %{_bindir}/info %{_infodir}/info-stnd.info* -%{_sbindir}/install-info +/sbin/install-info %{_sbindir}/fix-info-dir %{_mandir}/man1/info.1* %{_mandir}/man1/install-info.1* %{_mandir}/man5/info.5* %ghost %{_infodir}/dir -%ghost %attr(644, root, root) %{_infodir}/dir.old +%ghost %{_infodir}/dir.old %files tex %{_bindir}/texindex @@ -152,132 +141,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) - Resolves: #2171433 - -* Mon Jan 23 2023 Vitezslav Crhonek - 7.0.2-1 -- Update to texinfo-7.0.2 - Resolves: #2162979 - -* Sat Jan 21 2023 Fedora Release Engineering - 7.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Dec 01 2022 Vitezslav Crhonek - 7.0.1-1 -- Update to texinfo-7.0.1 - Resolves: #2149772 - -* Fri Nov 18 2022 Vitezslav Crhonek - 7.0-1 -- Update to texinfo-7.0 - Resolves: #2140872 - -* Sat Jul 23 2022 Fedora Release Engineering - 6.8-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 6.8-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 6.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jul 20 2021 Vitezslav Crhonek - 6.8-1 -- Update to texinfo-6.8 - Resolves: #1978903 - -* Mon Jun 14 2021 Vitezslav Crhonek - 6.7-11 -- Fix install path of install-info - -* Tue Feb 02 2021 Vitezslav Crhonek - 6.7-10 -- Fix problem in shell code found by ShellCheck in test script - -* Wed Jan 27 2021 Fedora Release Engineering - 6.7-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 6.7-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Mar 16 2020 Jitka Plesnikova - 6.7-7 -- Add BR: perl(Unicode::Normalize) - -* Thu Mar 5 2020 Tom Callaway - 6.7-6 -- add additional Provides: tex-texinfo ("it's an older code sir, but it checks out") - -* Fri Jan 31 2020 Fedora Release Engineering - 6.7-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jan 24 2020 Vitezslav Crhonek - 6.7-4 -- Move texlive-tex files to more approriate location again, this - time in sync with dropping texlive-texinfo from texlive - Resolves: #1719379 - -* Thu Jan 09 2020 Vitezslav Crhonek - 6.7-3 -- Fix mode of dir.old - -* Tue Oct 08 2019 Vitezslav Crhonek - 6.7-2 -- Revert move of texinfo-tex files - Resolves: #1758817 - -* Thu Sep 26 2019 Vitezslav Crhonek - 6.7-1 -- Update to texinfo-6.7 - Resolves: #1754648 -- Move texlive-tex files to more approriate location - Resolves: #1719379 - -* Sat Jul 27 2019 Fedora Release Engineering - 6.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - * Mon Feb 18 2019 Vitezslav Crhonek - 6.6-1 - Update to texinfo-6.6 Resolves: #1677911