(file) Return to tog-pegasus.spec CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

  1 martin 1.115 #//%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.116 #//
  3 martin 1.115 #// Licensed to The Open Group (TOG) under one or more contributor license
  4              #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5              #// this work for additional information regarding copyright ownership.
  6              #// Each contributor licenses this file to you under the OpenPegasus Open
  7              #// Source License; you may not use this file except in compliance with the
  8              #// License.
  9 martin 1.116 #//
 10 martin 1.115 #// Permission is hereby granted, free of charge, to any person obtaining a
 11              #// copy of this software and associated documentation files (the "Software"),
 12              #// to deal in the Software without restriction, including without limitation
 13              #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14              #// and/or sell copies of the Software, and to permit persons to whom the
 15              #// Software is furnished to do so, subject to the following conditions:
 16 martin 1.116 #//
 17 martin 1.115 #// The above copyright notice and this permission notice shall be included
 18              #// in all copies or substantial portions of the Software.
 19 martin 1.116 #//
 20 martin 1.115 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.116 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.115 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23              #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24              #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25              #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26              #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.116 #//
 28 martin 1.115 #//////////////////////////////////////////////////////////////////////////
 29 w.otsuka 1.1   #%/////////////////////////////////////////////////////////////////////////////
 30                #
 31                # tog-pegasus.spec
 32                #
 33 denise.eckstein 1.32  #%/////////////////////////////////////////////////////////////////////////////
 34                       
 35                       #
 36 kumpf           1.119 # WARNING: This file is automatically generated by executing
 37 denise.eckstein 1.32  #   make -f pegasus/Makefile.Release create_OpenPegasusRPMSpecFile
 38 denise.eckstein 1.74  # Any changes made directly to this file in the OpenPegasus source will
 39                       # be lost the next time this file is regenerated and submitted to CVS.
 40 w.otsuka        1.1   #
 41 denise.eckstein 1.32  
 42 s.kodali        1.122 %define Flavor  tog
 43 dave.sudlik     1.107 %define packageVersion 1
 44 karl            1.129 Version: 2.12.0
 45 denise.eckstein 1.102 Release: %{packageVersion}%{?LINUX_VERSION:.%{LINUX_VERSION}}
 46 w.otsuka        1.56  Epoch:   1
 47 denise.eckstein 1.32  
 48                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 49 denise.eckstein 1.74  #
 50 w.otsuka        1.56  %{?!PEGASUS_BUILD_TEST_RPM:   %define PEGASUS_BUILD_TEST_RPM        0}
 51 denise.eckstein 1.74  # do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM.
 52                       #
 53                       %{?!AUTOSTART:   %define AUTOSTART        0}
 54                       # Use "rpm -[iU]vh --define 'AUTOSTART 1'" in order to have cimserver enabled
 55                       # (chkconfig --level=345 tog-pegasus on) after installation.
 56                       #
 57 s.kodali        1.121 # Use "rpmbuild --define 'JMPI_PROVIDER_REQUESTED 1'" to include JMPI support.
 58                       %{?!JMPI_PROVIDER_REQUESTED: %define JMPI_PROVIDER_REQUESTED 0}
 59 denise.eckstein 1.74  
 60 s.kodali        1.125 # Use "rpmbuild --define 'EXTERNAL_SLP_REQUESTED 1'" to include External SLP support.
 61                       %{?!EXTERNAL_SLP_REQUESTED: %define EXTERNAL_SLP_REQUESTED 0}
 62                       
 63 s.kodali        1.128 # Use "rpmbuild --define 'PEGASUS_32BIT_PROVIDER_SUPPORT 1'" to build 32 bit
 64                       # providers for 64 bit CIMOM.
 65                       %{?!PEGASUS_32BIT_PROVIDER_SUPPORT: %define PEGASUS_32BIT_PROVIDER_SUPPORT 0}
 66                       
 67 denise.eckstein 1.74  Summary:   OpenPegasus WBEM Services for Linux
 68 s.kodali        1.122 Name:      %{Flavor}-pegasus
 69 denise.eckstein 1.74  Group:     Systems Management/Base
 70                       License:   Open Group Pegasus Open Source
 71                       BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 72                       URL:       http://www.openpegasus.org
 73                       
 74 denise.eckstein 1.102 Source:    %{name}-%{version}-%{packageVersion}.tar.gz
 75 yi.zhou         1.93  #
 76                       # End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 77 denise.eckstein 1.74  
 78 yi.zhou         1.93  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 79                       #
 80 denise.eckstein 1.74  BuildRequires:      bash, sed, grep, coreutils, procps, gcc, gcc-c++
 81                       BuildRequires:      libstdc++, make, pam-devel
 82                       BuildRequires:      openssl-devel >= 0.9.6, e2fsprogs
 83 s.kodali        1.121 %if %{JMPI_PROVIDER_REQUESTED}
 84                       BuildRequires:      gcc-java, libgcj-devel, libgcj, java-1.4.2-gcj-compat
 85                       Requires:           libgcj, java-1.4.2-gcj-compat
 86                       %endif
 87 s.kodali        1.125 %if %{EXTERNAL_SLP_REQUESTED}
 88 s.kodali        1.126 BuildRequires:      openslp
 89                       Requires:           openslp
 90 s.kodali        1.125 %endif
 91                       
 92 yi.zhou         1.93  BuildRequires:      net-snmp-devel
 93                       #
 94                       # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 95                       
 96                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
 97                       #
 98 denise.eckstein 1.74  Requires:           bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 99 dev.meetei      1.130 #Requires:          krb5-libs, chkconfig, SysVinit, bind-libs
