diff options
author | Peter Volkov <pva@gentoo.org> | 2008-09-12 19:20:58 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-09-12 19:20:58 +0000 |
commit | 8d796da332b3a964b010b2208472e560c000b359 (patch) | |
tree | 0e2422bac537d5d5aab3a8d8d2bfca5aad6a07c2 /app-text/dictd/files | |
parent | Added license under which some RFCs (namely after 2156) are distributed. (diff) | |
download | gentoo-2-8d796da332b3a964b010b2208472e560c000b359.tar.gz gentoo-2-8d796da332b3a964b010b2208472e560c000b359.tar.bz2 gentoo-2-8d796da332b3a964b010b2208472e560c000b359.zip |
Fixed inability to stop dictd, bug #236451, thank David B. Ferguson for report and fix. Cleaned up ebuild. Install again colorit and provide config file (back to bug #107376). Create initd user and make initrc script to work with permissions on its own (back to bug #90657). Took some patches from debian most important of which backports upstream fix for first connection denied problem. Removed old.
(Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 i686)
Diffstat (limited to 'app-text/dictd/files')
-rw-r--r-- | app-text/dictd/files/1.10.11/colorit.conf | 32 | ||||
-rw-r--r-- | app-text/dictd/files/1.10.11/dict.conf (renamed from app-text/dictd/files/1.9.7/dict.conf) | 0 | ||||
-rw-r--r-- | app-text/dictd/files/1.10.11/dictd.conf | 22 | ||||
-rw-r--r-- | app-text/dictd/files/1.10.11/dictd.confd | 5 | ||||
-rw-r--r-- | app-text/dictd/files/1.10.11/dictd.initd | 72 | ||||
-rw-r--r-- | app-text/dictd/files/1.10.11/site.info (renamed from app-text/dictd/files/1.9.7/site.info) | 0 | ||||
-rw-r--r-- | app-text/dictd/files/1.9.7/dictd | 72 | ||||
-rw-r--r-- | app-text/dictd/files/1.9.7/dictd.conf | 22 | ||||
-rw-r--r-- | app-text/dictd/files/1.9.7/dictd.confd | 7 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-colorit-nopp-fix.patch | 14 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-dictd.8-man.patch | 24 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-dictd.c-alen-init.patch | 14 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-dictdplugin_popen-g++-4.3compile.patch | 15 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-dictl-konwert.patch | 35 | ||||
-rw-r--r-- | app-text/dictd/files/dictd-1.10.11-dictl-translit.patch | 16 |
15 files changed, 249 insertions, 101 deletions
diff --git a/app-text/dictd/files/1.10.11/colorit.conf b/app-text/dictd/files/1.10.11/colorit.conf new file mode 100644 index 000000000000..22b00e9ec07d --- /dev/null +++ b/app-text/dictd/files/1.10.11/colorit.conf @@ -0,0 +1,32 @@ +dnl /etc/dictd/colorit.conf vim:ft=m4 +dnl +dnl Sample configuration file for colorit(1) program +dnl +divert(-1) +dnl +dnl Define some useful color variables +dnl +define(`black', `0') +define(`red', `1') +define(`green', `2') +define(`brown', `3') +define(`blue', `4') +define(`magenta', `5') +define(`cyan', `6') +define(`white', `7') +dnl +dnl Mark macro arguments: regexp foreground-color [background-color] +dnl +define(`mark', ``mark "$1"'' `ifelse(`$#', `3', ``"\033[3$2;4$3m"'', ``"\033[3$2m"'')' `"\033[m"') +dnl +divert +mark(`^From.*$',red,cyan) +mark(`^ [^ ]+',green) +mark(`^ *Note:',red) +mark(`{[^{]+}',green) +mark(`^ *\[[^\[]+\]', cyan) +mark(`^[ ]*(adj|n|v|adv)? *[0-9]+[\.:]',cyan) +mark(`^ *\([a-z]+\)',cyan) +mark(`(Syn|Ant|syn|ant):', blue, white) +mark(` (t|i|a|adj|adv|n|v)\. ',cyan) +mark(` (t|i|a|adj|adv|n|v)\.$',cyan) diff --git a/app-text/dictd/files/1.9.7/dict.conf b/app-text/dictd/files/1.10.11/dict.conf index e06c3d296ec3..e06c3d296ec3 100644 --- a/app-text/dictd/files/1.9.7/dict.conf +++ b/app-text/dictd/files/1.10.11/dict.conf diff --git a/app-text/dictd/files/1.10.11/dictd.conf b/app-text/dictd/files/1.10.11/dictd.conf new file mode 100644 index 000000000000..16e41e5cac76 --- /dev/null +++ b/app-text/dictd/files/1.10.11/dictd.conf @@ -0,0 +1,22 @@ +# dictd configuration file + +global { + # Informational message + site site.info +} + +# who's allowed. You might want to change this. +access { + allow * +} + +# Dictionaries are listed below. During dictd startup the initrc script will +# scan ${DLIBDIR} (see /etc/conf.d/dictd) and adds all of the dictionaries it +# finds here. +# +# NOTE: Initrc script will wipe everything below #LASTLINE and replace it with +# what it finds. So add all of your things above. If this is a problem, report +# bug at https://bugs.gentoo.org, please. +# +# Do not remove next line! +#LASTLINE diff --git a/app-text/dictd/files/1.10.11/dictd.confd b/app-text/dictd/files/1.10.11/dictd.confd new file mode 100644 index 000000000000..4db9f001e790 --- /dev/null +++ b/app-text/dictd/files/1.10.11/dictd.confd @@ -0,0 +1,5 @@ +# If have problems starting dictd in an UTF-8 locale, add an appropriate +# --locale switch to DICTD_OPTS, e. g. "--locale=en_US.utf8" +DICTD_OPTS="-s " +DICTDCONF=/etc/dict/dictd.conf +DLIBDIR=/usr/lib/dict diff --git a/app-text/dictd/files/1.10.11/dictd.initd b/app-text/dictd/files/1.10.11/dictd.initd new file mode 100644 index 000000000000..65ae3a38b359 --- /dev/null +++ b/app-text/dictd/files/1.10.11/dictd.initd @@ -0,0 +1,72 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v 1.1 2008/09/12 19:20:57 pva Exp $ + +prepconfig() { + local TMPCONF INDEXFILES CNT DNAME DICT + if [ ! -e "${DICTDCONF}" ]; then + eerror "Config file ${DICTDCONF} not found." + return 1 + fi + + # if no dictionaries, skip startup. + # The new way of doing this is to scan /usr/lib/dict and tweek the conf + einfo "Scanning for dictionaries..." + if [ ! -d "${DLIBDIR}" ]; then + eerror "${DLIBDIR} doesn't exist, no dictionaries found." + return 1 + fi + pushd ${DLIBDIR} >/dev/null + INDEXFILES=$(ls *.index) + if [ -z "${INDEXFILES}" ]; then + eerror "No dictionaries found at ${DLIBDIR}." + eerror "Please, emerge at least one of app-dicts/dictd-* dictionaries." + return 1 + fi + + TMPCONF=$(mktemp -t dictd.conf.XXXXXXXXXX) + cat ${DICTDCONF} | sed -e '/^#LASTLINE/,$d' > ${TMPCONF} + echo "#LASTLINE" >> ${TMPCONF} + + CNT=0 + for i in "${INDEXFILES}"; do + DNAME=$(echo $i | sed -e 's/[.]index$//') + #two possible names for a matching dictionary, check which is there. + if [ -f ${DNAME}.dict.dz ]; then + DICT=${DNAME}.dict.dz + elif [ -f ${DNAME}.dict ];then + DICT=${DNAME}.dict + else + ewarn "Index $i has no matching dictionaray..." + fi + + #ok, go an index, and a dixtionary, append. + echo "database ${DNAME} { data \"${DLIBDIR}/${DICT}\"" >> ${TMPCONF} + echo " index \"${DLIBDIR}/$i\" }" >> ${TMPCONF} + + CNT=$(expr ${CNT} + 1) + done + popd >/dev/null + mv "${TMPCONF}" "${DICTDCONF}" + chown 0:dictd "${DICTDCONF}" + chmod g+r "${DICTDCONF}" + einfo "Done, ${CNT} dictionaries found." +} + +depend() { + need localmount +} + +start() { + prepconfig || return 1 + ebegin "Starting dictd" + start-stop-daemon --start --quiet --exec /usr/sbin/dictd -- ${DICTD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping dictd" + start-stop-daemon --stop --quiet --exec /usr/sbin/dictd + eend $? +} diff --git a/app-text/dictd/files/1.9.7/site.info b/app-text/dictd/files/1.10.11/site.info index 23bfdeb61102..23bfdeb61102 100644 --- a/app-text/dictd/files/1.9.7/site.info +++ b/app-text/dictd/files/1.10.11/site.info diff --git a/app-text/dictd/files/1.9.7/dictd b/app-text/dictd/files/1.9.7/dictd deleted file mode 100644 index 554c9540023a..000000000000 --- a/app-text/dictd/files/1.9.7/dictd +++ /dev/null @@ -1,72 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.9.7/dictd,v 1.3 2004/07/14 21:37:57 agriffis Exp $ - -# NB: Config is in /etc/conf.d/dictd - - -prepconfig() { - if [ ! -e ${DICTDCONF} ] - then - eerror "dictd not started. Config file not found." - return 1 - fi - # if no dictionaries, skip startup. - - # The new way of doing this is to scan /usr/lib/dict and tweek the conf - einfo "Scanning for dictionaries..." - if [ ! -d "${DLIBDIR}" ]; then - eerror "${DLIBDIR} doesn't exist, no dictionaries found." - return 1 - fi - pushd ${DLIBDIR} >/dev/null - INDEXFILES=`ls *.index` - if [ -z "$INDEXFILES" ]; then - eerror "No dictionaries installed." - return 1 - fi - - cat $DICTDCONF | sed -e '/^#LASTLINE/,$d' > $TMPCONF - echo "#LASTLINE" >> $TMPCONF - - CNT=0 - for i in $INDEXFILES - do - DNAME=`echo $i | awk -F . '{print $1;}'` - #two possible names for a matching dictionary, check which is there. - if [ -f ${DNAME}.dict.dz ]; then - DICT=${DNAME}.dict.dz - elif [ -f ${DNAME}.dict ];then - DICT=${DNAME}.dict - else - einfo "Index $i has no matching dictionaray..." - fi - - #ok, go an index, and a dixtionary, append. - echo "database $DNAME { data \"${DLIBDIR}/${DICT}\"" >> $TMPCONF - echo " index \"${DLIBDIR}/$i\" }" >> $TMPCONF - - CNT=`expr $CNT + 1` - done - popd >/dev/null - mv ${TMPCONF} ${DICTDCONF} - einfo "Done, $CNT dictionary indexes found." -} - -depend() { - need localmount -} - -start() { - ebegin "Starting dictd" - prepconfig || return 1 - start-stop-daemon --start --quiet --exec /usr/sbin/dictd -- $EARGS - eend $? -} - -stop() { - ebegin "Stopping dictd" - start-stop-daemon --stop --quiet --exec /usr/sbin/dictd - eend $? -} diff --git a/app-text/dictd/files/1.9.7/dictd.conf b/app-text/dictd/files/1.9.7/dictd.conf deleted file mode 100644 index 4cded974f973..000000000000 --- a/app-text/dictd/files/1.9.7/dictd.conf +++ /dev/null @@ -1,22 +0,0 @@ -# dictd configuration file. -# whipped up by michael conrad tilstra <michael@gentoo.org> - -# Informational message -site site.info - -# who's allowed. You might want to change this. -access { - allow * -} - -# Dictionaries are listed below. -# The initrc script scans /usr/lib/dict and adds all of the dictionaries -# it finds here. -# -# The initrc script will delete everything after the the last line and -# replace it with what it finds. So add all of your things above. -# -# If this is a problem for people, contact me and -# we can work out a different method. -# -#LASTLINE diff --git a/app-text/dictd/files/1.9.7/dictd.confd b/app-text/dictd/files/1.9.7/dictd.confd deleted file mode 100644 index 91b9d43884bc..000000000000 --- a/app-text/dictd/files/1.9.7/dictd.confd +++ /dev/null @@ -1,7 +0,0 @@ -# Config file for /etc/init.d/dictd - -EARGS="-s " -DICTDCONF=/etc/dict/dictd.conf -DLIBDIR=/usr/lib/dict -TMPCONF=/etc/dict/dictd.conf.$$ - diff --git a/app-text/dictd/files/dictd-1.10.11-colorit-nopp-fix.patch b/app-text/dictd/files/dictd-1.10.11-colorit-nopp-fix.patch new file mode 100644 index 000000000000..a78d13c9620c --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-colorit-nopp-fix.patch @@ -0,0 +1,14 @@ +Made 'colorit -pp -' work + +Index: dictd/colorit.in +=================================================================== +--- dictd.orig/colorit.in 2008-01-23 23:38:35.000000000 +0100 ++++ dictd/colorit.in 2008-01-23 23:39:25.000000000 +0100 +@@ -167,6 +167,7 @@ + + function process_config (){ + if (pp == ""){ ++ pipe = "cat < \"" config_file "\"" + while (0 < (ret = (pipe | getline))){ + process_config_line() + } diff --git a/app-text/dictd/files/dictd-1.10.11-dictd.8-man.patch b/app-text/dictd/files/dictd-1.10.11-dictd.8-man.patch new file mode 100644 index 000000000000..1a49a47b182c --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-dictd.8-man.patch @@ -0,0 +1,24 @@ +Use @SYSCONFDIR@ instead of /etc/ + +Index: dictd/dictd.8.in +=================================================================== +--- dictd.orig/dictd.8.in 2008-01-25 21:25:49.000000000 +0100 ++++ dictd/dictd.8.in 2008-01-25 21:26:42.000000000 +0100 +@@ -120,7 +120,7 @@ + .TP + .BI \-c " file\fR or " \-\-config " file" + Specify configuration file. The default is +-.I /etc/dictd.conf ++.I @SYSCONFDIR@/dictd.conf + , but may be changed in the + .I defs.h + file at compile time (DICTD_CONFIG_FILE). +@@ -283,7 +283,7 @@ + .TP + .B Introduction + The configuration file defaults to +-.I /etc/dictd.conf ++.I @SYSCONFDIR@/dictd.conf + but can be specified on the command line with the + .B \-c + option (see above). diff --git a/app-text/dictd/files/dictd-1.10.11-dictd.c-alen-init.patch b/app-text/dictd/files/dictd-1.10.11-dictd.c-alen-init.patch new file mode 100644 index 000000000000..68faa156047d --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-dictd.c-alen-init.patch @@ -0,0 +1,14 @@ +Fix for http://sourceforge.net/tracker/index.php?func=detail&aid=1941358&group_id=605&atid=100605 +Index: dictd/dictd.c +=================================================================== +--- dictd.orig/dictd.c 2008-04-13 16:15:58.000000000 +0200 ++++ dictd/dictd.c 2008-04-13 16:16:17.000000000 +0200 +@@ -1455,7 +1455,7 @@ + struct sockaddr_in csin; + int c; + time_t startTime; +- socklen_t alen = 0; ++ socklen_t alen = sizeof(csin); + int detach = 1; + int forceStartup = 0; + int i; diff --git a/app-text/dictd/files/dictd-1.10.11-dictdplugin_popen-g++-4.3compile.patch b/app-text/dictd/files/dictd-1.10.11-dictdplugin_popen-g++-4.3compile.patch new file mode 100644 index 000000000000..1b1753bab6cf --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-dictdplugin_popen-g++-4.3compile.patch @@ -0,0 +1,15 @@ +Patch for #454819: FTBFS with GCC 4.3: missing #includes + + +Index: dictd/dictdplugin_popen.cpp +=================================================================== +--- dictd.orig/dictdplugin_popen.cpp 2008-01-20 21:58:30.000000000 +0100 ++++ dictd/dictdplugin_popen.cpp 2008-01-20 21:59:06.000000000 +0100 +@@ -43,6 +43,7 @@ + #include <stdio.h> + #include <errno.h> + #include <string> ++#include <climits> + #include <unistd.h> + #include <sstream> + #include <list> diff --git a/app-text/dictd/files/dictd-1.10.11-dictl-konwert.patch b/app-text/dictd/files/dictd-1.10.11-dictl-konwert.patch new file mode 100644 index 000000000000..254fdd1c3a90 --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-dictl-konwert.patch @@ -0,0 +1,35 @@ +Patch for #401666: dictl: doesn't work with DICTL_USE_KONWERT + +Index: dictd/dictl.in +=================================================================== +--- dictd.orig/dictl.in 2008-01-20 17:58:41.000000000 +0100 ++++ dictd/dictl.in 2008-01-20 18:02:40.000000000 +0100 +@@ -24,11 +24,25 @@ + # `iconv --help' gives more options than `man iconv' (on my SuSE 9.0 system at least) + # the -c makes iconv omit invalid characters from output + iconv -c -f $1 -t $2 +- else if test "$DICTL_USE_KONWERT"; then +- konwert $1-$2 ++ elif test "$DICTL_USE_KONWERT"; then ++ sedexpr=' ++ /(CP)?(437|8(5[0257]|6[0-69]|74))/ { s//cp\2/; q } ++ /8859_([1-9])/ { s//iso\1/; q } ++ /ANSI_X3.4(-19(68|86))?/ { s//ascii/; q } ++ /(US-)?ASCII/ { s//ascii/; q } ++ /(CP|WINDOWS-)(125[0-8])/ { s//cp\1/; q } ++ /ISO([-_]?8859-|8859)([1-9]|1[01345])/ { s//iso\2/; q } ++ /KOI8-?R/ { s//koi8r/; q } ++ /KOI8-?U/ { s//koi8u/; q } ++ /UTF-?8/ { s//utf8/; q } ++ /VISCII/ { s//viscii/; q } ++ /.*/ { s///; q }' ++ from=`echo "$1" | tr a-z A-Z | sed -r -e "$sedexpr"` ++ to=`echo "$2" | tr a-z A-Z | sed -r -e "$sedexpr"` ++ konwert "$from-$to" + else + recode -f $1..$2 +- fi fi ++ fi + } + + ##################################### diff --git a/app-text/dictd/files/dictd-1.10.11-dictl-translit.patch b/app-text/dictd/files/dictd-1.10.11-dictl-translit.patch new file mode 100644 index 000000000000..6341120c8eb8 --- /dev/null +++ b/app-text/dictd/files/dictd-1.10.11-dictl-translit.patch @@ -0,0 +1,16 @@ +Patch for #378792: dictl should use iconv's //translit suffix + + +Index: dictd/dictl.in +=================================================================== +--- dictd.orig/dictl.in 2008-01-21 22:28:01.000000000 +0100 ++++ dictd/dictl.in 2008-01-21 22:28:20.000000000 +0100 +@@ -23,7 +23,7 @@ + if test "$DICTL_USE_ICONV"; then + # `iconv --help' gives more options than `man iconv' (on my SuSE 9.0 system at least) + # the -c makes iconv omit invalid characters from output +- iconv -c -f $1 -t $2 ++ iconv -c -f $1 -t $2//TRANSLIT + elif test "$DICTL_USE_KONWERT"; then + sedexpr=' + /(CP)?(437|8(5[0257]|6[0-69]|74))/ { s//cp\2/; q } |