tog-pegasus/tog-pegasus.spec

241 lines
8.9 KiB
RPMSpec
Raw Normal View History

################################################################################
#
# OpenPegasus (Red Hat release) RPM .spec file
#
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
# (chkconfig --level=345 tog-pegasus on) after installation.
#
Summary: OpenPegasus WBEM Services for Linux
Name: tog-pegasus
Version: 2.5
Release: 2
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
Patch3: pegasus-2.5-add_cmpi_provider_lib.patch
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
%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
Summary: The OpenPegasus Software Development Kit
Group: Systems Management/Base
Requires: tog-pegasus >= 2.5
2005-08-18 03:18:18 +00:00
%description devel
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
Autoreq: 0
Requires: tog-pegasus >= 2.5
2005-05-30 21:21:15 +00:00
%description test
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
%prep
%setup -q -n %{srcname}-%{version}
%patch0 -p1 -b .redhat
%patch1 -p1 -b .local_or_remote_auth
%patch2 -p1 -b .make_install
%patch3 -p1 -b .add_cmpi_provider_lib
%build
rm -rf $RPM_BUILD_ROOT
export RPM_ARCH_LIB=%{_lib}
. %SOURCE1
make
- .spec file changes to prevent files remaining after rpm erase Thu Sep 01 2005 Jason Vas Dias <jvdias@redhat.com> - 2.4.1-4.rhel4 - fix bug 167161: put all libraries into %{_libdir}, not /lib - fix bug 167162: use internal pthread_cleanup_{push,pop} routines - fix bug 167163: correct pam Requires and pam-devel BuildRequires - fix bug 167164: remove potential buffer overflows with gethostbyname - fix bug 167165: remove potential buffer overflow in System::extract_file_path - Upstream bug patches applied, as agreed with bug committee, which have been tested by HP and IBM and submitted to 2.4.2 - see http://cvs.rdg.opengroup.org/bugzilla/buglist.cgi?&keywords=2.4.2_appro ved : 2207 CIMOMHandle drops InvokeMethod request 2217 Interrupts improperly handled in Unix Semaphore implement... 2499 Initial Provider load/initialize is not thread safe. 2503 IndicationHandlerService::_lookupHandlerForClass() not th... 3416 SDK sample build fails on x86_64 2.4 rpm 3858 _subscriptionClassesTable not threadsafe 3958 cimserver crashs after many indications delivered 4004 cimserver crash in MessageQueueService after running for ... 4009 Double close causes EBADF ("Bad file descriptor") failures 4014 host name validation in CIMObjectPathRep::isValidHostname... 4023 Assignment operators should return object references 4025 Thread class uses internal pthread functions 4027 SSLCallbackInfo class does not declare a copy constructor... 4028 CIMInstance::buildPath assumes key properties are specified 4029 Add TestIndicationStressTest to 2.4-branch 4042 TestIndicationStressTest not enabled in 2.4 branch. 4050 Compile warning building SDK packaged consumer. 4072 ThreadPool Test Failure - 2.4 version of Bug 2239 4103 Timing window where in MessageQueue Service - Could cause... 4120 HTTPConnection _handleReadEvent should complete connectio... 4126 On shutdown, cimom::routing_proc loops attempting to send...
2005-09-02 19:02:05 +00:00
export LD_LIBRARY_PATH=$PEGASUS_HOME/%{_lib}
export PATH=$PEGASUS_HOME/bin:$PATH
make repository
make --directory=mak -f SDKMakefile stageSDK
2005-05-30 21:21:15 +00:00
%if %{WITH_TEST}
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
%install
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
mkdir -p $R$RPM_BUILD_ROOT/usr/%{_lib}/cmpi
:;
%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
%dir /usr/%{_lib}/cmpi
%attr(0755,root,pegasus) /usr/%{_lib}/Pegasus/providers/*.so.*
/usr/share/Pegasus/mof
%dir /usr/share/Pegasus/scripts
%attr(0755,root,pegasus) /usr/share/Pegasus/scripts/genSSLcerts
/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
%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
%if %{WITH_TEST}
%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
%files test
%defattr(-,root,root,-)
/var/lib/Pegasus/testrepository
/usr/share/Pegasus/test
2005-05-30 21:21:15 +00:00
%endif
%pre
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
/usr/sbin/groupadd pegasus -g 66 >/dev/null 2>&1 || :;
/usr/sbin/useradd -u 66 -c "tog-pegasus OpenPegasus WBEM/CIM services" -g pegasus \
-s /sbin/nologin -r -d /var/lib/Pegasus pegasus >/dev/null 2>&1 || :;
fi
%post
if [ $1 -eq 1 ]; then
/sbin/ldconfig
2005-08-18 03:18:18 +00:00
%if %{AUTOSTART}
/sbin/chkconfig --add tog-pegasus
2005-08-18 03:18:18 +00:00
%endif
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
:;
fi
%preun
if [ $1 -eq 0 ]; then
service tog-pegasus stop >/dev/null 2>&1
/sbin/chkconfig --del tog-pegasus;
fi
%postun
if [ $1 -eq 0 ]; then
# /usr/sbin/userdel pegasus >/dev/null 2>&1 || :;
# /usr/sbin/groudel pegasus >/dev/null 2>&1 || :;
:;
fi;
%clean
rm -rf $RPM_BUILD_ROOT;
#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
2005-05-30 21:21:15 +00:00
%changelog
* Mon Oct 31 2005 Jason Vas Dias <jvdias@redhat.com>
- 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.
* Fri Oct 14 2005 Tomas Mraz <tmraz@redhat.com>
- use include instead of pam_stack in pam config
* Fri Sep 30 2005 Jason Vas Dias <jvdias@redhat.com> - 2:tog-pegasus-2.5-1
- 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
* Wed Sep 28 2005 Jason Vas Dias <jvdias@redhat.com> - 2:tog-pegasus-2.5-0
- Initial build.