openQM GPL Release 2.2.0 for PowerPC
Download openQM 2.2-0
Jon Kristofferson's PPC patches were incorporated in the openQM 2.2.0 release but a couple of minor problems were found and the /etc and /etc/xinetd.d entries were omitted from the GPL release again. I have put together a tarball of Doug's openqm_2.2-0-2005-06-15 release.

This tarball is Doug's release with the addition of:
  • Minor patches to qmconv.c to correct a couple of duplicate definitions. These patches have been tested on both PPC and Intel architectures.
  • A modified Makefile that will compile and install qmfix and qmconv.
  • Startup scripts (rc.d scripts) for Debian and RedHat.
  • A brief INSTALL.linux file to help both little and big endian users I hope.
  • The /etc/qmconfig and /etc/xinetd.d/qm* files that were packed with earlier releases but missing from this one.
  • New 16 Aug 05 A bug in phantom processes' handling of output was found and repaired by Doug and Martin. This bug could cause the VOC ~0 file to be overwritten, a very serious condition. The patches supplied by Doug have been applied and are included.
  • New 16 Aug 05 A bug in the BASIC INPUT function pertaining to the Backspace key and terminfo has been fixed in this release. A patch file is included in the tarball for those who wish to repair an older installation. See the 'README.openQM-GPL' file in the qmsys directory for instructions.
  • New 16 Aug 05 Simplified installation scripts are included.
  • New 16 Aug 05 Gentoo init scripts are now included.
  • New 16 Aug 05 The tape functions (below) are now installed in the tarball.
  • New 16 Aug 05 A DEMO account containing the openQM tutorial is included in this release.
  • New 24 Aug 05 The install scripts have been improved and now detect and create backups of existing configuration files.
  • New 24 Aug 05 The /usr/qmsys/bin/qm file has been changed from a symlink (../csrc/qm) to a copy of the qm binary found in /usr/qmsys/csrc/qm. This allows a proper symlink to this binary to be placed in /usr/bin
  • New 01 Sep 05 A QMClient module for php4 is included in the extras directory. See below for more information.
  • New 01 Sep 05 Big Endian support for the QMClientLib subsystem has been added. Patch files have been applied and are included in the extras subdirectory as 'be_tio.patch' and be_client.patch'. The qmclilib patch also includes the multiple connection support added recently by Martin. Since I haven't had time to check this out I can add no documentation for this feature right now.
  • New 01 Sep 05 New functionality has been added to the T-DUMP program allowing record ID's to be specified on the command line as well as an option to specify a saved list.
  • New 01 Sep 05 Doug's fix for a hiccup in the HTTP.SUB routine has been applied.
  • New 01 Sep 05 A patch file for MAC OSX supplied by Montgomery Tidwell is included in this release. I have not tested this patch. This is an update of his last patch.
  • New 23 Sep 05 A new keyword 'COL.HDG.ID' has been added to the SORT and LIST verbs which displays the name of the dictionary item instead of the 'Display' attribute.
  • New 23 Sep 05 Many enhancements to the 'DELIMITER' keyword were kindly provided by Martin. The query processor should now be on par with the 2.2-11 release.
  • New 23 Sep 05 The php4 interface has been more thoroughly tested and enhanced (see below).
The INSTALL.linux file is reproduced at the right.

The PPC/Intel indifferent tarball can be downloaded here.

Many thanks to Martin and Doug for making this great open source project possible.
Installation from openQM source for Linux systems.

There is a patch file (/usr/qmsys/csrc/openqm.patch) containing
some fixes to qmconv.c and the Makefile to allow use on PPC
systems. This has already been applied in this tarball but if
you wish to apply it to another, use:
  # cd /usr/qmsys/csrc
  # patch < openqm.patch
Then recompile the system. This patch has been tested on the
following systems:
  Yellow Dog Linux 3.0 PPC
  Debian Sarge PPC
  Debian Sarge i386 - i686
  RedHat 9.0 i386 - i686
  RedHat 8.0 i386

