upgrade to 2.5.1
This commit is contained in:
parent
714eca2b40
commit
e48b9b75ad
379
tog-pegasus.spec
379
tog-pegasus.spec
@ -1,45 +1,81 @@
|
||||
################################################################################
|
||||
#==============================================================================
|
||||
#
|
||||
# OpenPegasus (Red Hat release) RPM .spec file
|
||||
#
|
||||
%{?!WITH_TEST: %define WITH_TEST 0}
|
||||
# do "rpmbuild --define 'WITH_TEST 1'" to build test RPM .
|
||||
# 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.
|
||||
# tog-pegasus.spec
|
||||
#
|
||||
#%define debug_package %{nil}
|
||||
Summary: OpenPegasus WBEM Services for Linux
|
||||
Name: tog-pegasus
|
||||
Version: 2.5
|
||||
Release: 9
|
||||
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
|
||||
Patch4: pegasus-2.5-enable_cql.patch
|
||||
Patch5: pegasus-2.5-bz173401.patch
|
||||
Patch6: pegasus-2.5-syslog_h.patch
|
||||
Patch7: pegasus-2.5-install_id.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
|
||||
# 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 <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
|
||||
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: pegasus_rpm_build_env.sh
|
||||
Source2: README.RedHat.Security
|
||||
#
|
||||
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
|
||||
#
|
||||
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
|
||||
@ -49,93 +85,89 @@ 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 >= 2.5
|
||||
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.
|
||||
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}
|
||||
|
||||
%if %{WITH_TEST}
|
||||
%package test
|
||||
Summary: The OpenPegasus Tests
|
||||
Group: Systems Management/Base
|
||||
Autoreq: 0
|
||||
Requires: tog-pegasus >= 2.5
|
||||
Summary: The OpenPegasus Tests
|
||||
Group: Systems Management/Base
|
||||
Requires: tog-pegasus >= %{version}
|
||||
Requires(post): make
|
||||
Requires(postun): make
|
||||
|
||||
%description test
|
||||
The OpenPegasus WBEM tests for the OpenPegasus 2.5 Linux rpm.
|
||||
The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
|
||||
**********************************************************************************
|
||||
*** DO NOT INSTALL THIS RPM ON A PRODUCTION SYSTEM - THIS IS FOR TESTING ONLY. ***
|
||||
**********************************************************************************
|
||||
|
||||
%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
|
||||
%patch4 -p1 -b .enable_cql
|
||||
# %patch5 -p1 -b .bz173401
|
||||
# now fixed with openssl-0.9.8a-3+
|
||||
%patch6 -p1 -b .syslog_h
|
||||
%patch7 -p1 -b .install_id
|
||||
%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
|
||||
|
||||
%build
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf ${RPM_BUILD_ROOT} || :;
|
||||
export RPM_ARCH_LIB=%{_lib}
|
||||
. %SOURCE1
|
||||
make
|
||||
export LD_LIBRARY_PATH=$PEGASUS_HOME/%{_lib}
|
||||
export PATH=$PEGASUS_HOME/bin:$PATH
|
||||
make repository
|
||||
make --directory=mak -f SDKMakefile stageSDK
|
||||
%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
|
||||
%if %{PEGASUS_BUILD_TEST_RPM}
|
||||
export PEGASUS_DISPLAYCONSUMER_DIR=/var/lib/Pegasus/log
|
||||
%endif
|
||||
make -f $PEGASUS_ROOT/Makefile.Release create_ProductVersionFile
|
||||
make -f $PEGASUS_ROOT/Makefile.Release create_CommonProductDirectoriesInclude
|
||||
make -f $PEGASUS_ROOT/Makefile.Release create_ConfigProductDirectoriesInclude
|
||||
make -f $PEGASUS_ROOT/Makefile.Release all
|
||||
make -f $PEGASUS_ROOT/Makefile.Release repository
|
||||
|
||||
%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
|
||||
# why oh why did they make /usr/bin/install fail on the chown!!! :
|
||||
export INSTALL_USER=`id -un`
|
||||
export INSTALL_GROUP=`id -gn`
|
||||
#
|
||||
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
|
||||
#/usr/lib/rpm/brp-compress
|
||||
#exit 0
|
||||
:;
|
||||
export PEGASUS_STAGING_DIR=$RPM_BUILD_ROOT;
|
||||
%if %{PEGASUS_BUILD_TEST_RPM}
|
||||
export PEGASUS_BUILD_TEST_RPM=%{PEGASUS_BUILD_TEST_RPM};
|
||||
%endif
|
||||
make -f $PEGASUS_ROOT/Makefile.Release stage;
|
||||
cp -fp %SOURCE2 doc
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d;
|
||||
mkdir -p ${RPM_BUILD_ROOT}/var/run/tog-pegasus/socket;
|
||||
mv ${RPM_BUILD_ROOT}/etc/init.d ${RPM_BUILD_ROOT}/etc/rc.d ||:;
|
||||
cp -fp rpm/tog-pegasus.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/tog-pegasus;
|
||||
touch ${RPM_BUILD_ROOT}{/etc/Pegasus/{cimserver_current.conf,cimserver_planned.conf,cimserver_trust,indication_trust,crl},/var/run/tog-pegasus/{socket/cimxml.socket,cimserver.pid,cimserver_start.lock}}
|
||||
rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/%{name}-2.5
|
||||
%if %{NODEBUGINFO}
|
||||
/usr/lib/rpm/brp-compress;
|
||||
exit 0;
|
||||
%endif
|
||||
|
||||
%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
|
||||
%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
|
||||
@ -144,101 +176,116 @@ mkdir -p $R$RPM_BUILD_ROOT/usr/%{_lib}/cmpi
|
||||
%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
|
||||
%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
|
||||
%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.*
|
||||
%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
|
||||
%dir %attr(1750,root,pegasus) /var/run/tog-pegasus/socket
|
||||
%ghost %attr(1640,root,pegasus) /var/run/tog-pegasus/socket/cimxml.socket
|
||||
/usr/share/man/man8/*
|
||||
%defattr(0644, root, pegasus, 0755)
|
||||
%dir /usr/share/Pegasus
|
||||
/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
|
||||
/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
|
||||
%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
|
||||
|
||||
%if %{PEGASUS_BUILD_TEST_RPM}
|
||||
%files test
|
||||
%defattr(-,root,root,-)
|
||||
%defattr(0640,root,pegasus,0750)
|
||||
%dir /usr/share/Pegasus/test
|
||||
/usr/share/Pegasus/test/Makefile
|
||||
/var/lib/Pegasus/testrepository
|
||||
/usr/share/Pegasus/test
|
||||
%defattr(0750,root,pegasus,0750)
|
||||
/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}/%{name}-%{version};
|
||||
%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
|
||||
if [ $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 -g 65 -f -r pegasus >/dev/null 2>&1 || :;
|
||||
/usr/sbin/useradd -u 66 -r -n -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \
|
||||
/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
|
||||
/sbin/ldconfig
|
||||
%if %{AUTOSTART}
|
||||
/sbin/chkconfig --add tog-pegasus
|
||||
%endif
|
||||
echo `date` >/var/log/Pegasus/install.log 2>&1
|
||||
elif [ $1 -gt 0 ]; then
|
||||
/sbin/service tog-pegasus condrestart
|
||||
:;
|
||||
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
|
||||
service tog-pegasus stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del tog-pegasus;
|
||||
/sbin/service tog-pegasus stop >/dev/null 2>&1 || :;
|
||||
/sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :;
|
||||
fi
|
||||
:;
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# /usr/sbin/userdel pegasus >/dev/null 2>&1 || :;
|
||||
# /usr/sbin/groudel pegasus >/dev/null 2>&1 || :;
|
||||
:;
|
||||
fi;
|
||||
ldconfig
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT;
|
||||
#rm -rf ${RPM_BUILD_DIR}/%{srcname}-%{version};
|
||||
%preun devel
|
||||
if [ $1 -eq 0 ] ; then
|
||||
make --directory /usr/share/Pegasus/samples -s clean >/dev/null 2>&1 || :;
|
||||
fi
|
||||
:;
|
||||
|
||||
%if %{PEGASUS_BUILD_TEST_RPM}
|
||||
|
||||
%preun test
|
||||
if [ $1 -eq 0 ]; then
|
||||
make --directory /usr/share/Pegasus/test -s unsetupTEST >/dev/null 2>&1 || :;
|
||||
if [ -d /var/lib/Pegasus/testrepository ]; then
|
||||
mv /var/lib/Pegasus/testrepository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
|
||||
fi;
|
||||
fi;
|
||||
:;
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* 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).
|
||||
|
||||
* 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user