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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2