A patch for a phantom process bug which was supplied by Doug
Dimitru is included and has been applied (phanbugk.patch and
phanbugo.patch). To install on an existing system:
  # cd /usr/qmsys/csrc
  # patch < phanbugk.patch
  # patch < phanbugo.patch
Then recompile the system:
  # make clean
  # make install

The Makefile in this tarball has also been modified to compile
and install qmconv.c for endian changes to the file structure.

1. Unpack the tarball (we will use the default /usr/qmsys):
   # cd /usr
   # tar jxvf {path_to}openqm_version.tar.bz2

2. CD to the source directory, compile and install new binaries:
   # cd qmsys/csrc
   # make clean
   # make install

3. If needed, please do this before installing the startup components!
   If installing on PowerPC (big endian) system, reorganize the
   file system byte order:
   # bin/qmconv -B *

3a.Install startup components:
   # cd /usr/qmsys/etc/{system_name}
   Where {system_name} is one of:
     debian       for Debian
     redhat       for RedHat and YellowDog
     gentoo       for Gentoo

   # ./install.sh

That's it! You should now have openQM running.

NOTE: The above instructions are tested on Debian and RedHat Linux.
Other systems may have different rc.d structures and the startup files
may need to be modified to reflect this.


openQM Tape/Backup/Restore Functions
Beta Testers Wanted!

I have a working and pretty well tested collection of programs designed to allow full backup/restore functionality to openQM.

The programs offered here are meant to be used with openQM 2.2.0 which may be downloaded from http://www.openqm.org/ or for PPC (and Intel) above. The README file is reproduced at the right and you may download the programs here.

Your testing, suggestions and comments will be welcome. A list of planned enhancements that I would like to implement as soon as the time is available:
  • Multi-Reel support. The beginnings are at hand, soon I hope to be able to assign a volume size (1.44mb; 640mb; 4.77gb; etc) and the system will increment image names (backup01, backup02, etc.). these images could then be written to appropriate media by a system program (dd, mkisofs/cdrecord, etc.).
  • On the fly compression. MV data is usually mostly text, this could save large amounts of space.
  • Additional programs to recursively call ACCOUNT-SAVE and ACCOUNT-RESTORE to perform full FILE-SAVE and RESTORE. These should be pretty simple to implement ... just a matter of making the time.
  • Your suggestions are welcome. My goals have been to create a functional backup and restore system as well as something that will allow me to import data and accounts from PICK systems. So I am getting close to fulfilling my own needs.


Many thanks to Martin and Doug for making this great open source project possible.
A new suite of programs for openQM to facilitate and perform backup and
restore functions. As of 06 August 2005 these programs are functional but
are considered beta software.

To install this package into openqm-2.2.0:

Download the tarball into the qmsys directory (assumed here to be /usr/qmsys):
# cd /usr/qmsys
# wget http://www.blackflute.com/set-device.tgz

Back up SYSCOM/PARSER.H:
# mv SYSCOM/PARSER.H SYSCOM/PARSER.H.bak

Unpack the distribution:
# tar zxvf set-device.tgz
BP/ACCRST
BP/ACCSVE
BP/SETDEV
BP/TAPE
BP/tape.h
SYSCOM/PARSER.H
set-device.dump
README.set-device
#

Log into openQM, load the VOC entries and compile the programs:
# bin/qm
: T-LOAD VOC set-device.dump OVERWRITING
ACCOUNT-RESTORE - 14
ACCOUNT-SAVE - 14
ACCOUNT.RESTORE - 14
SET-DEVICE - 12
SET.DEVICE - 12
T-DET - 12
T-DUMP - 14
T-EOD - 12
T-FWD - 12
T-LOAD - 14
T-RDLBL - 12
T-READ - 12
T-REW - 12
T-STATUS - 12
T-WEOF - 12

: T-LOAD NEWVOC set-device.dump OVERWRITING
ACCOUNT-RESTORE - 14
ACCOUNT-SAVE - 14
ACCOUNT.RESTORE - 14
SET-DEVICE - 12
SET.DEVICE - 12
T-DET - 12
T-DUMP - 14
T-EOD - 12
T-FWD - 12
T-LOAD - 14
T-RDLBL - 12
T-READ - 12
T-REW - 12
T-STATUS - 12
T-WEOF - 12

