Compiling Pegasus to be Linux Standard Base compliant. Author: Konrad Rzeszutek Jun 29 2004 Required software ----------------- The following software is required to build lsb-pegasus: lsbdev-base >= 1.3.4-1 lsb >= 1.3.0-1 lsbdev-c++ >= 1.3.4-1 lsbappchk >=1.3.3-1 lsbdev-cc >= 1.3.0-1 lsblibchk >= 1.3.5-1 gcc >= 3.2.2 make >= 3.7x pam-devel >= 0.75 openssl >= 0.9.7d nALFS >= v020310 Jun 30 2004 NEWS: ----- Due to a CVS problem, there is a directory in the source that must be deleted manually: src/Pegasus/Config/install Use the rm command to delete, as so: $rm -Rf src/Pegasus/Config/install If you don't delete this directory, the RPM you build will not install: error: Failed dependencies: libpegconfig.so.1 is needed by lsb-pegasus-2.4-1 Build ----------- There are two ways of building. The semi-automated way (no environment variables) or the manual method (must set environment variables). 1). Without environment variables First time run the ./Configure script to set the proper paths and platform information. In most cases the script will automatically determine the correct paths and configuration. Note: The information is saved in config.status in case you want to redo it in the future. Next start the build process using nALFS. From nALFS README file, nALFS is "used for parsing the ALFS profiles (simple XML files) and, following those profiles, do various things (like executing commands), one by one, to (usually) compile some packages." nALFS webpage is http://www.linuxfromscratch.org/alfs/ To invoke the build process, provide the lsb-pegasus.xml file: $nALFS -i -v -l rpm/lsb-pegasus.xml After the compilation is done, to build the RPM binary file: $rpmbuild -ba rpm/lsb-pegasus.spec And you are done. 2). With environment variables For more information on each of the environment variables, please refer to the README file. You need to set twelve environment variables: CC, CXX, LSBCC_SHAREDLIBS, PEGASUS_PAM_AUTHENTICATION, PEGASUS_USE_PAM_STANDALONE_PROC, PEGASUS_HAS_SSL, PEGASUS_LOCAL_DOMAIN_SOCKET, PEGASUS_USE_RELEASE_DIRS, PEGASUS_LSB, PEGASUS_HOME, PEGASUS_ROOT, and PEGASUS_PLATFORM. The first two define that a LSB compiler should be used: export CC=lsbcc export CXX=lsbc++ And LSBCC_SHAREDLIBS tells LSB that OpenPegasus shared libraries are OK to compile with: export LSBCC_SHAREDLIBS=pegcommon:pegconfig:pegrepository:pegcompiler:peggetoopt:pegcliutils The next two make OpenPegasus compile with PAM authentication: export PEGASUS_PAM_AUTHENTICATION=1 export PEGASUS_USE_PAM_STANDALONE_PROC=1 ,to support SSL: export PEGASUS_HAS_SSL=1 , and connection to local domain sockets: export PEGASUS_LOCAL_DOMAIN_SOCKET=1 And very importantly the LSB flag which determines that OpenPegasus is compiled against an LSB compliant system: export PEGASUS_LSB=1 Also, two env to determine location of compiled binaries and the source, respectively: export PEGASUS_HOME=`pwd`/BINARIES export PEGASUS_ROOT=`pwd` Lastly, what platform it is compiled on: export PEGASUS_PLATFORM=LINUX_IX86_GNU When all of those environment variables are set, you can compile the code, as so: $make When the compilation is done, you have to pick the directory where the binary will be temporarily put to build an RPM. In the example, we picked the path /home/konrad/MAIN/pkgroot. $make PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/opt/lsb-pegasus \ SYSCONF_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/ \ LOCAL_STATE_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/var/opt/lsb-pegasus/ \ DEST_ETC_DIR=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/opt/lsb-pegasus install To build the RPM, you have to change in the rpm/lsb-pegasus.spec the BuildRoot path to be what you choose previously. Change accordingly, in our case, the BuildRoot will be: BuildRoot: /home/konrad/MAIN/pkgroot Lastly the RPM build process: $rpmbuild -b rpm/lsb-pegasus.spec And the OpenPegasus LSB compliant package is built.