dbMan

About distribution, license and support

Now is dbMan distributed as *.tar.gz file primary hosted at http://dbman.linux.cz/ftp, secondary mirrored to http://www.fi.muni.cz/~sorm/dbman/ftp and I prepare RPM versions on the same place for every new stable distribution, but I can't make DEB files (for Debian) - any volunteer ?

dbMan is licensed by General Public License (GPL), which is stored in separate file called Copying or by Artistic License stored in file Artistic. Please read it!

Primary support place is developers mailing-list placed at High School Videnska at Brno - dbman@gvid.cz. To subscribe them please write e-mail at listserv@gvid.cz with command 'subscribe dbman' (without quotes) in body of e-mail. This listserv is another of my freeware project - project called Drbna (you can try http://www.fi.muni.cz/~sorm/drbna/ to resolve them).

Mailing-list is primary in Czech and English language (English is for world developers and users, Czech is for my colleague from my country :-) ). You can also write me to sorm@fi.muni.cz, I want to reply you as soon as possible or I forward your mail to mailing-list.

Installation via rsync

New type of installation use very good tool - rsync. You can copy new files (and of course changed files) from current devel snapshot (situated at source driver distribution on primary site). You can use command:

	rsync -acvz dbman.linux.cz::dbman-prog/ /where/you/can/dbman

If you want upgrade current existing installed distribution, please use this upgrade command for total upgrade:

	rsync -acvz --delete --force dbman.linux.cz::dbman-prog/ /where/you/can/dbman

or this for partially upgrade (don't copy local changed files, save new plugins and drivers etc.):

	rsync -acvuz dbman.linux.cz::dbman-prog/ /where/you/can/dbman

I think, this is the simpliest version of installing and upgrading of dbMan. Than you must do all other steps such as for normal *.tar.gz or *.rpm distribution.

Installation - Perl and Perl modules

You must install Perl in first order. dbMan need at least 5.003 version of Perl (but 5.005 is recommended for good Tk work). You can obtain them from CPAN sites (http://www.perl.com/CPAN or Czech mirror at ftp://ftp.fi.muni.cz/pub/perl). In RedHat Linux (and probably also in Debian and Slackware) you can found some Perl package (RPM etc.) with precompiled Perl. But making binaries of Perl is quite similar.

Next you need some of other modules for Perl, which dbMan use. At first row you need old DBI/DBD interface for your database. You can obtain this (and all others of course too) from CPAN sites (listed above). DBI and DBD are at least two package from CPAN (in *.tar.gz) format. Good idea for installing them is:

	perl -MCPAN -e 'install DBI'
	perl -MCPAN -e 'install DBD::Pg'        (or some other driver)

For non-automatic making modules you can use this sequence of commands:

	tar xfvz Module.tar.gz ; cd Module
	perl Makefile.PL
	make
	make test
	make install
	cd .. ; rm -rf Module

Be sure for error messages and consult them with you system administrator or in Perl mailing-list (Czech mailing-list is perl@muni.cz at listserv@muni.cz or newsgroup cz.comp.lang.perl or world-wide newsgroup comp.lang.perl.misc).

Second group of modules are Tk (Perl/Tk) modules. It is homed at CPAN too. You need at least Tk800 distribution with Tk 8, pTk and Perl/Tk interface - one package). You can use step list as above. All used Tix modules are included in Tk800 module).

Third group make modules for dbman-proxying - Storable and IO::Socket (on CPAN too) and for dbMan online - CGI module.

Installation - nDBI/nDBD database drivers

Next step is preparing nDBI/nDBD interface. For Oracle and PostgreSQL is all done by me, mySQL is on the way :-) In directory nDBD/ you can find all supported modules. If you want add support for next database system (trivial driver without any special functions), you must create in this directory driver named by old DBD driver. For example for Solid drivers (DBD::Solid) you must create nDBD/Solid.pm file. In this file you must write these few lines:

	package nDBD::Solid;
       	$VERSION = '0.0.1';
	use nDBD;
	@ISA = qw(nDBD);
	1;
	
	sub ndbd_login_string { 
		return nDBD::ndbd_login_string(@_);
	}

