From dcc2385bfe8bf01b0cb2f5460d9c8422cf176405 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 21 Oct 2022 21:12:11 +0200 Subject: [PATCH 01/16] up to 1.60.0 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index 9adbf6a..f2df484 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.59.1 +%define vendor_ver 1.60.0 Summary: rsync for cloud storage Name: rclone -Version: 1.59.2 +Version: 1.60.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 16d9c13f85e491239066d1bc2e15782c +# Source0-md5: 978de8d50c0127d32dda74e470ed6e16 # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: eed29d627ba0afd4eb700347dfdef9c8 +# Source1-md5: e592365c54dcb593a5bd438302ce9ad8 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.14 -- 2.44.0 From 1db21d35731b9ff22e8e0691647d1e3fc6f819f3 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 22 Oct 2022 13:46:26 +0200 Subject: [PATCH 02/16] update required golang version --- rclone.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclone.spec b/rclone.spec index f2df484..e414ead 100644 --- a/rclone.spec +++ b/rclone.spec @@ -16,7 +16,7 @@ Source1: %{name}-vendor-%{vendor_ver}.tar.xz # Source1-md5: e592365c54dcb593a5bd438302ce9ad8 Patch0: webdav-modtime.patch URL: https://rclone.org/ -BuildRequires: golang >= 1.14 +BuildRequires: golang >= 1.17 BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 2.009 BuildRequires: tar >= 1:1.22 -- 2.44.0 From 63f13ca79725aa1f484bcb766e72ccd78e1cc10f Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Thu, 17 Nov 2022 18:25:15 +0100 Subject: [PATCH 03/16] up to 1.60.1 --- rclone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclone.spec b/rclone.spec index e414ead..cc396d3 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,13 +1,13 @@ %define vendor_ver 1.60.0 Summary: rsync for cloud storage Name: rclone -Version: 1.60.0 +Version: 1.60.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 978de8d50c0127d32dda74e470ed6e16 +# Source0-md5: 746ad4cb7e973c82aa18f847f4d1e074 # cd rclone-%{version} # go mod vendor # cd .. -- 2.44.0 From e385e71ec08faa5b7b94fb2e65ca4a229041198b Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 20 Dec 2022 20:36:52 +0100 Subject: [PATCH 04/16] up to 1.61.0 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index cc396d3..ea40109 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.60.0 +%define vendor_ver 1.61.0 Summary: rsync for cloud storage Name: rclone -Version: 1.60.1 +Version: 1.61.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 746ad4cb7e973c82aa18f847f4d1e074 +# Source0-md5: fa25f4a630cd082d2ad683abf2d4c36b # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: e592365c54dcb593a5bd438302ce9ad8 +# Source1-md5: eb534dfc58fae9a7d15c954693e9c5f8 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.17 -- 2.44.0 From a83cbd5a22096309503a8ef9c3b8b3616f21249c Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 23 Dec 2022 20:59:46 +0100 Subject: [PATCH 05/16] up to 1.61.1 --- rclone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclone.spec b/rclone.spec index ea40109..799bc7d 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,13 +1,13 @@ %define vendor_ver 1.61.0 Summary: rsync for cloud storage Name: rclone -Version: 1.61.0 +Version: 1.61.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: fa25f4a630cd082d2ad683abf2d4c36b +# Source0-md5: 606a0755072efcc48dbdbd5bd9428cab # cd rclone-%{version} # go mod vendor # cd .. -- 2.44.0 From 7bee9cf472d8e5e6f0c05c8fa353dec403ef7c0f Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 14 Mar 2023 21:40:34 +0100 Subject: [PATCH 06/16] up to 1.62.0 --- rclone.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rclone.spec b/rclone.spec index 799bc7d..a95ba58 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,22 +1,22 @@ -%define vendor_ver 1.61.0 +%define vendor_ver 1.62.0 Summary: rsync for cloud storage Name: rclone -Version: 1.61.1 +Version: 1.62.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 606a0755072efcc48dbdbd5bd9428cab +# Source0-md5: 766687338a398ef770cd372d1ecd029a # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: eb534dfc58fae9a7d15c954693e9c5f8 +# Source1-md5: 1a8938f2f546675e41a3aaaf3c611f2b Patch0: webdav-modtime.patch URL: https://rclone.org/ -BuildRequires: golang >= 1.17 +BuildRequires: golang >= 1.18 BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 2.009 BuildRequires: tar >= 1:1.22 -- 2.44.0 From 600afa41642ae66c767728b0b076983d987e7e54 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Thu, 16 Mar 2023 10:15:01 +0100 Subject: [PATCH 07/16] up to 1.62.1 --- rclone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclone.spec b/rclone.spec index a95ba58..8f4eaa9 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,13 +1,13 @@ %define vendor_ver 1.62.0 Summary: rsync for cloud storage Name: rclone -Version: 1.62.0 +Version: 1.62.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 766687338a398ef770cd372d1ecd029a +# Source0-md5: e442f7706125de3e8881df55b5bbf53b # cd rclone-%{version} # go mod vendor # cd .. -- 2.44.0 From 0941c1f4348ccdf46533fcf5e993138b6a6e6413 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Thu, 16 Mar 2023 12:23:36 +0100 Subject: [PATCH 08/16] up to 1.62.2 --- rclone.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclone.spec b/rclone.spec index 8f4eaa9..59595f5 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,13 +1,13 @@ %define vendor_ver 1.62.0 Summary: rsync for cloud storage Name: rclone -Version: 1.62.1 +Version: 1.62.2 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: e442f7706125de3e8881df55b5bbf53b +# Source0-md5: 56f5b97ff5f465eca072bef5d0f0166e # cd rclone-%{version} # go mod vendor # cd .. -- 2.44.0 From 594aadbf944332de557c0fda4428e3832eb86199 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 1 Jul 2023 23:31:21 +0200 Subject: [PATCH 09/16] up to 1.63.0 --- rclone.spec | 8 +- webdav-modtime.patch | 305 ++++++++++++++----------------------------- 2 files changed, 103 insertions(+), 210 deletions(-) diff --git a/rclone.spec b/rclone.spec index 59595f5..2bc59bc 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.62.0 +%define vendor_ver 1.63.0 Summary: rsync for cloud storage Name: rclone -Version: 1.62.2 +Version: 1.63.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 56f5b97ff5f465eca072bef5d0f0166e +# Source0-md5: 256d217761fe35ae3bfab8adbb978048 # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: 1a8938f2f546675e41a3aaaf3c611f2b +# Source1-md5: b928c8d2450d8f834d5dc848e878fac2 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.18 diff --git a/webdav-modtime.patch b/webdav-modtime.patch index fe715ec..98810e8 100644 --- a/webdav-modtime.patch +++ b/webdav-modtime.patch @@ -1,243 +1,136 @@ -From b9c0e1efdb88ac08ae6053eaeb2f3034a3416e51 Mon Sep 17 00:00:00 2001 +From ab4cc10f49ddd4532b37f18b665716ee81c5f6bf Mon Sep 17 00:00:00 2001 From: Jan Palus -Date: Sat, 16 Apr 2022 23:06:53 +0200 -Subject: [PATCH 1/3] webdav: add support for spec compliant modification time - update +Date: Mon, 15 May 2023 19:16:22 +0200 +Subject: [PATCH 1/2] webdav: fastmail: adapt modtime update -rfc4918 section 15.7 states that getlastmodified SHOULD be protected -(read-only) but does not mandate it. implementations are free to choose -whether it is possible to update modification time. one such -implementation operating in the wild that allows it is FastMail WebDav -access. since specification recommends property to be protected make it -disabled by default. +to make new logic work with fastmail bring spec compliant update from: +https://github.com/rclone/rclone/pull/6108 --- - backend/webdav/webdav.go | 63 ++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 61 insertions(+), 2 deletions(-) + backend/webdav/webdav.go | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go -index 9564ae601..20f2b45ea 100644 +index 206b11bd1..f489a2068 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go -@@ -124,6 +124,11 @@ You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"' - `, - Default: fs.CommaSepList{}, - Advanced: true, -+ }, { -+ Name: "update_modtime", -+ Help: "Adjust modification time on servers which allow DAV:getlastmodified property update", -+ Default: false, -+ Advanced: true, - }}, - }) - } -@@ -138,6 +143,7 @@ type Options struct { - BearerTokenCommand string `config:"bearer_token_command"` - Enc encoder.MultiEncoder `config:"encoding"` - Headers fs.CommaSepList `config:"headers"` -+ UpdateModTime bool `config:"update_modtime"` - } - - // Fs represents a remote webdav -@@ -405,6 +411,13 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e - return nil, err - } - -+ var precision time.Duration -+ if opt.UpdateModTime { -+ precision = time.Second -+ } else { -+ precision = fs.ModTimeNotSupported -+ } -+ - f := &Fs{ - name: name, - root: root, -@@ -412,7 +425,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e - endpoint: u, - endpointURL: u.String(), - pacer: fs.NewPacer(ctx, pacer.NewDefault(pacer.MinSleep(minSleep), pacer.MaxSleep(maxSleep), pacer.DecayConstant(decayConstant))), -- precision: fs.ModTimeNotSupported, -+ precision: precision, - } - - client := fshttp.NewClient(ctx) -@@ -634,6 +647,16 @@ var owncloudProps = []byte(` - - - `) -+var modtimeUpdatePropStart = ` -+ -+ -+ -+ ` -+var modtimeUpdatePropEnd = ` -+ -+ -+ -+` - - // list the objects into the function supplied +@@ -176,6 +176,7 @@ type Fs struct { + canStream bool // set if can stream + useOCMtime bool // set if can use X-OC-Mtime + propsetMtime bool // set if can use propset ++ propNameMtime string // name of property to set for mtime + retryWithZeroDepth bool // some vendors (sharepoint) won't list files when Depth is 1 (our default) + checkBeforePurge bool // enables extra check that directory to purge really exists + hasOCMD5 bool // set if can use owncloud style checksums for MD5 +@@ -578,18 +579,22 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { + f.canStream = true + f.precision = time.Second + f.useOCMtime = true ++ f.propsetMtime = true ++ f.propNameMtime = "getlastmodified" + f.hasMESHA1 = true + case "owncloud": + f.canStream = true + f.precision = time.Second + f.useOCMtime = true + f.propsetMtime = true ++ f.propNameMtime = "lastmodified" + f.hasOCMD5 = true + f.hasOCSHA1 = true + case "nextcloud": + f.precision = time.Second + f.useOCMtime = true + f.propsetMtime = true ++ f.propNameMtime = "lastmodified" + f.hasOCSHA1 = true + f.canChunk = true + if err := f.verifyChunkConfig(); err != nil { +@@ -1305,11 +1310,11 @@ func (o *Object) ModTime(ctx context.Context) time.Time { + // Set modified time using propset // -@@ -1251,7 +1274,37 @@ func (o *Object) ModTime(ctx context.Context) time.Time { - + // /ocm/remote.php/webdav/office/wir.jpgHTTP/1.1 200 OK +-var owncloudPropset = ` ++var mtimePropset = ` + + + +- %d ++ %s + + + +@@ -1318,11 +1323,17 @@ var owncloudPropset = ` // SetModTime sets the modification time of the local fs object func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { -- return fs.ErrorCantSetModTime -+ if !o.fs.opt.UpdateModTime { -+ return fs.ErrorCantSetModTime -+ } -+ opts := rest.Opts{ -+ Method: "PROPPATCH", -+ Path: o.filePath(), -+ } -+ var body bytes.Buffer -+ body.WriteString(modtimeUpdatePropStart) -+ body.WriteString(modTime.Format(time.RFC1123)) -+ body.WriteString(modtimeUpdatePropEnd) -+ opts.Body = &body -+ -+ var result api.Multistatus -+ var resp *http.Response -+ var err error -+ err = o.fs.pacer.Call(func() (bool, error) { -+ resp, err = o.fs.srv.CallXML(ctx, &opts, nil, &result) -+ return o.fs.shouldRetry(ctx, resp, err) -+ }) -+ if err != nil { -+ return err -+ } -+ if len(result.Responses) < 1 { -+ return fs.ErrorObjectNotFound -+ } -+ item := result.Responses[0] -+ if !item.Props.StatusOK() { -+ return fs.ErrorObjectNotFound -+ } -+ return nil - } - - // Storable returns a boolean showing whether this object storable -@@ -1337,6 +1390,12 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op - _ = o.Remove(ctx) - return err - } -+ if !o.fs.useOCMtime && o.fs.opt.UpdateModTime { -+ err = o.SetModTime(ctx, src.ModTime(ctx)) -+ if err != nil { -+ return fmt.Errorf("Update ModTime failed: %w", err) + if o.fs.propsetMtime { ++ var modTimeStr string ++ if o.fs.propNameMtime == "getlastmodified" { ++ modTimeStr = modTime.Format(time.RFC1123) ++ } else { ++ modTimeStr = strconv.FormatInt(modTime.Unix(), 10) + } -+ } - // read metadata from remote - o.hasMetaData = false - return o.readMetaData(ctx) + opts := rest.Opts{ + Method: "PROPPATCH", + Path: o.filePath(), + NoRedirect: true, +- Body: strings.NewReader(fmt.Sprintf(owncloudPropset, modTime.Unix())), ++ Body: strings.NewReader(fmt.Sprintf(mtimePropset, o.fs.propNameMtime, modTimeStr, o.fs.propNameMtime)), + } + var result api.Multistatus + var resp *http.Response -- -2.37.0 +2.41.0 -From 9394b57866019df139fc0ce96a7a3572fad57666 Mon Sep 17 00:00:00 2001 +From 105f65b7f3892c69d72956331b63b661b2ff2a3b Mon Sep 17 00:00:00 2001 From: Jan Palus -Date: Wed, 27 Apr 2022 10:17:51 +0200 -Subject: [PATCH 2/3] webdav: switch to tristate for update_modtime +Date: Mon, 15 May 2023 19:20:32 +0200 +Subject: [PATCH 2/2] webdav: fastmail: support for update_modtime config opt +for compatibility with: +https://github.com/rclone/rclone/pull/6108 --- - backend/webdav/webdav.go | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) + backend/webdav/webdav.go | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go -index 20f2b45ea..d4c331de8 100644 +index f489a2068..5c26588cf 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go -@@ -125,9 +125,12 @@ You can set multiple headers, e.g. '"Cookie","name=value","Authorization","xxx"' - Default: fs.CommaSepList{}, +@@ -144,6 +144,14 @@ Set to 0 to disable chunked uploading. + `, Advanced: true, - }, { -- Name: "update_modtime", -- Help: "Adjust modification time on servers which allow DAV:getlastmodified property update", -- Default: false, + Default: 10 * fs.Mebi, // Default NextCloud `max_chunk_size` is `10 MiB`. See https://github.com/nextcloud/server/blob/0447b53bda9fe95ea0cbed765aa332584605d652/apps/files/lib/App.php#L57 ++ }, { + Name: "update_modtime", + Help: `Adjust modification time on servers which allow DAV:getlastmodified property update. + +Use provider's default if unset. +`, + Default: fs.Tristate{}, - Advanced: true, ++ Advanced: true, }}, }) -@@ -143,7 +146,7 @@ type Options struct { - BearerTokenCommand string `config:"bearer_token_command"` - Enc encoder.MultiEncoder `config:"encoding"` + } +@@ -160,6 +168,7 @@ type Options struct { Headers fs.CommaSepList `config:"headers"` -- UpdateModTime bool `config:"update_modtime"` + PacerMinSleep fs.Duration `config:"pacer_min_sleep"` + ChunkSize fs.SizeSuffix `config:"nextcloud_chunk_size"` + UpdateModTime fs.Tristate `config:"update_modtime"` } // Fs represents a remote webdav -@@ -412,7 +415,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e - } - - var precision time.Duration -- if opt.UpdateModTime { -+ if opt.UpdateModTime.Valid && opt.UpdateModTime.Value { - precision = time.Second - } else { - precision = fs.ModTimeNotSupported -@@ -1274,7 +1277,7 @@ func (o *Object) ModTime(ctx context.Context) time.Time { - - // SetModTime sets the modification time of the local fs object - func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { -- if !o.fs.opt.UpdateModTime { -+ if !o.fs.opt.UpdateModTime.Valid || !o.fs.opt.UpdateModTime.Value { - return fs.ErrorCantSetModTime - } - opts := rest.Opts{ -@@ -1390,7 +1393,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op - _ = o.Remove(ctx) - return err - } -- if !o.fs.useOCMtime && o.fs.opt.UpdateModTime { -+ if !o.fs.useOCMtime && o.fs.opt.UpdateModTime.Valid && o.fs.opt.UpdateModTime.Value { - err = o.SetModTime(ctx, src.ModTime(ctx)) - if err != nil { - return fmt.Errorf("Update ModTime failed: %w", err) --- -2.37.0 - -From 6775d10cc030e2e4b78ca774087bbb494cb0f79b Mon Sep 17 00:00:00 2001 -From: Jan Palus -Date: Thu, 28 Apr 2022 22:20:40 +0200 -Subject: [PATCH 3/3] webdav: add fastmail provider - -enables by default modtime update with PROPPATCH ---- - backend/webdav/webdav.go | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go -index d4c331de8..50152503e 100644 ---- a/backend/webdav/webdav.go -+++ b/backend/webdav/webdav.go -@@ -87,6 +87,9 @@ func init() { - }, { - Value: "sharepoint-ntlm", - Help: "Sharepoint with NTLM authentication, usually self-hosted or on-premises", -+ }, { -+ Value: "fastmail", -+ Help: "Fastmail", - }, { - Value: "other", - Help: "Other site/service or software", -@@ -596,6 +599,12 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { - // so we must perform an extra check to detect this - // condition and return a proper error code. - f.checkBeforePurge = true -+ case "fastmail": -+ if !f.opt.UpdateModTime.Valid { -+ f.precision = time.Second -+ f.opt.UpdateModTime.Valid = true -+ f.opt.UpdateModTime.Value = true +@@ -579,8 +588,10 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { + f.canStream = true + f.precision = time.Second + f.useOCMtime = true +- f.propsetMtime = true +- f.propNameMtime = "getlastmodified" ++ if !f.opt.UpdateModTime.Valid || f.opt.UpdateModTime.Valid && f.opt.UpdateModTime.Value { ++ f.propsetMtime = true ++ f.propNameMtime = "getlastmodified" + } - case "other": - default: - fs.Debugf(f, "Unknown vendor %q", vendor) + f.hasMESHA1 = true + case "owncloud": + f.canStream = true -- -2.37.0 +2.41.0 -- 2.44.0 From 2078caf7786e915f6a12804798d3b4316ff9c24b Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 19 Jul 2023 11:20:54 +0200 Subject: [PATCH 10/16] up to 1.63.1 --- rclone.spec | 8 ++++---- webdav-modtime.patch | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/rclone.spec b/rclone.spec index 2bc59bc..57b2194 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.63.0 +%define vendor_ver 1.63.1 Summary: rsync for cloud storage Name: rclone -Version: 1.63.0 +Version: 1.63.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 256d217761fe35ae3bfab8adbb978048 +# Source0-md5: fdeaa13e3eaa19124f817e5dc0ce4e2d # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: b928c8d2450d8f834d5dc848e878fac2 +# Source1-md5: 52d3a3583a17dc5390e7dc71481f1a17 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.18 diff --git a/webdav-modtime.patch b/webdav-modtime.patch index 98810e8..1254315 100644 --- a/webdav-modtime.patch +++ b/webdav-modtime.patch @@ -1,4 +1,4 @@ -From ab4cc10f49ddd4532b37f18b665716ee81c5f6bf Mon Sep 17 00:00:00 2001 +From fb38f0278d42b1de2a2f76c59aa294276aef64a1 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 15 May 2023 19:16:22 +0200 Subject: [PATCH 1/2] webdav: fastmail: adapt modtime update @@ -10,10 +10,10 @@ https://github.com/rclone/rclone/pull/6108 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go -index 206b11bd1..f489a2068 100644 +index 801e8d970..c91e4950c 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go -@@ -176,6 +176,7 @@ type Fs struct { +@@ -178,6 +178,7 @@ type Fs struct { canStream bool // set if can stream useOCMtime bool // set if can use X-OC-Mtime propsetMtime bool // set if can use propset @@ -21,7 +21,7 @@ index 206b11bd1..f489a2068 100644 retryWithZeroDepth bool // some vendors (sharepoint) won't list files when Depth is 1 (our default) checkBeforePurge bool // enables extra check that directory to purge really exists hasOCMD5 bool // set if can use owncloud style checksums for MD5 -@@ -578,18 +579,22 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { +@@ -581,18 +582,22 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { f.canStream = true f.precision = time.Second f.useOCMtime = true @@ -43,8 +43,8 @@ index 206b11bd1..f489a2068 100644 + f.propNameMtime = "lastmodified" f.hasOCSHA1 = true f.canChunk = true - if err := f.verifyChunkConfig(); err != nil { -@@ -1305,11 +1310,11 @@ func (o *Object) ModTime(ctx context.Context) time.Time { + +@@ -1322,11 +1327,11 @@ func (o *Object) ModTime(ctx context.Context) time.Time { // Set modified time using propset // // /ocm/remote.php/webdav/office/wir.jpgHTTP/1.1 200 OK @@ -58,7 +58,7 @@ index 206b11bd1..f489a2068 100644 -@@ -1318,11 +1323,17 @@ var owncloudPropset = ` +@@ -1335,11 +1340,17 @@ var owncloudPropset = ` // SetModTime sets the modification time of the local fs object func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { if o.fs.propsetMtime { @@ -80,7 +80,7 @@ index 206b11bd1..f489a2068 100644 -- 2.41.0 -From 105f65b7f3892c69d72956331b63b661b2ff2a3b Mon Sep 17 00:00:00 2001 +From 84d2bbc2e2eb15f4ef3558aec46adf33d3b443c3 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 15 May 2023 19:20:32 +0200 Subject: [PATCH 2/2] webdav: fastmail: support for update_modtime config opt @@ -92,10 +92,10 @@ https://github.com/rclone/rclone/pull/6108 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go -index f489a2068..5c26588cf 100644 +index c91e4950c..a8c7ffce8 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go -@@ -144,6 +144,14 @@ Set to 0 to disable chunked uploading. +@@ -146,6 +146,14 @@ Set to 0 to disable chunked uploading. `, Advanced: true, Default: 10 * fs.Mebi, // Default NextCloud `max_chunk_size` is `10 MiB`. See https://github.com/nextcloud/server/blob/0447b53bda9fe95ea0cbed765aa332584605d652/apps/files/lib/App.php#L57 @@ -110,7 +110,7 @@ index f489a2068..5c26588cf 100644 }}, }) } -@@ -160,6 +168,7 @@ type Options struct { +@@ -162,6 +170,7 @@ type Options struct { Headers fs.CommaSepList `config:"headers"` PacerMinSleep fs.Duration `config:"pacer_min_sleep"` ChunkSize fs.SizeSuffix `config:"nextcloud_chunk_size"` @@ -118,7 +118,7 @@ index f489a2068..5c26588cf 100644 } // Fs represents a remote webdav -@@ -579,8 +588,10 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { +@@ -582,8 +591,10 @@ func (f *Fs) setQuirks(ctx context.Context, vendor string) error { f.canStream = true f.precision = time.Second f.useOCMtime = true -- 2.44.0 From 787116e73f2186ccf58691e8b72de241ab08e385 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 11 Sep 2023 18:42:25 +0200 Subject: [PATCH 11/16] up to 1.64.0 --- rclone.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rclone.spec b/rclone.spec index 57b2194..b3c9b45 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,22 +1,22 @@ -%define vendor_ver 1.63.1 +%define vendor_ver 1.64.0 Summary: rsync for cloud storage Name: rclone -Version: 1.63.1 +Version: 1.64.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: fdeaa13e3eaa19124f817e5dc0ce4e2d +# Source0-md5: db20c5d1aa024590b0a5d58f63e722c0 # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: 52d3a3583a17dc5390e7dc71481f1a17 +# Source1-md5: d6e971ca52641fefc4aaf58fe79719b2 Patch0: webdav-modtime.patch URL: https://rclone.org/ -BuildRequires: golang >= 1.18 +BuildRequires: golang >= 1.19 BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 2.009 BuildRequires: tar >= 1:1.22 -- 2.44.0 From f4e02ed69ad9a59664d2c2a9e26cb18f0ddfc15a Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 18 Oct 2023 11:13:53 +0200 Subject: [PATCH 12/16] up to 1.64.1 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index b3c9b45..09c6878 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.64.0 +%define vendor_ver 1.64.1 Summary: rsync for cloud storage Name: rclone -Version: 1.64.0 +Version: 1.64.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: db20c5d1aa024590b0a5d58f63e722c0 +# Source0-md5: 540296d6046788310fa7ae66f1a69925 # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: d6e971ca52641fefc4aaf58fe79719b2 +# Source1-md5: deabb9a881e67410dcaf73fbe7d76d49 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.19 -- 2.44.0 From 207eda9736c0b774147a2013ca28fdb095e0495f Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 27 Nov 2023 15:27:26 +0100 Subject: [PATCH 13/16] up to 1.65.0 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index 09c6878..a1d87d7 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.64.1 +%define vendor_ver 1.65.0 Summary: rsync for cloud storage Name: rclone -Version: 1.64.1 +Version: 1.65.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 540296d6046788310fa7ae66f1a69925 +# Source0-md5: cedf7a662b2cb23d6d1e510ba583de63 # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: deabb9a881e67410dcaf73fbe7d76d49 +# Source1-md5: c898629009193df427f7b32b15219ed3 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.19 -- 2.44.0 From 53866c05985e37a704043e92ea85a286dc8cf1a1 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 8 Jan 2024 14:22:08 +0100 Subject: [PATCH 14/16] up to 1.65.1 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index a1d87d7..1678f76 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.65.0 +%define vendor_ver 1.65.1 Summary: rsync for cloud storage Name: rclone -Version: 1.65.0 +Version: 1.65.1 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: cedf7a662b2cb23d6d1e510ba583de63 +# Source0-md5: 187e6701d3732f2b1ded40f9c10bd2ee # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: c898629009193df427f7b32b15219ed3 +# Source1-md5: f0a30d2329e6c4873ad79121e2c2fd8d Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.19 -- 2.44.0 From d84480351be5c39aebd98b0689d80cf8d45387f7 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 24 Jan 2024 19:25:35 +0100 Subject: [PATCH 15/16] up to 1.65.2 --- rclone.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rclone.spec b/rclone.spec index 1678f76..adc67ac 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,19 +1,19 @@ -%define vendor_ver 1.65.1 +%define vendor_ver 1.65.2 Summary: rsync for cloud storage Name: rclone -Version: 1.65.1 +Version: 1.65.2 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: 187e6701d3732f2b1ded40f9c10bd2ee +# Source0-md5: a69c661fec93b84e508d31a8dc1ceddb # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: f0a30d2329e6c4873ad79121e2c2fd8d +# Source1-md5: 59c4f447060c9ccd7111933267c7c316 Patch0: webdav-modtime.patch URL: https://rclone.org/ BuildRequires: golang >= 1.19 -- 2.44.0 From 3c8921e4e0c50aaf67e295142b23a82b204b3b76 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 11 Mar 2024 11:31:01 +0100 Subject: [PATCH 16/16] up to 1.66.0 --- rclone.spec | 11 ++++++----- webdav-modtime.patch | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rclone.spec b/rclone.spec index adc67ac..f343ac0 100644 --- a/rclone.spec +++ b/rclone.spec @@ -1,22 +1,23 @@ -%define vendor_ver 1.65.2 +%define vendor_ver 1.66.0 + Summary: rsync for cloud storage Name: rclone -Version: 1.65.2 +Version: 1.66.0 Release: 1 License: MIT Group: Networking/Utilities #Source0Download: https://github.com/rclone/rclone/releases Source0: https://github.com/rclone/rclone/releases/download/v%{version}/%{name}-v%{version}.tar.gz -# Source0-md5: a69c661fec93b84e508d31a8dc1ceddb +# Source0-md5: ae301cfeecf0675209d0acbfd8eaf05a # cd rclone-%{version} # go mod vendor # cd .. # tar cJf rclone-vendor-%{version}.tar.xz rclone-v%{version}/vendor Source1: %{name}-vendor-%{vendor_ver}.tar.xz -# Source1-md5: 59c4f447060c9ccd7111933267c7c316 +# Source1-md5: acca3f3203821e5623497bccce73de75 Patch0: webdav-modtime.patch URL: https://rclone.org/ -BuildRequires: golang >= 1.19 +BuildRequires: golang >= 1.20 BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 2.009 BuildRequires: tar >= 1:1.22 diff --git a/webdav-modtime.patch b/webdav-modtime.patch index 1254315..ac61ec0 100644 --- a/webdav-modtime.patch +++ b/webdav-modtime.patch @@ -96,9 +96,9 @@ index c91e4950c..a8c7ffce8 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -146,6 +146,14 @@ Set to 0 to disable chunked uploading. - `, + Help: "Exclude ownCloud shares", Advanced: true, - Default: 10 * fs.Mebi, // Default NextCloud `max_chunk_size` is `10 MiB`. See https://github.com/nextcloud/server/blob/0447b53bda9fe95ea0cbed765aa332584605d652/apps/files/lib/App.php#L57 + Default: false, + }, { + Name: "update_modtime", + Help: `Adjust modification time on servers which allow DAV:getlastmodified property update. @@ -111,9 +111,9 @@ index c91e4950c..a8c7ffce8 100644 }) } @@ -162,6 +170,7 @@ type Options struct { - Headers fs.CommaSepList `config:"headers"` PacerMinSleep fs.Duration `config:"pacer_min_sleep"` ChunkSize fs.SizeSuffix `config:"nextcloud_chunk_size"` + ExcludeShares bool `config:"owncloud_exclude_shares"` + UpdateModTime fs.Tristate `config:"update_modtime"` } -- 2.44.0