# # # OpenPegasus (Red Hat release) RPM .spec file # # tog-pegasus.spec # # Copyright (c) 2000 - 2006, # The Open Group; Hewlett-Packard Development Company, L.P.; # IBM Corp.; BMC Software; Tivoli Systems. # Licensed under the "Open Group Pegasus Open Source" license # shipped with this software. # # Upstream tog-pegasus.spec file modified for Red Hat build - # April 2006, Jason Vas Dias , Red Hat Inc. # %{?!LINUX_VERSION: %define LINUX_VERSION FC6} # %{?!PEGASUS_BUILD_TEST_RPM: %define PEGASUS_BUILD_TEST_RPM 0} # do "rpmbuild --define 'PEGASUS_BUILD_TEST_RPM 1'" to build test RPM. # %{?!NOCLEAN: %define NOCLEAN 0} # ^- 1: don't do %clean %{?!NODEBUGINFO: %define NODEBUGINFO 0} # ^- 1: don't generate debuginfo or strip binaries %if %{NODEBUGINFO} %define debug_package %{nil} %endif %define srcname pegasus %define pegasus_gid 65 %define pegasus_uid 66 Version: 2.5.1 Release: 1%{?LINUX_VERSION:.%{LINUX_VERSION}} Epoch: 2 # Summary: OpenPegasus WBEM Services for Linux Name: tog-pegasus Group: Systems Management/Base URL: http://www.openpegasus.org # License: Open Group Pegasus Open Source # BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Source: http://www.openpegasus.org/uploads/40/10123/%{srcname}-%{version}.tar.gz Source1: RedHat.OpenPegasus.Makefile Source2: README.RedHat.Security Source3: genOpenPegasusSSLCerts # Patch0: pegasus-2.5.1-initscript.patch Patch1: pegasus-2.5.1-no-rpath.patch Patch2: pegasus-2.5.1-linkflags.patch Patch3: pegasus-2.5.1-PIE.patch Patch4: pegasus-2.5.1-warnings.patch Patch5: pegasus-2.5.1-redhat-config.patch Patch6: pegasus-2.5.1-cmpi-provider-lib.patch Patch7: pegasus-2.5.1-local-or-remote-auth.patch Patch8: pegasus-2.5.1-pam-wbem.patch Patch9: pegasus-2.5.1-parallel_make.patch Patch10: pegasus-2.5.1-fix_zseries_flags.patch Patch11: pegasus-2.5.1-fix_tests.patch # Conflicts: openwbem Provides: tog-pegasus-cimserver # BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++ BuildRequires: libstdc++, make, pam-devel BuildRequires: openssl-devel >= 0.9.6, e2fsprogs Requires: bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam Requires: redhat-lsb, chkconfig, SysVinit Requires: e2fsprogs, bind-utils, net-tools Requires(post): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam Requires(post): redhat-lsb, chkconfig, SysVinit Requires(post): e2fsprogs, bind-utils, net-tools Requires(pre): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam Requires(pre): redhat-lsb, chkconfig, SysVinit Requires(pre): e2fsprogs, bind-utils, net-tools Requires(postun): bash, sed, grep, coreutils, procps, openssl >= 0.9.6, pam Requires(postun): redhat-lsb, chkconfig, SysVinit Requires(postun): e2fsprogs, bind-utils, 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. %package devel Summary: The OpenPegasus Software Development Kit Group: Systems Management/Base Requires: tog-pegasus >= %{version} Obsoletes: tog-pegasus-sdk Requires: make, gcc, gcc-c++ Requires(preun): make %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. %if %{PEGASUS_BUILD_TEST_RPM} %package test Summary: The OpenPegasus Tests Group: Systems Management/Base Requires: tog-pegasus >= %{version}, make %description test The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm. %endif %prep %setup -q -n %{srcname} %patch0 -p1 -b .initscript %patch1 -p1 -b .no-rpath %patch2 -p1 -b .linkflags %patch3 -p1 -b .PIE %patch4 -p1 -b .warnings %patch5 -p1 -b .redhat-config %patch6 -p1 -b .cmpi-provider-lib %patch7 -p1 -b .local-or-remote-auth %patch8 -p1 -b .pam-wbem %patch9 -p1 -b .parallel-make %patch10 -p1 -b .fix-zseries-flags %patch11 -p1 -b .fix-tests %build rm -rf ${RPM_BUILD_ROOT} || :; cp -fp %SOURCE1 .; cp -fp %SOURCE2 doc cp -fp %SOURCE3 rpm export RPM_ARCH_LIB=%{_lib} make %{?_smp_mflags} -f RedHat.OpenPegasus.Makefile; %if %{PEGASUS_BUILD_TEST_RPM} make %{?_smp_mflags} -f RedHat.OpenPegasus.Makefile tests; %endif %install make -f RedHat.OpenPegasus.Makefile install prefix=$RPM_BUILD_ROOT libdir=%{_libdir} root_user=%(%{__id_u} -n) pegasus_user=%(%{__id_u} -n) %if %{PEGASUS_BUILD_TEST_RPM} make -f RedHat.OpenPegasus.Makefile install_tests prefix=$RPM_BUILD_ROOT root_user=%(%{__id_u} -n) pegasus_user=%(%{__id_u} -n) %endif %if %{NODEBUGINFO} /usr/lib/rpm/brp-compress; exit 0; %endif :; %files %defattr(0750, root, pegasus, 0750) /usr/%{_lib}/* /usr/sbin/* /usr/bin/* /usr/share/Pegasus/scripts %config /etc/rc.d/init.d/tog-pegasus %defattr(0640, root, pegasus, 0750) %dir /etc/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/cimserver_trust %ghost /etc/Pegasus/indication_trust %ghost /etc/Pegasus/crl %dir /var/lib/Pegasus /var/lib/Pegasus/repository /var/lib/Pegasus/cache %dir /var/lib/Pegasus/log %ghost /var/lib/Pegasus/log/install.log %dir %attr(1750,root,pegasus) /var/run/tog-pegasus %ghost /var/run/tog-pegasus/cimserver.pid %ghost /var/run/tog-pegasus/cimserver_start.lock %ghost %attr(1640,root,pegasus) /var/run/tog-pegasus/cimxml.socket /usr/share/man/man8/* %defattr(0644, root, pegasus, 0755) %dir /usr/share/Pegasus /usr/share/Pegasus/mof /usr/share/man/man1/* %doc doc/license.txt doc/Admin_Guide_Release.pdf doc/PegasusSSLGuidelines.htm doc/SecurityGuidelinesForDevelopers.html doc/README.RedHat.Security src/Clients/repupgrade/doc/repupgrade.html %files devel %defattr(0644,root,pegasus,0755) /usr/include/Pegasus /usr/share/Pegasus/samples /usr/share/Pegasus/html %if %{PEGASUS_BUILD_TEST_RPM} %files test %defattr(0644,root,pegasus,0755) %dir /usr/share/Pegasus/test /usr/share/Pegasus/test/Makefile /usr/share/Pegasus/test/mak /var/lib/Pegasus/testrepository %defattr(0750,root,pegasus,0755) /usr/share/Pegasus/test/bin /usr/share/Pegasus/test/lib %endif %clean %if !%{NOCLEAN} [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf $RPM_BUILD_ROOT; [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{srcname}; %endif %pre if [ $1 -eq 1 ]; then # first install: create the 'pegasus' user and group: /usr/sbin/groupadd -g %{pegasus_gid} -f -r pegasus >/dev/null 2>&1 || :; /usr/sbin/useradd -u %{pegasus_uid} -r -n -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \ -c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :; elif [ $1 -gt 1 ]; then if [ -d /var/lib/Pegasus/repository ]; then if [ -d /var/lib/Pegasus/prev_repository ]; then mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave; fi; mv /var/lib/Pegasus/repository /var/lib/Pegasus/prev_repository; fi fi :; %post ldconfig; chkconfig --add tog-pegasus; if [ $1 -eq 1 ]; then echo `date` > /var/lib/Pegasus/log/install.log 2>&1 elif [ $1 -gt 1 ]; then echo `date` >> /var/lib/Pegasus/log/install.log 2>&1 || :; if [ -d /var/lib/Pegasus/prev_repository ]; then # The user's old repository was moved to /var/lib/Pegasus/prev_repository, which # now must be upgraded to the new repository in /var/lib/Pegasus/repository: /usr/sbin/repupgrade /var/lib/Pegasus/prev_repository /var/lib/Pegasus/repository \ 2>> /var/lib/Pegasus/log/install.log || :; mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave; fi; /sbin/service tog-pegasus condrestart >/dev/null 2>&1 || :; fi :; %preun if [ $1 -eq 0 ]; then /sbin/service tog-pegasus stop >/dev/null 2>&1 || :; /sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :; fi :; %postun ldconfig %preun devel if [ $1 -eq 0 ] ; then make --directory /usr/share/Pegasus/samples -s clean >/dev/null 2>&1 || :; fi :; %changelog * Thu Apr 06 2006 Jason Vas Dias - 2:2.5.1-1 - Upgrade to version 2.5.1 (including new upstream .spec file). * Tue Mar 7 2006 Bill Nottingham - 2:2.5-9 - use an assigned uid/gid, do not loop over user ids looking for a free one * Fri Feb 10 2006 Jesse Keating - 2:2.5-6.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jason Vas Dias - 2:2.5-6 - restore SSLv23_method SSL support now that bug 173399 is fixed - rebuild for new gcc, glibc, glibc-kernheaders - PAMBasicAuthenticatorUnix.cpp includes no longer include syslog.h: add - /usr/bin/install now decides to fail if chown fails - set $INSTALL_USER, $INSTALL_GROUP * Thu Dec 15 2005 Jason Vas Dias - 2:2.5-5 - fix bug 175434 : deal with pegasus uid/gid already existing on first install * Fri Dec 09 2005 Jesse Keating - 2:2.5-4.1 - rebuilt * Wed Nov 16 2005 Jason Vas Dias - 2:2.5-4 - fix bug 173401: SSL support broken by openssl-0.9.7g -> 0.9.8a upgrade * Wed Nov 09 2005 Jason Vas Dias - 2:2.5-3 - Rebuild for new openssl dependencies - Enable CMPI support for sblim-cmpi-base with ENABLE_CQL=true * Mon Oct 31 2005 Jason Vas Dias - 2:2.5-2 - 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 - use include instead of pam_stack in pam config * Fri Sep 30 2005 Jason Vas Dias - 2: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 * Wed Sep 28 2005 Jason Vas Dias - 2:2.5-0 - Initial build.