dbskkd-cdb Release Notes in Japanese
for version dbskkd-cdb-1.01
by Kenji Rikitake <kenji.rikitake@acm.org>
$Id: Release-Notes.English,v 1.4 1999/09/28 12:23:41 kenji Exp $

What is dbskkd-cdb?
-------------------

dbskkd-cdb is a dictionary server for the SKK Japanese input method
system.  dbskkd-cdb is based on the code of skkserv (the original SKK
server) 3.9.3, using the cdb constant database package of
D. J. Bernstein (DJB) for faster dictionary access.

dbskkd-cdb is compatible with skkserv on the protocol behavior.  It is
called from "super-server" programs such as inetd or tcpserver, and the
I/O operation is solely with the stdio interface, so the code is compact
and the access to the server can be easily restricted.

The basic structure of this server is derived from pskkserv, another SKK
server.

DJB's cdb-0.55 is required for installation of dbskkd-cdb.  To obtain
the program, refer to the following URL:

ftp://koobera.math.uic.edu/www/cdb.html

The distribution of cdb-0.55 is freely redistributable as long as not
modifying it.  The source code is in public domain.  In this kit of
dbskkd-cdb, cdb.h and uint32.h are copied from cdb-0.55.

If the function setproctitle() is available in the system library such
as that in the libutil library of 4.4BSD-derived UNIXes, dbskkd-cdb uses
it and shows the hostname of each dbskkd-cdb process is connected.

Brief history of the version updates
------------------------------------

Since the Version 0.2, dbskkd-cdb returns the given input string back to
the client when it does not find the corresponding answers for the
string (with the response code SERVER_NOT_FOUND).  This is the same
behavior as skkserv, and is assumed by the skkinput client program.

Since the Version 0.50, dbskkd-cdb uses the cdb-style database file, and
has no compatibility with the previous versions.

Since the Version 0.51, when a user directly invokes dbskkd-cdb, it
communicates through the stdio interface.  This is implemented to make
dbskkd-cdb more compatible with skkserv.  It also gets rid of err()
function from old BSD distribution and uses a function of its own to
call syslog().

Since the Version 0.52, a bug of the skktocdbm.sh script, which causes
wrongly converting the database entries with space characters included,
has been fixed by applying the patch of Hideto Kihara.  Some redundant
code of dbskkd-cdb.c about the macro JISHO_FILE definition is removed.

The Version 1.00 hasn't been changed much from the Version 0.52.  When a
pathname is defined as a compiled option for the macro JISHO_FILE in the
Makefile, it is chosen as the dictionary file pathname (by request of
Takao Kawamura, the official maintainer of dbskkd-cdb for Debian
GNU/Linux project).  From this release, the English version of the
release note is provided as Release-Notes.English.

In this version, Version 1.01, a potential buffer-overrun bug has been
fixed.

System requirements for dbskkd-cdb
----------------------------------

So far dbskkd-cdb has been running with no problem on:

	FreeBSD 2.2.8-RELEASE
	FreeBSD 3.1-RELEASE
	Debian GNU/Linux 2.1 (2.0.35 kernel + libc-2.0.7u)
	Linux 2.2.9 + Libc6 2.1.1

The author does not expect major problems on porting dbskkd-cdb to other
UNIX variants, providing that BSD-style socket library and inetd-like 'super'
daemon are available.  The author or anybody else do not guarantee the proper
operation of this program under any condition.

The SKK dictionary file used for the tested systems is SKK-JISYO.L of
SKK 9.6m distribution, which contains 118905 entries.  Converting the
file to a cdb-compliant database file increases the size from 2808757 to
5425525 bytes.

Things to do before the installation
------------------------------------

1. The current directory path should be set to where you expanded the
   tarball kit.

2. Make cdb-0.55 ready to use.  The utility cdbmake should be executable.
   Make a copy of libcdb.a to the current directory, because you need this
   to compile dbskkd-cdb.

3. Run makeskkcdb.sh and make SKK-JISYO.L.cdb.
   This script invokes skktocdbm.sh and
   redirect /usr/local/share/skk/SKK-JISYO.L as the stdin of skktocdbm.sh.
   The SKK-JISYO.L.cdb is created under the current directory as default.
   Change the default pathnames if you need to do so.

