Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package seadrive-fuse for openSUSE:Factory 
checked in at 2021-09-07 21:21:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/seadrive-fuse (Old)
 and      /work/SRC/openSUSE:Factory/.seadrive-fuse.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "seadrive-fuse"

Tue Sep  7 21:21:50 2021 rev:2 rq:917300 version:2.0.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/seadrive-fuse/seadrive-fuse.changes      
2021-01-05 18:13:05.555313339 +0100
+++ /work/SRC/openSUSE:Factory/.seadrive-fuse.new.1899/seadrive-fuse.changes    
2021-09-07 21:22:35.357387659 +0200
@@ -1,0 +2,5 @@
+Tue Sep  7 10:02:11 UTC 2021 - Paolo Stivanin <[email protected]>
+
+- Update to v2.0.16 (no changelog)
+
+-------------------------------------------------------------------

Old:
----
  seadrive-fuse-2.0.10.tar.gz

New:
----
  seadrive-fuse-2.0.16.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ seadrive-fuse.spec ++++++
--- /var/tmp/diff_new_pack.9wDaXn/_old  2021-09-07 21:22:35.793388186 +0200
+++ /var/tmp/diff_new_pack.9wDaXn/_new  2021-09-07 21:22:35.797388191 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package seadrive-fuse
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           seadrive-fuse
-Version:        2.0.10
+Version:        2.0.16
 Release:        0
 Summary:        SeaDrive daemon with FUSE interface
 License:        GPL-2.0-only

++++++ seadrive-fuse-2.0.10.tar.gz -> seadrive-fuse-2.0.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/configure.ac 
new/seadrive-fuse-2.0.16/configure.ac
--- old/seadrive-fuse-2.0.10/configure.ac       2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/configure.ac       2021-09-07 10:35:14.000000000 
+0200
@@ -2,7 +2,7 @@
 
 
 AC_PREREQ(2.61)
-AC_INIT([seadrive], [2.0.10], [[email protected]])
+AC_INIT([seadrive], [2.0.16], [[email protected]])
 AC_CONFIG_HEADER([config.h])
 
 AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/debian/changelog 
new/seadrive-fuse-2.0.16/debian/changelog
--- old/seadrive-fuse-2.0.10/debian/changelog   2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/debian/changelog   2021-09-07 10:35:14.000000000 
+0200
@@ -1,3 +1,28 @@
+seadrive-daemon (2.0.16) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Tue, 7 Sep 2021 16:56:30 +0800
+seadrive-daemon (2.0.15) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Fri, 20 Aug 2021 15:56:30 +0800
+seadrive-daemon (2.0.14) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Thu, 20 May 2021 15:36:28 +0800
+seadrive-daemon (2.0.13) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Thu, 18 Mar 2021 16:18:21 +0800
+seadrive-daemon (2.0.12) unstable; urgency=low
+
+  * new upstream release
+
+ -- Jonathan Xu <[email protected]>  Mon, 25 Jan 2021 17:22:17 +0800
 seadrive-daemon (2.0.10) unstable; urgency=low
 
   * new upstream release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/debian/control 
new/seadrive-fuse-2.0.16/debian/control
--- old/seadrive-fuse-2.0.10/debian/control     2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/debian/control     2021-09-07 10:35:14.000000000 
+0200
@@ -15,7 +15,7 @@
     libcurl4-openssl-dev,
     valac,
     libjansson-dev,
-    python,
+    dh-python,
     libfuse-dev,
     libsearpc-dev,
 Standards-Version: 3.9.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/debian/rules 
new/seadrive-fuse-2.0.16/debian/rules
--- old/seadrive-fuse-2.0.10/debian/rules       2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/debian/rules       2021-09-07 10:35:14.000000000 
+0200
@@ -2,7 +2,7 @@
 # -*- makefile -*-
 
 %:
-       dh $@ --with python2 --with autotools_dev
+       dh $@ --with python3 --with autotools_dev
 
 override_dh_auto_configure:
        ./autogen.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/file-cache-mgr.c 
new/seadrive-fuse-2.0.16/src/file-cache-mgr.c
--- old/seadrive-fuse-2.0.10/src/file-cache-mgr.c       2020-12-25 
07:49:27.000000000 +0100
+++ new/seadrive-fuse-2.0.16/src/file-cache-mgr.c       2021-09-07 
10:35:14.000000000 +0200
@@ -3452,3 +3452,77 @@
 
     return NULL;
 }
