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

  1 martin 1.115 #//%LICENSE////////////////////////////////////////////////////////////////
  2 karl   1.84  #// 
  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              #// 
 10              #// 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              #// 
 17              #// The above copyright notice and this permission notice shall be included
 18              #// in all copies or substantial portions of the Software.
 19              #// 
 20              #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21              #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 22              #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23              #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24 martin 1.115 #// 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              #// 
 28              #//////////////////////////////////////////////////////////////////////////
 29 w.otsuka 1.1   #%/////////////////////////////////////////////////////////////////////////////
 30                #
 31                # tog-pegasus.spec
 32                #
 33 denise.eckstein 1.32  #%/////////////////////////////////////////////////////////////////////////////
 34                       
 35                       #
 36                       # WARNING: This file is automatically generated by executing 
 37                       #   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 dave.sudlik     1.107 %define packageVersion 1
 43 denise.eckstein 1.113 Version: 2.9.0
 44 denise.eckstein 1.102 Release: %{packageVersion}%{?LINUX_VERSION:.%{LINUX_VERSION}}
 45 w.otsuka        1.56  Epoch:   1
 46 denise.eckstein 1.32  
 47                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 48 denise.eckstein 1.74  #
 49 w.otsuka        1.56  %{?!PEGASUS_BUILD_TEST_RPM:   %define PEGASUS_BUILD_TEST_RPM        0}
 50 denise.eckstein 1.74  # do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM.
 51                       #
 52                       %{?!AUTOSTART:   %define AUTOSTART        0}
 53                       # Use "rpm -[iU]vh --define 'AUTOSTART 1'" in order to have cimserver enabled
 54                       # (chkconfig --level=345 tog-pegasus on) after installation.
 55                       #
 56                       
 57                       Summary:   OpenPegasus WBEM Services for Linux
 58                       Name:      tog-pegasus
 59                       Group:     Systems Management/Base
 60                       License:   Open Group Pegasus Open Source
 61                       BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 62                       URL:       http://www.openpegasus.org
 63                       
 64 denise.eckstein 1.102 Source:    %{name}-%{version}-%{packageVersion}.tar.gz
 65 yi.zhou         1.93  #
 66                       # End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 67 denise.eckstein 1.74  
 68 yi.zhou         1.93  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 69                       #
 70 denise.eckstein 1.74  BuildRequires:      bash, sed, grep, coreutils, procps, gcc, gcc-c++
 71                       BuildRequires:      libstdc++, make, pam-devel
 72                       BuildRequires:      openssl-devel >= 0.9.6, e2fsprogs
 73 yi.zhou         1.93  BuildRequires:      net-snmp-devel
 74                       #
 75                       # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 76                       
 77                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
 78                       #
 79 denise.eckstein 1.74  Requires:           bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 80                       #Requires:          krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 81                       Requires:           e2fsprogs, bind-utils, net-tools
 82                       Requires(post):     bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 83                       #Requires(post):    krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 84                       Requires(post):     e2fsprogs, bind-utils, net-tools
 85                       Requires(pre):      bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 86                       #Requires(pre):     krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 87                       Requires(pre):      e2fsprogs, bind-utils, net-tools
 88                       Requires(postun):   bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 89                       #Requires(postun):  krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 90                       Requires(postun):   e2fsprogs, bind-utils, net-tools
 91 yi.zhou         1.93  Requires:           net-snmp
 92                       #
 93                       # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
 94 denise.eckstein 1.74  
 95 yi.zhou         1.93  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
 96                       #
 97 w.otsuka        1.73  Conflicts: openwbem
 98 denise.eckstein 1.32  Provides: tog-pegasus-cimserver
 99 w.otsuka        1.64  BuildConflicts: tog-pegasus
