diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5d9b91e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/sblim-wbemcli-1.6.2.tar.bz2 diff --git a/.sblim-wbemcli.metadata b/.sblim-wbemcli.metadata new file mode 100644 index 0000000..0c68ff8 --- /dev/null +++ b/.sblim-wbemcli.metadata @@ -0,0 +1 @@ +0141f0824bc233c1ab3975ac1c4664d104a7c33a SOURCES/sblim-wbemcli-1.6.2.tar.bz2 diff --git a/SOURCES/sblim-wbemcli-1.5.1-gcc43.patch b/SOURCES/sblim-wbemcli-1.5.1-gcc43.patch new file mode 100644 index 0000000..12bf67b --- /dev/null +++ b/SOURCES/sblim-wbemcli-1.5.1-gcc43.patch @@ -0,0 +1,12 @@ +diff -up sblim-wbemcli-1.5.1/CimXml.h.BAD sblim-wbemcli-1.5.1/CimXml.h +--- sblim-wbemcli-1.5.1/CimXml.h.BAD 2008-06-20 10:10:54.000000000 -0500 ++++ sblim-wbemcli-1.5.1/CimXml.h 2008-06-20 10:11:07.000000000 -0500 +@@ -26,7 +26,7 @@ + + #include + #include +-#include ++#include + #include + #include + diff --git a/SOURCES/sblim-wbemcli-1.6.2-dot-in-passwd.patch b/SOURCES/sblim-wbemcli-1.6.2-dot-in-passwd.patch new file mode 100644 index 0000000..e2a1eec --- /dev/null +++ b/SOURCES/sblim-wbemcli-1.6.2-dot-in-passwd.patch @@ -0,0 +1,15 @@ +diff -up sblim-wbemcli-1.6.2/CimXml.cpp.orig sblim-wbemcli-1.6.2/CimXml.cpp +--- sblim-wbemcli-1.6.2/CimXml.cpp.orig 2011-06-22 07:58:39.000000000 +0200 ++++ sblim-wbemcli-1.6.2/CimXml.cpp 2017-02-08 15:51:42.260757574 +0100 +@@ -2983,9 +2983,9 @@ URL::URL(const char *U) + u += 7; + } + phelp=strchr(u,'@'); // potential auth token delimiter +- p=strchr(u,'.'); // potential key/host delimiter (doesn't matter) ++ p=NULL; + b=strchr(u,'['); // likely an IPv6 host +- if (phelp && ( p==NULL || p > phelp)) { ++ if (phelp) { + // contains auth token[s] -- process them + p=strchr(u,':'); + if (b != NULL && p != NULL && (p < b)) { diff --git a/SOURCES/sblim-wbemcli-1.6.2-gcc47.patch b/SOURCES/sblim-wbemcli-1.6.2-gcc47.patch new file mode 100644 index 0000000..8e6b5b6 --- /dev/null +++ b/SOURCES/sblim-wbemcli-1.6.2-gcc47.patch @@ -0,0 +1,26 @@ +diff -up sblim-wbemcli-1.6.2/CimCurl.h.orig sblim-wbemcli-1.6.2/CimCurl.h +--- sblim-wbemcli-1.6.2/CimCurl.h.orig 2012-01-05 13:55:30.901154659 +0100 ++++ sblim-wbemcli-1.6.2/CimCurl.h 2012-01-05 13:55:44.723271863 +0100 +@@ -24,6 +24,7 @@ + #include "CimXml.h" + #include + #include ++#include + + + class CimomCurl : public Cimom { +diff -up sblim-wbemcli-1.6.2/CimXml.h.orig sblim-wbemcli-1.6.2/CimXml.h +--- sblim-wbemcli-1.6.2/CimXml.h.orig 2012-01-05 13:54:52.445828446 +0100 ++++ sblim-wbemcli-1.6.2/CimXml.h 2012-01-05 13:54:52.449828480 +0100 +@@ -129,9 +129,9 @@ template class ArrayXml : publi + public: + ArrayXml() {} + ArrayXml * clone() const { return new ArrayXml(*this);} +- void add(const T& t) { push_back(t); } ++ void add(const T& t) { this->push_back(t); } + #if !defined(GCC_VERSION) || GCC_VERSION >= 3000 +- T& operator[] (size_type n) {return at(n);} ++ T& operator[] (size_type n) {return this->at(n);} + const T& operator[] (size_type n) const {return at(n);} + #endif + T *get(int n) { return &(*this)[n]; } diff --git a/SOURCES/sblim-wbemcli-1.6.2-https-segfaults.patch b/SOURCES/sblim-wbemcli-1.6.2-https-segfaults.patch new file mode 100644 index 0000000..e56802b --- /dev/null +++ b/SOURCES/sblim-wbemcli-1.6.2-https-segfaults.patch @@ -0,0 +1,23 @@ +@@ -, +, @@ +--- + main.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) +--- a/main.cpp ++++ a/main.cpp +@@ -133,6 +133,7 @@ int main (int argc, char *argv[]) { + ClassesXml *ca=0; + MethodresponseXml *mrsp=0; + string sb; ++ { + #ifdef HAVE_LIBWWW + CimomWww cimom; + #elif HAVE_LIBCURL +@@ -643,6 +644,7 @@ fini: + delete cna; + delete ca; + delete mrsp; ++ } + #ifdef HAVE_LIBCURL + // These needs to be called once + curl_global_cleanup(); +-- diff --git a/SOURCES/sblim-wbemcli-1.6.2-ssl-proto-option.patch b/SOURCES/sblim-wbemcli-1.6.2-ssl-proto-option.patch new file mode 100644 index 0000000..c09c06c --- /dev/null +++ b/SOURCES/sblim-wbemcli-1.6.2-ssl-proto-option.patch @@ -0,0 +1,52 @@ +diff -up sblim-wbemcli-1.6.2/CimCurl.cpp.orig sblim-wbemcli-1.6.2/CimCurl.cpp +--- sblim-wbemcli-1.6.2/CimCurl.cpp.orig 2009-03-04 20:10:54.000000000 +0100 ++++ sblim-wbemcli-1.6.2/CimCurl.cpp 2016-03-07 10:07:29.766255023 +0100 +@@ -165,8 +165,28 @@ void CimomCurl::genRequest(URL &url, con + rv = curl_easy_setopt(mHandle, CURLOPT_SSL_VERIFYHOST, 0); + // rv = curl_easy_setopt(mHandle, CURLOPT_SSL_VERIFYPEER, 0); + +- /* Force using SSL V3 */ +- rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, 3); ++ /* Force use of a specific SSL/TLS version */ ++ char * curlSslVer = getenv("WBEMCLI_CURL_SSLVERSION"); ++ if (curlSslVer) { ++ if (!strcasecmp(curlSslVer,"SSLv2")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv2); ++ else if (!strcasecmp(curlSslVer,"SSLv3")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_SSLv3); ++ else if (!strcasecmp(curlSslVer,"TLSv1")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); ++ else if (!strcasecmp(curlSslVer,"TLSv1.0") || !strcasecmp(curlSslVer,"TLSv1_0")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_0); ++ else if (!strcasecmp(curlSslVer,"TLSv1.1") || !strcasecmp(curlSslVer,"TLSv1_1")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1); ++ else if (!strcasecmp(curlSslVer,"TLSv1.2") || !strcasecmp(curlSslVer,"TLSv1_2")) ++ rv = curl_easy_setopt(mHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); ++ else ++ throw URLException("unknown WBEMCLI_CURL_SSLVERSION"); ++ } ++ ++ if (rv != CURLE_OK) { ++ throw URLException("unsupported WBEMCLI_CURL_SSLVERSION in this curl library"); ++ } + + /* Set username and password */ + if (url.user.length() > 0 && url.password.length() > 0) { +diff -up sblim-wbemcli-1.6.2/man/wbemcli.1.pre.in.orig sblim-wbemcli-1.6.2/man/wbemcli.1.pre.in +--- sblim-wbemcli-1.6.2/man/wbemcli.1.pre.in.orig 2009-06-20 01:10:57.000000000 +0200 ++++ sblim-wbemcli-1.6.2/man/wbemcli.1.pre.in 2016-03-07 10:07:29.766255023 +0100 +@@ -554,6 +554,14 @@ The example in the previous section can + wbemcli gi 'myCimom/root/cimv2:rpm_package.name="glibc"' + .PP + ++.SH ENVIRONMENT ++.TP ++.B WBEMCLI_CURL_SSLVERSION ++Specifies the SSL protocol that will be used. ++Valid values are SSLv2, SSLv3, TLSv1, TLSv1.0 (TLSv1_0), TLSv1.1 (TLSv1_1) ++or TLSv1.2 (TLSv1_2). ++If this variable is not set, wbemcli will attempt to figure out the ++remote SSL protocol version. + .SH FILES + .TP + .I @CACERT@ diff --git a/SPECS/sblim-wbemcli.spec b/SPECS/sblim-wbemcli.spec new file mode 100644 index 0000000..3e5f2cb --- /dev/null +++ b/SPECS/sblim-wbemcli.spec @@ -0,0 +1,131 @@ +Name: sblim-wbemcli +Version: 1.6.2 +Release: 11%{?dist} +Summary: SBLIM WBEM Command Line Interface + +Group: Applications/System +License: EPL +URL: http://sblim.wiki.sourceforge.net/ +Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 +Patch0: sblim-wbemcli-1.5.1-gcc43.patch +Patch1: sblim-wbemcli-1.6.2-gcc47.patch +Patch2: sblim-wbemcli-1.6.2-https-segfaults.patch +Patch3: sblim-wbemcli-1.6.2-ssl-proto-option.patch +Patch4: sblim-wbemcli-1.6.2-dot-in-passwd.patch + +BuildRequires: curl-devel >= 7.9.3 +BuildRequires: binutils-devel >= 2.17.50.0.3-4 +Requires: curl >= 7.9.3 + +%description +WBEM Command Line Interface is a standalone, command line WBEM client. It is +specially suited for basic systems management tasks as it can be used in +scripts. + +%prep +%setup -q +%patch0 -p1 -b .gcc43 +%patch1 -p1 -b .gcc47 +%patch2 -p1 -b .https-segfaults +%patch3 -p1 -b .ssl-proto-option +%patch4 -p1 -b .dot-in-passwd + +%build +%configure CACERT=/etc/pki/Pegasus/client.pem +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name} + +%files +%{_bindir}/wbem* +%{_mandir}/man1/* +%{_datadir}/%{name} + +%changelog +* Wed Feb 08 2017 Vitezslav Crhonek - 1.6.2-11 +- Update default CA certificate file path due to recent changes in tog-pegasus + Resolves: #1320077 +- Fix wbemcli dont accept dot (.) as password character on command line + Resolves: #1103368 +- Fix bogus date in %%changelog + +* Mon Mar 07 2016 Vitezslav Crhonek - 1.6.2-10 +- Backport (slightly modified) configurable SSL version feature from upstream, + update man page accordingly + Resolves: #1239115 + +* Fri Jan 24 2014 Daniel Mach - 1.6.2-9 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 1.6.2-8 +- Mass rebuild 2013-12-27 + +* Wed Jun 26 2013 Vitezslav Crhonek - 1.6.2-7 +- Fix wrong usage of libcurl API, which caused segfaults when wbemcli was used + with https scheme (patch by kdudka@redhat.com) + +* Thu Feb 14 2013 Fedora Release Engineering - 1.6.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Sep 10 2012 Vitezslav Crhonek - 1.6.2-5 +- Fix issues found by fedora-review utility in the spec file + +* Sat Jul 21 2012 Fedora Release Engineering - 1.6.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Feb 28 2012 Fedora Release Engineering - 1.6.2-3 +- Rebuilt for c++ ABI breakage + +* Thu Jan 05 2012 Vitezslav Crhonek - 1.6.2-2 +- Fix gcc47 compile failure + +* Tue Jul 19 2011 Vitezslav Crhonek - 1.6.2-1 +- Update to sblim-wbemcli-1.6.2 + +* Wed Feb 09 2011 Fedora Release Engineering - 1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Dec 9 2010 Vitezslav Crhonek - 1.6.1-1 +- Update to sblim-wbemcli-1.6.1 + +* Sun Jul 26 2009 Fedora Release Engineering - 1.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat Feb 28 2009 Caolán McNamara - 1.6.0-4 +- constify rets of strchr(const char *); + +* Wed Feb 25 2009 Fedora Release Engineering - 1.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Nov 4 2008 Vitezslav Crhonek - 1.6.0-2 +- Fix License +- Spec file cleanup, rpmlint check + +* Fri Oct 24 2008 Vitezslav Crhonek - 1.6.0-1 +- Update to 1.6.0 + Resolves: #468328 + +* Fri Jun 20 2008 Tom "spot" Callaway - 1.5.1-7 +- fix gcc43 compile failure + +* Mon Feb 18 2008 Fedora Release Engineering - 1.5.1-6 +- Autorebuild for GCC 4.3 + +* Mon Nov 06 2006 Jindrich Novy - 1.5.1-5 +- rebuild against new curl + +* Thu Oct 05 2006 Christian Iseli - 1.5.1-4 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Mon Nov 21 2005 Viktor Mihajlovski - 1.5.1-1 +- Upgrade to version 1.5.1 (SSL V3 enforced, default CACERT). +- Created Fedora/RH specific spec file. + +* Fri Oct 28 2005 Viktor Mihajlovski - 1.5.0-1 +- Minor enhancements for Fedora compatibility, still not daring to + nuke the build root though + +* Thu Jul 28 2005 Viktor Mihajlovski - 1.5.0-0 +- Updates for rpmlint complaints