Package Details: maestral-git 1.6.3.r0.g7b8e7a53-1

Git Clone URL: https://aur.archlinux.org/maestral-git.git (read-only, click to copy)
Package Base: maestral-git
Description: Open-source Dropbox client
Upstream URL: https://github.com/SamSchott/maestral
Keywords: dropbox maestral python
Licenses: MIT
Conflicts: maestral
Provides: maestral
Submitter: silverbluep
Maintainer: None
Last Packager: lmartinez-mirror
Votes: 1
Popularity: 0.000000
First Submitted: 2019-07-30 18:15 (UTC)
Last Updated: 2022-06-04 02:47 (UTC)

Latest Comments

1 2 3 Next › Last »

petRUShka commented on 2026-10-08 11:39 (UTC) (edited on 2026-10-08 11:41 (UTC) by petRUShka)

At upstream commit 3c86ffe2, recent python-dropbox exposes two incompatibilities:

  • check(): UploadSessionAppendError lacks is_not_closed().
  • Daemon startup: _DropboxSDK.request_json_string() rejects extra_headers.

This combined patch fixes both while retaining streamed uploads and compatibility with older SDK calls. It also keeps managed authorization after custom headers using case-insensitive merging. It changes only client.py and errorhandling.py.

Save the diff below as dropbox-sdk-compat.patch, add it to source/checksums, and apply it in prepare():

source+=('dropbox-sdk-compat.patch')
sha256sums+=('4f9e69d6a2ec143c3b6e61c4d12785b916e72b144fa8f87b1d5224ab17fb7841')

prepare() {
    cd "$pkgname"
    patch --batch --forward --fuzz=0 -p1 -i "$srcdir/dropbox-sdk-compat.patch"
}

Bump pkgrel, run makepkg -Cs. The patch applies cleanly to 3c86ffe21cc97298663dc967a0591cd10525785b.

--- a/src/maestral/client.py
+++ b/src/maestral/client.py
@@ -115,4 +115,5 @@
         request_binary: bytes | Iterator[bytes] | None,
         timeout: float | None = None,
+        extra_headers: dict[str, str] | None = None,
     ) -> RouteResult | RouteErrorResult:
         # Custom handling to allow for streamed and chunked uploads. This is mostly
@@ -128,12 +129,15 @@
                 raise BadInputException("Unhandled auth type: {}".format(auth_type))

-            headers = {
-                "User-Agent": self._user_agent,
-                "Authorization": f"Bearer {self._oauth2_access_token}",
-            }
+            headers = requests.structures.CaseInsensitiveDict(
+                {"User-Agent": self._user_agent}
+            )

             if self._headers:
                 headers.update(self._headers)

+            if extra_headers:
+                headers.update(extra_headers)
+
+            headers["Authorization"] = f"Bearer {self._oauth2_access_token}"
             headers["Content-Type"] = "application/octet-stream"
             headers["Dropbox-API-Arg"] = request_json_arg
@@ -163,4 +167,8 @@

         else:
+            # Older SDK versions do not accept the extra_headers keyword.
+            kwargs = (
+                {"extra_headers": extra_headers} if extra_headers is not None else {}
+            )
             return super().request_json_string(
                 host,
@@ -171,4 +179,5 @@
                 request_binary,
                 timeout,
+                **kwargs,
             )

--- a/src/maestral/errorhandling.py
+++ b/src/maestral/errorhandling.py
@@ -373,5 +373,7 @@
                 err_cls = DataCorruptionError

-        elif isinstance(error, files.UploadSessionLookupError):
+        elif isinstance(
+            error, (files.UploadSessionLookupError, files.UploadSessionAppendError)
+        ):
             title = "Could not upload file"
             text, err_cls = get_session_lookup_error_msg(error)
@@ -714,5 +716,7 @@

 def get_session_lookup_error_msg(
-    session_lookup_error: files.UploadSessionLookupError,
+    session_lookup_error: (
+        files.UploadSessionLookupError | files.UploadSessionAppendError
+    ),
 ) -> tuple[str, type[SyncError]]:
     err_cls = SyncError
@@ -723,5 +727,8 @@
         text = "A network error occurred during the upload session."
         err_cls = DataCorruptionError
-    elif session_lookup_error.is_not_closed():
+    elif (
+        isinstance(session_lookup_error, files.UploadSessionLookupError)
+        and session_lookup_error.is_not_closed()
+    ):
         text = "Upload session is still open, cannot finish."
     elif session_lookup_error.is_not_found():

jruschme commented on 2021-12-15 01:11 (UTC) (edited on 2021-12-15 01:13 (UTC) by jruschme)


diff --git a/PKGBUILD b/PKGBUILD
index 4e9cd6c..9b99c21 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _srcname="${_name}-dropbox"
 pkgname="${_name}-git"
 provides=("${_name}")
 conflicts=("${_name}")
-pkgver=1.4.4
+pkgver=1.5.2.r12.gd9991a38
 pkgrel=1
 pkgdesc='A light-weight and open-source Dropbox client.'
 arch=('any')
@@ -43,7 +43,7 @@ pkgver() {

 prepare() {
     # Remove version restriction from watchdog; version name seems to be odd in arch repo
-    sed -i 's|watchdog>=[\.,0-9]*|watchdog|' "${pkgname}-${pkgver}/setup.py"
+    sed -i 's|watchdog>=[\.,0-9]*|watchdog|' "${_srcname}/setup.py"
 }

 build() {

silverbluep commented on 2020-07-13 15:35 (UTC)

@Pietro_Pizzi that error has nothing to with the pkgbuild; its the python-dropbox package in community repo that needs to be updated when you see that error.

Independently; the package has been updated to reflect the recent requirement changes.

Pietro_Pizzi commented on 2020-05-29 11:30 (UTC)

LANG=en_DK.UTF-8; yay -S maestral-git ==> Error: Could not find all required packages: python-dropbox<=9.5.0 (Wanted by: maestral-git)

yay python-dropbox 1 community/python-dropbox 10.1.2-1 (1005.7 KiB 16.2 MiB) (Installed)

silverbluep commented on 2020-04-06 09:48 (UTC) (edited on 2020-04-06 10:05 (UTC) by silverbluep)

Done! Feel free to make any changes.

My plan has been to make this package build split packages; maestral-cli-git and maestral-gui-git to reflect the changes in the repo. The base name should remain as it is. I see no point in having seperate pkgbuilds for two packages.

coxackie commented on 2020-03-29 16:55 (UTC)

@bbaserdem - please make me co-maintainer if you wish. We should change the name of this to maestral-cli-git, most probably, and update latest dependencies.

coxackie commented on 2020-03-16 08:35 (UTC)

That would be good, in fact. I think that python-atomicwrites is a new dependency for 0.6.2, and I do not think python-rubicon-objc is needed. Furthermore, you may want to use the service file from here. The advantage is that it informs if the daemon was not successfully launched.

silverbluep commented on 2020-03-15 23:42 (UTC)

I'm trying to manage multi-package building; since the author split this package into two. (Maestral and maestral-gui)

silverbluep commented on 2020-02-05 20:03 (UTC) (edited on 2020-02-05 20:04 (UTC) by silverbluep)

@coxackie, the repo was updated so I updated a lot of dependencies, and created new packages for the dependencies. Everything works as far as I am concerned.

I will probably abandon this package when a stable release rolls out and push a stable release package cause the development is too fast; I rather not be such hands on maintainer for this package.