diff --git a/tog-pegasus.spec b/tog-pegasus.spec index 882a8ce..d5c3ea2 100644 --- a/tog-pegasus.spec +++ b/tog-pegasus.spec @@ -30,8 +30,18 @@ %define pegasus_gid 65 %define pegasus_uid 66 +%define multilib 0 +%define bsx '' +%ifarch i386 x86_64 ppc ppc64 s390 s390x +%define multilib 1 +%define bsx -32 +%ifarch x86_64 ppc64 s390x +%define bsx -64 +%endif +%endif + Version: 2.5.1 -Release: 6%{?LINUX_VERSION:.%{LINUX_VERSION}} +Release: 8%{?LINUX_VERSION:.%{LINUX_VERSION}} Epoch: 2 # Summary: OpenPegasus WBEM Services for Linux @@ -41,12 +51,13 @@ URL: http://www.openpegasus.org # License: Open Group Pegasus Open Source # -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_target_cpu}-%(%{__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 +Source4: pegasus_arch_alternatives # Patch0: pegasus-2.5.1-initscript.patch Patch1: pegasus-2.5.1-no-rpath.patch @@ -81,6 +92,8 @@ Patch29: pegasus-2.5.1-obz5053.patch Patch30: pegasus-2.5.1-obz5059.patch Patch31: pegasus-2.5.1-obz5072.patch Patch32: pegasus-2.5.1-obz5083.patch +Patch33: pegasus-2.5.1-obz5115.patch +Patch34: pegasus-2.5.1-obz5119.patch # Conflicts: openwbem Provides: tog-pegasus-cimserver @@ -123,7 +136,6 @@ 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 @@ -169,6 +181,8 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm. %patch30 -p1 -b .obz5059 %patch31 -p1 -b .obz5072 %patch32 -p1 -b .obz5083 +%patch33 -p1 -b .obz5115 +%patch34 -p1 -b .obz5119 %build rm -rf ${RPM_BUILD_ROOT} || :; @@ -176,15 +190,25 @@ cp -fp %SOURCE1 .; cp -fp %SOURCE2 doc cp -fp %SOURCE3 rpm export RPM_ARCH_LIB=%{_lib} +export RPM_ARCH=%{_target_cpu} 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) +export RPM_ARCH_LIB=%{_lib} +export RPM_ARCH=%{_target_cpu} +export BSX=%{bsx} +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) + make -f RedHat.OpenPegasus.Makefile install_tests prefix=$RPM_BUILD_ROOT root_user=%(%{__id} -u -n) pegasus_user=%(%{__id} -u -n) +%endif +%if %{multilib} + %{SOURCE4} --list '%ghost' | grep 'bin/' > ghost_arch_binaries; + %{SOURCE4} --list '%ghost' | grep 'mak/' > ghost_arch_devel; + %{SOURCE4} --list '%ghost' | grep 'test/'> ghost_arch_test; + cp -fp %{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/Pegasus/scripts; %endif %if %{NODEBUGINFO} /usr/lib/rpm/brp-compress; @@ -192,7 +216,11 @@ make -f RedHat.OpenPegasus.Makefile install prefix=$RPM_BUILD_ROOT libdir=%{_lib %endif :; +%if %{multilib} +%files -f ghost_arch_binaries +%else %files +%endif %defattr(0750, root, pegasus, 0750) %if !%{NODEBUGINFO} %exclude /usr/lib/debug @@ -234,17 +262,25 @@ make -f RedHat.OpenPegasus.Makefile install prefix=$RPM_BUILD_ROOT libdir=%{_lib /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 +%if %{multilib} +%files devel -f ghost_arch_devel +%else +%files +%endif %defattr(0644,root,pegasus,0755) /usr/include/Pegasus /usr/share/Pegasus/samples /usr/share/Pegasus/html %if %{PEGASUS_BUILD_TEST_RPM} +%if %{multilib} +%files test -f ghost_arch_test +%else %files test +%endif %defattr(0644,root,pegasus,0755) %dir /usr/share/Pegasus/test -/usr/share/Pegasus/test/Makefile +/usr/share/Pegasus/test/Makefile%{bsx} /usr/share/Pegasus/test/mak /var/lib/Pegasus/testrepository %defattr(0750,root,pegasus,0755) @@ -277,17 +313,20 @@ 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 +if [ $1 -ge 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 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; +%if %{multilib} + %{_datadir}/Pegasus/scripts/pegasus_arch_alternatives || :; +%endif + if [ $1 -gt 1 ]; then + 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 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; - /sbin/service tog-pegasus condrestart >/dev/null 2>&1 || :; fi :; @@ -295,20 +334,61 @@ fi if [ $1 -eq 0 ]; then /sbin/service tog-pegasus stop >/dev/null 2>&1 || :; /sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :; +%if %{multilib} + if [ "$1" -eq 0 ]; then + /usr/sbin/alternatives --remove pegasus /usr/sbin/cimserver-64 >/dev/null 2>&1 || :; + /usr/sbin/alternatives --remove pegasus /usr/sbin/cimserver-32 >/dev/null 2>&1 || :; + fi +%endif fi :; -%postun -ldconfig +%postun -p /sbin/ldconfig + +%post devel +if [ $1 -ge 0 ]; then + %{_datadir}/Pegasus/scripts/pegasus_arch_alternatives devel || :; +fi +:; %preun devel if [ $1 -eq 0 ] ; then make --directory /usr/share/Pegasus/samples -s clean >/dev/null 2>&1 || :; +%if %{multilib} + /usr/sbin/alternatives --remove pegasus-devel %{_datadir}/Pegasus/samples/mak/config.mak-64 >/dev/null 2>&1 || :; + /usr/sbin/alternatives --remove pegasus-devel %{_datadir}/Pegasus/samples/mak/config.mak-32 >/dev/null 2>&1 || :; +%endif fi :; +%if %{PEGASUS_BUILD_TEST_RPM} +%if %{multilib} +%post test +if [ $1 -ge 0 ]; then + %{_datadir}/Pegasus/scripts/pegasus_arch_alternatives test || :; +fi +:; + +%preun test +if [ $1 -eq 0 ]; then +%if %{multilib} + /usr/sbin/alternatives --remove pegasus-test %{_datadir}/Pegasus/test/Makefile-64 >/dev/null 2>&1 || :; + /usr/sbin/alternatives --remove pegasus-test %{_datadir}/Pegasus/test/Makefile-32 >/dev/null 2>&1 || :; +%endif +fi +:; +%endif +%endif + + %changelog -* Wed May 31 2006 JAson Vas Dias - 2:2.5.1-6 +* Fri Jun 09 2006 Jason Vas Dias - 2:2.5.1-8 +- Fix bug 192754: remove multilib conflicts +- More upstream 2.5.2_APPROVED bug fixes: + o 5119: memory leak in CMPI implementation + o 5115: fix SetConfig_EnvVar comments + +* Wed May 31 2006 Jason Vas Dias - 2:2.5.1-6 - Apply upstream patches for latest 2.5.2_APPROVED bugs: o 5046: cimprovider timeout needs to be increased o 5047: cimmof timeout needs to be increased