]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge branch 'thirteen' of git.ipfire.org:/pub/git/ipfire-2.x into thirteen
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 31 Aug 2012 16:24:16 +0000 (12:24 -0400)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 31 Aug 2012 16:24:16 +0000 (12:24 -0400)
13 files changed:
config/qos/makeqosscripts.pl
config/rootfiles/common/dejavu-fonts-ttf [new file with mode: 0644]
config/rootfiles/common/texinfo
config/rootfiles/common/zlib
html/cgi-bin/qos.cgi
lfs/dejavu-fonts-ttf [new file with mode: 0644]
lfs/texinfo
make.sh
src/install+setup/install/main.c
src/install+setup/install/mountdest.sh
src/patches/texinfo-4.8-multibyte-1.patch [deleted file]
src/patches/texinfo-4.8-tempfile_fix-2.patch [deleted file]
src/scripts/readhash

index 0b97b85a6c18db626f76997d89ca5ebab6be593e..122e6b97e031e800769fb7ba163eafbe0c65fd09 100644 (file)
@@ -76,6 +76,7 @@ $qossettings{'IMQ_DEV'} = 'imq0';
 $qossettings{'TOS'} = '';
 $qossettings{'VALID'} = 'yes';
 $qossettings{'IMQ_MODE'} = 'PREROUTING';
+$qossettings{'QLENGTH'} = '1000';
 
 &General::readhash("${General::swroot}/qos/settings", \%qossettings);
 
