From 8ef12525ba7ed240c4f0b43fc4a0f6ad6d654723 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2019 15:39:01 +0000 Subject: import cmpi-bindings-0.9.5-6.el7 --- diff --git a/.cmpi-bindings.metadata b/.cmpi-bindings.metadata new file mode 100644 index 0000000..ecf3036 --- /dev/null +++ b/.cmpi-bindings.metadata @@ -0,0 +1 @@ +c2ca1a71e32da9bd4b44cd4c8f343e97bc80a0aa SOURCES/v0.9.5.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16b7a91 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/v0.9.5.tar.gz diff --git a/SOURCES/cmpi-bindings-0.4.17-no-ruby-perl.patch b/SOURCES/cmpi-bindings-0.4.17-no-ruby-perl.patch new file mode 100644 index 0000000..e65e235 --- /dev/null +++ b/SOURCES/cmpi-bindings-0.4.17-no-ruby-perl.patch @@ -0,0 +1,39 @@ +diff -up cmpi-bindings-0.5.2/swig/CMakeLists.txt.orig cmpi-bindings-0.5.2/swig/CMakeLists.txt +--- cmpi-bindings-0.5.2/swig/CMakeLists.txt.orig 2012-05-04 15:47:18.000000000 +0200 ++++ cmpi-bindings-0.5.2/swig/CMakeLists.txt 2012-05-07 09:59:33.639648918 +0200 +@@ -4,12 +4,12 @@ + + enable_testing() + +-FIND_PACKAGE(Ruby) +-IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) +- MESSAGE(STATUS "Building Ruby...") +- ADD_SUBDIRECTORY(ruby) +- OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES ) +-ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) ++#FIND_PACKAGE(Ruby) ++#IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) ++# MESSAGE(STATUS "Building Ruby...") ++# ADD_SUBDIRECTORY(ruby) ++# OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES ) ++#ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) + + FIND_PACKAGE(PythonLibs) + IF (PYTHON_LIBRARY) +@@ -22,9 +22,9 @@ IF (PYTHON_LIBRARY) + ENDIF (PYTHON_LINK_LIBS) + ENDIF (PYTHON_LIBRARY) + +-FIND_PACKAGE(Perl) +-IF (PERL_EXECUTABLE) +- MESSAGE(STATUS "Building Perl...") +- ADD_SUBDIRECTORY(perl) +-ENDIF (PERL_EXECUTABLE) +- +\ No newline at end of file ++#FIND_PACKAGE(Perl) ++#IF (PERL_EXECUTABLE) ++# MESSAGE(STATUS "Building Perl...") ++# ADD_SUBDIRECTORY(perl) ++#ENDIF (PERL_EXECUTABLE) ++ diff --git a/SOURCES/cmpi-bindings-0.4.17-sblim-sigsegv.patch b/SOURCES/cmpi-bindings-0.4.17-sblim-sigsegv.patch new file mode 100644 index 0000000..1eff6c6 --- /dev/null +++ b/SOURCES/cmpi-bindings-0.4.17-sblim-sigsegv.patch @@ -0,0 +1,17 @@ +diff -up cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py +--- cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig 2012-03-01 17:05:31.878367281 +0100 ++++ cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py 2012-03-01 17:06:34.718110137 +0100 +@@ -350,10 +350,10 @@ class BrokerCIMOMHandle(object): + allow_null_ns = False + else: + allow_null_ns = True +- if self.broker.name() == 'RequestHandler': ++# if self.broker.name() == 'RequestHandler': + # Check sblim bug #2185410. +- if instance.path is not None: +- instance.path.namespace = None ++# if instance.path is not None: ++# instance.path.namespace = None + inst = self.proxy.pywbem2cmpi_inst(instance, allow_null_ns) + rv = self.broker.deliverIndication(self.ctx, ns, inst) + return rv diff --git a/SOURCES/cmpi-bindings-0.9.5-python-lib-dir.patch b/SOURCES/cmpi-bindings-0.9.5-python-lib-dir.patch new file mode 100644 index 0000000..01dde42 --- /dev/null +++ b/SOURCES/cmpi-bindings-0.9.5-python-lib-dir.patch @@ -0,0 +1,12 @@ +diff -up cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old cmpi-bindings-0.9.5/swig/python/CMakeLists.txt +--- cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old 2013-08-06 15:57:03.576285764 +0200 ++++ cmpi-bindings-0.9.5/swig/python/CMakeLists.txt 2013-08-06 15:57:14.891345941 +0200 +@@ -9,7 +9,7 @@ SET (BUILD_SHARED_LIBS ON) + + FIND_PACKAGE(PythonInterp REQUIRED) + +-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_LIB_DIR) ++EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR) + + IF (NOT PYTHON_SITE_DIR) + SET (PYTHON_SITE_DIR ${PYTHON_LIB_DIR}) diff --git a/SPECS/cmpi-bindings.spec b/SPECS/cmpi-bindings.spec new file mode 100644 index 0000000..0e00180 --- /dev/null +++ b/SPECS/cmpi-bindings.spec @@ -0,0 +1,146 @@ +Name: cmpi-bindings +Version: 0.9.5 +Release: 6%{?dist} +Summary: Adapter to write and run CMPI-type CIM providers + +Group: Development/Libraries +License: BSD +URL: http://github.com/kkaempf/cmpi-bindings +Source0: https://github.com/kkaempf/%{name}/archive/v%{version}.tar.gz + +#Patch0: don't build ruby and perl bingings +Patch0: cmpi-bindings-0.4.17-no-ruby-perl.patch +#Patch1: removes workaround no longer needed +Patch1: cmpi-bindings-0.4.17-sblim-sigsegv.patch +#Patch2: fixes placement of *.py[co] file +Patch2: cmpi-bindings-0.9.5-python-lib-dir.patch + +BuildRequires: cmake gcc-c++ swig >= 1.3.34 +BuildRequires: curl-devel pkgconfig sed +BuildRequires: sblim-cmpi-devel +BuildRequires: python2-devel + +%description +CMPI-compliant provider interface for various languages via SWIG + + +%package -n cmpi-bindings-pywbem +Summary: Adapter to write and run CMPI-type CIM providers in Python +Group: Development/Languages +Requires: pywbem + +%description -n cmpi-bindings-pywbem +CMPI-compliant provider interface for Python + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 -b .python-lib-dir + +# change hardcoded path from /usr/lib/pycim/ to something better +sed -i 's@/usr/lib/pycim/@'`echo %{python_sitelib}/pycim/`'@' swig/python/cmpi_pywbem_bindings.py +# let user know where the providers have to be placed +cat > README.Fedora << EOS +Python provider interface expects the providers to be placed in: +%{python_sitelib}/pycim/ + +You can customize the path - edit line 428 in: +%{python_sitelib}/cmpi_pywbem_bindings.py +EOS + + +%build +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=%_prefix \ + -DLIB=%{_lib} \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DCMAKE_C_FLAGS:STRING="%{optflags}" \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=1 \ + .. +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +cd build +mkdir -p $RPM_BUILD_ROOT%{_datadir}/cmpi +make install DESTDIR=$RPM_BUILD_ROOT +# create directory for providers +mkdir -p $RPM_BUILD_ROOT%{python_sitelib}/pycim/ +rmdir $RPM_BUILD_ROOT%{_datadir}/cmpi + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -n cmpi-bindings-pywbem +%defattr(-,root,root,-) +%doc README ANNOUNCE COPYING LICENSE.BSD README.Fedora +%dir %{_libdir}/cmpi +%{_libdir}/cmpi/libpyCmpiProvider.so +%{python_sitearch}/cmpi_pywbem_bindings.py* +%{python_sitearch}/cmpi.py* +%dir %{python_sitelib}/pycim/ + +%changelog +* Wed Mar 19 2014 Vitezslav Crhonek - 0.9.5-6 +- Fix cflags propagation + Resolves: #1070791 + +* Fri Jan 24 2014 Daniel Mach - 0.9.5-5 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 0.9.5-4 +- Mass rebuild 2013-12-27 + +* Tue Aug 13 2013 Vitezslav Crhonek - 0.9.5-3 +- Fix placement of *.py[co] files + Resolves: #921547 +- Remove /usr/share/cmpi - it's used by ruby binding that we don't build + +* Wed Jul 17 2013 Vitezslav Crhonek - 0.9.5-2 +- Fix URL, fix sources + +* Thu Apr 11 2013 Jan Safranek - 0.9.5-1 +- Update to 0.9.5 + +* Thu Apr 11 2013 Jan Safranek - 0.9.4-1 +- Update to 0.9.4 + +* Thu Mar 28 2013 Jan Safranek - 0.5.2-6 +- Fixed 'env' parameter value in 'get_providers()' function + Resolves: #919082 +- Fixed embedded instance properties + Resolves: #919081 + +* Fri Feb 15 2013 Jan Safranek - 0.5.2-5 +- Fixed passing NULL array from get_instance + Resolves: #883041 + +* Wed Jan 30 2013 Vitezslav Crhonek - 0.5.2-4 +- Fix memory leaks + Resolves: #902809 + +* Thu Jan 10 2013 Vitezslav Crhonek - 0.5.2-3 +- Fixed passing NULL array from get_instance +- Add bindings for CMTraceMessage + (patches by Jan Safranek) + +* Wed Jul 18 2012 Fedora Release Engineering - 0.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon May 7 2012 Jan Safranek - 0.5.2 +- Update to 0.5.2 + +* Thu Mar 08 2012 Vitezslav Crhonek - 0.4.17-2 +- Create and own "pycim" directory +- Add documentation and create README.Fedora + +* Thu Mar 01 2012 Vitezslav Crhonek - 0.4.17-1 +- Initial support (ruby and perl bindings are disabled)