1 konrad.r 1.1 Compiling Pegasus to be Linux Standard Base compliant.
2
3
4 Author: Konrad Rzeszutek <konradr@us.ibm.com> Jun 29 2004
5
6
7 Required software
8 -----------------
9
10 The following software is required to build lsb-pegasus:
11
12 lsbdev-base >= 1.3.4-1
13 lsb >= 1.3.0-1
14 lsbdev-c++ >= 1.3.4-1
15 lsbappchk >=1.3.3-1
16 lsbdev-cc >= 1.3.0-1
17 lsblibchk >= 1.3.5-1
18 gcc >= 3.2.2
19 make >= 3.7x
20 pam-devel >= 0.75
21 openssl >= 0.9.7d
22 konrad.r 1.1 nALFS >= v020310
23
24
25 Jun 30 2004 NEWS:
26 -----
27
28 Due to a CVS problem, there is a directory in the source
29 that must be deleted manually:
30
31 src/Pegasus/Config/install
32
33 Use the rm command to delete, as so:
34
35 $rm -Rf src/Pegasus/Config/install
36
37 If you don't delete this directory, the RPM you build will
38 not install:
39
40 error: Failed dependencies:
41 libpegconfig.so.1 is needed by lsb-pegasus-2.4-1
42
43 konrad.r 1.1
44 Build
45 -----------
46
47
48 There are two ways of building. The semi-automated way (no
49 environment variables) or the manual method (must set
50 environment variables).
51
52
53 1). Without environment variables
54
55 First time run the ./Configure script to set the proper
56 paths and platform information. In most cases the script
57 will automatically determine the correct paths and configuration.
58
59 Note:
60 The information is saved in config.status in case you want
61 to redo it in the future.
62
63 Next start the build process using nALFS. From nALFS README
64 konrad.r 1.1 file, nALFS is "used for parsing the ALFS profiles (simple
65 XML files) and, following those profiles, do various things
66 (like executing commands), one by one, to (usually) compile some packages."
67
68 nALFS webpage is http://www.linuxfromscratch.org/alfs/
69
70 To invoke the build process, provide the lsb-pegasus.xml file:
71
72 $nALFS -i -v -l rpm/lsb-pegasus.xml
73
74 After the compilation is done, to build the RPM binary file:
75
76 $rpmbuild -ba rpm/lsb-pegasus.spec
77
78 And you are done.
79
80
81 2). With environment variables
82
83 For more information on each of the environment variables, please
84 refer to the README file.
85 konrad.r 1.1
86 You need to set twelve environment variables: CC, CXX, LSBCC_SHAREDLIBS,
87 PEGASUS_PAM_AUTHENTICATION, PEGASUS_USE_PAM_STANDALONE_PROC,
88 PEGASUS_HAS_SSL, PEGASUS_LOCAL_DOMAIN_SOCKET, PEGASUS_USE_RELEASE_DIRS,
89 PEGASUS_LSB, PEGASUS_HOME, PEGASUS_ROOT, and PEGASUS_PLATFORM.
90
91 The first two define that a LSB compiler should be used:
92
93 export CC=lsbcc
94 export CXX=lsbc++
95
96 And LSBCC_SHAREDLIBS tells LSB that OpenPegasus shared
97 libraries are OK to compile with:
98
99 export LSBCC_SHAREDLIBS=pegcommon:pegconfig:pegrepository:pegcompiler:peggetoopt:pegcliutils
100
101 The next two make OpenPegasus compile with PAM authentication:
102
103 export PEGASUS_PAM_AUTHENTICATION=1
104 export PEGASUS_USE_PAM_STANDALONE_PROC=1
105
106 konrad.r 1.1 ,to support SSL:
107
108 export PEGASUS_HAS_SSL=1
109
110 , and connection to local domain sockets:
111
112 export PEGASUS_LOCAL_DOMAIN_SOCKET=1
113
114 And very importantly the LSB flag which determines that
115 OpenPegasus is compiled against an LSB compliant system:
116
117 export PEGASUS_LSB=1
118
119 Also, two env to determine location of compiled binaries and
120 the source, respectively:
121
122 export PEGASUS_HOME=`pwd`/BINARIES
123 export PEGASUS_ROOT=`pwd`
124
125 Lastly, what platform it is compiled on:
126
127 konrad.r 1.1 export PEGASUS_PLATFORM=LINUX_IX86_GNU
128
129 When all of those environment variables are set, you can
130 compile the code, as so:
131
132
133 $make
134
135 When the compilation is done, you have to pick the directory
136 where the binary will be temporarily put to build an RPM. In
137 the example, we picked the path /home/konrad/MAIN/pkgroot.
138
139 $make PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/opt/lsb-pegasus \
140 SYSCONF_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/ \
141 LOCAL_STATE_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/var/opt/lsb-pegasus/ \
142 DEST_ETC_DIR=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/opt/lsb-pegasus install
143
144 To build the RPM, you have to change in the rpm/lsb-pegasus.spec
145 the BuildRoot path to be what you choose previously.
146
147 Change accordingly, in our case, the BuildRoot will be:
148 konrad.r 1.1 BuildRoot: /home/konrad/MAIN/pkgroot
149
150 Lastly the RPM build process:
151
152 $rpmbuild -b rpm/lsb-pegasus.spec
153
154 And the OpenPegasus LSB compliant package is built.
155
|