diff --git a/.gitignore b/.gitignore index 0f90bcd..cbbc615 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /cura-providers-0.0.3.tar.gz /cura-providers-0.0.4.tar.gz /cura-providers-0.0.5.tar.gz +/cura-providers-0.0.7.tar.gz diff --git a/cura-providers.spec b/cura-providers.spec index bc66fc0..8850201 100644 --- a/cura-providers.spec +++ b/cura-providers.spec @@ -1,5 +1,5 @@ Name: cura-providers -Version: 0.0.5 +Version: 0.0.7 Release: 1%{?dist} Summary: Set of basic CIM providers @@ -17,6 +17,7 @@ BuildRequires: upower-devel BuildRequires: lm_sensors-devel # For cura-account BuildRequires: libuser-devel +BuildRequires: python2-devel # For reg2pegasus.py script Requires: python2 @@ -71,6 +72,22 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description -n cura-account %{summary}. +%package -n cura-yum +Summary: CIM providers for software management +BuildArch: noarch +Requires: cmpi-bindings-pywbem +Requires: yum +# For Linux_ComputerSystem +Requires: sblim-cmpi-base +# For reg2pegasus.py and register.sh script: +Requires: cura-providers + +%description -n cura-yum +The cura-yum package contains CMPI providers for management of software +through yum package manager with Common Information Managemen (CIM) protocol. + +The providers can be registered in any CMPI-aware CIMOM, both OpenPegasus and +SFCB were tested. %prep %setup -q @@ -84,6 +101,10 @@ popd make %{?_smp_mflags} -C %{_target_platform} +# for yum providers +pushd src/yum +%{__python} setup.py build +popd # src/yum %install make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} @@ -94,6 +115,12 @@ make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} rm -rf "$RPM_BUILD_ROOT"/usr/bin/*.py rm -rf "$RPM_BUILD_ROOT"/usr/lib/python* +# for yum providers +pushd src/yum +%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd # src/yum +cp mof/LMI_Yum.reg $RPM_BUILD_ROOT/%{_datadir}/%{name}/ + %files %doc README COPYING @@ -135,6 +162,12 @@ rm -rf "$RPM_BUILD_ROOT"/usr/lib/python* %{_datadir}/%{name}/LMI_Account.mof %{_datadir}/%{name}/LMI_Account.reg +%files -n cura-yum +%doc README COPYING +%{python_sitelib}/* +%{_datadir}/%{name}/LMI_Yum.mof +%{_datadir}/%{name}/LMI_Yum.reg + %post -p /sbin/ldconfig @@ -173,6 +206,14 @@ if [ "$1" -gt 1 ]; then > /dev/null 2>&1 || :; fi +%pre -n cura-yum +if [ "$1" -gt 1 ]; then + %{_datadir}/cura-providers/register.sh unregister \ + %{_datadir}/%{name}/LMI_Yum.mof \ + %{_datadir}/%{name}/LMI_Yum.reg \ + > /dev/null 2>&1 || :; +fi + %post -n cura-fan # Register Schema and Provider @@ -207,6 +248,14 @@ if [ "$1" -ge 1 ]; then > /dev/null 2>&1 || :; fi +%post -n cura-yum +if [ "$1" -ge 1 ]; then + %{_datadir}/cura-providers/register.sh register \ + %{_datadir}/%{name}/LMI_Yum.mof \ + %{_datadir}/%{name}/LMI_Yum.reg \ + > /dev/null 2>&1 || :; +fi + %preun -n cura-fan # Deregister only if not upgrading @@ -241,8 +290,22 @@ if [ "$1" -eq 0 ]; then > /dev/null 2>&1 || :; fi +%preun -n cura-yum +if [ "$1" -eq 0 ]; then + %{_datadir}/cura-providers/register.sh unregister \ + %{_datadir}/%{name}/LMI_Yum.mof \ + %{_datadir}/%{name}/LMI_Yum.reg \ + > /dev/null 2>&1 || :; +fi + %changelog +* Wed Oct 03 2012 Michal Minar - 0.0.7-1 +- Version 0.0.7 + +* Thu Sep 27 2012 Michal Minar - 0.0.6-1 +- Added yum software management providers. + * Thu Sep 27 2012 Roman Rakus - 0.0.5-1 - Version 0.0.5 diff --git a/sources b/sources index 9995370..793b613 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fe4fd82661be83b6794c19faf6946974 cura-providers-0.0.5.tar.gz +bd46163047cfbeabc0a94847c606580b cura-providers-0.0.7.tar.gz