: BASIC BP ACCRST ACCSVE SETDEV TAPE
  { ... compiler output with some warnings ...}

Now that the new programs are installed, load any messages that might (will) be
missing:

: SET-DEVICE set-device.dump
[7536] Message not found
:T-RDLBL
L 01F4 10:49:40  06 AUG 2005 VOC                                            01
[7527] Message not found
:T-FWD
[7527] Message not found
[7524] Message not found
:T-RDLBL

[7527] Message not found
[7524] Message not found
:T-RDLBL
L 01F4 10:50:09  06 AUG 2005 MESSAGES                                       01
[7527] Message not found
:T-LOAD MESSAGES
7520 exists on file.
    1 7532 - 15
    2 7528 - 15
    3 7524 - 12
    4 7536 - 13
    5 7538 - 13
    6 7526 - 23
    7 7530 - 15
    8 7522 - 21
    9 7534 - 15
   10 7525 - 15
   11 7537 - 64
   12 7529 - 15
   13 7533 - 15
   14 7521 - 61
   15 7523 - 23
   16 7535 - 28
   17 7531 - 15
   18 7527 - 15
7504 exists on file.
  { ... }
7515 exists on file.
18 items loaded into MESSAGES

You should now have the current (06 Aug 2005) tape handling, backup and restore
systems installed and running. I think that Martin is keeping the documentation
up to date with the latest releases at: http://www.openqm.com/downloads.htm
under 'Command Reference Guide'. The documentation might be a little out of sync
with this release.

NOTES:
Above, the 'T-LOAD' verb has been shipped with openQM 2.2.0 and can be used
to load the T-DUMP of the new verb definitions into the VOC (and NEWVOC if you
wish them to become part of new accounts).

The versions of T-LOAD and T-DUMP shipped with openQM 2.2.0 require two
arguments: The name of the openQM file being DUMPed or LOADed and the name of
the O/S file that will act as the pseudo tape device.

After loading and compiling the SET-DEVICE suite, these requirements will
change and only the openQM {DICT} file name will be required. The name of the
tape 'device' will be handled by the SET-DEVICE set of programs. If a device
is attached when one of these commands is issued, it is used. If no device is
attached the user is prompted for a name and SET-DEVICE is called.

This is a large improvement in functionality particularly for the T-DUMP and
T-LOAD functions because it allows multiple file DUMPs and LOADs to one 'tape'.
In the previous approach, each time that the command was issued the pseudo
tape would be 'rewound' and would always be set to the beginning of the file
so that doing something like:

: T-DUMP DICT SOMEFILE /home/me/some.dump
: T-DUMP SOMEFILE /home/me/some.dump
: T-DUMP DICT OTHERFILE /home/me/some.dump
: T-DUMP OTHERFILE /home/me/some.dump

Would result in the pseudo tape containing only the data from 'OTHERFILE'. With
the SET-DEVICE suite, one can accomplish what was desired above:

: SET-DEVICE /home/me/some.dump
: T-DUMP DICT SOMEFILE
: T-DUMP SOMEFILE
: T-DUMP DICT OTHERFILE
: T-DUMP OTHERFILE
: T-REW
: T-DET

The SET-DEVICE suite opens (or creates) the pseudo tape file and maintains
pointers that last the life of the login session or until explicitly released
using the 'T-DET' command. In the above example after the dictionary items for
'SOMEFILE' are dumped, the pointer remains at the end of the dictionary dump.
When the data portion is dumped it is placed after the dictionary items and so
on.

This file (/home/me/some.dump) could be taken to another system via ftp, e-mail
or whatever, then loaded into the other system:

: SET-DEVICE /home/you/some.dump
: T-REW
: T-RDLBL
L 01F4 14:23:16  16 JUN 2005 DICT SOMEFILE                                   01
: CREATE-FILE SOMEFILE
: T-LOAD DICT SOMEFILE
: T-RDLBL
Block size:  500

End of file.
: T-RDLBL
L 01F4 14:23:16  16 JUN 2005 SOMEFILE                                        01
: T-LOAD SOMEFILE

