rclone: Update to 1.57.0
authorTianling Shen <cnsztl@immortalwrt.org>
Mon, 25 Oct 2021 11:59:49 +0000 (19:59 +0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 15 Nov 2021 21:10:53 +0000 (13:10 -0800)
- Disabled unused plugins and re-enabled CGO.
- Fixed test script

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit f712dc311e7c9b76b324e826f85eb2a5dfe33e62)

net/rclone/Makefile
net/rclone/patches/010-disable-plugins.patch [new file with mode: 0644]
net/rclone/test.sh

index fdc8fc8cbf205d8e849d49149e5fa797e8bec2ea..bb473c1b3c42726fef5147cb8f20d48593e462be 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rclone
-PKG_VERSION:=1.56.2
+PKG_VERSION:=1.57.0
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/rclone/rclone/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=a5b0b7dfe17d9ec74e3a33415eec4331c61d800d8823621e61c6164e8f88c567
+PKG_HASH:=294f7a6b0874509997d3a9ffae7c74f0c45b687df0ac7d7742f284ad3814fe55
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILE:=LICENSE
@@ -61,9 +61,6 @@ define Package/rclone-config/conffiles
 /etc/config/rclone
 endef
 
-# Disable CGO due to ld linker issue
-GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=0
-
 define Package/rclone/install
        $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
        $(INSTALL_DIR) $(1)/usr/bin/
diff --git a/net/rclone/patches/010-disable-plugins.patch b/net/rclone/patches/010-disable-plugins.patch
new file mode 100644 (file)
index 0000000..fb4c8a1
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/librclone/librclone.go
++++ b/librclone/librclone.go
+@@ -37,7 +37,7 @@ import (
+       _ "github.com/rclone/rclone/backend/all"   // import all backends
+       _ "github.com/rclone/rclone/fs/operations" // import operations/* rc commands
+       _ "github.com/rclone/rclone/fs/sync"       // import sync/*
+-      _ "github.com/rclone/rclone/lib/plugin"    // import plugins
++      // _ "github.com/rclone/rclone/lib/plugin"    // import plugins
+ )
+ // RcloneInitialize initializes rclone as a library
+--- a/rclone.go
++++ b/rclone.go
+@@ -7,7 +7,7 @@ import (
+       _ "github.com/rclone/rclone/backend/all" // import all backends
+       "github.com/rclone/rclone/cmd"
+       _ "github.com/rclone/rclone/cmd/all"    // import all commands
+-      _ "github.com/rclone/rclone/lib/plugin" // import plugins
++      // _ "github.com/rclone/rclone/lib/plugin" // import plugins
+ )
+ func main() {
index 152dbbfdeefb5531a4fe8bca456f3d64279be67d..4ed01899f28c286f96f36f47a3e62b3ed93b08c7 100644 (file)
@@ -1,3 +1,7 @@
 #!/bin/sh
 
-rclone version | grep "$2"
+case "$1" in
+       "rclone")
+               rclone version | grep "$2"
+               ;;
+esac