4. Install the SKK-JISYO.L.cdb.  The author recommend installing it to
   the same directory where the SKK directory resides.  The consistency
   of this cdb-style directory can be verified by cdbtest or cdbstats
   utilities of the cdb package.

5. Compile dbskkd-cdb using the make command.

Tips for before building the dbskkd-cdb
---------------------------------------

1. Set the pathname of SERVER_DIR in dbskkd-cdb.c to the directory
   where the server resides.  The default value is /usr/local/libexec.

2. Set the pathname of JISHO_FILE in dbskkd-cdb.c to the directory
   where the cdb-style dictionary resides.
   The defaule value is /usr/local/share/dbskkd-cdb/SKK-JISYO.L.cdb.

3. Setting the compile-time flag LOG_PEERINFO lets the dbskkd-cdb log the
   source address of the client connected to the server.  This flag is
   *not* set as the default because this job should be done by tcp_wrapper
   or tcpserver in ucspi-tcp.

4. Setting the compile-time flag UCSPI_TCP lets the dbskkd-cdb use the
   inherited values of source addresses and other client-related
   information passed through the environment variable from tcpserver.
   The author recommends this to be set when dbskkd-cdb is used with
   tcpserver, to reduce redundant DNS lookups.

How to make necessary changes to inetd
--------------------------------------

1. Add the following line to /etc/services:

	skkserv		1178/tcp

2. Add the following line (or something similar) to /etc/inetd.conf:
   (This example is for a FreeBSD 2.2.8-RELEASE system using tcp_wrapper)

skkserv stream  tcp     nowait  nobody  /usr/local/libexec/tcpd       /usr/local/libexec/dbskkd-cdb

   *NEVER* run dbskkd-cdb with the root privilege.  Use nobody or
   a dedicated uid for running dbskkd-cdb.

3. Add an entry for dbskkd-cdb to /etc/hosts.allow when using
   with tcp_wrapper.

Things to to and some thoughts
------------------------------

The dbskkd-cdb program keeps the dictionary file open during the whole
process life.  cdb routines assume that the contents of the database
files are unchanged while they are opened, so you *must not* change the
contents of the cdb-style dictionary file when dbskkd-cdb is running.
You need to confirm that no dbskkd-cdb process is up when you rebuild
the dictionary file.

The dbskkd-cdb program exits when it detects a unknown SKK command, with
an error message sent by syslog.  More rigorous check of input values
from client processes may be required.

The logging code using syslog can be much more improved.

The author thinks it is redundant to send back the given string when
dbskkd-cdb server responds with SERVER_NOT_FOUND, but the author decided
to make this compatible with skkinput.  This kind of subtle but important
details of the SKK client-server protocol should be well-defined by the
developers of SKK tools.  So far this behavior is well-accepted.

Acknowledgement
---------------

The author thank to the developers and unnamed contributors for the
following projects:

Masahiko Sato who started and maintains the SKK project,
Yukiyoshi Kameyama who first writes the skkserv code,
Masaaki Sato and Mikio Nakajima who write the pskkserv code,
Takashi Sakamoto who writes the skkinput code,
and all people who contributed their time and effort for SKK.

The author thank to the following people for the contribution of
development of dbskkd-cdb:

Yaruhiro Honda <honda@kashio.info.mie-u.ac.jp>
Hayao Nakahara <nakahara@mis.hiroshima-u.ac.jp>
Takahiro Kikuchi <kick@kyoto.wide.ad.jp>
Hideo Matsumoto <hideo-m@nerv.org>
Hidetaka Koie <koie@suri.co.jp>
Takao Kawamura <kawamura@ike.tottori-u.ac.jp>
Hideto Kihara <deton@m1.interq.or.jp>
Rikito Inakazu <rik@mtb.biglobe.ne.jp>
Makoto Matsushita <matusita@jp.freebsd.org>

Redistribution of this software
-------------------------------

Redistribution of this software is under the GNU Public License.
For the further details, consult to each file of the package.

Inquiries and comments
----------------------

If you have inquiries and comments to this software, please send email to
	kenji-dbskkd-cdb@k2r.org

[End of memorandum]