In the above example, we peeked at the tape label to see what it contained.
With that information we created the new file. Note that the tape does not
rewind but remains at the beginning of the dictionary dump. The dictionary
items are loaded, then T-RDLBL is used again to determine the next contents of
the tape and so on.

The commands available in this suite are:
ACCOUNT-SAVE account_name
Performs an R83/AP/D3 compatible ACCOUNT-SAVE of account_name.

ACCOUNT-RESTORE account_name
Restores from an R83/AP/D3 compatible ACCOUNT-SAVE.

T-DUMP {DICT} file_name
Dumps the contents of a file to pseudo tape image.

T-LOAD {DICT} file_name
Loads from a T-DUMP image.

SET-DEVICE /path/to/pseudo_tape_file
Attaches to or creates and attaches the openQM session to a pseudo tape image.
The user running the openQM process must have read and write permissions on
this file. If simply restoring or loading (and assuming the file exists) then
only read permissions are required.

T-REW
Rewinds the attached pseudo tape to its beginning.

T-RDLBL
Reads the label of pseudo tape.

T-READ
Reads the attached tape image a block at a time. Normal system pagination is in
effect.

T-FWD
Skip to next End Of File (EOF) marker.

T-EOD
Skip forward to End of Recorded Data (EOD).

T-STATUS
Displays status of attached tape including block size, device name, pointer
information, EOF and EOD status.

T-WEOF
Writes EOF marker at current tape position.

T-DET
Detaches currently attached tape.

COMPATIBILITY NOTES:
The pseudo tape images created and read by these programs are referred to as
'R83/AP/D3 Compatible'. There are two caveats to this:

1. Only the 500 byte 'floppy' block size is supported.
2. Not fully R83 compatible in that attribute<8> of FDI's is used to contain
   B-Tree index information a la AP and D3. I believe that this is simply
   ignored by R83 but have not tested restores to R83 systems.
3. Since openQM 'D' type dictionary items do not exist in R83/AP/D3 systems,
   they are converted into 'A' type items on the tape. These should restore
   well into a PICK system but the additional functionality available in 'D'
   types will of course not be available in PICK. When these are restored into
   openQM, they are again converted into 'D' type items. The additional
   information is stored in attribute<17> on the tape ... this is 'Extended
   Description' in PICK and so should simply show as a comment on these systems.

Please send any complaints, suggestions, bugs or comments to me:
  Tom deLombarde <tomd@blackflute.com>



openQM php4 Module
Beta Testers Wanted!

I have a working and pretty well tested php4 module to allow web enabling of an openQM database. The php4 command line interface (cli) is supported as well.

The programs offered here are meant to be used with openQM 2.2.0 which may be downloaded from http://www.openqm.org/ or for PPC (and Intel) above. The README file is reproduced at the right and you may download the programs here.

Please NOTE that this is included in the openQM tarball above.

Your testing, suggestions and comments will be welcome. This work is not as well documented as I would like it to be but that will come soon.

Many thanks to Martin and Doug for making this great open source project possible.
This directory contains all of the openQM specific things that you need to
build a functioning openQM Client module for php4.

Also included are binaries that should work on linux Intel and PPC systems
so there is likely no need to build new ones. If for whatever reason you
wish to build a new one, please see the (skimpy for now) Installation Notes
below the binary installation notes.

Note: There are two SWIG directories:

1. extras/php/qm-php
   This contains the bare necessities for building the php module from
   scratch. It should only be necessary to build this from scratch if the
   qmclilib.c file has been changed or if a different version of php is
   needed.

2. extras/php/qm-php.build
   This contains all of the files produced by building the module from the
   files above. The key file here is qmclilib_wrap.c - this is produced by
   SWIG and is the source for the php wrappers. Compiling this file will
   produce the php4 module without needing to install SWIG.

   Because this depends upon not yet released SWIG functionality, unless you
   have good reason to do so, building from the ground up is not recommended.

   To build from qmclilib_wrap.c:

   # gcc -I ./ `php-config --includes` -fpic -c qmclilib_wrap.c
   # gcc -Wall -fpic -c qmclilib.c -I ./
   # ld -shared qmclilib.o qmclilib_wrap.o -o php_qmclilib.so
   # cp -vp php_qmclilib.so `php-config --extension-dir`

