Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/dictd/files/1.10.11: site.info colorit.conf dictd.initd dict.conf dictd.conf dictd.confd
Date: Fri, 12 Sep 2008 19:21:01
Message-Id: E1KeECQ-0003eG-4i@stork.gentoo.org
1 pva 08/09/12 19:20:58
2
3 Added: site.info colorit.conf dictd.initd dict.conf
4 dictd.conf dictd.confd
5 Log:
6 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.
7 (Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 i686)
8
9 Revision Changes Path
10 1.1 app-text/dictd/files/1.10.11/site.info
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/site.info?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/site.info?rev=1.1&content-type=text/plain
14
15 Index: site.info
16 ===================================================================
17 Welcome to your dictionary server dictd!
18
19 This is an example site information file. It should contain information
20 about any restricted databases and how users can obtain access. If may
21 also contain other random data as you see fit.
22
23
24
25
26 1.1 app-text/dictd/files/1.10.11/colorit.conf
27
28 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/colorit.conf?rev=1.1&view=markup
29 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/colorit.conf?rev=1.1&content-type=text/plain
30
31 Index: colorit.conf
32 ===================================================================
33 dnl /etc/dictd/colorit.conf vim:ft=m4
34 dnl
35 dnl Sample configuration file for colorit(1) program
36 dnl
37 divert(-1)
38 dnl
39 dnl Define some useful color variables
40 dnl
41 define(`black', `0')
42 define(`red', `1')
43 define(`green', `2')
44 define(`brown', `3')
45 define(`blue', `4')
46 define(`magenta', `5')
47 define(`cyan', `6')
48 define(`white', `7')
49 dnl
50 dnl Mark macro arguments: regexp foreground-color [background-color]
51 dnl
52 define(`mark', ``mark "$1"'' `ifelse(`$#', `3', ``"\033[3$2;4$3m"'', ``"\033[3$2m"'')' `"\033[m"')
53 dnl
54 divert
55 mark(`^From.*$',red,cyan)
56 mark(`^ [^ ]+',green)
57 mark(`^ *Note:',red)
58 mark(`{[^{]+}',green)
59 mark(`^ *\[[^\[]+\]', cyan)
60 mark(`^[ ]*(adj|n|v|adv)? *[0-9]+[\.:]',cyan)
61 mark(`^ *\([a-z]+\)',cyan)
62 mark(`(Syn|Ant|syn|ant):', blue, white)
63 mark(` (t|i|a|adj|adv|n|v)\. ',cyan)
64 mark(` (t|i|a|adj|adv|n|v)\.$',cyan)
65
66
67
68 1.1 app-text/dictd/files/1.10.11/dictd.initd
69
70 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd?rev=1.1&content-type=text/plain
72
73 Index: dictd.initd
74 ===================================================================
75 #!/sbin/runscript
76 # Copyright 1999-2004 Gentoo Foundation
77 # Distributed under the terms of the GNU General Public License v2
78 # $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 $
79
80 prepconfig() {
81 local TMPCONF INDEXFILES CNT DNAME DICT
82 if [ ! -e "${DICTDCONF}" ]; then
83 eerror "Config file ${DICTDCONF} not found."
84 return 1
85 fi
86
87 # if no dictionaries, skip startup.
88 # The new way of doing this is to scan /usr/lib/dict and tweek the conf
89 einfo "Scanning for dictionaries..."
90 if [ ! -d "${DLIBDIR}" ]; then
91 eerror "${DLIBDIR} doesn't exist, no dictionaries found."
92 return 1
93 fi
94 pushd ${DLIBDIR} >/dev/null
95 INDEXFILES=$(ls *.index)
96 if [ -z "${INDEXFILES}" ]; then
97 eerror "No dictionaries found at ${DLIBDIR}."
98 eerror "Please, emerge at least one of app-dicts/dictd-* dictionaries."
99 return 1
100 fi
101
102 TMPCONF=$(mktemp -t dictd.conf.XXXXXXXXXX)
103 cat ${DICTDCONF} | sed -e '/^#LASTLINE/,$d' > ${TMPCONF}
104 echo "#LASTLINE" >> ${TMPCONF}
105
106 CNT=0
107 for i in "${INDEXFILES}"; do
108 DNAME=$(echo $i | sed -e 's/[.]index$//')
109 #two possible names for a matching dictionary, check which is there.
110 if [ -f ${DNAME}.dict.dz ]; then
111 DICT=${DNAME}.dict.dz
112 elif [ -f ${DNAME}.dict ];then
113 DICT=${DNAME}.dict
114 else
115 ewarn "Index $i has no matching dictionaray..."
116 fi
117
118 #ok, go an index, and a dixtionary, append.
119 echo "database ${DNAME} { data \"${DLIBDIR}/${DICT}\"" >> ${TMPCONF}
120 echo " index \"${DLIBDIR}/$i\" }" >> ${TMPCONF}
121
122 CNT=$(expr ${CNT} + 1)
123 done
124 popd >/dev/null
125 mv "${TMPCONF}" "${DICTDCONF}"
126 chown 0:dictd "${DICTDCONF}"
127 chmod g+r "${DICTDCONF}"
128 einfo "Done, ${CNT} dictionaries found."
129 }
130
131 depend() {
132 need localmount
133 }
134
135 start() {
136 prepconfig || return 1
137 ebegin "Starting dictd"
138 start-stop-daemon --start --quiet --exec /usr/sbin/dictd -- ${DICTD_OPTS}
139 eend $?
140 }
141
142 stop() {
143 ebegin "Stopping dictd"
144 start-stop-daemon --stop --quiet --exec /usr/sbin/dictd
145 eend $?
146 }
147
148
149
150 1.1 app-text/dictd/files/1.10.11/dict.conf
151
152 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dict.conf?rev=1.1&view=markup
153 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dict.conf?rev=1.1&content-type=text/plain
154
155 Index: dict.conf
156 ===================================================================
157 # This is the configuration file for dict.
158 # Usually all you will ever need here is the server keywords.
159 # Refer to the dict manpage for other options.
160 # It will only check the second server if the first fails
161 server localhost
162 server dict.org
163
164
165
166 1.1 app-text/dictd/files/1.10.11/dictd.conf
167
168 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.conf?rev=1.1&view=markup
169 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.conf?rev=1.1&content-type=text/plain
170
171 Index: dictd.conf
172 ===================================================================
173 # dictd configuration file
174
175 global {
176 # Informational message
177 site site.info
178 }
179
180 # who's allowed. You might want to change this.
181 access {
182 allow *
183 }
184
185 # Dictionaries are listed below. During dictd startup the initrc script will
186 # scan ${DLIBDIR} (see /etc/conf.d/dictd) and adds all of the dictionaries it
187 # finds here.
188 #
189 # NOTE: Initrc script will wipe everything below #LASTLINE and replace it with
190 # what it finds. So add all of your things above. If this is a problem, report
191 # bug at https://bugs.gentoo.org, please.
192 #
193 # Do not remove next line!
194 #LASTLINE
195
196
197
198 1.1 app-text/dictd/files/1.10.11/dictd.confd
199
200 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.confd?rev=1.1&view=markup
201 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/dictd/files/1.10.11/dictd.confd?rev=1.1&content-type=text/plain
202
203 Index: dictd.confd
204 ===================================================================
205 # If have problems starting dictd in an UTF-8 locale, add an appropriate
206 # --locale switch to DICTD_OPTS, e. g. "--locale=en_US.utf8"
207 DICTD_OPTS="-s "
208 DICTDCONF=/etc/dict/dictd.conf
209 DLIBDIR=/usr/lib/dict