version 1.75, 2005/11/29 20:06:04
|
version 1.103, 2007/09/14 17:57:29
|
|
|
#%2005//////////////////////////////////////////////////////////////////////// |
#//%2006//////////////////////////////////////////////////////////////////////// |
# |
#// |
# Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
#// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
# Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
#// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
# Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
#// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
# IBM Corp.; EMC Corporation, The Open Group. |
#// IBM Corp.; EMC Corporation, The Open Group. |
# Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
#// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
# IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
#// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
# Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
#// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
# EMC Corporation; VERITAS Software Corporation; The Open Group. |
#// EMC Corporation; VERITAS Software Corporation; The Open Group. |
# |
#// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
#// EMC Corporation; Symantec Corporation; The Open Group. |
# of this software and associated documentation files (the "Software"), to |
#// |
# deal in the Software without restriction, including without limitation the |
#// Permission is hereby granted, free of charge, to any person obtaining a copy |
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
#// of this software and associated documentation files (the "Software"), to |
# sell copies of the Software, and to permit persons to whom the Software is |
#// deal in the Software without restriction, including without limitation the |
# furnished to do so, subject to the following conditions: |
#// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
# |
#// sell copies of the Software, and to permit persons to whom the Software is |
# THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
#// furnished to do so, subject to the following conditions: |
# ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
#// |
# "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
#// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
#// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
#// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
#// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
#// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
#// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
# |
#// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
#============================================================================== |
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
#// |
|
#//============================================================================== |
#%///////////////////////////////////////////////////////////////////////////// | #%///////////////////////////////////////////////////////////////////////////// |
# | # |
# tog-pegasus.spec | # tog-pegasus.spec |
|
|
# be lost the next time this file is regenerated and submitted to CVS. | # be lost the next time this file is regenerated and submitted to CVS. |
# | # |
| |
Version: 2.5RC1 |
%define packageVersion 2 |
Release: 1%{?LINUX_VERSION:.%{LINUX_VERSION}} |
Version: 2.7.0 |
|
Release: %{packageVersion}%{?LINUX_VERSION:.%{LINUX_VERSION}} |
Epoch: 1 | Epoch: 1 |
| |
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec | # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec |
|
|
# (chkconfig --level=345 tog-pegasus on) after installation. | # (chkconfig --level=345 tog-pegasus on) after installation. |
# | # |
| |
%define srcRelease 1 |
|
Summary: OpenPegasus WBEM Services for Linux | Summary: OpenPegasus WBEM Services for Linux |
Name: tog-pegasus | Name: tog-pegasus |
Group: Systems Management/Base | Group: Systems Management/Base |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
URL: http://www.openpegasus.org | URL: http://www.openpegasus.org |
| |
Source: ftp://www.opengroup.org/pegasus/%{name}-%{version}-%{srcRelease}.tar.gz |
Source: %{name}-%{version}-%{packageVersion}.tar.gz |
|
# |
|
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec |
| |
|
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec |
|
# |
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++ | BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++ |
BuildRequires: libstdc++, make, pam-devel | BuildRequires: libstdc++, make, pam-devel |
BuildRequires: openssl-devel >= 0.9.6, e2fsprogs | BuildRequires: openssl-devel >= 0.9.6, e2fsprogs |
|
BuildRequires: net-snmp-devel |
|
# |
|
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec |
|
|
|
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec |
|
# |
Requires: bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam | Requires: bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam |
#Requires: krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs | #Requires: krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs |
Requires: e2fsprogs, bind-utils, net-tools | Requires: e2fsprogs, bind-utils, net-tools |
|
|
Requires(postun): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam | Requires(postun): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam |
#Requires(postun): krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs | #Requires(postun): krb5-libs, redhat-lsb, chkconfig, SysVinit, bind-libs |
Requires(postun): e2fsprogs, bind-utils, net-tools | Requires(postun): e2fsprogs, bind-utils, net-tools |
|
Requires: net-snmp |
|
# |
|
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec |
| |
|
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec |
|
# |
Conflicts: openwbem | Conflicts: openwbem |
Provides: tog-pegasus-cimserver | Provides: tog-pegasus-cimserver |
BuildConflicts: tog-pegasus | BuildConflicts: tog-pegasus |
|
|
communication protocol for monitoring and controlling resources from diverse | communication protocol for monitoring and controlling resources from diverse |
sources. | sources. |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-desc.spec |
|
|
%global OPENSSL_HOME /usr/include/openssl |
|
%global OPENSSL_BIN /usr/bin |
|
%global PEGASUS_PEM_DIR /etc/opt/tog-pegasus |
|
%global PEGASUS_SSL_CERT_FILE server.pem |
|
%global PEGASUS_SSL_KEY_FILE file.pem |
|
%global PEGASUS_SSL_TRUSTSTORE client.pem |
|
%global PAM_CONFIG_DIR /etc/pam.d |
|
%global PEGASUS_CONFIG_DIR /etc/opt/tog-pegasus |
|
%global PEGASUS_VARDATA_DIR /var/opt/tog-pegasus |
|
%global PEGASUS_VARDATA_CACHE_DIR /var/opt/tog-pegasus/cache |
|
%global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH /var/run/tog-pegasus/socket/cimxml.socket |
|
%global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid |
|
%global PEGASUS_REPOSITORY_DIR /var/opt/tog-pegasus/repository |
|
%global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository |
|
%global PEGASUS_REPOSITORY_PARENT_DIR /var/opt/tog-pegasus |
|
%global PEGASUS_PREV_REPOSITORY_DIR /var/opt/tog-pegasus/prev_repository |
|
%global PEGASUS_SBIN_DIR /opt/tog-pegasus/sbin |
|
%global PEGASUS_DOC_DIR /opt/tog-pegasus/share/doc |
|
|
|
%global PEGASUS_RPM_ROOT $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION |
|
%global PEGASUS_RPM_HOME $RPM_BUILD_ROOT/build/tog-pegasus |
|
%global PEGASUS_INSTALL_LOG /var/opt/tog-pegasus/log/install.log |
|
| |
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec | # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec |
# | # |
|
|
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-arch.spec |
| |
|
%global PEGASUS_ARCH_LIB %{_lib} |
|
%global OPENSSL_HOME /usr |
|
%global OPENSSL_BIN /usr/bin |
|
%global PEGASUS_PEM_DIR /etc/Pegasus |
|
%global PEGASUS_SSL_CERT_FILE server.pem |
|
%global PEGASUS_SSL_KEY_FILE file.pem |
|
%global PEGASUS_SSL_TRUSTSTORE client.pem |
|
%global PAM_CONFIG_DIR /etc/pam.d |
|
%global PEGASUS_CONFIG_DIR /etc/Pegasus |
|
%global PEGASUS_VARDATA_DIR /var/lib/Pegasus |
|
%global PEGASUS_VARDATA_CACHE_DIR /var/lib/Pegasus/cache |
|
%global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH /var/run/tog-pegasus/socket/cimxml.socket |
|
%global PEGASUS_CIMSERVER_START_FILE /var/run/tog-pegasus/cimserver.pid |
|
%global PEGASUS_TRACE_FILE_PATH /var/lib/Pegasus/cache/trace/cimserver.trc |
|
%global PEGASUS_CIMSERVER_START_LOCK_FILE /var/run/tog-pegasus/cimserver_start.lock |
|
%global PEGASUS_REPOSITORY_DIR /var/lib/Pegasus/repository |
|
%global PEGASUS_PREV_REPOSITORY_DIR_NAME prev_repository |
|
%global PEGASUS_REPOSITORY_PARENT_DIR /var/lib/Pegasus |
|
%global PEGASUS_PREV_REPOSITORY_DIR /var/lib/Pegasus/prev_repository |
|
%global PEGASUS_SBIN_DIR /usr/sbin |
|
%global PEGASUS_DOC_DIR /usr/share/doc/tog-pegasus-2.7 |
|
|
|
%global PEGASUS_RPM_ROOT $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION |
|
%global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build |
|
%global PEGASUS_INSTALL_LOG /var/lib/Pegasus/log/install.log |
|
|
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec | # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec |
# | # |
%package devel | %package devel |
|
|
export LD_LIBRARY_PATH=$PEGASUS_HOME/lib | export LD_LIBRARY_PATH=$PEGASUS_HOME/lib |
export PATH=$PEGASUS_HOME/bin:$PATH | export PATH=$PEGASUS_HOME/bin:$PATH |
| |
export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g" |
export PEGASUS_EXTRA_C_FLAGS="$RPM_OPT_FLAGS -g -Wno-unused" |
export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS" | export PEGASUS_EXTRA_CXX_FLAGS="$PEGASUS_EXTRA_C_FLAGS" |
export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS" | export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS" |
#export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack" | #export PEGASUS_EXTRA_LINK_FLAGS="$RPM_OPT_FLAGS -g -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack" |
| |
|
%if %{PEGASUS_BUILD_TEST_RPM} |
|
export PEGASUS_DISPLAYCONSUMER_DIR=%PEGASUS_VARDATA_DIR/log |
|
%endif |
|
|
make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile | make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile |
make -f $PEGASUS_ROOT/Makefile.Release all |
make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude |
|
make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude |
|
make %{?_smp_mflags} -f $PEGASUS_ROOT/Makefile.Release all |
|
chmod 777 %PEGASUS_RPM_HOME |
make -f $PEGASUS_ROOT/Makefile.Release repository | make -f $PEGASUS_ROOT/Makefile.Release repository |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec |
|
|
%clean | %clean |
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec | # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec |
# | # |
#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT; |
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT; |
#[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}; |
[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}; |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec |
| |
|
|
fi | fi |
/bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR | /bin/mv %PEGASUS_REPOSITORY_DIR %PEGASUS_PREV_REPOSITORY_DIR |
fi | fi |
if [ $1 -eq 1 ]; then |
if [ $1 -gt 0 ]; then |
# Create the 'pegasus' user and group: | # Create the 'pegasus' user and group: |
/usr/sbin/groupadd pegasus > /dev/null 2>&1 || :; | /usr/sbin/groupadd pegasus > /dev/null 2>&1 || :; |
/usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \ | /usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \ |
-g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \ | -g pegasus -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR pegasus \ |
> /dev/null 2>&1 || :; | > /dev/null 2>&1 || :; |
fi | fi |
|
if [ $1 -eq 2 ]; then |
|
rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH; |
|
rm -f %PEGASUS_CIMSERVER_START_FILE; |
|
rm -f %CIMSERVER_LOCK_FILE; |
|
fi |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec |
| |
|
# When Privilege Separation is enabled, create the 'cimsrvr' user and |
|
# 'cimsrvr' group which are used as the context of the cimservermain process |
|
if [ $1 -gt 0 ]; then |
|
/usr/sbin/groupadd cimsrvr > /dev/null 2>&1 || :; |
|
/usr/sbin/useradd -c "tog-pegasus OpenPegasus WBEM/CIM services" \ |
|
-g cimsrvr -s /sbin/nologin -r -d %PEGASUS_VARDATA_DIR cimsrvr \ |
|
> /dev/null 2>&1 || :; |
|
fi |
|
|
%post | %post |
if [ $1 -eq 1 ]; then | if [ $1 -eq 1 ]; then |
echo `date` > %PEGASUS_INSTALL_LOG 2>&1 | echo `date` > %PEGASUS_INSTALL_LOG 2>&1 |
%define PEGASUS_CONFIG_DIR /etc/opt/tog-pegasus |
%define PEGASUS_CONFIG_DIR /etc/Pegasus |
%define PEGASUS_PEM_DIR /etc/opt/tog-pegasus |
%define PEGASUS_PEM_DIR /etc/Pegasus |
%define PEGASUS_SSL_CERT_FILE server.pem | %define PEGASUS_SSL_CERT_FILE server.pem |
%define PEGASUS_SSL_KEY_FILE file.pem | %define PEGASUS_SSL_KEY_FILE file.pem |
%define PEGASUS_SSL_TRUSTSTORE client.pem | %define PEGASUS_SSL_TRUSTSTORE client.pem |
| |
# Create Symbolic Links for SDK Libraries | # Create Symbolic Links for SDK Libraries |
# | # |
ln -sf libpegclient.so.1 /opt/tog-pegasus/lib/libpegclient.so |
ln -sf libpegclient.so.1 /usr/%PEGASUS_ARCH_LIB/libpegclient.so |
ln -sf libpegcommon.so.1 /opt/tog-pegasus/lib/libpegcommon.so |
ln -sf libpegcommon.so.1 /usr/%PEGASUS_ARCH_LIB/libpegcommon.so |
ln -sf libpegprovider.so.1 /opt/tog-pegasus/lib/libpegprovider.so |
ln -sf libpegprovider.so.1 /usr/%PEGASUS_ARCH_LIB/libpegprovider.so |
ln -sf libDefaultProviderManager.so.1 /opt/tog-pegasus/lib/libDefaultProviderManager.so |
ln -sf libDefaultProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so |
ln -sf libCIMxmlIndicationHandler.so.1 /opt/tog-pegasus/lib/libCIMxmlIndicationHandler.so |
ln -sf libCIMxmlIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so |
ln -sf libCMPIProviderManager.so.1 /opt/tog-pegasus/lib/libCMPIProviderManager.so |
ln -sf libCMPIProviderManager.so.1 /usr/%PEGASUS_ARCH_LIB/libCMPIProviderManager.so |
|
ln -sf libsnmpIndicationHandler.so.1 /usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so |
| |
# Create Symbolic Links for Packaged Provider Libraries | # Create Symbolic Links for Packaged Provider Libraries |
# | # |
ln -sf libComputerSystemProvider.so.1 /opt/tog-pegasus/providers/lib/libComputerSystemProvider.so |
ln -sf libComputerSystemProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so |
ln -sf libOSProvider.so.1 /opt/tog-pegasus/providers/lib/libOSProvider.so |
ln -sf libOSProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so |
ln -sf libProcessProvider.so.1 /opt/tog-pegasus/providers/lib/libProcessProvider.so |
ln -sf libProcessProvider.so.1 /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so |
| |
| |
# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec | # Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec |
|
|
# install remove upgrade reinstall | # install remove upgrade reinstall |
# %post 1 - 2 2 | # %post 1 - 2 2 |
# | # |
|
export PEGASUS_ARCH_LIB=%PEGASUS_ARCH_LIB |
|
|
if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then | if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then |
# Running Repository Upgrade utility | # Running Repository Upgrade utility |
%PEGASUS_SBIN_DIR/repupgrade %PEGASUS_PREV_REPOSITORY_DIR \ | %PEGASUS_SBIN_DIR/repupgrade %PEGASUS_PREV_REPOSITORY_DIR \ |
|
|
%endif | %endif |
:; | :; |
elif [ $1 -gt 0 ]; then | elif [ $1 -gt 0 ]; then |
/sbin/service tog-pegasus condrestart |
/etc/init.d/tog-pegasus condrestart |
:; | :; |
fi | fi |
# | # |
|
|
# Running Repository Upgrade utility | # Running Repository Upgrade utility |
%PEGASUS_SBIN_DIR/repupgrade 2>>%PEGASUS_INSTALL_LOG | %PEGASUS_SBIN_DIR/repupgrade 2>>%PEGASUS_INSTALL_LOG |
fi | fi |
/sbin/service tog-pegasus condrestart |
# Check if the cimserver is running |
:; |
isRunning=`ps -el | grep cimserver | grep -v "grep cimserver"` |
|
if [ "$isRunning" ]; then |
|
/etc/init.d/tog-pegasus stop |
|
fi |
|
if [ -f %PEGASUS_TRACE_FILE_PATH ]; then |
|
/bin/mv %PEGASUS_TRACE_FILE_PATH %PEGASUS_TRACE_FILE_PATH-`date '+%Y-%m-%d-%R'` |
|
fi |
|
if [ "$isRunning" ]; then |
|
/etc/init.d/tog-pegasus start |
|
fi |
fi | fi |
| |
%preun | %preun |
|
|
[ -d %PEGASUS_VARDATA_CACHE_DIR ] && rm -rf %PEGASUS_VARDATA_CACHE_DIR; | [ -d %PEGASUS_VARDATA_CACHE_DIR ] && rm -rf %PEGASUS_VARDATA_CACHE_DIR; |
rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH; | rm -f %PEGASUS_LOCAL_DOMAIN_SOCKET_PATH; |
rm -f %PEGASUS_CIMSERVER_START_FILE; | rm -f %PEGASUS_CIMSERVER_START_FILE; |
|
rm -f %PEGASUS_CIMSERVER_START_LOCK_FILE; |
fi | fi |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-preun.spec |
| |
%preun devel | %preun devel |
make --directory /opt/tog-pegasus/samples -s clean |
make --directory /usr/share/Pegasus/samples -s clean |
| |
%if %{PEGASUS_BUILD_TEST_RPM} | %if %{PEGASUS_BUILD_TEST_RPM} |
%preun test | %preun test |
make --directory /opt/tog-pegasus/test -s unsetupTEST |
make --directory /usr/share/Pegasus/test -s unsetupTEST |
[ -d /var/opt/tog-pegasus/testrepository ] && rm -rf /var/opt/tog-pegasus/testrepository; |
[ -d /var/lib/Pegasus/testrepository ] && rm -rf /var/lib/Pegasus/testrepository; |
| |
%endif | %endif |
%postun | %postun |
|
|
# postun - 0 1 - | # postun - 0 1 - |
if [ $1 -eq 0 ]; then | if [ $1 -eq 0 ]; then |
/usr/sbin/userdel pegasus > /dev/null 2>&1 || :; | /usr/sbin/userdel pegasus > /dev/null 2>&1 || :; |
/usr/sbin/groudel pegasus > /dev/null 2>&1 || :; |
/usr/sbin/groupdel pegasus > /dev/null 2>&1 || :; |
fi; | fi; |
# | # |
# End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec | # End of section pegasus/rpm/tog-specfiles/tog-pegasus-postun.spec |
| |
|
# When Privilege Separation is enabled, delete the 'cimsrvr' user and |
|
# 'cimsrvr' group which are used as the context of the cimservermain process |
|
if [ $1 -eq 0 ]; then |
|
/usr/sbin/userdel cimsrvr > /dev/null 2>&1 || :; |
|
/usr/sbin/groupdel cimsrvr > /dev/null 2>&1 || :; |
|
fi |
|
|
%files | %files |
%defattr(640,root,pegasus,750) |
%defattr(600, cimsrvr, cimsrvr, 700) |
%dir /opt/tog-pegasus |
/var/lib/Pegasus/repository |
%dir /opt/tog-pegasus/share |
%defattr(600, root, pegasus, 755) |
%dir /opt/tog-pegasus/share/doc |
%dir /usr/share/doc/tog-pegasus-2.7 |
%dir /opt/tog-pegasus/share/man |
%dir /usr/share/Pegasus |
%dir /opt/tog-pegasus/share/man/man1 |
%dir /usr/share/Pegasus/scripts |
%dir /opt/tog-pegasus/share/man/man8 |
%dir /usr/share/Pegasus/mof |
%dir /opt/tog-pegasus/lib |
%dir /usr/share/Pegasus/mof/Pegasus |
%dir /opt/tog-pegasus/providers |
%dir /var/lib/Pegasus |
%dir /opt/tog-pegasus/providers/lib |
%dir /var/lib/Pegasus/cache |
%dir /opt/tog-pegasus/sbin |
%dir /var/lib/Pegasus/log |
%dir /opt/tog-pegasus/bin |
%dir /var/lib/Pegasus/cache/localauth |
%dir /opt/tog-pegasus/scripts |
%dir /usr/%PEGASUS_ARCH_LIB/Pegasus |
%dir /opt/tog-pegasus/mof |
%dir /usr/%PEGASUS_ARCH_LIB/Pegasus/providers |
%dir /opt/tog-pegasus/mof/CIM29 |
|
%dir /opt/tog-pegasus/mof/Pegasus |
%dir %attr(755, root, pegasus) /etc/Pegasus |
%dir /var/opt/tog-pegasus |
%dir %attr(755, cimsrvr, cimsrvr) /var/run/tog-pegasus |
%dir /var/opt/tog-pegasus/cache |
%dir %attr(1755,cimsrvr,cimsrvr) /var/run/tog-pegasus/socket |
%dir /var/opt/tog-pegasus/log |
%dir %attr(1777,root,pegasus) /var/lib/Pegasus/cache/trace |
%dir /var/opt/tog-pegasus/cache/localauth |
|
%dir /var/run/tog-pegasus |
/usr/share/Pegasus/mof/Pegasus/* |
%dir /etc/opt/tog-pegasus |
|
|
|
%dir %attr(1555,root,pegasus) /var/run/tog-pegasus/socket |
|
%dir %attr(1777,root,pegasus) /var/opt/tog-pegasus/cache/trace |
|
|
|
/var/opt/tog-pegasus/repository |
|
/opt/tog-pegasus/mof/CIM29/* |
|
/opt/tog-pegasus/mof/Pegasus/* |
|
| |
%config %attr(750,root,pegasus) /etc/init.d/tog-pegasus | %config %attr(750,root,pegasus) /etc/init.d/tog-pegasus |
%config(noreplace) /var/opt/tog-pegasus/cimserver_planned.conf |
%config(noreplace) %attr(644, root, pegasus) /var/lib/Pegasus/cimserver_planned.conf |
%config(noreplace) /etc/opt/tog-pegasus/access.conf |
%config(noreplace) /etc/Pegasus/access.conf |
%config(noreplace) /etc/pam.d/wbem | %config(noreplace) /etc/pam.d/wbem |
| |
%ghost %config(noreplace) /etc/opt/tog-pegasus/ssl.cnf |
%ghost %config(noreplace) /etc/Pegasus/ssl.cnf |
%ghost %config(noreplace) /etc/opt/tog-pegasus/client.pem |
%ghost %config(noreplace) /etc/Pegasus/client.pem |
%ghost %config(noreplace) /etc/opt/tog-pegasus/server.pem |
%ghost %config(noreplace) /etc/Pegasus/server.pem |
%ghost %config(noreplace) /etc/opt/tog-pegasus/file.pem |
%ghost %config(noreplace) /etc/Pegasus/file.pem |
%ghost /var/opt/tog-pegasus/log/install.log |
%ghost /var/lib/Pegasus/log/install.log |
|
|
%attr(750,root,pegasus) /opt/tog-pegasus/sbin/* |
%attr(755,root,pegasus) /usr/sbin/* |
%attr(755,root,pegasus) /opt/tog-pegasus/bin/* |
%attr(755,root,pegasus) /usr/bin/* |
%attr(755,root,pegasus) /opt/tog-pegasus/lib/*.so.1 |
%attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/*.so.1 |
%attr(755,root,pegasus) /opt/tog-pegasus/providers/lib/*.so.1 |
%attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so.1 |
%attr(750,root,pegasus) /opt/tog-pegasus/scripts/* |
%attr(750,root,pegasus) /usr/share/Pegasus/scripts/* |
/opt/tog-pegasus/share/man/man1/* |
%attr(644,root,pegasus) /usr/share/man/man1/* |
/opt/tog-pegasus/share/man/man8/* |
%attr(644,root,pegasus) /usr/share/man/man8/* |
|
|
%doc %attr(444,root,pegasus) /opt/tog-pegasus/license.txt |
%doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.7/Admin_Guide_Release.pdf |
%doc %attr(444,root,pegasus) /opt/tog-pegasus/share/doc/Admin_Guide_Release.pdf |
%doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.7/PegasusSSLGuidelines.htm |
%doc %attr(444,root,pegasus) /opt/tog-pegasus/share/doc/PegasusSSLGuidelines.htm |
%doc %attr(444,root,pegasus) /usr/share/doc/tog-pegasus-2.7/license.txt |
/opt/tog-pegasus/lib/libpegclient.so |
/usr/%PEGASUS_ARCH_LIB/libpegclient.so |
/opt/tog-pegasus/lib/libpegcommon.so |
/usr/%PEGASUS_ARCH_LIB/libpegcommon.so |
/opt/tog-pegasus/lib/libpegprovider.so |
/usr/%PEGASUS_ARCH_LIB/libpegprovider.so |
/opt/tog-pegasus/lib/libDefaultProviderManager.so |
/usr/%PEGASUS_ARCH_LIB/libDefaultProviderManager.so |
/opt/tog-pegasus/lib/libCIMxmlIndicationHandler.so |
/usr/%PEGASUS_ARCH_LIB/libCIMxmlIndicationHandler.so |
/opt/tog-pegasus/lib/libCMPIProviderManager.so |
/usr/%PEGASUS_ARCH_LIB/libCMPIProviderManager.so |
/opt/tog-pegasus/providers/lib/libComputerSystemProvider.so |
/usr/%PEGASUS_ARCH_LIB/libsnmpIndicationHandler.so |
/opt/tog-pegasus/providers/lib/libOSProvider.so |
/usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libComputerSystemProvider.so |
/opt/tog-pegasus/providers/lib/libProcessProvider.so |
/usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libOSProvider.so |
|
/usr/%PEGASUS_ARCH_LIB/Pegasus/providers/libProcessProvider.so |
| |
%files devel | %files devel |
%defattr(640,root,pegasus,750) |
%defattr(644,root,pegasus,755) |
/opt/tog-pegasus/include |
/usr/share/Pegasus/samples |
/opt/tog-pegasus/samples |
/usr/include/Pegasus |
/opt/tog-pegasus/share/doc/* |
/usr/share/doc/tog-pegasus-2.7/* |
/opt/tog-pegasus/html |
/usr/share/Pegasus/html |
%attr(755,root,pegasus) /opt/tog-pegasus/providers/lib/*.so |
%attr(755,root,pegasus) /usr/%PEGASUS_ARCH_LIB/Pegasus/providers/*.so |
| |
%if %{PEGASUS_BUILD_TEST_RPM} | %if %{PEGASUS_BUILD_TEST_RPM} |
%files test | %files test |
%defattr(-,root,pegasus,-) | %defattr(-,root,pegasus,-) |
/opt/tog-pegasus/test |
/usr/share/Pegasus/test |
/var/opt/tog-pegasus/testrepository |
%defattr(600,cimsrvr, cimsrvr,700) |
|
/var/lib/Pegasus/testrepository |
%endif | %endif |