100 denise.eckstein 1.74  Requires:           e2fsprogs, bind-utils, net-tools
101                       Requires(post):     bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
102 dev.meetei      1.130 #Requires(post):    krb5-libs, chkconfig, SysVinit, bind-libs
103 denise.eckstein 1.74  Requires(post):     e2fsprogs, bind-utils, net-tools
104                       Requires(pre):      bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
105 dev.meetei      1.130 #Requires(pre):     krb5-libs, chkconfig, SysVinit, bind-libs
106 denise.eckstein 1.74  Requires(pre):      e2fsprogs, bind-utils, net-tools
107                       Requires(postun):   bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
108 dev.meetei      1.130 #Requires(postun):  krb5-libs, chkconfig, SysVinit, bind-libs
109 denise.eckstein 1.74  Requires(postun):   e2fsprogs, bind-utils, net-tools
110 yi.zhou         1.93  Requires:           net-snmp
111                       #
112                       # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
113 denise.eckstein 1.74  
114 yi.zhou         1.93  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
115                       #
116 w.otsuka        1.73  Conflicts: openwbem
117 s.kodali        1.122 Provides: %{Flavor}-pegasus-cimserver
118                       BuildConflicts: %{Flavor}-pegasus
119 w.otsuka        1.1   
120                       %description
121 w.otsuka        1.9   OpenPegasus WBEM Services for Linux enables management solutions that deliver
122 w.otsuka        1.1   increased control of enterprise resources. WBEM is a platform and resource
123                       independent DMTF standard that defines a common information model and
124                       communication protocol for monitoring and controlling resources from diverse
125                       sources.
126 denise.eckstein 1.74  #
127 yi.zhou         1.93  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
128 w.otsuka        1.1   
129 denise.eckstein 1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
130                       #
131 w.otsuka        1.54  %ifarch ia64
132 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_IA64_GNU
133 w.otsuka        1.1   %else
134 w.otsuka        1.54  %ifarch x86_64
135                       %global PEGASUS_HARDWARE_PLATFORM LINUX_X86_64_GNU
136                       %else
137 w.otsuka        1.24  %ifarch ppc
138 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC_GNU
139 w.otsuka        1.24  %else
140 denise.eckstein 1.44  %ifarch ppc64 pseries
141 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC64_GNU
142 w.otsuka        1.24  %else
143                       %ifarch s390
144 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES_GNU
145 w.otsuka        1.24  %else
146                       %ifarch s390x zseries
147 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES64_GNU
148 w.otsuka        1.24  %else
149 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_IX86_GNU
150 kumpf           1.119 %endif
151                       %endif
152                       %endif
153                       %endif
154 w.otsuka        1.1   %endif
155 w.otsuka        1.24  %endif
156 denise.eckstein 1.74  #
157                       # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
158 w.otsuka        1.55  
159 s.kodali        1.128 # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch-for-32bit-provider-support.spec
160                       # This is required only when PEGASUS_32BIT_PROVIDER_SUPPORT is set
161                       
162                       %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
163                       
164                       %ifarch x86_64
165                       %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_IX86_GNU
166                       %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wno-unused -m32"
167                       %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=i386 -mtune=generic -fasynchronous-unwind-tables -m32"
168                       %else
169                       %ifarch ppc64 pseries
170                       %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_PPC_GNU
171                       %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -m32 -Wno-unused"
172                       %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -m32"
173                       %else
174                       %ifarch s390x zseries
175                       %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_ZSERIES_GNU
176                       %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -Wno-unused"
177                       %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31"
178                       %endif
179                       %endif
180 s.kodali        1.128 %endif
181                       
182                       %endif
183                       
184                       #
185                       # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch-for-32bit-provider-support.spec
186                       
187 denise.eckstein 1.81  %global PEGASUS_ARCH_LIB %{_lib}
188 w.otsuka        1.86  %global OPENSSL_HOME /usr
189 denise.eckstein 1.81  %global OPENSSL_BIN /usr/bin
190                       %global PEGASUS_PEM_DIR /etc/Pegasus
191                       %global PEGASUS_SSL_CERT_FILE server.pem
192                       %global PEGASUS_SSL_KEY_FILE file.pem
193                       %global PEGASUS_SSL_TRUSTSTORE client.pem
194                       %global PAM_CONFIG_DIR /etc/pam.d
195                       %global PEGASUS_CONFIG_DIR /etc/Pegasus
196                       %global PEGASUS_VARDATA_DIR /var/lib/Pegasus
197                       %global PEGASUS_VARDATA_CACHE_DIR /var/lib/Pegasus/cache
198                       %global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH  /var/run/tog-pegasus/socket/cimxml.socket
199                       %global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid
200 yi.zhou         1.98  %global PEGASUS_TRACE_FILE_PATH /var/lib/Pegasus/cache/trace/cimserver.trc
201 kumpf           1.94  %global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
202 denise.eckstein 1.81  %global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository
203                       %global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository
204                       %global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus
205                       %global PEGASUS_PREV_REPOSITORY_DIR /var/lib/Pegasus/prev_repository
206                       %global PEGASUS_SBIN_DIR /usr/sbin
207 karl            1.129 %global PEGASUS_DOC_DIR /usr/share/doc/tog-pegasus-2.12
208 denise.eckstein 1.81  
209                       %global PEGASUS_RPM_ROOT  $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
210 denise.eckstein 1.95  %global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build
211 denise.eckstein 1.81  %global PEGASUS_INSTALL_LOG /var/lib/Pegasus/log/install.log
212                       
213 denise.eckstein 1.32  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
214 denise.eckstein 1.74  #
215 w.otsuka        1.69  %package devel
216 denise.eckstein 1.32  Summary: The OpenPegasus Software Development Kit
217                       Group: Systems Management/Base
218 s.kodali        1.122 Requires: %{Flavor}-pegasus >= %{version}
219                       Obsoletes: %{Flavor}-pegasus-sdk
220 w.otsuka        1.1   
221 w.otsuka        1.69  %description devel
222 denise.eckstein 1.74  The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
223                       OpenPegasus WBEM Services for Linux release. It provides Linux C++ developers
224                       with the WBEM files required to build WBEM Clients and Providers. It also
225                       supports C provider developers via the CMPI interface.
226 w.otsuka        1.1   
227 w.otsuka        1.56  %if %{PEGASUS_BUILD_TEST_RPM}
228 denise.eckstein 1.32  %package test
229                       Summary: The OpenPegasus Tests
230                       Group: Systems Management/Base
231 s.kodali        1.122 Requires: %{Flavor}-pegasus >= %{version}
232 w.otsuka        1.1   
233 denise.eckstein 1.32  %description test
234                       The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
235 w.otsuka        1.56  %endif
236 denise.eckstein 1.74  #
237                       #End of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
238 w.otsuka        1.1   
239 denise.eckstein 1.32  %prep
240 denise.eckstein 1.74  %setup -q -n %{name}-%{version}
241 w.otsuka        1.28  
242 denise.eckstein 1.32  %build
243                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
244 denise.eckstein 1.74  #
245 denise.eckstein 1.32  export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
246                       export PEGASUS_HOME=%PEGASUS_RPM_HOME
247                       export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
248 denise.eckstein 1.74  export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
249 denise.eckstein 1.32  export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
250 w.otsuka        1.1   
251 denise.eckstein 1.32  export OPENSSL_HOME=%OPENSSL_HOME
252                       export OPENSSL_BIN=%OPENSSL_BIN
253                       export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
254                       export PATH=$PEGASUS_HOME/bin:$PATH
255 w.otsuka        1.1   
256 denise.eckstein 1.97  export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g -Wno-unused"
257 denise.eckstein 1.32  export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
258 denise.eckstein 1.74  export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS"
259                       #export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
260 w.otsuka        1.1   
261 w.otsuka        1.87  %if %{PEGASUS_BUILD_TEST_RPM}
262 yi.zhou         1.111 export PEGASUS_TMP=/usr/share/Pegasus/test/tmp
263                       export PEGASUS_DISPLAYCONSUMER_DIR="$PEGASUS_TMP"
264 w.otsuka        1.87  %endif
265                       
266 s.kodali        1.121 %if %{JMPI_PROVIDER_REQUESTED}
267                       sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=true/' $PEGASUS_ENVVAR_FILE
268                       %else
269                       sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=false/' $PEGASUS_ENVVAR_FILE
270                       %endif
271                       
272 s.kodali        1.125 %if %{EXTERNAL_SLP_REQUESTED}
273                       sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=true/' $PEGASUS_ENVVAR_FILE
274                       %else
275                       sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=false/' $PEGASUS_ENVVAR_FILE
276                       %endif
277                       
278 s.kodali        1.128 %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
279                       sed -i 's/#PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=.*$/PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT/' $PEGASUS_ENVVAR_FILE
280                       %endif
281                       
282 denise.eckstein 1.32  make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
283 denise.eckstein 1.76  make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
284                       make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
285 w.otsuka        1.92  make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.Release all
286 yi.zhou         1.98  chmod 777 %PEGASUS_RPM_HOME
287 denise.eckstein 1.32  make -f $PEGASUS_ROOT/Makefile.Release repository
288 s.kodali        1.128 
289                       %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
290                       
291                       export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT
292                       export PEGASUS_EXTRA_C_FLAGS=%PEGASUS_EXTRA_CXX_FLAGS_32BIT 
293                       export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
294                       export PEGASUS_EXTRA_LINK_FLAGS=%PEGASUS_EXTRA_LINK_FLAGS_32BIT
295                       
296                       make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.cimprovagt32 all
297                       
298                       %endif
299                       
300 denise.eckstein 1.74  #
301 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
302 w.otsuka        1.27  
303 denise.eckstein 1.32  %install
304                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
305 denise.eckstein 1.74  #
306 denise.eckstein 1.32  export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
307                       export PEGASUS_HOME=%PEGASUS_RPM_HOME
308                       export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
309 denise.eckstein 1.74  export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
310 denise.eckstein 1.32  export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
311 w.otsuka        1.1   
312 denise.eckstein 1.32  export OPENSSL_BIN=%OPENSSL_BIN
313                       export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
314                       export PATH=$PEGASUS_HOME/bin:$PATH
315 w.otsuka        1.1   
316 denise.eckstein 1.32  export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
317 w.otsuka        1.1   
318 w.otsuka        1.56  %if %{PEGASUS_BUILD_TEST_RPM}
319 denise.eckstein 1.74  make -f $PEGASUS_ROOT/Makefile.Release stage \
320                           PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR \
321                           PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM}
322 w.otsuka        1.56  %else
323 denise.eckstein 1.74  make -f $PEGASUS_ROOT/Makefile.Release stage \
324                           PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
325 w.otsuka        1.56  %endif
326 denise.eckstein 1.74  
327 s.kodali        1.128 %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
328                       export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT
329                       export LD_LIBRARY_PATH=$PEGASUS_HOME/lib32
330                       make -f $PEGASUS_ROOT/Makefile.cimprovagt32 stage \
331                           PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
332                       
333                       %endif
334                       
335 denise.eckstein 1.74  [ "$PEGASUS_HOME" != "/" ] && [ -d $PEGASUS_HOME ] && rm -rf $PEGASUS_HOME;
336                       #
337 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
338 w.otsuka        1.1   
339 denise.eckstein 1.32  %clean
340                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
341 denise.eckstein 1.74  #
342 w.otsuka        1.77  [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT;
343                       [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version};
344 denise.eckstein 1.74  #
345 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
346 w.otsuka        1.1   
347                       %pre
348 denise.eckstein 1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
349                       #           install   remove   upgrade  reinstall
350                       # pre          1        -         2         2
351                       #
352                       # If it exists, the active OpenPegasus Repository
353                       #    directory, %PEGASUS_REPOSITORY_DIR is renamed
354                       #    to %PEGASUS_PREV_REPOSITORY_DIR.  If
355                       #    %PEGASUS_PREV_REPOSITORY_DIR already exists,
356                       #    it is saved as an archive file.
357 denise.eckstein 1.32  
358 denise.eckstein 1.74  if [ -d %PEGASUS_REPOSITORY_DIR"/root#PG_Internal" ]; then
359                          #
360                          # Save the current repository to prev_repository
361                          #
362                          if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
363                               /bin/tar -C %PEGASUS_REPOSITORY_PARENT_DIR -cf \
364                                   %PEGASUS_PREV_REPOSITORY_DIR`date '+%Y-%m-%d-%s.%N'`.tar \
365                                   %PEGASUS_PREV_REPOSITORY_DIR_NAME
366                               rm -rf %PEGASUS_PREV_REPOSITORY_DIR
367                          fi
368                          /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR
369                       fi
370 w.otsuka        1.82  if [ $1 -gt 0 ]; then
371 denise.eckstein 1.74     #  Create the 'pegasus' user and group:
372                          /usr/sbin/groupadd pegasus > /dev/null 2>&1 || :;
373 s.kodali        1.122    /usr/sbin/useradd -c "%{Flavor}-pegasus OpenPegasus WBEM/CIM services" \
374 denise.eckstein 1.74          -g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \
375                                > /dev/null 2>&1 || :;
376 w.otsuka        1.1   fi
377 yi.zhou         1.98  if [ $1 -eq 2 ]; then
378                           rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
379                           rm -f %PEGASUS_CIMSERVER_START_FILE;
380 yi.zhou         1.105     rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
381 yi.zhou         1.98  fi
382 denise.eckstein 1.74  #
383 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
384 w.otsuka        1.1   
385 kumpf           1.119 # When Privilege Separation is enabled, create the 'cimsrvr' user and
386 denise.eckstein 1.100 # 'cimsrvr' group which are used as the context of the cimservermain process
387 yi.zhou         1.98  if [ $1 -gt 0 ]; then
388 denise.eckstein 1.100     /usr/sbin/groupadd cimsrvr > /dev/null 2>&1 || :;
389 yi.zhou         1.98      /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \
390 denise.eckstein 1.100         -g cimsrvr -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR cimsrvr \
391 yi.zhou         1.98          > /dev/null 2>&1 || :;
392                       fi
393                       
394 w.otsuka        1.1   %post
395 w.otsuka        1.24  if [ $1 -eq 1 ]; then
396 denise.eckstein 1.35     echo `date` > %PEGASUS_INSTALL_LOG 2>&1
397 denise.eckstein 1.76     %define PEGASUS_CONFIG_DIR /etc/Pegasus
398                          %define PEGASUS_PEM_DIR /etc/Pegasus
399 denise.eckstein 1.32     %define PEGASUS_SSL_CERT_FILE server.pem
400                          %define PEGASUS_SSL_KEY_FILE file.pem
401                          %define PEGASUS_SSL_TRUSTSTORE client.pem
402                       
403                          # Create Symbolic Links for SDK Libraries
404                          #
405 denise.eckstein 1.81     ln -sf libpegclient.so.1 /usr/%PEGASUS_ARCH_LIB/libpegclient.so
406                          ln -sf libpegcommon.so.1 /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
407                          ln -sf libpegprovider.so.1 /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
408                          ln -sf libDefaultProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
409                          ln -sf libCIMxmlIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
410 yi.zhou         1.93     ln -sf libsnmpIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
411 denise.eckstein 1.32  
412                          # Create Symbolic Links for Packaged Provider Libraries
413                          #
414 denise.eckstein 1.81     ln -sf libComputerSystemProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
415                          ln -sf libOSProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
416                          ln -sf libProcessProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
417 denise.eckstein 1.32  
418 denise.eckstein 1.110    # Create Symbolic Links for Packaged Provider Managers
419                          #
420                          ln -sf libCMPIProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
421 s.kodali        1.125    # Create Symbolic Links for SLP library and SLP Provider
422                          #
423                        %if %{EXTERNAL_SLP_REQUESTED}
424                          ln -sf    libpegslp_client.so.1            /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
425                          ln -sf    libSLPProvider.so.1            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
426                        %endif 
427 denise.eckstein 1.110 
428 denise.eckstein 1.32  
429                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
430 denise.eckstein 1.74  #
431                       #           install   remove   upgrade  reinstall
432                       # %post        1        -         2         2
433                       #
434 denise.eckstein 1.81     export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
435                       
436 denise.eckstein 1.74     if [ $1 -eq 1 ]; then
437                       %if %{AUTOSTART}
438 s.kodali        1.122        /sbin/chkconfig --add %{Flavor}-pegasus
439 denise.eckstein 1.74  %endif
440                          :;
441                          elif [ $1 -gt 0 ]; then
442 s.kodali        1.122        /etc/init.d/%{Flavor}-pegasus condrestart
443 denise.eckstein 1.74     :;
444 denise.eckstein 1.32     fi
445 denise.eckstein 1.74  #
446 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
447 w.otsuka        1.1   
448 w.otsuka        1.57  elif [ $1 -gt 1 ]; then
449 yi.zhou         1.98     # Check if the cimserver is running
450                          isRunning=`ps -el | grep cimserver | grep -v "grep cimserver"`
451                          if [ "$isRunning" ]; then
452                              /etc/init.d/tog-pegasus stop
453                          fi
454 sushma.fernandes 1.104    if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
455                               # The old repository was moved to /var/lib/Pegasus/prev_repository. It should now be upgraded to the new repository /var/lib/Pegasus/repository.
456                               %PEGASUS_SBIN_DIR/repupgrade >> %PEGASUS_INSTALL_LOG 2>&1
457                               chown -R cimsrvr %PEGASUS_REPOSITORY_DIR
458                               chgrp -R cimsrvr %PEGASUS_REPOSITORY_DIR
459                           fi
460 yi.zhou          1.98     if [ -f %PEGASUS_TRACE_FILE_PATH ]; then
461                             /bin/mv %PEGASUS_TRACE_FILE_PATH %PEGASUS_TRACE_FILE_PATH-`date '+%Y-%m-%d-%R'`
462                           fi
463                           if [ "$isRunning" ]; then
464                               /etc/init.d/tog-pegasus start
465                           fi
466 w.otsuka         1.24  fi
467 denise.eckstein  1.74  
468 w.otsuka         1.1   %preun
469 denise.eckstein  1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
470                        #           install   remove   upgrade  reinstall
471                        #  preun       -        0         1         -
472 w.otsuka         1.24  if [ $1 -eq 0 ]; then
473 denise.eckstein  1.32     # Check if the cimserver is running
474 denise.eckstein  1.74     isRunning=`ps -el | grep cimserver |  grep -v "grep cimserver"`
475 denise.eckstein  1.32     if [ "$isRunning" ]; then
476 denise.eckstein  1.74        %PEGASUS_SBIN_DIR/cimserver -s
477 kumpf            1.119    fi
478 s.kodali         1.122    /sbin/chkconfig --del %{Flavor}-pegasus;
479 s.kodali         1.127    rm -f %PEGASUS_CONFIG_DIR/cimserver_current.conf;
480 denise.eckstein  1.74     [ -d %PEGASUS_REPOSITORY_DIR ]  && rm -rf %PEGASUS_REPOSITORY_DIR;
481                           [ -d %PEGASUS_VARDATA_CACHE_DIR ]  && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
482                           rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
483                           rm -f %PEGASUS_CIMSERVER_START_FILE;
484 kumpf            1.94     rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
485 w.otsuka         1.24  fi
486 denise.eckstein  1.74  #
487                        # End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
488 w.otsuka         1.1   
489 w.otsuka         1.69  %preun devel
490 yi.zhou          1.106 # Check if the SDK has been setup
491                        if [ -f /usr/share/Pegasus/samples/SDKIsSetup ]; then
492                           make --directory /usr/share/Pegasus/samples -s unsetupSDK
493                           if [ $? != 0 ]; then
494                              echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
495                              echo "ERROR: Failed to deregister sample providers." >&2
496                              echo "To remove the SDK rpm without deregistering" >&2
497                              echo "the sample providers, first remove file" >&2
498                              echo "/usr/share/Pegasus/samples/SDKIsSetup," >&2
499                              echo "then remove SDK rpm." >&2
500                              echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
501                              exit 1
502                           fi
503                        fi
504 denise.eckstein  1.76  make --directory /usr/share/Pegasus/samples -s clean
505 denise.eckstein  1.44  
506 w.otsuka         1.56  %if %{PEGASUS_BUILD_TEST_RPM}
507 denise.eckstein  1.46  %preun test
508 denise.eckstein  1.76  make --directory /usr/share/Pegasus/test -s unsetupTEST
509                        [ -d /var/lib/Pegasus/testrepository ] &&  rm -rf /var/lib/Pegasus/testrepository;
510 denise.eckstein  1.46  
511 w.otsuka         1.56  %endif
512 w.otsuka         1.1   %postun
513 w.otsuka         1.24  if [ $1 -eq 0 ]; then
514 denise.eckstein  1.32     export LC_ALL=C
515 w.otsuka         1.1   fi
516 denise.eckstein  1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
517                        #
518                        #           install   remove   upgrade  reinstall
519                        #  postun      -        0         1         -
520                        if [ $1 -eq 0 ]; then
521                           /usr/sbin/userdel pegasus > /dev/null 2>&1 || :;
522 w.otsuka         1.78     /usr/sbin/groupdel pegasus > /dev/null 2>&1 || :;
523 denise.eckstein  1.74  fi;
524                        #
525                        # End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
526 w.otsuka         1.1   
527 kumpf            1.119 # When Privilege Separation is enabled, delete the 'cimsrvr' user and
528 denise.eckstein  1.100 # 'cimsrvr' group which are used as the context of the cimservermain process
529 yi.zhou          1.98  if [ $1 -eq 0 ]; then
530                            /usr/sbin/userdel cimsrvr > /dev/null 2>&1 || :;
531 denise.eckstein  1.100     /usr/sbin/groupdel cimsrvr > /dev/null 2>&1 || :;
532 yi.zhou          1.98  fi
533                        
534 w.otsuka         1.1   %files
535 denise.eckstein  1.109 %defattr(600,cimsrvr,cimsrvr,700)
536 yi.zhou          1.98  /var/lib/Pegasus/repository
537 denise.eckstein  1.109 
538                        %defattr(644,root,pegasus,755)
539                        /usr/share/Pegasus/mof
540                        
541                        %defattr(600,root,pegasus,755)
542 karl             1.129 %dir /usr/share/doc/tog-pegasus-2.12
543 denise.eckstein  1.76  %dir /usr/share/Pegasus
544                        %dir /usr/share/Pegasus/scripts
545                        %dir /var/lib/Pegasus
546                        %dir /var/lib/Pegasus/cache
547                        %dir /var/lib/Pegasus/log
548                        %dir /var/lib/Pegasus/cache/localauth
549 kumpf            1.119 %dir /usr/%PEGASUS_ARCH_LIB/Pegasus
550                        %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providers
551                        %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers
552 denise.eckstein  1.74  
553 denise.eckstein  1.109 %dir %attr(755,root,pegasus) /etc/Pegasus
554                        %dir %attr(755,cimsrvr,cimsrvr) /var/run/tog-pegasus
555 denise.eckstein  1.100 %dir %attr(1755,cimsrvr,cimsrvr) /var/run/tog-pegasus/socket
556 venkat.puvvada   1.131 %dir %attr(1777,cimsrvr,cimsrvr) /var/lib/Pegasus/cache/trace
557 denise.eckstein  1.74  
558                        %config %attr(750,root,pegasus) /etc/init.d/tog-pegasus
559 s.kodali         1.127 %config(noreplace) %attr(644,root,root) /etc/Pegasus/cimserver_planned.conf
560 denise.eckstein  1.76  %config(noreplace) /etc/Pegasus/access.conf
561 denise.eckstein  1.74  %config(noreplace) /etc/pam.d/wbem
562                        
563 denise.eckstein  1.76  %ghost %config(noreplace) /etc/Pegasus/ssl.cnf
564                        %ghost %config(noreplace) /etc/Pegasus/client.pem
565                        %ghost %config(noreplace) /etc/Pegasus/server.pem
566                        %ghost %config(noreplace) /etc/Pegasus/file.pem
567                        %ghost /var/lib/Pegasus/log/install.log
568                        
569 denise.eckstein  1.99  %attr(755,root,pegasus) /usr/sbin/*
570 denise.eckstein  1.76  %attr(755,root,pegasus) /usr/bin/*
571 denise.eckstein  1.81  %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.so.1
572 s.kodali         1.121 %if %{JMPI_PROVIDER_REQUESTED}
573                        %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.jar
574                        /usr/%PEGASUS_ARCH_LIB/libJMPIProviderManager.so
575                        %endif
576 denise.eckstein  1.81  %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so.1
577 denise.eckstein  1.110 %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/*.so.1
578 s.kodali         1.128 %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
579                        %dir /usr/lib/Pegasus
580                        %dir /usr/lib/Pegasus/providers
581                        %dir /usr/lib/Pegasus/providerManagers
582                        %attr(755,root,pegasus) /usr/lib/*.so.1
583                        %attr(755,root,pegasus) /usr/lib/Pegasus/providerManagers/*.so.1
584                        /usr/lib/libpegclient.so
585                        /usr/lib/libpegcommon.so
586                        /usr/lib/libpegprovider.so
587                        /usr/lib/libDefaultProviderManager.so
588                        /usr/lib/Pegasus/providerManagers/libCMPIProviderManager.so
589                        %endif
590 denise.eckstein  1.76  %attr(750,root,pegasus) /usr/share/Pegasus/scripts/*
591                        %attr(644,root,pegasus) /usr/share/man/man1/*
592 denise.eckstein  1.101 %attr(644,root,pegasus) /usr/share/man/man8/*
593 denise.eckstein  1.76  
594 karl             1.129 %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/Admin_Guide_Release.pdf
595                        %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/PegasusSSLGuidelines.htm
596                        %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/license.txt
597                        %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/OpenPegasusNOTICE.txt
598 denise.eckstein  1.81  /usr/%PEGASUS_ARCH_LIB/libpegclient.so
599                        /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
600                        /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
601                        /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
602                        /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
603 yi.zhou          1.93  /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
604 denise.eckstein  1.81  /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
605                        /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
606                        /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
607 s.kodali         1.125  %if %{EXTERNAL_SLP_REQUESTED}
608                        /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
609                        /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
610                        %endif
611 denise.eckstein  1.110 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
612 w.otsuka         1.1   
613 w.otsuka         1.69  %files devel
614 denise.eckstein  1.76  %defattr(644,root,pegasus,755)
615 denise.eckstein  1.89  /usr/share/Pegasus/samples
616 w.otsuka         1.80  /usr/include/Pegasus
617 karl             1.129 %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/SecurityGuidelinesForDevelopers.html
618 denise.eckstein  1.76  /usr/share/Pegasus/html
619 w.otsuka         1.28  
620 w.otsuka         1.56  %if %{PEGASUS_BUILD_TEST_RPM}
621 w.otsuka         1.28  %files test
622 denise.eckstein  1.74  %defattr(-,root,pegasus,-)
623 denise.eckstein  1.114 
624                        %dir /usr/share/Pegasus/test
625                        %dir /usr/share/Pegasus/test/bin
626                        %dir /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB
627                        %dir /usr/share/Pegasus/test/mak
628                        %dir /usr/share/Pegasus/test/tmp
629                        
630 yi.zhou          1.111 %ghost /usr/share/Pegasus/test/tmp/procIdFile
631                        %ghost /usr/share/Pegasus/test/tmp/trapLogFile
632                        %ghost /usr/share/Pegasus/test/tmp/IndicationStressTestLog
633 denise.eckstein  1.114 %ghost /usr/share/Pegasus/test/tmp/oldIndicationStressTestLog
634                        
635                        %attr(744,root,pegasus) /usr/share/Pegasus/test/bin/*
636                        %attr(744,root,pegasus) /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB/*
637                        %attr(744,root,pegasus) /usr/share/Pegasus/test/mak/*
638                        %attr(644,root,pegasus) /usr/share/Pegasus/test/Makefile
639                        
640 denise.eckstein  1.100 %defattr(600,cimsrvr, cimsrvr,700)
641 denise.eckstein  1.76  /var/lib/Pegasus/testrepository
642 w.otsuka         1.56  %endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2