+
+#ifndef WIN32
+static int
+rm_file_and_active_path_recursive (const char *repo_id, const char *path, 
const char *active_path)
+{
+    SeafStat st;
+    int ret = 0;
+    GDir *dir;
+    const char *dname;
+    char *subpath;
+    char *sub_active_path;
+    GError *error = NULL;
+
+    if (seaf_stat (path, &st) < 0) {
+        seaf_warning ("Failed to stat %s: %s\n", path, strerror(errno));
+        return -1;
+    }
+
+    if (S_ISREG(st.st_mode)) {
+        ret = seaf_util_unlink (path);
+        seaf_sync_manager_delete_active_path (seaf->sync_mgr, repo_id, 
active_path);
+        return ret;
+    } else if (S_ISDIR (st.st_mode)) {
+        dir = g_dir_open (path, 0, &error);
+        if (error) {
+            seaf_warning ("Failed to open dir %s: %s\n", path, error->message);
+            return -1;
+        }
+
+        while ((dname = g_dir_read_name (dir)) != NULL) {
+            subpath = g_build_filename (path, dname, NULL);
+            sub_active_path = g_build_filename (active_path, dname, NULL);
+            ret = rm_file_and_active_path_recursive (repo_id, subpath, 
sub_active_path);
+            g_free (subpath);
+            g_free (sub_active_path);
+            if (ret < 0)
+                break;
+        }
+
+        g_dir_close (dir);
+
+        if (ret == 0) {
+            ret = seaf_util_rmdir (path);
+        }
+
+        return ret;
+    }
+
+    return ret;
+
+}
+int
+file_cache_mgr_uncache_path (const char *repo_id, const char *path)
+{
+    FileCacheMgr *mgr = seaf->file_cache_mgr;
+    char *top_dir_path = mgr->priv->base_path;
+    char *deleted_path;
+    char *canon_path = NULL;
+
+    if (strcmp (path, "") != 0) {
+        canon_path = format_path (path);
+    } else {
+        canon_path = g_strdup(path);
+    }
+
+    deleted_path = g_build_filename (top_dir_path, repo_id, path, NULL);
+    rm_file_and_active_path_recursive (repo_id, deleted_path, canon_path);
+
+    g_free (deleted_path);
+    g_free (canon_path);
+
+    return 0;
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/file-cache-mgr.h 
new/seadrive-fuse-2.0.16/src/file-cache-mgr.h
--- old/seadrive-fuse-2.0.10/src/file-cache-mgr.h       2020-12-25 
07:49:27.000000000 +0100
+++ new/seadrive-fuse-2.0.16/src/file-cache-mgr.h       2021-09-07 
10:35:14.000000000 +0200
@@ -296,6 +296,9 @@
 file_cache_mgr_getxattr_in_root (FileCacheMgr *mgr,
                                  const char *path, const char *name, char 
*value, size_t size);
 
+int
+file_cache_mgr_uncache_path (const char *repo_id, const char *path);
+
 // {"downloading_files": [{"file_path":, "downloaded":, "total_download":}, ], 
"downloaded_files": [ten latest downloaded files]}
 json_t *
 file_cache_mgr_get_download_progress (FileCacheMgr *mgr);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/http-tx-mgr.c 
new/seadrive-fuse-2.0.16/src/http-tx-mgr.c
--- old/seadrive-fuse-2.0.10/src/http-tx-mgr.c  2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/src/http-tx-mgr.c  2021-09-07 10:35:14.000000000 
+0200
@@ -32,9 +32,11 @@
 #define HTTP_UNAUTHORIZED 401
 #define HTTP_FORBIDDEN 403
 #define HTTP_NOT_FOUND 404
+#define HTTP_REQUEST_TIME_OUT 408
 #define HTTP_NO_QUOTA 443
 #define HTTP_REPO_DELETED 444
 #define HTTP_REPO_CORRUPTED 445
+#define HTTP_REPO_TOO_LARGE 447
 #define HTTP_INTERNAL_SERVER_ERROR 500
 
 #define RESET_BYTES_INTERVAL_MSEC 1000
@@ -679,6 +681,9 @@
     /* Disable the default "Expect: 100-continue" header */
     headers = curl_slist_append (headers, "Expect:");
 