@@ -480,7 +481,7 @@ foreach $classentry (sort @classes)
        if ($qossettings{'IMQ_DEV'} eq $classline[0]) {
                $qossettings{'DEVICE'} = $classline[0];
                $qossettings{'CLASS'} = $classline[1];
-               print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: sfq perturb $qossettings{'SFQ_PERTUB'}\n";
+               print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: fq_codel\n";
        }
 }
 foreach $subclassentry (sort @subclasses) {
@@ -488,7 +489,7 @@ foreach $subclassentry (sort @subclasses) {
        if ($qossettings{'IMQ_DEV'} eq $subclassline[0]) {
                $qossettings{'DEVICE'} = $subclassline[0];
                $qossettings{'SCLASS'} = $subclassline[2];
-               print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: sfq perturb $qossettings{'SFQ_PERTUB'}\n";
+               print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel\n";
        }
 }
 print "\n\t### FILTER TRAFFIC INTO CLASSES\n";
diff --git a/config/rootfiles/common/dejavu-fonts-ttf b/config/rootfiles/common/dejavu-fonts-ttf
new file mode 100644 (file)
index 0000000..a130284
--- /dev/null
@@ -0,0 +1,21 @@
+usr/share/fonts/DejaVuSans-Bold.ttf
+usr/share/fonts/DejaVuSans-BoldOblique.ttf
+usr/share/fonts/DejaVuSans-ExtraLight.ttf
+usr/share/fonts/DejaVuSans-Oblique.ttf
+usr/share/fonts/DejaVuSans.ttf
+#usr/share/fonts/DejaVuSansCondensed-Bold.ttf
+#usr/share/fonts/DejaVuSansCondensed-BoldOblique.ttf
+#usr/share/fonts/DejaVuSansCondensed-Oblique.ttf
+#usr/share/fonts/DejaVuSansCondensed.ttf
+#usr/share/fonts/DejaVuSansMono-Bold.ttf
+#usr/share/fonts/DejaVuSansMono-BoldOblique.ttf
+#usr/share/fonts/DejaVuSansMono-Oblique.ttf
+#usr/share/fonts/DejaVuSansMono.ttf
+#usr/share/fonts/DejaVuSerif-Bold.ttf
+#usr/share/fonts/DejaVuSerif-BoldItalic.ttf
+#usr/share/fonts/DejaVuSerif-Italic.ttf
+#usr/share/fonts/DejaVuSerif.ttf
+#usr/share/fonts/DejaVuSerifCondensed-Bold.ttf
+#usr/share/fonts/DejaVuSerifCondensed-BoldItalic.ttf
+#usr/share/fonts/DejaVuSerifCondensed-Italic.ttf
+#usr/share/fonts/DejaVuSerifCondensed.ttf
index e7de4b7a91f700d03ef8cf3d1f10a4996fb45363..00e9aedf8ba17b7ec89153a22905c6b058c761f0 100644 (file)
@@ -2,23 +2,26 @@
 #usr/bin/infokey
 #usr/bin/install-info
 #usr/bin/makeinfo
+#usr/bin/pdftexi2dvi
 #usr/bin/texi2dvi
 #usr/bin/texi2pdf
 #usr/bin/texindex
-#usr/info/info-stnd.info
-#usr/info/info.info
-#usr/info/texinfo
-#usr/info/texinfo-1
-#usr/info/texinfo-2
-#usr/info/texinfo-3
-#usr/man/man1/info.1
-#usr/man/man1/infokey.1
-#usr/man/man1/install-info.1
-#usr/man/man1/makeinfo.1
-#usr/man/man1/texi2dvi.1
-#usr/man/man1/texindex.1
-#usr/man/man5/info.5
-#usr/man/man5/texinfo.5
+#usr/share/info/info-stnd.info
+#usr/share/info/info.info
+#usr/share/info/texinfo
+#usr/share/info/texinfo-1
+#usr/share/info/texinfo-2
+#usr/share/info/texinfo-3
+#usr/share/man/man1/info.1
+#usr/share/man/man1/infokey.1
+#usr/share/man/man1/install-info.1
+#usr/share/man/man1/makeinfo.1
+#usr/share/man/man1/pdftexi2dvi.1
+#usr/share/man/man1/texi2dvi.1
+#usr/share/man/man1/texi2pdf.1
+#usr/share/man/man1/texindex.1
+#usr/share/man/man5/info.5
+#usr/share/man/man5/texinfo.5
 #usr/share/texinfo
 #usr/share/texinfo/texinfo.cat
 #usr/share/texinfo/texinfo.dtd
index 78620f4c6366c4111f64d334e01aadbb369ca460..8c4684360c4e85b8efc7de71bf37002f609195f8 100644 (file)
@@ -3,7 +3,7 @@ lib/libz.so.1.2.7
 #usr/include/zconf.h
 #usr/include/zlib.h
 #usr/lib/libz.a
-#usr/lib/libz.so
+usr/lib/libz.so
 #usr/lib/pkgconfig
 #usr/lib/pkgconfig/zlib.pc
 #usr/share/man/man3/zlib.3
index 844058de3276cf249dde5669ce9603576b326f14..300e6ae4515604170898a717bcadb37fa27c31ac 100644 (file)
@@ -74,8 +74,7 @@ $qossettings{'DEFCLASS_INC'} = '';
 $qossettings{'DEFCLASS_OUT'} = '';
 $qossettings{'ACK'} = '';
 $qossettings{'MTU'} = '1492';
-$qossettings{'SFQ_PERTUB'} = '10';
-$qossettings{'QLENGTH'} = '30';
+$qossettings{'QLENGTH'} = '1000';
 $qossettings{'RED_DEV'} = 'ppp0';
 $qossettings{'IMQ_DEV'} = 'imq0';
 $qossettings{'VALID'} = 'yes';
@@ -1448,9 +1447,6 @@ sub expert
                    <td width='33%' align='center'>$Lang::tr{'mtu QoS'}
                <tr><td width='33%' align='right'>$Lang::tr{'Queuelenght'}:<td width='33%' align='left'>
                        <input type='text' name='QLENGTH' maxlength='8' required='2' value='$qossettings{'QLENGTH'}' />
-                   <td width='33%' align='center'>&nbsp;
-               <tr><td width='33%' align='right'>SFQ Perturb:<td width='33%' align='left'>
-                       <input type='text' name='SFQ_PERTUB' maxlength='8' required='1' value='$qossettings{'SFQ_PERTUB'}' />
                    <td width='33%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' />
                </table>
                </form>
diff --git a/lfs/dejavu-fonts-ttf b/lfs/dejavu-fonts-ttf
new file mode 100644 (file)
index 0000000..cd31a2d
--- /dev/null
@@ -0,0 +1,77 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# 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        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU 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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+
+VER        = 2.33
+
+THISAPP    = dejavu-fonts-ttf-$(VER)
+DL_FILE    = $(THISAPP).tar.bz2
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 8b601e91725b6d69141b0fcf527948c0
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       mkdir -pv /usr/share/fonts
+       install -m 644 $(DIR_APP)/ttf/* /usr/share/fonts
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
index 0ead581c79287ff4d02cac360266a5487c45f92b..4ac591ed1b577dd850fd40893583f24209bf4205 100644 (file)
 
 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/make.sh b/make.sh
index 98686b010b810334927c19acacecaf04a04ddd56..f2dfbab3ad45731e2cc88d3c122946d22513f34f 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -577,6 +577,7 @@ buildipfire() {
   ipfiremake ntp
   ipfiremake openssh
   ipfiremake fontconfig
+  ipfiremake dejavu-fonts-ttf
   ipfiremake freefont
   ipfiremake pixman
   ipfiremake cairo
index e1b916149813eb88a4bfc2eaaf1faaf470f3dfaf..ea47593cd30e36a8f6baa75a6221ba32de1667b6 100644 (file)
@@ -14,6 +14,7 @@
  
 #define INST_FILECOUNT 10700
 #define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
+#define LICENSE_FILE   "/cdrom/COPYING"
 
 #define EXT2 0
 #define EXT3 1
@@ -120,16 +121,6 @@ int main(int argc, char *argv[])
                }
        }
 
-       // Read gpl ...
-       if (! (copying = fopen("/COPYING", "r")))
-       {
-               fprintf(flog,      "Couldn't open gpl (/COPYING)\n");
-               sprintf(discl_msg, "Couldn't open gpl (/COPYING)\n");
-       } else {
-               fread(discl_msg, 1, 40000, copying);
-               fclose(copying);
-       }
-
        // Load common modules
        mysystem("/sbin/modprobe iso9660"); // CDROM
 //     mysystem("/sbin/modprobe ext2"); // Boot patition
@@ -157,11 +148,6 @@ int main(int argc, char *argv[])
        if (!unattended) {
                sprintf(message, ctr[TR_WELCOME], NAME);
                newtWinMessage(title, ctr[TR_OK], message);
-
-               if (disclaimerbox(discl_msg)==0) {
-                       errorbox(ctr[TR_LICENSE_NOT_ACCEPTED]);
-                       goto EXIT;
-               }
        }
 
        mysystem("/bin/mountsource.sh");
@@ -178,7 +164,23 @@ int main(int argc, char *argv[])
        fgets(sourcedrive, 5, handle);
        fprintf(flog, "Source drive: %s\n", sourcedrive);
        fclose(handle);
-       
+
+       if (!unattended) {
+               // Read the license file.
+               if (!(copying = fopen(LICENSE_FILE, "r"))) {
+                       sprintf(discl_msg, "Could not open license file: %s\n", LICENSE_FILE);
+                       fprintf(flog, discl_msg);
+               } else {
+                       fread(discl_msg, 1, 40000, copying);
+                       fclose(copying);
+
+                       if (disclaimerbox(discl_msg)==0) {
+                               errorbox(ctr[TR_LICENSE_NOT_ACCEPTED]);
+                               goto EXIT;
+                       }
+               }
+       }
+
        i = 0;
        while (found == 0) {
                i++;
index 42e2c76640000c434a2cb47b1ca1098eeb468572..8e2b600ccc5803e4830a37245c0836f797e80975 100644 (file)
@@ -1,4 +1,3 @@
-#!/bin/sh
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
 
 echo "Scanning for possible destination drives"
 
-# scan sd?
-echo "--> sd?"
-for DEVICE in `find /sys/block/* -maxdepth 0 -name sd* -or -name vd* -exec basename {} \; | sort | uniq`
-do
-               if [ "$(grep ${DEVICE} /proc/partitions)" = "" ]; then
-                       umount /harddisk 2> /dev/null
-                       echo "${DEVICE} is empty - SKIP"
-                       continue
-               fi
-               mount /dev/${DEVICE} /harddisk 2> /dev/null
+function _mount() {
+       local what=${1}
+
+       # Don't mount if the device does not exist.
+       [ -e "${what}" ] || return 1
+
+       mount ${what} /harddisk 2>/dev/null
+}
+
+function _umount() {
+       umount -l /harddisk 2>/dev/null
+}
+
+function check_source_drive() {
+       local device="/dev/${1}"
+
+       local ret=1
+       local dev
+       for dev in ${device} ${device}1; do
+               # Mount the device (if possible).
+               _mount ${dev} || continue
+
                if [ -n "$(ls /harddisk/ipfire-*.tlz 2>/dev/null)" ]; then
-                       umount /harddisk 2> /dev/null
-                       echo "${DEVICE} is source drive - SKIP"
-                       continue
-               else
-                       umount /harddisk 2> /dev/null
-                       mount /dev/${DEVICE}1 /harddisk 2> /dev/null
-                       if [ -n "$(ls /harddisk/ipfire-*.tlz 2>/dev/null)" ]; then
-                               umount /harddisk 2> /dev/null
-                               echo "${DEVICE}1 is source drive - SKIP"
-                               continue
-                       else
-                               umount /harddisk 2> /dev/null
-                               echo -n "$DEVICE" > /tmp/dest_device
-                               echo "${DEVICE} - yes, it is our destination"
-                               exit 1 # (always use /dev/sda as bootdevicename)
-                       fi
+                       ret=0
                fi
-done
 
-# scan other
-echo "--> other"
-for DEVICE in `find /sys/block/* -maxdepth 0 ! -name sd* ! -name sr* ! -name fd* ! -name loop* ! -name ram* -exec basename {} \; | sort | uniq`
-do
-               mount /dev/${DEVICE}p1 /harddisk 2> /dev/null
-               if [ -n "$(ls /harddisk/ipfire-*.tlz 2>/dev/null)" ]; then
-                       umount /harddisk 2> /dev/null
-                       echo "${DEVICE}p1 is source drive - SKIP"
+               _umount
+
+               # Stop if the device has been detected as a source drive.
+               [ "${ret}" = "0" ] && break
+       done
+
+       return ${ret}
+}
+
+for path in /sys/block/*; do
+       device=$(basename ${path})
+
+       # Skip devices which cannot be used.
+       case "${device}" in
+               # Virtual devices.
+               loop*|ram*)
                        continue
-               else
-                       umount /harddisk 2> /dev/null
-                       if [ "$(grep ${DEVICE} /proc/partitions)" = "" ]; then
-                               umount /harddisk 2> /dev/null
-                               echo "${DEVICE} is empty - SKIP"
-                               continue
-                       fi
-                       mount /dev/${DEVICE}1 /harddisk 2> /dev/null
-                       if [ -n "$(ls /harddisk/ipfire-*.tlz 2>/dev/null)" ]; then
-                               umount /harddisk 2> /dev/null
-                               echo "${DEVICE}1 is source drive - SKIP"
-                               continue
-                       else
-                               umount /harddisk 2> /dev/null
-                               mount /dev/${DEVICE} /harddisk 2> /dev/null
-                               if [ -n "$(ls /harddisk/ipfire-*.tlz 2>/dev/null)" ]; then
-                                       umount /harddisk 2> /dev/null
-                                       echo "${DEVICE} is source drive - SKIP"
-                                       continue
-                               else
-                                       echo -n "$DEVICE" > /tmp/dest_device
-                                       echo "${DEVICE} - yes, it is our destination"
-                                       exit 2 # Raid ( /dev/device/diskx )
-                               fi
-                       fi
+                       ;;
+               # Floppy.
+               fd*)
+                       continue
+                       ;;
+       esac
+
+       # Guess if this could be a raid device.
+       for dev in ${device} ${device}p1; do
+               if [ -e "/dev/${dev}" ]; then
+                       device=${dev}
+                       break
                fi
+       done
+
+       echo "Checking ${device}"
+       if check_source_drive ${device}; then
+               echo "  is source drive - skipping"
+               continue
+       fi
+
+       # Found it.
+       echo "  OK, this is it..."
+       echo -n "${device}" > /tmp/dest_device
+
+       # Exit code table:
+       #  1: sda
+       #  2: RAID
+       # 10: nothing found
+       case "${device}" in
+               *p1)
+                       exit 2
+                       ;;
+               *)
+                       exit 1
+                       ;;
+       esac
 done
 
-exit 10 # Nothing found
+# Nothing found.
+exit 10
diff --git a/src/patches/texinfo-4.8-multibyte-1.patch b/src/patches/texinfo-4.8-multibyte-1.patch
deleted file mode 100644 (file)
index 4676a79..0000000
+++ /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 (file)
index 0d0b594..0000000
+++ /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;
- }
-
index 8c187d51d1bdb7a3a6d282d754ea63a9a62ba35c..cc063a7a2b2ddc3a11af741d6bec4a3042c68957 100644 (file)
@@ -9,7 +9,7 @@
 
 # shell variables must consist of alphanumeric characters and underscores,
 # and begin with an alphabetic character or underscore.
-VARNAME='[A-Za-z_][A-zA-z0-9_]*'
+VARNAME='[A-Za-z_][A-Za-z0-9_]*'
 
 # For the assigned value we only accept a limited number of characters - none
 # of which are shell metachars