At first line you must of course use your file name (this is only example for Solid SQL database system). These few lines make only inherited class of trivial nDBD.pm driver. Now you can add some special functions to this driver (described below) and (if you want) you can mail me your new driver and I can add it to distribution of dbMan.

Installation - Language specific things

dbMan support language specific things situated in file dbManLang.pm (language string version library). Standard distribution support only English and Czech language, but you can add any next language to this file (and of course mail me result of your work and I add this thing to standard distribution).

All language specific things are situated to one hash item in hash %Message. For example Czech version starts with

	'cz' => {

and stops with

	},

You can copy this section to the next item of hash %Message and replace strings with your language version. Some of strings use special character %s to specify position of variable part of string.

Because language is selected by environment variables LANG and DBMAN_LANG, you can specify your alternative for this into function import in dbManLang.pm. For example Czech language typically use 'cz' version - 'cz' is used as key in %Message, but at some computers you can find old version 'cs' -> in import function I must translate all 'cs' to 'cz'. Please add to this function you translations and mail me patch of your dbManLang.pm library.

Much better system have gone with dbMan 0.0.9. Tk editing tool for localizating these strings simplify this process - please read information.

Help files for SQL is situated in dbman.help.* files (at * is used %Message key items). You can add your own files with localised versions of dbMan SQL help files. And of course mail me your version and I add this to standard distribution.

May be you need use some default font to show your native language messages in dbMan. I solve this problem via language wrapper (e.g. czdbman). Please try some like this:

	[sorm@chlapec latest]$ cat czdbman 
	#! /bin/bash
	WHAT=`perl -e '$t = shift @ARGV; $t =~ s/czdbman/dbman/; print $t;' $0`
	DBMAN_LANG=cz exec $WHAT ${1+"$@"} -fn '-*-*-*-*-*-*-12-*-*-*-m-*-iso8859-2'

To correct change $0 in your wrapper from native wrapper name (czdbman) to dbMan main program (dbman). Than you set DBMAN_LANG variable to correct langage variant (DBMAN_LANG is used first than LANG environment variable) and than start dbMan program (stored in $WHAT) with correct font (-fn font). E.g. I need some ISO8859-2 font to correct showing of Czech's fonts.

! One bad hack !

If you want to see nice message 'Starting Perl...' in your native language, you must add this alternative into main dbman file to section BEGIN, because this section run before loading message file dbManLang. Czech support (for example) is added correctly to this place. Please mail me your changes as patch files, but I can't garantee same changes in standard distribution - I probably use some ideas from your patch (native langauge string) and write this routine much better than is current dbman's version - but now I have only two language variant and I needn't do this change).

Installation - Primary directory for libraries, images and helps

After start dbMan tries to find his libraries (dbManLang, nDBI and nDBDs), helps and images in $ENV{PATH} and current directory. Always tries directory from which is dbMan called (for example if user call dbMan located in /usr/local/bin, dbMan tries this directory).

But if all failed, you can specify directory, where this files are installed. This directory is situated in variable $DEFAULT_DIR initialized from $main::DEFA variable located I think about 3 lines from top of main file dbman. Standard value is "/usr/lib/dbman", but you can write here location of installation of dbMan (e.g. on Faculty of Informatics in Brno directory "/packages/share/dbman"). Same thing is needed in dbman-proxy, dbman-sql-server and dbman-le program.

Last chance is set environment variable DBMAN_LIB to correct values (in real this variable is use in first order :-) ).

Configuration file

dbMan use your ~/.dbmanrc file to obtain some default values and for automatic authorization. You can also use dbmanrc file in dbMan installation directory (e.g. /usr/lib/dbman/dbmanrc), but if user have own ~/.dbmanrc file, this one is use and standard isn't.

For more information about configuration file please read manual.

dbMan proxy installation

For using dbMan proxy you need Perl modules Storable, IO::Socket and Socket. dbman-proxy use localization from dbMan's dbManLang.pm and all dbMan's standard environment variables. Default configuration file for dbman-proxy is like dbMan's configuration file - only name is dbman-proxyrc.

Standard hostname for dbman-proxy is localhost and port 2401 (why 2401 ? ... my girl was born at Jan 24 - can be solution for this problem :-) ).

Checksum testing

Testing checksum for all files can be done from dbman directory via

	./test-everything


Go back to main page