v1.0.28.0

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], 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 named differently; they have been prepended a V, i.e. vgroupadd instead of just groupadd.

Prerequisites

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

popt (at least v1.6.4)

"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).

popt 1.8 (MinGW and GNUwin32) has it partially fixed (it still shows -a=STRING instead of -a STRING, and it shows single options twice (better than none at all in 1.6.4) in --usage.

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 (at least 20040404)

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://linux01.org:2222/prog-libHX.php (If you do not install it system-wide, put libHX.h and libHX.so* in the root of the vitalnix hierarchy.

libxml2 (v2.5.3 will do)

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.

libintl (MinGW only)

Used by popt1.dll from GNUwin32. (The reason you do not need this under Linux is because libintl is compiled into libc.so.6.)

libiconv (MinGW only)

Used by libintl from GNUwin32. (The reason you do not need this under Linux is because libiconv is compiled into libc.so.6.)

Installing

From precompiled RPM

One is to install the precompiled RPM package; I recommend this for anyone just wanting to get it run.

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-pc-gnu-linux and i686-pc-gnu-linux can be found on the Vitalnix Homepage. If, for some reason this does not work, i.e. because you have a different shared library versions than I do, I suggest reverting to RPM from specfile (see below).

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 SparkUI /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/

From precompiled ZIP

Speaks for itself and applies to Win32 (i386-pc-mingw32) only. There is no real need to install ("fill up the registry") it, just extract the package into a new folder and run the applications from there.

From source

The second way is to compile from source. It is for those who want to keep it in a single directory. However, if you intend to install it system-wide after compilation, I still point to the RPM specfile.

tar -jvxf vitalnix-%version.tbz2;
cd vitalnix-%version;
./Makefile.RUN;

Extract the source tree and run Makefile.GNU. (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 compiled programs and libraries, so if you happen to run any of the utilities from a directory which has a different, say, libaccdb.so.0.0, that one will be used instead.

/etc, /usr/local/etc and . as search paths for configuration files are hardcoded into the programs.

There is no install target in the Makefile to encourage the use of some database (like RPM, but you can use any other too) to track what files are installed. This is because a new version's source tree might have different uninstall target files, and it is unlikely that the old source tree will be kept that long.

From RPM specfile

The third method, is to compile from source using the spec file for RPM. It is better than method #2 (source tree), as RPM will keep track of what files were installed. That info would be lost when using gmake's install. You will also be interested in this one when there is no precompiled RPM for your architecture and/or target OS. Especially because it combines the best of both worlds: machine-dependent flags and optimizations (will require adjustments of Makefile or specfile) and file tracking.

tar -jxf vitalnix-%version.tbz2;
cd vitalnix-%version;
./Makefile.RUN rpm;

You can then install the RPM found in $RPMBUILD_PATH/RPMS/%arch/. For SuSE, substitute $RPMBUILD_PATH with /usr/src/packages, for RedHat with /usr/src/redhat, others may differ.

Various flags

You can pass DEBUG=1 to gmake to enable debugging support for GDB. (Note: The Makefiles in CVS have DEBUG set to 1, the released packages DO NOT.)

As of Vitalnix v1.0.26.0, the make system has been silenced àla Linux v2.6.0. To get the usual make verbosity with printing all the commands that are executed, pass VERBOSE=1.


May 06 2004 http://vitalnix.sf.net/