new upstream release

f41
David Tardon 11 years ago
parent 68b750cb87
commit 24f9c388ba

1
.gitignore vendored

@ -3,3 +3,4 @@
/libcmis-0.2.3.tar.gz
/libcmis-0.3.0.tar.gz
/libcmis-0.3.1.tar.gz
/libcmis-0.4.1.tar.gz

File diff suppressed because it is too large Load Diff

@ -1,55 +0,0 @@
From 264824628f58a1668b54252babb1add4d3c7eb79 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Mon, 8 Apr 2013 14:07:23 +0200
Subject: [PATCH 1/3] rhbz#918079 always return 40 hexa digits (cherry picked
from commit 8e66145d204f7d053549b7cc28aef6863cfd38c8)
---
src/libcmis/test-xmlutils.cxx | 12 ++++++++++--
src/libcmis/xml-utils.cxx | 6 +++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/libcmis/test-xmlutils.cxx b/src/libcmis/test-xmlutils.cxx
index dd5082f..0e527ad 100644
--- a/src/libcmis/test-xmlutils.cxx
+++ b/src/libcmis/test-xmlutils.cxx
@@ -431,8 +431,16 @@ void XmlTest::propertyIntegerAsXmlTest( )
void XmlTest::sha1Test( )
{
- string actual = libcmis::sha1( "Hello" );
- CPPUNIT_ASSERT_EQUAL( string( "f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0" ), actual );
+ {
+ string actual = libcmis::sha1( "Hello" );
+ CPPUNIT_ASSERT_EQUAL( string( "f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0" ), actual );
+ }
+
+ {
+ // check correct width
+ string actual = libcmis::sha1( "35969137" );
+ CPPUNIT_ASSERT_EQUAL( string( "0d93546909cfeb5c00089202104df3980000ec9f" ), actual );
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION( XmlTest );
diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
index dddfafa..645fbcf 100644
--- a/src/libcmis/xml-utils.cxx
+++ b/src/libcmis/xml-utils.cxx
@@ -498,8 +498,12 @@ namespace libcmis
sha1.get_digest( digest );
stringstream out;
+ // Setup writing mode. Every number must produce eight
+ // hexadecimal digits, including possible leading 0s, or we get
+ // less than 40 digits as result.
+ out << hex << setfill('0') << right;
for ( int i = 0; i < 5; ++i )
- out << hex << digest[i];
+ out << setw(8) << digest[i];
return out.str();
}
--
1.8.1.4

@ -1,68 +0,0 @@
From 3c34544890e6fba5df3ddffd11a0533c96426cc6 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Mon, 8 Apr 2013 20:18:19 +0200
Subject: [PATCH 2/3] rhbz#918080 restrict the set of protocols for curl
(cherry picked from commit 6401443248d7ce9fad1b42bad291418d59f4a623)
Conflicts:
src/libcmis/base-session.cxx
src/libcmis/base-session.hxx
---
src/libcmis/base-session.cxx | 10 ++++++++++
src/libcmis/base-session.hxx | 1 +
2 files changed, 11 insertions(+)
diff --git a/src/libcmis/base-session.cxx b/src/libcmis/base-session.cxx
index b007a9d..9d08edc 100644
--- a/src/libcmis/base-session.cxx
+++ b/src/libcmis/base-session.cxx
@@ -123,6 +123,7 @@ BaseSession::BaseSession( string atomPubUrl, string repositoryId, string usernam
{
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
+ initProtocols();
}
BaseSession::BaseSession( const BaseSession& copy ) :
@@ -142,6 +143,7 @@ BaseSession::BaseSession( const BaseSession& copy ) :
// Not sure how sharing curl handles is safe.
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
+ initProtocols();
}
BaseSession& BaseSession::operator=( const BaseSession& copy )
@@ -161,6 +163,7 @@ BaseSession& BaseSession::operator=( const BaseSession& copy )
// Not sure how sharing curl handles is safe.
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
+ initProtocols();
return *this;
}
@@ -535,3 +538,10 @@ libcmis::Exception CurlException::getCmisException( ) const
return libcmis::Exception( msg, type );
}
+
+void BaseSession::initProtocols( )
+{
+ const unsigned long protocols = CURLPROTO_HTTP | CURLPROTO_HTTPS;
+ curl_easy_setopt(m_curlHandle, CURLOPT_PROTOCOLS, protocols);
+ curl_easy_setopt(m_curlHandle, CURLOPT_REDIR_PROTOCOLS, protocols);
+}
diff --git a/src/libcmis/base-session.hxx b/src/libcmis/base-session.hxx
index 0b90c1f..6446a41 100644
--- a/src/libcmis/base-session.hxx
+++ b/src/libcmis/base-session.hxx
@@ -149,6 +149,7 @@ class BaseSession : public libcmis::Session
virtual void setAuthenticationProvider( libcmis::AuthProviderPtr provider ) { m_authProvider = provider; }
private:
void httpRunRequest( std::string url ) throw ( CurlException );
+ void initProtocols( );
};
#endif
--
1.8.1.4

