Vitalnix : User Management Suite
  manual v1.0.21.7

Overview

setup - Instructions on how to compile and install Vitalnix

Preface

There are three ways of getting Vitalnix installed. In the following descriptions, replace %version and %arch appropriately. But before we can get to the install instructions, reading the next paragraph is obligatory.

Conflicting files

The Vitalnix package actually does "conflict" with other installed packages, as it provides some tools itself, which may already be installed by other -- possibly base system -- packages. This currently includes shadow[.rpm], and in near future coreutils, and possibly util-linux. The Vitalnix RPM has no "Conflict" or "Obsolete" tag set, as these issues are not resolved yet. Any files installed -- either by RPM or source tree -- are called different; they have been prepended a V, i.e. vgroupadd instead of just groupadd.

Prerequisites

Vitalnix depends on some libraries, popt, libHX and libxml2.

popt

"Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions. It improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments. Popt allows command line arguments to be aliased via configuration files and includes utility functions for parsing arbitrary strings into argv[] arrays using shell-like rules. <Developed by RedHat>"

Unfortunately, popt v1.6.4 (and probably before) have a severe cosmetical bug (options not displayed, instructions displayed wrong). I already sent a bug request to RedHat, the answer was that it got fixed, and will be available in CVS and rpm-4.x(can't remember).

A copy of popt-1.6.4 and my patch to fix it can be found at http://vitalnix.sf.net/popt-fix/ for now. The patch is not mandatory but it is better to go for it.

libHX

It is an all-purpose library, providing commonly used functions not available in standard libc's as well as OS-abstracted functions for various things.

The current version can be found in http://vitalnix.sf.net/libHX/ (If you do not install it system-wide, put libHX.h and libHX.so.0 in the root of the vitalnix hieararchy and change the Makefile near LIBHX_*). Always check this one if a new Vitalnix release is out.

libxml2

It is a library for parsing etc. of XML files. You can find it at http://xmlsoft.org/. You will need it only for C-Spark.

Installing

From precompiled RPM

One is to install the precompiled RPM package; I recommend this for anyone just wishing to "get it run", however I reserve this for when Vitalnix is stable :-).

rpm -Uhv vitalnix-%version.%arch.rpm

This single command installs the RPM. Unless rpm returns some error, this is all there is to do. Precompiled RPM packages for i586 and i686 can be found on the Vitalnix Homepage.

From source

The second way is to compile from source. It is for those purists and, of course, developers. If you intend to install from self-compiled source, I still point to RPM specfile. If you want to play around with it and keep it in your own directory, this one is ideal.

tar -jvxf vitalnix-%version.tbz2;
cd vitalnix-%version;
Makefile.generate;

Extract the source tree and run Makefile.generate. (You may add any GNU make relevant flags, like -j2.) If everything went well, ACCDB, its back-ends, system programs and C-spark will be compiled, lying in the current directory (the root of the Vitalnix tree). Note that "." is added to the library search paths for all of Vitalnix, so if you happen to run any of the utilities from a directory which has a different libaccdb.so.0.0, that one will be used instead.
To compile with libHX located in a different directory than system directories, edit the Makefile or pass LIBHX_INCLUDE=/home/my/include and LIBHX_LIBDIR=/home/my/libs, for example.

To install the compiled binaries to system folders, run Makefile.generate install. The default paths to which the binaries and modules will be installed are the ones listed below. To change this behavior, you can pass some variables to gmake (or edit the Makefile). Specifying PREFIX prepends that path to all directories listed below. Any of the variables BINDIR (default /bin), ETCDIR (/etc), USRINC (/usr/include), USRBIN (/usr/bin), USRSBIN (/usr/sbin) and VARLIB (/var/lib) override PREFIX.

From RPM specfile

The third method, is to compile from source using the spec file for RPM (maybe APT?). It is better than method #2, as RPM will keep track of what files were installed. That info would not be recorded otherwise. You will also be interested in this one when there is no precompiled RPM for your architecture and/or target OS.

tar -jxvf vitalnix-%version.tbz2;
cd vitalnix-%version;
Makefile.generate rpm RPMBUILD_PATH=/usr/src/packages;

You can then install the RPM found in $RPMBUILD_PATH/RPMS/%arch/.

File locations

Program files will be installed in these paths:

libaccdb and ACCDB modules /usr/lib/
Configuration files for libaccdb /etc/libaccdb/
Include files for libaccdb /usr/include/
Administrative programs (login, useradd, etc.) Various locations, /bin/, /usr/sbin/
Configuration files for administrative programs /etc/
Vitalnix supply programs (mkgroupdir, sdf2xml) /usr/lib/vitalnix/
C-spark binary /usr/sbin/
Configuration file for Spark (any UI) /etc/spark.conf
SLANED binary /usr/sbin/
Configuration file for SLANED /etc/slaned.cfg
Start script for SLANED /etc/init.d/slaned
Runtime data (which is your XML input files) /var/lib/vitalnix/
Documentation (only installed by RPM package) /usr/share/doc/packages/

Debugging

You can pass DEBUG=1 to gmake (or edit the Makefile) to enable debugging support for GDB.


January 25 2004 http://vitalnix.sf.net/