100 w.otsuka        1.1   
101                       %description
102 w.otsuka        1.9   OpenPegasus WBEM Services for Linux enables management solutions that deliver
103 w.otsuka        1.1   increased control of enterprise resources. WBEM is a platform and resource
104                       independent DMTF standard that defines a common information model and
105                       communication protocol for monitoring and controlling resources from diverse
106                       sources.
107 denise.eckstein 1.74  #
108 yi.zhou         1.93  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
109 w.otsuka        1.1   
110 denise.eckstein 1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
111                       #
112 w.otsuka        1.54  %ifarch ia64
113 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_IA64_GNU
114 w.otsuka        1.1   %else
115 w.otsuka        1.54  %ifarch x86_64
116                       %global PEGASUS_HARDWARE_PLATFORM LINUX_X86_64_GNU
117                       %else
118 w.otsuka        1.24  %ifarch ppc
119 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC_GNU
120 w.otsuka        1.24  %else
121 denise.eckstein 1.44  %ifarch ppc64 pseries
122 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC64_GNU
123 w.otsuka        1.24  %else
124                       %ifarch s390
125 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES_GNU
126 w.otsuka        1.24  %else
127                       %ifarch s390x zseries
128 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES64_GNU
129 w.otsuka        1.24  %else
130 denise.eckstein 1.32  %global PEGASUS_HARDWARE_PLATFORM LINUX_IX86_GNU
131 denise.eckstein 1.74  %endif 
132                       %endif 
133                       %endif 
134                       %endif 
135 w.otsuka        1.1   %endif
136 w.otsuka        1.24  %endif
137 denise.eckstein 1.74  #
138                       # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
139 w.otsuka        1.55  
140 denise.eckstein 1.81  %global PEGASUS_ARCH_LIB %{_lib}
141 w.otsuka        1.86  %global OPENSSL_HOME /usr
142 denise.eckstein 1.81  %global OPENSSL_BIN /usr/bin
143                       %global PEGASUS_PEM_DIR /etc/Pegasus
144                       %global PEGASUS_SSL_CERT_FILE server.pem
145                       %global PEGASUS_SSL_KEY_FILE file.pem
146                       %global PEGASUS_SSL_TRUSTSTORE client.pem
147                       %global PAM_CONFIG_DIR /etc/pam.d
148                       %global PEGASUS_CONFIG_DIR /etc/Pegasus
149                       %global PEGASUS_VARDATA_DIR /var/lib/Pegasus
150                       %global PEGASUS_VARDATA_CACHE_DIR /var/lib/Pegasus/cache
151                       %global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH  /var/run/tog-pegasus/socket/cimxml.socket
152                       %global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid
153 yi.zhou         1.98  %global PEGASUS_TRACE_FILE_PATH /var/lib/Pegasus/cache/trace/cimserver.trc
154 kumpf           1.94  %global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
155 denise.eckstein 1.81  %global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository
156                       %global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository
157                       %global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus
158                       %global PEGASUS_PREV_REPOSITORY_DIR /var/lib/Pegasus/prev_repository
159                       %global PEGASUS_SBIN_DIR /usr/sbin
160 denise.eckstein 1.113 %global PEGASUS_DOC_DIR /usr/share/doc/tog-pegasus-2.9
161 denise.eckstein 1.81  
162                       %global PEGASUS_RPM_ROOT  $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
163 denise.eckstein 1.95  %global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build
164 denise.eckstein 1.81  %global PEGASUS_INSTALL_LOG /var/lib/Pegasus/log/install.log
165                       
166 denise.eckstein 1.32  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
167 denise.eckstein 1.74  #
168 w.otsuka        1.69  %package devel
169 denise.eckstein 1.32  Summary: The OpenPegasus Software Development Kit
170                       Group: Systems Management/Base
171                       Requires: tog-pegasus >= %{version}
172 w.otsuka        1.69  Obsoletes: tog-pegasus-sdk
173 w.otsuka        1.1   
174 w.otsuka        1.69  %description devel
175 denise.eckstein 1.74  The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
176                       OpenPegasus WBEM Services for Linux release. It provides Linux C++ developers
177                       with the WBEM files required to build WBEM Clients and Providers. It also
178                       supports C provider developers via the CMPI interface.
179 w.otsuka        1.1   
180 w.otsuka        1.56  %if %{PEGASUS_BUILD_TEST_RPM}
181 denise.eckstein 1.32  %package test
182                       Summary: The OpenPegasus Tests
183                       Group: Systems Management/Base
184                       Requires: tog-pegasus >= %{version} 
185 w.otsuka        1.1   
186 denise.eckstein 1.32  %description test
187                       The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
188 w.otsuka        1.56  %endif
189 denise.eckstein 1.74  #
190                       #End of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
191 w.otsuka        1.1   
192 denise.eckstein 1.32  %prep
193 denise.eckstein 1.74  %setup -q -n %{name}-%{version}
194 w.otsuka        1.28  
195 denise.eckstein 1.32  %build
196                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
197 denise.eckstein 1.74  #
198 denise.eckstein 1.32  export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
199                       export PEGASUS_HOME=%PEGASUS_RPM_HOME
200                       export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
201 denise.eckstein 1.74  export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
202 denise.eckstein 1.32  export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
203 w.otsuka        1.1   
204 denise.eckstein 1.32  export OPENSSL_HOME=%OPENSSL_HOME
205                       export OPENSSL_BIN=%OPENSSL_BIN
206                       export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
207                       export PATH=$PEGASUS_HOME/bin:$PATH
208 w.otsuka        1.1   
209 denise.eckstein 1.97  export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g -Wno-unused"
210 denise.eckstein 1.32  export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
211 denise.eckstein 1.74  export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS"
212                       #export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
213 w.otsuka        1.1   
214 w.otsuka        1.87  %if %{PEGASUS_BUILD_TEST_RPM}
215 yi.zhou         1.111 export PEGASUS_TMP=/usr/share/Pegasus/test/tmp
216                       export PEGASUS_DISPLAYCONSUMER_DIR="$PEGASUS_TMP"
217 w.otsuka        1.87  %endif
218                       
219 denise.eckstein 1.32  make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
220 denise.eckstein 1.76  make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
221                       make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
222 w.otsuka        1.92  make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.Release all
223 yi.zhou         1.98  chmod 777 %PEGASUS_RPM_HOME
224 denise.eckstein 1.32  make -f $PEGASUS_ROOT/Makefile.Release repository
225 denise.eckstein 1.74  #
226 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
227 w.otsuka        1.27  
228 denise.eckstein 1.32  %install
229                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
230 denise.eckstein 1.74  #
231 denise.eckstein 1.32  export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
232                       export PEGASUS_HOME=%PEGASUS_RPM_HOME
233                       export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
234 denise.eckstein 1.74  export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
235 denise.eckstein 1.32  export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
236 w.otsuka        1.1   
237 denise.eckstein 1.32  export OPENSSL_BIN=%OPENSSL_BIN
238                       export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
239                       export PATH=$PEGASUS_HOME/bin:$PATH
240 w.otsuka        1.1   
241 denise.eckstein 1.32  export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
242 w.otsuka        1.1   
243 w.otsuka        1.56  %if %{PEGASUS_BUILD_TEST_RPM}
244 denise.eckstein 1.74  make -f $PEGASUS_ROOT/Makefile.Release stage \
245                           PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR \
246                           PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM}
247 w.otsuka        1.56  %else
248 denise.eckstein 1.74  make -f $PEGASUS_ROOT/Makefile.Release stage \
249                           PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
250 w.otsuka        1.56  %endif
251 denise.eckstein 1.74  
252                       [ "$PEGASUS_HOME" != "/" ] && [ -d $PEGASUS_HOME ] && rm -rf $PEGASUS_HOME;
253                       #
254 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
255 w.otsuka        1.1   
256 denise.eckstein 1.32  %clean
257                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
258 denise.eckstein 1.74  #
259 w.otsuka        1.77  [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT;
260                       [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version};
261 denise.eckstein 1.74  #
262 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
263 w.otsuka        1.1   
264                       %pre
265 denise.eckstein 1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
266                       #           install   remove   upgrade  reinstall
267                       # pre          1        -         2         2
268                       #
269                       # If it exists, the active OpenPegasus Repository
270                       #    directory, %PEGASUS_REPOSITORY_DIR is renamed
271                       #    to %PEGASUS_PREV_REPOSITORY_DIR.  If
272                       #    %PEGASUS_PREV_REPOSITORY_DIR already exists,
273                       #    it is saved as an archive file.
274 denise.eckstein 1.32  
275 denise.eckstein 1.74  if [ -d %PEGASUS_REPOSITORY_DIR"/root#PG_Internal" ]; then
276                          #
277                          # Save the current repository to prev_repository
278                          #
279                          if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
280                               /bin/tar -C %PEGASUS_REPOSITORY_PARENT_DIR -cf \
281                                   %PEGASUS_PREV_REPOSITORY_DIR`date '+%Y-%m-%d-%s.%N'`.tar \
282                                   %PEGASUS_PREV_REPOSITORY_DIR_NAME
283                               rm -rf %PEGASUS_PREV_REPOSITORY_DIR
284                          fi
285                          /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR
286                       fi
287 w.otsuka        1.82  if [ $1 -gt 0 ]; then
288 denise.eckstein 1.74     #  Create the 'pegasus' user and group:
289                          /usr/sbin/groupadd pegasus > /dev/null 2>&1 || :;
290                          /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \
291                               -g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \
292                                > /dev/null 2>&1 || :;
293 w.otsuka        1.1   fi
294 yi.zhou         1.98  if [ $1 -eq 2 ]; then
295                           rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
296                           rm -f %PEGASUS_CIMSERVER_START_FILE;
297 yi.zhou         1.105     rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
298 yi.zhou         1.98  fi
299 denise.eckstein 1.74  #
300 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
301 w.otsuka        1.1   
302 yi.zhou         1.98  # When Privilege Separation is enabled, create the 'cimsrvr' user and 
303 denise.eckstein 1.100 # 'cimsrvr' group which are used as the context of the cimservermain process
304 yi.zhou         1.98  if [ $1 -gt 0 ]; then
305 denise.eckstein 1.100     /usr/sbin/groupadd cimsrvr > /dev/null 2>&1 || :;
306 yi.zhou         1.98      /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \
307 denise.eckstein 1.100         -g cimsrvr -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR cimsrvr \
308 yi.zhou         1.98          > /dev/null 2>&1 || :;
309                       fi
310                       
311 w.otsuka        1.1   %post
312 w.otsuka        1.24  if [ $1 -eq 1 ]; then
313 denise.eckstein 1.35     echo `date` > %PEGASUS_INSTALL_LOG 2>&1
314 denise.eckstein 1.76     %define PEGASUS_CONFIG_DIR /etc/Pegasus
315                          %define PEGASUS_PEM_DIR /etc/Pegasus
316 denise.eckstein 1.32     %define PEGASUS_SSL_CERT_FILE server.pem
317                          %define PEGASUS_SSL_KEY_FILE file.pem
318                          %define PEGASUS_SSL_TRUSTSTORE client.pem
319                       
320                          # Create Symbolic Links for SDK Libraries
321                          #
322 denise.eckstein 1.81     ln -sf libpegclient.so.1 /usr/%PEGASUS_ARCH_LIB/libpegclient.so
323                          ln -sf libpegcommon.so.1 /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
324                          ln -sf libpegprovider.so.1 /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
325                          ln -sf libDefaultProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
326                          ln -sf libCIMxmlIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
327 yi.zhou         1.93     ln -sf libsnmpIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
328 denise.eckstein 1.32  
329                          # Create Symbolic Links for Packaged Provider Libraries
330                          #
331 denise.eckstein 1.81     ln -sf libComputerSystemProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
332                          ln -sf libOSProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
333                          ln -sf libProcessProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
334 denise.eckstein 1.32  
335 denise.eckstein 1.110    # Create Symbolic Links for Packaged Provider Managers
336                          #
337                          ln -sf libCMPIProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
338                       
339 denise.eckstein 1.32  
340                       # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
341 denise.eckstein 1.74  #
342                       #           install   remove   upgrade  reinstall
343                       # %post        1        -         2         2
344                       #
345 denise.eckstein 1.81     export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
346                       
347 denise.eckstein 1.74     if [ $1 -eq 1 ]; then
348                       %if %{AUTOSTART}
349                              /sbin/chkconfig --add tog-pegasus
350                       %endif
351                          :;
352                          elif [ $1 -gt 0 ]; then
353 w.otsuka        1.79         /etc/init.d/tog-pegasus condrestart
354 denise.eckstein 1.74     :;
355 denise.eckstein 1.32     fi
356 denise.eckstein 1.74  #
357 denise.eckstein 1.32  # End of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
358 w.otsuka        1.1   
359 w.otsuka        1.57  elif [ $1 -gt 1 ]; then
360 yi.zhou         1.98     # Check if the cimserver is running
361                          isRunning=`ps -el | grep cimserver | grep -v "grep cimserver"`
362                          if [ "$isRunning" ]; then
363                              /etc/init.d/tog-pegasus stop
364                          fi
365 sushma.fernandes 1.104    if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
366                               # The old repository was moved to /var/lib/Pegasus/prev_repository. It should now be upgraded to the new repository /var/lib/Pegasus/repository.
367                               %PEGASUS_SBIN_DIR/repupgrade >> %PEGASUS_INSTALL_LOG 2>&1
368                               chown -R cimsrvr %PEGASUS_REPOSITORY_DIR
369                               chgrp -R cimsrvr %PEGASUS_REPOSITORY_DIR
370                           fi
371 yi.zhou          1.98     if [ -f %PEGASUS_TRACE_FILE_PATH ]; then
372                             /bin/mv %PEGASUS_TRACE_FILE_PATH %PEGASUS_TRACE_FILE_PATH-`date '+%Y-%m-%d-%R'`
373                           fi
374                           if [ "$isRunning" ]; then
375                               /etc/init.d/tog-pegasus start
376                           fi
377 w.otsuka         1.24  fi
378 denise.eckstein  1.74  
379 w.otsuka         1.1   %preun
380 denise.eckstein  1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
381                        #           install   remove   upgrade  reinstall
382                        #  preun       -        0         1         -
383 w.otsuka         1.24  if [ $1 -eq 0 ]; then
384 denise.eckstein  1.32     # Check if the cimserver is running
385 denise.eckstein  1.74     isRunning=`ps -el | grep cimserver |  grep -v "grep cimserver"`
386 denise.eckstein  1.32     if [ "$isRunning" ]; then
387 denise.eckstein  1.74        %PEGASUS_SBIN_DIR/cimserver -s
388                           fi 
389                           /sbin/chkconfig --del tog-pegasus;
390                           rm -f %PEGASUS_VARDATA_DIR/cimserver_current.conf;
391                           [ -d %PEGASUS_REPOSITORY_DIR ]  && rm -rf %PEGASUS_REPOSITORY_DIR;
392                           [ -d %PEGASUS_VARDATA_CACHE_DIR ]  && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
393                           rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
394                           rm -f %PEGASUS_CIMSERVER_START_FILE;
395 kumpf            1.94     rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
396 w.otsuka         1.24  fi
397 denise.eckstein  1.74  #
398                        # End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
399 w.otsuka         1.1   
400 w.otsuka         1.69  %preun devel
401 yi.zhou          1.106 # Check if the SDK has been setup
402                        if [ -f /usr/share/Pegasus/samples/SDKIsSetup ]; then
403                           make --directory /usr/share/Pegasus/samples -s unsetupSDK
404                           if [ $? != 0 ]; then
405                              echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
406                              echo "ERROR: Failed to deregister sample providers." >&2
407                              echo "To remove the SDK rpm without deregistering" >&2
408                              echo "the sample providers, first remove file" >&2
409                              echo "/usr/share/Pegasus/samples/SDKIsSetup," >&2
410                              echo "then remove SDK rpm." >&2
411                              echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
412                              exit 1
413                           fi
414                        fi
415 denise.eckstein  1.76  make --directory /usr/share/Pegasus/samples -s clean
416 denise.eckstein  1.44  
417 w.otsuka         1.56  %if %{PEGASUS_BUILD_TEST_RPM}
418 denise.eckstein  1.46  %preun test
419 denise.eckstein  1.76  make --directory /usr/share/Pegasus/test -s unsetupTEST
420                        [ -d /var/lib/Pegasus/testrepository ] &&  rm -rf /var/lib/Pegasus/testrepository;
421 denise.eckstein  1.46  
422 w.otsuka         1.56  %endif
423 w.otsuka         1.1   %postun
424 w.otsuka         1.24  if [ $1 -eq 0 ]; then
425 denise.eckstein  1.32     export LC_ALL=C
426 w.otsuka         1.1   fi
427 denise.eckstein  1.74  # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
428                        #
429                        #           install   remove   upgrade  reinstall
430                        #  postun      -        0         1         -
431                        if [ $1 -eq 0 ]; then
432                           /usr/sbin/userdel pegasus > /dev/null 2>&1 || :;
433 w.otsuka         1.78     /usr/sbin/groupdel pegasus > /dev/null 2>&1 || :;
434 denise.eckstein  1.74  fi;
435                        #
436                        # End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
437 w.otsuka         1.1   
438 yi.zhou          1.98  # When Privilege Separation is enabled, delete the 'cimsrvr' user and 
439 denise.eckstein  1.100 # 'cimsrvr' group which are used as the context of the cimservermain process
440 yi.zhou          1.98  if [ $1 -eq 0 ]; then
441                            /usr/sbin/userdel cimsrvr > /dev/null 2>&1 || :;
442 denise.eckstein  1.100     /usr/sbin/groupdel cimsrvr > /dev/null 2>&1 || :;
443 yi.zhou          1.98  fi
444                        
445 w.otsuka         1.1   %files
446 denise.eckstein  1.109 %defattr(600,cimsrvr,cimsrvr,700)
447 yi.zhou          1.98  /var/lib/Pegasus/repository
448 denise.eckstein  1.109 
449                        %defattr(644,root,pegasus,755)
450                        /usr/share/Pegasus/mof
451                        
452                        %defattr(600,root,pegasus,755)
453 denise.eckstein  1.113 %dir /usr/share/doc/tog-pegasus-2.9
454 denise.eckstein  1.76  %dir /usr/share/Pegasus
455                        %dir /usr/share/Pegasus/scripts
456                        %dir /var/lib/Pegasus
457                        %dir /var/lib/Pegasus/cache
458                        %dir /var/lib/Pegasus/log
459                        %dir /var/lib/Pegasus/cache/localauth
460 denise.eckstein  1.81  %dir /usr/%PEGASUS_ARCH_LIB/Pegasus 
461                        %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providers 
462 denise.eckstein  1.110 %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers 
463 denise.eckstein  1.74  
464 denise.eckstein  1.109 %dir %attr(755,root,pegasus) /etc/Pegasus
465                        %dir %attr(755,cimsrvr,cimsrvr) /var/run/tog-pegasus
466 denise.eckstein  1.100 %dir %attr(1755,cimsrvr,cimsrvr) /var/run/tog-pegasus/socket
467 denise.eckstein  1.76  %dir %attr(1777,root,pegasus) /var/lib/Pegasus/cache/trace
468 denise.eckstein  1.74  
469                        %config %attr(750,root,pegasus) /etc/init.d/tog-pegasus
470 denise.eckstein  1.108 %config(noreplace) %attr(644,root,root) /var/lib/Pegasus/cimserver_planned.conf
471 denise.eckstein  1.76  %config(noreplace) /etc/Pegasus/access.conf
472 denise.eckstein  1.74  %config(noreplace) /etc/pam.d/wbem
473                        
474 denise.eckstein  1.76  %ghost %config(noreplace) /etc/Pegasus/ssl.cnf
475                        %ghost %config(noreplace) /etc/Pegasus/client.pem
476                        %ghost %config(noreplace) /etc/Pegasus/server.pem
477                        %ghost %config(noreplace) /etc/Pegasus/file.pem
478                        %ghost /var/lib/Pegasus/log/install.log
479                        
480 denise.eckstein  1.99  %attr(755,root,pegasus) /usr/sbin/*
481 denise.eckstein  1.76  %attr(755,root,pegasus) /usr/bin/*
482 denise.eckstein  1.81  %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.so.1
483                        %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so.1
484 denise.eckstein  1.110 %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/*.so.1
485 denise.eckstein  1.76  %attr(750,root,pegasus) /usr/share/Pegasus/scripts/*
486                        %attr(644,root,pegasus) /usr/share/man/man1/*
487 denise.eckstein  1.101 %attr(644,root,pegasus) /usr/share/man/man8/*
488 denise.eckstein  1.76  
489 denise.eckstein  1.113 %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.9/Admin_Guide_Release.pdf
490                        %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.9/PegasusSSLGuidelines.htm
491                        %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.9/license.txt
492 denise.eckstein  1.81  /usr/%PEGASUS_ARCH_LIB/libpegclient.so
493                        /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
494                        /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
495                        /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
496                        /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
497 yi.zhou          1.93  /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
498 denise.eckstein  1.81  /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
499                        /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
500                        /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
501 denise.eckstein  1.110 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
502 w.otsuka         1.1   
503 w.otsuka         1.69  %files devel
504 denise.eckstein  1.76  %defattr(644,root,pegasus,755)
505 denise.eckstein  1.89  /usr/share/Pegasus/samples
506 w.otsuka         1.80  /usr/include/Pegasus
507 denise.eckstein  1.113 /usr/share/doc/tog-pegasus-2.9/*
508 denise.eckstein  1.76  /usr/share/Pegasus/html
509 w.otsuka         1.28  
510 w.otsuka         1.56  %if %{PEGASUS_BUILD_TEST_RPM}
511 w.otsuka         1.28  %files test
512 denise.eckstein  1.74  %defattr(-,root,pegasus,-)
513 denise.eckstein  1.114 
514                        %dir /usr/share/Pegasus/test
515                        %dir /usr/share/Pegasus/test/bin
516                        %dir /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB
517                        %dir /usr/share/Pegasus/test/mak
518                        %dir /usr/share/Pegasus/test/tmp
519                        
520 yi.zhou          1.111 %ghost /usr/share/Pegasus/test/tmp/procIdFile
521                        %ghost /usr/share/Pegasus/test/tmp/trapLogFile
522                        %ghost /usr/share/Pegasus/test/tmp/IndicationStressTestLog
523 denise.eckstein  1.114 %ghost /usr/share/Pegasus/test/tmp/oldIndicationStressTestLog
524                        
525                        %attr(744,root,pegasus) /usr/share/Pegasus/test/bin/*
526                        %attr(744,root,pegasus) /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB/*
527                        %attr(744,root,pegasus) /usr/share/Pegasus/test/mak/*
528                        %attr(644,root,pegasus) /usr/share/Pegasus/test/Makefile
529                        
530 denise.eckstein  1.100 %defattr(600,cimsrvr, cimsrvr,700)
531 denise.eckstein  1.76  /var/lib/Pegasus/testrepository
532 w.otsuka         1.56  %endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2