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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2