public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2016-03-19 21:39 Andreas Hüttel
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Hüttel @ 2016-03-19 21:39 UTC (permalink / raw
  To: gentoo-commits

commit:     cd2b8fd7e937fe362a8e670ee89763637fc9fbb1
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sat Mar  5 21:30:24 2016 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Mar 19 21:39:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd2b8fd7

dev-cpp/libcmis: Drop old ebuild and unused patch

Package-Manager: portage-2.2.27

 .../libcmis-0.2.3-do-not-override-phases.patch     | 17 -----
 dev-cpp/libcmis/libcmis-0.5.0.ebuild               | 72 ----------------------
 2 files changed, 89 deletions(-)

diff --git a/dev-cpp/libcmis/files/libcmis-0.2.3-do-not-override-phases.patch b/dev-cpp/libcmis/files/libcmis-0.2.3-do-not-override-phases.patch
deleted file mode 100644
index 0a47414..0000000
--- a/dev-cpp/libcmis/files/libcmis-0.2.3-do-not-override-phases.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -urN libcmis-0.2.3.old//Makefile.am libcmis-0.2.3/Makefile.am
---- libcmis-0.2.3.old//Makefile.am	2012-08-09 10:18:22.559384031 +0200
-+++ libcmis-0.2.3/Makefile.am	2012-08-09 10:18:44.797384029 +0200
-@@ -12,11 +12,11 @@
- cmis-client.1: doc/cmis-client.xml
- 	$(DOCBOOK2X) $<
- 
--install-data-am: cmis-client.1
-+install-data-local: cmis-client.1
- 	mkdir -p $(DESTDIR)$(mandir)/man1/
- 	$(INSTALL_DATA) cmis-client.1 $(DESTDIR)$(mandir)/man1/
- 
--uninstall-am:
-+uninstall-local:
- 	-rm -rf $(DESTDIR)$(mandir)/man1/
- endif
- 

diff --git a/dev-cpp/libcmis/libcmis-0.5.0.ebuild b/dev-cpp/libcmis/libcmis-0.5.0.ebuild
deleted file mode 100644
index d3f9f03..0000000
--- a/dev-cpp/libcmis/libcmis-0.5.0.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-EGIT_REPO_URI="git://git.code.sf.net/p/libcmis/code"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="git-r3"
-inherit eutils alternatives autotools ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="C++ client library for the CMIS interface"
-HOMEPAGE="https://sourceforge.net/projects/libcmis/"
-[[ ${PV} == 9999 ]] || SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
-SLOT="0.5"
-
-# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
-[[ ${PV} == 9999 ]] || \
-KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
-
-IUSE="static-libs man test"
-
-RDEPEND="
-	!dev-cpp/libcmis:0
-	!dev-cpp/libcmis:0.2
-	!dev-cpp/libcmis:0.3
-	!dev-cpp/libcmis:0.4
-	dev-libs/boost:=
-	dev-libs/libxml2
-	net-misc/curl
-"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	man? (
-		app-text/docbook2X
-		dev-libs/libxslt
-	)
-	test? (
-		dev-util/cppcheck
-		dev-util/cppunit
-	)
-"
-
-src_prepare() {
-	[[ ${PV} == 9999 ]] && eautoreconf
-}
-
-src_configure() {
-	econf \
-		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
-		--program-suffix=-${SLOT} \
-		--disable-werror \
-		$(use_with man) \
-		$(use_enable static-libs static) \
-		$(use_enable test tests) \
-		--enable-client
-}
-
-src_install() {
-	default
-	prune_libtool_files --all
-}
-
-pkg_postinst() {
-	alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
-}
-
-pkg_postrm() {
-	alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2018-09-16 22:34 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2018-09-16 22:34 UTC (permalink / raw
  To: gentoo-commits

commit:     c7befb2acb16f58e52e9914826ef4a6c7ca35cad
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 16 21:47:41 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 16 22:29:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7befb2a

dev-cpp/libcmis: Add new 0.5.2_pre20180118 snapshot

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-cpp/libcmis/Manifest                           |  1 +
 .../libcmis/files/libcmis-0.5.2-boost-1.68.patch   | 25 ++++++++
 .../files/libcmis-0.5.2-oauth2-encode.patch        | 69 ++++++++++++++++++++++
 ...999.ebuild => libcmis-0.5.2_pre20180118.ebuild} | 27 +++++----
 dev-cpp/libcmis/libcmis-9999.ebuild                | 22 +++----
 5 files changed, 118 insertions(+), 26 deletions(-)

diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
index b7fef5d145e..2e15c177422 100644
--- a/dev-cpp/libcmis/Manifest
+++ b/dev-cpp/libcmis/Manifest
@@ -1 +1,2 @@
 DIST libcmis-0.5.2_pre20160820.tar.gz 285100 BLAKE2B 980200d1a56240d8d069aba2ad349ec02e90d345bad4956f6cbbea3606f9f90951523804293b349ad0419dd2db6db294a45a97872469105c1ba392c888fab332 SHA512 4b6d0fc4d80444fea2c5eb16621b92a10b41c58128cc8a355caca50f12648ed5113bd977cc5dbe8971e3dbc11f9d7ae8d45c9d2aa19f37c83659141af135bd1a
+DIST libcmis-0.5.2_pre20180118.tar.gz 291080 BLAKE2B 1cb5664dcb0bef7f5a04c422b21ac54a9b70d38dec74d688327732630e4a134a88c7262d763a39d1730eda1cd45f5d3c3d47a56099959d01bf5e23972181a793 SHA512 630cf7e5c31266e2b55ca093aa942fc373eb24bbb5b9aedd687f67f1b3c6b627a3bdb58878859449bcb340626f3e1bdafa2b9cbb5e61e8e4336c45b804fca7a9

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
new file mode 100644
index 00000000000..767464242f7
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
@@ -0,0 +1,25 @@
+From 3ef3569c4ae1c5319aff0664d52cbd8a8d42c909 Mon Sep 17 00:00:00 2001
+From: rezso <rezso@rezso.net>
+Date: Tue, 4 Sep 2018 01:18:10 +0200
+Subject: tdf#119344 fix libcmis build with boost 1.68
+
+Change-Id: I80d6ea8ecd001dc02b941c1eb8974c9244316045
+Reviewed-on: https://gerrit.libreoffice.org/59958
+Tested-by: Jenkins
+Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
+
+--- a/src/libcmis/xml-utils.cxx
++++ b/src/libcmis/xml-utils.cxx
+@@ -31,7 +31,12 @@
+ #include <sstream>
+ #include <stdlib.h>
+ 
++#include <boost/version.hpp>
++#if (BOOST_VERSION >= 106800)
++#include <boost/uuid/detail/sha1.hpp>
++#else
+ #include <boost/uuid/sha1.hpp>
++#endif
+ #include <curl/curl.h>
+ 
+ #include "xml-utils.hxx"

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
new file mode 100644
index 00000000000..c6a99074c50
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
@@ -0,0 +1,69 @@
+From 33f7485dedea90e0f80c6348fa8ac5f27c5052e0 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 4 Sep 2018 16:45:00 +0200
+Subject: Properly encode OAuth2 credentials
+
+Change-Id: Ic3edeae035262309e91fb01e3aca5c2f905bc3e5
+Reviewed-on: https://gerrit.libreoffice.org/59986
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
+@@ -26,6 +26,8 @@
+  * instead of those above.
+  */
+ 
++#include <cassert>
++
+ #include <libxml/HTMLparser.h>
+ #include <libxml/xmlreader.h>
+ 
+@@ -45,6 +47,29 @@
+ #define HTML_PARSE_RECOVER 0
+ #endif
+ 
++namespace {
++
++// See <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
++void addXWwwFormUrlencoded(std::string * buffer, std::string const & data) {
++    assert(buffer);
++    for (string::const_iterator i = data.begin(); i != data.end(); ++i) {
++        unsigned char c = static_cast<unsigned char>(*i);
++        if (c == ' ' || c == '*' || c == '-' || c == '.' || (c >= '0' && c <= '9')
++            || (c >= 'A' && c <= 'Z') || c == '_' || (c >= 'a' && c <= 'z'))
++        {
++            *buffer += static_cast<char>(c);
++        } else {
++            static const char hex[16] = {
++                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
++            *buffer += '%';
++            *buffer += hex[c >> 4];
++            *buffer += hex[c & 0xF];
++        }
++    }
++}
++
++}
++
+ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
+                                       const string& username, const string& password )
+ {
+@@ -97,7 +120,7 @@
+         return string( );
+ 
+     loginEmailPost += "Email=";
+-    loginEmailPost += string( username );
++    addXWwwFormUrlencoded(&loginEmailPost, username);
+ 
+     istringstream loginEmailIs( loginEmailPost );
+     string loginEmailRes;
+@@ -119,7 +142,7 @@
+         return string( );
+ 
+     loginPasswdPost += "Passwd=";
+-    loginPasswdPost += string( password );
++    addXWwwFormUrlencoded(&loginPasswdPost, password);
+ 
+     istringstream loginPasswdIs( loginPasswdPost );
+     string loginPasswdRes;

diff --git a/dev-cpp/libcmis/libcmis-9999.ebuild b/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
similarity index 75%
copy from dev-cpp/libcmis/libcmis-9999.ebuild
copy to dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
index 78e5b1990a3..9c4546b7f5f 100644
--- a/dev-cpp/libcmis/libcmis-9999.ebuild
+++ b/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
@@ -5,17 +5,14 @@ EAPI=6
 
 if [[ ${PV} = 9999 ]]; then
 	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
-	SCM_ECLASS="git-r3"
+	inherit git-r3
 elif [[ ${PV} = *_pre* ]]; then
-	SCM_ECLASS="vcs-snapshot"
-	snapshot=d2054a12e3f52fff8e96341e8c48f0dcd75e2e2a
-	SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
-	unset snapshot
+	COMMIT=738528d790b2b1d52d9b72d673842969a852815d
+	SRC_URI="https://github.com/tdf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
 else
 	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 fi
-inherit alternatives autotools flag-o-matic ${SCM_ECLASS}
-unset SCM_ECLASS
+inherit alternatives autotools flag-o-matic
 
 DESCRIPTION="C++ client library for the CMIS interface"
 HOMEPAGE="https://github.com/tdf/libcmis"
@@ -25,16 +22,16 @@ SLOT="0.5"
 
 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
 [[ ${PV} == 9999 ]] || \
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
 
 IUSE="man static-libs test"
 
-COMMON_DEPEND="
+RDEPEND="
 	dev-libs/boost:=
 	dev-libs/libxml2
 	net-misc/curl
 "
-DEPEND="${COMMON_DEPEND}
+DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	man? (
 		app-text/docbook2X
@@ -45,12 +42,16 @@ DEPEND="${COMMON_DEPEND}
 		dev-util/cppunit
 	)
 "
-RDEPEND="${COMMON_DEPEND}
-	!<dev-cpp/libcmis-0.5.0
-"
 
 RESTRICT="test"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-0.5.2-boost-1.68.patch"
+	"${FILESDIR}/${PN}-0.5.2-oauth2-encode.patch"
+)
+
+[[ ${PV} = *_pre* ]] && S="${WORKDIR}/${PN}-${COMMIT}"
+
 src_prepare() {
 	default
 	[[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf

diff --git a/dev-cpp/libcmis/libcmis-9999.ebuild b/dev-cpp/libcmis/libcmis-9999.ebuild
index 78e5b1990a3..922b7a7756a 100644
--- a/dev-cpp/libcmis/libcmis-9999.ebuild
+++ b/dev-cpp/libcmis/libcmis-9999.ebuild
@@ -5,17 +5,14 @@ EAPI=6
 
 if [[ ${PV} = 9999 ]]; then
 	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
-	SCM_ECLASS="git-r3"
+	inherit git-r3
 elif [[ ${PV} = *_pre* ]]; then
-	SCM_ECLASS="vcs-snapshot"
-	snapshot=d2054a12e3f52fff8e96341e8c48f0dcd75e2e2a
-	SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
-	unset snapshot
+	COMMIT=738528d790b2b1d52d9b72d673842969a852815d
+	SRC_URI="https://github.com/tdf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
 else
 	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 fi
-inherit alternatives autotools flag-o-matic ${SCM_ECLASS}
-unset SCM_ECLASS
+inherit alternatives autotools flag-o-matic
 
 DESCRIPTION="C++ client library for the CMIS interface"
 HOMEPAGE="https://github.com/tdf/libcmis"
@@ -25,16 +22,16 @@ SLOT="0.5"
 
 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
 [[ ${PV} == 9999 ]] || \
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
 
 IUSE="man static-libs test"
 
-COMMON_DEPEND="
+RDEPEND="
 	dev-libs/boost:=
 	dev-libs/libxml2
 	net-misc/curl
 "
-DEPEND="${COMMON_DEPEND}
+DEPEND="${RDEPEND}
 	virtual/pkgconfig
 	man? (
 		app-text/docbook2X
@@ -45,12 +42,11 @@ DEPEND="${COMMON_DEPEND}
 		dev-util/cppunit
 	)
 "
-RDEPEND="${COMMON_DEPEND}
-	!<dev-cpp/libcmis-0.5.0
-"
 
 RESTRICT="test"
 
+[[ ${PV} = *_pre* ]] && S="${WORKDIR}/${PN}-${COMMIT}"
+
 src_prepare() {
 	default
 	[[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2019-02-17 22:59 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2019-02-17 22:59 UTC (permalink / raw
  To: gentoo-commits

commit:     16b0199b7774379301c92946006e6e01f4c51e87
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 17 19:26:42 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 17 22:59:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16b0199b

dev-cpp/libcmis: Drop <0.5.2

Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-cpp/libcmis/Manifest                           |  2 -
 .../libcmis/files/libcmis-0.5.2-boost-1.68.patch   | 25 -------
 .../files/libcmis-0.5.2-fix-gdrive-2fa.patch       | 70 ------------------
 .../files/libcmis-0.5.2-oauth2-encode.patch        | 69 ------------------
 .../libcmis/libcmis-0.5.2_pre20160820-r1.ebuild    | 85 ----------------------
 dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild   | 77 --------------------
 6 files changed, 328 deletions(-)

diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
index 2065d178dde..c1568ef2f82 100644
--- a/dev-cpp/libcmis/Manifest
+++ b/dev-cpp/libcmis/Manifest
@@ -1,3 +1 @@
 DIST libcmis-0.5.2.tar.gz 295020 BLAKE2B 325eacedd87eb1888a439c727a648c5aeb8d58c9b80add9761ffc55381193b71b589865d13ecd55177faafa935642685001f60456c1354e037989b29e9451c05 SHA512 45d8cd6d420a9593b46e1f2d6fbf384ea248cb218b0db6326ee2f082ff29100b65a2cc999ccb849e61df4f4ed7c3721b09addc6c322ef03c6c93f8c0acc02bde
-DIST libcmis-0.5.2_pre20160820.tar.gz 285100 BLAKE2B 980200d1a56240d8d069aba2ad349ec02e90d345bad4956f6cbbea3606f9f90951523804293b349ad0419dd2db6db294a45a97872469105c1ba392c888fab332 SHA512 4b6d0fc4d80444fea2c5eb16621b92a10b41c58128cc8a355caca50f12648ed5113bd977cc5dbe8971e3dbc11f9d7ae8d45c9d2aa19f37c83659141af135bd1a
-DIST libcmis-0.5.2_pre20180118.tar.gz 291080 BLAKE2B 1cb5664dcb0bef7f5a04c422b21ac54a9b70d38dec74d688327732630e4a134a88c7262d763a39d1730eda1cd45f5d3c3d47a56099959d01bf5e23972181a793 SHA512 630cf7e5c31266e2b55ca093aa942fc373eb24bbb5b9aedd687f67f1b3c6b627a3bdb58878859449bcb340626f3e1bdafa2b9cbb5e61e8e4336c45b804fca7a9

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
deleted file mode 100644
index 767464242f7..00000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3ef3569c4ae1c5319aff0664d52cbd8a8d42c909 Mon Sep 17 00:00:00 2001
-From: rezso <rezso@rezso.net>
-Date: Tue, 4 Sep 2018 01:18:10 +0200
-Subject: tdf#119344 fix libcmis build with boost 1.68
-
-Change-Id: I80d6ea8ecd001dc02b941c1eb8974c9244316045
-Reviewed-on: https://gerrit.libreoffice.org/59958
-Tested-by: Jenkins
-Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-
---- a/src/libcmis/xml-utils.cxx
-+++ b/src/libcmis/xml-utils.cxx
-@@ -31,7 +31,12 @@
- #include <sstream>
- #include <stdlib.h>
- 
-+#include <boost/version.hpp>
-+#if (BOOST_VERSION >= 106800)
-+#include <boost/uuid/detail/sha1.hpp>
-+#else
- #include <boost/uuid/sha1.hpp>
-+#endif
- #include <curl/curl.h>
- 
- #include "xml-utils.hxx"

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
deleted file mode 100644
index 3c19e99a5ba..00000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 1effce6d286ba3a9f467e15074b532d2ba4b7c98 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Szymon=20K=C5=82os?= <eszkadev@gmail.com>
-Date: Wed, 29 Mar 2017 17:45:10 +0200
-Subject: [PATCH] Fix 2FA for Google Drive
-
----
- src/libcmis/oauth2-providers.cxx | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
-index 74c0fec..dd872dd 100644
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -37,6 +37,7 @@
- #define CHALLENGE_PAGE_ACTION_LEN sizeof( CHALLENGE_PAGE_ACTION ) - 1
- #define PIN_FORM_ACTION "/signin/challenge/ipp"
- #define PIN_FORM_ACTION_LEN sizeof( PIN_FORM_ACTION ) - 1
-+#define PIN_INPUT_NAME "Pin"
- 
- using namespace std;
- 
-@@ -152,7 +153,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr
-         }
- 
-         loginChallengeLink = "https://accounts.google.com" + loginChallengeLink;
--        loginChallengePost += "Pin=";
-+        loginChallengePost += string( PIN_INPUT_NAME ) + "=";
-         loginChallengePost += string( pin );
- 
-         istringstream loginChallengeIs( loginChallengePost );
-@@ -291,6 +292,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
-     if ( reader == NULL ) return 0;
- 
-     bool readInputField = false;
-+    bool bIsRightForm = false;
-+    bool bHasPinField = false;
- 
-     while ( true )
-     {
-@@ -301,6 +304,12 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
-         // Find the redirect link
-         if ( xmlStrEqual( nodeName, BAD_CAST( "form" ) ) )
-         {
-+            // 2FA: Don't add fields form other forms not having pin field
-+            if ( bIsRightForm && !bHasPinField )
-+                post = string( "" );
-+            if ( bIsRightForm && bHasPinField )
-+                break;
-+
-             xmlChar* action = xmlTextReaderGetAttribute( reader, 
-                                                          BAD_CAST( "action" ));
- 
-@@ -311,7 +320,7 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
-                 bool bChallengePage = ( strncmp( (char*)action,
-                                                  CHALLENGE_PAGE_ACTION,
-                                                  CHALLENGE_PAGE_ACTION_LEN ) == 0 );
--                bool bIsRightForm = ( strncmp( (char*)action,
-+                bIsRightForm = ( strncmp( (char*)action,
-                                                  PIN_FORM_ACTION,
-                                                  PIN_FORM_ACTION_LEN ) == 0 );
-                 if ( ( xmlStrlen( action ) > 0 )
-@@ -332,6 +341,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
-                                                        BAD_CAST( "name" ));
-             xmlChar* value = xmlTextReaderGetAttribute( reader, 
-                                                         BAD_CAST( "value" ));
-+            if ( name != NULL && strcmp( (char*)name, PIN_INPUT_NAME ) == 0 )
-+                bHasPinField = true;
-             if ( ( name != NULL ) && ( value!= NULL ) )
-             {
-                 if ( ( xmlStrlen( name ) > 0) && ( xmlStrlen( value ) > 0) )

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
deleted file mode 100644
index c6a99074c50..00000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 33f7485dedea90e0f80c6348fa8ac5f27c5052e0 Mon Sep 17 00:00:00 2001
-From: Stephan Bergmann <sbergman@redhat.com>
-Date: Tue, 4 Sep 2018 16:45:00 +0200
-Subject: Properly encode OAuth2 credentials
-
-Change-Id: Ic3edeae035262309e91fb01e3aca5c2f905bc3e5
-Reviewed-on: https://gerrit.libreoffice.org/59986
-Tested-by: Jenkins
-Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -26,6 +26,8 @@
-  * instead of those above.
-  */
- 
-+#include <cassert>
-+
- #include <libxml/HTMLparser.h>
- #include <libxml/xmlreader.h>
- 
-@@ -45,6 +47,29 @@
- #define HTML_PARSE_RECOVER 0
- #endif
- 
-+namespace {
-+
-+// See <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
-+void addXWwwFormUrlencoded(std::string * buffer, std::string const & data) {
-+    assert(buffer);
-+    for (string::const_iterator i = data.begin(); i != data.end(); ++i) {
-+        unsigned char c = static_cast<unsigned char>(*i);
-+        if (c == ' ' || c == '*' || c == '-' || c == '.' || (c >= '0' && c <= '9')
-+            || (c >= 'A' && c <= 'Z') || c == '_' || (c >= 'a' && c <= 'z'))
-+        {
-+            *buffer += static_cast<char>(c);
-+        } else {
-+            static const char hex[16] = {
-+                '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-+            *buffer += '%';
-+            *buffer += hex[c >> 4];
-+            *buffer += hex[c & 0xF];
-+        }
-+    }
-+}
-+
-+}
-+
- string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
-                                       const string& username, const string& password )
- {
-@@ -97,7 +120,7 @@
-         return string( );
- 
-     loginEmailPost += "Email=";
--    loginEmailPost += string( username );
-+    addXWwwFormUrlencoded(&loginEmailPost, username);
- 
-     istringstream loginEmailIs( loginEmailPost );
-     string loginEmailRes;
-@@ -119,7 +142,7 @@
-         return string( );
- 
-     loginPasswdPost += "Passwd=";
--    loginPasswdPost += string( password );
-+    addXWwwFormUrlencoded(&loginPasswdPost, password);
- 
-     istringstream loginPasswdIs( loginPasswdPost );
-     string loginPasswdRes;

diff --git a/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild b/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild
deleted file mode 100644
index 8377602271d..00000000000
--- a/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-if [[ ${PV} = 9999 ]]; then
-	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
-	SCM_ECLASS="git-r3"
-elif [[ ${PV} = *_pre* ]]; then
-	SCM_ECLASS="vcs-snapshot"
-	snapshot=d2054a12e3f52fff8e96341e8c48f0dcd75e2e2a
-	SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
-	unset snapshot
-else
-	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-inherit alternatives autotools flag-o-matic ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="C++ client library for the CMIS interface"
-HOMEPAGE="https://github.com/tdf/libcmis"
-
-LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
-SLOT="0.5"
-
-# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
-[[ ${PV} == 9999 ]] || \
-KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
-
-IUSE="man static-libs test"
-
-COMMON_DEPEND="
-	dev-libs/boost:=
-	dev-libs/libxml2
-	net-misc/curl
-"
-DEPEND="${COMMON_DEPEND}
-	virtual/pkgconfig
-	man? (
-		app-text/docbook2X
-		dev-libs/libxslt
-	)
-	test? (
-		dev-util/cppcheck
-		dev-util/cppunit
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!<dev-cpp/libcmis-0.5.0
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-0.5.2-fix-gdrive-2fa.patch" )
-
-src_prepare() {
-	default
-	[[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf
-}
-
-src_configure() {
-	# bug 618778
-	append-cxxflags -std=c++14
-
-	econf \
-		--program-suffix=-${SLOT} \
-		--disable-werror \
-		$(use_with man) \
-		$(use_enable static-libs static) \
-		$(use_enable test tests) \
-		--enable-client
-}
-
-src_install() {
-	default
-	find "${D}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
-	alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
-}
-
-pkg_postrm() {
-	alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
-}

diff --git a/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild b/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
deleted file mode 100644
index 2707ed8b630..00000000000
--- a/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} = 9999 ]]; then
-	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
-	inherit git-r3
-elif [[ ${PV} = *_pre* ]]; then
-	COMMIT=738528d790b2b1d52d9b72d673842969a852815d
-	SRC_URI="https://github.com/tdf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
-else
-	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-inherit autotools flag-o-matic
-
-DESCRIPTION="C++ client library for the CMIS interface"
-HOMEPAGE="https://github.com/tdf/libcmis"
-
-LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
-SLOT="0.5"
-
-# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
-[[ ${PV} == 9999 ]] || \
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-
-IUSE="man static-libs test"
-
-RDEPEND="
-	dev-libs/boost:=
-	dev-libs/libxml2
-	net-misc/curl
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	man? (
-		app-text/docbook2X
-		dev-libs/libxslt
-	)
-	test? (
-		dev-util/cppcheck
-		dev-util/cppunit
-	)
-"
-
-RESTRICT="test"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-0.5.2-boost-1.68.patch"
-	"${FILESDIR}/${PN}-0.5.2-oauth2-encode.patch"
-)
-
-[[ ${PV} = *_pre* ]] && S="${WORKDIR}/${PN}-${COMMIT}"
-
-src_prepare() {
-	default
-	[[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf
-}
-
-src_configure() {
-	# bug 618778
-	append-cxxflags -std=c++14
-
-	econf \
-		--program-suffix=-$(ver_cut 1-2) \
-		--disable-werror \
-		$(use_with man) \
-		$(use_enable static-libs static) \
-		$(use_enable test tests) \
-		--enable-client
-}
-
-src_install() {
-	default
-	find "${D}" -name '*.la' -delete || die
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2022-12-26 23:19 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2022-12-26 23:19 UTC (permalink / raw
  To: gentoo-commits

commit:     be8dc4f5b4ef1d2ee4eb99fd2952229dba5f8d4f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 26 12:16:32 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 23:19:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be8dc4f5

dev-cpp/libcmis: Apply fixes from copy bundled in LO

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/libcmis-0.5.2-fix-gdrive-onedrive.patch  | 980 +++++++++++++++++++++
 .../libcmis/files/libcmis-0.5.2-fix-onedrive.patch | 481 ++++++++++
 ...libcmis-0.5.2-gdrive-do-not-allow-copying.patch | 722 +++++++++++++++
 ...bcmis-0.5.2-onedrive-do-not-allow-copying.patch | 430 +++++++++
 dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild            |  69 ++
 5 files changed, 2682 insertions(+)

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch
new file mode 100644
index 000000000000..b1e07ad89e24
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch
@@ -0,0 +1,980 @@
+From bce91e0854a0ff1d0b2023f1f3a54077a36e3738 Mon Sep 17 00:00:00 2001
+From: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
+Date: Mon, 23 Aug 2021 15:10:08 +0100
+Subject: [PATCH] tdf#101630 - gdrive support w/oAuth and Drive API v3
+
+LibreOffice is only using drive.file scope, so can only see files it
+owns/that were created by LibreOffice.
+
+In addition, also store the refresh token in LO's password-store if the
+user enabled persistent storage, removing the need to to the
+copy'n'paste dance to grant access each time LO is launched.
+
+related tdf#115643 also store the refresh token for onedrive
+consolidate the fallback-auth provides for onedrive/gdrive into one,
+they are all the same login in browser, then copy code method that
+ultimately should be changed to having LO listen on local port for the
+code
+---
+ inc/libcmis/session.hxx           |   2 +
+ src/libcmis/gdrive-document.cxx   |  49 ++------
+ src/libcmis/gdrive-folder.cxx     |  25 ++--
+ src/libcmis/gdrive-object.cxx     |  43 +++----
+ src/libcmis/gdrive-repository.cxx |   2 +-
+ src/libcmis/gdrive-session.cxx    |  76 ++++++++++-
+ src/libcmis/gdrive-session.hxx    |   8 ++
+ src/libcmis/gdrive-utils.cxx      |  33 ++---
+ src/libcmis/gdrive-utils.hxx      |   3 +-
+ src/libcmis/http-session.hxx      |   2 +-
+ src/libcmis/oauth2-handler.cxx    |  16 ++-
+ src/libcmis/oauth2-handler.hxx    |   1 +
+ src/libcmis/oauth2-providers.cxx  | 203 +-----------------------------
+ src/libcmis/oauth2-providers.hxx  |   6 +-
+ src/libcmis/onedrive-session.cxx  |  39 ++++++
+ src/libcmis/onedrive-session.hxx  |  10 +-
+ src/libcmis/session-factory.cxx   |   2 +-
+ 17 files changed, 206 insertions(+), 314 deletions(-)
+
+diff --git a/inc/libcmis/session.hxx b/inc/libcmis/session.hxx
+index 0a768a8..ec95ab4 100644
+--- a/inc/libcmis/session.hxx
++++ b/inc/libcmis/session.hxx
+@@ -95,6 +95,8 @@ namespace libcmis
+                 certificate exception feature available on common web browser.
+               */
+             virtual void setNoSSLCertificateCheck( bool noCheck ) = 0;
++
++            virtual std::string getRefreshToken() { return ""; };
+     };
+ }
+ 
+diff --git a/src/libcmis/gdrive-document.cxx b/src/libcmis/gdrive-document.cxx
+index fe7b73a..ecb13d6 100644
+--- a/src/libcmis/gdrive-document.cxx
++++ b/src/libcmis/gdrive-document.cxx
+@@ -145,23 +145,17 @@ void GDriveDocument::uploadStream( boost::shared_ptr< ostream > os,
+ {
+     if ( !os.get( ) )
+         throw libcmis::Exception( "Missing stream" );
+-    if ( !isImmutable( ) )
+-        throw libcmis::Exception( string ( "Document " + getId( )+ 
+-                                    " is not editable" ) );
+-    string putUrl = getUploadUrl( ) + getId( );
+-    putUrl += "?uploadType=media";
+-    
+-    // If it's a Google document, convert it 
+-    if ( isGoogleDoc( ) )
+-        putUrl  += "&convert=true";
++
++    string putUrl = GDRIVE_UPLOAD_LINK + getId( ) + "?uploadType=media";
+ 
+     // Upload stream
+     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
+     vector <string> headers;
+     headers.push_back( string( "Content-Type: " ) + contentType );
++    string res;
+     try
+     {
+-        getSession()->httpPutRequest( putUrl, *is, headers );
++        res = getSession()->httpPatchRequest( putUrl, *is, headers )->getStream()->str();
+     }
+     catch ( const CurlException& e )
+     {
+@@ -181,35 +175,10 @@ void GDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
+ {
+     if ( !os.get( ) )
+         throw libcmis::Exception( "Missing stream" );
+-    
+-    if ( !isImmutable( ) )
+-        throw libcmis::Exception( string ( "Document " + getId( )+ 
+-                                    " is not editable" ) );
+-    string metaUrl = getUrl( );
+-
+-    // If it's a Google document, convert it 
+-    if ( isGoogleDoc( ) )
+-        metaUrl += "?convert=true";
+-
+-    // Update file name meta information
+-    if ( !fileName.empty( ) && fileName != getContentFilename( ) )
+-    {
+-        Json metaJson;
+-        Json fileJson( fileName.c_str( ) );
+-        metaJson.add("title", fileJson );
+ 
+-        std::istringstream is( metaJson.toString( ) );
+-        vector<string> headers;
+-        headers.push_back( "Content-Type: application/json" );
+-        try
+-        {
+-            getSession()->httpPutRequest( metaUrl, is, headers );
+-        }
+-        catch ( const CurlException& e )
+-        {
+-            throw e.getCmisException( );
+-        }
+-    }
++    // TODO: when would the filename need an update?
++    if (!fileName.empty() && fileName != getContentFilename())
++        std::cout << "filename change is not implemented in setContentStream" << std::endl;
+ 
+     // Upload stream
+     uploadStream( os, contentType );
+@@ -251,7 +220,7 @@ libcmis::DocumentPtr GDriveDocument::checkIn(
+ vector< libcmis::DocumentPtr > GDriveDocument::getAllVersions( ) 
+ {   
+     vector< libcmis::DocumentPtr > revisions;
+-    string versionUrl = getUrl( ) + "/revisions";
++    string versionUrl = GDRIVE_METADATA_LINK + getId( ) + "/revisions";
+     // Run the http request to get the properties definition
+     string res;
+     try
+@@ -263,7 +232,7 @@ vector< libcmis::DocumentPtr > GDriveDocument::getAllVersions( )
+         throw e.getCmisException( );
+     }
+     Json jsonRes = Json::parse( res );        
+-    Json::JsonVector objs = jsonRes["items"].getList( );
++    Json::JsonVector objs = jsonRes["revisions"].getList( );
+    
+     string parentId = getStringProperty( "cmis:parentId" );
+ 
+diff --git a/src/libcmis/gdrive-folder.cxx b/src/libcmis/gdrive-folder.cxx
+index 34ab187..26de89b 100644
+--- a/src/libcmis/gdrive-folder.cxx
++++ b/src/libcmis/gdrive-folder.cxx
+@@ -62,8 +62,8 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
+     // Instead of sending multiple queries for children,
+     // we send a single query to search for objects where parents
+     // include the folderID.
+-    string query = getSession( )->getBindingUrl( ) + 
+-        "/files?q=\"" + getId( ) + "\"+in+parents+and+trashed+=+false";
++    string query = GDRIVE_METADATA_LINK + "?q=\"" + getId( ) + "\"+in+parents+and+trashed+=+false" +
++        "&fields=files(kind,id,name,parents,mimeType,createdTime,modifiedTime,thumbnailLink,size)";
+ 
+     string res;
+     try
+@@ -76,7 +76,7 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
+     }
+ 
+     Json jsonRes = Json::parse( res );
+-    Json::JsonVector objs = jsonRes["items"].getList( );
++    Json::JsonVector objs = jsonRes["files"].getList( );
+     
+     // Create children objects from Json objects
+     for(unsigned int i = 0; i < objs.size(); i++)
+@@ -95,7 +95,7 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
+ string GDriveFolder::uploadProperties( Json properties )
+ {
+     // URL for uploading meta data
+-    string metaUrl =  getSession()->getBindingUrl() + "/files/";
++    string metaUrl =  GDRIVE_METADATA_LINK + "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime";
+ 
+     // add parents to the properties    
+     properties.add( "parents", GdriveUtils::createJsonFromParentId( getId( ) ) );
+@@ -147,9 +147,15 @@ libcmis::DocumentPtr GDriveFolder::createDocument(
+     
+     Json propsJson = GdriveUtils::toGdriveJson( properties );
+ 
+-    // Add filename to properties
+-    Json jsonFilename( fileName.c_str( ) );
+-    propsJson.add( "title", jsonFilename );
++    if(!fileName.empty()) {
++        // use provided filename
++        Json jsonFilename( fileName.c_str( ) );
++
++        propsJson.add( "name", jsonFilename );
++    }
++    if(!contentType.empty()) {
++        propsJson.add( "mimeType", Json(contentType.c_str()));
++    }
+     
+     // Upload meta-datas
+     string res = uploadProperties( propsJson);
+@@ -171,12 +177,9 @@ vector< string > GDriveFolder::removeTree(
+     libcmis::UnfileObjects::Type /*unfile*/, 
+     bool /*continueOnError*/ ) 
+ {
+-    // Object remove doesn't work with folder
+-    // Using trash instead
+     try
+     {   
+-        istringstream is( "" );
+-        getSession( )->httpPostRequest( getUrl( ) + "/trash", is, "" );
++        getSession( )->httpDeleteRequest( GDRIVE_METADATA_LINK + getId( ) );
+     }
+     catch ( const CurlException& e )
+     {
+diff --git a/src/libcmis/gdrive-object.cxx b/src/libcmis/gdrive-object.cxx
+index f22c240..b472e2f 100644
+--- a/src/libcmis/gdrive-object.cxx
++++ b/src/libcmis/gdrive-object.cxx
+@@ -89,8 +89,8 @@ void GDriveObject::initializeFromJson ( Json json, string id, string name )
+             property.reset( new GDriveProperty( it->first, it->second ) );
+             m_properties[ property->getPropertyType( )->getId()] = property;
+            
+-            // we map "title" to both "cmis:name" and "cmis:getContentStreamFileName"
+-            if ( it->first == "title" )
++            // we map "name" to both "cmis:name" and "cmis:getContentStreamFileName"
++            if ( it->first == "name" )
+             {
+                 property.reset( new GDriveProperty( "cmis:name", it->second) );
+                 m_properties[ property->getPropertyType( )->getId()] = property;
+@@ -142,16 +142,13 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
+ {
+     if ( m_renditions.empty( ) )
+     {
+-        string downloadUrl = getStringProperty( "downloadUrl" );
+-        if ( !downloadUrl.empty( ) )
++        string downloadUrl = GDRIVE_METADATA_LINK + getId( ) + "?alt=media";
++        string mimeType = getStringProperty( "cmis:contentStreamMimeType" );
++        if ( !mimeType.empty( ) )
+         {
+-            string mimeType = getStringProperty( "cmis:contentStreamMimeType" );
+-            if ( !mimeType.empty( ) )
+-            { 
+-                RenditionPtr rendition( 
+-                    new Rendition( mimeType, mimeType, mimeType, downloadUrl ));
+-                m_renditions.push_back( rendition );
+-            }
++            RenditionPtr rendition(
++                new Rendition( mimeType, mimeType, mimeType, downloadUrl ));
++            m_renditions.push_back( rendition );
+         }
+ 
+         vector< string > exportLinks = getMultiStringProperty( "exportLinks" );
+@@ -159,7 +156,7 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
+         { 
+             int pos = (*it).find(":\"");
+             if ( pos == -1 ) continue;
+-            string mimeType = (*it).substr( 0, pos );
++            mimeType = (*it).substr( 0, pos );
+             string url = (*it).substr( pos + 2, (*it).length( ) - pos - 3 );
+             RenditionPtr rendition(
+                 new Rendition( mimeType, mimeType, mimeType, url ) );
+@@ -170,7 +167,7 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
+         string thumbnailLink = getStringProperty( "thumbnailLink" );
+         if ( !thumbnailLink.empty( ) )
+         {
+-            string mimeType = "cmis:thumbnail";   
++            mimeType = "cmis:thumbnail";
+             RenditionPtr rendition( 
+                 new Rendition( mimeType, mimeType, mimeType, thumbnailLink ));
+             m_renditions.push_back( rendition );
+@@ -192,7 +189,7 @@ libcmis::ObjectPtr GDriveObject::updateProperties(
+     {   
+         vector< string > headers;
+         headers.push_back( "Content-Type: application/json" );
+-        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
++        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
+     }
+     catch ( const CurlException& e )
+     {   
+@@ -228,7 +225,7 @@ void GDriveObject::remove( bool /*allVersions*/ )
+ {
+     try
+     {
+-        getSession( )->httpDeleteRequest( getUrl( ) );
++        getSession( )->httpDeleteRequest( GDRIVE_METADATA_LINK + getId( ) );
+     }
+     catch ( const CurlException& e )
+     {
+@@ -239,8 +236,8 @@ void GDriveObject::remove( bool /*allVersions*/ )
+ void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination ) 
+ {  
+     Json parentsJson;
+-    Json parentsValue = GdriveUtils::createJsonFromParentId( destination->getId( ) );
+-    parentsJson.add( "parents", parentsValue );
++    parentsJson.add( "addParents", Json(destination->getId( ).c_str()) );
++    parentsJson.add( "removeParents", Json(getStringProperty( "cmis:parentId" ).c_str()) );
+     
+     istringstream is( parentsJson.toString( ) );
+     libcmis::HttpResponsePtr response;
+@@ -248,7 +245,7 @@ void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination )
+     {   
+         vector< string > headers;
+         headers.push_back( "Content-Type: application/json" );
+-        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
++        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
+     }
+     catch ( const CurlException& e )
+     {   
+@@ -262,12 +259,10 @@ void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination )
+ 
+ string GDriveObject::getUrl( )
+ {
+-    return getSession( )->getBindingUrl( ) + "/files/" + getId( );
+-}
+-
+-string GDriveObject::getUploadUrl( )
+-{
+-    return GDRIVE_UPLOAD_LINKS;
++    // thumbnailLink causes some operations to fail with internal server error,
++    // see https://issuetracker.google.com/issues/36760667
++    return GDRIVE_METADATA_LINK + getId( ) +
++                "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime,size";
+ }
+ 
+ vector< string> GDriveObject::getMultiStringProperty( const string& propertyName )
+diff --git a/src/libcmis/gdrive-repository.cxx b/src/libcmis/gdrive-repository.cxx
+index e6cec69..24b42b5 100644
+--- a/src/libcmis/gdrive-repository.cxx
++++ b/src/libcmis/gdrive-repository.cxx
+@@ -35,7 +35,7 @@ GdriveRepository::GdriveRepository( ) :
+     m_name = "Google Drive";
+     m_description = "Google Drive repository";
+     m_productName = "Google Drive";
+-    m_productVersion = "v2";
++    m_productVersion = "v3";
+     m_rootId = "root";
+  
+     m_capabilities[ ACL ] = "discover";
+diff --git a/src/libcmis/gdrive-session.cxx b/src/libcmis/gdrive-session.cxx
+index 87bb160..1ee748e 100644
+--- a/src/libcmis/gdrive-session.cxx
++++ b/src/libcmis/gdrive-session.cxx
+@@ -65,6 +65,46 @@ GDriveSession::~GDriveSession()
+ {
+ }
+ 
++
++void GDriveSession::setOAuth2Data( libcmis::OAuth2DataPtr oauth2 )
++{
++    m_oauth2Handler = new OAuth2Handler( this, oauth2 );
++    m_oauth2Handler->setOAuth2Parser( OAuth2Providers::getOAuth2Parser( getBindingUrl( ) ) );
++
++    oauth2Authenticate( );
++}
++
++void GDriveSession::oauth2Authenticate()
++{
++    // treat the supplied password as refresh token
++    if (!m_password.empty())
++    {
++        try
++        {
++            m_inOAuth2Authentication = true;
++
++            m_oauth2Handler->setRefreshToken(m_password);
++            // Try to get new access tokens using the stored refreshtoken
++            m_oauth2Handler->refresh();
++            m_inOAuth2Authentication = false;
++        }
++        catch (const CurlException &e)
++        {
++            m_inOAuth2Authentication = false;
++            // refresh token expired or invalid, trigger initial auth (that in turn will hit the fallback with copy'n'paste method)
++            BaseSession::oauth2Authenticate();
++        }
++    }
++    else
++    {
++        BaseSession::oauth2Authenticate();
++    }
++}
++
++string GDriveSession::getRefreshToken() {
++    return HttpSession::getRefreshToken();
++}
++
+ libcmis::RepositoryPtr GDriveSession::getRepository( )
+ {
+     // Return a dummy repository since GDrive doesn't have that notion
+@@ -79,9 +119,13 @@ bool GDriveSession::setRepository( std::string )
+ 
+ libcmis::ObjectPtr GDriveSession::getObject( string objectId )
+ {
++    if(objectId == "root") {
++        return getRootFolder();
++    }
+     // Run the http request to get the properties definition
+     string res;
+-    string objectLink = m_bindingUrl + "/files/" + objectId;
++    string objectLink = GDRIVE_METADATA_LINK + objectId +
++         "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime,thumbnailLink,size";
+     try
+     {
+         res = httpGetRequest( objectLink )->getStream()->str();
+@@ -143,9 +187,10 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
+         {
+             // Normal child case
+             // Ask for the ID of the child if there is any
+-            string childIdUrl = m_bindingUrl + "/files/" + objectId +
+-                                "/children/?q=title+=+'" + segment +
+-                                "'&fields=items:id";
++            // somewhat flawed as names are not necessarily unique in GDrive...
++            string query = libcmis::escape("'" + objectId + "' in parents and trashed = false and name='" + segment + "'");
++
++            string childIdUrl = m_bindingUrl + "/files/?q=" + query + "&fields=files(id)";
+ 
+             string res;
+             try
+@@ -159,7 +204,7 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
+             Json jsonRes = Json::parse( res );
+ 
+             // Did we get an id?
+-            Json::JsonVector items = jsonRes["items"].getList();
++            Json::JsonVector items = jsonRes["files"].getList();
+             if ( items.empty( ) )
+                 throw libcmis::Exception( "Object not found: " + path, "objectNotFound" );
+ 
+@@ -174,6 +219,27 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
+     return getObject( objectId );
+ }
+ 
++libcmis::FolderPtr GDriveSession::getRootFolder()
++{
++    // permissions/scope with just drive.file don't allow to get it with the "root" alias/by its actual object-ID
++    Json propsJson;
++
++    // GDrive folder is a file with a different mime type.
++    string mimeType = GDRIVE_FOLDER_MIME_TYPE;
++
++    // Add mimetype to the propsJson
++    Json jsonMimeType( mimeType.c_str( ) );
++    propsJson.add( "mimeType", jsonMimeType );
++    propsJson.add( "id", "root" );
++
++    // Upload meta-datas
++    propsJson.add("cmis:name", "VirtualRoot");
++
++    libcmis::FolderPtr folderPtr( new GDriveFolder( this, propsJson ) );
++
++    return folderPtr;
++}
++
+ libcmis::ObjectTypePtr GDriveSession::getType( string id )
+ {
+     libcmis::ObjectTypePtr type( new GdriveObjectType( id ) );
+diff --git a/src/libcmis/gdrive-session.hxx b/src/libcmis/gdrive-session.hxx
+index f60ff6c..d29d454 100644
+--- a/src/libcmis/gdrive-session.hxx
++++ b/src/libcmis/gdrive-session.hxx
+@@ -55,10 +55,18 @@ class GDriveSession : public BaseSession
+ 
+         virtual std::vector< libcmis::ObjectTypePtr > getBaseTypes( );
+ 
++        virtual libcmis::FolderPtr getRootFolder();
++
++        virtual std::string getRefreshToken();
++
+     private:
+         GDriveSession( );
+         GDriveSession( const GDriveSession& copy ) = delete;
+         GDriveSession& operator=( const GDriveSession& copy ) = delete;
++
++        virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
++
++        void oauth2Authenticate( );
+ };
+ 
+ #endif /* _GDRIVE_SESSION_HXX_ */
+diff --git a/src/libcmis/gdrive-utils.cxx b/src/libcmis/gdrive-utils.cxx
+index 6be2e43..3cc0288 100644
+--- a/src/libcmis/gdrive-utils.cxx
++++ b/src/libcmis/gdrive-utils.cxx
+@@ -44,17 +44,17 @@ string GdriveUtils::toCmisKey( const string& key )
+         convertedKey = "cmis:createdBy";
+     else if ( key == "description" )
+         convertedKey = "cmis:description";
+-    else if ( key == "createdDate" )
++    else if ( key == "createdTime" )
+         convertedKey = "cmis:creationDate";
+     else if ( key == "lastModifyingUserName" )
+         convertedKey = "cmis:lastModifiedBy";
+-    else if ( key == "modifiedDate" )
++    else if ( key == "modifiedTime" )
+         convertedKey = "cmis:lastModificationDate";
+-    else if ( key == "title" )
++    else if ( key == "name" )
+         convertedKey = "cmis:contentStreamFileName";
+     else if ( key == "mimeType" )
+         convertedKey = "cmis:contentStreamMimeType";
+-    else if ( key == "fileSize" )
++    else if ( key == "size" )
+         convertedKey = "cmis:contentStreamLength";
+     else if ( key == "editable" )
+         convertedKey = "cmis:isImmutable";
+@@ -72,21 +72,21 @@ string GdriveUtils::toGdriveKey( const string& key )
+     else if ( key == "cmis:createdBy" )
+         convertedKey = "ownerNames";
+     else if ( key == "cmis:creationDate" )
+-        convertedKey = "createdDate";
++        convertedKey = "createdTime";
+     else if ( key == "cmis:description" )
+         convertedKey = "description";
+     else if ( key == "cmis:lastModifiedBy" )
+         convertedKey = "lastModifyingUserName";
+     else if ( key == "cmis:lastModificationDate" )
+-        convertedKey = "modifiedDate";
++        convertedKey = "modifiedTime";
+     else if ( key == "cmis:contentStreamFileName" )
+-        convertedKey = "title";
++        convertedKey = "name";
+     else if ( key == "cmis:name" )
+-        convertedKey = "title";
++        convertedKey = "name";
+     else if ( key == "cmis:contentStreamMimeType" )
+         convertedKey = "mimeType";
+     else if ( key == "cmis:contentStreamLength" )
+-        convertedKey = "fileSize";
++        convertedKey = "size";
+     else if ( key == "cmis:isImmutable" )
+         convertedKey = "editable";
+     else if ( key == "cmis:parentId" )
+@@ -124,9 +124,9 @@ Json GdriveUtils::toGdriveJson( const PropertyPtrMap& properties )
+ bool GdriveUtils::checkUpdatable( const string& key )
+ {
+     // taken from https://developers.google.com/drive/v2/reference/files
+-    bool updatable = ( key == "title" ||
++    bool updatable = ( key == "name" ||
+                   key == "description" ||
+-                  key == "modifiedDate" ||
++                  key == "modifiedTime" ||
+                   key == "lastViewedByMeDate" );
+     return updatable;    
+ }
+@@ -143,18 +143,11 @@ bool GdriveUtils::checkMultiValued( const string& key )
+ 
+ Json GdriveUtils::createJsonFromParentId( const string& parentId )
+ {
+-    Json parentValue( parentId.c_str( ) );
+-    
+     // parents is a Json array
+     Json firstParent;
+-    firstParent.add( "id", parentValue );
+-    
+-    Json::JsonVector parents;
+-    parents.insert( parents.begin( ), firstParent );
++    firstParent.add( Json( parentId.c_str() ) );
+     
+-    Json parentsValue( parents );
+-
+-    return parentsValue;
++    return firstParent;
+ }
+ 
+ vector< string > GdriveUtils::parseGdriveProperty( string key, Json json )
+diff --git a/src/libcmis/gdrive-utils.hxx b/src/libcmis/gdrive-utils.hxx
+index 6f1c257..06ad568 100644
+--- a/src/libcmis/gdrive-utils.hxx
++++ b/src/libcmis/gdrive-utils.hxx
+@@ -35,7 +35,8 @@
+ #include "json-utils.hxx"
+ 
+ static const std::string GDRIVE_FOLDER_MIME_TYPE = "application/vnd.google-apps.folder" ;
+-static const std::string GDRIVE_UPLOAD_LINKS = "https://www.googleapis.com/upload/drive/v2/files/";
++static const std::string GDRIVE_UPLOAD_LINK = "https://www.googleapis.com/upload/drive/v3/files/";
++static const std::string GDRIVE_METADATA_LINK = "https://www.googleapis.com/drive/v3/files/";
+ 
+ class GdriveUtils
+ {
+diff --git a/src/libcmis/http-session.hxx b/src/libcmis/http-session.hxx
+index 29de64d..6c9ed1b 100644
+--- a/src/libcmis/http-session.hxx
++++ b/src/libcmis/http-session.hxx
+@@ -148,7 +148,7 @@ class HttpSession
+ 
+         void setNoSSLCertificateCheck( bool noCheck );
+ 
+-        std::string getRefreshToken( );
++        virtual std::string getRefreshToken( );
+ 
+     protected:
+         HttpSession( );
+diff --git a/src/libcmis/oauth2-handler.cxx b/src/libcmis/oauth2-handler.cxx
+index 842769f..d70628d 100644
+--- a/src/libcmis/oauth2-handler.cxx
++++ b/src/libcmis/oauth2-handler.cxx
+@@ -92,8 +92,11 @@ void OAuth2Handler::fetchTokens( string authCode )
+         "code="              + authCode +
+         "&client_id="        + m_data->getClientId() +
+         "&redirect_uri="     + m_data->getRedirectUri() +
+-        "&scope="            + libcmis::escape( m_data->getScope() ) +
+         "&grant_type=authorization_code" ;
++    if(boost::starts_with(m_data->getTokenUrl(), "https://oauth2.googleapis.com/"))
++        post += "&client_secret="    + m_data->getClientSecret();
++    else
++        post += "&scope="            + libcmis::escape( m_data->getScope() );
+ 
+     istringstream is( post );
+ 
+@@ -104,7 +107,7 @@ void OAuth2Handler::fetchTokens( string authCode )
+         resp = m_session->httpPostRequest ( m_data->getTokenUrl(), is,
+                                         "application/x-www-form-urlencoded" );
+     }
+-    catch ( const CurlException& )
++    catch ( const CurlException& e)
+     {
+         throw libcmis::Exception(
+                 "Couldn't get tokens from the authorization code ");
+@@ -122,6 +125,8 @@ void OAuth2Handler::refresh( )
+         "refresh_token="     + m_refresh +
+         "&client_id="        + m_data->getClientId() +
+         "&grant_type=refresh_token" ;
++    if(boost::starts_with(m_data->getTokenUrl(), "https://oauth2.googleapis.com/"))
++        post += "&client_secret="    + m_data->getClientSecret();
+ 
+     istringstream is( post );
+     libcmis::HttpResponsePtr resp;
+@@ -130,7 +135,7 @@ void OAuth2Handler::refresh( )
+         resp = m_session->httpPostRequest( m_data->getTokenUrl( ), is,
+                                            "application/x-www-form-urlencoded" );
+     }
+-    catch (const CurlException& )
++    catch (const CurlException& e )
+     {
+         throw libcmis::Exception( "Couldn't refresh token ");
+     }
+@@ -158,6 +163,11 @@ string OAuth2Handler::getRefreshToken( )
+     return m_refresh;
+ }
+ 
++void OAuth2Handler::setRefreshToken( string refreshToken )
++{
++    m_refresh = refreshToken;
++}
++
+ string OAuth2Handler::getHttpHeader( )
+ {
+     string header;
+diff --git a/src/libcmis/oauth2-handler.hxx b/src/libcmis/oauth2-handler.hxx
+index 83e91cf..bb9a394 100644
+--- a/src/libcmis/oauth2-handler.hxx
++++ b/src/libcmis/oauth2-handler.hxx
+@@ -61,6 +61,7 @@ class OAuth2Handler
+ 
+         std::string getAccessToken( ) ;
+         std::string getRefreshToken( ) ;
++        void setRefreshToken( std::string refreshToken ) ;
+ 
+         // adding HTTP auth header
+         std::string getHttpHeader( ) ;
+diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
+index db6fbef..1c8d3cc 100644
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
+@@ -47,201 +47,8 @@
+ 
+ using namespace std;
+ 
+-namespace {
+-
+-// Encodes the given data according to the application/x-www-form-urlencoded format, see
+-// <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
+-std::string escapeForm(const std::string& data)
+-{
+-    std::string res;
+-    for ( string::const_iterator i = data.begin(); i != data.end(); ++i )
+-    {
+-        unsigned char c = static_cast<unsigned char>( *i );
+-        if ( c == ' ' || c == '*' || c == '-' || c == '.' || ( c >= '0' && c <= '9' )
+-             || ( c >= 'A' && c <= 'Z' ) || c == '_' || ( c >= 'a' && c <= 'z' ) )
+-        {
+-            res += static_cast<char>( c );
+-        }
+-        else
+-        {
+-            static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
+-                                          '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+-            res += '%';
+-            res += hex[c >> 4];
+-            res += hex[c & 0xF];
+-        }
+-    }
+-    return res;
+-}
+-
+-}
+-
+-string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
+-                                      const string& username, const string& password )
+-{
+-    /* This member function implements 'Google OAuth 2.0'
+-     *
+-     * The interaction is carried out by libcmis, with no web browser involved.
+-     *
+-     * Normal sequence (without 2FA) is:
+-     * 1) a get to activate login page
+-     *    receive first login page, html format
+-     * 2) subsequent post to sent email
+-     *    receive html page for password input
+-     * 3) subsequent post to send password
+-     *    receive html page for application consent
+-     * 4) subsequent post to send a consent for the application
+-     *    receive a single-use authorization code
+-     *    this code is returned as a string
+-     *
+-     * Sequence with 2FA is:
+-     * 1) a get to activate login page
+-     *    receive first login page, html format
+-     * 2) subsequent post to sent email
+-     *    receive html page for password input
+-     * 3) subsequent post to send password
+-     *    receive html page for pin input
+-     * 3b) subsequent post to send pin number
+-     *    receive html page for application consent
+-     * 4) subsequent post to send a consent for the application
+-     *    receive a single-use authorization code
+-     *    this code is returned as a string
+-     */
+-
+-    static const string CONTENT_TYPE( "application/x-www-form-urlencoded" );
+-    // STEP 1: get login page
+-    string res;
+-    try
+-    {
+-        // send the first get, receive the html login page
+-        res = session->httpGetRequest( authUrl )->getStream( )->str( );
+-    }
+-    catch ( const CurlException& )
+-    {
+-        return string( );
+-    }
+-
+-    // STEP 2: send email
+-
+-    string loginEmailPost, loginEmailLink;
+-    if ( !parseResponse( res.c_str( ), loginEmailPost, loginEmailLink ) )
+-        return string( );
+-
+-    loginEmailPost += "Email=";
+-    loginEmailPost += escapeForm( username );
+-
+-    istringstream loginEmailIs( loginEmailPost );
+-    string loginEmailRes;
+-    try
+-    {
+-        // send a post with user email, receive the html page for password input
+-        loginEmailRes = session->httpPostRequest ( loginEmailLink, loginEmailIs, CONTENT_TYPE )
+-                        ->getStream( )->str( );
+-    }
+-    catch ( const CurlException& )
+-    {
+-        return string( );
+-    }
+-
+-    // STEP 3: password page
+-
+-    string loginPasswdPost, loginPasswdLink;
+-    if ( !parseResponse( loginEmailRes.c_str( ), loginPasswdPost, loginPasswdLink ) )
+-        return string( );
+-
+-    loginPasswdPost += "Passwd=";
+-    loginPasswdPost += escapeForm( password );
+-
+-    istringstream loginPasswdIs( loginPasswdPost );
+-    string loginPasswdRes;
+-    try
+-    {
+-        // send a post with user password, receive the application consent page
+-        loginPasswdRes = session->httpPostRequest ( loginPasswdLink, loginPasswdIs, CONTENT_TYPE )
+-                        ->getStream( )->str( );
+-    }
+-    catch ( const CurlException& )
+-    {
+-        return string( );
+-    }
+-
+-    string approvalPost, approvalLink;
+-    if ( !parseResponse( loginPasswdRes. c_str( ), approvalPost, approvalLink) )
+-        return string( );
+-
+-    // when 2FA is enabled, link doesn't start with 'http'
+-    if ( approvalLink.compare(0, 4, "http") != 0 )
+-    {
+-        // STEP 3b: 2 Factor Authentication, pin code request
+-
+-        string loginChallengePost( approvalPost );
+-        string loginChallengeLink( approvalLink );
+-
+-        libcmis::OAuth2AuthCodeProvider fallbackProvider = libcmis::SessionFactory::getOAuth2AuthCodeProvider( );
+-        unique_ptr< char, void (*)( void * ) > pin{ fallbackProvider( "", "", "" ), free };
+-
+-        if( !pin )
+-        {
+-            // unset OAuth2AuthCode Provider to avoid showing pin request again in the HttpSession::oauth2Authenticate
+-            libcmis::SessionFactory::setOAuth2AuthCodeProvider( NULL );
+-            return string( );
+-        }
+-
+-        loginChallengeLink = "https://accounts.google.com" + loginChallengeLink;
+-        loginChallengePost += string( PIN_INPUT_NAME ) + "=";
+-        loginChallengePost += string( pin.get() );
+-
+-        istringstream loginChallengeIs( loginChallengePost );
+-        string loginChallengeRes;
+-        try
+-        {
+-            // send a post with pin, receive the application consent page
+-            loginChallengeRes = session->httpPostRequest ( loginChallengeLink, loginChallengeIs, CONTENT_TYPE )
+-                            ->getStream( )->str( );
+-        }
+-        catch ( const CurlException& )
+-        {
+-            return string( );
+-        }
+-
+-        approvalPost = string();
+-        approvalLink = string();
+-
+-        if ( !parseResponse( loginChallengeRes. c_str( ), approvalPost, approvalLink) )
+-            return string( );
+-    }
+-    else if( approvalLink.compare( "https://accounts.google.com/ServiceLoginAuth" ) == 0 )
+-    {
+-        // wrong password,
+-        // unset OAuth2AuthCode Provider to avoid showing pin request again in the HttpSession::oauth2Authenticate
+-        libcmis::SessionFactory::setOAuth2AuthCodeProvider( NULL );
+-        return string( );
+-    }
+-
+-    // STEP 4: allow libcmis to access google drive
+-    approvalPost += "submit_access=true";
+-
+-    istringstream approvalIs( approvalPost );
+-    string approvalRes;
+-    try
+-    {
+-        // send a post with application consent
+-        approvalRes = session->httpPostRequest ( approvalLink, approvalIs,
+-                            CONTENT_TYPE) ->getStream( )->str( );
+-    }
+-    catch ( const CurlException& e )
+-    {
+-        throw e.getCmisException( );
+-    }
+-
+-    // Take the authentication code from the text bar
+-    string code = parseCode( approvalRes.c_str( ) );
+-
+-    return code;
+-}
+-
+-string OAuth2Providers::OAuth2Onedrive( HttpSession* /*session*/, const string& /*authUrl*/,
+-                                      const string& /*username*/, const string& /*password*/ )
++string OAuth2Providers::OAuth2Dummy( HttpSession* /*session*/, const string& /*authUrl*/,
++                                     const string& /*username*/, const string& /*password*/ )
+ {
+     return string( );
+ }
+@@ -309,12 +116,8 @@ OAuth2Parser OAuth2Providers::getOAuth2Parser( const std::string& url )
+         // For Alfresco in the cloud, only match the hostname as there can be several
+         // binding URLs created with it.
+         return OAuth2Alfresco;
+-    else if ( boost::starts_with( url, "https://www.googleapis.com/drive/v2" ) )
+-        return OAuth2Gdrive;
+-    else if ( boost::starts_with( url, "https://graph.microsoft.com/v1.0" ) )
+-        return OAuth2Onedrive;
+ 
+-    return OAuth2Gdrive;
++    return OAuth2Dummy;
+ }
+ 
+ int OAuth2Providers::parseResponse ( const char* response, string& post, string& link )
+diff --git a/src/libcmis/oauth2-providers.hxx b/src/libcmis/oauth2-providers.hxx
+index 04dff53..eaeb1c4 100644
+--- a/src/libcmis/oauth2-providers.hxx
++++ b/src/libcmis/oauth2-providers.hxx
+@@ -39,12 +39,8 @@ typedef std::string ( *OAuth2Parser ) ( HttpSession* session, const std::string&
+ class OAuth2Providers
+ {
+     public :
+-        static std::string OAuth2Gdrive( HttpSession* session, const std::string& authUrl, 
++        static std::string OAuth2Dummy( HttpSession* session, const std::string& authUrl,
+                                        const std::string& username, const std::string& password );
+-
+-        static std::string OAuth2Onedrive( HttpSession* session, const std::string& authUrl, 
+-                                       const std::string& username, const std::string& password );
+-
+         static std::string OAuth2Alfresco( HttpSession* session, const std::string& authUrl, 
+                                        const std::string& username, const std::string& password );
+ 
+diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
+index 05ff45e..375cd2e 100644
+--- a/src/libcmis/onedrive-session.cxx
++++ b/src/libcmis/onedrive-session.cxx
+@@ -63,6 +63,45 @@ OneDriveSession::~OneDriveSession()
+ {
+ }
+ 
++void OneDriveSession::setOAuth2Data( libcmis::OAuth2DataPtr oauth2 )
++{
++    m_oauth2Handler = new OAuth2Handler( this, oauth2 );
++    m_oauth2Handler->setOAuth2Parser( OAuth2Providers::getOAuth2Parser( getBindingUrl( ) ) );
++
++    oauth2Authenticate( );
++}
++
++void OneDriveSession::oauth2Authenticate()
++{
++    // treat the supplied password as refresh token
++    if (!m_password.empty())
++    {
++        try
++        {
++            m_inOAuth2Authentication = true;
++
++            m_oauth2Handler->setRefreshToken(m_password);
++            // Try to get new access tokens using the stored refreshtoken
++            m_oauth2Handler->refresh();
++            m_inOAuth2Authentication = false;
++        }
++        catch (const CurlException &e)
++        {
++            m_inOAuth2Authentication = false;
++            // refresh token expired or invalid, trigger initial auth (that in turn will hit the fallback with copy'n'paste method)
++            BaseSession::oauth2Authenticate();
++        }
++    }
++    else
++    {
++        BaseSession::oauth2Authenticate();
++    }
++}
++
++string OneDriveSession::getRefreshToken() {
++    return HttpSession::getRefreshToken();
++}
++
+ libcmis::RepositoryPtr OneDriveSession::getRepository( )
+ {
+     // Return a dummy repository since OneDrive doesn't have that notion
+diff --git a/src/libcmis/onedrive-session.hxx b/src/libcmis/onedrive-session.hxx
+index f11fbaf..3c30c04 100644
+--- a/src/libcmis/onedrive-session.hxx
++++ b/src/libcmis/onedrive-session.hxx
+@@ -56,14 +56,20 @@ class OneDriveSession : public BaseSession
+         
+         virtual std::vector< libcmis::ObjectTypePtr > getBaseTypes( );
+ 
+-       libcmis::ObjectPtr getObjectFromJson( Json& jsonRes );
++        libcmis::ObjectPtr getObjectFromJson( Json& jsonRes );
+ 
+-       bool isAPathMatch( Json objectJson, std::string path );
++        bool isAPathMatch( Json objectJson, std::string path );
++
++        virtual std::string getRefreshToken();
+ 
+     private:
+         OneDriveSession( );
+         OneDriveSession( const OneDriveSession& copy ) = delete;
+         OneDriveSession& operator=( const OneDriveSession& copy ) = delete;
++
++        virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
++
++        void oauth2Authenticate( );
+ };
+ 
+ #endif /* _ONEDRIVE_SESSION_HXX_ */
+diff --git a/src/libcmis/session-factory.cxx b/src/libcmis/session-factory.cxx
+index e740afb..1222473 100644
+--- a/src/libcmis/session-factory.cxx
++++ b/src/libcmis/session-factory.cxx
+@@ -66,7 +66,7 @@ namespace libcmis
+         if ( !bindingUrl.empty( ) )
+         {
+             // Try the special cases based on the binding URL
+-            if ( bindingUrl == "https://www.googleapis.com/drive/v2" )
++            if ( bindingUrl == "https://www.googleapis.com/drive/v3" )
+             {
+                 session = new GDriveSession( bindingUrl, username, password,
+                                              oauth2, verbose );

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch
new file mode 100644
index 000000000000..9827bf7d9a5a
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch
@@ -0,0 +1,481 @@
+From fa5a130caff96c6f59085951f12f42f4e96a4f60 Mon Sep 17 00:00:00 2001
+From: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
+Date: Mon, 23 Aug 2021 10:49:09 +0100
+Subject: [PATCH] tdf#115643 make onedrive work again by switching to graph API
+
+the live SDK method had been deprecated quite a while ago and has been
+turned off a while back.
+Notes:
+While you can access and save existing files using the remote files
+dialog, creating new files or using "save as" requires using the
+LibreOffice open/save dialogs.
+Authentication is clunky: username and password you're asked when
+creating a new connection is not used at all for connecting, so only
+fill out a username to label your onedrive entry. Actual authentication
+is done in browser - copy'n'paste the URL from the dialog into the
+browser, login and approve access for LibreOffice (approving access only
+necessary once), then you get redirected to localhost, ignore that there
+is nothing to display. The important part is the code from the URL-bar.
+Copy and paste that into the LibreOffice dialog and LO can request an
+authentication token for API access.
+Testing this feature requires compiling with corresponding api-keys
+specified in configure/having an app registered with microsoft.
+---
+ src/libcmis/http-session.cxx        | 88 +++++++++++++++++++++++++++++
+ src/libcmis/http-session.hxx        |  3 +
+ src/libcmis/oauth2-handler.cxx      |  3 +-
+ src/libcmis/oauth2-providers.cxx    |  2 +-
+ src/libcmis/onedrive-document.cxx   | 17 +++---
+ src/libcmis/onedrive-folder.cxx     | 14 +++--
+ src/libcmis/onedrive-object.cxx     | 13 +++--
+ src/libcmis/onedrive-repository.cxx |  2 +-
+ src/libcmis/onedrive-session.cxx    | 51 +++++------------
+ src/libcmis/onedrive-utils.cxx      | 10 ++--
+ src/libcmis/session-factory.cxx     |  2 +-
+ 11 files changed, 138 insertions(+), 67 deletions(-)
+
+diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx
+index 2638482..227667e 100644
+--- a/src/libcmis/http-session.cxx
++++ b/src/libcmis/http-session.cxx
+@@ -293,6 +293,94 @@ libcmis::HttpResponsePtr HttpSession::httpGetRequest( string url )
+     return response;
+ }
+ 
++libcmis::HttpResponsePtr HttpSession::httpPatchRequest( string url, istream& is, vector< string > headers )
++{
++    checkOAuth2( url );
++
++    // Duplicate istream in case we need to retry
++    string isStr( static_cast< stringstream const&>( stringstream( ) << is.rdbuf( ) ).str( ) );
++
++    istringstream isOriginal( isStr ), isBackup( isStr );
++
++    // Reset the handle for the request
++    curl_easy_reset( m_curlHandle );
++    initProtocols( );
++
++    libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
++
++    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEFUNCTION, lcl_bufferData );
++    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEDATA, response->getData( ).get( ) );
++
++    curl_easy_setopt( m_curlHandle, CURLOPT_HEADERFUNCTION, &lcl_getHeaders );
++    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEHEADER, response.get() );
++
++    curl_easy_setopt( m_curlHandle, CURLOPT_MAXREDIRS, 20);
++
++    // Get the stream length
++    is.seekg( 0, ios::end );
++    long size = is.tellg( );
++    is.seekg( 0, ios::beg );
++    curl_easy_setopt( m_curlHandle, CURLOPT_INFILESIZE, size );
++    curl_easy_setopt( m_curlHandle, CURLOPT_READDATA, &isOriginal );
++    curl_easy_setopt( m_curlHandle, CURLOPT_READFUNCTION, lcl_readStream );
++    curl_easy_setopt( m_curlHandle, CURLOPT_UPLOAD, 1 );
++    curl_easy_setopt( m_curlHandle, CURLOPT_CUSTOMREQUEST, "PATCH" );
++    curl_easy_setopt( m_curlHandle, CURLOPT_IOCTLFUNCTION, lcl_ioctlStream );
++    curl_easy_setopt( m_curlHandle, CURLOPT_IOCTLDATA, &isOriginal );
++
++    // If we know for sure that 100-Continue won't be accepted,
++    // don't even try with it to save one HTTP request.
++    if ( m_no100Continue )
++        headers.push_back( "Expect:" );
++    try
++    {
++        httpRunRequest( url, headers );
++        response->getData( )->finish();
++    }
++    catch ( const CurlException& )
++    {
++        long status = getHttpStatus( );
++        /** If we had a HTTP 417 response, this is likely to be due to some
++            HTTP 1.0 proxy / server not accepting the "Expect: 100-continue"
++            header. Try to disable this header and try again.
++        */
++        if ( status == 417 && !m_no100Continue)
++        {
++            // Remember that we don't want 100-Continue for the future requests
++            m_no100Continue = true;
++            response = httpPutRequest( url, isBackup, headers );
++        }
++
++        // If the access token is expired, we get 401 error,
++        // Need to use the refresh token to get a new one.
++        if ( status == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
++        {
++
++            // Refresh the token
++            oauth2Refresh();
++
++            // Resend the query
++            try
++            {
++                // Avoid infinite recursive call
++                m_refreshedToken = true;
++                response = httpPutRequest( url, isBackup, headers );
++                m_refreshedToken = false;
++            }
++            catch (const CurlException&)
++            {
++                m_refreshedToken = false;
++                throw;
++            }
++        }
++        // Has tried but failed
++        if ( ( status != 417 || m_no100Continue ) &&
++             ( status != 401 || getRefreshToken( ).empty( ) || m_refreshedToken ) ) throw;
++    }
++    m_refreshedToken = false;
++    return response;
++}
++
+ libcmis::HttpResponsePtr HttpSession::httpPutRequest( string url, istream& is, vector< string > headers )
+ {
+     checkOAuth2( url );
+diff --git a/src/libcmis/http-session.hxx b/src/libcmis/http-session.hxx
+index 851d52d..29de64d 100644
+--- a/src/libcmis/http-session.hxx
++++ b/src/libcmis/http-session.hxx
+@@ -132,6 +132,9 @@ class HttpSession
+         virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
+ 
+         libcmis::HttpResponsePtr httpGetRequest( std::string url );
++        libcmis::HttpResponsePtr httpPatchRequest( std::string url,
++                                                 std::istream& is,
++                                                 std::vector< std::string > headers );
+         libcmis::HttpResponsePtr httpPutRequest( std::string url,
+                                                  std::istream& is,
+                                                  std::vector< std::string > headers );
+diff --git a/src/libcmis/oauth2-handler.cxx b/src/libcmis/oauth2-handler.cxx
+index a3320e3..842769f 100644
+--- a/src/libcmis/oauth2-handler.cxx
++++ b/src/libcmis/oauth2-handler.cxx
+@@ -91,8 +91,8 @@ void OAuth2Handler::fetchTokens( string authCode )
+     string post =
+         "code="              + authCode +
+         "&client_id="        + m_data->getClientId() +
+-        "&client_secret="    + m_data->getClientSecret() +
+         "&redirect_uri="     + m_data->getRedirectUri() +
++        "&scope="            + libcmis::escape( m_data->getScope() ) +
+         "&grant_type=authorization_code" ;
+ 
+     istringstream is( post );
+@@ -121,7 +121,6 @@ void OAuth2Handler::refresh( )
+     string post =
+         "refresh_token="     + m_refresh +
+         "&client_id="        + m_data->getClientId() +
+-        "&client_secret="    + m_data->getClientSecret() +
+         "&grant_type=refresh_token" ;
+ 
+     istringstream is( post );
+diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
+index 5a4926b..db6fbef 100644
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
+@@ -311,7 +311,7 @@ OAuth2Parser OAuth2Providers::getOAuth2Parser( const std::string& url )
+         return OAuth2Alfresco;
+     else if ( boost::starts_with( url, "https://www.googleapis.com/drive/v2" ) )
+         return OAuth2Gdrive;
+-    else if ( boost::starts_with( url, "https://apis.live.net/v5.0" ) )
++    else if ( boost::starts_with( url, "https://graph.microsoft.com/v1.0" ) )
+         return OAuth2Onedrive;
+ 
+     return OAuth2Gdrive;
+diff --git a/src/libcmis/onedrive-document.cxx b/src/libcmis/onedrive-document.cxx
+index f753b42..863a92f 100644
+--- a/src/libcmis/onedrive-document.cxx
++++ b/src/libcmis/onedrive-document.cxx
+@@ -73,7 +73,7 @@ boost::shared_ptr< istream > OneDriveDocument::getContentStream( string /*stream
+     boost::shared_ptr< istream > stream;
+     string streamUrl = getStringProperty( "source" );
+     if ( streamUrl.empty( ) )
+-        throw libcmis::Exception( "can not found stream url" );
++        throw libcmis::Exception( "could not find stream url" );
+ 
+     try
+     {
+@@ -89,15 +89,15 @@ boost::shared_ptr< istream > OneDriveDocument::getContentStream( string /*stream
+ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os, 
+                                          string /*contentType*/, 
+                                          string fileName, 
+-                                         bool /*overwrite*/ ) 
++                                         bool bReplaceExisting )
+ {
+     if ( !os.get( ) )
+         throw libcmis::Exception( "Missing stream" );
+-    
++
+     string metaUrl = getUrl( );
+ 
+     // Update file name meta information
+-    if ( !fileName.empty( ) && fileName != getContentFilename( ) )
++    if ( bReplaceExisting && !fileName.empty( ) && fileName != getContentFilename( ) )
+     {
+         Json metaJson;
+         Json fileJson( fileName.c_str( ) );
+@@ -108,7 +108,7 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
+         headers.push_back( "Content-Type: application/json" );
+         try
+         {
+-            getSession()->httpPutRequest( metaUrl, is, headers );
++            getSession()->httpPatchRequest( metaUrl, is, headers );
+         }
+         catch ( const CurlException& e )
+         {
+@@ -117,9 +117,9 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
+     }
+ 
+     fileName = libcmis::escape( getStringProperty( "cmis:name" ) );
+-    string putUrl = getSession( )->getBindingUrl( ) + "/" + 
+-                    getStringProperty( "cmis:parentId" ) + "/files/" +
+-                    fileName + "?overwrite=true";
++    string putUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" +
++                    getStringProperty( "cmis:parentId" ) + ":/" +
++                    fileName + ":/content";
+     
+     // Upload stream
+     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
+@@ -142,6 +142,7 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
+ libcmis::DocumentPtr OneDriveDocument::checkOut( )
+ {
+     // OneDrive doesn't have CheckOut, so just return the same document here
++    // TODO: no longer true - onedrive now has checkout/checkin
+     libcmis::ObjectPtr obj = getSession( )->getObject( getId( ) );
+     libcmis::DocumentPtr checkout =
+         boost::dynamic_pointer_cast< libcmis::Document > ( obj );
+diff --git a/src/libcmis/onedrive-folder.cxx b/src/libcmis/onedrive-folder.cxx
+index a9ae694..c1980c8 100644
+--- a/src/libcmis/onedrive-folder.cxx
++++ b/src/libcmis/onedrive-folder.cxx
+@@ -57,7 +57,9 @@ OneDriveFolder::~OneDriveFolder( )
+ vector< libcmis::ObjectPtr > OneDriveFolder::getChildren( ) 
+ {
+     vector< libcmis::ObjectPtr > children;
+-    string query = getSession( )->getBindingUrl( ) + "/" + getId( ) + "/files";
++    // TODO: limited to 200 items by default - to get more one would have to
++    // follow @odata.nextLink or change pagination size
++    string query = getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( ) + "/children";
+ 
+     string res;
+     try
+@@ -70,7 +72,7 @@ vector< libcmis::ObjectPtr > OneDriveFolder::getChildren( )
+     }
+ 
+     Json jsonRes = Json::parse( res );
+-    Json::JsonVector objs = jsonRes["data"].getList( );
++    Json::JsonVector objs = jsonRes["value"].getList( );
+     
+     // Create children objects from Json objects
+     for(unsigned int i = 0; i < objs.size(); i++)
+@@ -85,8 +87,7 @@ libcmis::FolderPtr OneDriveFolder::createFolder(
+     const PropertyPtrMap& properties ) 
+ {
+     Json propsJson = OneDriveUtils::toOneDriveJson( properties );
+-
+-    string uploadUrl = getSession( )->getBindingUrl( ) + "/" + getId( );
++    string uploadUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( ) + "/children";
+     
+     std::istringstream is( propsJson.toString( ) );
+     string response;
+@@ -126,9 +127,10 @@ libcmis::DocumentPtr OneDriveFolder::createDocument(
+         }
+     }
+ 
++    // TODO: limited to 4MB, larger uploads need dedicated UploadSession
+     fileName = libcmis::escape( fileName );
+-    string newDocUrl = getSession( )->getBindingUrl( ) + "/" +
+-                       getId( ) + "/files/" + fileName;
++    string newDocUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" +
++                       getId( ) + ":/" + fileName + ":/content";
+     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
+     vector< string > headers;
+     string res;
+diff --git a/src/libcmis/onedrive-object.cxx b/src/libcmis/onedrive-object.cxx
+index 976a97b..8deb591 100644
+--- a/src/libcmis/onedrive-object.cxx
++++ b/src/libcmis/onedrive-object.cxx
+@@ -65,7 +65,7 @@ void OneDriveObject::initializeFromJson ( Json json, string /*id*/, string /*nam
+     Json::JsonObject objs = json.getObjects( );
+     Json::JsonObject::iterator it;
+     PropertyPtr property;
+-    bool isFolder = json["type"].toString( ) == "folder";
++    bool isFolder = json["folder"].toString( ) != "";
+     for ( it = objs.begin( ); it != objs.end( ); ++it)
+     {
+         property.reset( new OneDriveProperty( it->first, it->second ) );
+@@ -74,7 +74,12 @@ void OneDriveObject::initializeFromJson ( Json json, string /*id*/, string /*nam
+         {
+             property.reset( new OneDriveProperty( "cmis:contentStreamFileName", it->second ) );
+             m_properties[ property->getPropertyType( )->getId()] = property;
+-        }
++        } else if ( it->first == "parentReference" ) {
++            if (it->second["id"].toString() != "") {
++                property.reset( new OneDriveProperty( "cmis:parentId", it->second["id"] ) );
++                m_properties[ property->getPropertyType( )->getId()] = property;
++            }
++       }
+     }
+ 
+     m_refreshTimestamp = time( NULL );
+@@ -122,7 +127,7 @@ void OneDriveObject::remove( bool /*allVersions*/ )
+ 
+ string OneDriveObject::getUrl( )
+ {
+-    return getSession( )->getBindingUrl( ) + "/" + getId( );
++    return getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( );
+ }
+ 
+ string OneDriveObject::getUploadUrl( )
+@@ -152,7 +157,7 @@ libcmis::ObjectPtr OneDriveObject::updateProperties(
+     {   
+         vector< string > headers;
+         headers.push_back( "Content-Type: application/json" );
+-        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
++        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
+     }
+     catch ( const CurlException& e )
+     {   
+diff --git a/src/libcmis/onedrive-repository.cxx b/src/libcmis/onedrive-repository.cxx
+index 3eaac9c..b01f5c2 100644
+--- a/src/libcmis/onedrive-repository.cxx
++++ b/src/libcmis/onedrive-repository.cxx
+@@ -35,7 +35,7 @@ OneDriveRepository::OneDriveRepository( ) :
+     m_description = "One Drive repository";
+     m_productName = "One Drive";
+     m_productVersion = "v5";
+-    m_rootId = "me/skydrive";
++    m_rootId = "/me/drive/root";
+  
+     m_capabilities[ ACL ] = "discover";
+     m_capabilities[ AllVersionsSearchable ] = "true";
+diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
+index a6652b4..05ff45e 100644
+--- a/src/libcmis/onedrive-session.cxx
++++ b/src/libcmis/onedrive-session.cxx
+@@ -74,7 +74,9 @@ libcmis::ObjectPtr OneDriveSession::getObject( string objectId )
+ {
+     // Run the http request to get the properties definition
+     string res;
+-    string objectLink = m_bindingUrl + "/" + objectId;
++    string objectLink = m_bindingUrl + "/me/drive/items/" + objectId;
++    if (objectId == getRootId())
++        objectLink = m_bindingUrl + objectId;
+     try
+     {
+         res = httpGetRequest( objectLink )->getStream()->str();
+@@ -90,12 +92,11 @@ libcmis::ObjectPtr OneDriveSession::getObject( string objectId )
+ libcmis::ObjectPtr OneDriveSession::getObjectFromJson( Json& jsonRes ) 
+ {
+     libcmis::ObjectPtr object;
+-    string kind = jsonRes["type"].toString( );
+-    if ( kind == "folder" || kind == "album" )
++    if ( jsonRes["folder"].toString() != "" )
+     {
+         object.reset( new OneDriveFolder( this, jsonRes ) );
+     }
+-    else if ( kind == "file" )
++    else if ( jsonRes["file"].toString() != "" )
+     {
+         object.reset( new OneDriveDocument( this, jsonRes ) );
+     }
+@@ -108,44 +109,18 @@ libcmis::ObjectPtr OneDriveSession::getObjectFromJson( Json& jsonRes )
+ 
+ libcmis::ObjectPtr OneDriveSession::getObjectByPath( string path )
+ {
+-    string id;
+-    if ( path == "/" )
+-    {
+-        id = "me/skydrive";
+-    }
+-    else
++    string res;
++    string objectQuery = m_bindingUrl + "/me/drive/root:" + libcmis::escape( path );
++    try
+     {
+-        path = "/SkyDrive" + path;
+-        size_t pos = path.rfind("/");
+-        string name = libcmis::escape( path.substr( pos + 1, path.size( ) ) );
+-        string res;
+-        string objectQuery = m_bindingUrl + "/me/skydrive/search?q=" + name;
+-        try
+-        {
+-            res = httpGetRequest( objectQuery )->getStream( )->str( );
+-        }
+-        catch ( const CurlException& e )
+-        {
+-            throw e.getCmisException( );
+-        }
+-        Json jsonRes = Json::parse( res );
+-        Json::JsonVector objs = jsonRes["data"].getList( );
+-        
+-        // Searching for a match in the path to the object
+-        for ( unsigned int i = 0; i < objs.size( ); i++ )
+-        {   
+-            if ( isAPathMatch( objs[i], path ) )
+-            {
+-                id = objs[i]["id"].toString( );
+-                break;
+-            }
+-        }
++        res = httpGetRequest( objectQuery )->getStream( )->str( );
+     }
+-    if ( id.empty( ) )
++    catch ( const CurlException& e )
+     {
+-        throw libcmis::Exception( "No file could be found" );
++        throw libcmis::Exception( "No file could be found for path " + path + ": " + e.what() );
+     }
+-    return getObject( id );
++    Json jsonRes = Json::parse( res );
++    return getObjectFromJson( jsonRes );
+ }
+ 
+ bool OneDriveSession::isAPathMatch( Json objectJson, string path )
+diff --git a/src/libcmis/onedrive-utils.cxx b/src/libcmis/onedrive-utils.cxx
+index dc6ec5d..17ed324 100644
+--- a/src/libcmis/onedrive-utils.cxx
++++ b/src/libcmis/onedrive-utils.cxx
+@@ -44,16 +44,16 @@ string OneDriveUtils::toCmisKey( const string& key )
+         convertedKey = "cmis:createdBy";
+     else if ( key == "description" )
+         convertedKey = "cmis:description";
+-    else if ( key == "created_time" )
++    else if ( key == "createdDateTime" )
+         convertedKey = "cmis:creationDate";
+-    else if ( key == "updated_time" )
++    else if ( key == "lastModifiedDateTime" )
+         convertedKey = "cmis:lastModificationDate";
+     else if ( key == "name" )
+         convertedKey = "cmis:name";
+     else if ( key == "size" )
+         convertedKey = "cmis:contentStreamLength";
+-    else if ( key == "parent_id" )
+-        convertedKey = "cmis:parentId";
++    else if ( key == "@microsoft.graph.downloadUrl" )
++        convertedKey = "source";
+     else convertedKey = key;
+     return convertedKey;
+ }
+@@ -75,8 +75,6 @@ string OneDriveUtils::toOneDriveKey( const string& key )
+         convertedKey = "name";
+     else if ( key == "cmis:contentStreamLength" )
+         convertedKey = "file_size";
+-    else if ( key == "cmis:parentId" )
+-        convertedKey = "parent_id";
+     else convertedKey = key;
+     return convertedKey;
+ }
+diff --git a/src/libcmis/session-factory.cxx b/src/libcmis/session-factory.cxx
+index ba55cd9..e740afb 100644
+--- a/src/libcmis/session-factory.cxx
++++ b/src/libcmis/session-factory.cxx
+@@ -71,7 +71,7 @@ namespace libcmis
+                 session = new GDriveSession( bindingUrl, username, password,
+                                              oauth2, verbose );
+             }
+-            else if ( bindingUrl == "https://apis.live.net/v5.0" )
++            else if ( bindingUrl == "https://graph.microsoft.com/v1.0" )
+             {
+                 session = new OneDriveSession( bindingUrl, username, password,
+                                                oauth2, verbose);

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch
new file mode 100644
index 000000000000..c2056d2aa239
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch
@@ -0,0 +1,722 @@
+From 8434965bed146a1ff543787336cf8d98092b42e6 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Sat, 30 Mar 2019 16:35:43 +0100
+Subject: [PATCH] gdrive-session: do not allow copying
+
+---
+ qa/libcmis/test-gdrive.cxx     | 167 +++++++++++++++++----------------
+ src/libcmis/gdrive-session.cxx |   5 -
+ src/libcmis/gdrive-session.hxx |   4 +-
+ 3 files changed, 87 insertions(+), 89 deletions(-)
+
+diff --git a/qa/libcmis/test-gdrive.cxx b/qa/libcmis/test-gdrive.cxx
+index ef9afd8..b04e230 100644
+--- a/qa/libcmis/test-gdrive.cxx
++++ b/qa/libcmis/test-gdrive.cxx
+@@ -30,6 +30,7 @@
+ #include <cppunit/TestFixture.h>
+ #include <cppunit/TestAssert.h>
+ 
++#include <memory>
+ #include <string>
+ 
+ #if defined __clang__
+@@ -82,6 +83,8 @@ namespace
+     }
+ }
+ 
++typedef std::unique_ptr<GDriveSession> GDriveSessionPtr;
++
+ class GDriveTest : public CppUnit::TestFixture
+ {
+     public:
+@@ -160,10 +163,10 @@ class GDriveTest : public CppUnit::TestFixture
+         CPPUNIT_TEST_SUITE_END( );
+ 
+     private:
+-        GDriveSession getTestSession( string username, string password, bool with2FA = false );
++        GDriveSessionPtr getTestSession( string username, string password, bool with2FA = false );
+ };
+ 
+-GDriveSession GDriveTest::getTestSession( string username, string password, bool with2FA )
++GDriveSessionPtr GDriveTest::getTestSession( string username, string password, bool with2FA )
+ {
+     libcmis::OAuth2DataPtr oauth2(
+         new libcmis::OAuth2Data( AUTH_URL, TOKEN_URL, SCOPE,
+@@ -207,12 +210,12 @@ GDriveSession GDriveTest::getTestSession( string username, string password, bool
+     curl_mockup_addResponse ( TOKEN_URL.c_str( ), empty.c_str( ), "POST",
+                               DATA_DIR "/gdrive/token-response.json", 200, true );
+ 
+-    return GDriveSession( BASE_URL, username, password, oauth2, false );
++    return GDriveSessionPtr( new GDriveSession( BASE_URL, username, password, oauth2, false ) );
+ }
+ 
+ void GDriveTest::sessionAuthenticationTest( )
+ {
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string empty;
+ 
+     // Check authentication request for email
+@@ -259,18 +262,18 @@ void GDriveTest::sessionAuthenticationTest( )
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong access token",
+          string ( "mock-access-token" ),
+-         session.m_oauth2Handler->getAccessToken( ));
++         session->m_oauth2Handler->getAccessToken( ));
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong refresh token",
+         string ("mock-refresh-token"),
+-        session.m_oauth2Handler->getRefreshToken( ));
++        session->m_oauth2Handler->getRefreshToken( ));
+ }
+ 
+ void GDriveTest::sessionAuthenticationTestWith2FA( )
+ {
+     libcmis::SessionFactory::setOAuth2AuthCodeProvider( lcl_authCodeFallback );
+ 
+-    GDriveSession session = getTestSession( USERNAME2, PASSWORD2, true );
++    GDriveSessionPtr session = getTestSession( USERNAME2, PASSWORD2, true );
+     string empty;
+ 
+     // Check authentication request for email
+@@ -327,11 +330,11 @@ void GDriveTest::sessionAuthenticationTestWith2FA( )
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong access token",
+          string ( "mock-access-token" ),
+-         session.m_oauth2Handler->getAccessToken( ));
++         session->m_oauth2Handler->getAccessToken( ));
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong refresh token",
+         string ("mock-refresh-token"),
+-        session.m_oauth2Handler->getRefreshToken( ));
++        session->m_oauth2Handler->getRefreshToken( ));
+ }
+ 
+ void GDriveTest::sessionExpiryTokenGetTest( )
+@@ -340,7 +343,7 @@ void GDriveTest::sessionExpiryTokenGetTest( )
+     // We need to use the refresh key to get a new one.
+ 
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     curl_mockup_reset( );
+     static const string objectId("aFileId");
+@@ -354,17 +357,17 @@ void GDriveTest::sessionExpiryTokenGetTest( )
+     try
+     {
+         // GET expires, need to refresh then GET again
+-        libcmis::ObjectPtr obj = session.getObject( objectId );
++        libcmis::ObjectPtr obj = session->getObject( objectId );
+     }
+     catch ( ... )
+     {
+-        if ( session.getHttpStatus( ) == 401 )
++        if ( session->getHttpStatus( ) == 401 )
+         {
+             // Check if access token is refreshed
+             CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                    "wrong access token",
+                    string ( "new-access-token" ),
+-                   session.m_oauth2Handler->getAccessToken( ) );
++                   session->m_oauth2Handler->getAccessToken( ) );
+         }
+     }
+ }
+@@ -375,7 +378,7 @@ void GDriveTest::sessionExpiryTokenPostTest( )
+     // We need to use the refresh key to get a new one.
+ 
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     curl_mockup_reset( );
+     static const string folderId("aFileId");
+@@ -392,7 +395,7 @@ void GDriveTest::sessionExpiryTokenPostTest( )
+     // refresh and then POST again
+     curl_mockup_addResponse( metaUrl.c_str( ), "",
+                                "POST", "", 401, false );
+-    libcmis::FolderPtr parent = session.getFolder( folderId );
++    libcmis::FolderPtr parent = session->getFolder( folderId );
+ 
+     try
+     {
+@@ -402,13 +405,13 @@ void GDriveTest::sessionExpiryTokenPostTest( )
+     }
+     catch ( ... )
+     {
+-        if ( session.getHttpStatus( ) == 401 )
++        if ( session->getHttpStatus( ) == 401 )
+         {
+             // Check if access token is refreshed
+             CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                    "wrong access token",
+                    string ( "new-access-token" ),
+-                   session.m_oauth2Handler->getAccessToken( ) );
++                   session->m_oauth2Handler->getAccessToken( ) );
+         }
+     }
+ }
+@@ -419,7 +422,7 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
+     // We need to use the refresh key to get a new one.
+ 
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     curl_mockup_reset( );
+     static const string objectId("aFileId");
+@@ -433,9 +436,9 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
+     // 401 response, token is expired
+     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 401, false);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     try
+     {
+@@ -444,13 +447,13 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
+     }
+     catch ( ... )
+     {
+-        if ( session.getHttpStatus( ) == 401 )
++        if ( session->getHttpStatus( ) == 401 )
+         {
+             // Check if access token is refreshed
+             CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                    "wrong access token",
+                    string ( "new-access-token" ),
+-                   session.m_oauth2Handler->getAccessToken( ) );
++                   session->m_oauth2Handler->getAccessToken( ) );
+             const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
+             CPPUNIT_ASSERT_MESSAGE( "Delete request not sent", deleteRequest );
+             curl_mockup_HttpRequest_free( deleteRequest );
+@@ -465,7 +468,7 @@ void GDriveTest::sessionExpiryTokenPutTest( )
+     // We need to use the refresh key to get a new one.
+ 
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     curl_mockup_reset( );
+     static const string objectId("aFileId");
+@@ -480,7 +483,7 @@ void GDriveTest::sessionExpiryTokenPutTest( )
+     // 401 response, token is expired
+     curl_mockup_addResponse( url.c_str( ),"", "PUT", "", 401, false );
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     try
+     {
+@@ -489,13 +492,13 @@ void GDriveTest::sessionExpiryTokenPutTest( )
+     }
+     catch ( ... )
+     {
+-        if ( session.getHttpStatus( ) == 401 )
++        if ( session->getHttpStatus( ) == 401 )
+         {
+             // Check if access token is refreshed
+             CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                    "wrong access token",
+                    string ( "new-access-token" ),
+-                   session.m_oauth2Handler->getAccessToken( ) );
++                   session->m_oauth2Handler->getAccessToken( ) );
+         }
+     }
+ }
+@@ -511,12 +514,12 @@ void GDriveTest::getDocumentTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/files/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+     // Check if we got the document object.
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
+@@ -546,7 +549,7 @@ void GDriveTest::getFolderTest( )
+ {
+     curl_mockup_reset( );
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     static const string folderId( "aFolderId" );
+     static const string parentId( "parentID" );
+     string url = BASE_URL + "/files/" + folderId;
+@@ -557,7 +560,7 @@ void GDriveTest::getFolderTest( )
+     curl_mockup_addResponse( parentUrl.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/folder.json", 200, true);
+     // Check if we got the Folder object.
+-    libcmis::FolderPtr folder = session.getFolder( folderId );
++    libcmis::FolderPtr folder = session->getFolder( folderId );
+     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
+             NULL != folder );
+ 
+@@ -578,7 +581,7 @@ void GDriveTest::getFolderTest( )
+ void GDriveTest::getDocumentParentsTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     static const string parentId( "aFolderId" );
+@@ -594,7 +597,7 @@ void GDriveTest::getDocumentParentsTest( )
+     curl_mockup_addResponse( parent2Url.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/folder2.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( "aFileId" );
++    libcmis::ObjectPtr object = session->getObject( "aFileId" );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     CPPUNIT_ASSERT_MESSAGE( "Document expected", document != NULL );
+@@ -610,7 +613,7 @@ void GDriveTest::getDocumentParentsTest( )
+ void GDriveTest::getContentStreamTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     string url = BASE_URL + "/files/" + documentId;
+@@ -620,7 +623,7 @@ void GDriveTest::getContentStreamTest( )
+     string downloadUrl = "https://downloadLink";
+     curl_mockup_addResponse( downloadUrl.c_str( ), "", "GET", expectedContent.c_str( ), 0, false );
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     try
+@@ -642,7 +645,7 @@ void GDriveTest::getContentStreamTest( )
+ void GDriveTest::setContentStreamTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string documentId( "aFileId" );
+     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
+@@ -652,7 +655,7 @@ void GDriveTest::setContentStreamTest( )
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     curl_mockup_addResponse( url.c_str( ), "",
+@@ -687,7 +690,7 @@ void GDriveTest::setContentStreamGdocTest( )
+ {
+ 
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string documentId( "aFileId" );
+     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
+@@ -697,7 +700,7 @@ void GDriveTest::setContentStreamGdocTest( )
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     curl_mockup_addResponse( url.c_str( ), "convert=true",
+@@ -728,7 +731,7 @@ void GDriveTest::getChildrenTest( )
+ {
+     curl_mockup_reset( );
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     static const string folderId ("aFolderId");
+     string url = BASE_URL + "/files/" + folderId;
+     curl_mockup_addResponse( url.c_str( ), "",
+@@ -742,7 +745,7 @@ void GDriveTest::getChildrenTest( )
+     curl_mockup_addResponse( urlChildDocument.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( folderId );
++    libcmis::ObjectPtr obj = session->getObject( folderId );
+ 
+     // Check if we got the Folder object.
+     libcmis::FolderPtr folder = boost::dynamic_pointer_cast< libcmis::Folder >( obj );
+@@ -777,10 +780,10 @@ void GDriveTest::getTypeTest( )
+ {
+     curl_mockup_reset( );
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     string expectedId( "cmis:document" );
+-    libcmis::ObjectTypePtr actual = session.getType( expectedId );
++    libcmis::ObjectTypePtr actual = session->getType( expectedId );
+ 
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Id for fetched type", expectedId, actual->getId( ) );
+ }
+@@ -789,8 +792,8 @@ void GDriveTest::getRepositoriesTest( )
+ {
+      curl_mockup_reset( );
+ 
+-     GDriveSession session = getTestSession( USERNAME, PASSWORD );
+-     vector< libcmis::RepositoryPtr > actual = session.getRepositories( );
++     GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
++     vector< libcmis::RepositoryPtr > actual = session->getRepositories( );
+ 
+      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong number of repositories", size_t( 1 ),
+                                    actual.size( ) );
+@@ -803,11 +806,11 @@ void GDriveTest::getObjectTest()
+ {
+     static const string objectId ("aFileId");
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/files/" + objectId;
+     curl_mockup_addResponse ( url.c_str( ), "",
+                               "GET", DATA_DIR "/gdrive/gdoc-file.json", 200, true);
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+     boost::shared_ptr<GDriveObject> obj = boost::dynamic_pointer_cast
+                                             <GDriveObject>(object);
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id", objectId,
+@@ -816,12 +819,12 @@ void GDriveTest::getObjectTest()
+ 
+ void GDriveTest::getObjectByPathRootTest()
+ {
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string rootUrl = BASE_URL + "/files/root";
+     curl_mockup_addResponse ( rootUrl.c_str( ), "",
+                               "GET", DATA_DIR "/gdrive/folder.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObjectByPath( "/" );
++    libcmis::ObjectPtr object = session->getObjectByPath( "/" );
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id",
+                                   string("testFolder"), object->getName( ) );
+ }
+@@ -829,7 +832,7 @@ void GDriveTest::getObjectByPathRootTest()
+ void GDriveTest::getObjectByPathTest()
+ {
+     // Mockup setup
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string rootChildUrl = BASE_URL + "/files/root/children/";
+     curl_mockup_addResponse ( rootChildUrl.c_str( ), "q=title+=+'GDrive File'",
+                               "GET", DATA_DIR "/gdrive/root_child_search.json", 200, true );
+@@ -839,7 +842,7 @@ void GDriveTest::getObjectByPathTest()
+                              "GET", DATA_DIR "/gdrive/document.json", 200, true );
+ 
+     // Tested method
+-    libcmis::ObjectPtr object = session.getObjectByPath( "/GDrive File" );
++    libcmis::ObjectPtr object = session->getObjectByPath( "/GDrive File" );
+ 
+     // Check the result
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object",
+@@ -849,7 +852,7 @@ void GDriveTest::getObjectByPathTest()
+ void GDriveTest::getObjectByPathMissingTest()
+ {
+     // Mockup setup
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string rootChildUrl = BASE_URL + "/files/root/children/";
+     curl_mockup_addResponse ( rootChildUrl.c_str( ), "q=title+=+'GDrive File'",
+                               "GET", DATA_DIR "/gdrive/root_child_missing.json", 200, true );
+@@ -857,7 +860,7 @@ void GDriveTest::getObjectByPathMissingTest()
+     // Tested method
+     try
+     {
+-        libcmis::ObjectPtr object = session.getObjectByPath( "/GDrive File" );
++        libcmis::ObjectPtr object = session->getObjectByPath( "/GDrive File" );
+         CPPUNIT_FAIL( "objectNotFound exception expected" );
+     }
+     catch ( libcmis::Exception& e )
+@@ -872,12 +875,12 @@ void GDriveTest::getDocumentAllowableActionsTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/files/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
+ 
+@@ -896,12 +899,12 @@ void GDriveTest::getFolderAllowableActionsTest( )
+     curl_mockup_reset( );
+     static const string folderId ("aFolderId");
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/files/" + folderId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/folder.json", 200, true);
+ 
+-    libcmis::FolderPtr folder = session.getFolder( folderId );
++    libcmis::FolderPtr folder = session->getFolder( folderId );
+ 
+     boost::shared_ptr< libcmis::AllowableActions > actions = folder->getAllowableActions( );
+ 
+@@ -917,14 +920,14 @@ void GDriveTest::getFolderAllowableActionsTest( )
+ void GDriveTest::checkOutTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     string url = BASE_URL + "/files/" + documentId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+     libcmis::DocumentPtr checkout = document->checkOut( );
+     CPPUNIT_ASSERT_MESSAGE( "CheckOut failed", NULL != checkout );
+@@ -933,7 +936,7 @@ void GDriveTest::checkOutTest( )
+ void GDriveTest::checkInTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string documentId( "aFileId" );
+     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
+@@ -943,7 +946,7 @@ void GDriveTest::checkInTest( )
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     curl_mockup_addResponse( url.c_str( ), "",
+@@ -962,7 +965,7 @@ void GDriveTest::checkInTest( )
+ void GDriveTest::deleteTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string objectId( "aFileId" );
+ 
+@@ -971,7 +974,7 @@ void GDriveTest::deleteTest( )
+                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
+     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 204, false);
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     object->remove( );
+     const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
+@@ -982,7 +985,7 @@ void GDriveTest::deleteTest( )
+ void GDriveTest::moveTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string objectId( "aFileId" );
+     const string sourceId( "aFolderId" );
+     const string desId( "aNewFolderId" );
+@@ -999,10 +1002,10 @@ void GDriveTest::moveTest( )
+     curl_mockup_addResponse( desUrl.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/folder2.json", 200, true );
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+-    libcmis::FolderPtr source = session.getFolder( sourceId );
+-    libcmis::FolderPtr destination = session.getFolder( desId );
++    libcmis::FolderPtr source = session->getFolder( sourceId );
++    libcmis::FolderPtr destination = session->getFolder( desId );
+ 
+     object->move( source, destination );
+     const char* moveRequest = curl_mockup_getRequestBody( url.c_str( ), "", "PUT" );
+@@ -1015,7 +1018,7 @@ void GDriveTest::moveTest( )
+ void GDriveTest::createDocumentTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string documentId( "aFileId" );
+     const string folderId( "aFolderId" );
+ 
+@@ -1034,7 +1037,7 @@ void GDriveTest::createDocumentTest( )
+     curl_mockup_addResponse( documentUrl.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
+ 
+-    libcmis::FolderPtr parent = session.getFolder( folderId );
++    libcmis::FolderPtr parent = session->getFolder( folderId );
+ 
+     try
+     {
+@@ -1067,7 +1070,7 @@ void GDriveTest::createDocumentTest( )
+ void GDriveTest::createFolderTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string folderId( "aFolderId" );
+ 
+     const string folderUrl = BASE_URL + "/files/" + folderId;
+@@ -1077,7 +1080,7 @@ void GDriveTest::createFolderTest( )
+                                "GET", DATA_DIR "/gdrive/folder.json", 200, true );
+     curl_mockup_addResponse( metaUrl.c_str( ), "",
+                                "POST", DATA_DIR "/gdrive/folder2.json", 200, true );
+-    libcmis::FolderPtr parent = session.getFolder( folderId );
++    libcmis::FolderPtr parent = session->getFolder( folderId );
+     try
+     {
+         PropertyPtrMap properties;
+@@ -1106,7 +1109,7 @@ void GDriveTest::createFolderTest( )
+ void GDriveTest::removeTreeTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string folderId( "aFolderId" );
+ 
+     const string folderUrl = BASE_URL + "/files/" + folderId;
+@@ -1116,7 +1119,7 @@ void GDriveTest::removeTreeTest( )
+                                "GET", DATA_DIR "/gdrive/folder.json", 200, true );
+     curl_mockup_addResponse( trashUrl.c_str( ), "",
+                                "POST", "", 200, false );
+-    libcmis::FolderPtr folder = session.getFolder( folderId );
++    libcmis::FolderPtr folder = session->getFolder( folderId );
+ 
+     // just make sure it doesn't crash
+     folder->removeTree( );
+@@ -1125,13 +1128,13 @@ void GDriveTest::removeTreeTest( )
+ void GDriveTest::getContentStreamWithRenditionsTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     string url = BASE_URL + "/files/" + documentId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     // pdf stream
+@@ -1197,7 +1200,7 @@ void GDriveTest::getContentStreamWithRenditionsTest( )
+ void GDriveTest::updatePropertiesTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string documentId( "aFileId" );
+     const string documentUrl = BASE_URL + "/files/" + documentId;
+     curl_mockup_addResponse( documentUrl.c_str( ), "",
+@@ -1209,7 +1212,7 @@ void GDriveTest::updatePropertiesTest( )
+     // Values for the test
+     string propertyName( "cmis:name" );
+     string expectedValue( "New Title" );
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+ 
+     // Fill the map of properties to change
+     PropertyPtrMap newProperties;
+@@ -1264,16 +1267,16 @@ void GDriveTest::propertyCopyTest( )
+ void GDriveTest::getRefreshTokenTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Refresh token does not match",
+                                   string ("mock-refresh-token"),
+-                                  session.getRefreshToken( ) );
++                                  session->getRefreshToken( ) );
+ }
+ 
+ void GDriveTest::getThumbnailUrlTest( )
+ {
+     curl_mockup_reset( );
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string documentId( "aFileId" );
+ 
+     const string documentUrl = BASE_URL + "/files/" + documentId;
+@@ -1281,7 +1284,7 @@ void GDriveTest::getThumbnailUrlTest( )
+     curl_mockup_addResponse( documentUrl.c_str( ), "",
+                                "GET", DATA_DIR "/gdrive/document.json", 200, true );
+ 
+-    libcmis::ObjectPtr document = session.getObject( documentId );
++    libcmis::ObjectPtr document = session->getObject( documentId );
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Thumbnail URL does not match",
+                                    string ("https://aThumbnailLink"),
+                                    document->getThumbnailUrl( ) );
+@@ -1293,7 +1296,7 @@ void GDriveTest::getAllVersionsTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    GDriveSession session = getTestSession( USERNAME, PASSWORD );
++    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/files/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
+@@ -1301,7 +1304,7 @@ void GDriveTest::getAllVersionsTest( )
+     curl_mockup_addResponse( revisionUrl.c_str( ), "",
+                              "GET", DATA_DIR "/gdrive/allVersions.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
+ 
+diff --git a/src/libcmis/gdrive-session.cxx b/src/libcmis/gdrive-session.cxx
+index c31637a..87bb160 100644
+--- a/src/libcmis/gdrive-session.cxx
++++ b/src/libcmis/gdrive-session.cxx
+@@ -56,11 +56,6 @@ GDriveSession::GDriveSession ( string baseUrl,
+     }
+ }
+ 
+-GDriveSession::GDriveSession( const GDriveSession& copy ) :
+-    BaseSession( copy )
+-{
+-}
+-
+ GDriveSession::GDriveSession() :
+     BaseSession()
+ {
+diff --git a/src/libcmis/gdrive-session.hxx b/src/libcmis/gdrive-session.hxx
+index 6fd0777..f60ff6c 100644
+--- a/src/libcmis/gdrive-session.hxx
++++ b/src/libcmis/gdrive-session.hxx
+@@ -41,8 +41,6 @@ class GDriveSession : public BaseSession
+                        libcmis::OAuth2DataPtr oauth2,
+                        bool verbose = false );
+ 
+-        GDriveSession( const GDriveSession& copy );
+-
+         ~GDriveSession ( );
+ 
+         virtual libcmis::RepositoryPtr getRepository( );
+@@ -59,6 +57,8 @@ class GDriveSession : public BaseSession
+ 
+     private:
+         GDriveSession( );
++        GDriveSession( const GDriveSession& copy ) = delete;
++        GDriveSession& operator=( const GDriveSession& copy ) = delete;
+ };
+ 
+ #endif /* _GDRIVE_SESSION_HXX_ */

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch
new file mode 100644
index 000000000000..d14f36830f7b
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch
@@ -0,0 +1,430 @@
+From d55b04376e509997b01e68bcacebd4cad2ec4002 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Sat, 30 Mar 2019 16:18:40 +0100
+Subject: [PATCH] onedrive-session: do not allow copying
+
+---
+ qa/libcmis/test-onedrive.cxx     | 102 ++++++++++++++++---------------
+ src/libcmis/onedrive-session.cxx |   5 --
+ src/libcmis/onedrive-session.hxx |   4 +-
+ 3 files changed, 54 insertions(+), 57 deletions(-)
+
+diff --git a/qa/libcmis/test-onedrive.cxx b/qa/libcmis/test-onedrive.cxx
+index 1df1b30..b15edd1 100644
+--- a/qa/libcmis/test-onedrive.cxx
++++ b/qa/libcmis/test-onedrive.cxx
+@@ -68,6 +68,8 @@ static const string SCOPE ( "https://scope/url" );
+ static const string REDIRECT_URI ("redirect:uri" );
+ static const string BASE_URL ( "https://base/url" );
+ 
++typedef std::unique_ptr<OneDriveSession> OneDriveSessionPtr;
++
+ class OneDriveTest : public CppUnit::TestFixture
+ {
+     public:
+@@ -116,10 +118,10 @@ class OneDriveTest : public CppUnit::TestFixture
+         CPPUNIT_TEST_SUITE_END( );
+ 
+     private:
+-        OneDriveSession getTestSession( string username, string password );
++        OneDriveSessionPtr getTestSession( string username, string password );
+ };
+ 
+-OneDriveSession OneDriveTest::getTestSession( string username, string password )
++OneDriveSessionPtr OneDriveTest::getTestSession( string username, string password )
+ {
+     libcmis::OAuth2DataPtr oauth2(
+         new libcmis::OAuth2Data( AUTH_URL, TOKEN_URL, SCOPE,
+@@ -154,12 +156,12 @@ OneDriveSession OneDriveTest::getTestSession( string username, string password )
+     curl_mockup_addResponse ( TOKEN_URL.c_str( ), empty.c_str( ), "POST",
+                               DATA_DIR "/onedrive/token-response.json", 200, true );
+ 
+-    return OneDriveSession( BASE_URL, username, password, oauth2, false );
++    return OneDriveSessionPtr( new OneDriveSession( BASE_URL, username, password, oauth2, false ) );
+ }
+ 
+ void OneDriveTest::sessionAuthenticationTest( )
+ {
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string empty;
+ 
+     // Check token request
+@@ -179,11 +181,11 @@ void OneDriveTest::sessionAuthenticationTest( )
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong access token",
+          string ( "mock-access-token" ),
+-         session.m_oauth2Handler->getAccessToken( ));
++         session->m_oauth2Handler->getAccessToken( ));
+     CPPUNIT_ASSERT_EQUAL_MESSAGE(
+         "Wrong refresh token",
+         string ("mock-refresh-token"),
+-        session.m_oauth2Handler->getRefreshToken( ));
++        session->m_oauth2Handler->getRefreshToken( ));
+ }
+ 
+ void OneDriveTest::sessionExpiryTokenGetTest( )
+@@ -192,7 +194,7 @@ void OneDriveTest::sessionExpiryTokenGetTest( )
+     // We need to use the refresh key to get a new one.
+ 
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     curl_mockup_reset( );
+     static const string objectId("aFileId");
+@@ -206,17 +208,17 @@ void OneDriveTest::sessionExpiryTokenGetTest( )
+     try
+     {
+         // GET expires, need to refresh then GET again
+-        libcmis::ObjectPtr obj = session.getObject( objectId );
++        libcmis::ObjectPtr obj = session->getObject( objectId );
+     }
+     catch ( ... )
+     {
+-        if ( session.getHttpStatus( ) == 401 )
++        if ( session->getHttpStatus( ) == 401 )
+         {
+             // Check if access token is refreshed
+             CPPUNIT_ASSERT_EQUAL_MESSAGE(
+                    "wrong access token",
+                    string ( "new-access-token" ),
+-                   session.m_oauth2Handler->getAccessToken( ) );
++                   session->m_oauth2Handler->getAccessToken( ) );
+         }
+     }
+ }
+@@ -225,8 +227,8 @@ void OneDriveTest::getRepositoriesTest( )
+ {
+      curl_mockup_reset( );
+ 
+-     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
+-     vector< libcmis::RepositoryPtr > actual = session.getRepositories( );
++     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
++     vector< libcmis::RepositoryPtr > actual = session->getRepositories( );
+ 
+      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong number of repositories", size_t( 1 ),
+                                    actual.size( ) );
+@@ -239,9 +241,9 @@ void OneDriveTest::getObjectTypeDocumentTest()
+ {
+      curl_mockup_reset( );
+ 
+-     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+-     libcmis::ObjectTypePtr actual = session.getType("cmis:document");
++     libcmis::ObjectTypePtr actual = session->getType("cmis:document");
+ 
+      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong type ID", string("cmis:document"),
+                                    actual->getId() );
+@@ -282,9 +284,9 @@ void OneDriveTest::getObjectTypeFolderTest()
+ {
+      curl_mockup_reset( );
+ 
+-     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+-     libcmis::ObjectTypePtr actual = session.getType("cmis:folder");
++     libcmis::ObjectTypePtr actual = session->getType("cmis:folder");
+ 
+      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong type ID", string("cmis:folder"),
+                                    actual->getId() );
+@@ -322,11 +324,11 @@ void OneDriveTest::getObjectTest()
+ {
+     static const string objectId ("aFileId");
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/" + objectId;
+     curl_mockup_addResponse ( url.c_str( ), "",
+                               "GET", DATA_DIR "/onedrive/file.json", 200, true);
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+     boost::shared_ptr<OneDriveObject> obj = boost::dynamic_pointer_cast
+                                             <OneDriveObject>( object );
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id", objectId,
+@@ -338,12 +340,12 @@ void OneDriveTest::filePropertyTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong creation date",
+                                    string ( "2014-06-09T08:24:04+0000" ),
+@@ -365,7 +367,7 @@ void OneDriveTest::filePropertyTest( )
+ void OneDriveTest::deleteTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string objectId( "aFileId" );
+ 
+@@ -374,7 +376,7 @@ void OneDriveTest::deleteTest( )
+                                "GET", DATA_DIR "/onedrive/file.json", 200, true);
+     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 204, false);
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     object->remove( );
+     const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
+@@ -385,7 +387,7 @@ void OneDriveTest::deleteTest( )
+ void OneDriveTest::updatePropertiesTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string objectId( "aFileId" );
+     const string newObjectId( "aNewFileId" );
+ 
+@@ -399,8 +401,8 @@ void OneDriveTest::updatePropertiesTest( )
+     curl_mockup_addResponse( objectUrl.c_str( ), "",
+                                "PUT", DATA_DIR "/onedrive/updated-file.json", 200, true );
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
+-    libcmis::ObjectPtr newObject = session.getObject( newObjectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
++    libcmis::ObjectPtr newObject = session->getObject( newObjectId );
+ 
+     object->updateProperties( newObject->getProperties( ) );
+ 
+@@ -424,12 +426,12 @@ void OneDriveTest::getFileAllowableActionsTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     boost::shared_ptr< libcmis::AllowableActions > actions = object->getAllowableActions( );
+ 
+@@ -446,12 +448,12 @@ void OneDriveTest::getFolderAllowableActionsTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFolderId");
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/folder.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
+ 
+     boost::shared_ptr< libcmis::AllowableActions > actions = object->getAllowableActions( );
+ 
+@@ -468,7 +470,7 @@ void OneDriveTest::getFolderTest( )
+ {
+     curl_mockup_reset( );
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     static const string folderId( "aFolderId" );
+     static const string parentId( "aParentId" );
+     string url = BASE_URL + "/" + folderId;
+@@ -480,7 +482,7 @@ void OneDriveTest::getFolderTest( )
+     curl_mockup_addResponse( parentUrl.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/parent-folder.json", 200, true);
+ 
+-    libcmis::FolderPtr folder = session.getFolder( folderId );
++    libcmis::FolderPtr folder = session->getFolder( folderId );
+     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
+             NULL != folder );
+ 
+@@ -499,15 +501,15 @@ void OneDriveTest::getChildrenTest( )
+ {
+     curl_mockup_reset( );
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     static const string folderId ("aFolderId");
+     string url = BASE_URL + "/" + folderId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/folder.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( folderId );
++    libcmis::ObjectPtr obj = session->getObject( folderId );
+ 
+-    libcmis::FolderPtr folder = session.getFolder( folderId );
++    libcmis::FolderPtr folder = session->getFolder( folderId );
+     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
+             NULL != folder );
+ 
+@@ -536,7 +538,7 @@ void OneDriveTest::getChildrenTest( )
+ void OneDriveTest::moveTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string objectId( "aFileId" );
+     const string sourceId( "aFolderId" );
+     const string desId( "aParentId" );
+@@ -554,9 +556,9 @@ void OneDriveTest::moveTest( )
+     curl_mockup_addResponse( sourceUrl.c_str( ), "",
+                                "GET", DATA_DIR "/onedrive/folder.json", 200, true );
+ 
+-    libcmis::ObjectPtr object = session.getObject( objectId );
+-    libcmis::FolderPtr source = session.getFolder( sourceId );
+-    libcmis::FolderPtr destination = session.getFolder( desId );
++    libcmis::ObjectPtr object = session->getObject( objectId );
++    libcmis::FolderPtr source = session->getFolder( sourceId );
++    libcmis::FolderPtr destination = session->getFolder( desId );
+ 
+     object->move( source, destination );
+     const char* moveRequest = curl_mockup_getRequestBody( url.c_str( ), "method=MOVE", "POST" );
+@@ -570,12 +572,12 @@ void OneDriveTest::getDocumentTest( )
+     curl_mockup_reset( );
+     static const string objectId ("aFileId");
+ 
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     string url = BASE_URL + "/" + objectId;
+     curl_mockup_addResponse( url.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
+ 
+-    libcmis::ObjectPtr obj = session.getObject( objectId );
++    libcmis::ObjectPtr obj = session->getObject( objectId );
+ 
+     // Check if we got the document object.
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
+@@ -599,7 +601,7 @@ void OneDriveTest::getDocumentTest( )
+ void OneDriveTest::getDocumentParentTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     static const string parentId( "aParentId" );
+@@ -611,7 +613,7 @@ void OneDriveTest::getDocumentParentTest( )
+     curl_mockup_addResponse( parentUrl.c_str( ), "",
+                              "GET", DATA_DIR "/onedrive/parent-folder.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( "aFileId" );
++    libcmis::ObjectPtr object = session->getObject( "aFileId" );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     CPPUNIT_ASSERT_MESSAGE( "Document expected", document != NULL );
+@@ -626,7 +628,7 @@ void OneDriveTest::getDocumentParentTest( )
+ void OneDriveTest::getContentStreamTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     static const string documentId( "aFileId" );
+     string url = BASE_URL + "/" + documentId;
+@@ -636,7 +638,7 @@ void OneDriveTest::getContentStreamTest( )
+     string downloadUrl = "sourceUrl";
+     curl_mockup_addResponse( downloadUrl.c_str( ), "", "GET", expectedContent.c_str( ), 0, false );
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     try
+@@ -658,7 +660,7 @@ void OneDriveTest::getContentStreamTest( )
+ void OneDriveTest::setContentStreamTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+ 
+     const string documentId( "aFileId" );
+ 
+@@ -667,7 +669,7 @@ void OneDriveTest::setContentStreamTest( )
+     curl_mockup_addResponse( url.c_str( ), "",
+                                "GET", DATA_DIR "/onedrive/file.json", 200, true);
+ 
+-    libcmis::ObjectPtr object = session.getObject( documentId );
++    libcmis::ObjectPtr object = session->getObject( documentId );
+     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
+ 
+     curl_mockup_addResponse( url.c_str( ), "",
+@@ -701,7 +703,7 @@ void OneDriveTest::setContentStreamTest( )
+ void OneDriveTest::createDocumentTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string documentId( "aFileId" );
+     const string folderId( "aParentId" );
+     const string filename( "aFileName" );
+@@ -719,7 +721,7 @@ void OneDriveTest::createDocumentTest( )
+     curl_mockup_addResponse( documentUrl.c_str( ), "",
+                                "GET", DATA_DIR "/onedrive/file.json", 200, true );
+ 
+-    libcmis::FolderPtr parent = session.getFolder( folderId );
++    libcmis::FolderPtr parent = session->getFolder( folderId );
+     try
+     {
+         string expectedContent( "Test set content stream" );
+@@ -744,7 +746,7 @@ void OneDriveTest::createDocumentTest( )
+ void OneDriveTest::getObjectByPathTest( )
+ {
+     curl_mockup_reset( );
+-    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
++    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
+     const string documentId( "rightFile" );
+     const string wrongDocumentId( "wrongFile" );
+     const string folderAId( "folderA" ); // root
+@@ -772,7 +774,7 @@ void OneDriveTest::getObjectByPathTest( )
+     curl_mockup_addResponse( folderCUrl.c_str( ), "",
+                                "GET", DATA_DIR "/onedrive/folderC.json", 200, true );
+ 
+-    libcmis::ObjectPtr object = session.getObjectByPath( path );
++    libcmis::ObjectPtr object = session->getObjectByPath( path );
+     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong objectFetched", documentId, object->getId( ) );
+ }
+ 
+diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
+index c6f4270..a6652b4 100644
+--- a/src/libcmis/onedrive-session.cxx
++++ b/src/libcmis/onedrive-session.cxx
+@@ -54,11 +54,6 @@ OneDriveSession::OneDriveSession ( string baseUrl,
+     }
+ }
+ 
+-OneDriveSession::OneDriveSession( const OneDriveSession& copy ) :
+-    BaseSession( copy )
+-{
+-}
+-
+ OneDriveSession::OneDriveSession() :
+     BaseSession()
+ {
+diff --git a/src/libcmis/onedrive-session.hxx b/src/libcmis/onedrive-session.hxx
+index 441e110..f11fbaf 100644
+--- a/src/libcmis/onedrive-session.hxx
++++ b/src/libcmis/onedrive-session.hxx
+@@ -42,8 +42,6 @@ class OneDriveSession : public BaseSession
+                        libcmis::OAuth2DataPtr oauth2,
+                        bool verbose = false );
+ 
+-        OneDriveSession( const OneDriveSession& copy );
+-
+         ~OneDriveSession ( );
+ 
+         virtual libcmis::RepositoryPtr getRepository( );
+@@ -64,6 +62,8 @@ class OneDriveSession : public BaseSession
+ 
+     private:
+         OneDriveSession( );
++        OneDriveSession( const OneDriveSession& copy ) = delete;
++        OneDriveSession& operator=( const OneDriveSession& copy ) = delete;
+ };
+ 
+ #endif /* _ONEDRIVE_SESSION_HXX_ */

diff --git a/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild b/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
new file mode 100644
index 000000000000..d90cb7574671
--- /dev/null
+++ b/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} == *9999* ]]; then
+	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+fi
+inherit autotools
+
+DESCRIPTION="C++ client library for the CMIS interface"
+HOMEPAGE="https://github.com/tdf/libcmis"
+
+LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
+SLOT="0.5"
+IUSE="man test tools"
+
+RESTRICT="test"
+
+DEPEND="
+	dev-libs/boost:=
+	dev-libs/libxml2
+	net-misc/curl
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	man? (
+		app-text/docbook2X
+		dev-libs/libxslt
+	)
+	test? (
+		dev-util/cppcheck
+		dev-util/cppunit
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-icu-64.2.patch" # bug 674414
+	"${FILESDIR}/${P}-fix-onedrive.patch"
+	"${FILESDIR}/${P}-gdrive-do-not-allow-copying.patch"
+	"${FILESDIR}/${P}-onedrive-do-not-allow-copying.patch"
+	"${FILESDIR}/${P}-fix-gdrive-onedrive.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		--program-suffix=-$(ver_cut 1-2)
+		--disable-werror
+		$(use_with man)
+		$(use_enable test tests)
+		$(use_enable tools client)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	find "${D}" -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2022-12-26 23:41 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2022-12-26 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     3a944bd3133689afaaeab7b203726303790c8909
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 26 23:40:35 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 23:40:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a944bd3

dev-cpp/libcmis: make it a patchset

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-cpp/libcmis/Manifest                           |   1 +
 .../files/libcmis-0.5.2-fix-gdrive-onedrive.patch  | 980 ---------------------
 .../libcmis/files/libcmis-0.5.2-fix-onedrive.patch | 481 ----------
 ...libcmis-0.5.2-gdrive-do-not-allow-copying.patch | 722 ---------------
 ...bcmis-0.5.2-onedrive-do-not-allow-copying.patch | 430 ---------
 dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild            |  11 +-
 6 files changed, 7 insertions(+), 2618 deletions(-)

diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
index c1568ef2f82e..6dd6b81353db 100644
--- a/dev-cpp/libcmis/Manifest
+++ b/dev-cpp/libcmis/Manifest
@@ -1 +1,2 @@
+DIST libcmis-0.5.2-patchset.tar.xz 16632 BLAKE2B 0a9802955059214428e7c2d6171093b171e47899de05404ee462bbf2c68c808927759a0808d79aa3aa9c8b9cd1a60b55686f7596b121701704a2d9720d6a8ba8 SHA512 bca4cc908e5510a9f597d6f1b560b3bbfdcda185b79d21320c6e3f7e5c559b7dda375407dfd6f05420b6f4edd666f6e7e70b7b72808506acc22fdfdab344f52c
 DIST libcmis-0.5.2.tar.gz 295020 BLAKE2B 325eacedd87eb1888a439c727a648c5aeb8d58c9b80add9761ffc55381193b71b589865d13ecd55177faafa935642685001f60456c1354e037989b29e9451c05 SHA512 45d8cd6d420a9593b46e1f2d6fbf384ea248cb218b0db6326ee2f082ff29100b65a2cc999ccb849e61df4f4ed7c3721b09addc6c322ef03c6c93f8c0acc02bde

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch
deleted file mode 100644
index b1e07ad89e24..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-onedrive.patch
+++ /dev/null
@@ -1,980 +0,0 @@
-From bce91e0854a0ff1d0b2023f1f3a54077a36e3738 Mon Sep 17 00:00:00 2001
-From: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-Date: Mon, 23 Aug 2021 15:10:08 +0100
-Subject: [PATCH] tdf#101630 - gdrive support w/oAuth and Drive API v3
-
-LibreOffice is only using drive.file scope, so can only see files it
-owns/that were created by LibreOffice.
-
-In addition, also store the refresh token in LO's password-store if the
-user enabled persistent storage, removing the need to to the
-copy'n'paste dance to grant access each time LO is launched.
-
-related tdf#115643 also store the refresh token for onedrive
-consolidate the fallback-auth provides for onedrive/gdrive into one,
-they are all the same login in browser, then copy code method that
-ultimately should be changed to having LO listen on local port for the
-code
----
- inc/libcmis/session.hxx           |   2 +
- src/libcmis/gdrive-document.cxx   |  49 ++------
- src/libcmis/gdrive-folder.cxx     |  25 ++--
- src/libcmis/gdrive-object.cxx     |  43 +++----
- src/libcmis/gdrive-repository.cxx |   2 +-
- src/libcmis/gdrive-session.cxx    |  76 ++++++++++-
- src/libcmis/gdrive-session.hxx    |   8 ++
- src/libcmis/gdrive-utils.cxx      |  33 ++---
- src/libcmis/gdrive-utils.hxx      |   3 +-
- src/libcmis/http-session.hxx      |   2 +-
- src/libcmis/oauth2-handler.cxx    |  16 ++-
- src/libcmis/oauth2-handler.hxx    |   1 +
- src/libcmis/oauth2-providers.cxx  | 203 +-----------------------------
- src/libcmis/oauth2-providers.hxx  |   6 +-
- src/libcmis/onedrive-session.cxx  |  39 ++++++
- src/libcmis/onedrive-session.hxx  |  10 +-
- src/libcmis/session-factory.cxx   |   2 +-
- 17 files changed, 206 insertions(+), 314 deletions(-)
-
-diff --git a/inc/libcmis/session.hxx b/inc/libcmis/session.hxx
-index 0a768a8..ec95ab4 100644
---- a/inc/libcmis/session.hxx
-+++ b/inc/libcmis/session.hxx
-@@ -95,6 +95,8 @@ namespace libcmis
-                 certificate exception feature available on common web browser.
-               */
-             virtual void setNoSSLCertificateCheck( bool noCheck ) = 0;
-+
-+            virtual std::string getRefreshToken() { return ""; };
-     };
- }
- 
-diff --git a/src/libcmis/gdrive-document.cxx b/src/libcmis/gdrive-document.cxx
-index fe7b73a..ecb13d6 100644
---- a/src/libcmis/gdrive-document.cxx
-+++ b/src/libcmis/gdrive-document.cxx
-@@ -145,23 +145,17 @@ void GDriveDocument::uploadStream( boost::shared_ptr< ostream > os,
- {
-     if ( !os.get( ) )
-         throw libcmis::Exception( "Missing stream" );
--    if ( !isImmutable( ) )
--        throw libcmis::Exception( string ( "Document " + getId( )+ 
--                                    " is not editable" ) );
--    string putUrl = getUploadUrl( ) + getId( );
--    putUrl += "?uploadType=media";
--    
--    // If it's a Google document, convert it 
--    if ( isGoogleDoc( ) )
--        putUrl  += "&convert=true";
-+
-+    string putUrl = GDRIVE_UPLOAD_LINK + getId( ) + "?uploadType=media";
- 
-     // Upload stream
-     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
-     vector <string> headers;
-     headers.push_back( string( "Content-Type: " ) + contentType );
-+    string res;
-     try
-     {
--        getSession()->httpPutRequest( putUrl, *is, headers );
-+        res = getSession()->httpPatchRequest( putUrl, *is, headers )->getStream()->str();
-     }
-     catch ( const CurlException& e )
-     {
-@@ -181,35 +175,10 @@ void GDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
- {
-     if ( !os.get( ) )
-         throw libcmis::Exception( "Missing stream" );
--    
--    if ( !isImmutable( ) )
--        throw libcmis::Exception( string ( "Document " + getId( )+ 
--                                    " is not editable" ) );
--    string metaUrl = getUrl( );
--
--    // If it's a Google document, convert it 
--    if ( isGoogleDoc( ) )
--        metaUrl += "?convert=true";
--
--    // Update file name meta information
--    if ( !fileName.empty( ) && fileName != getContentFilename( ) )
--    {
--        Json metaJson;
--        Json fileJson( fileName.c_str( ) );
--        metaJson.add("title", fileJson );
- 
--        std::istringstream is( metaJson.toString( ) );
--        vector<string> headers;
--        headers.push_back( "Content-Type: application/json" );
--        try
--        {
--            getSession()->httpPutRequest( metaUrl, is, headers );
--        }
--        catch ( const CurlException& e )
--        {
--            throw e.getCmisException( );
--        }
--    }
-+    // TODO: when would the filename need an update?
-+    if (!fileName.empty() && fileName != getContentFilename())
-+        std::cout << "filename change is not implemented in setContentStream" << std::endl;
- 
-     // Upload stream
-     uploadStream( os, contentType );
-@@ -251,7 +220,7 @@ libcmis::DocumentPtr GDriveDocument::checkIn(
- vector< libcmis::DocumentPtr > GDriveDocument::getAllVersions( ) 
- {   
-     vector< libcmis::DocumentPtr > revisions;
--    string versionUrl = getUrl( ) + "/revisions";
-+    string versionUrl = GDRIVE_METADATA_LINK + getId( ) + "/revisions";
-     // Run the http request to get the properties definition
-     string res;
-     try
-@@ -263,7 +232,7 @@ vector< libcmis::DocumentPtr > GDriveDocument::getAllVersions( )
-         throw e.getCmisException( );
-     }
-     Json jsonRes = Json::parse( res );        
--    Json::JsonVector objs = jsonRes["items"].getList( );
-+    Json::JsonVector objs = jsonRes["revisions"].getList( );
-    
-     string parentId = getStringProperty( "cmis:parentId" );
- 
-diff --git a/src/libcmis/gdrive-folder.cxx b/src/libcmis/gdrive-folder.cxx
-index 34ab187..26de89b 100644
---- a/src/libcmis/gdrive-folder.cxx
-+++ b/src/libcmis/gdrive-folder.cxx
-@@ -62,8 +62,8 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
-     // Instead of sending multiple queries for children,
-     // we send a single query to search for objects where parents
-     // include the folderID.
--    string query = getSession( )->getBindingUrl( ) + 
--        "/files?q=\"" + getId( ) + "\"+in+parents+and+trashed+=+false";
-+    string query = GDRIVE_METADATA_LINK + "?q=\"" + getId( ) + "\"+in+parents+and+trashed+=+false" +
-+        "&fields=files(kind,id,name,parents,mimeType,createdTime,modifiedTime,thumbnailLink,size)";
- 
-     string res;
-     try
-@@ -76,7 +76,7 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
-     }
- 
-     Json jsonRes = Json::parse( res );
--    Json::JsonVector objs = jsonRes["items"].getList( );
-+    Json::JsonVector objs = jsonRes["files"].getList( );
-     
-     // Create children objects from Json objects
-     for(unsigned int i = 0; i < objs.size(); i++)
-@@ -95,7 +95,7 @@ vector< libcmis::ObjectPtr > GDriveFolder::getChildren( )
- string GDriveFolder::uploadProperties( Json properties )
- {
-     // URL for uploading meta data
--    string metaUrl =  getSession()->getBindingUrl() + "/files/";
-+    string metaUrl =  GDRIVE_METADATA_LINK + "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime";
- 
-     // add parents to the properties    
-     properties.add( "parents", GdriveUtils::createJsonFromParentId( getId( ) ) );
-@@ -147,9 +147,15 @@ libcmis::DocumentPtr GDriveFolder::createDocument(
-     
-     Json propsJson = GdriveUtils::toGdriveJson( properties );
- 
--    // Add filename to properties
--    Json jsonFilename( fileName.c_str( ) );
--    propsJson.add( "title", jsonFilename );
-+    if(!fileName.empty()) {
-+        // use provided filename
-+        Json jsonFilename( fileName.c_str( ) );
-+
-+        propsJson.add( "name", jsonFilename );
-+    }
-+    if(!contentType.empty()) {
-+        propsJson.add( "mimeType", Json(contentType.c_str()));
-+    }
-     
-     // Upload meta-datas
-     string res = uploadProperties( propsJson);
-@@ -171,12 +177,9 @@ vector< string > GDriveFolder::removeTree(
-     libcmis::UnfileObjects::Type /*unfile*/, 
-     bool /*continueOnError*/ ) 
- {
--    // Object remove doesn't work with folder
--    // Using trash instead
-     try
-     {   
--        istringstream is( "" );
--        getSession( )->httpPostRequest( getUrl( ) + "/trash", is, "" );
-+        getSession( )->httpDeleteRequest( GDRIVE_METADATA_LINK + getId( ) );
-     }
-     catch ( const CurlException& e )
-     {
-diff --git a/src/libcmis/gdrive-object.cxx b/src/libcmis/gdrive-object.cxx
-index f22c240..b472e2f 100644
---- a/src/libcmis/gdrive-object.cxx
-+++ b/src/libcmis/gdrive-object.cxx
-@@ -89,8 +89,8 @@ void GDriveObject::initializeFromJson ( Json json, string id, string name )
-             property.reset( new GDriveProperty( it->first, it->second ) );
-             m_properties[ property->getPropertyType( )->getId()] = property;
-            
--            // we map "title" to both "cmis:name" and "cmis:getContentStreamFileName"
--            if ( it->first == "title" )
-+            // we map "name" to both "cmis:name" and "cmis:getContentStreamFileName"
-+            if ( it->first == "name" )
-             {
-                 property.reset( new GDriveProperty( "cmis:name", it->second) );
-                 m_properties[ property->getPropertyType( )->getId()] = property;
-@@ -142,16 +142,13 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
- {
-     if ( m_renditions.empty( ) )
-     {
--        string downloadUrl = getStringProperty( "downloadUrl" );
--        if ( !downloadUrl.empty( ) )
-+        string downloadUrl = GDRIVE_METADATA_LINK + getId( ) + "?alt=media";
-+        string mimeType = getStringProperty( "cmis:contentStreamMimeType" );
-+        if ( !mimeType.empty( ) )
-         {
--            string mimeType = getStringProperty( "cmis:contentStreamMimeType" );
--            if ( !mimeType.empty( ) )
--            { 
--                RenditionPtr rendition( 
--                    new Rendition( mimeType, mimeType, mimeType, downloadUrl ));
--                m_renditions.push_back( rendition );
--            }
-+            RenditionPtr rendition(
-+                new Rendition( mimeType, mimeType, mimeType, downloadUrl ));
-+            m_renditions.push_back( rendition );
-         }
- 
-         vector< string > exportLinks = getMultiStringProperty( "exportLinks" );
-@@ -159,7 +156,7 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
-         { 
-             int pos = (*it).find(":\"");
-             if ( pos == -1 ) continue;
--            string mimeType = (*it).substr( 0, pos );
-+            mimeType = (*it).substr( 0, pos );
-             string url = (*it).substr( pos + 2, (*it).length( ) - pos - 3 );
-             RenditionPtr rendition(
-                 new Rendition( mimeType, mimeType, mimeType, url ) );
-@@ -170,7 +167,7 @@ vector< RenditionPtr> GDriveObject::getRenditions( string /* filter */ )
-         string thumbnailLink = getStringProperty( "thumbnailLink" );
-         if ( !thumbnailLink.empty( ) )
-         {
--            string mimeType = "cmis:thumbnail";   
-+            mimeType = "cmis:thumbnail";
-             RenditionPtr rendition( 
-                 new Rendition( mimeType, mimeType, mimeType, thumbnailLink ));
-             m_renditions.push_back( rendition );
-@@ -192,7 +189,7 @@ libcmis::ObjectPtr GDriveObject::updateProperties(
-     {   
-         vector< string > headers;
-         headers.push_back( "Content-Type: application/json" );
--        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
-+        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
-     }
-     catch ( const CurlException& e )
-     {   
-@@ -228,7 +225,7 @@ void GDriveObject::remove( bool /*allVersions*/ )
- {
-     try
-     {
--        getSession( )->httpDeleteRequest( getUrl( ) );
-+        getSession( )->httpDeleteRequest( GDRIVE_METADATA_LINK + getId( ) );
-     }
-     catch ( const CurlException& e )
-     {
-@@ -239,8 +236,8 @@ void GDriveObject::remove( bool /*allVersions*/ )
- void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination ) 
- {  
-     Json parentsJson;
--    Json parentsValue = GdriveUtils::createJsonFromParentId( destination->getId( ) );
--    parentsJson.add( "parents", parentsValue );
-+    parentsJson.add( "addParents", Json(destination->getId( ).c_str()) );
-+    parentsJson.add( "removeParents", Json(getStringProperty( "cmis:parentId" ).c_str()) );
-     
-     istringstream is( parentsJson.toString( ) );
-     libcmis::HttpResponsePtr response;
-@@ -248,7 +245,7 @@ void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination )
-     {   
-         vector< string > headers;
-         headers.push_back( "Content-Type: application/json" );
--        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
-+        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
-     }
-     catch ( const CurlException& e )
-     {   
-@@ -262,12 +259,10 @@ void GDriveObject::move( FolderPtr /*source*/, FolderPtr destination )
- 
- string GDriveObject::getUrl( )
- {
--    return getSession( )->getBindingUrl( ) + "/files/" + getId( );
--}
--
--string GDriveObject::getUploadUrl( )
--{
--    return GDRIVE_UPLOAD_LINKS;
-+    // thumbnailLink causes some operations to fail with internal server error,
-+    // see https://issuetracker.google.com/issues/36760667
-+    return GDRIVE_METADATA_LINK + getId( ) +
-+                "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime,size";
- }
- 
- vector< string> GDriveObject::getMultiStringProperty( const string& propertyName )
-diff --git a/src/libcmis/gdrive-repository.cxx b/src/libcmis/gdrive-repository.cxx
-index e6cec69..24b42b5 100644
---- a/src/libcmis/gdrive-repository.cxx
-+++ b/src/libcmis/gdrive-repository.cxx
-@@ -35,7 +35,7 @@ GdriveRepository::GdriveRepository( ) :
-     m_name = "Google Drive";
-     m_description = "Google Drive repository";
-     m_productName = "Google Drive";
--    m_productVersion = "v2";
-+    m_productVersion = "v3";
-     m_rootId = "root";
-  
-     m_capabilities[ ACL ] = "discover";
-diff --git a/src/libcmis/gdrive-session.cxx b/src/libcmis/gdrive-session.cxx
-index 87bb160..1ee748e 100644
---- a/src/libcmis/gdrive-session.cxx
-+++ b/src/libcmis/gdrive-session.cxx
-@@ -65,6 +65,46 @@ GDriveSession::~GDriveSession()
- {
- }
- 
-+
-+void GDriveSession::setOAuth2Data( libcmis::OAuth2DataPtr oauth2 )
-+{
-+    m_oauth2Handler = new OAuth2Handler( this, oauth2 );
-+    m_oauth2Handler->setOAuth2Parser( OAuth2Providers::getOAuth2Parser( getBindingUrl( ) ) );
-+
-+    oauth2Authenticate( );
-+}
-+
-+void GDriveSession::oauth2Authenticate()
-+{
-+    // treat the supplied password as refresh token
-+    if (!m_password.empty())
-+    {
-+        try
-+        {
-+            m_inOAuth2Authentication = true;
-+
-+            m_oauth2Handler->setRefreshToken(m_password);
-+            // Try to get new access tokens using the stored refreshtoken
-+            m_oauth2Handler->refresh();
-+            m_inOAuth2Authentication = false;
-+        }
-+        catch (const CurlException &e)
-+        {
-+            m_inOAuth2Authentication = false;
-+            // refresh token expired or invalid, trigger initial auth (that in turn will hit the fallback with copy'n'paste method)
-+            BaseSession::oauth2Authenticate();
-+        }
-+    }
-+    else
-+    {
-+        BaseSession::oauth2Authenticate();
-+    }
-+}
-+
-+string GDriveSession::getRefreshToken() {
-+    return HttpSession::getRefreshToken();
-+}
-+
- libcmis::RepositoryPtr GDriveSession::getRepository( )
- {
-     // Return a dummy repository since GDrive doesn't have that notion
-@@ -79,9 +119,13 @@ bool GDriveSession::setRepository( std::string )
- 
- libcmis::ObjectPtr GDriveSession::getObject( string objectId )
- {
-+    if(objectId == "root") {
-+        return getRootFolder();
-+    }
-     // Run the http request to get the properties definition
-     string res;
--    string objectLink = m_bindingUrl + "/files/" + objectId;
-+    string objectLink = GDRIVE_METADATA_LINK + objectId +
-+         "?fields=kind,id,name,parents,mimeType,createdTime,modifiedTime,thumbnailLink,size";
-     try
-     {
-         res = httpGetRequest( objectLink )->getStream()->str();
-@@ -143,9 +187,10 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
-         {
-             // Normal child case
-             // Ask for the ID of the child if there is any
--            string childIdUrl = m_bindingUrl + "/files/" + objectId +
--                                "/children/?q=title+=+'" + segment +
--                                "'&fields=items:id";
-+            // somewhat flawed as names are not necessarily unique in GDrive...
-+            string query = libcmis::escape("'" + objectId + "' in parents and trashed = false and name='" + segment + "'");
-+
-+            string childIdUrl = m_bindingUrl + "/files/?q=" + query + "&fields=files(id)";
- 
-             string res;
-             try
-@@ -159,7 +204,7 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
-             Json jsonRes = Json::parse( res );
- 
-             // Did we get an id?
--            Json::JsonVector items = jsonRes["items"].getList();
-+            Json::JsonVector items = jsonRes["files"].getList();
-             if ( items.empty( ) )
-                 throw libcmis::Exception( "Object not found: " + path, "objectNotFound" );
- 
-@@ -174,6 +219,27 @@ libcmis::ObjectPtr GDriveSession::getObjectByPath( string path )
-     return getObject( objectId );
- }
- 
-+libcmis::FolderPtr GDriveSession::getRootFolder()
-+{
-+    // permissions/scope with just drive.file don't allow to get it with the "root" alias/by its actual object-ID
-+    Json propsJson;
-+
-+    // GDrive folder is a file with a different mime type.
-+    string mimeType = GDRIVE_FOLDER_MIME_TYPE;
-+
-+    // Add mimetype to the propsJson
-+    Json jsonMimeType( mimeType.c_str( ) );
-+    propsJson.add( "mimeType", jsonMimeType );
-+    propsJson.add( "id", "root" );
-+
-+    // Upload meta-datas
-+    propsJson.add("cmis:name", "VirtualRoot");
-+
-+    libcmis::FolderPtr folderPtr( new GDriveFolder( this, propsJson ) );
-+
-+    return folderPtr;
-+}
-+
- libcmis::ObjectTypePtr GDriveSession::getType( string id )
- {
-     libcmis::ObjectTypePtr type( new GdriveObjectType( id ) );
-diff --git a/src/libcmis/gdrive-session.hxx b/src/libcmis/gdrive-session.hxx
-index f60ff6c..d29d454 100644
---- a/src/libcmis/gdrive-session.hxx
-+++ b/src/libcmis/gdrive-session.hxx
-@@ -55,10 +55,18 @@ class GDriveSession : public BaseSession
- 
-         virtual std::vector< libcmis::ObjectTypePtr > getBaseTypes( );
- 
-+        virtual libcmis::FolderPtr getRootFolder();
-+
-+        virtual std::string getRefreshToken();
-+
-     private:
-         GDriveSession( );
-         GDriveSession( const GDriveSession& copy ) = delete;
-         GDriveSession& operator=( const GDriveSession& copy ) = delete;
-+
-+        virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
-+
-+        void oauth2Authenticate( );
- };
- 
- #endif /* _GDRIVE_SESSION_HXX_ */
-diff --git a/src/libcmis/gdrive-utils.cxx b/src/libcmis/gdrive-utils.cxx
-index 6be2e43..3cc0288 100644
---- a/src/libcmis/gdrive-utils.cxx
-+++ b/src/libcmis/gdrive-utils.cxx
-@@ -44,17 +44,17 @@ string GdriveUtils::toCmisKey( const string& key )
-         convertedKey = "cmis:createdBy";
-     else if ( key == "description" )
-         convertedKey = "cmis:description";
--    else if ( key == "createdDate" )
-+    else if ( key == "createdTime" )
-         convertedKey = "cmis:creationDate";
-     else if ( key == "lastModifyingUserName" )
-         convertedKey = "cmis:lastModifiedBy";
--    else if ( key == "modifiedDate" )
-+    else if ( key == "modifiedTime" )
-         convertedKey = "cmis:lastModificationDate";
--    else if ( key == "title" )
-+    else if ( key == "name" )
-         convertedKey = "cmis:contentStreamFileName";
-     else if ( key == "mimeType" )
-         convertedKey = "cmis:contentStreamMimeType";
--    else if ( key == "fileSize" )
-+    else if ( key == "size" )
-         convertedKey = "cmis:contentStreamLength";
-     else if ( key == "editable" )
-         convertedKey = "cmis:isImmutable";
-@@ -72,21 +72,21 @@ string GdriveUtils::toGdriveKey( const string& key )
-     else if ( key == "cmis:createdBy" )
-         convertedKey = "ownerNames";
-     else if ( key == "cmis:creationDate" )
--        convertedKey = "createdDate";
-+        convertedKey = "createdTime";
-     else if ( key == "cmis:description" )
-         convertedKey = "description";
-     else if ( key == "cmis:lastModifiedBy" )
-         convertedKey = "lastModifyingUserName";
-     else if ( key == "cmis:lastModificationDate" )
--        convertedKey = "modifiedDate";
-+        convertedKey = "modifiedTime";
-     else if ( key == "cmis:contentStreamFileName" )
--        convertedKey = "title";
-+        convertedKey = "name";
-     else if ( key == "cmis:name" )
--        convertedKey = "title";
-+        convertedKey = "name";
-     else if ( key == "cmis:contentStreamMimeType" )
-         convertedKey = "mimeType";
-     else if ( key == "cmis:contentStreamLength" )
--        convertedKey = "fileSize";
-+        convertedKey = "size";
-     else if ( key == "cmis:isImmutable" )
-         convertedKey = "editable";
-     else if ( key == "cmis:parentId" )
-@@ -124,9 +124,9 @@ Json GdriveUtils::toGdriveJson( const PropertyPtrMap& properties )
- bool GdriveUtils::checkUpdatable( const string& key )
- {
-     // taken from https://developers.google.com/drive/v2/reference/files
--    bool updatable = ( key == "title" ||
-+    bool updatable = ( key == "name" ||
-                   key == "description" ||
--                  key == "modifiedDate" ||
-+                  key == "modifiedTime" ||
-                   key == "lastViewedByMeDate" );
-     return updatable;    
- }
-@@ -143,18 +143,11 @@ bool GdriveUtils::checkMultiValued( const string& key )
- 
- Json GdriveUtils::createJsonFromParentId( const string& parentId )
- {
--    Json parentValue( parentId.c_str( ) );
--    
-     // parents is a Json array
-     Json firstParent;
--    firstParent.add( "id", parentValue );
--    
--    Json::JsonVector parents;
--    parents.insert( parents.begin( ), firstParent );
-+    firstParent.add( Json( parentId.c_str() ) );
-     
--    Json parentsValue( parents );
--
--    return parentsValue;
-+    return firstParent;
- }
- 
- vector< string > GdriveUtils::parseGdriveProperty( string key, Json json )
-diff --git a/src/libcmis/gdrive-utils.hxx b/src/libcmis/gdrive-utils.hxx
-index 6f1c257..06ad568 100644
---- a/src/libcmis/gdrive-utils.hxx
-+++ b/src/libcmis/gdrive-utils.hxx
-@@ -35,7 +35,8 @@
- #include "json-utils.hxx"
- 
- static const std::string GDRIVE_FOLDER_MIME_TYPE = "application/vnd.google-apps.folder" ;
--static const std::string GDRIVE_UPLOAD_LINKS = "https://www.googleapis.com/upload/drive/v2/files/";
-+static const std::string GDRIVE_UPLOAD_LINK = "https://www.googleapis.com/upload/drive/v3/files/";
-+static const std::string GDRIVE_METADATA_LINK = "https://www.googleapis.com/drive/v3/files/";
- 
- class GdriveUtils
- {
-diff --git a/src/libcmis/http-session.hxx b/src/libcmis/http-session.hxx
-index 29de64d..6c9ed1b 100644
---- a/src/libcmis/http-session.hxx
-+++ b/src/libcmis/http-session.hxx
-@@ -148,7 +148,7 @@ class HttpSession
- 
-         void setNoSSLCertificateCheck( bool noCheck );
- 
--        std::string getRefreshToken( );
-+        virtual std::string getRefreshToken( );
- 
-     protected:
-         HttpSession( );
-diff --git a/src/libcmis/oauth2-handler.cxx b/src/libcmis/oauth2-handler.cxx
-index 842769f..d70628d 100644
---- a/src/libcmis/oauth2-handler.cxx
-+++ b/src/libcmis/oauth2-handler.cxx
-@@ -92,8 +92,11 @@ void OAuth2Handler::fetchTokens( string authCode )
-         "code="              + authCode +
-         "&client_id="        + m_data->getClientId() +
-         "&redirect_uri="     + m_data->getRedirectUri() +
--        "&scope="            + libcmis::escape( m_data->getScope() ) +
-         "&grant_type=authorization_code" ;
-+    if(boost::starts_with(m_data->getTokenUrl(), "https://oauth2.googleapis.com/"))
-+        post += "&client_secret="    + m_data->getClientSecret();
-+    else
-+        post += "&scope="            + libcmis::escape( m_data->getScope() );
- 
-     istringstream is( post );
- 
-@@ -104,7 +107,7 @@ void OAuth2Handler::fetchTokens( string authCode )
-         resp = m_session->httpPostRequest ( m_data->getTokenUrl(), is,
-                                         "application/x-www-form-urlencoded" );
-     }
--    catch ( const CurlException& )
-+    catch ( const CurlException& e)
-     {
-         throw libcmis::Exception(
-                 "Couldn't get tokens from the authorization code ");
-@@ -122,6 +125,8 @@ void OAuth2Handler::refresh( )
-         "refresh_token="     + m_refresh +
-         "&client_id="        + m_data->getClientId() +
-         "&grant_type=refresh_token" ;
-+    if(boost::starts_with(m_data->getTokenUrl(), "https://oauth2.googleapis.com/"))
-+        post += "&client_secret="    + m_data->getClientSecret();
- 
-     istringstream is( post );
-     libcmis::HttpResponsePtr resp;
-@@ -130,7 +135,7 @@ void OAuth2Handler::refresh( )
-         resp = m_session->httpPostRequest( m_data->getTokenUrl( ), is,
-                                            "application/x-www-form-urlencoded" );
-     }
--    catch (const CurlException& )
-+    catch (const CurlException& e )
-     {
-         throw libcmis::Exception( "Couldn't refresh token ");
-     }
-@@ -158,6 +163,11 @@ string OAuth2Handler::getRefreshToken( )
-     return m_refresh;
- }
- 
-+void OAuth2Handler::setRefreshToken( string refreshToken )
-+{
-+    m_refresh = refreshToken;
-+}
-+
- string OAuth2Handler::getHttpHeader( )
- {
-     string header;
-diff --git a/src/libcmis/oauth2-handler.hxx b/src/libcmis/oauth2-handler.hxx
-index 83e91cf..bb9a394 100644
---- a/src/libcmis/oauth2-handler.hxx
-+++ b/src/libcmis/oauth2-handler.hxx
-@@ -61,6 +61,7 @@ class OAuth2Handler
- 
-         std::string getAccessToken( ) ;
-         std::string getRefreshToken( ) ;
-+        void setRefreshToken( std::string refreshToken ) ;
- 
-         // adding HTTP auth header
-         std::string getHttpHeader( ) ;
-diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
-index db6fbef..1c8d3cc 100644
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -47,201 +47,8 @@
- 
- using namespace std;
- 
--namespace {
--
--// Encodes the given data according to the application/x-www-form-urlencoded format, see
--// <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
--std::string escapeForm(const std::string& data)
--{
--    std::string res;
--    for ( string::const_iterator i = data.begin(); i != data.end(); ++i )
--    {
--        unsigned char c = static_cast<unsigned char>( *i );
--        if ( c == ' ' || c == '*' || c == '-' || c == '.' || ( c >= '0' && c <= '9' )
--             || ( c >= 'A' && c <= 'Z' ) || c == '_' || ( c >= 'a' && c <= 'z' ) )
--        {
--            res += static_cast<char>( c );
--        }
--        else
--        {
--            static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
--                                          '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
--            res += '%';
--            res += hex[c >> 4];
--            res += hex[c & 0xF];
--        }
--    }
--    return res;
--}
--
--}
--
--string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
--                                      const string& username, const string& password )
--{
--    /* This member function implements 'Google OAuth 2.0'
--     *
--     * The interaction is carried out by libcmis, with no web browser involved.
--     *
--     * Normal sequence (without 2FA) is:
--     * 1) a get to activate login page
--     *    receive first login page, html format
--     * 2) subsequent post to sent email
--     *    receive html page for password input
--     * 3) subsequent post to send password
--     *    receive html page for application consent
--     * 4) subsequent post to send a consent for the application
--     *    receive a single-use authorization code
--     *    this code is returned as a string
--     *
--     * Sequence with 2FA is:
--     * 1) a get to activate login page
--     *    receive first login page, html format
--     * 2) subsequent post to sent email
--     *    receive html page for password input
--     * 3) subsequent post to send password
--     *    receive html page for pin input
--     * 3b) subsequent post to send pin number
--     *    receive html page for application consent
--     * 4) subsequent post to send a consent for the application
--     *    receive a single-use authorization code
--     *    this code is returned as a string
--     */
--
--    static const string CONTENT_TYPE( "application/x-www-form-urlencoded" );
--    // STEP 1: get login page
--    string res;
--    try
--    {
--        // send the first get, receive the html login page
--        res = session->httpGetRequest( authUrl )->getStream( )->str( );
--    }
--    catch ( const CurlException& )
--    {
--        return string( );
--    }
--
--    // STEP 2: send email
--
--    string loginEmailPost, loginEmailLink;
--    if ( !parseResponse( res.c_str( ), loginEmailPost, loginEmailLink ) )
--        return string( );
--
--    loginEmailPost += "Email=";
--    loginEmailPost += escapeForm( username );
--
--    istringstream loginEmailIs( loginEmailPost );
--    string loginEmailRes;
--    try
--    {
--        // send a post with user email, receive the html page for password input
--        loginEmailRes = session->httpPostRequest ( loginEmailLink, loginEmailIs, CONTENT_TYPE )
--                        ->getStream( )->str( );
--    }
--    catch ( const CurlException& )
--    {
--        return string( );
--    }
--
--    // STEP 3: password page
--
--    string loginPasswdPost, loginPasswdLink;
--    if ( !parseResponse( loginEmailRes.c_str( ), loginPasswdPost, loginPasswdLink ) )
--        return string( );
--
--    loginPasswdPost += "Passwd=";
--    loginPasswdPost += escapeForm( password );
--
--    istringstream loginPasswdIs( loginPasswdPost );
--    string loginPasswdRes;
--    try
--    {
--        // send a post with user password, receive the application consent page
--        loginPasswdRes = session->httpPostRequest ( loginPasswdLink, loginPasswdIs, CONTENT_TYPE )
--                        ->getStream( )->str( );
--    }
--    catch ( const CurlException& )
--    {
--        return string( );
--    }
--
--    string approvalPost, approvalLink;
--    if ( !parseResponse( loginPasswdRes. c_str( ), approvalPost, approvalLink) )
--        return string( );
--
--    // when 2FA is enabled, link doesn't start with 'http'
--    if ( approvalLink.compare(0, 4, "http") != 0 )
--    {
--        // STEP 3b: 2 Factor Authentication, pin code request
--
--        string loginChallengePost( approvalPost );
--        string loginChallengeLink( approvalLink );
--
--        libcmis::OAuth2AuthCodeProvider fallbackProvider = libcmis::SessionFactory::getOAuth2AuthCodeProvider( );
--        unique_ptr< char, void (*)( void * ) > pin{ fallbackProvider( "", "", "" ), free };
--
--        if( !pin )
--        {
--            // unset OAuth2AuthCode Provider to avoid showing pin request again in the HttpSession::oauth2Authenticate
--            libcmis::SessionFactory::setOAuth2AuthCodeProvider( NULL );
--            return string( );
--        }
--
--        loginChallengeLink = "https://accounts.google.com" + loginChallengeLink;
--        loginChallengePost += string( PIN_INPUT_NAME ) + "=";
--        loginChallengePost += string( pin.get() );
--
--        istringstream loginChallengeIs( loginChallengePost );
--        string loginChallengeRes;
--        try
--        {
--            // send a post with pin, receive the application consent page
--            loginChallengeRes = session->httpPostRequest ( loginChallengeLink, loginChallengeIs, CONTENT_TYPE )
--                            ->getStream( )->str( );
--        }
--        catch ( const CurlException& )
--        {
--            return string( );
--        }
--
--        approvalPost = string();
--        approvalLink = string();
--
--        if ( !parseResponse( loginChallengeRes. c_str( ), approvalPost, approvalLink) )
--            return string( );
--    }
--    else if( approvalLink.compare( "https://accounts.google.com/ServiceLoginAuth" ) == 0 )
--    {
--        // wrong password,
--        // unset OAuth2AuthCode Provider to avoid showing pin request again in the HttpSession::oauth2Authenticate
--        libcmis::SessionFactory::setOAuth2AuthCodeProvider( NULL );
--        return string( );
--    }
--
--    // STEP 4: allow libcmis to access google drive
--    approvalPost += "submit_access=true";
--
--    istringstream approvalIs( approvalPost );
--    string approvalRes;
--    try
--    {
--        // send a post with application consent
--        approvalRes = session->httpPostRequest ( approvalLink, approvalIs,
--                            CONTENT_TYPE) ->getStream( )->str( );
--    }
--    catch ( const CurlException& e )
--    {
--        throw e.getCmisException( );
--    }
--
--    // Take the authentication code from the text bar
--    string code = parseCode( approvalRes.c_str( ) );
--
--    return code;
--}
--
--string OAuth2Providers::OAuth2Onedrive( HttpSession* /*session*/, const string& /*authUrl*/,
--                                      const string& /*username*/, const string& /*password*/ )
-+string OAuth2Providers::OAuth2Dummy( HttpSession* /*session*/, const string& /*authUrl*/,
-+                                     const string& /*username*/, const string& /*password*/ )
- {
-     return string( );
- }
-@@ -309,12 +116,8 @@ OAuth2Parser OAuth2Providers::getOAuth2Parser( const std::string& url )
-         // For Alfresco in the cloud, only match the hostname as there can be several
-         // binding URLs created with it.
-         return OAuth2Alfresco;
--    else if ( boost::starts_with( url, "https://www.googleapis.com/drive/v2" ) )
--        return OAuth2Gdrive;
--    else if ( boost::starts_with( url, "https://graph.microsoft.com/v1.0" ) )
--        return OAuth2Onedrive;
- 
--    return OAuth2Gdrive;
-+    return OAuth2Dummy;
- }
- 
- int OAuth2Providers::parseResponse ( const char* response, string& post, string& link )
-diff --git a/src/libcmis/oauth2-providers.hxx b/src/libcmis/oauth2-providers.hxx
-index 04dff53..eaeb1c4 100644
---- a/src/libcmis/oauth2-providers.hxx
-+++ b/src/libcmis/oauth2-providers.hxx
-@@ -39,12 +39,8 @@ typedef std::string ( *OAuth2Parser ) ( HttpSession* session, const std::string&
- class OAuth2Providers
- {
-     public :
--        static std::string OAuth2Gdrive( HttpSession* session, const std::string& authUrl, 
-+        static std::string OAuth2Dummy( HttpSession* session, const std::string& authUrl,
-                                        const std::string& username, const std::string& password );
--
--        static std::string OAuth2Onedrive( HttpSession* session, const std::string& authUrl, 
--                                       const std::string& username, const std::string& password );
--
-         static std::string OAuth2Alfresco( HttpSession* session, const std::string& authUrl, 
-                                        const std::string& username, const std::string& password );
- 
-diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
-index 05ff45e..375cd2e 100644
---- a/src/libcmis/onedrive-session.cxx
-+++ b/src/libcmis/onedrive-session.cxx
-@@ -63,6 +63,45 @@ OneDriveSession::~OneDriveSession()
- {
- }
- 
-+void OneDriveSession::setOAuth2Data( libcmis::OAuth2DataPtr oauth2 )
-+{
-+    m_oauth2Handler = new OAuth2Handler( this, oauth2 );
-+    m_oauth2Handler->setOAuth2Parser( OAuth2Providers::getOAuth2Parser( getBindingUrl( ) ) );
-+
-+    oauth2Authenticate( );
-+}
-+
-+void OneDriveSession::oauth2Authenticate()
-+{
-+    // treat the supplied password as refresh token
-+    if (!m_password.empty())
-+    {
-+        try
-+        {
-+            m_inOAuth2Authentication = true;
-+
-+            m_oauth2Handler->setRefreshToken(m_password);
-+            // Try to get new access tokens using the stored refreshtoken
-+            m_oauth2Handler->refresh();
-+            m_inOAuth2Authentication = false;
-+        }
-+        catch (const CurlException &e)
-+        {
-+            m_inOAuth2Authentication = false;
-+            // refresh token expired or invalid, trigger initial auth (that in turn will hit the fallback with copy'n'paste method)
-+            BaseSession::oauth2Authenticate();
-+        }
-+    }
-+    else
-+    {
-+        BaseSession::oauth2Authenticate();
-+    }
-+}
-+
-+string OneDriveSession::getRefreshToken() {
-+    return HttpSession::getRefreshToken();
-+}
-+
- libcmis::RepositoryPtr OneDriveSession::getRepository( )
- {
-     // Return a dummy repository since OneDrive doesn't have that notion
-diff --git a/src/libcmis/onedrive-session.hxx b/src/libcmis/onedrive-session.hxx
-index f11fbaf..3c30c04 100644
---- a/src/libcmis/onedrive-session.hxx
-+++ b/src/libcmis/onedrive-session.hxx
-@@ -56,14 +56,20 @@ class OneDriveSession : public BaseSession
-         
-         virtual std::vector< libcmis::ObjectTypePtr > getBaseTypes( );
- 
--       libcmis::ObjectPtr getObjectFromJson( Json& jsonRes );
-+        libcmis::ObjectPtr getObjectFromJson( Json& jsonRes );
- 
--       bool isAPathMatch( Json objectJson, std::string path );
-+        bool isAPathMatch( Json objectJson, std::string path );
-+
-+        virtual std::string getRefreshToken();
- 
-     private:
-         OneDriveSession( );
-         OneDriveSession( const OneDriveSession& copy ) = delete;
-         OneDriveSession& operator=( const OneDriveSession& copy ) = delete;
-+
-+        virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
-+
-+        void oauth2Authenticate( );
- };
- 
- #endif /* _ONEDRIVE_SESSION_HXX_ */
-diff --git a/src/libcmis/session-factory.cxx b/src/libcmis/session-factory.cxx
-index e740afb..1222473 100644
---- a/src/libcmis/session-factory.cxx
-+++ b/src/libcmis/session-factory.cxx
-@@ -66,7 +66,7 @@ namespace libcmis
-         if ( !bindingUrl.empty( ) )
-         {
-             // Try the special cases based on the binding URL
--            if ( bindingUrl == "https://www.googleapis.com/drive/v2" )
-+            if ( bindingUrl == "https://www.googleapis.com/drive/v3" )
-             {
-                 session = new GDriveSession( bindingUrl, username, password,
-                                              oauth2, verbose );

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch
deleted file mode 100644
index 9827bf7d9a5a..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-onedrive.patch
+++ /dev/null
@@ -1,481 +0,0 @@
-From fa5a130caff96c6f59085951f12f42f4e96a4f60 Mon Sep 17 00:00:00 2001
-From: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-Date: Mon, 23 Aug 2021 10:49:09 +0100
-Subject: [PATCH] tdf#115643 make onedrive work again by switching to graph API
-
-the live SDK method had been deprecated quite a while ago and has been
-turned off a while back.
-Notes:
-While you can access and save existing files using the remote files
-dialog, creating new files or using "save as" requires using the
-LibreOffice open/save dialogs.
-Authentication is clunky: username and password you're asked when
-creating a new connection is not used at all for connecting, so only
-fill out a username to label your onedrive entry. Actual authentication
-is done in browser - copy'n'paste the URL from the dialog into the
-browser, login and approve access for LibreOffice (approving access only
-necessary once), then you get redirected to localhost, ignore that there
-is nothing to display. The important part is the code from the URL-bar.
-Copy and paste that into the LibreOffice dialog and LO can request an
-authentication token for API access.
-Testing this feature requires compiling with corresponding api-keys
-specified in configure/having an app registered with microsoft.
----
- src/libcmis/http-session.cxx        | 88 +++++++++++++++++++++++++++++
- src/libcmis/http-session.hxx        |  3 +
- src/libcmis/oauth2-handler.cxx      |  3 +-
- src/libcmis/oauth2-providers.cxx    |  2 +-
- src/libcmis/onedrive-document.cxx   | 17 +++---
- src/libcmis/onedrive-folder.cxx     | 14 +++--
- src/libcmis/onedrive-object.cxx     | 13 +++--
- src/libcmis/onedrive-repository.cxx |  2 +-
- src/libcmis/onedrive-session.cxx    | 51 +++++------------
- src/libcmis/onedrive-utils.cxx      | 10 ++--
- src/libcmis/session-factory.cxx     |  2 +-
- 11 files changed, 138 insertions(+), 67 deletions(-)
-
-diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx
-index 2638482..227667e 100644
---- a/src/libcmis/http-session.cxx
-+++ b/src/libcmis/http-session.cxx
-@@ -293,6 +293,94 @@ libcmis::HttpResponsePtr HttpSession::httpGetRequest( string url )
-     return response;
- }
- 
-+libcmis::HttpResponsePtr HttpSession::httpPatchRequest( string url, istream& is, vector< string > headers )
-+{
-+    checkOAuth2( url );
-+
-+    // Duplicate istream in case we need to retry
-+    string isStr( static_cast< stringstream const&>( stringstream( ) << is.rdbuf( ) ).str( ) );
-+
-+    istringstream isOriginal( isStr ), isBackup( isStr );
-+
-+    // Reset the handle for the request
-+    curl_easy_reset( m_curlHandle );
-+    initProtocols( );
-+
-+    libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
-+
-+    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEFUNCTION, lcl_bufferData );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEDATA, response->getData( ).get( ) );
-+
-+    curl_easy_setopt( m_curlHandle, CURLOPT_HEADERFUNCTION, &lcl_getHeaders );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_WRITEHEADER, response.get() );
-+
-+    curl_easy_setopt( m_curlHandle, CURLOPT_MAXREDIRS, 20);
-+
-+    // Get the stream length
-+    is.seekg( 0, ios::end );
-+    long size = is.tellg( );
-+    is.seekg( 0, ios::beg );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_INFILESIZE, size );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_READDATA, &isOriginal );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_READFUNCTION, lcl_readStream );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_UPLOAD, 1 );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_CUSTOMREQUEST, "PATCH" );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_IOCTLFUNCTION, lcl_ioctlStream );
-+    curl_easy_setopt( m_curlHandle, CURLOPT_IOCTLDATA, &isOriginal );
-+
-+    // If we know for sure that 100-Continue won't be accepted,
-+    // don't even try with it to save one HTTP request.
-+    if ( m_no100Continue )
-+        headers.push_back( "Expect:" );
-+    try
-+    {
-+        httpRunRequest( url, headers );
-+        response->getData( )->finish();
-+    }
-+    catch ( const CurlException& )
-+    {
-+        long status = getHttpStatus( );
-+        /** If we had a HTTP 417 response, this is likely to be due to some
-+            HTTP 1.0 proxy / server not accepting the "Expect: 100-continue"
-+            header. Try to disable this header and try again.
-+        */
-+        if ( status == 417 && !m_no100Continue)
-+        {
-+            // Remember that we don't want 100-Continue for the future requests
-+            m_no100Continue = true;
-+            response = httpPutRequest( url, isBackup, headers );
-+        }
-+
-+        // If the access token is expired, we get 401 error,
-+        // Need to use the refresh token to get a new one.
-+        if ( status == 401 && !getRefreshToken( ).empty( ) && !m_refreshedToken )
-+        {
-+
-+            // Refresh the token
-+            oauth2Refresh();
-+
-+            // Resend the query
-+            try
-+            {
-+                // Avoid infinite recursive call
-+                m_refreshedToken = true;
-+                response = httpPutRequest( url, isBackup, headers );
-+                m_refreshedToken = false;
-+            }
-+            catch (const CurlException&)
-+            {
-+                m_refreshedToken = false;
-+                throw;
-+            }
-+        }
-+        // Has tried but failed
-+        if ( ( status != 417 || m_no100Continue ) &&
-+             ( status != 401 || getRefreshToken( ).empty( ) || m_refreshedToken ) ) throw;
-+    }
-+    m_refreshedToken = false;
-+    return response;
-+}
-+
- libcmis::HttpResponsePtr HttpSession::httpPutRequest( string url, istream& is, vector< string > headers )
- {
-     checkOAuth2( url );
-diff --git a/src/libcmis/http-session.hxx b/src/libcmis/http-session.hxx
-index 851d52d..29de64d 100644
---- a/src/libcmis/http-session.hxx
-+++ b/src/libcmis/http-session.hxx
-@@ -132,6 +132,9 @@ class HttpSession
-         virtual void setOAuth2Data( libcmis::OAuth2DataPtr oauth2 );
- 
-         libcmis::HttpResponsePtr httpGetRequest( std::string url );
-+        libcmis::HttpResponsePtr httpPatchRequest( std::string url,
-+                                                 std::istream& is,
-+                                                 std::vector< std::string > headers );
-         libcmis::HttpResponsePtr httpPutRequest( std::string url,
-                                                  std::istream& is,
-                                                  std::vector< std::string > headers );
-diff --git a/src/libcmis/oauth2-handler.cxx b/src/libcmis/oauth2-handler.cxx
-index a3320e3..842769f 100644
---- a/src/libcmis/oauth2-handler.cxx
-+++ b/src/libcmis/oauth2-handler.cxx
-@@ -91,8 +91,8 @@ void OAuth2Handler::fetchTokens( string authCode )
-     string post =
-         "code="              + authCode +
-         "&client_id="        + m_data->getClientId() +
--        "&client_secret="    + m_data->getClientSecret() +
-         "&redirect_uri="     + m_data->getRedirectUri() +
-+        "&scope="            + libcmis::escape( m_data->getScope() ) +
-         "&grant_type=authorization_code" ;
- 
-     istringstream is( post );
-@@ -121,7 +121,6 @@ void OAuth2Handler::refresh( )
-     string post =
-         "refresh_token="     + m_refresh +
-         "&client_id="        + m_data->getClientId() +
--        "&client_secret="    + m_data->getClientSecret() +
-         "&grant_type=refresh_token" ;
- 
-     istringstream is( post );
-diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
-index 5a4926b..db6fbef 100644
---- a/src/libcmis/oauth2-providers.cxx
-+++ b/src/libcmis/oauth2-providers.cxx
-@@ -311,7 +311,7 @@ OAuth2Parser OAuth2Providers::getOAuth2Parser( const std::string& url )
-         return OAuth2Alfresco;
-     else if ( boost::starts_with( url, "https://www.googleapis.com/drive/v2" ) )
-         return OAuth2Gdrive;
--    else if ( boost::starts_with( url, "https://apis.live.net/v5.0" ) )
-+    else if ( boost::starts_with( url, "https://graph.microsoft.com/v1.0" ) )
-         return OAuth2Onedrive;
- 
-     return OAuth2Gdrive;
-diff --git a/src/libcmis/onedrive-document.cxx b/src/libcmis/onedrive-document.cxx
-index f753b42..863a92f 100644
---- a/src/libcmis/onedrive-document.cxx
-+++ b/src/libcmis/onedrive-document.cxx
-@@ -73,7 +73,7 @@ boost::shared_ptr< istream > OneDriveDocument::getContentStream( string /*stream
-     boost::shared_ptr< istream > stream;
-     string streamUrl = getStringProperty( "source" );
-     if ( streamUrl.empty( ) )
--        throw libcmis::Exception( "can not found stream url" );
-+        throw libcmis::Exception( "could not find stream url" );
- 
-     try
-     {
-@@ -89,15 +89,15 @@ boost::shared_ptr< istream > OneDriveDocument::getContentStream( string /*stream
- void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os, 
-                                          string /*contentType*/, 
-                                          string fileName, 
--                                         bool /*overwrite*/ ) 
-+                                         bool bReplaceExisting )
- {
-     if ( !os.get( ) )
-         throw libcmis::Exception( "Missing stream" );
--    
-+
-     string metaUrl = getUrl( );
- 
-     // Update file name meta information
--    if ( !fileName.empty( ) && fileName != getContentFilename( ) )
-+    if ( bReplaceExisting && !fileName.empty( ) && fileName != getContentFilename( ) )
-     {
-         Json metaJson;
-         Json fileJson( fileName.c_str( ) );
-@@ -108,7 +108,7 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
-         headers.push_back( "Content-Type: application/json" );
-         try
-         {
--            getSession()->httpPutRequest( metaUrl, is, headers );
-+            getSession()->httpPatchRequest( metaUrl, is, headers );
-         }
-         catch ( const CurlException& e )
-         {
-@@ -117,9 +117,9 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
-     }
- 
-     fileName = libcmis::escape( getStringProperty( "cmis:name" ) );
--    string putUrl = getSession( )->getBindingUrl( ) + "/" + 
--                    getStringProperty( "cmis:parentId" ) + "/files/" +
--                    fileName + "?overwrite=true";
-+    string putUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" +
-+                    getStringProperty( "cmis:parentId" ) + ":/" +
-+                    fileName + ":/content";
-     
-     // Upload stream
-     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
-@@ -142,6 +142,7 @@ void OneDriveDocument::setContentStream( boost::shared_ptr< ostream > os,
- libcmis::DocumentPtr OneDriveDocument::checkOut( )
- {
-     // OneDrive doesn't have CheckOut, so just return the same document here
-+    // TODO: no longer true - onedrive now has checkout/checkin
-     libcmis::ObjectPtr obj = getSession( )->getObject( getId( ) );
-     libcmis::DocumentPtr checkout =
-         boost::dynamic_pointer_cast< libcmis::Document > ( obj );
-diff --git a/src/libcmis/onedrive-folder.cxx b/src/libcmis/onedrive-folder.cxx
-index a9ae694..c1980c8 100644
---- a/src/libcmis/onedrive-folder.cxx
-+++ b/src/libcmis/onedrive-folder.cxx
-@@ -57,7 +57,9 @@ OneDriveFolder::~OneDriveFolder( )
- vector< libcmis::ObjectPtr > OneDriveFolder::getChildren( ) 
- {
-     vector< libcmis::ObjectPtr > children;
--    string query = getSession( )->getBindingUrl( ) + "/" + getId( ) + "/files";
-+    // TODO: limited to 200 items by default - to get more one would have to
-+    // follow @odata.nextLink or change pagination size
-+    string query = getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( ) + "/children";
- 
-     string res;
-     try
-@@ -70,7 +72,7 @@ vector< libcmis::ObjectPtr > OneDriveFolder::getChildren( )
-     }
- 
-     Json jsonRes = Json::parse( res );
--    Json::JsonVector objs = jsonRes["data"].getList( );
-+    Json::JsonVector objs = jsonRes["value"].getList( );
-     
-     // Create children objects from Json objects
-     for(unsigned int i = 0; i < objs.size(); i++)
-@@ -85,8 +87,7 @@ libcmis::FolderPtr OneDriveFolder::createFolder(
-     const PropertyPtrMap& properties ) 
- {
-     Json propsJson = OneDriveUtils::toOneDriveJson( properties );
--
--    string uploadUrl = getSession( )->getBindingUrl( ) + "/" + getId( );
-+    string uploadUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( ) + "/children";
-     
-     std::istringstream is( propsJson.toString( ) );
-     string response;
-@@ -126,9 +127,10 @@ libcmis::DocumentPtr OneDriveFolder::createDocument(
-         }
-     }
- 
-+    // TODO: limited to 4MB, larger uploads need dedicated UploadSession
-     fileName = libcmis::escape( fileName );
--    string newDocUrl = getSession( )->getBindingUrl( ) + "/" +
--                       getId( ) + "/files/" + fileName;
-+    string newDocUrl = getSession( )->getBindingUrl( ) + "/me/drive/items/" +
-+                       getId( ) + ":/" + fileName + ":/content";
-     boost::shared_ptr< istream> is ( new istream ( os->rdbuf( ) ) );
-     vector< string > headers;
-     string res;
-diff --git a/src/libcmis/onedrive-object.cxx b/src/libcmis/onedrive-object.cxx
-index 976a97b..8deb591 100644
---- a/src/libcmis/onedrive-object.cxx
-+++ b/src/libcmis/onedrive-object.cxx
-@@ -65,7 +65,7 @@ void OneDriveObject::initializeFromJson ( Json json, string /*id*/, string /*nam
-     Json::JsonObject objs = json.getObjects( );
-     Json::JsonObject::iterator it;
-     PropertyPtr property;
--    bool isFolder = json["type"].toString( ) == "folder";
-+    bool isFolder = json["folder"].toString( ) != "";
-     for ( it = objs.begin( ); it != objs.end( ); ++it)
-     {
-         property.reset( new OneDriveProperty( it->first, it->second ) );
-@@ -74,7 +74,12 @@ void OneDriveObject::initializeFromJson ( Json json, string /*id*/, string /*nam
-         {
-             property.reset( new OneDriveProperty( "cmis:contentStreamFileName", it->second ) );
-             m_properties[ property->getPropertyType( )->getId()] = property;
--        }
-+        } else if ( it->first == "parentReference" ) {
-+            if (it->second["id"].toString() != "") {
-+                property.reset( new OneDriveProperty( "cmis:parentId", it->second["id"] ) );
-+                m_properties[ property->getPropertyType( )->getId()] = property;
-+            }
-+       }
-     }
- 
-     m_refreshTimestamp = time( NULL );
-@@ -122,7 +127,7 @@ void OneDriveObject::remove( bool /*allVersions*/ )
- 
- string OneDriveObject::getUrl( )
- {
--    return getSession( )->getBindingUrl( ) + "/" + getId( );
-+    return getSession( )->getBindingUrl( ) + "/me/drive/items/" + getId( );
- }
- 
- string OneDriveObject::getUploadUrl( )
-@@ -152,7 +157,7 @@ libcmis::ObjectPtr OneDriveObject::updateProperties(
-     {   
-         vector< string > headers;
-         headers.push_back( "Content-Type: application/json" );
--        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
-+        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
-     }
-     catch ( const CurlException& e )
-     {   
-diff --git a/src/libcmis/onedrive-repository.cxx b/src/libcmis/onedrive-repository.cxx
-index 3eaac9c..b01f5c2 100644
---- a/src/libcmis/onedrive-repository.cxx
-+++ b/src/libcmis/onedrive-repository.cxx
-@@ -35,7 +35,7 @@ OneDriveRepository::OneDriveRepository( ) :
-     m_description = "One Drive repository";
-     m_productName = "One Drive";
-     m_productVersion = "v5";
--    m_rootId = "me/skydrive";
-+    m_rootId = "/me/drive/root";
-  
-     m_capabilities[ ACL ] = "discover";
-     m_capabilities[ AllVersionsSearchable ] = "true";
-diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
-index a6652b4..05ff45e 100644
---- a/src/libcmis/onedrive-session.cxx
-+++ b/src/libcmis/onedrive-session.cxx
-@@ -74,7 +74,9 @@ libcmis::ObjectPtr OneDriveSession::getObject( string objectId )
- {
-     // Run the http request to get the properties definition
-     string res;
--    string objectLink = m_bindingUrl + "/" + objectId;
-+    string objectLink = m_bindingUrl + "/me/drive/items/" + objectId;
-+    if (objectId == getRootId())
-+        objectLink = m_bindingUrl + objectId;
-     try
-     {
-         res = httpGetRequest( objectLink )->getStream()->str();
-@@ -90,12 +92,11 @@ libcmis::ObjectPtr OneDriveSession::getObject( string objectId )
- libcmis::ObjectPtr OneDriveSession::getObjectFromJson( Json& jsonRes ) 
- {
-     libcmis::ObjectPtr object;
--    string kind = jsonRes["type"].toString( );
--    if ( kind == "folder" || kind == "album" )
-+    if ( jsonRes["folder"].toString() != "" )
-     {
-         object.reset( new OneDriveFolder( this, jsonRes ) );
-     }
--    else if ( kind == "file" )
-+    else if ( jsonRes["file"].toString() != "" )
-     {
-         object.reset( new OneDriveDocument( this, jsonRes ) );
-     }
-@@ -108,44 +109,18 @@ libcmis::ObjectPtr OneDriveSession::getObjectFromJson( Json& jsonRes )
- 
- libcmis::ObjectPtr OneDriveSession::getObjectByPath( string path )
- {
--    string id;
--    if ( path == "/" )
--    {
--        id = "me/skydrive";
--    }
--    else
-+    string res;
-+    string objectQuery = m_bindingUrl + "/me/drive/root:" + libcmis::escape( path );
-+    try
-     {
--        path = "/SkyDrive" + path;
--        size_t pos = path.rfind("/");
--        string name = libcmis::escape( path.substr( pos + 1, path.size( ) ) );
--        string res;
--        string objectQuery = m_bindingUrl + "/me/skydrive/search?q=" + name;
--        try
--        {
--            res = httpGetRequest( objectQuery )->getStream( )->str( );
--        }
--        catch ( const CurlException& e )
--        {
--            throw e.getCmisException( );
--        }
--        Json jsonRes = Json::parse( res );
--        Json::JsonVector objs = jsonRes["data"].getList( );
--        
--        // Searching for a match in the path to the object
--        for ( unsigned int i = 0; i < objs.size( ); i++ )
--        {   
--            if ( isAPathMatch( objs[i], path ) )
--            {
--                id = objs[i]["id"].toString( );
--                break;
--            }
--        }
-+        res = httpGetRequest( objectQuery )->getStream( )->str( );
-     }
--    if ( id.empty( ) )
-+    catch ( const CurlException& e )
-     {
--        throw libcmis::Exception( "No file could be found" );
-+        throw libcmis::Exception( "No file could be found for path " + path + ": " + e.what() );
-     }
--    return getObject( id );
-+    Json jsonRes = Json::parse( res );
-+    return getObjectFromJson( jsonRes );
- }
- 
- bool OneDriveSession::isAPathMatch( Json objectJson, string path )
-diff --git a/src/libcmis/onedrive-utils.cxx b/src/libcmis/onedrive-utils.cxx
-index dc6ec5d..17ed324 100644
---- a/src/libcmis/onedrive-utils.cxx
-+++ b/src/libcmis/onedrive-utils.cxx
-@@ -44,16 +44,16 @@ string OneDriveUtils::toCmisKey( const string& key )
-         convertedKey = "cmis:createdBy";
-     else if ( key == "description" )
-         convertedKey = "cmis:description";
--    else if ( key == "created_time" )
-+    else if ( key == "createdDateTime" )
-         convertedKey = "cmis:creationDate";
--    else if ( key == "updated_time" )
-+    else if ( key == "lastModifiedDateTime" )
-         convertedKey = "cmis:lastModificationDate";
-     else if ( key == "name" )
-         convertedKey = "cmis:name";
-     else if ( key == "size" )
-         convertedKey = "cmis:contentStreamLength";
--    else if ( key == "parent_id" )
--        convertedKey = "cmis:parentId";
-+    else if ( key == "@microsoft.graph.downloadUrl" )
-+        convertedKey = "source";
-     else convertedKey = key;
-     return convertedKey;
- }
-@@ -75,8 +75,6 @@ string OneDriveUtils::toOneDriveKey( const string& key )
-         convertedKey = "name";
-     else if ( key == "cmis:contentStreamLength" )
-         convertedKey = "file_size";
--    else if ( key == "cmis:parentId" )
--        convertedKey = "parent_id";
-     else convertedKey = key;
-     return convertedKey;
- }
-diff --git a/src/libcmis/session-factory.cxx b/src/libcmis/session-factory.cxx
-index ba55cd9..e740afb 100644
---- a/src/libcmis/session-factory.cxx
-+++ b/src/libcmis/session-factory.cxx
-@@ -71,7 +71,7 @@ namespace libcmis
-                 session = new GDriveSession( bindingUrl, username, password,
-                                              oauth2, verbose );
-             }
--            else if ( bindingUrl == "https://apis.live.net/v5.0" )
-+            else if ( bindingUrl == "https://graph.microsoft.com/v1.0" )
-             {
-                 session = new OneDriveSession( bindingUrl, username, password,
-                                                oauth2, verbose);

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch
deleted file mode 100644
index c2056d2aa239..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-gdrive-do-not-allow-copying.patch
+++ /dev/null
@@ -1,722 +0,0 @@
-From 8434965bed146a1ff543787336cf8d98092b42e6 Mon Sep 17 00:00:00 2001
-From: David Tardon <dtardon@redhat.com>
-Date: Sat, 30 Mar 2019 16:35:43 +0100
-Subject: [PATCH] gdrive-session: do not allow copying
-
----
- qa/libcmis/test-gdrive.cxx     | 167 +++++++++++++++++----------------
- src/libcmis/gdrive-session.cxx |   5 -
- src/libcmis/gdrive-session.hxx |   4 +-
- 3 files changed, 87 insertions(+), 89 deletions(-)
-
-diff --git a/qa/libcmis/test-gdrive.cxx b/qa/libcmis/test-gdrive.cxx
-index ef9afd8..b04e230 100644
---- a/qa/libcmis/test-gdrive.cxx
-+++ b/qa/libcmis/test-gdrive.cxx
-@@ -30,6 +30,7 @@
- #include <cppunit/TestFixture.h>
- #include <cppunit/TestAssert.h>
- 
-+#include <memory>
- #include <string>
- 
- #if defined __clang__
-@@ -82,6 +83,8 @@ namespace
-     }
- }
- 
-+typedef std::unique_ptr<GDriveSession> GDriveSessionPtr;
-+
- class GDriveTest : public CppUnit::TestFixture
- {
-     public:
-@@ -160,10 +163,10 @@ class GDriveTest : public CppUnit::TestFixture
-         CPPUNIT_TEST_SUITE_END( );
- 
-     private:
--        GDriveSession getTestSession( string username, string password, bool with2FA = false );
-+        GDriveSessionPtr getTestSession( string username, string password, bool with2FA = false );
- };
- 
--GDriveSession GDriveTest::getTestSession( string username, string password, bool with2FA )
-+GDriveSessionPtr GDriveTest::getTestSession( string username, string password, bool with2FA )
- {
-     libcmis::OAuth2DataPtr oauth2(
-         new libcmis::OAuth2Data( AUTH_URL, TOKEN_URL, SCOPE,
-@@ -207,12 +210,12 @@ GDriveSession GDriveTest::getTestSession( string username, string password, bool
-     curl_mockup_addResponse ( TOKEN_URL.c_str( ), empty.c_str( ), "POST",
-                               DATA_DIR "/gdrive/token-response.json", 200, true );
- 
--    return GDriveSession( BASE_URL, username, password, oauth2, false );
-+    return GDriveSessionPtr( new GDriveSession( BASE_URL, username, password, oauth2, false ) );
- }
- 
- void GDriveTest::sessionAuthenticationTest( )
- {
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string empty;
- 
-     // Check authentication request for email
-@@ -259,18 +262,18 @@ void GDriveTest::sessionAuthenticationTest( )
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong access token",
-          string ( "mock-access-token" ),
--         session.m_oauth2Handler->getAccessToken( ));
-+         session->m_oauth2Handler->getAccessToken( ));
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong refresh token",
-         string ("mock-refresh-token"),
--        session.m_oauth2Handler->getRefreshToken( ));
-+        session->m_oauth2Handler->getRefreshToken( ));
- }
- 
- void GDriveTest::sessionAuthenticationTestWith2FA( )
- {
-     libcmis::SessionFactory::setOAuth2AuthCodeProvider( lcl_authCodeFallback );
- 
--    GDriveSession session = getTestSession( USERNAME2, PASSWORD2, true );
-+    GDriveSessionPtr session = getTestSession( USERNAME2, PASSWORD2, true );
-     string empty;
- 
-     // Check authentication request for email
-@@ -327,11 +330,11 @@ void GDriveTest::sessionAuthenticationTestWith2FA( )
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong access token",
-          string ( "mock-access-token" ),
--         session.m_oauth2Handler->getAccessToken( ));
-+         session->m_oauth2Handler->getAccessToken( ));
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong refresh token",
-         string ("mock-refresh-token"),
--        session.m_oauth2Handler->getRefreshToken( ));
-+        session->m_oauth2Handler->getRefreshToken( ));
- }
- 
- void GDriveTest::sessionExpiryTokenGetTest( )
-@@ -340,7 +343,7 @@ void GDriveTest::sessionExpiryTokenGetTest( )
-     // We need to use the refresh key to get a new one.
- 
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     curl_mockup_reset( );
-     static const string objectId("aFileId");
-@@ -354,17 +357,17 @@ void GDriveTest::sessionExpiryTokenGetTest( )
-     try
-     {
-         // GET expires, need to refresh then GET again
--        libcmis::ObjectPtr obj = session.getObject( objectId );
-+        libcmis::ObjectPtr obj = session->getObject( objectId );
-     }
-     catch ( ... )
-     {
--        if ( session.getHttpStatus( ) == 401 )
-+        if ( session->getHttpStatus( ) == 401 )
-         {
-             // Check if access token is refreshed
-             CPPUNIT_ASSERT_EQUAL_MESSAGE(
-                    "wrong access token",
-                    string ( "new-access-token" ),
--                   session.m_oauth2Handler->getAccessToken( ) );
-+                   session->m_oauth2Handler->getAccessToken( ) );
-         }
-     }
- }
-@@ -375,7 +378,7 @@ void GDriveTest::sessionExpiryTokenPostTest( )
-     // We need to use the refresh key to get a new one.
- 
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     curl_mockup_reset( );
-     static const string folderId("aFileId");
-@@ -392,7 +395,7 @@ void GDriveTest::sessionExpiryTokenPostTest( )
-     // refresh and then POST again
-     curl_mockup_addResponse( metaUrl.c_str( ), "",
-                                "POST", "", 401, false );
--    libcmis::FolderPtr parent = session.getFolder( folderId );
-+    libcmis::FolderPtr parent = session->getFolder( folderId );
- 
-     try
-     {
-@@ -402,13 +405,13 @@ void GDriveTest::sessionExpiryTokenPostTest( )
-     }
-     catch ( ... )
-     {
--        if ( session.getHttpStatus( ) == 401 )
-+        if ( session->getHttpStatus( ) == 401 )
-         {
-             // Check if access token is refreshed
-             CPPUNIT_ASSERT_EQUAL_MESSAGE(
-                    "wrong access token",
-                    string ( "new-access-token" ),
--                   session.m_oauth2Handler->getAccessToken( ) );
-+                   session->m_oauth2Handler->getAccessToken( ) );
-         }
-     }
- }
-@@ -419,7 +422,7 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
-     // We need to use the refresh key to get a new one.
- 
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     curl_mockup_reset( );
-     static const string objectId("aFileId");
-@@ -433,9 +436,9 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
-     // 401 response, token is expired
-     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 401, false);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     try
-     {
-@@ -444,13 +447,13 @@ void GDriveTest::sessionExpiryTokenDeleteTest( )
-     }
-     catch ( ... )
-     {
--        if ( session.getHttpStatus( ) == 401 )
-+        if ( session->getHttpStatus( ) == 401 )
-         {
-             // Check if access token is refreshed
-             CPPUNIT_ASSERT_EQUAL_MESSAGE(
-                    "wrong access token",
-                    string ( "new-access-token" ),
--                   session.m_oauth2Handler->getAccessToken( ) );
-+                   session->m_oauth2Handler->getAccessToken( ) );
-             const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
-             CPPUNIT_ASSERT_MESSAGE( "Delete request not sent", deleteRequest );
-             curl_mockup_HttpRequest_free( deleteRequest );
-@@ -465,7 +468,7 @@ void GDriveTest::sessionExpiryTokenPutTest( )
-     // We need to use the refresh key to get a new one.
- 
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     curl_mockup_reset( );
-     static const string objectId("aFileId");
-@@ -480,7 +483,7 @@ void GDriveTest::sessionExpiryTokenPutTest( )
-     // 401 response, token is expired
-     curl_mockup_addResponse( url.c_str( ),"", "PUT", "", 401, false );
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     try
-     {
-@@ -489,13 +492,13 @@ void GDriveTest::sessionExpiryTokenPutTest( )
-     }
-     catch ( ... )
-     {
--        if ( session.getHttpStatus( ) == 401 )
-+        if ( session->getHttpStatus( ) == 401 )
-         {
-             // Check if access token is refreshed
-             CPPUNIT_ASSERT_EQUAL_MESSAGE(
-                    "wrong access token",
-                    string ( "new-access-token" ),
--                   session.m_oauth2Handler->getAccessToken( ) );
-+                   session->m_oauth2Handler->getAccessToken( ) );
-         }
-     }
- }
-@@ -511,12 +514,12 @@ void GDriveTest::getDocumentTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/files/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
-     // Check if we got the document object.
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
-@@ -546,7 +549,7 @@ void GDriveTest::getFolderTest( )
- {
-     curl_mockup_reset( );
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     static const string folderId( "aFolderId" );
-     static const string parentId( "parentID" );
-     string url = BASE_URL + "/files/" + folderId;
-@@ -557,7 +560,7 @@ void GDriveTest::getFolderTest( )
-     curl_mockup_addResponse( parentUrl.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/folder.json", 200, true);
-     // Check if we got the Folder object.
--    libcmis::FolderPtr folder = session.getFolder( folderId );
-+    libcmis::FolderPtr folder = session->getFolder( folderId );
-     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
-             NULL != folder );
- 
-@@ -578,7 +581,7 @@ void GDriveTest::getFolderTest( )
- void GDriveTest::getDocumentParentsTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     static const string parentId( "aFolderId" );
-@@ -594,7 +597,7 @@ void GDriveTest::getDocumentParentsTest( )
-     curl_mockup_addResponse( parent2Url.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/folder2.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( "aFileId" );
-+    libcmis::ObjectPtr object = session->getObject( "aFileId" );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     CPPUNIT_ASSERT_MESSAGE( "Document expected", document != NULL );
-@@ -610,7 +613,7 @@ void GDriveTest::getDocumentParentsTest( )
- void GDriveTest::getContentStreamTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     string url = BASE_URL + "/files/" + documentId;
-@@ -620,7 +623,7 @@ void GDriveTest::getContentStreamTest( )
-     string downloadUrl = "https://downloadLink";
-     curl_mockup_addResponse( downloadUrl.c_str( ), "", "GET", expectedContent.c_str( ), 0, false );
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     try
-@@ -642,7 +645,7 @@ void GDriveTest::getContentStreamTest( )
- void GDriveTest::setContentStreamTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string documentId( "aFileId" );
-     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
-@@ -652,7 +655,7 @@ void GDriveTest::setContentStreamTest( )
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     curl_mockup_addResponse( url.c_str( ), "",
-@@ -687,7 +690,7 @@ void GDriveTest::setContentStreamGdocTest( )
- {
- 
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string documentId( "aFileId" );
-     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
-@@ -697,7 +700,7 @@ void GDriveTest::setContentStreamGdocTest( )
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     curl_mockup_addResponse( url.c_str( ), "convert=true",
-@@ -728,7 +731,7 @@ void GDriveTest::getChildrenTest( )
- {
-     curl_mockup_reset( );
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     static const string folderId ("aFolderId");
-     string url = BASE_URL + "/files/" + folderId;
-     curl_mockup_addResponse( url.c_str( ), "",
-@@ -742,7 +745,7 @@ void GDriveTest::getChildrenTest( )
-     curl_mockup_addResponse( urlChildDocument.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( folderId );
-+    libcmis::ObjectPtr obj = session->getObject( folderId );
- 
-     // Check if we got the Folder object.
-     libcmis::FolderPtr folder = boost::dynamic_pointer_cast< libcmis::Folder >( obj );
-@@ -777,10 +780,10 @@ void GDriveTest::getTypeTest( )
- {
-     curl_mockup_reset( );
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     string expectedId( "cmis:document" );
--    libcmis::ObjectTypePtr actual = session.getType( expectedId );
-+    libcmis::ObjectTypePtr actual = session->getType( expectedId );
- 
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Id for fetched type", expectedId, actual->getId( ) );
- }
-@@ -789,8 +792,8 @@ void GDriveTest::getRepositoriesTest( )
- {
-      curl_mockup_reset( );
- 
--     GDriveSession session = getTestSession( USERNAME, PASSWORD );
--     vector< libcmis::RepositoryPtr > actual = session.getRepositories( );
-+     GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-+     vector< libcmis::RepositoryPtr > actual = session->getRepositories( );
- 
-      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong number of repositories", size_t( 1 ),
-                                    actual.size( ) );
-@@ -803,11 +806,11 @@ void GDriveTest::getObjectTest()
- {
-     static const string objectId ("aFileId");
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/files/" + objectId;
-     curl_mockup_addResponse ( url.c_str( ), "",
-                               "GET", DATA_DIR "/gdrive/gdoc-file.json", 200, true);
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
-     boost::shared_ptr<GDriveObject> obj = boost::dynamic_pointer_cast
-                                             <GDriveObject>(object);
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id", objectId,
-@@ -816,12 +819,12 @@ void GDriveTest::getObjectTest()
- 
- void GDriveTest::getObjectByPathRootTest()
- {
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string rootUrl = BASE_URL + "/files/root";
-     curl_mockup_addResponse ( rootUrl.c_str( ), "",
-                               "GET", DATA_DIR "/gdrive/folder.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObjectByPath( "/" );
-+    libcmis::ObjectPtr object = session->getObjectByPath( "/" );
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id",
-                                   string("testFolder"), object->getName( ) );
- }
-@@ -829,7 +832,7 @@ void GDriveTest::getObjectByPathRootTest()
- void GDriveTest::getObjectByPathTest()
- {
-     // Mockup setup
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string rootChildUrl = BASE_URL + "/files/root/children/";
-     curl_mockup_addResponse ( rootChildUrl.c_str( ), "q=title+=+'GDrive File'",
-                               "GET", DATA_DIR "/gdrive/root_child_search.json", 200, true );
-@@ -839,7 +842,7 @@ void GDriveTest::getObjectByPathTest()
-                              "GET", DATA_DIR "/gdrive/document.json", 200, true );
- 
-     // Tested method
--    libcmis::ObjectPtr object = session.getObjectByPath( "/GDrive File" );
-+    libcmis::ObjectPtr object = session->getObjectByPath( "/GDrive File" );
- 
-     // Check the result
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object",
-@@ -849,7 +852,7 @@ void GDriveTest::getObjectByPathTest()
- void GDriveTest::getObjectByPathMissingTest()
- {
-     // Mockup setup
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string rootChildUrl = BASE_URL + "/files/root/children/";
-     curl_mockup_addResponse ( rootChildUrl.c_str( ), "q=title+=+'GDrive File'",
-                               "GET", DATA_DIR "/gdrive/root_child_missing.json", 200, true );
-@@ -857,7 +860,7 @@ void GDriveTest::getObjectByPathMissingTest()
-     // Tested method
-     try
-     {
--        libcmis::ObjectPtr object = session.getObjectByPath( "/GDrive File" );
-+        libcmis::ObjectPtr object = session->getObjectByPath( "/GDrive File" );
-         CPPUNIT_FAIL( "objectNotFound exception expected" );
-     }
-     catch ( libcmis::Exception& e )
-@@ -872,12 +875,12 @@ void GDriveTest::getDocumentAllowableActionsTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/files/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
- 
-@@ -896,12 +899,12 @@ void GDriveTest::getFolderAllowableActionsTest( )
-     curl_mockup_reset( );
-     static const string folderId ("aFolderId");
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/files/" + folderId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/folder.json", 200, true);
- 
--    libcmis::FolderPtr folder = session.getFolder( folderId );
-+    libcmis::FolderPtr folder = session->getFolder( folderId );
- 
-     boost::shared_ptr< libcmis::AllowableActions > actions = folder->getAllowableActions( );
- 
-@@ -917,14 +920,14 @@ void GDriveTest::getFolderAllowableActionsTest( )
- void GDriveTest::checkOutTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     string url = BASE_URL + "/files/" + documentId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
-     libcmis::DocumentPtr checkout = document->checkOut( );
-     CPPUNIT_ASSERT_MESSAGE( "CheckOut failed", NULL != checkout );
-@@ -933,7 +936,7 @@ void GDriveTest::checkOutTest( )
- void GDriveTest::checkInTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string documentId( "aFileId" );
-     const string uploadBaseUrl = "https://www.googleapis.com/upload/drive/v2/files/";
-@@ -943,7 +946,7 @@ void GDriveTest::checkInTest( )
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     curl_mockup_addResponse( url.c_str( ), "",
-@@ -962,7 +965,7 @@ void GDriveTest::checkInTest( )
- void GDriveTest::deleteTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string objectId( "aFileId" );
- 
-@@ -971,7 +974,7 @@ void GDriveTest::deleteTest( )
-                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
-     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 204, false);
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     object->remove( );
-     const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
-@@ -982,7 +985,7 @@ void GDriveTest::deleteTest( )
- void GDriveTest::moveTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string objectId( "aFileId" );
-     const string sourceId( "aFolderId" );
-     const string desId( "aNewFolderId" );
-@@ -999,10 +1002,10 @@ void GDriveTest::moveTest( )
-     curl_mockup_addResponse( desUrl.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/folder2.json", 200, true );
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
--    libcmis::FolderPtr source = session.getFolder( sourceId );
--    libcmis::FolderPtr destination = session.getFolder( desId );
-+    libcmis::FolderPtr source = session->getFolder( sourceId );
-+    libcmis::FolderPtr destination = session->getFolder( desId );
- 
-     object->move( source, destination );
-     const char* moveRequest = curl_mockup_getRequestBody( url.c_str( ), "", "PUT" );
-@@ -1015,7 +1018,7 @@ void GDriveTest::moveTest( )
- void GDriveTest::createDocumentTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string documentId( "aFileId" );
-     const string folderId( "aFolderId" );
- 
-@@ -1034,7 +1037,7 @@ void GDriveTest::createDocumentTest( )
-     curl_mockup_addResponse( documentUrl.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document2.json", 200, true);
- 
--    libcmis::FolderPtr parent = session.getFolder( folderId );
-+    libcmis::FolderPtr parent = session->getFolder( folderId );
- 
-     try
-     {
-@@ -1067,7 +1070,7 @@ void GDriveTest::createDocumentTest( )
- void GDriveTest::createFolderTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string folderId( "aFolderId" );
- 
-     const string folderUrl = BASE_URL + "/files/" + folderId;
-@@ -1077,7 +1080,7 @@ void GDriveTest::createFolderTest( )
-                                "GET", DATA_DIR "/gdrive/folder.json", 200, true );
-     curl_mockup_addResponse( metaUrl.c_str( ), "",
-                                "POST", DATA_DIR "/gdrive/folder2.json", 200, true );
--    libcmis::FolderPtr parent = session.getFolder( folderId );
-+    libcmis::FolderPtr parent = session->getFolder( folderId );
-     try
-     {
-         PropertyPtrMap properties;
-@@ -1106,7 +1109,7 @@ void GDriveTest::createFolderTest( )
- void GDriveTest::removeTreeTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string folderId( "aFolderId" );
- 
-     const string folderUrl = BASE_URL + "/files/" + folderId;
-@@ -1116,7 +1119,7 @@ void GDriveTest::removeTreeTest( )
-                                "GET", DATA_DIR "/gdrive/folder.json", 200, true );
-     curl_mockup_addResponse( trashUrl.c_str( ), "",
-                                "POST", "", 200, false );
--    libcmis::FolderPtr folder = session.getFolder( folderId );
-+    libcmis::FolderPtr folder = session->getFolder( folderId );
- 
-     // just make sure it doesn't crash
-     folder->removeTree( );
-@@ -1125,13 +1128,13 @@ void GDriveTest::removeTreeTest( )
- void GDriveTest::getContentStreamWithRenditionsTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     string url = BASE_URL + "/files/" + documentId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document.json", 200, true);
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     // pdf stream
-@@ -1197,7 +1200,7 @@ void GDriveTest::getContentStreamWithRenditionsTest( )
- void GDriveTest::updatePropertiesTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string documentId( "aFileId" );
-     const string documentUrl = BASE_URL + "/files/" + documentId;
-     curl_mockup_addResponse( documentUrl.c_str( ), "",
-@@ -1209,7 +1212,7 @@ void GDriveTest::updatePropertiesTest( )
-     // Values for the test
-     string propertyName( "cmis:name" );
-     string expectedValue( "New Title" );
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
- 
-     // Fill the map of properties to change
-     PropertyPtrMap newProperties;
-@@ -1264,16 +1267,16 @@ void GDriveTest::propertyCopyTest( )
- void GDriveTest::getRefreshTokenTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Refresh token does not match",
-                                   string ("mock-refresh-token"),
--                                  session.getRefreshToken( ) );
-+                                  session->getRefreshToken( ) );
- }
- 
- void GDriveTest::getThumbnailUrlTest( )
- {
-     curl_mockup_reset( );
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string documentId( "aFileId" );
- 
-     const string documentUrl = BASE_URL + "/files/" + documentId;
-@@ -1281,7 +1284,7 @@ void GDriveTest::getThumbnailUrlTest( )
-     curl_mockup_addResponse( documentUrl.c_str( ), "",
-                                "GET", DATA_DIR "/gdrive/document.json", 200, true );
- 
--    libcmis::ObjectPtr document = session.getObject( documentId );
-+    libcmis::ObjectPtr document = session->getObject( documentId );
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Thumbnail URL does not match",
-                                    string ("https://aThumbnailLink"),
-                                    document->getThumbnailUrl( ) );
-@@ -1293,7 +1296,7 @@ void GDriveTest::getAllVersionsTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    GDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    GDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/files/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/document.json", 200, true);
-@@ -1301,7 +1304,7 @@ void GDriveTest::getAllVersionsTest( )
-     curl_mockup_addResponse( revisionUrl.c_str( ), "",
-                              "GET", DATA_DIR "/gdrive/allVersions.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
- 
-diff --git a/src/libcmis/gdrive-session.cxx b/src/libcmis/gdrive-session.cxx
-index c31637a..87bb160 100644
---- a/src/libcmis/gdrive-session.cxx
-+++ b/src/libcmis/gdrive-session.cxx
-@@ -56,11 +56,6 @@ GDriveSession::GDriveSession ( string baseUrl,
-     }
- }
- 
--GDriveSession::GDriveSession( const GDriveSession& copy ) :
--    BaseSession( copy )
--{
--}
--
- GDriveSession::GDriveSession() :
-     BaseSession()
- {
-diff --git a/src/libcmis/gdrive-session.hxx b/src/libcmis/gdrive-session.hxx
-index 6fd0777..f60ff6c 100644
---- a/src/libcmis/gdrive-session.hxx
-+++ b/src/libcmis/gdrive-session.hxx
-@@ -41,8 +41,6 @@ class GDriveSession : public BaseSession
-                        libcmis::OAuth2DataPtr oauth2,
-                        bool verbose = false );
- 
--        GDriveSession( const GDriveSession& copy );
--
-         ~GDriveSession ( );
- 
-         virtual libcmis::RepositoryPtr getRepository( );
-@@ -59,6 +57,8 @@ class GDriveSession : public BaseSession
- 
-     private:
-         GDriveSession( );
-+        GDriveSession( const GDriveSession& copy ) = delete;
-+        GDriveSession& operator=( const GDriveSession& copy ) = delete;
- };
- 
- #endif /* _GDRIVE_SESSION_HXX_ */

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch
deleted file mode 100644
index d14f36830f7b..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-onedrive-do-not-allow-copying.patch
+++ /dev/null
@@ -1,430 +0,0 @@
-From d55b04376e509997b01e68bcacebd4cad2ec4002 Mon Sep 17 00:00:00 2001
-From: David Tardon <dtardon@redhat.com>
-Date: Sat, 30 Mar 2019 16:18:40 +0100
-Subject: [PATCH] onedrive-session: do not allow copying
-
----
- qa/libcmis/test-onedrive.cxx     | 102 ++++++++++++++++---------------
- src/libcmis/onedrive-session.cxx |   5 --
- src/libcmis/onedrive-session.hxx |   4 +-
- 3 files changed, 54 insertions(+), 57 deletions(-)
-
-diff --git a/qa/libcmis/test-onedrive.cxx b/qa/libcmis/test-onedrive.cxx
-index 1df1b30..b15edd1 100644
---- a/qa/libcmis/test-onedrive.cxx
-+++ b/qa/libcmis/test-onedrive.cxx
-@@ -68,6 +68,8 @@ static const string SCOPE ( "https://scope/url" );
- static const string REDIRECT_URI ("redirect:uri" );
- static const string BASE_URL ( "https://base/url" );
- 
-+typedef std::unique_ptr<OneDriveSession> OneDriveSessionPtr;
-+
- class OneDriveTest : public CppUnit::TestFixture
- {
-     public:
-@@ -116,10 +118,10 @@ class OneDriveTest : public CppUnit::TestFixture
-         CPPUNIT_TEST_SUITE_END( );
- 
-     private:
--        OneDriveSession getTestSession( string username, string password );
-+        OneDriveSessionPtr getTestSession( string username, string password );
- };
- 
--OneDriveSession OneDriveTest::getTestSession( string username, string password )
-+OneDriveSessionPtr OneDriveTest::getTestSession( string username, string password )
- {
-     libcmis::OAuth2DataPtr oauth2(
-         new libcmis::OAuth2Data( AUTH_URL, TOKEN_URL, SCOPE,
-@@ -154,12 +156,12 @@ OneDriveSession OneDriveTest::getTestSession( string username, string password )
-     curl_mockup_addResponse ( TOKEN_URL.c_str( ), empty.c_str( ), "POST",
-                               DATA_DIR "/onedrive/token-response.json", 200, true );
- 
--    return OneDriveSession( BASE_URL, username, password, oauth2, false );
-+    return OneDriveSessionPtr( new OneDriveSession( BASE_URL, username, password, oauth2, false ) );
- }
- 
- void OneDriveTest::sessionAuthenticationTest( )
- {
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string empty;
- 
-     // Check token request
-@@ -179,11 +181,11 @@ void OneDriveTest::sessionAuthenticationTest( )
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong access token",
-          string ( "mock-access-token" ),
--         session.m_oauth2Handler->getAccessToken( ));
-+         session->m_oauth2Handler->getAccessToken( ));
-     CPPUNIT_ASSERT_EQUAL_MESSAGE(
-         "Wrong refresh token",
-         string ("mock-refresh-token"),
--        session.m_oauth2Handler->getRefreshToken( ));
-+        session->m_oauth2Handler->getRefreshToken( ));
- }
- 
- void OneDriveTest::sessionExpiryTokenGetTest( )
-@@ -192,7 +194,7 @@ void OneDriveTest::sessionExpiryTokenGetTest( )
-     // We need to use the refresh key to get a new one.
- 
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     curl_mockup_reset( );
-     static const string objectId("aFileId");
-@@ -206,17 +208,17 @@ void OneDriveTest::sessionExpiryTokenGetTest( )
-     try
-     {
-         // GET expires, need to refresh then GET again
--        libcmis::ObjectPtr obj = session.getObject( objectId );
-+        libcmis::ObjectPtr obj = session->getObject( objectId );
-     }
-     catch ( ... )
-     {
--        if ( session.getHttpStatus( ) == 401 )
-+        if ( session->getHttpStatus( ) == 401 )
-         {
-             // Check if access token is refreshed
-             CPPUNIT_ASSERT_EQUAL_MESSAGE(
-                    "wrong access token",
-                    string ( "new-access-token" ),
--                   session.m_oauth2Handler->getAccessToken( ) );
-+                   session->m_oauth2Handler->getAccessToken( ) );
-         }
-     }
- }
-@@ -225,8 +227,8 @@ void OneDriveTest::getRepositoriesTest( )
- {
-      curl_mockup_reset( );
- 
--     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
--     vector< libcmis::RepositoryPtr > actual = session.getRepositories( );
-+     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-+     vector< libcmis::RepositoryPtr > actual = session->getRepositories( );
- 
-      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong number of repositories", size_t( 1 ),
-                                    actual.size( ) );
-@@ -239,9 +241,9 @@ void OneDriveTest::getObjectTypeDocumentTest()
- {
-      curl_mockup_reset( );
- 
--     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
--     libcmis::ObjectTypePtr actual = session.getType("cmis:document");
-+     libcmis::ObjectTypePtr actual = session->getType("cmis:document");
- 
-      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong type ID", string("cmis:document"),
-                                    actual->getId() );
-@@ -282,9 +284,9 @@ void OneDriveTest::getObjectTypeFolderTest()
- {
-      curl_mockup_reset( );
- 
--     OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+     OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
--     libcmis::ObjectTypePtr actual = session.getType("cmis:folder");
-+     libcmis::ObjectTypePtr actual = session->getType("cmis:folder");
- 
-      CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong type ID", string("cmis:folder"),
-                                    actual->getId() );
-@@ -322,11 +324,11 @@ void OneDriveTest::getObjectTest()
- {
-     static const string objectId ("aFileId");
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/" + objectId;
-     curl_mockup_addResponse ( url.c_str( ), "",
-                               "GET", DATA_DIR "/onedrive/file.json", 200, true);
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
-     boost::shared_ptr<OneDriveObject> obj = boost::dynamic_pointer_cast
-                                             <OneDriveObject>( object );
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong Object Id", objectId,
-@@ -338,12 +340,12 @@ void OneDriveTest::filePropertyTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong creation date",
-                                    string ( "2014-06-09T08:24:04+0000" ),
-@@ -365,7 +367,7 @@ void OneDriveTest::filePropertyTest( )
- void OneDriveTest::deleteTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string objectId( "aFileId" );
- 
-@@ -374,7 +376,7 @@ void OneDriveTest::deleteTest( )
-                                "GET", DATA_DIR "/onedrive/file.json", 200, true);
-     curl_mockup_addResponse( url.c_str( ),"", "DELETE", "", 204, false);
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     object->remove( );
-     const struct HttpRequest* deleteRequest = curl_mockup_getRequest( url.c_str( ), "", "DELETE" );
-@@ -385,7 +387,7 @@ void OneDriveTest::deleteTest( )
- void OneDriveTest::updatePropertiesTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string objectId( "aFileId" );
-     const string newObjectId( "aNewFileId" );
- 
-@@ -399,8 +401,8 @@ void OneDriveTest::updatePropertiesTest( )
-     curl_mockup_addResponse( objectUrl.c_str( ), "",
-                                "PUT", DATA_DIR "/onedrive/updated-file.json", 200, true );
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
--    libcmis::ObjectPtr newObject = session.getObject( newObjectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
-+    libcmis::ObjectPtr newObject = session->getObject( newObjectId );
- 
-     object->updateProperties( newObject->getProperties( ) );
- 
-@@ -424,12 +426,12 @@ void OneDriveTest::getFileAllowableActionsTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     boost::shared_ptr< libcmis::AllowableActions > actions = object->getAllowableActions( );
- 
-@@ -446,12 +448,12 @@ void OneDriveTest::getFolderAllowableActionsTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFolderId");
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/folder.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
- 
-     boost::shared_ptr< libcmis::AllowableActions > actions = object->getAllowableActions( );
- 
-@@ -468,7 +470,7 @@ void OneDriveTest::getFolderTest( )
- {
-     curl_mockup_reset( );
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     static const string folderId( "aFolderId" );
-     static const string parentId( "aParentId" );
-     string url = BASE_URL + "/" + folderId;
-@@ -480,7 +482,7 @@ void OneDriveTest::getFolderTest( )
-     curl_mockup_addResponse( parentUrl.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/parent-folder.json", 200, true);
- 
--    libcmis::FolderPtr folder = session.getFolder( folderId );
-+    libcmis::FolderPtr folder = session->getFolder( folderId );
-     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
-             NULL != folder );
- 
-@@ -499,15 +501,15 @@ void OneDriveTest::getChildrenTest( )
- {
-     curl_mockup_reset( );
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     static const string folderId ("aFolderId");
-     string url = BASE_URL + "/" + folderId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/folder.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( folderId );
-+    libcmis::ObjectPtr obj = session->getObject( folderId );
- 
--    libcmis::FolderPtr folder = session.getFolder( folderId );
-+    libcmis::FolderPtr folder = session->getFolder( folderId );
-     CPPUNIT_ASSERT_MESSAGE( "Fetched object should be an instance of libcmis::FolderPtr",
-             NULL != folder );
- 
-@@ -536,7 +538,7 @@ void OneDriveTest::getChildrenTest( )
- void OneDriveTest::moveTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string objectId( "aFileId" );
-     const string sourceId( "aFolderId" );
-     const string desId( "aParentId" );
-@@ -554,9 +556,9 @@ void OneDriveTest::moveTest( )
-     curl_mockup_addResponse( sourceUrl.c_str( ), "",
-                                "GET", DATA_DIR "/onedrive/folder.json", 200, true );
- 
--    libcmis::ObjectPtr object = session.getObject( objectId );
--    libcmis::FolderPtr source = session.getFolder( sourceId );
--    libcmis::FolderPtr destination = session.getFolder( desId );
-+    libcmis::ObjectPtr object = session->getObject( objectId );
-+    libcmis::FolderPtr source = session->getFolder( sourceId );
-+    libcmis::FolderPtr destination = session->getFolder( desId );
- 
-     object->move( source, destination );
-     const char* moveRequest = curl_mockup_getRequestBody( url.c_str( ), "method=MOVE", "POST" );
-@@ -570,12 +572,12 @@ void OneDriveTest::getDocumentTest( )
-     curl_mockup_reset( );
-     static const string objectId ("aFileId");
- 
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     string url = BASE_URL + "/" + objectId;
-     curl_mockup_addResponse( url.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/file.json", 200, true);
- 
--    libcmis::ObjectPtr obj = session.getObject( objectId );
-+    libcmis::ObjectPtr obj = session->getObject( objectId );
- 
-     // Check if we got the document object.
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( obj );
-@@ -599,7 +601,7 @@ void OneDriveTest::getDocumentTest( )
- void OneDriveTest::getDocumentParentTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     static const string parentId( "aParentId" );
-@@ -611,7 +613,7 @@ void OneDriveTest::getDocumentParentTest( )
-     curl_mockup_addResponse( parentUrl.c_str( ), "",
-                              "GET", DATA_DIR "/onedrive/parent-folder.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( "aFileId" );
-+    libcmis::ObjectPtr object = session->getObject( "aFileId" );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     CPPUNIT_ASSERT_MESSAGE( "Document expected", document != NULL );
-@@ -626,7 +628,7 @@ void OneDriveTest::getDocumentParentTest( )
- void OneDriveTest::getContentStreamTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     static const string documentId( "aFileId" );
-     string url = BASE_URL + "/" + documentId;
-@@ -636,7 +638,7 @@ void OneDriveTest::getContentStreamTest( )
-     string downloadUrl = "sourceUrl";
-     curl_mockup_addResponse( downloadUrl.c_str( ), "", "GET", expectedContent.c_str( ), 0, false );
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     try
-@@ -658,7 +660,7 @@ void OneDriveTest::getContentStreamTest( )
- void OneDriveTest::setContentStreamTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
- 
-     const string documentId( "aFileId" );
- 
-@@ -667,7 +669,7 @@ void OneDriveTest::setContentStreamTest( )
-     curl_mockup_addResponse( url.c_str( ), "",
-                                "GET", DATA_DIR "/onedrive/file.json", 200, true);
- 
--    libcmis::ObjectPtr object = session.getObject( documentId );
-+    libcmis::ObjectPtr object = session->getObject( documentId );
-     libcmis::DocumentPtr document = boost::dynamic_pointer_cast< libcmis::Document >( object );
- 
-     curl_mockup_addResponse( url.c_str( ), "",
-@@ -701,7 +703,7 @@ void OneDriveTest::setContentStreamTest( )
- void OneDriveTest::createDocumentTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string documentId( "aFileId" );
-     const string folderId( "aParentId" );
-     const string filename( "aFileName" );
-@@ -719,7 +721,7 @@ void OneDriveTest::createDocumentTest( )
-     curl_mockup_addResponse( documentUrl.c_str( ), "",
-                                "GET", DATA_DIR "/onedrive/file.json", 200, true );
- 
--    libcmis::FolderPtr parent = session.getFolder( folderId );
-+    libcmis::FolderPtr parent = session->getFolder( folderId );
-     try
-     {
-         string expectedContent( "Test set content stream" );
-@@ -744,7 +746,7 @@ void OneDriveTest::createDocumentTest( )
- void OneDriveTest::getObjectByPathTest( )
- {
-     curl_mockup_reset( );
--    OneDriveSession session = getTestSession( USERNAME, PASSWORD );
-+    OneDriveSessionPtr session = getTestSession( USERNAME, PASSWORD );
-     const string documentId( "rightFile" );
-     const string wrongDocumentId( "wrongFile" );
-     const string folderAId( "folderA" ); // root
-@@ -772,7 +774,7 @@ void OneDriveTest::getObjectByPathTest( )
-     curl_mockup_addResponse( folderCUrl.c_str( ), "",
-                                "GET", DATA_DIR "/onedrive/folderC.json", 200, true );
- 
--    libcmis::ObjectPtr object = session.getObjectByPath( path );
-+    libcmis::ObjectPtr object = session->getObjectByPath( path );
-     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong objectFetched", documentId, object->getId( ) );
- }
- 
-diff --git a/src/libcmis/onedrive-session.cxx b/src/libcmis/onedrive-session.cxx
-index c6f4270..a6652b4 100644
---- a/src/libcmis/onedrive-session.cxx
-+++ b/src/libcmis/onedrive-session.cxx
-@@ -54,11 +54,6 @@ OneDriveSession::OneDriveSession ( string baseUrl,
-     }
- }
- 
--OneDriveSession::OneDriveSession( const OneDriveSession& copy ) :
--    BaseSession( copy )
--{
--}
--
- OneDriveSession::OneDriveSession() :
-     BaseSession()
- {
-diff --git a/src/libcmis/onedrive-session.hxx b/src/libcmis/onedrive-session.hxx
-index 441e110..f11fbaf 100644
---- a/src/libcmis/onedrive-session.hxx
-+++ b/src/libcmis/onedrive-session.hxx
-@@ -42,8 +42,6 @@ class OneDriveSession : public BaseSession
-                        libcmis::OAuth2DataPtr oauth2,
-                        bool verbose = false );
- 
--        OneDriveSession( const OneDriveSession& copy );
--
-         ~OneDriveSession ( );
- 
-         virtual libcmis::RepositoryPtr getRepository( );
-@@ -64,6 +62,8 @@ class OneDriveSession : public BaseSession
- 
-     private:
-         OneDriveSession( );
-+        OneDriveSession( const OneDriveSession& copy ) = delete;
-+        OneDriveSession& operator=( const OneDriveSession& copy ) = delete;
- };
- 
- #endif /* _ONEDRIVE_SESSION_HXX_ */

diff --git a/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild b/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
index d90cb7574671..51b24e07e554 100644
--- a/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
+++ b/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
@@ -7,7 +7,8 @@ if [[ ${PV} == *9999* ]]; then
 	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
 	inherit git-r3
 else
-	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	https://dev.gentoo.org/~asturm/distfiles/${P}-patchset.tar.xz"
 	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~x86 ~amd64-linux ~x86-linux"
 fi
 inherit autotools
@@ -41,10 +42,10 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${P}-icu-64.2.patch" # bug 674414
-	"${FILESDIR}/${P}-fix-onedrive.patch"
-	"${FILESDIR}/${P}-gdrive-do-not-allow-copying.patch"
-	"${FILESDIR}/${P}-onedrive-do-not-allow-copying.patch"
-	"${FILESDIR}/${P}-fix-gdrive-onedrive.patch"
+	"${WORKDIR}/${P}-patchset/${P}-fix-onedrive.patch"
+	"${WORKDIR}/${P}-patchset/${P}-gdrive-do-not-allow-copying.patch"
+	"${WORKDIR}/${P}-patchset/${P}-onedrive-do-not-allow-copying.patch"
+	"${WORKDIR}/${P}-patchset/${P}-fix-gdrive-onedrive.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/
@ 2024-02-20 20:49 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2024-02-20 20:49 UTC (permalink / raw
  To: gentoo-commits

commit:     df3eba68a07da555f27af5377c131dbb44bd84e7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 20 19:35:14 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Feb 20 20:48:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df3eba68

dev-cpp/libcmis: drop 0.5.2-r2

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-cpp/libcmis/Manifest                           |  2 -
 dev-cpp/libcmis/files/libcmis-0.5.2-icu-64.2.patch | 17 ------
 dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild            | 70 ----------------------
 3 files changed, 89 deletions(-)

diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
index 46f4619af881..86f9994fa42b 100644
--- a/dev-cpp/libcmis/Manifest
+++ b/dev-cpp/libcmis/Manifest
@@ -1,3 +1 @@
-DIST libcmis-0.5.2-patchset.tar.xz 16632 BLAKE2B 0a9802955059214428e7c2d6171093b171e47899de05404ee462bbf2c68c808927759a0808d79aa3aa9c8b9cd1a60b55686f7596b121701704a2d9720d6a8ba8 SHA512 bca4cc908e5510a9f597d6f1b560b3bbfdcda185b79d21320c6e3f7e5c559b7dda375407dfd6f05420b6f4edd666f6e7e70b7b72808506acc22fdfdab344f52c
-DIST libcmis-0.5.2.tar.gz 295020 BLAKE2B 325eacedd87eb1888a439c727a648c5aeb8d58c9b80add9761ffc55381193b71b589865d13ecd55177faafa935642685001f60456c1354e037989b29e9451c05 SHA512 45d8cd6d420a9593b46e1f2d6fbf384ea248cb218b0db6326ee2f082ff29100b65a2cc999ccb849e61df4f4ed7c3721b09addc6c322ef03c6c93f8c0acc02bde
 DIST libcmis-0.6.2.tar.gz 296218 BLAKE2B faad99e09b2721cd56b0d47d2a9589e06222ee7881006e936d0943d5e8afc588fcda721ef282ad7d55c785407a9885c90cbce1d172ca012c4a13cc51da0c15b6 SHA512 a75a69623f34149c39c382c357396b8dd719d589a78424fc3b5d9de84ffbf3f889bcaaed9a01f91b491a507c189347d3d9252db238fddbb522ff8ba9ce7b5ade

diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-icu-64.2.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-icu-64.2.patch
deleted file mode 100644
index 6ba63ee7fe76..000000000000
--- a/dev-cpp/libcmis/files/libcmis-0.5.2-icu-64.2.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/inc/libcmis-c/repository.h	2018-12-27 14:07:55.000000000 +0100
-+++ b/inc/libcmis-c/repository.h	2019-04-21 01:29:46.504373226 +0200
-@@ -28,12 +28,12 @@
- #ifndef _REPOSITORY_H_
- #define _REPOSITORY_H_
- 
-+#include <libxml/tree.h>
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
- 
--#include <libxml/tree.h>
--
- #include "libcmis-c/libcmis-c-api.h"
- #include "libcmis-c/types.h"
- 

diff --git a/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild b/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
deleted file mode 100644
index aedc528670f1..000000000000
--- a/dev-cpp/libcmis/libcmis-0.5.2-r2.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-if [[ ${PV} == *9999* ]]; then
-	EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
-	https://dev.gentoo.org/~asturm/distfiles/${P}-patchset.tar.xz"
-	KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
-fi
-inherit autotools
-
-DESCRIPTION="C++ client library for the CMIS interface"
-HOMEPAGE="https://github.com/tdf/libcmis"
-
-LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
-SLOT="0.5"
-IUSE="man test tools"
-
-RESTRICT="test"
-
-DEPEND="
-	dev-libs/boost:=
-	dev-libs/libxml2
-	net-misc/curl
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	man? (
-		app-text/docbook2X
-		dev-libs/libxslt
-	)
-	test? (
-		dev-util/cppcheck
-		dev-util/cppunit
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}/${P}-icu-64.2.patch" # bug 674414
-	"${WORKDIR}/${P}-patchset/${P}-fix-onedrive.patch"
-	"${WORKDIR}/${P}-patchset/${P}-gdrive-do-not-allow-copying.patch"
-	"${WORKDIR}/${P}-patchset/${P}-onedrive-do-not-allow-copying.patch"
-	"${WORKDIR}/${P}-patchset/${P}-fix-gdrive-onedrive.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	local myeconfargs=(
-		--program-suffix=-$(ver_cut 1-2)
-		--disable-werror
-		$(use_with man)
-		$(use_enable test tests)
-		$(use_enable tools client)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	find "${D}" -name '*.la' -delete || die
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-20 20:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-17 22:59 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/libcmis/files/, dev-cpp/libcmis/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-02-20 20:49 Andreas Sturmlechner
2022-12-26 23:41 Andreas Sturmlechner
2022-12-26 23:19 Andreas Sturmlechner
2018-09-16 22:34 Andreas Sturmlechner
2016-03-19 21:39 Andreas Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox