From 1f2bd1a2b4317262207afd675fd6f0084cf3d651 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 28 Aug 2012 19:21:54 +0200 Subject: [PATCH] texinfo: Update to 4.13a. --- lfs/texinfo | 14 ++-- src/patches/texinfo-4.8-multibyte-1.patch | 44 ----------- src/patches/texinfo-4.8-tempfile_fix-2.patch | 80 -------------------- 3 files changed, 5 insertions(+), 133 deletions(-) delete mode 100644 src/patches/texinfo-4.8-multibyte-1.patch delete mode 100644 src/patches/texinfo-4.8-tempfile_fix-2.patch diff --git a/lfs/texinfo b/lfs/texinfo index 0ead581c79..4ac591ed1b 100644 --- a/lfs/texinfo +++ b/lfs/texinfo @@ -24,12 +24,12 @@ include Config -VER = 4.8 +VER = 4.13a THISAPP = texinfo-$(VER) -DL_FILE = $(THISAPP).tar.bz2 +DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) -DIR_APP = $(DIR_SRC)/$(THISAPP) +DIR_APP = $(DIR_SRC)/texinfo-4.13 # Normal build or /tools build. # @@ -53,7 +53,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 6ba369bbfe4afaa56122e65b3ee3a68c +$(DL_FILE)_MD5 = 71ba711519209b5fb583fed2b3d86fcb install : $(TARGET) @@ -82,11 +82,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) -ifeq "$(ROOT)" "" - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-multibyte-1.patch - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-tempfile_fix-2.patch -endif + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && ./configure $(EXTRA_CONFIG) cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP) && make $(EXTRA_INSTALL) install diff --git a/src/patches/texinfo-4.8-multibyte-1.patch b/src/patches/texinfo-4.8-multibyte-1.patch deleted file mode 100644 index 4676a792bc..0000000000 --- a/src/patches/texinfo-4.8-multibyte-1.patch +++ /dev/null @@ -1,44 +0,0 @@ -Submitted By: Alexander E. Patrakov -Date: 2005-07-12 -Initial Package Version: 4.8 -Upstream Status: Hack, won't submit -Origin: Alexander E. Patrakov -Description: Info assumes that a string width in character cells is the -same as its length in bytes. This patch avoids cases when this assumption -is not true. - -diff -ur texinfo-4.8/info/info.c texinfo-4.8.hacked/info/info.c ---- texinfo-4.8/info/info.c 2004-04-11 23:56:45.000000000 +0600 -+++ texinfo-4.8.hacked/info/info.c 2005-07-12 12:11:34.852485776 +0600 -@@ -154,6 +154,10 @@ - #ifdef HAVE_SETLOCALE - /* Set locale via LC_ALL. */ - setlocale (LC_ALL, ""); -+ /* But don't use translated messages in the case when -+ string width and length can differ */ -+ if (MB_CUR_MAX > 1) -+ setlocale(LC_MESSAGES, "C"); - #endif - - #ifdef ENABLE_NLS -diff -ur texinfo-4.8/info/man.c texinfo-4.8.hacked/info/man.c ---- texinfo-4.8/info/man.c 2004-04-11 23:56:46.000000000 +0600 -+++ texinfo-4.8.hacked/info/man.c 2005-07-12 12:08:40.267026800 +0600 -@@ -325,6 +325,17 @@ - freopen (NULL_DEVICE, "r", stdin); - dup2 (pipes[1], fileno (stdout)); - -+ if (MB_CUR_MAX > 1) -+ { -+ /* Info has trouble wrapping man output if it contains -+ multibyte characters */ -+ setenv("LANGUAGE", "C", 1); -+ setenv("LANG", "C", 1); -+ setenv("LC_MESSAGES", "C", 1); -+ setenv("LC_CTYPE", "C", 1); -+ setenv("LC_ALL", "C", 1); -+ } -+ - execv (formatter_args[0], formatter_args); - - /* If we get here, we couldn't exec, so close out the pipe and diff --git a/src/patches/texinfo-4.8-tempfile_fix-2.patch b/src/patches/texinfo-4.8-tempfile_fix-2.patch deleted file mode 100644 index 0d0b59424d..0000000000 --- a/src/patches/texinfo-4.8-tempfile_fix-2.patch +++ /dev/null @@ -1,80 +0,0 @@ -Updated By: Bruce Dubbs (bdubbs -aT- linuxfromscratch -DoT- org) -Date: 2005-12-12 -Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org) -Date: 2005-10-08 -Initial Package Version: 4.8 -Origin: http://gentoo.kems.net/gentoo-portage/sys-apps/texinfo/files/texinfo-4.8-tempfile.patch -Upstream Status: A few patches are floating around in Debian BZ #328365 of which - upstream hasn't made a full commitment on yet. -Description: (CAN-2005-3011) texindex in texinfo 4.8 and earlier allows local - users to overwrite arbitrary files via a symlink attack on - temporary files. -Update: Changed to not pass a constant string to mktemp(). - -diff -Naur texinfo-4.8.orig/util/texindex.c texinfo-4.8/util/texindex.c ---- texinfo-4.8.orig/util/texindex.c 2005-12-11 23:29:08.000000000 -0600 -+++ texinfo-4.8/util/texindex.c 2005-12-11 23:33:31.000000000 -0600 -@@ -99,6 +99,9 @@ - /* 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; - -@@ -153,6 +156,7 @@ - main (int argc, char **argv) - { - int i; -+ char template[]="txidxXXXXXX"; - - tempcount = 0; - last_deleted_tempcount = 0; -@@ -190,6 +194,11 @@ - - 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 (template); -+ - /* Process input files completely, one by one. */ - - for (i = 0; i < num_infiles; i++) -@@ -389,21 +398,21 @@ - static char * - maketempname (int count) - { -- static char *tempbase = NULL; - 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; - - 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); -+ if (fd == -1) -+ pfatal_with_name (name); -+ -+ close(fd); -+ return name; - } - - -- 2.39.5