To use the binary modules:

Intel:
1. Determine the location of your php4 extension directory by one of:
   # php-config --extension-dir
     or
   Put a call to phpinfo() into a script and look for extension dir in output

2. Copy the binary to your extension dir:
   # cp -p qm-php.build/php_qmclilib.so {extension dir}
     (if the php-config command above works, you can:)
   # cp -p qm-php.build/php_qmclilib.so `php-config --extension-dir`

3. Add a line to your php.ini files, usually:
   /etc/php4/apache/php.ini
   /etc/php4/cli/php.ini

   Add the line:
     extension=php_qmclilib.so

4. Restart Apache, usually:
   # /etc/init.d/apache restart

Big Endian Systems:
1. Determine the location of your php4 extension directory by one of:
   # php-config --extension-dir
     or
   Put a call to phpinfo() into a script and look for extension dir in output

2. Copy the binary to your extension dir:
   # cp -p ppc/php_qmclilib.so.ppc {extension dir}/php_qmclilib.so
     (if the php-config command above works, you can:)
   # cp -p ppc/php_qmclilib.so.ppc `php-config --extension-dir`/php_qmclilib.so

3. Add a line to your php.ini files, usually:
   /etc/php4/apache/php.ini
   /etc/php4/cli/php.ini

   Add the line:
     extension=php_qmclilib.so

4. Restart Apache, usually:
   # /etc/init.d/apache restart

Once you have installed this, there are three php programs included with which
you can test your installation: lib.php, lib_chap2.php and lib_chap3.php

These programs now rely upon the php include file 'qmclilib.php' and the path
is hard coded in the scripts as 'include/qmclilib.php' so when you copy these
into your DocumentRoot directory you also need to create a directory named
'include' and copy qmclilib.php into it (or change the path in the scripts to
point to where qmclilib.php lives).

These scripts were based on the 'LIB' BASIC program included in the openQM
tutorial which can be found at http://www.openqm.com/downloads/tutorial.pdf.
As I get the time I hope to turn them into a tutorial to help BASIC programmers
learn php. Until then you are welcome to compare them to the original program
as a self-tutor of sorts.

lib.php is pretty much a rewrite of the LIB BASIC program. The user must know
the item id's of the books and readers items.

lib_chap2.php demonstrates how to construct pull-downs from database queries
and place them into an HTML form.

lib_chap3.php adds Enter/Update (data entry) forms allowing the creation of new
items and modification of existing items.

There are live demo's of these online:
  http://openqm.blackflute.com/lib.php
  http://openqm.blackflute.com/lib_chap2.php
  http://openqm.blackflute.com/lib_chap3.php

Installation Notes:
I am pressed for time so these are pretty basic and assume some knowledge
of php4 and SWIG.

Requirements IF you want to build from the ground up (see above):

NOTE:
  Because this depends upon not yet released SWIG functionality, unless you
  have good reason to do so, building from the ground up is not recommended.

1. The php4-dev package and libraries.
2. SWIG-1.3.26 and any dependencies.

If SWIG-1.3.26 has not been released, you must get a cvs checkout of this
version (or later) from http://www.swig.org/cvs.html

There is a makefile in the qm-php directory. All needed files are included
in this directory as well. The makefile is very simple and works on my
Debian systems. It may fail on others. The makefile depends upon a command
that is included in the php4-dev package on Debian named 'php-config' and
uses it to set the Include variable for the compiler and to find the dir
into which to install the finished php_qmclilib.so file. The makefile
doesn't restart Apache or anything.

Have fun. If you are building this to do development and need help please
e-mail me and I will see what I can do.

Please send any complaints, suggestions, bugs or comments to me:
  Tom deLombarde <tomd@blackflute.com>

Home PageContact InformationWeb and E_Mail Hosting InformationWild Dismay!Photography Sets You Apart

Cost of the War in Iraq
(JavaScript Error)
To see more details, click here.