commit b2eee66d4d077e349279c4f023ed3b0d063fb728 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:18:22 2019 -0400 Package init diff --git a/Avoid-memory-leak-for-malformed-files.patch b/Avoid-memory-leak-for-malformed-files.patch new file mode 100644 index 0000000..b3d92ea --- /dev/null +++ b/Avoid-memory-leak-for-malformed-files.patch @@ -0,0 +1,29 @@ +From 6c0ec277c393a7fe7149a1dadc1ae20540884cbf Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Fri, 28 Dec 2018 12:08:56 +0000 +Subject: [PATCH 504/759] Avoid memory leak for malformed files. + +* info/nodes.c (info_load_file): Free 'contents' and 'encoding' +fields of file structure in case the node table couldn't be +built. +--- + ChangeLog | 8 ++++++++ + info/nodes.c | 2 ++ + 2 files changed, 10 insertions(+) + +diff --git a/info/nodes.c b/info/nodes.c +index 8b0f7c45e..860383436 100644 +--- a/info/nodes.c ++++ b/info/nodes.c +@@ -735,6 +735,8 @@ info_load_file (char *fullpath, int is_subfile) + { + free (file_buffer->fullpath); + free (file_buffer->filename); ++ free (file_buffer->contents); ++ free (file_buffer->encoding); + free (file_buffer); + return 0; + } +-- +2.19.1 + diff --git a/Fix-call-to-info_find_file.patch b/Fix-call-to-info_find_file.patch new file mode 100644 index 0000000..2e0a88d --- /dev/null +++ b/Fix-call-to-info_find_file.patch @@ -0,0 +1,40 @@ +From cba0a8d34617044b14f881880c0b7d09cd7c8fce Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Fri, 28 Dec 2018 11:26:54 +0000 +Subject: [PATCH 503/759] Fix call to info_find_file. + +* info/nodes.c (info_get_nodes_with_defaults): Restore the value +of the 'fullpath' field of a file structure before calling +info_find_file. Otherwise, info_find_file will not recognize +that a file has been loaded, and load it again. This can lead +to a file buffer being freed incorrectly in +gc_file_buffers_and_nodes, leading to a segmentation fault. +Segmentation fault reported by Keith Thompson. +--- + ChangeLog | 12 ++++++++++++ + info/nodes.c | 4 ++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/info/nodes.c b/info/nodes.c +index d576134cf..8b0f7c45e 100644 +--- a/info/nodes.c ++++ b/info/nodes.c +@@ -945,13 +945,13 @@ info_get_node_with_defaults (char *filename_in, char *nodename_in, + { + saved_char = *p; + *p = 0; +- + file_in_same_dir = info_add_extension (defaults->fullpath, + filename, 0); ++ *p = saved_char; ++ + if (file_in_same_dir) + file_buffer = info_find_file (file_in_same_dir); + free (file_in_same_dir); +- *p = saved_char; + } + } + } +-- +2.19.1 + diff --git a/Fix-day-one-bug-handling-as-command-character.patch b/Fix-day-one-bug-handling-as-command-character.patch new file mode 100644 index 0000000..033133b --- /dev/null +++ b/Fix-day-one-bug-handling-as-command-character.patch @@ -0,0 +1,35 @@ +From b95ad570e3d31cbdef5d4a6bc164c97e716602d0 Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" +Date: Wed, 6 Mar 2019 21:17:55 +0200 +Subject: [PATCH 707/759] Fix day one bug handling @ as command character. + +--- + texindex/ti.twjr | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/texindex/ti.twjr b/texindex/ti.twjr +index ec59f68a5..45aa60e48 100644 +--- a/texindex/ti.twjr ++++ b/texindex/ti.twjr +@@ -412,7 +412,8 @@ The first character must be either @samp{\} or @samp{@@} + + @cindex @code{Special_chars} variable + @code{Special_chars} are the two characters that must be preceded by +-the command character inside the first key. ++the command character inside the first key. This includes the command ++character itself. + + @cindex @code{beginfile()} function + @cindex @code{Output_file} variable +@@ -443,7 +444,7 @@ function beginfile(filename) + || substr($0, 2, 5) != "entry") + fatal(_"%s is not a Texinfo index file\n", filename) + +- Special_chars = "{}" ++ Special_chars = "{}" Command_char + } + @ + +-- +2.19.1 + diff --git a/MiscXS-avoid-memory-leak.patch b/MiscXS-avoid-memory-leak.patch new file mode 100644 index 0000000..f488fca --- /dev/null +++ b/MiscXS-avoid-memory-leak.patch @@ -0,0 +1,97 @@ +From 690b130f6ef5e5b1112087a0378669b6d01ea3c5 Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Thu, 16 Aug 2018 15:56:11 +0000 +Subject: [PATCH 143/759] MiscXS avoid memory leak + +git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8095 39fee189-59d7-47db-b5d4-205258b72aed +--- + ChangeLog | 8 ++++++++ + tp/Texinfo/XS/misc.c | 39 ++++++++++++++++++++++----------------- + 2 files changed, 30 insertions(+), 17 deletions(-) + +diff --git a/tp/Texinfo/MiscXS/misc.c b/tp/Texinfo/MiscXS/misc.c +index 40c8992e7..e013b1928 100644 +--- a/tp/Texinfo/MiscXS/misc.c ++++ b/tp/Texinfo/MiscXS/misc.c +@@ -612,21 +612,24 @@ void xs_parse_texi_regex (SV *text_in, + if (*text == '@' && isalnum(text[1])) + { + char *p, *q; ++ static char *s; + + p = text + 1; + q = text + 2; + while (isalnum (*q) || *q == '-' || *q == '_') + q++; +- *at_command = malloc (q - p + 1); +- memcpy (*at_command, p, q - p); +- (*at_command)[q - p] = '\0'; ++ ++ s = realloc (s, q - p + 1); ++ memcpy (s, p, q - p); ++ s[q - p] = '\0'; ++ *at_command = s; + } + else + { + if (*text == '{') + { +- *open_brace = strdup ("{"); +- *separator_match = strdup ("{"); ++ *open_brace = "{"; ++ *separator_match = "{"; + } + + else if (*text == '@' +@@ -635,16 +638,18 @@ void xs_parse_texi_regex (SV *text_in, + "*-^`=:|/\\", + text[1])) + { +- *single_letter_command = malloc (2); +- (*single_letter_command)[0] = text[1]; +- (*single_letter_command)[1] = '\0'; ++ static char a[2]; ++ *single_letter_command = a; ++ a[0] = text[1]; ++ a[1] = '\0'; + } + + else if (strchr ("{}@,:\t.\f", *text)) + { +- *separator_match = malloc (2); +- (*separator_match)[0] = *text; +- (*separator_match)[1] = '\0'; ++ static char a[2]; ++ *separator_match = a; ++ a[0] = *text; ++ a[1] = '\0'; + } + + else +@@ -652,17 +657,17 @@ void xs_parse_texi_regex (SV *text_in, + char *p; + + if (*text == '*') +- { +- *asterisk = strdup ("*"); +- } ++ *asterisk = "*"; + + p = text; + p += strcspn (p, "{}@,:\t.\n\f"); + if (p > text) + { +- *new_text = malloc (p - text + 1); +- memcpy (*new_text, text, p - text); +- (*new_text)[p - text] = '\0'; ++ static char *s; ++ s = realloc (s, p - text + 1); ++ memcpy (s, text, p - text); ++ s[p - text] = '\0'; ++ *new_text = s; + } + } + } +-- +2.19.1 + diff --git a/XS-avoid-memory-leak.patch b/XS-avoid-memory-leak.patch new file mode 100644 index 0000000..6bda17f --- /dev/null +++ b/XS-avoid-memory-leak.patch @@ -0,0 +1,147 @@ +From 0cdd9c75042f86985617fff4e2a195ddb28a07c6 Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Thu, 16 Aug 2018 16:11:53 +0000 +Subject: [PATCH 144/759] XS avoid memory leak + +git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8096 39fee189-59d7-47db-b5d4-205258b72aed +--- + ChangeLog | 7 +++++++ + tp/Texinfo/XS/text.c | 13 ++++++++++++- + tp/Texinfo/XS/text.h | 3 ++- + tp/Texinfo/XS/xspara.c | 26 +++++++++++++------------- + 4 files changed, 34 insertions(+), 15 deletions(-) + +diff --git a/tp/Texinfo/Convert/XSParagraph/text.c b/tp/Texinfo/Convert/XSParagraph/text.c +index d686373b2..6baf8da3d 100644 +--- a/tp/Texinfo/Convert/XSParagraph/text.c ++++ b/tp/Texinfo/Convert/XSParagraph/text.c +@@ -1,4 +1,4 @@ +-/* Copyright 2014, 2015, 2016 Free Software Foundation, Inc. ++/* Copyright 2014, 2015, 2016, 2018 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -68,6 +68,17 @@ text_append (TEXT *t, char *s) + text_append_n (t, s, len); + } + ++/* Set text to an empty string without clearing any storage */ ++void ++text_reset (TEXT *t) ++{ ++ if (t->end > 0) ++ { ++ t->end = 0; ++ t->text[0] = 0; ++ } ++} ++ + void + text_init (TEXT *t) + { +diff --git a/tp/Texinfo/Convert/XSParagraph/text.h b/tp/Texinfo/Convert/XSParagraph/text.h +index e8fa9f915..7f14b3d29 100644 +--- a/tp/Texinfo/Convert/XSParagraph/text.h ++++ b/tp/Texinfo/Convert/XSParagraph/text.h +@@ -1,4 +1,4 @@ +-/* Copyright 2014, 2015, 2016 Free Software Foundation, Inc. ++/* Copyright 2014, 2015, 2016, 2018 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -20,6 +20,7 @@ typedef struct TEXT { + } TEXT; + + void text_init (TEXT *t); ++void text_reset (TEXT *t); + void text_append (TEXT *t, char *s); + void text_append_n (TEXT *t, char *s, size_t len); + void text_printf (TEXT *t, char *format, ...); +diff --git a/tp/Texinfo/Convert/XSParagraph/xspara.c b/tp/Texinfo/Convert/XSParagraph/xspara.c +index f2d6d1ccd..52a54ed74 100644 +--- a/tp/Texinfo/Convert/XSParagraph/xspara.c ++++ b/tp/Texinfo/Convert/XSParagraph/xspara.c +@@ -1,4 +1,4 @@ +-/* Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software ++/* Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify +@@ -553,8 +553,8 @@ xspara_end_line (void) + char * + xspara_get_pending (void) + { +- TEXT t; +- text_init (&t); ++ static TEXT t; ++ text_reset (&t); + text_append_n (&t, state.space.text, state.space.end); + text_append_n (&t, state.word.text, state.word.end); + return t.text; +@@ -610,9 +610,9 @@ xspara__add_pending_word (TEXT *result, int add_spaces) + char * + xspara_add_pending_word (int add_spaces) + { +- TEXT ret; ++ static TEXT ret; + +- text_init (&ret); ++ text_reset (&ret); + state.end_line_count = 0; + xspara__add_pending_word (&ret, add_spaces); + if (ret.text) +@@ -625,8 +625,8 @@ xspara_add_pending_word (int add_spaces) + char * + xspara_end (void) + { +- TEXT ret; +- text_init (&ret); ++ static TEXT ret; ++ text_reset (&ret); + state.end_line_count = 0; + xspara__add_pending_word (&ret, state.add_final_space); + if (!state.no_final_newline && state.counter != 0) +@@ -773,9 +773,9 @@ xspara__add_next (TEXT *result, char *word, int word_len, int transparent) + char * + xspara_add_next (char *text, int text_len, int transparent) + { +- TEXT t; ++ static TEXT t; + +- text_init (&t); ++ text_reset (&t); + state.end_line_count = 0; + xspara__add_next (&t, text, text_len, transparent); + +@@ -883,10 +883,10 @@ xspara_add_text (char *text) + int len; + wchar_t wc; + size_t char_len; +- TEXT result; ++ static TEXT result; + dTHX; + +- text_init (&result); ++ text_reset (&result); + + len = strlen (text); /* FIXME: Get this as an argument */ + state.end_line_count = 0; +@@ -973,13 +973,13 @@ xspara_add_text (char *text) + /* Truncate to at most 2 spaces, and replace any + '\n' or '\r' characters with ' '. */ + +- TEXT new_space; ++ static TEXT new_space; + char *pspace; + int pspace_left; + int len; + int i; + +- text_init (&new_space); ++ text_reset (&new_space); + pspace = state.space.text; + pspace_left = state.space.end; + state.space_counter = 0; +-- +2.19.1 + diff --git a/XS-avoid-memory-leaks.patch b/XS-avoid-memory-leaks.patch new file mode 100644 index 0000000..25a6a0c --- /dev/null +++ b/XS-avoid-memory-leaks.patch @@ -0,0 +1,50 @@ +From d916a50c77f41655b4af6bab994a771a161ea532 Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Thu, 16 Aug 2018 16:24:40 +0000 +Subject: [PATCH 145/759] XS avoid memory leaks + +git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8097 39fee189-59d7-47db-b5d4-205258b72aed +--- + ChangeLog | 5 +++++ + tp/Texinfo/XS/misc.c | 10 ++++++---- + 2 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/tp/Texinfo/MiscXS/misc.c b/tp/Texinfo/MiscXS/misc.c +index e013b1928..6962f1b08 100644 +--- a/tp/Texinfo/MiscXS/misc.c ++++ b/tp/Texinfo/MiscXS/misc.c +@@ -437,9 +437,11 @@ NEW_TEXT: + char * + xs_process_text (char *text) + { +- char *new, *p, *q; ++ static char *new; ++ char *p, *q; + +- new = strdup (text); ++ new = realloc (new, strlen (text) + 1); ++ strcpy (new, text); + + p = q = new; + while (*p) +@@ -489,7 +491,7 @@ char * + xs_unicode_text (char *text, int in_code) + { + char *p, *q; +- char *new; ++ static char *new; + int new_space, new_len; + + dTHX; /* Perl boilerplate. */ +@@ -499,7 +501,7 @@ xs_unicode_text (char *text, int in_code) + + p = text; + new_space = strlen (text); +- new = malloc (new_space + 1); ++ new = realloc (new, new_space + 1); + new_len = 0; + #define ADD3(s) \ + if (new_len + 2 >= new_space - 1) \ +-- +2.19.1 + diff --git a/fix-misleading-warning-about-node-names.patch b/fix-misleading-warning-about-node-names.patch new file mode 100644 index 0000000..d6f5d3a --- /dev/null +++ b/fix-misleading-warning-about-node-names.patch @@ -0,0 +1,37 @@ +From 4a3d0f3059583200a45ced680a860a43f83c06e0 Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Mon, 4 Jun 2018 09:46:18 +0000 +Subject: [PATCH 051/759] fix misleading warning about node names + +git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8003 39fee189-59d7-47db-b5d4-205258b72aed +--- + ChangeLog | 11 +++++++++++ + tp/Texinfo/Convert/Plaintext.pm | 6 ++++++ + 2 files changed, 17 insertions(+) + +diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm +index 581e94c10..f745f1c6d 100644 +--- a/tp/Texinfo/Convert/Plaintext.pm ++++ b/tp/Texinfo/Convert/Plaintext.pm +@@ -2064,12 +2064,18 @@ sub _convert($$) + } + # node name + $self->{'formatters'}->[-1]->{'suppress_styles'} = 1; ++ ++ my $maybe_file ++ = get_pending($self->{'formatters'}->[-1]->{'container'}); + my $node_text = _convert($self, {'type' => '_code', + 'contents' => $node_content}); + delete $self->{'formatters'}->[-1]->{'suppress_styles'}; + + my $node_text_checked = $node_text + .get_pending($self->{'formatters'}->[-1]->{'container'}); ++ $maybe_file =~ s/^\s*//; ++ $maybe_file = quotemeta $maybe_file; ++ $node_text_checked =~ s/^\s*$maybe_file//; + $quoting_required = 0; + if ($node_text_checked =~ /([,\t\.])/m ) { + if ($self->get_conf('INFO_SPECIAL_CHARS_WARNING')) { +-- +2.19.1 + diff --git a/info-6.5-sync-fix-info-dir.patch b/info-6.5-sync-fix-info-dir.patch new file mode 100644 index 0000000..dd10dce --- /dev/null +++ b/info-6.5-sync-fix-info-dir.patch @@ -0,0 +1,40 @@ +diff -uNr texinfo-6.5.orig/contrib/fix-info-dir texinfo-6.5/contrib/fix-info-dir +--- texinfo-6.5.orig/contrib/fix-info-dir 2014-04-22 03:56:56.000000000 +0200 ++++ texinfo-6.5/contrib/fix-info-dir 2018-02-04 13:48:35.979359350 +0100 +@@ -163,29 +163,23 @@ + { + + ### 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. ++ "mEmacs" visits the Emacs manual, 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. +- ++* Menu: + DIR_FILE_END_OF_FILE + + ### go through the list of files in the skeleton. If an info file diff --git a/perl-5.28-thread-safe-locales.patch b/perl-5.28-thread-safe-locales.patch new file mode 100644 index 0000000..13a4a73 --- /dev/null +++ b/perl-5.28-thread-safe-locales.patch @@ -0,0 +1,41 @@ +From a028ef47353b03177aab3facb4b2b74f7c3823e2 Mon Sep 17 00:00:00 2001 +From: Gavin Smith +Date: Fri, 13 Jul 2018 15:39:29 +0000 +Subject: [PATCH 056/759] perl 5.28 thread-safe locales + +git-svn-id: svn://127.0.0.1/svn_repo/texinfo/trunk@8008 39fee189-59d7-47db-b5d4-205258b72aed +--- + ChangeLog | 15 +++++++++++++++ + tp/Texinfo/Convert/XSParagraph/xspara.c | 9 +++++++++ + 2 files changed, 24 insertions(+) + +diff --git a/tp/Texinfo/Convert/XSParagraph/xspara.c b/tp/Texinfo/Convert/XSParagraph/xspara.c +index 51eea4a30..f2d6d1ccd 100644 +--- a/tp/Texinfo/Convert/XSParagraph/xspara.c ++++ b/tp/Texinfo/Convert/XSParagraph/xspara.c +@@ -248,6 +248,11 @@ xspara_init (void) + + dTHX; + ++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) ++ /* needed due to thread-safe locale handling in newer perls */ ++ switch_to_global_locale(); ++#endif ++ + if (setlocale (LC_CTYPE, "en_US.UTF-8") + || setlocale (LC_CTYPE, "en_US.utf8")) + goto success; +@@ -320,6 +325,10 @@ failure: + { + success: ; + free (utf8_locale); ++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) ++ /* needed due to thread-safe locale handling in newer perls */ ++ sync_locale(); ++#endif + /* + fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n"); + fprintf (stderr, "character encoding is: %s\n", +-- +2.19.1 + diff --git a/texinfo-20180310-texinfo.tex.patch b/texinfo-20180310-texinfo.tex.patch new file mode 100644 index 0000000..526fd22 --- /dev/null +++ b/texinfo-20180310-texinfo.tex.patch @@ -0,0 +1,311 @@ +diff -up texinfo-6.5/doc/texinfo.tex.old texinfo-6.5/doc/texinfo.tex +--- texinfo-6.5/doc/texinfo.tex.old 2017-08-27 05:21:32.000000000 -0400 ++++ texinfo-6.5/doc/texinfo.tex 2018-03-10 08:40:29.000000000 -0500 +@@ -3,11 +3,11 @@ + % Load plain if necessary, i.e., if running under initex. + \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi + % +-\def\texinfoversion{2017-08-23.19} ++\def\texinfoversion{2018-03-10.14} + % + % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, + % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +-% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ++% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 + % Free Software Foundation, Inc. + % + % This texinfo.tex file is free software: you can redistribute it and/or +@@ -21,7 +21,7 @@ + % General Public License for more details. + % + % You should have received a copy of the GNU General Public License +-% along with this program. If not, see . ++% along with this program. If not, see . + % + % As a special exception, when this file is read by TeX when processing + % a Texinfo source document, you may use the result without +@@ -30,9 +30,9 @@ + % + % Please try the latest version of texinfo.tex before submitting bug + % reports; you can get the latest version from: +-% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +-% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +-% http://www.gnu.org/software/texinfo/ (the Texinfo home page) ++% https://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or ++% https://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or ++% https://www.gnu.org/software/texinfo/ (the Texinfo home page) + % The texinfo.tex in any given distribution could well be out + % of date, so if that's what you're using, please check. + % +@@ -56,7 +56,7 @@ + % extent. You can get the existing language-specific files from the + % full Texinfo distribution. + % +-% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. ++% The GNU Texinfo home page is https://www.gnu.org/software/texinfo. + + + \message{Loading texinfo [version \texinfoversion]:} +@@ -2235,6 +2235,20 @@ end + \font\smallersy=cmsy8 + \def\smallerecsize{0800} + ++% Fonts for math mode superscripts (7pt). ++\def\sevennominalsize{7pt} ++\setfont\sevenrm\rmshape{7}{1000}{OT1} ++\setfont\seventt\ttshape{10}{700}{OT1TT} ++\setfont\sevenbf\bfshape{10}{700}{OT1} ++\setfont\sevenit\itshape{7}{1000}{OT1IT} ++\setfont\sevensl\slshape{10}{700}{OT1} ++\setfont\sevensf\sfshape{10}{700}{OT1} ++\setfont\sevensc\scshape{10}{700}{OT1} ++\setfont\seventtsl\ttslshape{10}{700}{OT1TT} ++\font\seveni=cmmi7 ++\font\sevensy=cmsy7 ++\def\sevenecsize{0700} ++ + % Fonts for title page (20.4pt): + \def\titlenominalsize{20pt} + \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +@@ -2369,6 +2383,20 @@ end + \font\smallersy=cmsy8 + \def\smallerecsize{0800} + ++% Fonts for math mode superscripts (7pt). ++\def\sevennominalsize{7pt} ++\setfont\sevenrm\rmshape{7}{1000}{OT1} ++\setfont\seventt\ttshape{10}{700}{OT1TT} ++\setfont\sevenbf\bfshape{10}{700}{OT1} ++\setfont\sevenit\itshape{7}{1000}{OT1IT} ++\setfont\sevensl\slshape{10}{700}{OT1} ++\setfont\sevensf\sfshape{10}{700}{OT1} ++\setfont\sevensc\scshape{10}{700}{OT1} ++\setfont\seventtsl\ttslshape{10}{700}{OT1TT} ++\font\seveni=cmmi7 ++\font\sevensy=cmsy7 ++\def\sevenecsize{0700} ++ + % Fonts for title page (20.4pt): + \def\titlenominalsize{20pt} + \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +@@ -2503,13 +2531,20 @@ end + + + % In order for the font changes to affect most math symbols and letters, +-% we have to define the \textfont of the standard families. We don't +-% bother to reset \scriptfont and \scriptscriptfont; awaiting user need. ++% we have to define the \textfont of the standard families. ++% We don't bother to reset \scriptscriptfont; awaiting user need. + % + \def\resetmathfonts{% + \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont + \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont + \textfont\ttfam=\ttfont \textfont\sffam=\sffont ++ % ++ % Fonts for superscript. Note that the 7pt fonts are used regardless ++ % of the current font size. ++ \scriptfont0=\sevenrm \scriptfont1=\seveni \scriptfont2=\sevensy ++ \scriptfont\itfam=\sevenit \scriptfont\slfam=\sevensl ++ \scriptfont\bffam=\sevenbf \scriptfont\ttfam=\seventt ++ \scriptfont\sffam=\sevensf + } + + % +@@ -2519,6 +2554,9 @@ end + % to also set the current \fam for math mode. Our \STYLE (e.g., \rm) + % commands hardwire \STYLEfont to set the current font. + % ++% The fonts used for \ifont are for "math italics" (\itfont is for italics ++% in regular text). \syfont is also used in math mode only. ++% + % Each font-changing command also sets the names \lsize (one size lower) + % and \lllsize (three sizes lower). These relative commands are used + % in, e.g., the LaTeX logo and acronyms. +@@ -2619,26 +2657,11 @@ end + % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will + % define and register \INITMACRO to be called on markup style changes. + % \INITMACRO can check \currentmarkupstyle for the innermost +-% style and the set of \ifmarkupSTYLE switches for all styles +-% currently in effect. +-\newif\ifmarkupvar +-\newif\ifmarkupsamp +-\newif\ifmarkupkey +-%\newif\ifmarkupfile % @file == @samp. +-%\newif\ifmarkupoption % @option == @samp. +-\newif\ifmarkupcode +-\newif\ifmarkupkbd +-%\newif\ifmarkupenv % @env == @code. +-%\newif\ifmarkupcommand % @command == @code. +-\newif\ifmarkuptex % @tex (and part of @math, for now). +-\newif\ifmarkupexample +-\newif\ifmarkupverb +-\newif\ifmarkupverbatim ++% style. + + \let\currentmarkupstyle\empty + + \def\setupmarkupstyle#1{% +- \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup + } +@@ -2700,11 +2723,15 @@ end + % lilypond developers report. xpdf does work with the regular 0x27. + % + \def\codequoteright{% +- \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax +- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax +- '% ++ \ifmonospace ++ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax ++ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax ++ '% ++ \else \char'15 \fi + \else \char'15 \fi +- \else \char'15 \fi ++ \else ++ '% ++ \fi + } + % + % and a similar option for the left quote char vs. a grave accent. +@@ -2712,13 +2739,17 @@ end + % the code environments to do likewise. + % + \def\codequoteleft{% +- \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax +- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax +- % [Knuth] pp. 380,381,391 +- % \relax disables Spanish ligatures ?` and !` of \tt font. +- \relax`% ++ \ifmonospace ++ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax ++ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax ++ % [Knuth] pp. 380,381,391 ++ % \relax disables Spanish ligatures ?` and !` of \tt font. ++ \relax`% ++ \else \char'22 \fi + \else \char'22 \fi +- \else \char'22 \fi ++ \else ++ \relax`% ++ \fi + } + + % Commands to set the quote options. +@@ -5969,24 +6000,30 @@ end + % Split the last of the double-column material. + \savemarks + \balancecolumns +- % ++ }% ++ \eject % call the \output just set ++ \ifdim\pagetotal=0pt + % Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. + \global\output = {\onepageout{\pagecontents\PAGE}}% +- }% +- \eject +- \endgroup % started in \begindoublecolumns +- \restoremarks +- % Leave the double-column material on the current page, no automatic +- % page break. +- \box\balancedcolumns +- % +- % \pagegoal was set to the doubled \vsize above, since we restarted +- % the current page. We're now back to normal single-column +- % typesetting, so reset \pagegoal to the normal \vsize. +- \global\vsize = \txipageheight % +- \pagegoal = \txipageheight % ++ % ++ \endgroup % started in \begindoublecolumns ++ \restoremarks ++ % Leave the double-column material on the current page, no automatic ++ % page break. ++ \box\balancedcolumns ++ % ++ % \pagegoal was set to the doubled \vsize above, since we restarted ++ % the current page. We're now back to normal single-column ++ % typesetting, so reset \pagegoal to the normal \vsize. ++ \global\vsize = \txipageheight % ++ \pagegoal = \txipageheight % ++ \else ++ % We had some left-over material. This might happen when \doublecolumnout ++ % is called in \balancecolumns. Try again. ++ \expandafter\enddoublecolumns ++ \fi + } + \newbox\balancedcolumns + \setbox\balancedcolumns=\vbox{shouldnt see this}% +@@ -6001,6 +6038,7 @@ end + \ifdim\dimen@<5\baselineskip + % Don't split a short final column in two. + \setbox2=\vbox{}% ++ \global\setbox\balancedcolumns=\vbox{\pagesofar}% + \else + \divide\dimen@ by 2 % target to split to + \dimen@ii = \dimen@ +@@ -6016,15 +6054,15 @@ end + \repeat + }% + % Now the left column is in box 1, and the right column in box 3. ++ % + % Check whether the left column has come out higher than the page itself. + % (Note that we have doubled \vsize for the double columns, so + % the actual height of the page is 0.5\vsize). + \ifdim2\ht1>\vsize +- % Just split the last of the double column material roughly in half. +- \setbox2=\box0 +- \setbox0 = \vsplit2 to \dimen@ii +- \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}% +- \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}% ++ % It appears that we have been called upon to balance too much material. ++ % Output some of it with \doublecolumnout, leaving the rest on the page. ++ \setbox\PAGE=\box0 ++ \doublecolumnout + \else + % Compare the heights of the two columns. + \ifdim4\ht1>5\ht3 +@@ -6037,10 +6075,10 @@ end + \setbox2=\vbox to\ht1{\unvbox3\unskip}% + \setbox0=\vbox to\ht1{\unvbox1\unskip}% + \fi ++ \global\setbox\balancedcolumns=\vbox{\pagesofar}% + \fi + \fi + % +- \global\setbox\balancedcolumns=\vbox{\pagesofar}% + } + \catcode`\@ = \other + +@@ -9446,7 +9484,7 @@ end + \newif\ifwarnednoepsf + \newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get +- it from ftp://tug.org/tex/epsf.tex.} ++ it from https://ctan.org/texarchive/macros/texinfo/texinfo/doc/epsf.tex.} + % + \def\image#1{% + \ifx\epsfbox\thisisundefined +@@ -11425,9 +11463,11 @@ directory should work if nowhere else do + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset ++ \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset ++ \advance\dimen2 by 1in % reference point is 1 inch from left edge of page + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% +@@ -11675,7 +11715,7 @@ directory should work if nowhere else do + @markupsetuprqdefault + + @c Local variables: +-@c eval: (add-hook 'write-file-hooks 'time-stamp) ++@c eval: (add-hook 'before-save-hook 'time-stamp) + @c page-delimiter: "^\\\\message\\|emacs-page" + @c time-stamp-start: "def\\\\texinfoversion{" + @c time-stamp-format: "%:y-%02m-%02d.%02H" diff --git a/texinfo-4.12-zlib.patch b/texinfo-4.12-zlib.patch new file mode 100644 index 0000000..0fc5bb4 --- /dev/null +++ b/texinfo-4.12-zlib.patch @@ -0,0 +1,236 @@ +diff -up texinfo-6.4/install-info/install-info.c.orig texinfo-6.4/install-info/install-info.c +--- texinfo-6.4/install-info/install-info.c.orig 2016-03-04 18:52:26.000000000 +0100 ++++ texinfo-6.4/install-info/install-info.c 2017-06-27 15:14:20.167998983 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #define TAB_WIDTH 8 + +@@ -684,15 +685,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. */ +@@ -700,48 +701,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) +@@ -757,7 +758,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; + } +@@ -767,26 +768,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 */ + } +@@ -857,35 +858,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; +@@ -904,7 +910,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); +@@ -912,14 +919,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) +@@ -938,8 +951,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.4/install-info/Makefile.in.orig texinfo-6.4/install-info/Makefile.in +--- texinfo-6.4/install-info/Makefile.in.orig 2017-06-23 08:04:39.000000000 +0200 ++++ texinfo-6.4/install-info/Makefile.in 2017-06-27 15:14:20.167998983 +0200 +@@ -221,7 +221,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) 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..813cc4b --- /dev/null +++ b/texinfo-6.0-disable-failing-info-test.patch @@ -0,0 +1,49 @@ +diff -up texinfo-6.4.90/info/Makefile.in.orig texinfo-6.4.90/info/Makefile.in +--- texinfo-6.4.90/info/Makefile.in.orig 2017-07-10 21:06:01.000000000 +0200 ++++ texinfo-6.4.90/info/Makefile.in 2017-07-11 09:58:06.501153160 +0200 +@@ -1367,7 +1367,6 @@ TESTS = \ + t/end-of-line.sh \ + t/goal-column.sh \ + t/star-note-non-whitespace.sh \ +- t/c-u-m-x-scroll-forward.sh \ + t/last-no-history.sh \ + t/split-footnotes.sh \ + t/window-split-dir.sh \ +@@ -1392,10 +1391,6 @@ TESTS = \ + t/search-skip-screen.sh \ + t/search-empty.sh \ + t/close-window-after-search.sh \ +- t/inc-sea-forward.sh \ +- t/inc-sea-forward-nonregex.sh \ +- t/inc-sea-insensitive.sh \ +- t/inc-sea-history.sh \ + t/inc-sea-bs.sh \ + t/gc-split.sh \ + t/anchor-positions.sh \ +diff -up texinfo-6.4.90/tp/tests/Makefile.in.orig texinfo-6.4.90/tp/tests/Makefile.in +--- texinfo-6.4.90/tp/tests/Makefile.in.orig 2017-07-10 20:52:24.000000000 +0200 ++++ texinfo-6.4.90/tp/tests/Makefile.in 2017-07-11 09:59:30.838233561 +0200 +@@ -1308,7 +1308,6 @@ one_test_files_generated_list = \ + test_scripts/formatting_simplest_test_prefix_info.sh \ + test_scripts/formatting_simplest_test_css.sh \ + test_scripts/formatting_simplest_test_date_in_header.sh \ +- test_scripts/formatting_documentlanguage_set_option.sh \ + test_scripts/formatting_documentlanguage_set_unknown.sh \ + test_scripts/formatting_documentlanguage_set_option_info.sh \ + test_scripts/formatting_float_copying.sh \ +@@ -1348,7 +1347,6 @@ one_test_files_generated_list = \ + test_scripts/sectioning_top_node_up_explicit.sh \ + test_scripts/coverage_texi_formatting.sh \ + test_scripts/coverage_formatting.sh \ +- test_scripts/coverage_formatting_fr.sh \ + test_scripts/indices_double_index_entry.sh \ + test_scripts/indices_split_chapter_index.sh \ + test_scripts/indices_index_split.sh \ +@@ -1447,7 +1445,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/tex_html_block_EOL_tex.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..892685a --- /dev/null +++ b/texinfo-6.5-covscan-fixes.patch @@ -0,0 +1,190 @@ +unchanged: +--- texinfo-6.4/contrib/fix-info-dir.orig 2014-04-22 03:56:56.000000000 +0200 ++++ texinfo-6.4/contrib/fix-info-dir 2018-08-08 10:40:42.585496361 +0200 +@@ -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' + +unchanged: +--- texinfo-6.4/info/echo-area.c.orig 2018-07-25 12:42:38.806784712 +0200 ++++ texinfo-6.4/info/echo-area.c 2018-07-25 12:43:15.452815108 +0200 +@@ -979,6 +979,7 @@ info_read_completing_internal (const cha + inform_in_echo_area (_("No completions")); + else + inform_in_echo_area (_("Not complete")); ++ free (line); + continue; + } + } +unchanged: +--- texinfo-6.4/info/info.c.orig 2018-07-25 14:12:18.086188150 +0200 ++++ texinfo-6.4/info/info.c 2018-07-25 14:13:00.915223083 +0200 +@@ -295,6 +295,7 @@ get_initial_file (int *argc, char ***arg + ref_index, ref_list, ref_slots, 2); + + initial_file = MANPAGE_FILE_BUFFER_NAME; ++ free (man_node); + return; + } + } +unchanged: +--- texinfo-6.4/info/infomap.c.orig 2017-05-15 18:35:24.000000000 +0200 ++++ texinfo-6.4/info/infomap.c 2018-07-30 09:40:58.517674645 +0200 +@@ -603,6 +603,7 @@ fetch_user_maps (char *init_file) + compile (inf, filename, &sup_info, &sup_ea); + + free (filename); ++ fclose (inf); + return 1; + } + +unchanged: +--- texinfo-6.4/info/m-x.c.orig 2017-05-14 12:55:17.000000000 +0200 ++++ texinfo-6.4/info/m-x.c 2018-07-30 10:11:23.799858816 +0200 +@@ -81,7 +81,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)); +unchanged: +--- texinfo-6.4/info/makedoc.c.orig 2014-11-07 11:58:55.000000000 +0100 ++++ texinfo-6.4/info/makedoc.c 2018-07-30 10:23:55.128644559 +0200 +@@ -427,7 +427,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); +unchanged: +--- texinfo-6.4/info/nodes.c 2018-07-30 10:59:25.515087533 +0200 ++++ texinfo-6.4/info/nodes.c 2018-07-30 11:10:47.547853493 +0200 +@@ -305,7 +305,10 @@ + 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); +@@ -479,6 +482,7 @@ + } + file_buffer->subfiles = NULL; + free_file_buffer_tags (file_buffer); ++ free (subfiles); + return; + } + +unchanged: +--- texinfo-6.4/info/session.c.orig 2018-07-30 11:11:33.997905448 +0200 ++++ texinfo-6.4/info/session.c 2018-07-30 11:38:27.135721289 +0200 +@@ -3554,6 +3554,7 @@ DECLARE_INFO_COMMAND (info_goto_invocati + if (!line) + { + info_abort_key (window, 0); ++ free (default_program_name); + return; + } + if (*line) +unchanged: +--- texinfo-6.4/info/variables.c.def24 2017-05-03 21:48:19.000000000 +0200 ++++ texinfo-6.4/info/variables.c 2018-07-30 12:53:06.692694120 +0200 +@@ -361,6 +361,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 (); +@@ -384,7 +385,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 -u texinfo-6.4/install-info/install-info.c texinfo-6.4/install-info/install-info.c +--- texinfo-6.4/install-info/install-info.c 2018-07-30 13:47:00.265812976 +0200 ++++ texinfo-6.4/install-info/install-info.c 2018-07-30 13:53:50.427431251 +0200 +@@ -867,10 +867,16 @@ + 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) + { +@@ -880,6 +886,7 @@ + } + else + *is_pipe = 1; ++ free (command); + return p; + } + else +@@ -923,7 +930,10 @@ + &pipe_p); + + if (!f) +- return 0; ++ { ++ free (data); ++ return 0; ++ } + + for (;;) + { +@@ -983,6 +993,7 @@ + { + char *command = concat (compression_program, ">", dirfile_tmp); + output = popen (command, "w"); ++ free (command); + } + else + output = fopen (dirfile_tmp, "w"); +@@ -1724,6 +1735,8 @@ + + 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.5-fix-for-perl-5.28.patch b/texinfo-6.5-fix-for-perl-5.28.patch new file mode 100644 index 0000000..77346a8 --- /dev/null +++ b/texinfo-6.5-fix-for-perl-5.28.patch @@ -0,0 +1,17 @@ +diff -up texinfo-6.5/tp/Texinfo/Parser.pm.orig texinfo-6.5/tp/Texinfo/Parser.pm +--- texinfo-6.5/tp/Texinfo/Parser.pm.orig 2018-06-12 13:40:29.356030136 +0200 ++++ texinfo-6.5/tp/Texinfo/Parser.pm 2018-06-12 13:41:28.357725639 +0200 +@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$) + } + } elsif ($command eq 'clickstyle') { + # REMACRO +- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) { ++ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) { + $args = ['@'.$1]; + $self->{'clickstyle'} = $1; + $remaining = $line; +- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//; ++ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//; + $has_comment = 1 if (defined($4)); + } else { + $self->line_error (sprintf($self->__( diff --git a/texinfo-6.5-fix-info-dir.patch b/texinfo-6.5-fix-info-dir.patch new file mode 100644 index 0000000..cdb26f2 --- /dev/null +++ b/texinfo-6.5-fix-info-dir.patch @@ -0,0 +1,41 @@ +This fixes two issues: + +https://bugzilla.redhat.com/show_bug.cgi?id=1592433 +This is a bug in fix-info-dir --delete +(Hunk 3) + +https://bugzilla.redhat.com/show_bug.cgi?id=1614162 +This is a weird infinite loop that happens when fix-info-dir is run with stderr +redirected to /dev/null while /dev/null doesn't exist (or isn't a device) +(Hunks 1 and 2) + +diff --git a/contrib/fix-info-dir b/contrib/fix-info-dir +index 4439ada..9240060 100755 +--- a/contrib/fix-info-dir ++++ b/contrib/fix-info-dir +@@ -124,6 +124,7 @@ if test "$CREATE_NODE"; then + fi + shift + else ++ SKIP_READ=yes + SKELETON=/dev/null + + fi +@@ -188,7 +189,7 @@ DIR_FILE_END_OF_FILE + + # 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 ++ while test -z "$SKIP_READ" && read fileline; do + # flag fancy features + if test ! -z "$echoline"; then # echo line + echo "$fileline" +@@ -294,7 +295,7 @@ else + 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 ++ if install-info --remove --remove-exactly $Info_Name $DIR_FILE; then + Total=`expr "$Total" + "1"` + fi + done diff --git a/texinfo-6.5.tar.xz b/texinfo-6.5.tar.xz new file mode 100644 index 0000000..4740542 Binary files /dev/null and b/texinfo-6.5.tar.xz differ diff --git a/texinfo-6.5.tar.xz.sig b/texinfo-6.5.tar.xz.sig new file mode 100644 index 0000000..ade40b6 --- /dev/null +++ b/texinfo-6.5.tar.xz.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iF4EABEIAAYFAlm4QBsACgkQ3bxXnas3+6mlNwD/Tzn0IxHxWCII18A72dLZ0rDB +0GtvrWV4c/wtYHSGSNEA/3iIAv2qbGreDAXAzLHKsWm5vKzFvRPeDS7GBJQg018q +=EUkI +-----END PGP SIGNATURE----- diff --git a/texinfo.spec b/texinfo.spec new file mode 100644 index 0000000..2fb4268 --- /dev/null +++ b/texinfo.spec @@ -0,0 +1,163 @@ +%global tex_texinfo %{_datadir}/texmf/tex/texinfo + +Name: texinfo +Version: 6.5 +Release: 13 +Summary: Tools needed to create Texinfo format documentation files +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 + +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 +# Update to 2018-03-10 texinfo.tex +Patch4: texinfo-20180310-texinfo.tex.patch +# rhbz#1592433, bug in fix-info-dir --delete +Patch5: texinfo-6.5-fix-info-dir.patch +# Patch6: rhbz#1590308, fixes test fail with unescaped left brace +Patch6: texinfo-6.5-fix-for-perl-5.28.patch +# Patch7: fixes issues detected by static analysis +Patch7: texinfo-6.5-covscan-fixes.patch + +Patch6000: fix-misleading-warning-about-node-names.patch +Patch6001: perl-5.28-thread-safe-locales.patch +Patch6002: MiscXS-avoid-memory-leak.patch +Patch6003: XS-avoid-memory-leak.patch +Patch6004: XS-avoid-memory-leaks.patch +Patch6005: Fix-call-to-info_find_file.patch +Patch6006: Avoid-memory-leak-for-malformed-files.patch +Patch6007: Fix-day-one-bug-handling-as-command-character.patch + +BuildRequires: gcc perl-generators zlib-devel ncurses-devel help2man +BuildRequires: perl(Data::Dumper) perl(Locale::Messages) perl(Unicode::EastAsianWidth) perl(Text::Unidecode) perl(Storable) + +# Texinfo perl packages are not installed in default perl library dirs +%global __provides_exclude ^perl\\(.*Texinfo.*\\)$ +%global __requires_exclude ^perl\\(.*Texinfo.*\\)$ + +%description +Texinfo is a documentation system that can produce both online +information and printed output from a single source file. The GNU +Project uses the Texinfo file format for most of its documentation. + +Install texinfo if you want a documentation system for producing both +online and print documentation from the same source file and/or if you +are going to write documentation for the GNU Project. + +%package tex +Summary: Tools for formatting Texinfo documentation files using TeX +Requires: texinfo = %{version}-%{release} tex(tex) tex(epsf.tex) +Requires(post): texlive-tetex +Requires(postun): texlive-tetex + +%description tex +Texinfo is a documentation system that can produce both online +information and printed output from a single source file. The GNU +Project uses the Texinfo file format for most of its documentation. + +%package -n info +Summary: A stand-alone TTY-based reader for GNU texinfo documentation + +%description -n info +The GNU project uses the texinfo file format for much of its +documentation. The info package provides a standalone TTY-based +browser program for viewing texinfo files. + +%package help +Summary: A stand-alone TTY-based reader for GNU texinfo documentation + +%description help +The GNU project uses the texinfo file format for much of its +documentation. The help package provides a standalone TTY-based +browser program for viewing texinfo files. + +%prep +%autosetup -p1 + +%build +%configure --with-external-Text-Unidecode --with-external-libintl-perl --with-external-Unicode-EastAsianWidth --disable-perl-xs +%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} + +mv $RPM_BUILD_ROOT%{_bindir}/install-info $RPM_BUILD_ROOT/sbin + +install -Dpm0755 -t %{buildroot}%{_sbindir} contrib/fix-info-dir + +%find_lang %{name} +%find_lang %{name}_document + +%check +export ALL_TESTS=yes +%make_build check + +%post +%{_bindir}/texconfig-sys rehash 2> /dev/null || : + +%postun +%{_bindir}/texconfig-sys rehash 2> /dev/null || : + +%transfiletriggerin help -- %{_infodir} +[ -f %{_infodir}/dir ] && create_arg="" || create_arg="--create" +%{_sbindir}/fix-info-dir $create_arg %{_infodir}/dir &>/dev/null + +%transfiletriggerpostun help -- %{_infodir} +[ -f %{_infodir}/dir ] && %{_sbindir}/fix-info-dir --delete %{_infodir}/dir &>/dev/null + +%files -f %{name}.lang -f %{name}_document.lang +%doc AUTHORS ChangeLog NEWS README TODO +%license COPYING +%{_bindir}/makeinfo +%{_bindir}/texi2any +%{_bindir}/pod2texi +%{_datadir}/texinfo + +%files tex +%{_bindir}/texindex +%{_bindir}/texi2dvi +%{_bindir}/texi2pdf +%{_bindir}/pdftexi2dvi + +%files -n info +%license COPYING +%{_bindir}/info +/sbin/install-info +%{_sbindir}/fix-info-dir + +%files help +%license COPYING +%{_infodir}/info-stnd.info* +%{_mandir}/man1/info.1* +%{_mandir}/man1/install-info.1* +%{_mandir}/man5/info.5* +%{tex_texinfo}/ +%{_mandir}/man1/texindex.1* +%{_mandir}/man1/texi2dvi.1* +%{_mandir}/man1/texi2pdf.1* +%{_mandir}/man1/pdftexi2dvi.1* +%{_mandir}/man1/makeinfo.1* +%{_mandir}/man5/texinfo.5* +%{_mandir}/man1/texi2any.1* +%{_mandir}/man1/pod2texi.1* +%{_infodir}/texinfo* +%ghost %{_infodir}/dir +%ghost %{_infodir}/dir.old + +%changelog +* Wed Sep 26 2019 openEuler Buildteam - 6.5-13 +- Add rpm texinfo-tex, info + +* Tue Sep 17 2019 openEuler Buildteam - 6.5-12 +- Package init