summaryrefslogtreecommitdiffstats
path: root/readme.lsb
blob: aed8419e03f5769e119b5fe673862199407a9d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Compiling Pegasus to be Linux Standard Base compliant.


Author: Konrad Rzeszutek <konradr@us.ibm.com> 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

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 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_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 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.