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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2