Hi.
While browsing documentation using "info", I've pressed some random
keys, and program caught SIGSEGV. After spending some time experimenting
I've learned that the key sequence was "-9-=". On my system, it generates
a fault every time and in any node. I'm using ASPLinux 7.1, kernel
2.4.10, glibc-2.2.2 and info 4.0. Gdb says only that fault is in
strcpy (). In cause you will not be able to reproduce this fault, I'll
try to compile program with debug info.
There are .spec file and patches used to build info in attachment.
Sorry for my bad english. Happy bughunting!
--
Vladimir
Summary: Tools needed to create Texinfo format documentation files.
Name: texinfo
Version: 4.0
Release: 15
License: GPL
Vendor : SWsoft Pte. Ltd.
Packager : ASP Linux Team <[EMAIL PROTECTED]>
Distribution : ASPLinux
Group: Applications/Publishing
Source0: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.gz
Source1: info-dir
Patch1: texinfo-3.12h-fix.patch
Patch3: texinfo-4.0-zlib.patch
Prereq: /sbin/install-info
Prefix: %{_prefix}
Buildroot: %{_tmppath}/%{name}-%{version}-root
# Redifine this to "dir" in the info directory isn't compressed
%define __spec_install_post /usr/lib/rpm/brp-strip \;
/usr/lib/rpm/brp-strip-comment-note \; rm -f
%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 -n info
Summary: A stand-alone TTY-based reader for GNU texinfo documentation.
Group: System Environment/Base
# By making info prereq bash, other packages which have triggers based on
# info don't run those triggers until bash is in place as well. This is an
# ugly method of doing it (triggers which fire on set intersection would
# be better), but it's the best we can do for now. Talk to Erik before
# removing this.
Prereq: bash
%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.
You should install info, because GNU's texinfo documentation is a
valuable source of information about the software on your system.
%prep
%setup -q
%patch1 -p1
%patch3 -p1 -b .zlib
%build
%configure --mandir=%{_prefix}/share/man --infodir=%{_prefix}/share/info
make
rm util/install-info
make -C util LIBS=%{_prefix}/lib/libz.a
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}/{etc,sbin}
%makeinstall
( cd ${RPM_BUILD_ROOT}
gzip -n -9f .%{_prefix}/share/info/*info*
gzip -n -9f .%{_mandir}/*/*
install -m644 $RPM_SOURCE_DIR/info-dir ./etc/info-dir
ln -sf /etc/info-dir ${RPM_BUILD_ROOT}%{_prefix}/share/info/dir
for i in makeinfo texindex info install-info ; do
strip .%{_prefix}/bin/$i
done
mv -f .%{_prefix}/bin/install-info ./sbin
mkdir -p ./etc/X11/applnk/Utilities
cat > ./etc/X11/applnk/Utilities/info.desktop <<EOF
[Desktop Entry]
Name=Info Viewer
Name[sv]=Infovisare
Name[de]=Info-Viewer
Type=Application
Comment=GNU Info Page Reader
Comment[sv]=GNU Info-sidl�sare
Comment[de]=GNU Info-Seiten-Viewer
Exec=info
Terminal=true
EOF
)
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
/sbin/install-info %{_prefix}/share/info/texinfo.gz %{_prefix}/share/info/dir
%preun
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_prefix}/share/info/texinfo.gz
%{_prefix}/share/info/dir
fi
%post -n info
/sbin/install-info %{_prefix}/share/info/info-stnd.info.gz %{_prefix}/share/info/dir
%preun -n info
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_prefix}/share/info/info-stnd.info.gz
%{_prefix}/share/info/dir
fi
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog INSTALL INTRODUCTION NEWS README TODO
%doc info/README
%{_prefix}/bin/makeinfo
%{_prefix}/bin/texindex
%{_prefix}/bin/texi2dvi
%{_prefix}/share/info/texinfo*
%{_prefix}/share/locale/*/*/*
%{_prefix}/share/man/man1/makeinfo.1*
%{_prefix}/share/man/man1/texindex.1*
%{_prefix}/share/man/man1/texi2dvi.1*
%{_prefix}/share/man/man5/texinfo.5*
%files -n info
%defattr(-,root,root)
%config(missingok) /etc/X11/applnk/Utilities/info.desktop
%config(noreplace) %verify(not md5 size mtime) /etc/info-dir
%config(noreplace) %{_prefix}/share/info/dir
%{_prefix}/bin/info
%{_prefix}/share/info/info.info*
%{_prefix}/share/info/info-stnd.info*
/sbin/install-info
%{_prefix}/share/man/man1/info.1*
%{_prefix}/share/man/man1/install-info.1*
%{_prefix}/share/man/man5/info.5*
%changelog
* Wed Oct 04 2000 Ibrahim K. Kasumov <[EMAIL PROTECTED]>
- repackaged for ASPLinux
* Sat Aug 19 2000 Trond Eivind Glomsr�d <[EMAIL PROTECTED]>
- really do it - #16120
* Mon Aug 14 2000 Helge Deller <[EMAIL PROTECTED]>
- gzip man-pages, #16120
* Mon Aug 7 2000 Tim Waugh <[EMAIL PROTECTED]>
- List man-pages in %%files.
* Fri Aug 4 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- Add Swedish and German translations to desktop file, Bug #15366
* Thu Aug 3 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- mark /etc/info-dir %%verify(not md5 size mime), Bug #14826
* Wed Jul 12 2000 Prospector <[EMAIL PROTECTED]>
- automatic rebuild
* Wed Jun 28 2000 Bill Nottingham <[EMAIL PROTECTED]>
- fix build wackiness with info page compressing
* Fri Jun 16 2000 Bill Nottingham <[EMAIL PROTECTED]>
- fix info-dir symlink
* Thu May 18 2000 Preston Brown <[EMAIL PROTECTED]>
- use FHS paths for info.
* Fri Mar 24 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- rebuild with current ncurses
* Wed Feb 09 2000 Preston Brown <[EMAIL PROTECTED]>
- wmconfig -> desktop
* Wed Feb 02 2000 Cristian Gafton <[EMAIL PROTECTED]>
- fix descriptions
* Wed Jan 26 2000 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- move info-stnd.info* to the info package, /sbin/install-info it
in %post (Bug #6632)
* Thu Jan 13 2000 Jeff Johnson <[EMAIL PROTECTED]>
- recompile to eliminate ncurses foul-up.
* Tue Nov 9 1999 Bernhard Rosenkr�nzer <[EMAIL PROTECTED]>
- 4.0
- handle RPM_OPT_FLAGS
* Tue Sep 07 1999 Cristian Gafton <[EMAIL PROTECTED]>
- import version 3.12h into 6.1 tree from HJLu
* Sun Mar 21 1999 Cristian Gafton <[EMAIL PROTECTED]>
- auto rebuild in the new build environment (release 4)
* Wed Mar 17 1999 Erik Troan <[EMAIL PROTECTED]>
- hacked to use zlib to get rid of the requirement on gzip
* Wed Mar 17 1999 Matt Wilson <[EMAIL PROTECTED]>
- install-info prerequires gzip
* Thu Mar 11 1999 Cristian Gafton <[EMAIL PROTECTED]>
- version 3.12f
- make /usr/info/dir to be a %config(noreplace)
* Wed Nov 25 1998 Jeff Johnson <[EMAIL PROTECTED]>
- rebuild to fix docdir perms.
* Thu Sep 24 1998 Cristian Gafton <[EMAIL PROTECTED]>
- fix allocation problems in install-info
* Wed Sep 23 1998 Jeff Johnson <[EMAIL PROTECTED]>
- /sbin/install-info should not depend on /usr/lib/libz.so.1 -- statically
link with /usr/lib/libz.a.
* Fri Aug 07 1998 Erik Troan <[EMAIL PROTECTED]>
- added a prereq of bash to the info package -- see the comment for a
description of why that was done
* Tue Jun 09 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de
* Tue Jun 9 1998 Jeff Johnson <[EMAIL PROTECTED]>
- add %attr to permit non-root build.
* Thu May 07 1998 Prospector System <[EMAIL PROTECTED]>
- translations modified for de, fr, tr
* Sun Apr 12 1998 Cristian Gafton <[EMAIL PROTECTED]>
- added %clean
- manhattan build
* Wed Mar 04 1998 Cristian Gafton <[EMAIL PROTECTED]>
- upgraded to version 3.12
- added buildroot
* Sun Nov 09 1997 Donnie Barnes <[EMAIL PROTECTED]>
- moved /usr/info/dir to /etc/info-dir and made /usr/info/dir a
symlink to /etc/info-dir.
* Wed Oct 29 1997 Donnie Barnes <[EMAIL PROTECTED]>
- added wmconfig entry for info
* Wed Oct 01 1997 Donnie Barnes <[EMAIL PROTECTED]>
- stripped /sbin/install-info
* Mon Sep 22 1997 Erik Troan <[EMAIL PROTECTED]>
- added info-dir to filelist
* Sun Sep 14 1997 Erik Troan <[EMAIL PROTECTED]>
- added patch from sopwith to let install-info understand gzip'ed info files
- use skeletal dir file from texinfo tarball (w/ bash entry to reduce
dependency chain) instead (and install-info command everywhere else)
- patches install-info to handle .gz names correctly
* Tue Jun 03 1997 Erik Troan <[EMAIL PROTECTED]>
- built against glibc
* Tue Feb 25 1997 Erik Troan <[EMAIL PROTECTED]>
- patched install-info.c for glibc.
- added /usr/bin/install-info to the filelist
* Tue Feb 18 1997 Michael Fulbright <[EMAIL PROTECTED]>
- upgraded to version 3.9.
--- texinfo-3.12h/util/install-info.c.orig Thu May 13 11:58:19 1999
+++ texinfo-3.12h/util/install-info.c Thu May 13 11:59:44 1999
@@ -629,7 +629,7 @@ readfile (filename, sizep, create_callba
break;
filled += nread;
- if (filled == data_size)
+ if (data_size - filled < 8192)
{
data_size += 65536;
data = xrealloc (data, data_size);
--- texinfo-3.12f/util/Makefile.in.zlib Wed Mar 17 18:36:17 1999
+++ texinfo-3.12f/util/Makefile.in Wed Mar 17 18:36:25 1999
@@ -102,7 +102,7 @@
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
+LIBS = @LIBS@ -lz
install_info_SOURCES = install-info.c
install_info_OBJECTS = install-info.o
install_info_LDADD = $(LDADD)
--- texinfo-4.0/util/install-info.c.zlib Tue Nov 9 18:34:37 1999
+++ texinfo-4.0/util/install-info.c Tue Nov 9 18:40:58 1999
@@ -19,6 +19,7 @@
#include "system.h"
#include <getopt.h>
+#include <zlib.h>
static char *progname = "install-info";
@@ -481,7 +482,7 @@
COMPRESSION_PROGRAM. The compression program is determined by the
magic number, not the filename. */
-FILE *
+gzFile
open_possibly_compressed_file (filename, create_callback,
opened_filename, compression_program, is_pipe)
char *filename;
@@ -493,7 +494,7 @@
char *local_opened_filename, *local_compression_program;
int nread;
char data[4];
- FILE *f;
+ gzFile *f;
/* We let them pass NULL if they don't want this info, but it's easier
to always determine it. */
@@ -501,23 +502,23 @@
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);
#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
if (!f)
@@ -529,7 +530,7 @@
/* And try opening it again. */
free (*opened_filename);
*opened_filename = filename;
- f = fopen (*opened_filename, FOPEN_RBIN);
+ f = gzopen (*opened_filename, FOPEN_RBIN);
if (!f)
pfatal_with_name (filename);
}
@@ -538,54 +539,7 @@
}
}
- /* 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)
- {
- /* Empty files don't set errno, so we get something like
- "install-info: No error for foo", which is confusing. */
- if (nread == 0)
- fatal (_("%s: empty file"), *opened_filename);
- pfatal_with_name (*opened_filename);
- }
-
- if (!compression_program)
- compression_program = &local_compression_program;
-
- if (data[0] == '\x1f' && data[1] == '\x8b')
-#if STRIP_DOT_EXE
- /* An explicit .exe yields a better diagnostics from popen below
- if they don't have gzip installed. */
- *compression_program = "gzip.exe";
-#else
- *compression_program = "gzip";
-#endif
- else
- *compression_program = NULL;
-
- if (*compression_program)
- { /* It's compressed, so fclose the file and then open a pipe. */
- char *command = concat (*compression_program," -cd <", *opened_filename);
- if (fclose (f) < 0)
- pfatal_with_name (*opened_filename);
- f = popen (command, "r");
- if (f)
- *is_pipe = 1;
- else
- pfatal_with_name (command);
- }
- else
- { /* It's a plain file, seek back over the magic bytes. */
- if (fseek (f, 0, 0) < 0)
- pfatal_with_name (*opened_filename);
-#if 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);
-#endif
- *is_pipe = 0;
- }
+ *is_pipe = 0;
return f;
}
@@ -608,7 +562,7 @@
char **compression_program;
{
char *real_name;
- FILE *f;
+ gzFile *f;
int pipe_p;
int filled = 0;
int data_size = 8192;
@@ -622,7 +576,7 @@
for (;;)
{
- int nread = fread (data + filled, 1, data_size - filled, f);
+ int nread = gzread (f, data + filled, data_size - filled);
if (nread < 0)
pfatal_with_name (real_name);
if (nread == 0)
@@ -641,10 +595,7 @@
/* 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 (pipe_p)
- pclose (f);
- else
- fclose (f);
+ gzclose(f);
*sizep = filled;
return data;
@@ -1407,7 +1358,7 @@
warning (_("no entries found for `%s'; nothing deleted"), infile);
output_dirfile (opened_dirfilename, dir_nlines, dir_lines, n_entries_to_add,
- entries_to_add, input_sections, compression_program);
+ entries_to_add, input_sections, NULL);
xexit (0);
}