2005-10-03 17:52:26 +00:00
|
|
|
################################################################################
|
2005-01-20 02:41:52 +00:00
|
|
|
#
|
2005-10-03 17:52:26 +00:00
|
|
|
# OpenPegasus (Red Hat release) RPM .spec file
|
2005-01-20 02:41:52 +00:00
|
|
|
#
|
2005-05-30 21:21:15 +00:00
|
|
|
%{?!WITH_TEST: %define WITH_TEST 0}
|
|
|
|
# do "rpmbuild --define 'WITH_TEST 1'" to build test RPM .
|
2005-08-18 03:18:18 +00:00
|
|
|
# NOTE: Must use "rpm -[iU]vh --define 'WITH_TEST 1'" for all RPMs if test rpm
|
|
|
|
# is to be installed.
|
|
|
|
# DO NOT install test rpm for production use.
|
|
|
|
%{?!AUTOSTART: %define AUTOSTART 0}
|
|
|
|
# Use "rpm -[iU]vh --define 'AUTOSTART 1'" in order to have cimserver enabled
|
2005-10-03 17:52:26 +00:00
|
|
|
# (chkconfig --level=345 tog-pegasus on) after installation.
|
|
|
|
#
|
2005-11-16 23:21:43 +00:00
|
|
|
#%define debug_package %{nil}
|
2005-10-03 17:52:26 +00:00
|
|
|
Summary: OpenPegasus WBEM Services for Linux
|
|
|
|
Name: tog-pegasus
|
|
|
|
Version: 2.5
|
2006-02-07 22:20:11 +00:00
|
|
|
Release: 6
|
2005-10-03 17:52:26 +00:00
|
|
|
Epoch: 2
|
|
|
|
Group: Systems Management/Base
|
|
|
|
License: Open Group Pegasus Open Source
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
URL: http://www.openpegasus.org/
|
|
|
|
%define srcname pegasus
|
|
|
|
Source0: %{srcname}-%{version}.tar.gz
|
|
|
|
Source1: rpm_build_env
|
|
|
|
Source2: README.RedHat.Security
|
|
|
|
Source3: access.conf
|
|
|
|
Source4: genSSLcerts
|
|
|
|
Patch0: pegasus-2.5-redhat.patch
|
|
|
|
Patch1: pegasus-2.5-local-or-remote-auth.patch
|
|
|
|
Patch2: pegasus-2.5-make_install.patch
|
2005-10-31 20:42:22 +00:00
|
|
|
Patch3: pegasus-2.5-add_cmpi_provider_lib.patch
|
2005-11-10 00:48:19 +00:00
|
|
|
Patch4: pegasus-2.5-enable_cql.patch
|
2005-11-16 23:21:43 +00:00
|
|
|
Patch5: pegasus-2.5-bz173401.patch
|
2005-10-03 17:52:26 +00:00
|
|
|
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++, libstdc++, make, pam-devel, krb5-devel, krb5-libs, openssl-devel >= 0.9.6, e2fsprogs
|
|
|
|
Requires: bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
|
|
|
|
Requires(post): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
|
|
|
|
Requires(pre): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
|
|
|
|
Requires(postun): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam, krb5-libs, e2fsprogs, redhat-lsb, chkconfig, SysVinit, bind-utils, bind-libs, net-tools
|
2005-01-20 02:41:52 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
OpenPegasus WBEM Services for Linux enables management solutions that deliver
|
|
|
|
increased control of enterprise resources. WBEM is a platform and resource
|
|
|
|
independent DMTF standard that defines a common information model and
|
|
|
|
communication protocol for monitoring and controlling resources from diverse
|
|
|
|
sources.
|
|
|
|
|
2005-08-18 03:18:18 +00:00
|
|
|
%package devel
|
2005-01-20 02:41:52 +00:00
|
|
|
Summary: The OpenPegasus Software Development Kit
|
|
|
|
Group: Systems Management/Base
|
2005-10-03 17:52:26 +00:00
|
|
|
Requires: tog-pegasus >= 2.5
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-08-18 03:18:18 +00:00
|
|
|
%description devel
|
2005-01-20 02:41:52 +00:00
|
|
|
The OpenPegasus WBEM Services for Linux SDK is the developer's kit for the OpenPegasus WBEM
|
|
|
|
Services for Linux release. It provides Linux C++ developers with the WBEM files required to
|
|
|
|
build WBEM Clients and Providers. It also supports C provider developers via the CMPI interface.
|
|
|
|
|
2005-05-30 21:21:15 +00:00
|
|
|
%if %{WITH_TEST}
|
|
|
|
%package test
|
|
|
|
Summary: The OpenPegasus Tests
|
|
|
|
Group: Systems Management/Base
|
2005-10-03 17:52:26 +00:00
|
|
|
Autoreq: 0
|
|
|
|
Requires: tog-pegasus >= 2.5
|
2005-05-30 21:21:15 +00:00
|
|
|
|
|
|
|
%description test
|
2005-10-03 17:52:26 +00:00
|
|
|
The OpenPegasus WBEM tests for the OpenPegasus 2.5 Linux rpm.
|
|
|
|
**********************************************************************************
|
|
|
|
*** DO NOT INSTALL THIS RPM ON A PRODUCTION SYSTEM - THIS IS FOR TESTING ONLY. ***
|
|
|
|
**********************************************************************************
|
2005-05-30 21:21:15 +00:00
|
|
|
%endif
|
|
|
|
|
2005-01-20 02:41:52 +00:00
|
|
|
%prep
|
2005-10-03 17:52:26 +00:00
|
|
|
%setup -q -n %{srcname}-%{version}
|
|
|
|
%patch0 -p1 -b .redhat
|
|
|
|
%patch1 -p1 -b .local_or_remote_auth
|
|
|
|
%patch2 -p1 -b .make_install
|
2005-10-31 20:42:22 +00:00
|
|
|
%patch3 -p1 -b .add_cmpi_provider_lib
|
2005-11-10 00:48:19 +00:00
|
|
|
%patch4 -p1 -b .enable_cql
|
2006-02-07 22:20:11 +00:00
|
|
|
# %patch5 -p1 -b .bz173401
|
|
|
|
# now fixed with openssl-0.9.8a-3+
|
2005-01-20 02:41:52 +00:00
|
|
|
|
|
|
|
%build
|
2005-10-03 17:52:26 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
export RPM_ARCH_LIB=%{_lib}
|
|
|
|
. %SOURCE1
|
2005-01-20 02:41:52 +00:00
|
|
|
make
|
2005-09-02 19:02:05 +00:00
|
|
|
export LD_LIBRARY_PATH=$PEGASUS_HOME/%{_lib}
|
2005-01-20 02:41:52 +00:00
|
|
|
export PATH=$PEGASUS_HOME/bin:$PATH
|
|
|
|
make repository
|
2005-10-03 17:52:26 +00:00
|
|
|
make --directory=mak -f SDKMakefile stageSDK
|
2005-05-30 21:21:15 +00:00
|
|
|
%if %{WITH_TEST}
|
2005-10-03 17:52:26 +00:00
|
|
|
export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
|
|
|
|
export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT
|
|
|
|
make --directory=$PEGASUS_ROOT -f Makefile.ReleaseTest stageTEST
|
|
|
|
unset PEGASUS_STAGING_DIR
|
2005-05-30 21:21:15 +00:00
|
|
|
%endif
|
2005-08-18 03:18:18 +00:00
|
|
|
|
2005-01-20 02:41:52 +00:00
|
|
|
%install
|
2005-10-03 17:52:26 +00:00
|
|
|
export RPM_ARCH_LIB=%{_lib}
|
|
|
|
. %SOURCE1
|
|
|
|
export PEGASUS_DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
export PEGASUS_ENVVAR_FILE=${PEGASUS_ROOT}/env_var_Linux.status
|
|
|
|
export PATH=${PEGASUS_HOME}/bin:$PATH
|
|
|
|
export LD_LIBRARY_PATH=${PEGASUS_HOME}/%{_lib}:/%{_lib}:/usr/%{_lib}
|
|
|
|
unset PEGASUS_STAGING_DIR
|
|
|
|
export PEGASUS_SDK_STAGING_DIR=${PEGASUS_HOME}/stageSDK
|
|
|
|
make install
|
|
|
|
rm -rf $PEGASUS_HOME
|
|
|
|
mkdir -p $RPM_BUILD_ROOT{${PEGASUS_CONFIG_DIR},${PEGASUS_VARRUN_DIR},${PEGASUS_LOG_DIR},$PEGASUS_VARDATA_DIR}
|
|
|
|
touch $RPM_BUILD_ROOT{${PEGASUS_CONFIG_DIR}/{cimserver_{current,planned}.conf,ssl.cnf,client.pem,server.pem,file.pem,client_2048.pem,server_2048.pem,file_2048.pem},${PEGASUS_LOG_DIR}/install.log,${PEGASUS_VARRUN_DIR}/cimxml.socket}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/lib/Pegasus/prev_repository
|
|
|
|
cp -fp %SOURCE2 ${PEGASUS_ROOT}/doc
|
|
|
|
cp -fp %SOURCE3 $RPM_BUILD_ROOT/${PEGASUS_CONFIG_DIR}/access.conf
|
|
|
|
chmod 640 $RPM_BUILD_ROOT/${PEGASUS_CONFIG_DIR}/access.conf
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts
|
|
|
|
cp -fp %SOURCE4 $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts
|
|
|
|
chmod 750 $RPM_BUILD_ROOT/${PEGASUS_PRODSHARE_DIR}/scripts/genSSLcerts
|
2005-10-31 20:42:22 +00:00
|
|
|
mkdir -p $R$RPM_BUILD_ROOT/usr/%{_lib}/cmpi
|
2005-11-16 23:21:43 +00:00
|
|
|
#/usr/lib/rpm/brp-compress
|
|
|
|
#exit 0
|
2005-10-03 17:52:26 +00:00
|
|
|
:;
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%files
|
|
|
|
%defattr(0640,root,pegasus,0750)
|
|
|
|
%dir /etc/Pegasus
|
|
|
|
%dir /var/lib/Pegasus
|
|
|
|
%attr(1750,root,pegasus) /var/run/tog-pegasus
|
|
|
|
%dir /var/log/Pegasus
|
|
|
|
%config %attr(750,root,root) /etc/rc.d/init.d/tog-pegasus
|
|
|
|
%ghost %config(noreplace) /etc/Pegasus/cimserver_current.conf
|
|
|
|
%ghost %config(noreplace) /etc/Pegasus/cimserver_planned.conf
|
|
|
|
%config(noreplace) /etc/Pegasus/access.conf
|
|
|
|
%config(noreplace) /etc/pam.d/wbem
|
|
|
|
%ghost /etc/Pegasus/ssl.cnf
|
|
|
|
%ghost /etc/Pegasus/client.pem
|
|
|
|
%ghost /etc/Pegasus/server.pem
|
|
|
|
%ghost /etc/Pegasus/file.pem
|
|
|
|
%ghost /etc/Pegasus/client_2048.pem
|
|
|
|
%ghost /etc/Pegasus/server_2048.pem
|
|
|
|
%ghost /etc/Pegasus/file_2048.pem
|
|
|
|
%ghost /var/log/Pegasus/install.log
|
|
|
|
%ghost /var/lib/Pegasus/prev_repository
|
|
|
|
/var/lib/Pegasus/repository
|
|
|
|
/var/lib/Pegasus/cache
|
|
|
|
%attr(0750,root,pegasus) /usr/sbin/*
|
|
|
|
%attr(0755,root,pegasus) /usr/bin/*
|
|
|
|
%attr(0755,root,pegasus) /usr/%{_lib}/*.so.*
|
|
|
|
%dir /usr/%{_lib}/Pegasus/providers
|
2005-10-31 20:42:22 +00:00
|
|
|
%dir /usr/%{_lib}/cmpi
|
2005-10-03 17:52:26 +00:00
|
|
|
%attr(0755,root,pegasus) /usr/%{_lib}/Pegasus/providers/*.so.*
|
|
|
|
/usr/share/Pegasus/mof
|
|
|
|
%dir /usr/share/Pegasus/scripts
|
2005-10-03 18:09:23 +00:00
|
|
|
%attr(0755,root,pegasus) /usr/share/Pegasus/scripts/genSSLcerts
|
2005-10-03 17:52:26 +00:00
|
|
|
/usr/share/man/man*/*
|
|
|
|
%doc doc/license.txt doc/Admin_Guide_Release.pdf doc/README.RedHat.Security doc/SecurityGuidelinesForDevelopers.html doc/PegasusSSLGuidelines.htm doc/MessageQueueService.html doc/ProviderLoading.txt
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%files devel
|
|
|
|
%defattr(0644,root,pegasus,0755)
|
|
|
|
/usr/include/Pegasus
|
|
|
|
/usr/share/Pegasus/samples
|
|
|
|
/usr/share/Pegasus/html
|
|
|
|
%attr(0755,root,pegasus) /usr/%{_lib}/*.so
|
|
|
|
%attr(0755,root,pegasus) /usr/%{_lib}/Pegasus/providers/*.so
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%if %{WITH_TEST}
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%post test
|
|
|
|
/etc/init.d/tog-pegasus stop
|
|
|
|
cd /var/lib/Pegasus
|
|
|
|
mv repository repository.bak
|
|
|
|
mv testrepository repository
|
|
|
|
/usr/share/Pegasus/scripts/genSSLcerts
|
|
|
|
cd /usr/share/Pegasus/test
|
|
|
|
make create_providerlinks
|
|
|
|
make tests
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%files test
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
/var/lib/Pegasus/testrepository
|
|
|
|
/usr/share/Pegasus/test
|
2005-05-30 21:21:15 +00:00
|
|
|
|
|
|
|
%endif
|
2005-01-20 02:41:52 +00:00
|
|
|
|
|
|
|
%pre
|
2005-10-03 17:52:26 +00:00
|
|
|
if [ $1 -gt 1 ]; then
|
|
|
|
if [ -d /var/lib/Pegasus/repository/root\#PG_Internal ]; then
|
|
|
|
#
|
|
|
|
# Save the current repository to prev_repository.
|
|
|
|
#
|
|
|
|
if [ -d /var/lib/Pegasus/prev_repository ]; then
|
|
|
|
/bin/mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
|
|
|
|
fi
|
|
|
|
/bin/mv /var/lib/Pegasus/repository /var/lib/Pegasus/prev_repository
|
|
|
|
fi;
|
|
|
|
elif [ $1 -eq 1 ]; then
|
|
|
|
# first install: create the 'pegasus' user and group:
|
|
|
|
# By default, ONLY the "pegasus" user will be allowed to connect to cimserver over network
|
2005-12-15 22:49:19 +00:00
|
|
|
if ! /usr/bin/id pegasus >/dev/null 2>&1; then
|
|
|
|
for((uid=466; uid<500; uid++))
|
|
|
|
do
|
|
|
|
if /usr/sbin/groupadd pegasus -g $uid >/dev/null 2>&1 &&
|
|
|
|
/usr/sbin/useradd -u $uid -c "tog-pegasus OpenPegasus WBEM/CIM services" -g pegasus -s /sbin/nologin -r -d /var/lib/Pegasus pegasus >/dev/null 2>&1; then
|
|
|
|
break;
|
|
|
|
else
|
|
|
|
if egrep -q '^pegasus:.*:'$uid':' /etc/group; then
|
|
|
|
groupdel pegasus >/dev/null 2>&1;
|
|
|
|
fi;
|
|
|
|
if [ $uid -eq 499 ]; then
|
|
|
|
uid=100;
|
|
|
|
elif [ $uid -eq 465 ]; then
|
|
|
|
break;
|
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
done;
|
|
|
|
fi;
|
2005-01-20 02:41:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%post
|
|
|
|
if [ $1 -eq 1 ]; then
|
2005-10-03 17:52:26 +00:00
|
|
|
/sbin/ldconfig
|
2005-08-18 03:18:18 +00:00
|
|
|
%if %{AUTOSTART}
|
2005-10-03 17:52:26 +00:00
|
|
|
/sbin/chkconfig --add tog-pegasus
|
2005-08-18 03:18:18 +00:00
|
|
|
%endif
|
2005-10-03 17:52:26 +00:00
|
|
|
echo `date` >/var/log/Pegasus/install.log 2>&1
|
|
|
|
elif [ $1 -gt 0 ]; then
|
|
|
|
/sbin/service tog-pegasus condrestart
|
2005-05-30 21:21:15 +00:00
|
|
|
:;
|
2005-01-20 02:41:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ]; then
|
2005-10-03 17:52:26 +00:00
|
|
|
service tog-pegasus stop >/dev/null 2>&1
|
|
|
|
/sbin/chkconfig --del tog-pegasus;
|
2005-01-20 02:41:52 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ]; then
|
2005-10-31 20:42:22 +00:00
|
|
|
# /usr/sbin/userdel pegasus >/dev/null 2>&1 || :;
|
|
|
|
# /usr/sbin/groudel pegasus >/dev/null 2>&1 || :;
|
|
|
|
:;
|
2005-10-03 17:52:26 +00:00
|
|
|
fi;
|
2005-01-20 02:41:52 +00:00
|
|
|
|
2005-10-03 17:52:26 +00:00
|
|
|
%clean
|
2005-10-31 20:42:22 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT;
|
2005-10-03 17:52:26 +00:00
|
|
|
#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
|
2005-05-30 21:21:15 +00:00
|
|
|
|
2005-01-20 02:41:52 +00:00
|
|
|
%changelog
|
2006-02-07 22:20:11 +00:00
|
|
|
* Tue Feb 07 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-6
|
|
|
|
- restore SSLv23_method SSL support now that bug 173399 is fixed
|
|
|
|
- rebuild for new gcc, glibc, glibc-kernheaders
|
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Thu Dec 15 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-5
|
|
|
|
- fix bug 175434 : deal with pegasus uid/gid already existing
|
|
|
|
on first install
|
|
|
|
|
|
|
|
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> - 2:2.5-4.1
|
2005-12-09 22:43:37 +00:00
|
|
|
- rebuilt
|
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Wed Nov 16 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-4
|
2005-11-16 23:21:43 +00:00
|
|
|
- fix bug 173401: SSL support broken by openssl-0.9.7g -> 0.9.8a upgrade
|
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Wed Nov 09 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-3
|
2005-11-10 00:48:19 +00:00
|
|
|
- Rebuild for new openssl dependencies
|
|
|
|
- Enable CMPI support for sblim-cmpi-base with ENABLE_CQL=true
|
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Mon Oct 31 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-2
|
2005-10-31 20:42:22 +00:00
|
|
|
- Add /usr/lib/cmpi alternate providerLibDir for sblim-cmpi-base Fedora Extras pkg
|
|
|
|
- Fix bug 171124: use numeric ids for pegasus user/group
|
|
|
|
- guidelines: do not remove pegasus user/group in %%postun.
|
|
|
|
|
2005-10-14 10:36:16 +00:00
|
|
|
* Fri Oct 14 2005 Tomas Mraz <tmraz@redhat.com>
|
|
|
|
- use include instead of pam_stack in pam config
|
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Fri Sep 30 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-1
|
2005-10-03 17:52:26 +00:00
|
|
|
- Implemented new 'make install' target.
|
|
|
|
- Re-wrote tog-pegasus.spec file from scratch.
|
|
|
|
- Ported BZ 167986 authentication code and BZ 167164 + BZ 167165 fixes from RHEL-4
|
2005-08-18 03:18:18 +00:00
|
|
|
|
2005-12-15 22:49:19 +00:00
|
|
|
* Wed Sep 28 2005 Jason Vas Dias <jvdias@redhat.com> - 2:2.5-0
|
2005-10-03 17:52:26 +00:00
|
|
|
- Initial build.
|