From 4db833bfbe332f333cc7a7109acea1d0484aad01 Mon Sep 17 00:00:00 2001 From: ElonH Date: Sun, 14 Jun 2020 18:25:00 +0800 Subject: [PATCH 1/4] RcloneNg: bump version to 0.3.2 (#4810) * RcloneNg: bump version to 0.3.1 Changelog [0.3.1](https://github.com/ElonH/RcloneNg/compare/v0.3.0...v0.3.1) (2020-06-13) Features * **about:** show changelog ([9d7bea5](https://github.com/ElonH/RcloneNg/commit/9d7bea5f62a04560601ef37c371bcef8f1834182)) * **breadcurmb:** edit mode, double click to edit path. double again, back to normal ([60c57b4](https://github.com/ElonH/RcloneNg/commit/60c57b4368bea4b9cd9be39524e59a32a90014ff)) * **file.detail:** enable download file ([1f578f7](https://github.com/ElonH/RcloneNg/commit/1f578f7d54ca772eec85a5eab744d7e7de91a1ce)) * **file.detail:** show spaces usage in file detail if selected is directory ([ff27df9](https://github.com/ElonH/RcloneNg/commit/ff27df91615c515b56f44fde5a7aa9de0462dd04)) * **list-view:** expend click area of checkbox to improving user experience ([988a219](https://github.com/ElonH/RcloneNg/commit/988a219dbb874e722b7f65bc6b1f8a17be3b58a1)) * **manager:** push a message to toastr before creating directory ([9e1091a](https://github.com/ElonH/RcloneNg/commit/9e1091a1f1a2e84d97416d2213b80b83dd8b43d1)) * **pages:** add star button ([5c23b9b](https://github.com/ElonH/RcloneNg/commit/5c23b9bfe3bfb0e4891f0674450ad8af39281797)) * **server-setting:** adding more description in schema ([4eee2f5](https://github.com/ElonH/RcloneNg/commit/4eee2f55d9ca2ff246114027a4041533d26b4993)) * **server-setting:** provide a powerful schema for server setting ([67223bf](https://github.com/ElonH/RcloneNg/commit/67223bf7e4a26b80893f6a16dc7afcb7216ed5bf)) Bug Fixes * check if "rc.Serve" is enabled in server options before downloading file ([6a484ca](https://github.com/ElonH/RcloneNg/commit/6a484ca3a7d2e727a17db5cb20f5ea90cee10576)) * remove debug code ([b5cb23c](https://github.com/ElonH/RcloneNg/commit/b5cb23c9db1dabbcd61217e1cda575f703c6b471)) * **breadcurmb:** set cursor as poniter in breadcurmb item ([f014edc](https://github.com/ElonH/RcloneNg/commit/f014edc11e9b7c31c81f6d23c59f76b3a0f10d16)) * **changelog.md:** copy RcloneNg CHANGELOG.md only ([ef76e1e](https://github.com/ElonH/RcloneNg/commit/ef76e1e5892cd805128101b9cc389d62d454007e)) * **list-view:** disable double click in manipulations column ([0e0d825](https://github.com/ElonH/RcloneNg/commit/0e0d825f57ecd90307d2da02b2441d541bb56042)) * **list-view:** disable double click surrounding area of checkbox ([bf03dd1](https://github.com/ElonH/RcloneNg/commit/bf03dd173ffd1ba00c4b07cd2966956e3f769bac)) * **list-view:** disable select types icon ([2ea540e](https://github.com/ElonH/RcloneNg/commit/2ea540ec15901d103a47a92c1f1742da92e03dd8)) * **manager:** show detail button when right sidebar is expended ([d69179e](https://github.com/ElonH/RcloneNg/commit/d69179e36e2d76fac6e6462a685636b1acf1f377)) * RcloneNg: bump version to 0.3.2 Changelog [0.3.2](https://github.com/ElonH/RcloneNg/compare/v0.3.1...v0.3.2) (2020-06-14) Features * **jobs-manager:** add animation on refresh button ([b7cc817](https://github.com/ElonH/RcloneNg/commit/b7cc817b2302b63415deb74617027078f862d05e)) Bug Fixes * **list-view:** table index except first page ([b9d7fcf](https://github.com/ElonH/RcloneNg/commit/b9d7fcfb1ce884c5d7625e13c9a89835f68ffab8)) --- package/lean/rclone-ng/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/rclone-ng/Makefile b/package/lean/rclone-ng/Makefile index 5e1e09ca2..a5e9468ff 100644 --- a/package/lean/rclone-ng/Makefile +++ b/package/lean/rclone-ng/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rclone-ng -PKG_VERSION:=0.3.0 +PKG_VERSION:=0.3.2 PKG_RELEASE:=1 @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk PKG_SOURCE:=RcloneNg-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ElonH/RcloneNg/releases/download/v$(PKG_VERSION)/ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_HASH:=b6f7254fcb82d380ad621859a216fbf510059c95ad2df0e27bcf2872892f7c6f +PKG_HASH:=441fdfa577bdda7f58f62f6e75174a4a48e44d7c1361f7123d9699d791c08b5a define Package/$(PKG_NAME) SECTION:=net From 55c5c30b485eeb635c09aa8f3fccf5d74c162925 Mon Sep 17 00:00:00 2001 From: ElonH Date: Sun, 14 Jun 2020 18:25:17 +0800 Subject: [PATCH 2/4] rclone: Bump version to 1.52.1 (#4805) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog v1.52.1 - 2020-06-10 [See commits](https://github.com/rclone/rclone/compare/v1.52.0...v1.52.1) * Bug Fixes * lib/file: Fix SetSparse on Windows 7 which fixes downloads of files > 250MB (Nick Craig-Wood) * build * Update go.mod to go1.14 to enable -mod=vendor build (Nick Craig-Wood) * Remove quicktest from Dockerfile (Nick Craig-Wood) * Build Docker images with GitHub actions (Matteo Pietro Dazzi) * Update Docker build workflows (Nick Craig-Wood) * Set user_allow_other in /etc/fuse.conf in the Docker image (Nick Craig-Wood) * Fix xgo build after go1.14 go.mod update (Nick Craig-Wood) * docs * Add link to source and modified time to footer of every page (Nick Craig-Wood) * Remove manually set dates and use git dates instead (Nick Craig-Wood) * Minor tense, punctuation, brevity and positivity changes for the home page (edwardxml) * Remove leading slash in page reference in footer when present (Nick Craig-Wood) * Note commands which need obscured input in the docs (Nick Craig-Wood) * obscure: Write more help as we are referencing it elsewhere (Nick Craig-Wood) * VFS * Fix OS vs Unix path confusion - fixes ChangeNotify on Windows (Nick Craig-Wood) * Drive * Fix missing items when listing using --fast-list / ListR (Nick Craig-Wood) * Putio * Fix panic on Object.Open (Cenk Alti) * S3 * Fix upload of single files into buckets without create permission (Nick Craig-Wood) * Fix --header-upload (Nick Craig-Wood) * Tardigrade * Fix listing bug by upgrading to v1.0.7 * Set UserAgent to rclone (Caleb Case) v1.52.0 - 2020-05-27 Special thanks to Martin Michlmayr for proof reading and correcting all the docs and Edward Barker for helping re-write the front page. [See commits](https://github.com/rclone/rclone/compare/v1.51.0...v1.52.0) * New backends * [Tardigrade](/tardigrade/) backend for use with storj.io (Caleb Case) * [Union](/union/) re-write to have multiple writable remotes (Max Sum) * [Seafile](/seafile) for Seafile server (Fred @creativeprojects) * New commands * backend: command for backend specific commands (see backends) (Nick Craig-Wood) * cachestats: Deprecate in favour of `rclone backend stats cache:` (Nick Craig-Wood) * dbhashsum: Deprecate in favour of `rclone hashsum DropboxHash` (Nick Craig-Wood) * New Features * Add `--header-download` and `--header-upload` flags for setting HTTP headers when uploading/downloading (Tim Gallant) * Add `--header` flag to add HTTP headers to every HTTP transaction (Nick Craig-Wood) * Add `--check-first` to do all checking before starting transfers (Nick Craig-Wood) * Add `--track-renames-strategy` for configurable matching criteria for `--track-renames` (Bernd Schoolmann) * Add `--cutoff-mode` hard,soft,catious (Shing Kit Chan & Franklyn Tackitt) * Filter flags (eg `--files-from -`) can read from stdin (fishbullet) * Add `--error-on-no-transfer` option (Jon Fautley) * Implement `--order-by xxx,mixed` for copying some small and some big files (Nick Craig-Wood) * Allow `--max-backlog` to be negative meaning as large as possible (Nick Craig-Wood) * Added `--no-unicode-normalization` flag to allow Unicode filenames to remain unique (Ben Zenker) * Allow `--min-age`/`--max-age` to take a date as well as a duration (Nick Craig-Wood) * Add rename statistics for file and directory renames (Nick Craig-Wood) * Add statistics output to JSON log (reddi) * Make stats be printed on non-zero exit code (Nick Craig-Wood) * When running `--password-command` allow use of stdin (Sébastien Gross) * Stop empty strings being a valid remote path (Nick Craig-Wood) * accounting: support WriterTo for less memory copying (Nick Craig-Wood) * build * Update to use go1.14 for the build (Nick Craig-Wood) * Add `-trimpath` to release build for reproduceable builds (Nick Craig-Wood) * Remove GOOS and GOARCH from Dockerfile (Brandon Philips) * config * Fsync the config file after writing to save more reliably (Nick Craig-Wood) * Add `--obscure` and `--no-obscure` flags to `config create`/`update` (Nick Craig-Wood) * Make `config show` take `remote:` as well as `remote` (Nick Craig-Wood) * copyurl: Add `--no-clobber` flag (Denis) * delete: Added `--rmdirs` flag to delete directories as well (Kush) * filter: Added `--files-from-raw` flag (Ankur Gupta) * genautocomplete: Add support for fish shell (Matan Rosenberg) * log: Add support for syslog LOCAL facilities (Patryk Jakuszew) * lsjson: Add `--hash-type` parameter and use it in lsf to speed up hashing (Nick Craig-Wood) * rc * Add `-o`/`--opt` and `-a`/`--arg` for more structured input (Nick Craig-Wood) * Implement `backend/command` for running backend specific commands remotely (Nick Craig-Wood) * Add `mount/mount` command for starting `rclone mount` via the API (Chaitanya) * rcd: Add Prometheus metrics support (Gary Kim) * serve http * Added a `--template` flag for user defined markup (calistri) * Add Last-Modified headers to files and directories (Nick Craig-Wood) * serve sftp: Add support for multiple host keys by repeating `--key` flag (Maxime Suret) * touch: Add `--localtime` flag to make `--timestamp` localtime not UTC (Nick Craig-Wood) * Bug Fixes * accounting * Restore "Max number of stats groups reached" log line (Michał Matczuk) * Correct exitcode on Transfer Limit Exceeded flag. (Anuar Serdaliyev) * Reset bytes read during copy retry (Ankur Gupta) * Fix race clearing stats (Nick Craig-Wood) * copy: Only create empty directories when they don't exist on the remote (Ishuah Kariuki) * dedupe: Stop dedupe deleting files with identical IDs (Nick Craig-Wood) * oauth * Use custom http client so that `--no-check-certificate` is honored by oauth token fetch (Mark Spieth) * Replace deprecated oauth2.NoContext (Lars Lehtonen) * operations * Fix setting the timestamp on Windows for multithread copy (Nick Craig-Wood) * Make rcat obey `--ignore-checksum` (Nick Craig-Wood) * Make `--max-transfer` more accurate (Nick Craig-Wood) * rc * Fix dropped error (Lars Lehtonen) * Fix misplaced http server config (Xiaoxing Ye) * Disable duplicate log (ElonH) * serve dlna * Cds: don't specify childCount at all when unknown (Dan Walters) * Cds: use modification time as date in dlna metadata (Dan Walters) * serve restic: Fix tests after restic project removed vendoring (Nick Craig-Wood) * sync * Fix incorrect "nothing to transfer" message using `--delete-before` (Nick Craig-Wood) * Only create empty directories when they don't exist on the remote (Ishuah Kariuki) * Mount * Add `--async-read` flag to disable asynchronous reads (Nick Craig-Wood) * Ignore `--allow-root` flag with a warning as it has been removed upstream (Nick Craig-Wood) * Warn if `--allow-non-empty` used on Windows and clarify docs (Nick Craig-Wood) * Constrain to go1.13 or above otherwise bazil.org/fuse fails to compile (Nick Craig-Wood) * Fix fail because of too long volume name (evileye) * Report 1PB free for unknown disk sizes (Nick Craig-Wood) * Map more rclone errors into file systems errors (Nick Craig-Wood) * Fix disappearing cwd problem (Nick Craig-Wood) * Use ReaddirPlus on Windows to improve directory listing performance (Nick Craig-Wood) * Send a hint as to whether the filesystem is case insensitive or not (Nick Craig-Wood) * Add rc command `mount/types` (Nick Craig-Wood) * Change maximum leaf name length to 1024 bytes (Nick Craig-Wood) * VFS * Add `--vfs-read-wait` and `--vfs-write-wait` flags to control time waiting for a sequential read/write (Nick Craig-Wood) * Change default `--vfs-read-wait` to 20ms (it was 5ms and not configurable) (Nick Craig-Wood) * Make `df` output more consistent on a rclone mount. (Yves G) * Report 1PB free for unknown disk sizes (Nick Craig-Wood) * Fix race condition caused by unlocked reading of Dir.path (Nick Craig-Wood) * Make File lock and Dir lock not overlap to avoid deadlock (Nick Craig-Wood) * Implement lock ordering between File and Dir to eliminate deadlocks (Nick Craig-Wood) * Factor the vfs cache into its own package (Nick Craig-Wood) * Pin the Fs in use in the Fs cache (Nick Craig-Wood) * Add SetSys() methods to Node to allow caching stuff on a node (Nick Craig-Wood) * Ignore file not found errors from Hash in Read.Release (Nick Craig-Wood) * Fix hang in read wait code (Nick Craig-Wood) * Local * Speed up multi thread downloads by using sparse files on Windows (Nick Craig-Wood) * Implement `--local-no-sparse` flag for disabling sparse files (Nick Craig-Wood) * Implement `rclone backend noop` for testing purposes (Nick Craig-Wood) * Fix "file not found" errors on post transfer Hash calculation (Nick Craig-Wood) * Cache * Implement `rclone backend stats` command (Nick Craig-Wood) * Fix Server Side Copy with Temp Upload (Brandon McNama) * Remove Unused Functions (Lars Lehtonen) * Disable race tests until bbolt is fixed (Nick Craig-Wood) * Move methods used for testing into test file (greatroar) * Add Pin and Unpin and canonicalised lookup (Nick Craig-Wood) * Use proper import path go.etcd.io/bbolt (Robert-André Mauchin) * Crypt * Calculate hashes for uploads from local disk (Nick Craig-Wood) * This allows crypted Jottacloud uploads without using local disk * This means crypted s3/b2 uploads will now have hashes * Added `rclone backend decode`/`encode` commands to replicate functionality of `cryptdecode` (Anagh Kumar Baranwal) * Get rid of the unused Cipher interface as it obfuscated the code (Nick Craig-Wood) * Azure Blob * Implement streaming of unknown sized files so `rcat` is now supported (Nick Craig-Wood) * Implement memory pooling to control memory use (Nick Craig-Wood) * Add `--azureblob-disable-checksum` flag (Nick Craig-Wood) * Retry `InvalidBlobOrBlock` error as it may indicate block concurrency problems (Nick Craig-Wood) * Remove unused `Object.parseTimeString()` (Lars Lehtonen) * Fix permission error on SAS URL limited to container (Nick Craig-Wood) * B2 * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Ignore directory markers at the root also (Nick Craig-Wood) * Force the case of the SHA1 to lowercase (Nick Craig-Wood) * Remove unused `largeUpload.clearUploadURL()` (Lars Lehtonen) * Box * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Implement About to read size used (Nick Craig-Wood) * Add token renew function for jwt auth (David Bramwell) * Added support for interchangeable root folder for Box backend (Sunil Patra) * Remove unnecessary iat from jws claims (David) * Drive * Follow shortcuts by default, skip with `--drive-skip-shortcuts` (Nick Craig-Wood) * Implement `rclone backend shortcut` command for creating shortcuts (Nick Craig-Wood) * Added `rclone backend` command to change `service_account_file` and `chunk_size` (Anagh Kumar Baranwal) * Fix missing files when using `--fast-list` and `--drive-shared-with-me` (Nick Craig-Wood) * Fix duplicate items when using `--drive-shared-with-me` (Nick Craig-Wood) * Extend `--drive-stop-on-upload-limit` to respond to `teamDriveFileLimitExceeded`. (harry) * Don't delete files with multiple parents to avoid data loss (Nick Craig-Wood) * Server side copy docs use default description if empty (Nick Craig-Wood) * Dropbox * Make error insufficient space to be fatal (harry) * Add info about required redirect url (Elan Ruusamäe) * Fichier * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Implement custom pacer to deal with the new rate limiting (buengese) * FTP * Fix lockup when using concurrency limit on failed connections (Nick Craig-Wood) * Fix lockup on failed upload when using concurrency limit (Nick Craig-Wood) * Fix lockup on Close failures when using concurrency limit (Nick Craig-Wood) * Work around pureftp sending spurious 150 messages (Nick Craig-Wood) * Google Cloud Storage * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood) * Add `ARCHIVE` storage class to help (Adam Stroud) * Ignore directory markers at the root (Nick Craig-Wood) * Googlephotos * Make the start year configurable (Daven) * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Create feature/favorites directory (Brandon Philips) * Fix "concurrent map write" error (Nick Craig-Wood) * Don't put an image in error message (Nick Craig-Wood) * HTTP * Improved directory listing with new template from Caddy project (calisro) * Jottacloud * Implement `--jottacloud-trashed-only` (buengese) * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Use `RawURLEncoding` when decoding base64 encoded login token (buengese) * Implement cleanup (buengese) * Update docs regarding cleanup, removed remains from old auth, and added warning about special mountpoints. (albertony) * Mailru * Describe 2FA requirements (valery1707) * Onedrive * Implement `--onedrive-server-side-across-configs` (Nick Craig-Wood) * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Fix occasional 416 errors on multipart uploads (Nick Craig-Wood) * Added maximum chunk size limit warning in the docs (Harry) * Fix missing drive on config (Nick Craig-Wood) * Make error `quotaLimitReached` to be fatal (harry) * Opendrive * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Pcloud * Added support for interchangeable root folder for pCloud backend (Sunil Patra) * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Fix initial config "Auth state doesn't match" message (Nick Craig-Wood) * Premiumizeme * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Prune unused functions (Lars Lehtonen) * Putio * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood) * Make downloading files use the rclone http Client (Nick Craig-Wood) * Fix parsing of remotes with leading and trailing / (Nick Craig-Wood) * Qingstor * Make `rclone cleanup` remove pending multipart uploads older than 24h (Nick Craig-Wood) * Try harder to cancel failed multipart uploads (Nick Craig-Wood) * Prune `multiUploader.list()` (Lars Lehtonen) * Lint fix (Lars Lehtonen) * S3 * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Use memory pool for buffer allocations (Maciej Zimnoch) * Add SSE-C support for AWS, Ceph, and MinIO (Jack Anderson) * Fail fast multipart upload (Michał Matczuk) * Report errors on bucket creation (mkdir) correctly (Nick Craig-Wood) * Specify that Minio supports URL encoding in listings (Nick Craig-Wood) * Added 500 as retryErrorCode (Michał Matczuk) * Use `--low-level-retries` as the number of SDK retries (Aleksandar Janković) * Fix multipart abort context (Aleksandar Jankovic) * Replace deprecated `session.New()` with `session.NewSession()` (Lars Lehtonen) * Use the provided size parameter when allocating a new memory pool (Joachim Brandon LeBlanc) * Use rclone's low level retries instead of AWS SDK to fix listing retries (Nick Craig-Wood) * Ignore directory markers at the root also (Nick Craig-Wood) * Use single memory pool (Michał Matczuk) * Do not resize buf on put to memBuf (Michał Matczuk) * Improve docs for `--s3-disable-checksum` (Nick Craig-Wood) * Don't leak memory or tokens in edge cases for multipart upload (Nick Craig-Wood) * Seafile * Implement 2FA (Fred) * SFTP * Added `--sftp-pem-key` to support inline key files (calisro) * Fix post transfer copies failing with 0 size when using `set_modtime=false` (Nick Craig-Wood) * Sharefile * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Sugarsync * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Swift * Add support for `--header-upload` and `--header-download` (Nick Craig-Wood) * Fix cosmetic issue in error message (Martin Michlmayr) * Union * Implement multiple writable remotes (Max Sum) * Fix server-side copy (Max Sum) * Implement ListR (Max Sum) * Enable ListR when upstreams contain local (Max Sum) * WebDAV * Add support for `--header-upload` and `--header-download` (Tim Gallant) * Fix `X-OC-Mtime` header for Transip compatibility (Nick Craig-Wood) * Report full and consistent usage with `about` (Yves G) * Yandex * Add support for `--header-upload` and `--header-download` (Tim Gallant) --- package/lean/rclone/Makefile | 8 ++-- ...ccess-Control-Allow-Origin-only-once.patch | 44 ------------------- 2 files changed, 4 insertions(+), 48 deletions(-) delete mode 100644 package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch diff --git a/package/lean/rclone/Makefile b/package/lean/rclone/Makefile index 747a8f1b7..ab7e30b84 100644 --- a/package/lean/rclone/Makefile +++ b/package/lean/rclone/Makefile @@ -10,16 +10,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rclone -PKG_VERSION:=1.51.0 +PKG_VERSION:=1.52.1 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/rclone/rclone.git -PKG_SOURCE_DATE:=2020-02-01 -PKG_SOURCE_VERSION:=43daecd89b21292b112051340317927b42ccbdd3 +PKG_SOURCE_DATE:=2020-06-10 +PKG_SOURCE_VERSION:=31dc78905ea8dfb22c43724527b19e097e05c26a PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_HASH:=aca159c81971a9490a6a6c323b67879dccba3860955b66787d91590f4ba8ba29 +PKG_MIRROR_HASH:=fa79f62babc2f42691c9ad83ef906e90061d4ca6adcc97150c2906605312db66 PKG_LICENSE:=GPLv3 PKG_MAINTAINER:=ElonH diff --git a/package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch b/package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch deleted file mode 100644 index 5317aa56f..000000000 --- a/package/lean/rclone/patches/020-Notice-Access-Control-Allow-Origin-only-once.patch +++ /dev/null @@ -1,44 +0,0 @@ -## -# File: /patches/020-Notice-Access-Control-Allow-Origin-only-once.patch -# Project: rclone -# File Created: Sunday, 3rd May 2020 1:44:22 pm -# Author: ElonH[EH](elonhhuang@gmail.com) -# License: GNU General Public License v3.0 or later(http://www.gnu.org/licenses/gpl-3.0-standalone.html) -# Copyright (C) 2020 [ElonH] -## -diff --git a/fs/rc/rcserver/rcserver.go b/fs/rc/rcserver/rcserver.go -index 4a2b5c71e..f00994e93 100644 ---- a/fs/rc/rcserver/rcserver.go -+++ b/fs/rc/rcserver/rcserver.go -@@ -14,6 +14,7 @@ import ( - "regexp" - "sort" - "strings" -+ "sync" - - "github.com/pkg/errors" - "github.com/rclone/rclone/cmd/serve/httplib" -@@ -29,6 +30,8 @@ import ( - "github.com/skratchdot/open-golang/open" - ) - -+var onlyOnce sync.Once -+ - // Start the remote control server if configured - // - // If the server wasn't configured the *Server returned may be nil -@@ -172,9 +175,11 @@ func (s *Server) handler(w http.ResponseWriter, r *http.Request) { - - allowOrigin := rcflags.Opt.AccessControlAllowOrigin - if allowOrigin != "" { -- if allowOrigin == "*" { -- fs.Logf(nil, "Warning: Allow origin set to *. This can cause serious security problems.") -- } -+ onlyOnce.Do(func() { -+ if allowOrigin == "*" { -+ fs.Logf(nil, "Warning: Allow origin set to *. This can cause serious security problems.") -+ } -+ }) - w.Header().Add("Access-Control-Allow-Origin", allowOrigin) - } else { - w.Header().Add("Access-Control-Allow-Origin", s.URL()) From f4e6ac28a7d10bf592e41c72aadfddb71e1ba11e Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 14 Jun 2020 18:25:50 +0800 Subject: [PATCH 3/4] verysync: add auto select latest version support (#4790) --- package/lean/verysync/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/lean/verysync/Makefile b/package/lean/verysync/Makefile index a0d469b71..35e22eca2 100644 --- a/package/lean/verysync/Makefile +++ b/package/lean/verysync/Makefile @@ -28,8 +28,16 @@ ifeq ($(ARCH),powerpc64) PKG_ARCH_VERYSYNC:=ppc64 endif +LATEST_VERSION:=$(shell curl http://www.verysync.com/shell/latest) + PKG_NAME:=verysync -PKG_VERSION:=v1.4.3 + +ifneq ($(LATEST_VERSION),) + PKG_VERSION:=$(LATEST_VERSION) +else + PKG_VERSION:=v1.4.3 +endif + PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz From 70a9891f4a5dc28d47c2a8161ec8d8f9ffa3b26b Mon Sep 17 00:00:00 2001 From: Lienol Date: Sun, 14 Jun 2020 18:26:17 +0800 Subject: [PATCH 4/4] luci-app-kodexplorer: update api new version (#4788) --- package/lean/luci-app-kodexplorer/Makefile | 6 +- .../luasrc/controller/kodexplorer.lua | 20 +- .../luasrc/model/cbi/kodexplorer/api.lua | 79 ++--- .../luasrc/view/kodexplorer/download.htm | 278 +++++++++--------- .../luasrc/view/kodexplorer/status.htm | 15 +- .../luasrc/view/kodexplorer/version.htm | 8 +- .../etc/uci-defaults/luci-app-kodexplorer | 2 +- .../rpcd/acl.d/luci-app-kodexplorer.json | 11 + 8 files changed, 198 insertions(+), 221 deletions(-) create mode 100644 package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json diff --git a/package/lean/luci-app-kodexplorer/Makefile b/package/lean/luci-app-kodexplorer/Makefile index 532719285..91245e646 100644 --- a/package/lean/luci-app-kodexplorer/Makefile +++ b/package/lean/luci-app-kodexplorer/Makefile @@ -6,10 +6,10 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for KodExplorer -LUCI_DEPENDS:=+nginx +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +LUCI_DEPENDS:=+nginx +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql LUCI_PKGARCH:=all -PKG_VERSION:=1.1 -PKG_RELEASE:=20200210 +PKG_VERSION:=13 +PKG_DATE:=20200612 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua b/package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua index 08ec22fba..b8b2347c8 100644 --- a/package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua +++ b/package/lean/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua @@ -8,15 +8,11 @@ function index() if not nixio.fs.access("/etc/config/kodexplorer") then return end entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false - entry({"admin", "nas", "kodexplorer"}, cbi("kodexplorer/settings"), - _("KodExplorer"), 3).dependent = true + entry({"admin", "nas", "kodexplorer"}, cbi("kodexplorer/settings"), _("KodExplorer"), 3).dependent = true - entry({"admin", "nas", "kodexplorer", "check"}, call("action_check")).leaf = - true - entry({"admin", "nas", "kodexplorer", "download"}, call("action_download")).leaf = - true - entry({"admin", "nas", "kodexplorer", "status"}, call("act_status")).leaf = - true + entry({"admin", "nas", "kodexplorer", "check"}, call("action_check")).leaf = true + entry({"admin", "nas", "kodexplorer", "download"}, call("action_download")).leaf = true + entry({"admin", "nas", "kodexplorer", "status"}, call("act_status")).leaf = true end local function http_write_json(content) @@ -26,12 +22,8 @@ end function act_status() local e = {} - e.nginx_status = luci.sys.call( - "ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == - 0 - e.php_status = luci.sys.call( - "ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == - 0 + e.nginx_status = luci.sys.call("ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0 + e.php_status = luci.sys.call("ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0 http_write_json(e) end diff --git a/package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua b/package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua index ac00a4cc6..949dd094f 100644 --- a/package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua +++ b/package/lean/luci-app-kodexplorer/luasrc/model/cbi/kodexplorer/api.lua @@ -7,26 +7,12 @@ local i18n = require "luci.i18n" module("luci.model.cbi.kodexplorer.api", package.seeall) local appname = "kodexplorer" -local api_url = - "https://api.github.com/repos/kalcaddle/KodExplorer/releases/latest" -local download_url = "https://github.com/kalcaddle/KodExplorer/archive/" +local api_url = "https://api.kodcloud.com/?app/version" local wget = "/usr/bin/wget" -local wget_args = { - "--no-check-certificate", "--quiet", "--timeout=10", "--tries=2" -} +local wget_args = { "--no-check-certificate", "--quiet", "--timeout=10", "--tries=2" } local command_timeout = 300 -function uci_get_type(type, config, default) - value = uci:get(appname, "@" .. type .. "[0]", config) or sys.exec( - "echo -n `uci -q get " .. appname .. ".@" .. type .. "[0]." .. - config .. "`") - if (value == nil or value == "") and (default and default ~= "") then - value = default - end - return value -end - local function _unpack(t, i) i = i or 1 if t[i] ~= nil then return t[i], _unpack(t, i + 1) end @@ -77,6 +63,15 @@ local function exec(cmd, args, writer, timeout) end end +function get_project_directory() + return uci:get(appname, "@global[0]", "project_directory") or "/tmp/kodcloud" +end + +function get_version() + local version = get_project_directory() .. "/config/version.php" + return sys.exec(string.format("echo -n $(cat %s 2>/dev/null | grep \"'KOD_VERSION'\" | cut -d \"'\" -f 4)", version)) +end + local function compare_versions(ver1, comp, ver2) local table = table @@ -108,42 +103,16 @@ local function get_api_json(url) -- function(chunk) output[#output + 1] = chunk end) -- local json_content = util.trim(table.concat(output)) - local json_content = luci.sys.exec("wget-ssl -q --no-check-certificate -O- " .. url) + local json_content = sys.exec(wget .. " --no-check-certificate --timeout=10 -t 1 -O- " .. url) if json_content == "" then return {} end return jsonc.parse(json_content) or {} end -function get_project_directory() - return uci_get_type("global", "project_directory", "/tmp/kodexplorer") -end - function to_check() local json = get_api_json(api_url) - if json.tag_name == nil then - return { - code = 1, - error = i18n.translate("Get remote version info failed.") - } - end - local remote_version = json.tag_name - local html_url = json.html_url - download_url = download_url .. json.tag_name .. ".tar.gz" - if not download_url then - return { - code = 1, - version = remote_version, - html_url = html_url, - error = i18n.translate( - "New version found, but failed to get new version download url.") - } - end - return { - code = 0, - version = remote_version, - url = {html = html_url, download = download_url} - } + return json end function to_download(url) @@ -151,13 +120,11 @@ function to_download(url) return {code = 1, error = i18n.translate("Download url is required.")} end - sys.call("/bin/rm -f /tmp/kodexplorer_download.*") + sys.call("/bin/rm -f /tmp/kodcloud_download.*") - local tmp_file = util.trim(util.exec( - "mktemp -u -t kodexplorer_download.XXXXXX")) + local tmp_file = util.trim(util.exec("mktemp -u -t kodcloud_download.XXXXXX")) - local result = exec(wget, {"-O", tmp_file, url, _unpack(wget_args)}, nil, - command_timeout) == 0 + local result = exec(wget, {"-O", tmp_file, url, _unpack(wget_args)}, nil, command_timeout) == 0 if not result then exec("/bin/rm", {"-f", tmp_file}) @@ -175,13 +142,11 @@ function to_extract(file) return {code = 1, error = i18n.translate("File path required.")} end - sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*") - local tmp_dir = util.trim(util.exec( - "mktemp -d -t kodexplorer_extract.XXXXXX")) + sys.call("/bin/rm -rf /tmp/kodcloud_extract.*") + local tmp_dir = util.trim(util.exec("mktemp -d -t kodcloud_extract.XXXXXX")) local output = {} - exec("/bin/tar", {"-C", tmp_dir, "-zxvf", file}, - function(chunk) output[#output + 1] = chunk end) + exec("/usr/bin/unzip", {"-o", file, "-d", tmp_dir}, function(chunk) output[#output + 1] = chunk end) local files = util.split(table.concat(output)) @@ -192,14 +157,14 @@ end function to_move(file) if not file or file == "" or not fs.access(file) then - sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*") + sys.call("/bin/rm -rf /tmp/kodcloud_extract.*") return {code = 1, error = i18n.translate("Client file is required.")} end local client_file = get_project_directory() sys.call("mkdir -p " .. client_file) - sys.call("cp -R " .. file .. "/KodExplorer*/* " .. client_file) - sys.call("/bin/rm -rf /tmp/kodexplorer_extract.*") + sys.call("cp -R " .. file .. "/* " .. client_file) + sys.call("/bin/rm -rf /tmp/kodcloud_extract.*") return {code = 0} end diff --git a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm index fa271d6a6..21e522836 100644 --- a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm +++ b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/download.htm @@ -1,161 +1,163 @@ -<% -local dsp = require "luci.dispatcher" --%> + + // Move file to target dir + doAjaxGet(UpdateUrl, { + token: tokenStr, + task: 'move', + file: json.file + }, function (json) { + removePageNotice(); + if (json.code) { + onRequestError(btn, json.error); + } else { + onUpdateSuccess(btn); + } + }) + } + }) + } + }) + } + //]]> + <%+cbi/valueheader%> <% if self:cfgvalue(section) ~= false then %> diff --git a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm index 8b0a84b12..61ab40ff6 100644 --- a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm +++ b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm @@ -22,10 +22,17 @@ local dsp = require "luci.dispatcher" XHR.poll(3,'<%=dsp.build_url("admin/nas/kodexplorer/status")%>', null, function(x, json) { if (x && x.status == 200) { - if (nginx_status) - nginx_status.innerHTML = json.nginx_status ? '<%:RUNNING%> ✓' : '<%:NOT RUNNING%> X'; - if (php_status) + if (nginx_status) { + nginx_status.innerHTML = json.nginx_status ? '<%:RUNNING%> ✓' : '<%:NOT RUNNING%> X'; + } + if (php_status) { php_status.innerHTML = json.php_status ? '<%:RUNNING%> ✓' : '<%:NOT RUNNING%> X'; + } } - }); + } + ); + function openwebui(){ + var url = window.location.host+":<%=luci.sys.exec("uci -q get kodexplorer.@global[0].port"):gsub("^%s*(.-)%s*$", "%1")%>"; + window.open('http://'+url,'target',''); + } //]]> \ No newline at end of file diff --git a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm index 1a9c6d61a..c51541733 100644 --- a/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm +++ b/package/lean/luci-app-kodexplorer/luasrc/view/kodexplorer/version.htm @@ -1,16 +1,16 @@ <% -local kodexplorer_path = luci.sys.exec("echo -n `uci get kodexplorer.@global[0].project_directory`") -local kodexplorer_version = luci.sys.exec("[ -f '" .. kodexplorer_path .. "/ChangeLog.md' ] && echo -n `cat " .. kodexplorer_path .. "/ChangeLog.md | head -1 | awk '{print $2}'`") +local api = require "luci.model.cbi.kodexplorer.api" +local app_version = api.get_version() -%> -<% if kodexplorer_version ~= nil and kodexplorer_version~="" then %> +<% if app_version and app_version ~= "" then %>
- 【 <%=kodexplorer_version%> 】 + 【 <%=app_version%> 】
diff --git a/package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer b/package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer index 3b9196276..4ac2bb502 100755 --- a/package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer +++ b/package/lean/luci-app-kodexplorer/root/etc/uci-defaults/luci-app-kodexplorer @@ -8,5 +8,5 @@ uci -q batch <<-EOF >/dev/null EOF /etc/init.d/php7-fpm disable && /etc/init.d/php7-fpm stop -rm -f /tmp/luci-indexcache +rm -rf /tmp/luci-*cache exit 0 diff --git a/package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json b/package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json new file mode 100644 index 000000000..96e28b0c8 --- /dev/null +++ b/package/lean/luci-app-kodexplorer/root/usr/share/rpcd/acl.d/luci-app-kodexplorer.json @@ -0,0 +1,11 @@ +{ + "luci-app-kodexplorer": { + "description": "Grant UCI access for luci-app-kodexplorer", + "read": { + "uci": [ "kodexplorer" ] + }, + "write": { + "uci": [ "kodexplorer" ] + } + } +}