@ -1,75 +0,0 @@
From 3ea92e49821638be039be7085659af160a6d4ebf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdo@users.sourceforge.net>
Date: Mon, 22 Apr 2013 15:45:26 +0200
Subject: [PATCH 3/3] Init protocols should be done right after resetting curl
handle (cherry picked from commit e75bd2548101b8681edf13ea085d62634b7668cf)
Conflicts:
src/libcmis/base-session.cxx
---
src/libcmis/base-session.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/libcmis/base-session.cxx b/src/libcmis/base-session.cxx
index 9d08edc..478d0de 100644
--- a/src/libcmis/base-session.cxx
+++ b/src/libcmis/base-session.cxx
@@ -123,7 +123,6 @@ BaseSession::BaseSession( string atomPubUrl, string repositoryId, string usernam
{
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
- initProtocols();
}
BaseSession::BaseSession( const BaseSession& copy ) :
@@ -143,7 +142,6 @@ BaseSession::BaseSession( const BaseSession& copy ) :
// Not sure how sharing curl handles is safe.
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
- initProtocols();
}
BaseSession& BaseSession::operator=( const BaseSession& copy )
@@ -163,7 +161,6 @@ BaseSession& BaseSession::operator=( const BaseSession& copy )
// Not sure how sharing curl handles is safe.
curl_global_init( CURL_GLOBAL_ALL );
m_curlHandle = curl_easy_init( );
- initProtocols();
return *this;
}
@@ -223,6 +220,7 @@ libcmis::HttpResponsePtr BaseSession::httpGetRequest( string url ) throw ( CurlE
{
// Reset the handle for the request
curl_easy_reset( m_curlHandle );
+ initProtocols( );
libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
@@ -255,6 +253,7 @@ libcmis::HttpResponsePtr BaseSession::httpPutRequest( string url, istream& is, v
{
// Reset the handle for the request
curl_easy_reset( m_curlHandle );
+ initProtocols( );
libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
@@ -320,6 +319,7 @@ libcmis::HttpResponsePtr BaseSession::httpPostRequest( string url, istringstream
{
// Reset the handle for the request
curl_easy_reset( m_curlHandle );
+ initProtocols( );
libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
@@ -385,6 +385,7 @@ void BaseSession::httpDeleteRequest( string url ) throw ( CurlException )
{
// Reset the handle for the request
curl_easy_reset( m_curlHandle );
+ initProtocols( );
curl_easy_setopt( m_curlHandle, CURLOPT_CUSTOMREQUEST, "DELETE" );
httpRunRequest( url );
--
1.8.1.4

@ -1,9 +1,9 @@
%global apiversion 0.3
%global apiversion 0.4
Name: libcmis
Version: 0.3.1
Release: 8%{?dist}
Summary: A C++ client library for the CMIS interface
Version: 0.4.1
Release: 1%{?dist}
Summary: A C++ client library for CM interfaces
Group: System Environment/Libraries
License: GPLv2+ or LGPLv2+ or MPLv1.1
@ -15,17 +15,12 @@ BuildRequires: libcurl-devel
BuildRequires: libxml2-devel
BuildRequires: xmlto
Patch0: 0001-libcmis-c-handle-possible-bad-allocations.patch
Patch1: 0001-rhbz-918079-always-return-40-hexa-digits.patch
Patch2: 0002-rhbz-918080-restrict-the-set-of-protocols-for-curl.patch
Patch3: 0003-Init-protocols-should-be-done-right-after-resetting-.patch
# rhbz#1000819
Patch4: 0001-fixed-libcmis-c.pc-to-point-to-versioned-libcmis-pc-.patch
%description
LibCMIS is a C++ client library for the CMIS interface. This allows C++
applications to connect to any ECM behaving as a CMIS server like
Alfresco, Nuxeo for the open source ones.
LibCMIS is a C++ client library for working with CM (content management)
interfaces. The primary supported interface (which gave the library its
name) is CMIS, which allows applications to connect to any ECM behaving
as a CMIS server (Alfresco or Nuxeo are examples of open source ones).
Another supported interface is Google Drive.
%package devel
Summary: Development files for %{name}
@ -47,20 +42,16 @@ command line.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%configure --disable-static --disable-tests --disable-werror DOCBOOK2MAN='xmlto man'
%configure --disable-silent-rules --disable-static --disable-tests --disable-werror \
DOCBOOK2MAN='xmlto man'
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
libtool
make %{?_smp_mflags} V=1
make %{?_smp_mflags}
%install
@ -94,6 +85,9 @@ rm -f %{buildroot}/%{_libdir}/*.la
%changelog
* Wed Nov 06 2013 David Tardon <dtardon@redhat.com> - 0.4.1-1
- new upstream release
* Fri Aug 30 2013 David Tardon <dtardon@redhat.com> - 0.3.1-8
- Resolves: rhbz#1000819 pkgconfig file for libcmis-c is broken

@ -1 +1 @@
a60f503fa011174737dd603fb345d9e1 libcmis-0.3.1.tar.gz
22f8a85daf4a012180322e1f52a7563b libcmis-0.4.1.tar.gz

Loading…
Cancel
Save