Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current/.git;a=commitdiff;h=d10692bf70ba8fbbc93ec060b76da54e858a7ba0
commit d10692bf70ba8fbbc93ec060b76da54e858a7ba0
Author: VMiklos <[EMAIL PROTECTED]>
Date: Wed Aug 8 15:11:11 2007 +0200
texinfo-4.9-1-i686
moved to base
diff --git a/source/apps/texinfo/CVE-2006-4810.patch
b/source/apps/texinfo/CVE-2006-4810.patch
deleted file mode 100644
index f3dcc91..0000000
--- a/source/apps/texinfo/CVE-2006-4810.patch
+++ /dev/null
@@ -1,141 +0,0 @@
---- texinfo-4.7.orig/util/texindex.c
-+++ texinfo-4.7/util/texindex.c
-@@ -99,6 +99,9 @@
- /* Directory to use for temporary files. On Unix, it ends with a slash. */
- char *tempdir;
-
-+/* Start of filename to use for temporary files. */
-+char *tempbase;
-+
- /* Number of last temporary file. */
- int tempcount;
-
-@@ -144,7 +147,7 @@
- void fatal (const char *format, const char *arg);
- void error (const char *format, const char *arg);
- void *xmalloc (), *xrealloc ();
--char *concat (char *s1, char *s2);
-+static char *concat3 (const char *, const char *, const char *);
- void flush_tempfiles (int to_count);
-
- #define MAX_IN_CORE_SORT 500000
-@@ -190,6 +193,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 (concat3 ("txiXXXXXX", "", ""));
-+
- /* Process input files completely, one by one. */
-
- for (i = 0; i < num_infiles; i++)
-@@ -220,7 +228,7 @@
-
- outfile = outfiles[i];
- if (!outfile)
-- outfile = concat (infiles[i], "s");
-+ outfile = concat3 (infiles[i], "s", "");
-
- need_initials = 0;
- first_initial = '\0';
-@@ -318,7 +326,7 @@
- if (tempdir == NULL)
- tempdir = DEFAULT_TMPDIR;
- else
-- tempdir = concat (tempdir, "/");
-+ tempdir = concat3 (tempdir, "/", "");
-
- keep_tempfiles = 0;
-
-@@ -384,26 +392,25 @@
- usage (1);
- }
-
--/* Return a name for temporary file COUNT. */
-+/* Return a name for temporary file COUNT, or NULL if failure. */
-
- static char *
- maketempname (int count)
- {
-- static char *tempbase = NULL;
- char tempsuffix[10];
-+ char *name;
-+ int fd;
-
-- if (!tempbase)
-+ sprintf (tempsuffix, ".%d", count);
-+ name = concat3 (tempdir, tempbase, tempsuffix);
-+ fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0600);
-+ if (fd == -1)
-+ return NULL;
-+ else
- {
-- int fd;
-- tempbase = concat (tempdir, "txidxXXXXXX");
--
-- fd = mkstemp (tempbase);
-- if (fd == -1)
-- pfatal_with_name (tempbase);
-+ close(fd);
-+ return(name);
- }
--
-- sprintf (tempsuffix, ".%d", count);
-- return concat (tempbase, tempsuffix);
- }
-
-
-@@ -837,7 +844,7 @@
- {
- buffer = (char *) xrealloc (buffer, linebuffer->size *= 2);
- p += buffer - linebuffer->buffer;
-- end += buffer - linebuffer->buffer;
-+ end = buffer + linebuffer->size;
- linebuffer->buffer = buffer;
- }
- if (c < 0 || c == '\n')
-@@ -931,6 +938,8 @@
- for (i = 0; i < ntemps; i++)
- {
- char *newtemp = maketempname (++tempcount);
-+ if (!newtemp)
-+ pfatal_with_name("temp file");
- sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
- if (!keep_tempfiles)
- unlink (tempfiles[i]);
-@@ -1401,6 +1410,8 @@
- if (i + 1 == ntemps)
- nf = nfiles - i * MAX_DIRECT_MERGE;
- tempfiles[i] = maketempname (++tempcount);
-+ if (!tempfiles[i])
-+ pfatal_with_name("temp file");
- value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf,
tempfiles[i]);
- }
-
-@@ -1612,17 +1623,18 @@
- }
-
-
--/* Return a newly-allocated string concatenating S1 and S2. */
-+/* Return a newly-allocated string concatenating S1, S2, and S3. */
-
--char *
--concat (char *s1, char *s2)
-+static char *
-+concat3 (const char *s1, const char *s2, const char *s3)
- {
-- int len1 = strlen (s1), len2 = strlen (s2);
-- char *result = (char *) xmalloc (len1 + len2 + 1);
-+ int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
-+ char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
-
- strcpy (result, s1);
- strcpy (result + len1, s2);
-- *(result + len1 + len2) = 0;
-+ strcpy (result + len1 + len2, s3);
-+ *(result + len1 + len2 + len3) = 0;
-
- return result;
- }
diff --git a/source/apps/texinfo/FrugalBuild b/source/apps/texinfo/FrugalBuild
deleted file mode 100644
index eba7526..0000000
--- a/source/apps/texinfo/FrugalBuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Compiling time: 0.17 SBU
-# Maintainer: crazy <[EMAIL PROTECTED]>
-# Contributor: Laszlo Dvornik <[EMAIL PROTECTED]>
-
-pkgname=texinfo
-pkgver=4.9
-pkgrel=1
-pkgdesc="The GNU info program and utilities"
-url="http://www.gnu.org/software/texinfo/"
-depends=('ncurses' 'net-tools' 'grep' 'sed' 'udev' 'gawk')
-rodepends=('shadow')
-makedepends=('bison')
-groups=('apps' 'chroot-core')
-archs=('i686' 'x86_64')
-options=('force')
-up2date="lynx -dump 'http://ftp.gnu.org/gnu/texinfo/?M=D'|grep tar.bz2|sed -n
's/.*-\(.*\).t.*/\1/;1 p'"
-source=(http://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.bz2 mkinfodir
CVE-2006-4810.patch)
-sha1sums=('19a0cc0b56cbfcfe610925bef31e0bdf749492c9' \
- 'd744345f082e32af0675a0b9d3287c6b8d4600a7' \
- '8ab71e415364ca70dbc3ea1d028b1989860c9d8f')
-
-
-build()
-{
- Fbuild
- Fexe /usr/bin/mkinfodir
-}
-
-# optimization ok
diff --git a/source/apps/texinfo/mkinfodir b/source/apps/texinfo/mkinfodir
deleted file mode 100644
index 6eb0437..0000000
--- a/source/apps/texinfo/mkinfodir
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/bash
-# $Id: mkinfodir,v 1.1 2000/08/03 16:16:11 achim Exp $
-# Generate the top-level Info node, given a directory of Info files
-# and (optionally) a skeleton file. The output will be suitable for a
-# top-level dir file. The skeleton file contains info topic names in the
-# order they should appear in the output. There are three special
-# lines that alter the behavior: a line consisting of just "--" causes
-# the next line to be echoed verbatim to the output. A line
-# containing just "%%" causes all the remaining filenames (wildcards
-# allowed) in the rest of the file to be ignored. A line containing
-# just "!!" exits the script when reached (unless preceded by a line
-# containing just "--"). Once the script reaches the end of the
-# skeleton file, it goes through the remaining files in the directory
-# in order, putting their entries at the end. The script will use the
-# ENTRY information in each info file if it exists. Otherwise it will
-# make a minimal entry.
-
-# sent by Jeffrey Osier <[EMAIL PROTECTED]>, who thinks it came from
-# [EMAIL PROTECTED] (david d `zoo' zuhn)
-
-# modified 7 April 1995 by Joe Harrington <[EMAIL PROTECTED]> to
-# take special flags
-
-INFODIR=$1
-if [ $# = 2 ] ; then
- SKELETON=$2
-else
- SKELETON=/dev/null
-fi
-
-skip=
-
-if [ $# -gt 2 ] ; then
- echo usage: $0 info-directory [ skeleton-file ] 1>&2
- exit 1
-elif [ -z "${INFODIR}" ] ; then
- INFODIR="%%DEFAULT_INFO_DIR%%"
-else
- true
-fi
-
-if [ ! -d ${INFODIR} ] ; then
- echo "$0: first argument must specify a directory"
- exit 1
-fi
-
-### output the dir header
-echo "-*- Text -*-"
-echo "This file was generated automatically by $0."
-echo "This version was generated on `date`"
-echo "by [EMAIL PROTECTED] for `(cd ${INFODIR}; pwd)`"
-
-cat << moobler
-\$Id: mkinfodir,v 1.1 2000/08/03 16:16:11 achim Exp $
-This is the file .../info/dir, which contains the topmost node of the
-Info hierarchy. The first time you invoke Info you start off
-looking at that node, which is (dir)Top.
-
-File: dir Node: Top This is the top of the INFO tree
-
- This (the Directory node) gives a menu of major topics.
- Typing "q" exits, "?" lists all Info commands, "d" returns here,
- "h" gives a primer for first-timers,
- "mEmacs<Return>" visits the Emacs topic, 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.
-
-moobler
-
-### go through the list of files in the skeleton. If an info file
-### exists, grab the ENTRY information from it. If an entry exists
-### use it, otherwise create a minimal dir entry.
-###
-### Then remove that file from the list of existing files. If any
-### additional files remain (ones that don't have a skeleton entry),
-### then generate entries for those in the same way, putting the info for
-### those at the end....
-
-infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v
'\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')`
-
-# echoing gets clobbered by backquotes; we do it the hard way...
-lines=`wc $SKELETON | awk '{print $1}'`
-line=1
-while [ $lines -ge $line ] ; do
- # Read one line from the file. This is so that we can echo lines with
- # whitespace and quoted characters in them.
- fileline=`awk NR==$line $SKELETON`
-
- # flag fancy features
- if [ ! -z "$echoline" ] ; then # echo line
- echo "$fileline"
- fileline=
- echoline=
- elif [ "${fileline}" = "--" ] ; then # should we echo the next line?
- echoline=1
- elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir?
- skip=1
- elif [ "${fileline}" = "!!" ] ; then # quit now
- exit 0
- fi
-
- # handle files if they exist
- for file in $fileline"" ; do # expand wildcards ("" handles blank lines)
-
- fname=
-
- if [ -z "$echoline" -a ! -z "$file" ] ; then
-
- # Find the file to operate upon. Check both possible names.
- infoname=`echo $file | sed 's/\.gz$//'`
- infoname=`echo $infoname | sed 's/\.info$//'`
- noext=
- ext=
- if [ -f ${INFODIR}/$infoname ] ; then
- noext=$infoname
- fi
- if [ -f ${INFODIR}/${infoname}.info ] ; then
- ext=${infoname}.info
- fi
- if [ -f ${INFODIR}/${infoname}.info.gz ] ; then
- ext=${infoname}.info.gz
- fi
- # If it exists with both names take what was said in the file.
- if [ ! -z "$ext" -a ! -z "$noext" ]; then
- fname=$file
- warn="### Warning: $ext and $noext both exist! Using ${file}. ###"
- elif [ ! \( -z "$ext" -a -z "$noext" \) ]; then
- # just take the name if it exists only once
- fname=${noext}${ext}
- fi
-
- # if we found something and aren't skipping, do the entry
- if [ ! -z "$fname" ] ; then
- if [ -z "$skip" ] ; then
-
- if [ ! -z "$warn" ] ; then # issue any warning
- echo $warn
- warn=
- fi
- if [ "${fname##*.}" = "gz" ] ; then
- entry=`zcat ${INFODIR}/${fname} | sed -e
'1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' `
- else
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname`
- fi
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- else
- echo "* ${infoname}: (${infoname})."
- fi
- fi
-
- # remove the name from the directory listing
- infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ /
/g"`
-
- fi
-
- fi
-
- done
-
- line=`expr $line + 1`
-done
-
-if [ -z "${infofiles}" ] ; then
- exit 0
-elif [ $lines -gt 0 ]; then
- echo
-fi
-
-# Sort remaining files by INFO-DIR-SECTION.
-prevsect=
-filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \
- fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \
- sort -t: -k2 -k1 | tr ' ' '_')`
-for sectdata in ${filesectdata}; do
- file=`echo ${sectdata} | cut -d: -f1`
- section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file} 2>/dev/null`
- infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"`
-
- if [ "${prevsect}" != "${section}" ] ; then
- if [ ! -z "${prevsect}" ] ; then
- echo ""
- fi
- echo "${section}"
- prevsect="${section}"
- fi
- infoname=`echo $file | sed 's/\.gz$//'`
- infoname=`echo $infoname | sed 's/\.info$//'`
- if [ "${file##*.}" = "gz" ] ; then
- entry=`zcat ${INFODIR}/$file | sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' `
- else
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file 2>/dev/null`
- fi
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- elif [ ! -d "${INFODIR}/${file}" ] ; then
- echo "* ${infoname}: (${infoname})."
- fi
-done
-
-# Process miscellaneous files.
-for file in ${infofiles}; do
- if [ ! -z "${prevsect}" ] ; then
- echo ""
- echo "Miscellaneous"
- prevsect=""
- fi
-
- infoname=`echo $file | sed 's/\.gz$//'`
- infoname=`echo $infoname | sed 's/\.info$//'`
- if [ "${file##*.}" = "gz" ] ; then
- entry=`zcat ${INFODIR}/${file} | sed -e '1,/START-INFO-DIR-ENTRY/d'
\
- -e '/END-INFO-DIR-ENTRY/,$d'`
- else
- entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
- -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file`
- fi
-
-
- if [ ! -z "${entry}" ] ; then
- echo "${entry}"
- elif [ ! -d "${INFODIR}/${file}" ] ; then
- echo "* ${infoname}: (${infoname})."
- fi
-done
-
diff --git a/source/apps/texinfo/texinfo.install
b/source/apps/texinfo/texinfo.install
deleted file mode 100644
index 766019d..0000000
--- a/source/apps/texinfo/texinfo.install
+++ /dev/null
@@ -1,25 +0,0 @@
-post_install()
-{
- echo -n "generating the top-level Info node... "
- mkinfodir /usr/info > /usr/info/dir 2>/dev/null
- echo "done."
-}
-
-post_upgrade()
-{
- post_install
-}
-
-pre_remove()
-{
- echo -n "removing the top-level Info node... "
- rm -f /usr/info/dir
- echo "done."
-}
-
-op=$1
-shift
-
-$op $*
-
-# vim: ft=sh
diff --git a/source/base/texinfo/CVE-2006-4810.patch
b/source/base/texinfo/CVE-2006-4810.patch
new file mode 100644
index 0000000..f3dcc91
--- /dev/null
+++ b/source/base/texinfo/CVE-2006-4810.patch
@@ -0,0 +1,141 @@
+--- texinfo-4.7.orig/util/texindex.c
++++ texinfo-4.7/util/texindex.c
+@@ -99,6 +99,9 @@
+ /* Directory to use for temporary files. On Unix, it ends with a slash. */
+ char *tempdir;
+
++/* Start of filename to use for temporary files. */
++char *tempbase;
++
+ /* Number of last temporary file. */
+ int tempcount;
+
+@@ -144,7 +147,7 @@
+ void fatal (const char *format, const char *arg);
+ void error (const char *format, const char *arg);
+ void *xmalloc (), *xrealloc ();
+-char *concat (char *s1, char *s2);
++static char *concat3 (const char *, const char *, const char *);
+ void flush_tempfiles (int to_count);
+
+ #define MAX_IN_CORE_SORT 500000
+@@ -190,6 +193,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 (concat3 ("txiXXXXXX", "", ""));
++
+ /* Process input files completely, one by one. */
+
+ for (i = 0; i < num_infiles; i++)
+@@ -220,7 +228,7 @@
+
+ outfile = outfiles[i];
+ if (!outfile)
+- outfile = concat (infiles[i], "s");
++ outfile = concat3 (infiles[i], "s", "");
+
+ need_initials = 0;
+ first_initial = '\0';
+@@ -318,7 +326,7 @@
+ if (tempdir == NULL)
+ tempdir = DEFAULT_TMPDIR;
+ else
+- tempdir = concat (tempdir, "/");
++ tempdir = concat3 (tempdir, "/", "");
+
+ keep_tempfiles = 0;
+
+@@ -384,26 +392,25 @@
+ usage (1);
+ }
+
+-/* Return a name for temporary file COUNT. */
++/* Return a name for temporary file COUNT, or NULL if failure. */
+
+ static char *
+ maketempname (int count)
+ {
+- static char *tempbase = NULL;
+ char tempsuffix[10];
++ char *name;
++ int fd;
+
+- if (!tempbase)
++ sprintf (tempsuffix, ".%d", count);
++ name = concat3 (tempdir, tempbase, tempsuffix);
++ fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0600);
++ if (fd == -1)
++ return NULL;
++ else
+ {
+- int fd;
+- tempbase = concat (tempdir, "txidxXXXXXX");
+-
+- fd = mkstemp (tempbase);
+- if (fd == -1)
+- pfatal_with_name (tempbase);
++ close(fd);
++ return(name);
+ }
+-
+- sprintf (tempsuffix, ".%d", count);
+- return concat (tempbase, tempsuffix);
+ }
+
+
+@@ -837,7 +844,7 @@
+ {
+ buffer = (char *) xrealloc (buffer, linebuffer->size *= 2);
+ p += buffer - linebuffer->buffer;
+- end += buffer - linebuffer->buffer;
++ end = buffer + linebuffer->size;
+ linebuffer->buffer = buffer;
+ }
+ if (c < 0 || c == '\n')
+@@ -931,6 +938,8 @@
+ for (i = 0; i < ntemps; i++)
+ {
+ char *newtemp = maketempname (++tempcount);
++ if (!newtemp)
++ pfatal_with_name("temp file");
+ sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
+ if (!keep_tempfiles)
+ unlink (tempfiles[i]);
+@@ -1401,6 +1410,8 @@
+ if (i + 1 == ntemps)
+ nf = nfiles - i * MAX_DIRECT_MERGE;
+ tempfiles[i] = maketempname (++tempcount);
++ if (!tempfiles[i])
++ pfatal_with_name("temp file");
+ value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf,
tempfiles[i]);
+ }
+
+@@ -1612,17 +1623,18 @@
+ }
+
+
+-/* Return a newly-allocated string concatenating S1 and S2. */
++/* Return a newly-allocated string concatenating S1, S2, and S3. */
+
+-char *
+-concat (char *s1, char *s2)
++static char *
++concat3 (const char *s1, const char *s2, const char *s3)
+ {
+- int len1 = strlen (s1), len2 = strlen (s2);
+- char *result = (char *) xmalloc (len1 + len2 + 1);
++ int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
++ char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
+
+ strcpy (result, s1);
+ strcpy (result + len1, s2);
+- *(result + len1 + len2) = 0;
++ strcpy (result + len1 + len2, s3);
++ *(result + len1 + len2 + len3) = 0;
+
+ return result;
+ }
diff --git a/source/base/texinfo/FrugalBuild b/source/base/texinfo/FrugalBuild
new file mode 100644
index 0000000..eba7526
--- /dev/null
+++ b/source/base/texinfo/FrugalBuild
@@ -0,0 +1,29 @@
+# Compiling time: 0.17 SBU
+# Maintainer: crazy <[EMAIL PROTECTED]>
+# Contributor: Laszlo Dvornik <[EMAIL PROTECTED]>
+
+pkgname=texinfo
+pkgver=4.9
+pkgrel=1
+pkgdesc="The GNU info program and utilities"
+url="http://www.gnu.org/software/texinfo/"
+depends=('ncurses' 'net-tools' 'grep' 'sed' 'udev' 'gawk')
+rodepends=('shadow')
+makedepends=('bison')
+groups=('apps' 'chroot-core')
+archs=('i686' 'x86_64')
+options=('force')
+up2date="lynx -dump 'http://ftp.gnu.org/gnu/texinfo/?M=D'|grep tar.bz2|sed -n
's/.*-\(.*\).t.*/\1/;1 p'"
+source=(http://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.bz2 mkinfodir
CVE-2006-4810.patch)
+sha1sums=('19a0cc0b56cbfcfe610925bef31e0bdf749492c9' \
+ 'd744345f082e32af0675a0b9d3287c6b8d4600a7' \
+ '8ab71e415364ca70dbc3ea1d028b1989860c9d8f')
+
+
+build()
+{
+ Fbuild
+ Fexe /usr/bin/mkinfodir
+}
+
+# optimization ok
diff --git a/source/base/texinfo/mkinfodir b/source/base/texinfo/mkinfodir
new file mode 100644
index 0000000..6eb0437
--- /dev/null
+++ b/source/base/texinfo/mkinfodir
@@ -0,0 +1,233 @@
+#!/bin/bash
+# $Id: mkinfodir,v 1.1 2000/08/03 16:16:11 achim Exp $
+# Generate the top-level Info node, given a directory of Info files
+# and (optionally) a skeleton file. The output will be suitable for a
+# top-level dir file. The skeleton file contains info topic names in the
+# order they should appear in the output. There are three special
+# lines that alter the behavior: a line consisting of just "--" causes
+# the next line to be echoed verbatim to the output. A line
+# containing just "%%" causes all the remaining filenames (wildcards
+# allowed) in the rest of the file to be ignored. A line containing
+# just "!!" exits the script when reached (unless preceded by a line
+# containing just "--"). Once the script reaches the end of the
+# skeleton file, it goes through the remaining files in the directory
+# in order, putting their entries at the end. The script will use the
+# ENTRY information in each info file if it exists. Otherwise it will
+# make a minimal entry.
+
+# sent by Jeffrey Osier <[EMAIL PROTECTED]>, who thinks it came from
+# [EMAIL PROTECTED] (david d `zoo' zuhn)
+
+# modified 7 April 1995 by Joe Harrington <[EMAIL PROTECTED]> to
+# take special flags
+
+INFODIR=$1
+if [ $# = 2 ] ; then
+ SKELETON=$2
+else
+ SKELETON=/dev/null
+fi
+
+skip=
+
+if [ $# -gt 2 ] ; then
+ echo usage: $0 info-directory [ skeleton-file ] 1>&2
+ exit 1
+elif [ -z "${INFODIR}" ] ; then
+ INFODIR="%%DEFAULT_INFO_DIR%%"
+else
+ true
+fi
+
+if [ ! -d ${INFODIR} ] ; then
+ echo "$0: first argument must specify a directory"
+ exit 1
+fi
+
+### output the dir header
+echo "-*- Text -*-"
+echo "This file was generated automatically by $0."
+echo "This version was generated on `date`"
+echo "by [EMAIL PROTECTED] for `(cd ${INFODIR}; pwd)`"
+
+cat << moobler
+\$Id: mkinfodir,v 1.1 2000/08/03 16:16:11 achim Exp $
+This is the file .../info/dir, which contains the topmost node of the
+Info hierarchy. The first time you invoke Info you start off
+looking at that node, which is (dir)Top.
+
+File: dir Node: Top This is the top of the INFO tree
+
+ This (the Directory node) gives a menu of major topics.
+ Typing "q" exits, "?" lists all Info commands, "d" returns here,
+ "h" gives a primer for first-timers,
+ "mEmacs<Return>" visits the Emacs topic, 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.
+
+moobler
+
+### go through the list of files in the skeleton. If an info file
+### exists, grab the ENTRY information from it. If an entry exists
+### use it, otherwise create a minimal dir entry.
+###
+### Then remove that file from the list of existing files. If any
+### additional files remain (ones that don't have a skeleton entry),
+### then generate entries for those in the same way, putting the info for
+### those at the end....
+
+infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v
'\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')`
+
+# echoing gets clobbered by backquotes; we do it the hard way...
+lines=`wc $SKELETON | awk '{print $1}'`
+line=1
+while [ $lines -ge $line ] ; do
+ # Read one line from the file. This is so that we can echo lines with
+ # whitespace and quoted characters in them.
+ fileline=`awk NR==$line $SKELETON`
+
+ # flag fancy features
+ if [ ! -z "$echoline" ] ; then # echo line
+ echo "$fileline"
+ fileline=
+ echoline=
+ elif [ "${fileline}" = "--" ] ; then # should we echo the next line?
+ echoline=1
+ elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir?
+ skip=1
+ elif [ "${fileline}" = "!!" ] ; then # quit now
+ exit 0
+ fi
+
+ # handle files if they exist
+ for file in $fileline"" ; do # expand wildcards ("" handles blank lines)
+
+ fname=
+
+ if [ -z "$echoline" -a ! -z "$file" ] ; then
+
+ # Find the file to operate upon. Check both possible names.
+ infoname=`echo $file | sed 's/\.gz$//'`
+ infoname=`echo $infoname | sed 's/\.info$//'`
+ noext=
+ ext=
+ if [ -f ${INFODIR}/$infoname ] ; then
+ noext=$infoname
+ fi
+ if [ -f ${INFODIR}/${infoname}.info ] ; then
+ ext=${infoname}.info
+ fi
+ if [ -f ${INFODIR}/${infoname}.info.gz ] ; then
+ ext=${infoname}.info.gz
+ fi
+ # If it exists with both names take what was said in the file.
+ if [ ! -z "$ext" -a ! -z "$noext" ]; then
+ fname=$file
+ warn="### Warning: $ext and $noext both exist! Using ${file}. ###"
+ elif [ ! \( -z "$ext" -a -z "$noext" \) ]; then
+ # just take the name if it exists only once
+ fname=${noext}${ext}
+ fi
+
+ # if we found something and aren't skipping, do the entry
+ if [ ! -z "$fname" ] ; then
+ if [ -z "$skip" ] ; then
+
+ if [ ! -z "$warn" ] ; then # issue any warning
+ echo $warn
+ warn=
+ fi
+ if [ "${fname##*.}" = "gz" ] ; then
+ entry=`zcat ${INFODIR}/${fname} | sed -e
'1,/START-INFO-DIR-ENTRY/d' \
+ -e '/END-INFO-DIR-ENTRY/,$d' `
+ else
+ entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
+ -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname`
+ fi
+ if [ ! -z "${entry}" ] ; then
+ echo "${entry}"
+ else
+ echo "* ${infoname}: (${infoname})."
+ fi
+ fi
+
+ # remove the name from the directory listing
+ infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ /
/g"`
+
+ fi
+
+ fi
+
+ done
+
+ line=`expr $line + 1`
+done
+
+if [ -z "${infofiles}" ] ; then
+ exit 0
+elif [ $lines -gt 0 ]; then
+ echo
+fi
+
+# Sort remaining files by INFO-DIR-SECTION.
+prevsect=
+filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \
+ fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \
+ sort -t: -k2 -k1 | tr ' ' '_')`
+for sectdata in ${filesectdata}; do
+ file=`echo ${sectdata} | cut -d: -f1`
+ section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file} 2>/dev/null`
+ infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"`
+
+ if [ "${prevsect}" != "${section}" ] ; then
+ if [ ! -z "${prevsect}" ] ; then
+ echo ""
+ fi
+ echo "${section}"
+ prevsect="${section}"
+ fi
+ infoname=`echo $file | sed 's/\.gz$//'`
+ infoname=`echo $infoname | sed 's/\.info$//'`
+ if [ "${file##*.}" = "gz" ] ; then
+ entry=`zcat ${INFODIR}/$file | sed -e '1,/START-INFO-DIR-ENTRY/d' \
+ -e '/END-INFO-DIR-ENTRY/,$d' `
+ else
+ entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
+ -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file 2>/dev/null`
+ fi
+ if [ ! -z "${entry}" ] ; then
+ echo "${entry}"
+ elif [ ! -d "${INFODIR}/${file}" ] ; then
+ echo "* ${infoname}: (${infoname})."
+ fi
+done
+
+# Process miscellaneous files.
+for file in ${infofiles}; do
+ if [ ! -z "${prevsect}" ] ; then
+ echo ""
+ echo "Miscellaneous"
+ prevsect=""
+ fi
+
+ infoname=`echo $file | sed 's/\.gz$//'`
+ infoname=`echo $infoname | sed 's/\.info$//'`
+ if [ "${file##*.}" = "gz" ] ; then
+ entry=`zcat ${INFODIR}/${file} | sed -e '1,/START-INFO-DIR-ENTRY/d'
\
+ -e '/END-INFO-DIR-ENTRY/,$d'`
+ else
+ entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \
+ -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file`
+ fi
+
+
+ if [ ! -z "${entry}" ] ; then
+ echo "${entry}"
+ elif [ ! -d "${INFODIR}/${file}" ] ; then
+ echo "* ${infoname}: (${infoname})."
+ fi
+done
+
diff --git a/source/base/texinfo/texinfo.install
b/source/base/texinfo/texinfo.install
new file mode 100644
index 0000000..766019d
--- /dev/null
+++ b/source/base/texinfo/texinfo.install
@@ -0,0 +1,25 @@
+post_install()
+{
+ echo -n "generating the top-level Info node... "
+ mkinfodir /usr/info > /usr/info/dir 2>/dev/null
+ echo "done."
+}
+
+post_upgrade()
+{
+ post_install
+}
+
+pre_remove()
+{
+ echo -n "removing the top-level Info node... "
+ rm -f /usr/info/dir
+ echo "done."
+}
+
+op=$1
+shift
+
+$op $*
+
+# vim: ft=sh
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git