summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-10-08 17:24:42 +0000
committerMike Frysinger <vapier@gentoo.org>2005-10-08 17:24:42 +0000
commitc6c26d72afbd536a4c6a1d7517b284763a154dcb (patch)
tree2f63dd74b1e59868a58f73328586255bd2c0b75a /sys-apps/texinfo
parentNew version. (diff)
downloadgentoo-2-c6c26d72afbd536a4c6a1d7517b284763a154dcb.tar.gz
gentoo-2-c6c26d72afbd536a4c6a1d7517b284763a154dcb.tar.bz2
gentoo-2-c6c26d72afbd536a4c6a1d7517b284763a154dcb.zip
Fix segfault in previous tempfile fix #108416.
(Portage version: 2.0.53_rc4)
Diffstat (limited to 'sys-apps/texinfo')
-rw-r--r--sys-apps/texinfo/ChangeLog31
-rw-r--r--sys-apps/texinfo/files/digest-texinfo-4.8-r21
-rw-r--r--sys-apps/texinfo/files/texinfo-4.8-tempfile.patch64
-rw-r--r--sys-apps/texinfo/texinfo-4.8-r2.ebuild69
4 files changed, 94 insertions, 71 deletions
diff --git a/sys-apps/texinfo/ChangeLog b/sys-apps/texinfo/ChangeLog
index cb9f6d03259f..9c087450f8dc 100644
--- a/sys-apps/texinfo/ChangeLog
+++ b/sys-apps/texinfo/ChangeLog
@@ -1,33 +1,12 @@
# ChangeLog for sys-apps/texinfo
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/ChangeLog,v 1.67 2005/10/02 00:30:05 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/ChangeLog,v 1.68 2005/10/08 17:24:42 vapier Exp $
- 02 Oct 2005; Bryan Østergaard <kloeri@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on ia64, bug 106105.
+*texinfo-4.8-r2 (08 Oct 2005)
- 30 Sep 2005; MATSUU Takuto <matsuu@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on sh wrt #106105.
-
- 30 Sep 2005; Simon Stelling <blubb@gentoo.org> texinfo-4.8-r1.ebuild:
- stable on amd64 wrt bug 106105
-
- 30 Sep 2005; Markus Rothe <corsair@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on ppc64 (bug #106105)
-
- 29 Sep 2005; Gustavo Zacarias <gustavoz@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on sparc wrt #106105
-
- 29 Sep 2005; Aaron Walker <ka0ttic@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on mips for bug #106105.
-
- 29 Sep 2005; Andrej Kacian <ticho@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on x86, security bug #106105.
-
- 29 Sep 2005; Michael Hanselmann <hansmi@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on hppa, ppc.
-
- 29 Sep 2005; Fernando J. Pereda <ferdy@gentoo.org> texinfo-4.8-r1.ebuild:
- Stable on alpha wrt bug #106105
+ 08 Oct 2005; Mike Frysinger <vapier@gentoo.org>
+ files/texinfo-4.8-tempfile.patch, +texinfo-4.8-r2.ebuild:
+ Fix segfault in previous tempfile fix #108416.
*texinfo-4.8-r1 (29 Sep 2005)
diff --git a/sys-apps/texinfo/files/digest-texinfo-4.8-r2 b/sys-apps/texinfo/files/digest-texinfo-4.8-r2
new file mode 100644
index 000000000000..89aa6b29dbe2
--- /dev/null
+++ b/sys-apps/texinfo/files/digest-texinfo-4.8-r2
@@ -0,0 +1 @@
+MD5 6ba369bbfe4afaa56122e65b3ee3a68c texinfo-4.8.tar.bz2 1521822
diff --git a/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch b/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch
index c3c9e93d7a5e..95a8c3f19142 100644
--- a/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch
+++ b/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch
@@ -1,60 +1,34 @@
+Patch based off code from: Martin Pitt <martin.pitt at ubuntu.com>
+
http://bugs.gentoo.org/106105
--- util/texindex.c
+++ util/texindex.c
-@@ -99,6 +99,9 @@ long nlines;
- /* Directory to use for temporary files. On Unix, it ends with a slash. */
- char *tempdir;
-
-+/* Basename for temp files inside of tempdir. */
-+char *tempbase;
-+
- /* Number of last temporary file. */
- int tempcount;
-
-@@ -190,6 +193,11 @@ main (int argc, char **argv)
-
- decode_command (argc, argv);
-
-+ /* XXX mkstemp not appropriate, as we need to have somewhat predictable
-+ * names. But race condition was fixed, see maketempname.
-+ */
-+ tempbase = mktemp ("txidxXXXXXX");
-+
- /* Process input files completely, one by one. */
-
- for (i = 0; i < num_infiles; i++)
-@@ -392,21 +400,21 @@ For more information about these matters
- static char *
+@@ -390,11 +390,12 @@
maketempname (int count)
{
-- static char *tempbase = NULL;
+ static char *tempbase = NULL;
++ char *tempname;
char tempsuffix[10];
--
-- if (!tempbase)
-- {
-- int fd;
-- tempbase = concat (tempdir, "txidxXXXXXX");
--
-- fd = mkstemp (tempbase);
-- if (fd == -1)
-- pfatal_with_name (tempbase);
-- }
-+ char *name, *tmp_name;
+ int fd;
+ if (!tempbase)
+ {
+- int fd;
+ tempbase = concat (tempdir, "txidxXXXXXX");
+
+ fd = mkstemp (tempbase);
+@@ -403,7 +404,12 @@
+ }
+
sprintf (tempsuffix, ".%d", count);
- return concat (tempbase, tempsuffix);
-+ tmp_name = concat (tempdir, tempbase);
-+ name = concat (tmp_name, tempsuffix);
-+ free(tmp_name);
-+
-+ fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0600);
++ tempname = concat (tempbase, tempsuffix);
++ fd = open (tempname, O_CREAT|O_EXCL|O_WRONLY, 0600);
+ if (fd == -1)
-+ pfatal_with_name (name);
-+
-+ close(fd);
-+ return name;
++ pfatal_with_name (tempname);
++ close (fd);
++ return tempname;
}
diff --git a/sys-apps/texinfo/texinfo-4.8-r2.ebuild b/sys-apps/texinfo/texinfo-4.8-r2.ebuild
new file mode 100644
index 000000000000..6807160d3d28
--- /dev/null
+++ b/sys-apps/texinfo/texinfo-4.8-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/texinfo-4.8-r2.ebuild,v 1.1 2005/10/08 17:24:42 vapier Exp $
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="The GNU info program and utilities"
+HOMEPAGE="http://www.gnu.org/software/texinfo/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86"
+IUSE="nls build static"
+
+RDEPEND="!build? ( >=sys-libs/ncurses-5.2-r2 )"
+DEPEND="${RDEPEND}
+ !build? ( nls? ( sys-devel/gettext ) )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-freebsd.patch
+ epatch "${FILESDIR}"/${P}-tempfile.patch #106105
+
+ cd doc
+ # Get the texinfo info page to have a proper name of texinfo.info
+ sed -i 's:setfilename texinfo:setfilename texinfo.info:' texinfo.txi
+ sed -i \
+ -e 's:INFO_DEPS = texinfo:INFO_DEPS = texinfo.info:' \
+ -e 's:texinfo\::texinfo.info\::' \
+ Makefile.in
+}
+
+src_compile() {
+ local myconf=
+ if ! use nls || use build ; then
+ myconf="--disable-nls"
+ fi
+ use static && append-ldflags -static
+
+ econf ${myconf} || die
+
+ # work around broken dependency's in info/Makefile.am #85540
+ emake -C lib || die "emake lib"
+ emake -C info makedoc || die "emake makedoc"
+ emake -C info doc.c || die "emake doc.c"
+ emake || die "emake"
+}
+
+src_install() {
+ if use build ; then
+ newbin util/ginstall-info install-info
+ dobin makeinfo/makeinfo util/{texi2dvi,texindex}
+ else
+ make DESTDIR="${D}" install || die "install failed"
+ dosbin ${FILESDIR}/mkinfodir
+ # tetex installs this guy #76812
+ has_version '<app-text/tetex-3' && rm -f "${D}"/usr/bin/texi2pdf
+
+ if [[ ! -f ${D}/usr/share/info/texinfo.info ]] ; then
+ die "Could not install texinfo.info!!!"
+ fi
+
+ dodoc AUTHORS ChangeLog INTRODUCTION NEWS README TODO
+ newdoc info/README README.info
+ newdoc makeinfo/README README.makeinfo
+ fi
+}