(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.122.2.1 Version: 2.10.1
 45 denise.eckstein 1.102     Release: %{packageVersion}%{?LINUX_VERSION:.%{LINUX_VERSION}}
 46 w.otsuka        1.56      Epoch:   1
 47 denise.eckstein 1.32      
 48                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 49 denise.eckstein 1.74      #
 50 w.otsuka        1.56      %{?!PEGASUS_BUILD_TEST_RPM:   %define PEGASUS_BUILD_TEST_RPM        0}
 51 denise.eckstein 1.74      # do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM.
 52                           #
 53                           %{?!AUTOSTART:   %define AUTOSTART        0}
 54                           # Use "rpm -[iU]vh --define 'AUTOSTART 1'" in order to have cimserver enabled
 55                           # (chkconfig --level=345 tog-pegasus on) after installation.
 56                           #
 57 s.kodali        1.121     # Use "rpmbuild --define 'JMPI_PROVIDER_REQUESTED 1'" to include JMPI support.
 58                           %{?!JMPI_PROVIDER_REQUESTED: %define JMPI_PROVIDER_REQUESTED 0}
 59 denise.eckstein 1.74      
 60 s.kodali        1.122.2.2 # Use "rpmbuild --define 'EXTERNAL_SLP_REQUESTED 1'" to include External SLP support.
 61                           %{?!EXTERNAL_SLP_REQUESTED: %define EXTERNAL_SLP_REQUESTED 0}
 62                           
 63 denise.eckstein 1.74      Summary:   OpenPegasus WBEM Services for Linux
 64 s.kodali        1.122     Name:      %{Flavor}-pegasus
 65 denise.eckstein 1.74      Group:     Systems Management/Base
 66                           License:   Open Group Pegasus Open Source
 67                           BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 68                           URL:       http://www.openpegasus.org
 69                           
 70 denise.eckstein 1.102     Source:    %{name}-%{version}-%{packageVersion}.tar.gz
 71 yi.zhou         1.93      #
 72                           # End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 73 denise.eckstein 1.74      
 74 yi.zhou         1.93      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 75                           #
 76 denise.eckstein 1.74      BuildRequires:      bash, sed, grep, coreutils, procps, gcc, gcc-c++
 77                           BuildRequires:      libstdc++, make, pam-devel
 78                           BuildRequires:      openssl-devel >= 0.9.6, e2fsprogs
 79 s.kodali        1.121     %if %{JMPI_PROVIDER_REQUESTED}
 80                           BuildRequires:      gcc-java, libgcj-devel, libgcj, java-1.4.2-gcj-compat
 81                           Requires:           libgcj, java-1.4.2-gcj-compat
 82                           %endif
 83 s.kodali        1.122.2.2 %if %{EXTERNAL_SLP_REQUESTED}
 84                           BuildRequires:      openslp
 85                           Requires:           openslp
 86                           %endif
 87                           
 88 yi.zhou         1.93      BuildRequires:      net-snmp-devel
 89                           #
 90                           # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 91                           
 92                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
 93                           #
 94 denise.eckstein 1.74      Requires:           bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 95                           #Requires:          krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 96                           Requires:           e2fsprogs, bind-utils, net-tools
 97                           Requires(post):     bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 98                           #Requires(post):    krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
 99                           Requires(post):     e2fsprogs, bind-utils, net-tools
100                           Requires(pre):      bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
101                           #Requires(pre):     krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
102                           Requires(pre):      e2fsprogs, bind-utils, net-tools
103                           Requires(postun):   bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
104                           #Requires(postun):  krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs
105                           Requires(postun):   e2fsprogs, bind-utils, net-tools
106 yi.zhou         1.93      Requires:           net-snmp
107                           #
108                           # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
109 denise.eckstein 1.74      
110 yi.zhou         1.93      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
111                           #
112 w.otsuka        1.73      Conflicts: openwbem
113 s.kodali        1.122     Provides: %{Flavor}-pegasus-cimserver
114                           BuildConflicts: %{Flavor}-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 yi.zhou         1.93      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.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 kumpf           1.119     %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 w.otsuka        1.86      %global OPENSSL_HOME /usr
157 denise.eckstein 1.81      %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 yi.zhou         1.98      %global PEGASUS_TRACE_FILE_PATH /var/lib/Pegasus/cache/trace/cimserver.trc
169 kumpf           1.94      %global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
170 denise.eckstein 1.81      %global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository
171                           %global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository
172                           %global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus
173                           %global PEGASUS_PREV_REPOSITORY_DIR /var/lib/Pegasus/prev_repository
174                           %global PEGASUS_SBIN_DIR /usr/sbin
175 denise.eckstein 1.120     %global PEGASUS_DOC_DIR /usr/share/doc/tog-pegasus-2.10
176 denise.eckstein 1.81      
177                           %global PEGASUS_RPM_ROOT  $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
178 denise.eckstein 1.95      %global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build
179 denise.eckstein 1.81      %global PEGASUS_INSTALL_LOG /var/lib/Pegasus/log/install.log
180                           
181 denise.eckstein 1.32      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
182 denise.eckstein 1.74      #
183 w.otsuka        1.69      %package devel
184 denise.eckstein 1.32      Summary: The OpenPegasus Software Development Kit
185                           Group: Systems Management/Base
186 s.kodali        1.122     Requires: %{Flavor}-pegasus >= %{version}
187                           Obsoletes: %{Flavor}-pegasus-sdk
188 w.otsuka        1.1       
189 w.otsuka        1.69      %description devel
190 denise.eckstein 1.74      The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
191                           OpenPegasus WBEM Services for Linux release. It provides Linux C++ developers
192                           with the WBEM files required to build WBEM Clients and Providers. It also
193                           supports C provider developers via the CMPI interface.
194 w.otsuka        1.1       
195 w.otsuka        1.56      %if %{PEGASUS_BUILD_TEST_RPM}
196 denise.eckstein 1.32      %package test
197                           Summary: The OpenPegasus Tests
198                           Group: Systems Management/Base
199 s.kodali        1.122     Requires: %{Flavor}-pegasus >= %{version}
200 w.otsuka        1.1       
201 denise.eckstein 1.32      %description test
202                           The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
203 w.otsuka        1.56      %endif
204 denise.eckstein 1.74      #
205                           #End of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
206 w.otsuka        1.1       
207 denise.eckstein 1.32      %prep
208 denise.eckstein 1.74      %setup -q -n %{name}-%{version}
209 w.otsuka        1.28      
210 denise.eckstein 1.32      %build
211                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
212 denise.eckstein 1.74      #
213 denise.eckstein 1.32      export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
214                           export PEGASUS_HOME=%PEGASUS_RPM_HOME
215                           export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
216 denise.eckstein 1.74      export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
217 denise.eckstein 1.32      export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
218 w.otsuka        1.1       
219 denise.eckstein 1.32      export OPENSSL_HOME=%OPENSSL_HOME
220                           export OPENSSL_BIN=%OPENSSL_BIN
221                           export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
222                           export PATH=$PEGASUS_HOME/bin:$PATH
223 w.otsuka        1.1       
224 denise.eckstein 1.97      export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g -Wno-unused"
225 denise.eckstein 1.32      export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
226 denise.eckstein 1.74      export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS"
227                           #export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
228 w.otsuka        1.1       
229 w.otsuka        1.87      %if %{PEGASUS_BUILD_TEST_RPM}
230 yi.zhou         1.111     export PEGASUS_TMP=/usr/share/Pegasus/test/tmp
231                           export PEGASUS_DISPLAYCONSUMER_DIR="$PEGASUS_TMP"
232 w.otsuka        1.87      %endif
233                           
234 s.kodali        1.121     %if %{JMPI_PROVIDER_REQUESTED}
235                           sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=true/' $PEGASUS_ENVVAR_FILE
236                           %else
237                           sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=false/' $PEGASUS_ENVVAR_FILE
238                           %endif
239                           
240 s.kodali        1.122.2.2 %if %{EXTERNAL_SLP_REQUESTED}
241                           sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=true/' $PEGASUS_ENVVAR_FILE
242                           %else
243                           sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=false/' $PEGASUS_ENVVAR_FILE
244                           %endif
245                           
246 denise.eckstein 1.32      make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
247 denise.eckstein 1.76      make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
248                           make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
249 w.otsuka        1.92      make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.Release all
250 yi.zhou         1.98      chmod 777 %PEGASUS_RPM_HOME
251 denise.eckstein 1.32      make -f $PEGASUS_ROOT/Makefile.Release repository
252 denise.eckstein 1.74      #
253 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
254 w.otsuka        1.27      
255 denise.eckstein 1.32      %install
256                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
257 denise.eckstein 1.74      #
258 denise.eckstein 1.32      export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
259                           export PEGASUS_HOME=%PEGASUS_RPM_HOME
260                           export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
261 denise.eckstein 1.74      export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
262 denise.eckstein 1.32      export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
263 w.otsuka        1.1       
264 denise.eckstein 1.32      export OPENSSL_BIN=%OPENSSL_BIN
265                           export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
266                           export PATH=$PEGASUS_HOME/bin:$PATH
267 w.otsuka        1.1       
268 denise.eckstein 1.32      export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
269 w.otsuka        1.1       
270 w.otsuka        1.56      %if %{PEGASUS_BUILD_TEST_RPM}
271 denise.eckstein 1.74      make -f $PEGASUS_ROOT/Makefile.Release stage \
272                               PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR \
273                               PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM}
274 w.otsuka        1.56      %else
275 denise.eckstein 1.74      make -f $PEGASUS_ROOT/Makefile.Release stage \
276                               PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
277 w.otsuka        1.56      %endif
278 denise.eckstein 1.74      
279                           [ "$PEGASUS_HOME" != "/" ] && [ -d $PEGASUS_HOME ] && rm -rf $PEGASUS_HOME;
280                           #
281 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
282 w.otsuka        1.1       
283 denise.eckstein 1.32      %clean
284                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
285 denise.eckstein 1.74      #
286 w.otsuka        1.77      [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT;
287                           [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version};
288 denise.eckstein 1.74      #
289 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
290 w.otsuka        1.1       
291                           %pre
292 denise.eckstein 1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
293                           #           install   remove   upgrade  reinstall
294                           # pre          1        -         2         2
295                           #
296                           # If it exists, the active OpenPegasus Repository
297                           #    directory, %PEGASUS_REPOSITORY_DIR is renamed
298                           #    to %PEGASUS_PREV_REPOSITORY_DIR.  If
299                           #    %PEGASUS_PREV_REPOSITORY_DIR already exists,
300                           #    it is saved as an archive file.
301 denise.eckstein 1.32      
302 denise.eckstein 1.74      if [ -d %PEGASUS_REPOSITORY_DIR"/root#PG_Internal" ]; then
303                              #
304                              # Save the current repository to prev_repository
305                              #
306                              if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
307                                   /bin/tar -C %PEGASUS_REPOSITORY_PARENT_DIR -cf \
308                                       %PEGASUS_PREV_REPOSITORY_DIR`date '+%Y-%m-%d-%s.%N'`.tar \
309                                       %PEGASUS_PREV_REPOSITORY_DIR_NAME
310                                   rm -rf %PEGASUS_PREV_REPOSITORY_DIR
311                              fi
312                              /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR
313                           fi
314 w.otsuka        1.82      if [ $1 -gt 0 ]; then
315 denise.eckstein 1.74         #  Create the 'pegasus' user and group:
316                              /usr/sbin/groupadd pegasus > /dev/null 2>&1 || :;
317 s.kodali        1.122        /usr/sbin/useradd -c "%{Flavor}-pegasus OpenPegasus WBEM/CIM services" \
318 denise.eckstein 1.74              -g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \
319                                    > /dev/null 2>&1 || :;
320 w.otsuka        1.1       fi
321 yi.zhou         1.98      if [ $1 -eq 2 ]; then
322                               rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
323                               rm -f %PEGASUS_CIMSERVER_START_FILE;
324 yi.zhou         1.105         rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
325 yi.zhou         1.98      fi
326 denise.eckstein 1.74      #
327 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
328 w.otsuka        1.1       
329 kumpf           1.119     # When Privilege Separation is enabled, create the 'cimsrvr' user and
330 denise.eckstein 1.100     # 'cimsrvr' group which are used as the context of the cimservermain process
331 yi.zhou         1.98      if [ $1 -gt 0 ]; then
332 denise.eckstein 1.100         /usr/sbin/groupadd cimsrvr > /dev/null 2>&1 || :;
333 yi.zhou         1.98          /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \
334 denise.eckstein 1.100             -g cimsrvr -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR cimsrvr \
335 yi.zhou         1.98              > /dev/null 2>&1 || :;
336                           fi
337                           
338 w.otsuka        1.1       %post
339 w.otsuka        1.24      if [ $1 -eq 1 ]; then
340 denise.eckstein 1.35         echo `date` > %PEGASUS_INSTALL_LOG 2>&1
341 denise.eckstein 1.76         %define PEGASUS_CONFIG_DIR /etc/Pegasus
342                              %define PEGASUS_PEM_DIR /etc/Pegasus
343 denise.eckstein 1.32         %define PEGASUS_SSL_CERT_FILE server.pem
344                              %define PEGASUS_SSL_KEY_FILE file.pem
345                              %define PEGASUS_SSL_TRUSTSTORE client.pem
346                           
347                              # Create Symbolic Links for SDK Libraries
348                              #
349 denise.eckstein 1.81         ln -sf libpegclient.so.1 /usr/%PEGASUS_ARCH_LIB/libpegclient.so
350                              ln -sf libpegcommon.so.1 /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
351                              ln -sf libpegprovider.so.1 /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
352                              ln -sf libDefaultProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
353                              ln -sf libCIMxmlIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
354 yi.zhou         1.93         ln -sf libsnmpIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
355 denise.eckstein 1.32      
356                              # Create Symbolic Links for Packaged Provider Libraries
357                              #
358 denise.eckstein 1.81         ln -sf libComputerSystemProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
359                              ln -sf libOSProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
360                              ln -sf libProcessProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
361 denise.eckstein 1.32      
362 denise.eckstein 1.110        # Create Symbolic Links for Packaged Provider Managers
363                              #
364                              ln -sf libCMPIProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
365 s.kodali        1.122.2.2    # Create Symbolic Links for SLP library and SLP Provider
366                              #
367                            %if %{EXTERNAL_SLP_REQUESTED}
368                              ln -sf    libpegslp_client.so.1            /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
369                              ln -sf    libSLPProvider.so.1            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
370                            %endif 
371 denise.eckstein 1.110     
372 denise.eckstein 1.32      
373                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
374 denise.eckstein 1.74      #
375                           #           install   remove   upgrade  reinstall
376                           # %post        1        -         2         2
377                           #
378 denise.eckstein 1.81         export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
379                           
380 denise.eckstein 1.74         if [ $1 -eq 1 ]; then
381                           %if %{AUTOSTART}
382 s.kodali        1.122            /sbin/chkconfig --add %{Flavor}-pegasus
383 denise.eckstein 1.74      %endif
384                              :;
385                              elif [ $1 -gt 0 ]; then
386 s.kodali        1.122            /etc/init.d/%{Flavor}-pegasus condrestart
387 denise.eckstein 1.74         :;
388 denise.eckstein 1.32         fi
389 denise.eckstein 1.74      #
390 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
391 w.otsuka        1.1       
392 w.otsuka        1.57      elif [ $1 -gt 1 ]; then
393 yi.zhou         1.98         # Check if the cimserver is running
394                              isRunning=`ps -el | grep cimserver | grep -v "grep cimserver"`
395                              if [ "$isRunning" ]; then
396                                  /etc/init.d/tog-pegasus stop
397                              fi
398 sushma.fernandes 1.104        if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
399                                   # The old repository was moved to /var/lib/Pegasus/prev_repository. It should now be upgraded to the new repository /var/lib/Pegasus/repository.
400                                   %PEGASUS_SBIN_DIR/repupgrade >> %PEGASUS_INSTALL_LOG 2>&1
401                                   chown -R cimsrvr %PEGASUS_REPOSITORY_DIR
402                                   chgrp -R cimsrvr %PEGASUS_REPOSITORY_DIR
403                               fi
404 yi.zhou          1.98         if [ -f %PEGASUS_TRACE_FILE_PATH ]; then
405                                 /bin/mv %PEGASUS_TRACE_FILE_PATH %PEGASUS_TRACE_FILE_PATH-`date '+%Y-%m-%d-%R'`
406                               fi
407                               if [ "$isRunning" ]; then
408                                   /etc/init.d/tog-pegasus start
409                               fi
410 w.otsuka         1.24      fi
411 denise.eckstein  1.74      
412 w.otsuka         1.1       %preun
413 denise.eckstein  1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
414                            #           install   remove   upgrade  reinstall
415                            #  preun       -        0         1         -
416 w.otsuka         1.24      if [ $1 -eq 0 ]; then
417 denise.eckstein  1.32         # Check if the cimserver is running
418 denise.eckstein  1.74         isRunning=`ps -el | grep cimserver |  grep -v "grep cimserver"`
419 denise.eckstein  1.32         if [ "$isRunning" ]; then
420 denise.eckstein  1.74            %PEGASUS_SBIN_DIR/cimserver -s
421 kumpf            1.119        fi
422 s.kodali         1.122        /sbin/chkconfig --del %{Flavor}-pegasus;
423 s.kodali         1.122.2.3    rm -f %PEGASUS_CONFIG_DIR/cimserver_current.conf;
424 denise.eckstein  1.74         [ -d %PEGASUS_REPOSITORY_DIR ]  && rm -rf %PEGASUS_REPOSITORY_DIR;
425                               [ -d %PEGASUS_VARDATA_CACHE_DIR ]  && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
426                               rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
427                               rm -f %PEGASUS_CIMSERVER_START_FILE;
428 kumpf            1.94         rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
429 w.otsuka         1.24      fi
430 denise.eckstein  1.74      #
431                            # End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
432 w.otsuka         1.1       
433 w.otsuka         1.69      %preun devel
434 yi.zhou          1.106     # Check if the SDK has been setup
435                            if [ -f /usr/share/Pegasus/samples/SDKIsSetup ]; then
436                               make --directory /usr/share/Pegasus/samples -s unsetupSDK
437                               if [ $? != 0 ]; then
438                                  echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
439                                  echo "ERROR: Failed to deregister sample providers." >&2
440                                  echo "To remove the SDK rpm without deregistering" >&2
441                                  echo "the sample providers, first remove file" >&2
442                                  echo "/usr/share/Pegasus/samples/SDKIsSetup," >&2
443                                  echo "then remove SDK rpm." >&2
444                                  echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
445                                  exit 1
446                               fi
447                            fi
448 denise.eckstein  1.76      make --directory /usr/share/Pegasus/samples -s clean
449 denise.eckstein  1.44      
450 w.otsuka         1.56      %if %{PEGASUS_BUILD_TEST_RPM}
451 denise.eckstein  1.46      %preun test
452 denise.eckstein  1.76      make --directory /usr/share/Pegasus/test -s unsetupTEST
453                            [ -d /var/lib/Pegasus/testrepository ] &&  rm -rf /var/lib/Pegasus/testrepository;
454 denise.eckstein  1.46      
455 w.otsuka         1.56      %endif
456 w.otsuka         1.1       %postun
457 w.otsuka         1.24      if [ $1 -eq 0 ]; then
458 denise.eckstein  1.32         export LC_ALL=C
459 w.otsuka         1.1       fi
460 denise.eckstein  1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
461                            #
462                            #           install   remove   upgrade  reinstall
463                            #  postun      -        0         1         -
464                            if [ $1 -eq 0 ]; then
465                               /usr/sbin/userdel pegasus > /dev/null 2>&1 || :;
466 w.otsuka         1.78         /usr/sbin/groupdel pegasus > /dev/null 2>&1 || :;
467 denise.eckstein  1.74      fi;
468                            #
469                            # End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
470 w.otsuka         1.1       
471 kumpf            1.119     # When Privilege Separation is enabled, delete the 'cimsrvr' user and
472 denise.eckstein  1.100     # 'cimsrvr' group which are used as the context of the cimservermain process
473 yi.zhou          1.98      if [ $1 -eq 0 ]; then
474                                /usr/sbin/userdel cimsrvr > /dev/null 2>&1 || :;
475 denise.eckstein  1.100         /usr/sbin/groupdel cimsrvr > /dev/null 2>&1 || :;
476 yi.zhou          1.98      fi
477                            
478 w.otsuka         1.1       %files
479 denise.eckstein  1.109     %defattr(600,cimsrvr,cimsrvr,700)
480 yi.zhou          1.98      /var/lib/Pegasus/repository
481 denise.eckstein  1.109     
482                            %defattr(644,root,pegasus,755)
483                            /usr/share/Pegasus/mof
484                            
485                            %defattr(600,root,pegasus,755)
486 denise.eckstein  1.120     %dir /usr/share/doc/tog-pegasus-2.10
487 denise.eckstein  1.76      %dir /usr/share/Pegasus
488                            %dir /usr/share/Pegasus/scripts
489                            %dir /var/lib/Pegasus
490                            %dir /var/lib/Pegasus/cache
491                            %dir /var/lib/Pegasus/log
492                            %dir /var/lib/Pegasus/cache/localauth
493 kumpf            1.119     %dir /usr/%PEGASUS_ARCH_LIB/Pegasus
494                            %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providers
495                            %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers
496 denise.eckstein  1.74      
497 denise.eckstein  1.109     %dir %attr(755,root,pegasus) /etc/Pegasus
498                            %dir %attr(755,cimsrvr,cimsrvr) /var/run/tog-pegasus
499 denise.eckstein  1.100     %dir %attr(1755,cimsrvr,cimsrvr) /var/run/tog-pegasus/socket
500 denise.eckstein  1.76      %dir %attr(1777,root,pegasus) /var/lib/Pegasus/cache/trace
501 denise.eckstein  1.74      
502                            %config %attr(750,root,pegasus) /etc/init.d/tog-pegasus
503 s.kodali         1.122.2.3 %config(noreplace) %attr(644,root,root) /etc/Pegasus/cimserver_planned.conf
504 denise.eckstein  1.76      %config(noreplace) /etc/Pegasus/access.conf
505 denise.eckstein  1.74      %config(noreplace) /etc/pam.d/wbem
506                            
507 denise.eckstein  1.76      %ghost %config(noreplace) /etc/Pegasus/ssl.cnf
508                            %ghost %config(noreplace) /etc/Pegasus/client.pem
509                            %ghost %config(noreplace) /etc/Pegasus/server.pem
510                            %ghost %config(noreplace) /etc/Pegasus/file.pem
511                            %ghost /var/lib/Pegasus/log/install.log
512                            
513 denise.eckstein  1.99      %attr(755,root,pegasus) /usr/sbin/*
514 denise.eckstein  1.76      %attr(755,root,pegasus) /usr/bin/*
515 denise.eckstein  1.81      %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.so.1
516 s.kodali         1.121     %if %{JMPI_PROVIDER_REQUESTED}
517                            %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.jar
518                            /usr/%PEGASUS_ARCH_LIB/libJMPIProviderManager.so
519                            %endif
520 denise.eckstein  1.81      %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so.1
521 denise.eckstein  1.110     %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/*.so.1
522 denise.eckstein  1.76      %attr(750,root,pegasus) /usr/share/Pegasus/scripts/*
523                            %attr(644,root,pegasus) /usr/share/man/man1/*
524 denise.eckstein  1.101     %attr(644,root,pegasus) /usr/share/man/man8/*
525 denise.eckstein  1.76      
526 denise.eckstein  1.120     %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.10/Admin_Guide_Release.pdf
527                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.10/PegasusSSLGuidelines.htm
528                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.10/license.txt
529                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.10/OpenPegasusNOTICE.txt
530 denise.eckstein  1.81      /usr/%PEGASUS_ARCH_LIB/libpegclient.so
531                            /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
532                            /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
533                            /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
534                            /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
535 yi.zhou          1.93      /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
536 denise.eckstein  1.81      /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
537                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
538                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
539 s.kodali         1.122.2.2  %if %{EXTERNAL_SLP_REQUESTED}
540                            /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
541                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
542                            %endif
543 denise.eckstein  1.110     /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
544 w.otsuka         1.1       
545 w.otsuka         1.69      %files devel
546 denise.eckstein  1.76      %defattr(644,root,pegasus,755)
547 denise.eckstein  1.89      /usr/share/Pegasus/samples
548 w.otsuka         1.80      /usr/include/Pegasus
549 denise.eckstein  1.120     %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.10/SecurityGuidelinesForDevelopers.html
550 denise.eckstein  1.76      /usr/share/Pegasus/html
551 w.otsuka         1.28      
552 w.otsuka         1.56      %if %{PEGASUS_BUILD_TEST_RPM}
553 w.otsuka         1.28      %files test
554 denise.eckstein  1.74      %defattr(-,root,pegasus,-)
555 denise.eckstein  1.114     
556                            %dir /usr/share/Pegasus/test
557                            %dir /usr/share/Pegasus/test/bin
558                            %dir /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB
559                            %dir /usr/share/Pegasus/test/mak
560                            %dir /usr/share/Pegasus/test/tmp
561                            
562 yi.zhou          1.111     %ghost /usr/share/Pegasus/test/tmp/procIdFile
563                            %ghost /usr/share/Pegasus/test/tmp/trapLogFile
564                            %ghost /usr/share/Pegasus/test/tmp/IndicationStressTestLog
565 denise.eckstein  1.114     %ghost /usr/share/Pegasus/test/tmp/oldIndicationStressTestLog
566                            
567                            %attr(744,root,pegasus) /usr/share/Pegasus/test/bin/*
568                            %attr(744,root,pegasus) /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB/*
569                            %attr(744,root,pegasus) /usr/share/Pegasus/test/mak/*
570                            %attr(644,root,pegasus) /usr/share/Pegasus/test/Makefile
571                            
572 denise.eckstein  1.100     %defattr(600,cimsrvr, cimsrvr,700)
573 denise.eckstein  1.76      /var/lib/Pegasus/testrepository
574 w.otsuka         1.56      %endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2