(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 karl            1.134.2.1 Version: 2.12.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.125     # Use "rpmbuild --define 'EXTERNAL_SLP_REQUESTED 1'" to include External SLP support.
 61                           %{?!EXTERNAL_SLP_REQUESTED: %define EXTERNAL_SLP_REQUESTED 0}
 62                           
 63 s.kodali        1.128     # Use "rpmbuild --define 'PEGASUS_32BIT_PROVIDER_SUPPORT 1'" to build 32 bit
 64                           # providers for 64 bit CIMOM.
 65                           %{?!PEGASUS_32BIT_PROVIDER_SUPPORT: %define PEGASUS_32BIT_PROVIDER_SUPPORT 0}
 66                           
 67 denise.eckstein 1.74      Summary:   OpenPegasus WBEM Services for Linux
 68 s.kodali        1.122     Name:      %{Flavor}-pegasus
 69 denise.eckstein 1.74      Group:     Systems Management/Base
 70                           License:   Open Group Pegasus Open Source
 71                           BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 72                           URL:       http://www.openpegasus.org
 73                           
 74 denise.eckstein 1.102     Source:    %{name}-%{version}-%{packageVersion}.tar.gz
 75 yi.zhou         1.93      #
 76                           # End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec
 77 denise.eckstein 1.74      
 78 yi.zhou         1.93      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 79                           #
 80 denise.eckstein 1.74      BuildRequires:      bash, sed, grep, coreutils, procps, gcc, gcc-c++
 81                           BuildRequires:      libstdc++, make, pam-devel
 82                           BuildRequires:      openssl-devel >= 0.9.6, e2fsprogs
 83 s.kodali        1.121     %if %{JMPI_PROVIDER_REQUESTED}
 84                           BuildRequires:      gcc-java, libgcj-devel, libgcj, java-1.4.2-gcj-compat
 85                           Requires:           libgcj, java-1.4.2-gcj-compat
 86                           %endif
 87 s.kodali        1.125     %if %{EXTERNAL_SLP_REQUESTED}
 88 dev.meetei      1.132     BuildRequires:      openslp, openslp_devel
 89 s.kodali        1.126     Requires:           openslp
 90 s.kodali        1.125     %endif
 91                           
 92 yi.zhou         1.93      BuildRequires:      net-snmp-devel
 93                           #
 94                           # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec
 95                           
 96                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
 97                           #
 98 denise.eckstein 1.74      Requires:           bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
 99 dev.meetei      1.130     #Requires:          krb5-libs, chkconfig, SysVinit, bind-libs
100 denise.eckstein 1.74      Requires:           e2fsprogs, bind-utils, net-tools
101                           Requires(post):     bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
102 dev.meetei      1.130     #Requires(post):    krb5-libs, chkconfig, SysVinit, bind-libs
103 denise.eckstein 1.74      Requires(post):     e2fsprogs, bind-utils, net-tools
104                           Requires(pre):      bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
105 dev.meetei      1.130     #Requires(pre):     krb5-libs, chkconfig, SysVinit, bind-libs
106 denise.eckstein 1.74      Requires(pre):      e2fsprogs, bind-utils, net-tools
107                           Requires(postun):   bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam
108 dev.meetei      1.130     #Requires(postun):  krb5-libs, chkconfig, SysVinit, bind-libs
109 denise.eckstein 1.74      Requires(postun):   e2fsprogs, bind-utils, net-tools
110 yi.zhou         1.93      Requires:           net-snmp
111                           #
112                           # End of section  pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec
113 denise.eckstein 1.74      
114 yi.zhou         1.93      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
115                           #
116 w.otsuka        1.73      Conflicts: openwbem
117 s.kodali        1.122     Provides: %{Flavor}-pegasus-cimserver
118                           BuildConflicts: %{Flavor}-pegasus
119 w.otsuka        1.1       
120                           %description
121 w.otsuka        1.9       OpenPegasus WBEM Services for Linux enables management solutions that deliver
122 w.otsuka        1.1       increased control of enterprise resources. WBEM is a platform and resource
123                           independent DMTF standard that defines a common information model and
124                           communication protocol for monitoring and controlling resources from diverse
125                           sources.
126 denise.eckstein 1.74      #
127 yi.zhou         1.93      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec
128 w.otsuka        1.1       
129 denise.eckstein 1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
130                           #
131 w.otsuka        1.54      %ifarch ia64
132 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_IA64_GNU
133 w.otsuka        1.1       %else
134 w.otsuka        1.54      %ifarch x86_64
135                           %global PEGASUS_HARDWARE_PLATFORM LINUX_X86_64_GNU
136                           %else
137 w.otsuka        1.24      %ifarch ppc
138 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC_GNU
139 w.otsuka        1.24      %else
140 denise.eckstein 1.44      %ifarch ppc64 pseries
141 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_PPC64_GNU
142 w.otsuka        1.24      %else
143                           %ifarch s390
144 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES_GNU
145 w.otsuka        1.24      %else
146                           %ifarch s390x zseries
147 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES64_GNU
148 w.otsuka        1.24      %else
149 denise.eckstein 1.32      %global PEGASUS_HARDWARE_PLATFORM LINUX_IX86_GNU
150 kumpf           1.119     %endif
151                           %endif
152                           %endif
153                           %endif
154 w.otsuka        1.1       %endif
155 w.otsuka        1.24      %endif
156 denise.eckstein 1.74      #
157                           # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec
158 w.otsuka        1.55      
159 s.kodali        1.128     # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch-for-32bit-provider-support.spec
160                           # This is required only when PEGASUS_32BIT_PROVIDER_SUPPORT is set
161                           
162                           %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
163                           
164                           %ifarch x86_64
165                           %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_IX86_GNU
166                           %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wno-unused -m32"
167                           %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=i386 -mtune=generic -fasynchronous-unwind-tables -m32"
168                           %else
169                           %ifarch ppc64 pseries
170                           %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_PPC_GNU
171                           %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -m32 -Wno-unused"
172                           %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -m32"
173                           %else
174                           %ifarch s390x zseries
175                           %global PEGASUS_HARDWARE_PLATFORM_FOR_32BIT LINUX_ZSERIES_GNU
176                           %global PEGASUS_EXTRA_CXX_FLAGS_32BIT  "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -Wno-unused"
177                           %global PEGASUS_EXTRA_LINK_FLAGS_32BIT "-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31"
178                           %endif
179                           %endif
180 s.kodali        1.128     %endif
181                           
182                           %endif
183                           
184                           #
185                           # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch-for-32bit-provider-support.spec
186                           
187 denise.eckstein 1.81      %global PEGASUS_ARCH_LIB %{_lib}
188 w.otsuka        1.86      %global OPENSSL_HOME /usr
189 denise.eckstein 1.81      %global OPENSSL_BIN /usr/bin
190                           %global PEGASUS_PEM_DIR /etc/Pegasus
191                           %global PEGASUS_SSL_CERT_FILE server.pem
192                           %global PEGASUS_SSL_KEY_FILE file.pem
193                           %global PEGASUS_SSL_TRUSTSTORE client.pem
194                           %global PAM_CONFIG_DIR /etc/pam.d
195                           %global PEGASUS_CONFIG_DIR /etc/Pegasus
196                           %global PEGASUS_VARDATA_DIR /var/lib/Pegasus
197                           %global PEGASUS_VARDATA_CACHE_DIR /var/lib/Pegasus/cache
198                           %global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH  /var/run/tog-pegasus/socket/cimxml.socket
199                           %global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid
200 yi.zhou         1.98      %global PEGASUS_TRACE_FILE_PATH /var/lib/Pegasus/cache/trace/cimserver.trc
201 kumpf           1.94      %global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock
202 denise.eckstein 1.81      %global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository
203                           %global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository
204                           %global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus
205                           %global PEGASUS_PREV_REPOSITORY_DIR /var/lib/Pegasus/prev_repository
206                           %global PEGASUS_SBIN_DIR /usr/sbin
207 karl            1.129     %global PEGASUS_DOC_DIR /usr/share/doc/tog-pegasus-2.12
208 denise.eckstein 1.81      
209                           %global PEGASUS_RPM_ROOT  $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
210 denise.eckstein 1.95      %global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build
211 denise.eckstein 1.81      %global PEGASUS_INSTALL_LOG /var/lib/Pegasus/log/install.log
212                           
213 denise.eckstein 1.32      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
214 denise.eckstein 1.74      #
215 w.otsuka        1.69      %package devel
216 denise.eckstein 1.32      Summary: The OpenPegasus Software Development Kit
217                           Group: Systems Management/Base
218 s.kodali        1.122     Requires: %{Flavor}-pegasus >= %{version}
219 dev.meetei      1.134     Requires(preun): bash, procps, grep, coreutils, make
220 s.kodali        1.122     Obsoletes: %{Flavor}-pegasus-sdk
221 w.otsuka        1.1       
222 w.otsuka        1.69      %description devel
223 denise.eckstein 1.74      The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the
224                           OpenPegasus WBEM Services for Linux release. It provides Linux C++ developers
225                           with the WBEM files required to build WBEM Clients and Providers. It also
226                           supports C provider developers via the CMPI interface.
227 w.otsuka        1.1       
228 w.otsuka        1.56      %if %{PEGASUS_BUILD_TEST_RPM}
229 denise.eckstein 1.32      %package test
230                           Summary: The OpenPegasus Tests
231                           Group: Systems Management/Base
232 s.kodali        1.122     Requires: %{Flavor}-pegasus >= %{version}
233 w.otsuka        1.1       
234 denise.eckstein 1.32      %description test
235                           The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
236 w.otsuka        1.56      %endif
237 denise.eckstein 1.74      #
238                           #End of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec
239 w.otsuka        1.1       
240 denise.eckstein 1.32      %prep
241 denise.eckstein 1.74      %setup -q -n %{name}-%{version}
242 w.otsuka        1.28      
243 denise.eckstein 1.32      %build
244                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
245 denise.eckstein 1.74      #
246 denise.eckstein 1.32      export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
247                           export PEGASUS_HOME=%PEGASUS_RPM_HOME
248                           export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
249 denise.eckstein 1.74      export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
250 denise.eckstein 1.32      export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
251 w.otsuka        1.1       
252 denise.eckstein 1.32      export OPENSSL_HOME=%OPENSSL_HOME
253                           export OPENSSL_BIN=%OPENSSL_BIN
254                           export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
255                           export PATH=$PEGASUS_HOME/bin:$PATH
256 w.otsuka        1.1       
257 denise.eckstein 1.97      export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g -Wno-unused"
258 denise.eckstein 1.32      export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
259 denise.eckstein 1.74      export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS"
260                           #export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack"
261 w.otsuka        1.1       
262 w.otsuka        1.87      %if %{PEGASUS_BUILD_TEST_RPM}
263 yi.zhou         1.111     export PEGASUS_TMP=/usr/share/Pegasus/test/tmp
264                           export PEGASUS_DISPLAYCONSUMER_DIR="$PEGASUS_TMP"
265 w.otsuka        1.87      %endif
266                           
267 s.kodali        1.121     %if %{JMPI_PROVIDER_REQUESTED}
268                           sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=true/' $PEGASUS_ENVVAR_FILE
269                           %else
270                           sed -i 's/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=.*$/PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER=false/' $PEGASUS_ENVVAR_FILE
271                           %endif
272                           
273 s.kodali        1.125     %if %{EXTERNAL_SLP_REQUESTED}
274                           sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=true/' $PEGASUS_ENVVAR_FILE
275                           %else
276                           sed -i 's/PEGASUS_ENABLE_SLP=.*$/PEGASUS_ENABLE_SLP=false/' $PEGASUS_ENVVAR_FILE
277                           %endif
278                           
279 s.kodali        1.128     %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
280                           sed -i 's/#PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=.*$/PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT/' $PEGASUS_ENVVAR_FILE
281                           %endif
282                           
283 denise.eckstein 1.32      make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
284 denise.eckstein 1.76      make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
285                           make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
286 w.otsuka        1.92      make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.Release all
287 yi.zhou         1.98      chmod 777 %PEGASUS_RPM_HOME
288 denise.eckstein 1.32      make -f $PEGASUS_ROOT/Makefile.Release repository
289 s.kodali        1.128     
290                           %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
291                           
292                           export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT
293                           export PEGASUS_EXTRA_C_FLAGS=%PEGASUS_EXTRA_CXX_FLAGS_32BIT 
294                           export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS"
295                           export PEGASUS_EXTRA_LINK_FLAGS=%PEGASUS_EXTRA_LINK_FLAGS_32BIT
296                           
297                           make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.cimprovagt32 all
298                           
299                           %endif
300                           
301 denise.eckstein 1.74      #
302 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec
303 w.otsuka        1.27      
304 denise.eckstein 1.32      %install
305                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
306 denise.eckstein 1.74      #
307 denise.eckstein 1.32      export PEGASUS_ROOT=%PEGASUS_RPM_ROOT
308                           export PEGASUS_HOME=%PEGASUS_RPM_HOME
309                           export PEGASUS_PLATFORM=%PEGASUS_HARDWARE_PLATFORM
310 denise.eckstein 1.74      export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
311 denise.eckstein 1.32      export PEGASUS_ENVVAR_FILE=$PEGASUS_ROOT/env_var_Linux.status
312 w.otsuka        1.1       
313 denise.eckstein 1.32      export OPENSSL_BIN=%OPENSSL_BIN
314                           export LD_LIBRARY_PATH=$PEGASUS_HOME/lib
315                           export PATH=$PEGASUS_HOME/bin:$PATH
316 w.otsuka        1.1       
317 denise.eckstein 1.32      export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
318 w.otsuka        1.1       
319 w.otsuka        1.56      %if %{PEGASUS_BUILD_TEST_RPM}
320 denise.eckstein 1.74      make -f $PEGASUS_ROOT/Makefile.Release stage \
321                               PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR \
322                               PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM}
323 w.otsuka        1.56      %else
324 denise.eckstein 1.74      make -f $PEGASUS_ROOT/Makefile.Release stage \
325                               PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
326 w.otsuka        1.56      %endif
327 denise.eckstein 1.74      
328 s.kodali        1.128     %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
329                           export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=%PEGASUS_HARDWARE_PLATFORM_FOR_32BIT
330                           export LD_LIBRARY_PATH=$PEGASUS_HOME/lib32
331                           make -f $PEGASUS_ROOT/Makefile.cimprovagt32 stage \
332                               PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
333                           
334                           %endif
335                           
336 denise.eckstein 1.74      [ "$PEGASUS_HOME" != "/" ] && [ -d $PEGASUS_HOME ] && rm -rf $PEGASUS_HOME;
337                           #
338 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec
339 w.otsuka        1.1       
340 denise.eckstein 1.32      %clean
341                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
342 denise.eckstein 1.74      #
343 w.otsuka        1.77      [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT;
344                           [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version};
345 denise.eckstein 1.74      #
346 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec
347 w.otsuka        1.1       
348                           %pre
349 denise.eckstein 1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
350                           #           install   remove   upgrade  reinstall
351                           # pre          1        -         2         2
352                           #
353                           # If it exists, the active OpenPegasus Repository
354                           #    directory, %PEGASUS_REPOSITORY_DIR is renamed
355                           #    to %PEGASUS_PREV_REPOSITORY_DIR.  If
356                           #    %PEGASUS_PREV_REPOSITORY_DIR already exists,
357                           #    it is saved as an archive file.
358 denise.eckstein 1.32      
359 denise.eckstein 1.74      if [ -d %PEGASUS_REPOSITORY_DIR"/root#PG_Internal" ]; then
360                              #
361                              # Save the current repository to prev_repository
362                              #
363                              if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
364                                   /bin/tar -C %PEGASUS_REPOSITORY_PARENT_DIR -cf \
365                                       %PEGASUS_PREV_REPOSITORY_DIR`date '+%Y-%m-%d-%s.%N'`.tar \
366                                       %PEGASUS_PREV_REPOSITORY_DIR_NAME
367                                   rm -rf %PEGASUS_PREV_REPOSITORY_DIR
368                              fi
369                              /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR
370                           fi
371 w.otsuka        1.82      if [ $1 -gt 0 ]; then
372 denise.eckstein 1.74         #  Create the 'pegasus' user and group:
373                              /usr/sbin/groupadd pegasus > /dev/null 2>&1 || :;
374 s.kodali        1.122        /usr/sbin/useradd -c "%{Flavor}-pegasus OpenPegasus WBEM/CIM services" \
375 denise.eckstein 1.74              -g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \
376                                    > /dev/null 2>&1 || :;
377 w.otsuka        1.1       fi
378 yi.zhou         1.98      if [ $1 -eq 2 ]; then
379                               rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
380                               rm -f %PEGASUS_CIMSERVER_START_FILE;
381 yi.zhou         1.105         rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
382 yi.zhou         1.98      fi
383 denise.eckstein 1.74      #
384 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec
385 w.otsuka        1.1       
386 kumpf           1.119     # When Privilege Separation is enabled, create the 'cimsrvr' user and
387 denise.eckstein 1.100     # 'cimsrvr' group which are used as the context of the cimservermain process
388 yi.zhou         1.98      if [ $1 -gt 0 ]; then
389 denise.eckstein 1.100         /usr/sbin/groupadd cimsrvr > /dev/null 2>&1 || :;
390 yi.zhou         1.98          /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \
391 denise.eckstein 1.100             -g cimsrvr -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR cimsrvr \
392 yi.zhou         1.98              > /dev/null 2>&1 || :;
393                           fi
394                           
395 w.otsuka        1.1       %post
396 w.otsuka        1.24      if [ $1 -eq 1 ]; then
397 denise.eckstein 1.35         echo `date` > %PEGASUS_INSTALL_LOG 2>&1
398 denise.eckstein 1.76         %define PEGASUS_CONFIG_DIR /etc/Pegasus
399                              %define PEGASUS_PEM_DIR /etc/Pegasus
400 denise.eckstein 1.32         %define PEGASUS_SSL_CERT_FILE server.pem
401                              %define PEGASUS_SSL_KEY_FILE file.pem
402                              %define PEGASUS_SSL_TRUSTSTORE client.pem
403                           
404                              # Create Symbolic Links for SDK Libraries
405                              #
406 denise.eckstein 1.81         ln -sf libpegclient.so.1 /usr/%PEGASUS_ARCH_LIB/libpegclient.so
407                              ln -sf libpegcommon.so.1 /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
408                              ln -sf libpegprovider.so.1 /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
409                              ln -sf libDefaultProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
410                              ln -sf libCIMxmlIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
411 yi.zhou         1.93         ln -sf libsnmpIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
412 denise.eckstein 1.32      
413                              # Create Symbolic Links for Packaged Provider Libraries
414                              #
415 denise.eckstein 1.81         ln -sf libComputerSystemProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
416                              ln -sf libOSProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
417                              ln -sf libProcessProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
418 denise.eckstein 1.32      
419 denise.eckstein 1.110        # Create Symbolic Links for Packaged Provider Managers
420                              #
421                              ln -sf libCMPIProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
422 s.kodali        1.125        # Create Symbolic Links for SLP library and SLP Provider
423                              #
424                            %if %{EXTERNAL_SLP_REQUESTED}
425                              ln -sf    libpegslp_client.so.1            /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
426                              ln -sf    libSLPProvider.so.1            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
427                            %endif 
428 denise.eckstein 1.110     
429 denise.eckstein 1.32      
430                           # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
431 denise.eckstein 1.74      #
432                           #           install   remove   upgrade  reinstall
433                           # %post        1        -         2         2
434                           #
435 denise.eckstein 1.81         export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB
436                           
437 denise.eckstein 1.74         if [ $1 -eq 1 ]; then
438                           %if %{AUTOSTART}
439 s.kodali        1.122            /sbin/chkconfig --add %{Flavor}-pegasus
440 denise.eckstein 1.74      %endif
441                              :;
442                              elif [ $1 -gt 0 ]; then
443 s.kodali        1.122            /etc/init.d/%{Flavor}-pegasus condrestart
444 denise.eckstein 1.74         :;
445 denise.eckstein 1.32         fi
446 denise.eckstein 1.74      #
447 denise.eckstein 1.32      # End of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec
448 w.otsuka        1.1       
449 w.otsuka        1.57      elif [ $1 -gt 1 ]; then
450 yi.zhou         1.98         # Check if the cimserver is running
451                              isRunning=`ps -el | grep cimserver | grep -v "grep cimserver"`
452                              if [ "$isRunning" ]; then
453                                  /etc/init.d/tog-pegasus stop
454                              fi
455 sushma.fernandes 1.104        if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then
456                                   # The old repository was moved to /var/lib/Pegasus/prev_repository. It should now be upgraded to the new repository /var/lib/Pegasus/repository.
457                                   %PEGASUS_SBIN_DIR/repupgrade >> %PEGASUS_INSTALL_LOG 2>&1
458                                   chown -R cimsrvr %PEGASUS_REPOSITORY_DIR
459                                   chgrp -R cimsrvr %PEGASUS_REPOSITORY_DIR
460                               fi
461 yi.zhou          1.98         if [ -f %PEGASUS_TRACE_FILE_PATH ]; then
462                                 /bin/mv %PEGASUS_TRACE_FILE_PATH %PEGASUS_TRACE_FILE_PATH-`date '+%Y-%m-%d-%R'`
463                               fi
464                               if [ "$isRunning" ]; then
465                                   /etc/init.d/tog-pegasus start
466                               fi
467 w.otsuka         1.24      fi
468 denise.eckstein  1.74      
469 w.otsuka         1.1       %preun
470 denise.eckstein  1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
471                            #           install   remove   upgrade  reinstall
472                            #  preun       -        0         1         -
473 w.otsuka         1.24      if [ $1 -eq 0 ]; then
474 denise.eckstein  1.32         # Check if the cimserver is running
475 denise.eckstein  1.74         isRunning=`ps -el | grep cimserver |  grep -v "grep cimserver"`
476 denise.eckstein  1.32         if [ "$isRunning" ]; then
477 denise.eckstein  1.74            %PEGASUS_SBIN_DIR/cimserver -s
478 kumpf            1.119        fi
479 s.kodali         1.122        /sbin/chkconfig --del %{Flavor}-pegasus;
480 s.kodali         1.127        rm -f %PEGASUS_CONFIG_DIR/cimserver_current.conf;
481 denise.eckstein  1.74         [ -d %PEGASUS_REPOSITORY_DIR ]  && rm -rf %PEGASUS_REPOSITORY_DIR;
482                               [ -d %PEGASUS_VARDATA_CACHE_DIR ]  && rm -rf %PEGASUS_VARDATA_CACHE_DIR;
483                               rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH;
484                               rm -f %PEGASUS_CIMSERVER_START_FILE;
485 kumpf            1.94         rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE;
486 w.otsuka         1.24      fi
487 denise.eckstein  1.74      #
488                            # End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec
489 w.otsuka         1.1       
490 w.otsuka         1.69      %preun devel
491 yi.zhou          1.106     # Check if the SDK has been setup
492                            if [ -f /usr/share/Pegasus/samples/SDKIsSetup ]; then
493                               make --directory /usr/share/Pegasus/samples -s unsetupSDK
494                               if [ $? != 0 ]; then
495                                  echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
496                                  echo "ERROR: Failed to deregister sample providers." >&2
497                                  echo "To remove the SDK rpm without deregistering" >&2
498                                  echo "the sample providers, first remove file" >&2
499                                  echo "/usr/share/Pegasus/samples/SDKIsSetup," >&2
500                                  echo "then remove SDK rpm." >&2
501                                  echo "++++++++++++++++++++++++++++++++++++++++++++++" >&2
502                                  exit 1
503                               fi
504                            fi
505 denise.eckstein  1.76      make --directory /usr/share/Pegasus/samples -s clean
506 denise.eckstein  1.44      
507 w.otsuka         1.56      %if %{PEGASUS_BUILD_TEST_RPM}
508 denise.eckstein  1.46      %preun test
509 denise.eckstein  1.76      make --directory /usr/share/Pegasus/test -s unsetupTEST
510                            [ -d /var/lib/Pegasus/testrepository ] &&  rm -rf /var/lib/Pegasus/testrepository;
511 denise.eckstein  1.46      
512 w.otsuka         1.56      %endif
513 w.otsuka         1.1       %postun
514 w.otsuka         1.24      if [ $1 -eq 0 ]; then
515 denise.eckstein  1.32         export LC_ALL=C
516 w.otsuka         1.1       fi
517 denise.eckstein  1.74      # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
518                            #
519                            #           install   remove   upgrade  reinstall
520                            #  postun      -        0         1         -
521                            if [ $1 -eq 0 ]; then
522                               /usr/sbin/userdel pegasus > /dev/null 2>&1 || :;
523 w.otsuka         1.78         /usr/sbin/groupdel pegasus > /dev/null 2>&1 || :;
524 denise.eckstein  1.74      fi;
525                            #
526                            # End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec
527 w.otsuka         1.1       
528 kumpf            1.119     # When Privilege Separation is enabled, delete the 'cimsrvr' user and
529 denise.eckstein  1.100     # 'cimsrvr' group which are used as the context of the cimservermain process
530 yi.zhou          1.98      if [ $1 -eq 0 ]; then
531                                /usr/sbin/userdel cimsrvr > /dev/null 2>&1 || :;
532 denise.eckstein  1.100         /usr/sbin/groupdel cimsrvr > /dev/null 2>&1 || :;
533 yi.zhou          1.98      fi
534                            
535 w.otsuka         1.1       %files
536 denise.eckstein  1.109     %defattr(600,cimsrvr,cimsrvr,700)
537 yi.zhou          1.98      /var/lib/Pegasus/repository
538 denise.eckstein  1.109     
539                            %defattr(644,root,pegasus,755)
540                            /usr/share/Pegasus/mof
541                            
542                            %defattr(600,root,pegasus,755)
543 karl             1.129     %dir /usr/share/doc/tog-pegasus-2.12
544 denise.eckstein  1.76      %dir /usr/share/Pegasus
545                            %dir /usr/share/Pegasus/scripts
546                            %dir /var/lib/Pegasus
547                            %dir /var/lib/Pegasus/cache
548                            %dir /var/lib/Pegasus/log
549                            %dir /var/lib/Pegasus/cache/localauth
550 kumpf            1.119     %dir /usr/%PEGASUS_ARCH_LIB/Pegasus
551                            %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providers
552                            %dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers
553 denise.eckstein  1.74      
554 denise.eckstein  1.109     %dir %attr(755,root,pegasus) /etc/Pegasus
555                            %dir %attr(755,cimsrvr,cimsrvr) /var/run/tog-pegasus
556 denise.eckstein  1.100     %dir %attr(1755,cimsrvr,cimsrvr) /var/run/tog-pegasus/socket
557 venkat.puvvada   1.131     %dir %attr(1777,cimsrvr,cimsrvr) /var/lib/Pegasus/cache/trace
558 denise.eckstein  1.74      
559                            %config %attr(750,root,pegasus) /etc/init.d/tog-pegasus
560 s.kodali         1.127     %config(noreplace) %attr(644,root,root) /etc/Pegasus/cimserver_planned.conf
561 denise.eckstein  1.76      %config(noreplace) /etc/Pegasus/access.conf
562 denise.eckstein  1.74      %config(noreplace) /etc/pam.d/wbem
563                            
564 denise.eckstein  1.76      %ghost %config(noreplace) /etc/Pegasus/ssl.cnf
565                            %ghost %config(noreplace) /etc/Pegasus/client.pem
566                            %ghost %config(noreplace) /etc/Pegasus/server.pem
567                            %ghost %config(noreplace) /etc/Pegasus/file.pem
568                            %ghost /var/lib/Pegasus/log/install.log
569                            
570 denise.eckstein  1.99      %attr(755,root,pegasus) /usr/sbin/*
571 denise.eckstein  1.76      %attr(755,root,pegasus) /usr/bin/*
572 denise.eckstein  1.81      %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.so.1
573 s.kodali         1.121     %if %{JMPI_PROVIDER_REQUESTED}
574                            %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.jar
575                            /usr/%PEGASUS_ARCH_LIB/libJMPIProviderManager.so
576                            %endif
577 denise.eckstein  1.81      %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so.1
578 denise.eckstein  1.110     %attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/*.so.1
579 s.kodali         1.128     %if %{PEGASUS_32BIT_PROVIDER_SUPPORT}
580                            %dir /usr/lib/Pegasus
581                            %dir /usr/lib/Pegasus/providers
582                            %dir /usr/lib/Pegasus/providerManagers
583                            %attr(755,root,pegasus) /usr/lib/*.so.1
584                            %attr(755,root,pegasus) /usr/lib/Pegasus/providerManagers/*.so.1
585                            /usr/lib/libpegclient.so
586                            /usr/lib/libpegcommon.so
587                            /usr/lib/libpegprovider.so
588                            /usr/lib/libDefaultProviderManager.so
589                            /usr/lib/Pegasus/providerManagers/libCMPIProviderManager.so
590                            %endif
591 denise.eckstein  1.76      %attr(750,root,pegasus) /usr/share/Pegasus/scripts/*
592                            %attr(644,root,pegasus) /usr/share/man/man1/*
593 denise.eckstein  1.101     %attr(644,root,pegasus) /usr/share/man/man8/*
594 denise.eckstein  1.76      
595 karl             1.129     %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/Admin_Guide_Release.pdf
596                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/PegasusSSLGuidelines.htm
597                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/license.txt
598                            %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/OpenPegasusNOTICE.txt
599 denise.eckstein  1.81      /usr/%PEGASUS_ARCH_LIB/libpegclient.so
600                            /usr/%PEGASUS_ARCH_LIB/libpegcommon.so
601                            /usr/%PEGASUS_ARCH_LIB/libpegprovider.so
602                            /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so
603                            /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so
604 yi.zhou          1.93      /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so
605 denise.eckstein  1.81      /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so
606                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so
607                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so
608 s.kodali         1.125      %if %{EXTERNAL_SLP_REQUESTED}
609                            /usr/%PEGASUS_ARCH_LIB/libpegslp_client.so
610                            /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libSLPProvider.so
611                            %endif
612 denise.eckstein  1.110     /usr/%PEGASUS_ARCH_LIB/Pegasus/providerManagers/libCMPIProviderManager.so
613 w.otsuka         1.1       
614 w.otsuka         1.69      %files devel
615 denise.eckstein  1.76      %defattr(644,root,pegasus,755)
616 denise.eckstein  1.89      /usr/share/Pegasus/samples
617 w.otsuka         1.80      /usr/include/Pegasus
618 karl             1.129     %doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.12/SecurityGuidelinesForDevelopers.html
619 denise.eckstein  1.76      /usr/share/Pegasus/html
620 w.otsuka         1.28      
621 w.otsuka         1.56      %if %{PEGASUS_BUILD_TEST_RPM}
622 w.otsuka         1.28      %files test
623 denise.eckstein  1.74      %defattr(-,root,pegasus,-)
624 denise.eckstein  1.114     
625                            %dir /usr/share/Pegasus/test
626                            %dir /usr/share/Pegasus/test/bin
627                            %dir /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB
628                            %dir /usr/share/Pegasus/test/mak
629                            %dir /usr/share/Pegasus/test/tmp
630                            
631 yi.zhou          1.111     %ghost /usr/share/Pegasus/test/tmp/procIdFile
632                            %ghost /usr/share/Pegasus/test/tmp/trapLogFile
633                            %ghost /usr/share/Pegasus/test/tmp/IndicationStressTestLog
634 denise.eckstein  1.114     %ghost /usr/share/Pegasus/test/tmp/oldIndicationStressTestLog
635                            
636                            %attr(744,root,pegasus) /usr/share/Pegasus/test/bin/*
637                            %attr(744,root,pegasus) /usr/share/Pegasus/test/%PEGASUS_ARCH_LIB/*
638                            %attr(744,root,pegasus) /usr/share/Pegasus/test/mak/*
639                            %attr(644,root,pegasus) /usr/share/Pegasus/test/Makefile
640                            
641 denise.eckstein  1.100     %defattr(600,cimsrvr, cimsrvr,700)
642 denise.eckstein  1.76      /var/lib/Pegasus/testrepository
643 w.otsuka         1.56      %endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2