tog-pegasus/tog-pegasus.spec

328 lines
11 KiB
RPMSpec
Raw Normal View History

2006-04-11 02:31:28 +00:00
#
#
# OpenPegasus (Red Hat release) RPM .spec file
#
2006-04-07 02:40:20 +00:00
# tog-pegasus.spec
#
2006-04-07 02:40:20 +00:00
# Copyright (c) 2000 - 2006,
2006-04-11 02:31:28 +00:00
# The Open Group; Hewlett-Packard Development Company, L.P.;
# IBM Corp.; BMC Software; Tivoli Systems.
2006-04-07 02:40:20 +00:00
# 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 <jvdias@redhat.com>, 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
2006-04-17 21:29:22 +00:00
Release: 3%{?LINUX_VERSION:.%{LINUX_VERSION}}
2006-04-07 02:40:20 +00:00
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
2006-04-11 02:31:28 +00:00
Source1: RedHat.OpenPegasus.Makefile
2006-04-07 02:40:20 +00:00
Source2: README.RedHat.Security
2006-04-11 02:31:28 +00:00
Source3: genOpenPegasusSSLCerts
2006-04-07 02:40:20 +00:00
#
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
2006-04-11 02:31:28 +00:00
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
2006-04-11 19:46:17 +00:00
Patch12: pegasus-2.5.1-AutoPtr-Core.patch
Patch13: pegasus-2.5.1-obz4934.patch
Patch14: pegasus-2.5.1-obz4945.patch
Patch15: pegasus-2.5.1-PATH_MAX.patch
Patch16: pegasus-2.5.1-HOSTNAME_MAX.patch
2006-04-17 21:29:22 +00:00
Patch17: pegasus-2.5.1-fix_repupgrade.patch
2006-04-07 02:40:20 +00:00
#
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.
2005-08-18 03:18:18 +00:00
%package devel
2006-04-07 02:40:20 +00:00
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
2005-08-18 03:18:18 +00:00
%description devel
2006-04-07 02:40:20 +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.
%if %{PEGASUS_BUILD_TEST_RPM}
2005-05-30 21:21:15 +00:00
%package test
2006-04-07 02:40:20 +00:00
Summary: The OpenPegasus Tests
Group: Systems Management/Base
2006-04-11 02:31:28 +00:00
Requires: tog-pegasus >= %{version}, make
2005-05-30 21:21:15 +00:00
%description test
2006-04-07 02:40:20 +00:00
The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
2005-05-30 21:21:15 +00:00
%endif
%prep
2006-04-07 02:40:20 +00:00
%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
2006-04-11 02:31:28 +00:00
%patch9 -p1 -b .parallel-make
%patch10 -p1 -b .fix-zseries-flags
%patch11 -p1 -b .fix-tests
2006-04-11 19:46:17 +00:00
%patch12 -p1 -b .AutoPtr-Core
%patch13 -p1 -b .obz4934
%patch14 -p1 -b .obz4945
%patch15 -p1 -b .PATH_MAX
%patch16 -p1 -b .HOSTNAME_MAX
2006-04-17 21:29:22 +00:00
%patch17 -p1 -b .fix_repupgrade
%build
2006-04-07 02:40:20 +00:00
rm -rf ${RPM_BUILD_ROOT} || :;
2006-04-11 02:31:28 +00:00
cp -fp %SOURCE1 .;
cp -fp %SOURCE2 doc
cp -fp %SOURCE3 rpm
export RPM_ARCH_LIB=%{_lib}
2006-04-11 02:31:28 +00:00
make %{?_smp_mflags} -f RedHat.OpenPegasus.Makefile;
2006-04-07 02:40:20 +00:00
%if %{PEGASUS_BUILD_TEST_RPM}
2006-04-11 02:31:28 +00:00
make %{?_smp_mflags} -f RedHat.OpenPegasus.Makefile tests;
2005-05-30 21:21:15 +00:00
%endif
2005-08-18 03:18:18 +00:00
%install
2006-04-11 02:31:28 +00:00
make -f RedHat.OpenPegasus.Makefile install prefix=$RPM_BUILD_ROOT libdir=%{_libdir} root_user=%(%{__id_u} -n) pegasus_user=%(%{__id_u} -n)
2006-04-07 02:40:20 +00:00
%if %{PEGASUS_BUILD_TEST_RPM}
2006-04-11 02:31:28 +00:00
make -f RedHat.OpenPegasus.Makefile install_tests prefix=$RPM_BUILD_ROOT root_user=%(%{__id_u} -n) pegasus_user=%(%{__id_u} -n)
2006-04-07 02:40:20 +00:00
%endif
%if %{NODEBUGINFO}
/usr/lib/rpm/brp-compress;
exit 0;
%endif
2006-04-11 02:31:28 +00:00
:;
%files
2006-04-07 02:40:20 +00:00
%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
2006-04-07 02:40:20 +00:00
%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
2006-04-07 02:40:20 +00:00
%dir /var/lib/Pegasus/log
%ghost /var/lib/Pegasus/log/install.log
2006-04-11 19:46:17 +00:00
%ghost /var/lib/Pegasus/cache/trace/cimserver.trc
2006-04-07 02:40:20 +00:00
%dir %attr(1750,root,pegasus) /var/run/tog-pegasus
%ghost /var/run/tog-pegasus/cimserver.pid
%ghost /var/run/tog-pegasus/cimserver_start.lock
2006-04-11 02:31:28 +00:00
%ghost %attr(1640,root,pegasus) /var/run/tog-pegasus/cimxml.socket
2006-04-07 02:40:20 +00:00
/usr/share/man/man8/*
%defattr(0644, root, pegasus, 0755)
%dir /usr/share/Pegasus
/usr/share/Pegasus/mof
2006-04-07 02:40:20 +00:00
/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
2006-04-07 02:40:20 +00:00
%if %{PEGASUS_BUILD_TEST_RPM}
%files test
2006-04-11 02:31:28 +00:00
%defattr(0644,root,pegasus,0755)
2006-04-07 02:40:20 +00:00
%dir /usr/share/Pegasus/test
/usr/share/Pegasus/test/Makefile
2006-04-11 02:31:28 +00:00
/usr/share/Pegasus/test/mak
/var/lib/Pegasus/testrepository
2006-04-11 02:31:28 +00:00
%defattr(0750,root,pegasus,0755)
2006-04-07 02:40:20 +00:00
/usr/share/Pegasus/test/bin
/usr/share/Pegasus/test/lib
%endif
2005-05-30 21:21:15 +00:00
2006-04-07 02:40:20 +00:00
%clean
%if !%{NOCLEAN}
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf $RPM_BUILD_ROOT;
2006-04-07 02:56:48 +00:00
[ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/%{srcname};
2005-05-30 21:21:15 +00:00
%endif
%pre
2006-04-07 02:40:20 +00:00
if [ $1 -eq 1 ]; then
# first install: create the 'pegasus' user and group:
2006-04-07 02:40:20 +00:00
/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 \
2006-03-07 18:01:50 +00:00
-c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
2006-04-07 02:40:20 +00:00
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
2006-04-07 02:40:20 +00:00
:;
%post
2006-04-07 02:40:20 +00:00
ldconfig;
chkconfig --add tog-pegasus;
if [ $1 -eq 1 ]; then
2006-04-07 02:40:20 +00:00
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:
2006-04-17 21:29:22 +00:00
/usr/sbin/repupgrade 2>> /var/lib/Pegasus/log/install.log || :;
2006-04-07 02:40:20 +00:00
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
2006-04-07 02:40:20 +00:00
:;
%preun
if [ $1 -eq 0 ]; then
2006-04-07 02:40:20 +00:00
/sbin/service tog-pegasus stop >/dev/null 2>&1 || :;
/sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :;
fi
2006-04-07 02:40:20 +00:00
:;
%postun
2006-04-07 02:40:20 +00:00
ldconfig
%preun devel
if [ $1 -eq 0 ] ; then
make --directory /usr/share/Pegasus/samples -s clean >/dev/null 2>&1 || :;
fi
:;
2006-04-07 02:40:20 +00:00
%changelog
2006-04-17 21:29:22 +00:00
* Mon Apr 17 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5.1-3
- Fix repupgrade (make it use correct paths)
* Fri Apr 14 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5.1-2
- Apply patches for the two '2.5.2_APPROVED' upstream bugzillas
4934(4943) and 4945 :
(http://cvs.opengroup.org/bugzilla/buglist.cgi?bug_id=4943%2C4945)
- Fix the PATH_MAX and MAXHOSTNAMELEN issues (again)
2006-04-07 02:40:20 +00:00
* Thu Apr 06 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5.1-1
- Upgrade to version 2.5.1 (including new upstream .spec file).
2006-03-07 19:02:19 +00:00
* Tue Mar 7 2006 Bill Nottingham <notting@redhat.com> - 2:2.5-9
- use an assigned uid/gid, do not loop over user ids looking for a free one
2006-02-11 05:52:41 +00:00
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2:2.5-6.1
- bump again for double-long bug on ppc(64)
* 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
- PAMBasicAuthenticatorUnix.cpp includes no longer include syslog.h: add
- /usr/bin/install now decides to fail if chown fails - set $INSTALL_USER, $INSTALL_GROUP
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
- 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
- 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
2005-12-15 22:49:19 +00:00
* Fri Sep 30 2005 Jason Vas Dias <jvdias@redhat.com> - 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
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
- Initial build.