Intructions for building the agent

Developing platform
I've done everything in an Ubuntu 10.10 Desktop but is not mandatory. You will need all the g++ stuff.

Required downloads

  • Microsoft XPlatProviders Version 1.0.0
    Copy the compressed file to you home directory
    unpack the file: tar xvf xplatproviders-1.0.0.tar.gz 
  • Pegasus CMPI header files
    Download OpenPegasus from here.
    Copy the contents of the CMPI directory to /usr/src/Pegasus/Provider/CMPI.
    The CMPI directory has this path (inside de zip file): .\pegasus\src\Pegasus\Provider\CMPI

Configure XPlatProviders 1.0.0

cd  xplatproviders-1.0.0
./configure --with-cmpi-headers=/usr/src/Pegasus/Provider/CMPI/
Created options.mak
Created ./source/code/include/scxcorelib/options.h
Created GNUmakefile
Configured for i686 Ubuntu Linux (Ubuntu)

Patch XPlatProviders 1.0.0

Download and copy to your home directory this file
Patch the sources:
cd ~/xplatproviders-1.0.0
patch -p1 < ../xplatproviders-1.0.0.patch
patching file build/Makefile.gcc3
patching file build/Makefile.pf.Linux
patching file build/xplatproviders/GNUmakefile.in
patching file GNUmakefile
patching file options.mak
patching file options.mk.sav
patching file source/code/common_lib/pal/system/disk/staticphysicaldiskinstance.cpp
patching file source/code/common_lib/pal/system/os/osinstance.cpp
patching file source/code/include/scxcorelib/options.h
patching file source/code/include/scxcorelib/scxcmn.h
patching file source/code/providers/meta_provider/metaprovider.cpp

Compiling

As we are in an Ubuntu box we need to override the normal behavior (that is to construct an ubuntu 10.10 provider)
Execute this:
make
(...)
XPlatProviders build is complete

Now we have this file: ~/xplatproviders-1.0.0/target/Linux_UBUNTU_10.10_x86_32_Release/libSCXCoreProviderModule.so

Ubuntu Package Building

Follow the intructions of the very very useful Muscetta Blog found here, just to the point when we have the skeleton. Don´t edit any file.

Download and copy to your home directory this patch.

Apply de patch:
cd ~/scx_1.0.4-265_i386
patch -p1 < ../scx_1.0.4-265_i386.patch
patching file debian/DEBIAN/control
patching file debian/DEBIAN/md5sums
patching file debian/DEBIAN/postinst
patching file debian/DEBIAN/postrm
patching file debian/DEBIAN/preinst
patching file debian/DEBIAN/prerm
patching file debian/etc/init.d/scx-cimd
patching file debian/usr/share/doc/scx/copyright
patching file debian-binary

Substitute de Provider library with the one we have just built
cp ~/xplatproviders-1.0.0/target/Linux_UBUNTU_10.10_x86_32_Release/libSCXCoreProviderModule.so ~/scx_1.0.4-265_i386/debian/opt/microsoft/scx/lib/providers/libSCXCoreProviderModule.so

Change the owner of the files
cd ~/scx_1.0.4-265_i386
sudo chown -R root.root debian

And build the Debian Package
sudo dpkg-deb --build debian scx-1.0.4-265.Ubuntu.10.x86.deb

That's all Folks!

Last edited Jan 6, 2011 at 3:47 PM by jripoll, version 4

Comments

No comments yet.