+    if (req_content)
+        headers = curl_slist_append (headers, "Content-Type: 
application/octet-stream");
+
     if (token) {
         token_header = g_strdup_printf ("Seafile-Repo-Token: %s", token);
         headers = curl_slist_append (headers, token_header);
@@ -865,6 +870,16 @@
     /* Disable the default "Expect: 100-continue" header */
     headers = curl_slist_append (headers, "Expect:");
 
+    if (req_content) {
+        json_t *is_json = NULL;
+        is_json = json_loads (req_content, 0, NULL);
+        if (is_json) {
+            headers = curl_slist_append (headers, "Content-Type: 
application/json");
+            json_decref (is_json);
+        } else
+            headers = curl_slist_append (headers, "Content-Type: 
application/octet-stream");
+    }
+
     if (token) {
         token_header = g_strdup_printf ("Seafile-Repo-Token: %s", token);
         headers = curl_slist_append (headers, token_header);
@@ -898,6 +913,9 @@
     /* Disable the default "Expect: 100-continue" header */
     headers = curl_slist_append (headers, "Expect:");
 
+    if (req_content)
+        headers = curl_slist_append (headers, "Content-Type: 
application/x-www-form-urlencoded");
+
     if (token) {
         token_header = g_strdup_printf ("Authorization: Token %s", token);
         headers = curl_slist_append (headers, token_header);
@@ -1016,6 +1034,8 @@
         return HTTP_TASK_ERR_REPO_DELETED;
     else if (status == HTTP_REPO_CORRUPTED)
         return HTTP_TASK_ERR_REPO_CORRUPTED;
+    else if (status == HTTP_REQUEST_TIME_OUT || status == HTTP_REPO_TOO_LARGE)
+        return HTTP_TASK_ERR_LIBRARY_TOO_LARGE;
     else
         return HTTP_TASK_ERR_UNKNOWN;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/http-tx-mgr.h 
new/seadrive-fuse-2.0.16/src/http-tx-mgr.h
--- old/seadrive-fuse-2.0.10/src/http-tx-mgr.h  2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/src/http-tx-mgr.h  2021-09-07 10:35:14.000000000 
+0200
@@ -59,6 +59,7 @@
     HTTP_TASK_ERR_REPO_CORRUPTED,
     HTTP_TASK_ERR_FILE_LOCKED,
     HTTP_TASK_ERR_FOLDER_PERM_DENIED,
+    HTTP_TASK_ERR_LIBRARY_TOO_LARGE,
     HTTP_TASK_ERR_UNKNOWN,
     N_HTTP_TASK_ERROR,
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/rpc-service.c 
new/seadrive-fuse-2.0.16/src/rpc-service.c
--- old/seadrive-fuse-2.0.10/src/rpc-service.c  2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/src/rpc-service.c  2021-09-07 10:35:14.000000000 
+0200
@@ -415,6 +415,11 @@
     return 0;
 }
 
+int seafile_uncache_path (const char *repo_id, const char *path, GError 
**error)
+{
+    return file_cache_mgr_uncache_path(repo_id, path);
+}
+
 static json_t *
 seafile_get_enc_repo_list (GError **error)
 {
@@ -604,6 +609,7 @@
 
 #endif
 
+
 static void
 register_rpc_service ()
 {
@@ -770,6 +776,10 @@
                                      seafile_cache_path,
                                      "seafile_cache_path",
                                      searpc_signature_int__string_string());
+    searpc_server_register_function ("seadrive-rpcserver",
+                                     seafile_uncache_path,
+                                     "seafile_uncache_path",
+                                     searpc_signature_int__string_string());
 
     searpc_server_register_function ("seadrive-rpcserver",
                                      seafile_get_enc_repo_list,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/seadrive-fuse-2.0.10/src/sync-mgr.c 
new/seadrive-fuse-2.0.16/src/sync-mgr.c
--- old/seadrive-fuse-2.0.10/src/sync-mgr.c     2020-12-25 07:49:27.000000000 
+0100
+++ new/seadrive-fuse-2.0.16/src/sync-mgr.c     2021-09-07 10:35:14.000000000 
+0200
@@ -357,6 +357,8 @@
 #define SYNC_ERROR_ID_PATH_INVALID_CHARACTER    22
 #define SYNC_ERROR_ID_UPDATE_TO_READ_ONLY_REPO  23
 #define SYNC_ERROR_ID_CONFLICT                  24
+#define SYNC_ERROR_ID_UPDATE_NOT_IN_REPO        25
+#define SYNC_ERROR_ID_LIBRARY_TOO_LARGE         26
 
 #define SYNC_ERROR_ID_GENERAL_ERROR             100
 
@@ -501,6 +503,8 @@
         return SYNC_ERROR_ID_LOCAL_DATA_CORRUPT;
     case HTTP_TASK_ERR_WRITE_LOCAL_DATA:
         return SYNC_ERROR_ID_WRITE_LOCAL_DATA;
+    case HTTP_TASK_ERR_LIBRARY_TOO_LARGE:
+        return SYNC_ERROR_ID_LIBRARY_TOO_LARGE;
     default:
         return SYNC_ERROR_ID_GENERAL_ERROR;
     }
@@ -594,6 +598,9 @@
         info->perm_err_cnt = 0;
         info->in_perm_error = FALSE;
     }
+
+    if (task->tx_error_code == HTTP_TASK_ERR_LIBRARY_TOO_LARGE)
+        info->in_perm_error = TRUE;
 }
 
 static inline void
@@ -2619,6 +2626,15 @@
 
 #define MAX_COMMIT_SIZE 100 * (1 << 20) /* 100MB */
 
+static gboolean
+is_repo_writable (SeafRepo *repo)
+{
+    if (repo->is_readonly && seaf_repo_manager_get_folder_perm_timestamp 
(seaf->repo_mgr, repo->id) < 0)
+        return FALSE;
+
+    return TRUE;
+}
+
 static void
 handle_update_file_op (SeafRepo *repo, ChangeSet *changeset, const char 
*username,
                        JournalOp *op, gboolean renamed_from_ignored,
@@ -3071,6 +3087,11 @@
     }
 
     if (strcmp (head->root_id, root_id) != 0) {
+        if (!is_repo_writable (repo)) {
+            seaf_warning ("Skip creating commit for read-only repo: %s.\n", 
repo->id);
+            ret = -1;
+            goto out;
+        }
         /* Calculate diff for more accurate commit descriptions. */
         diff_commit_roots (repo->id, repo->version, head->root_id, root_id, 
&diff_results, TRUE);
         desc = diff_results_to_description (diff_results);

Reply via email to