From 1e6e3dea2869f837bb52370b2ba86758fdfd154b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Oct 2021 23:18:33 +0800 Subject: [PATCH] update-10.07 --- .../files/aliyundrive-webdav.config | 1 + .../files/aliyundrive-webdav.init | 11 ++- .../model/cbi/aliyundrive-webdav/client.lua | 3 + .../po/zh-cn/aliyundrive-webdav.po | 3 + openwrt-upx/README.md | 42 +++++++++++ openwrt-upx/ucl/Makefile | 69 +++++++++++++++++++ .../ucl/patches/001-autoconf-compat.patch | 11 +++ openwrt-upx/upx/Makefile | 66 ++++++++++++++++++ 8 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 openwrt-upx/README.md create mode 100644 openwrt-upx/ucl/Makefile create mode 100644 openwrt-upx/ucl/patches/001-autoconf-compat.patch create mode 100644 openwrt-upx/upx/Makefile diff --git a/aliyundrive-webdav/files/aliyundrive-webdav.config b/aliyundrive-webdav/files/aliyundrive-webdav.config index 74248f63e..395b6f2c4 100644 --- a/aliyundrive-webdav/files/aliyundrive-webdav.config +++ b/aliyundrive-webdav/files/aliyundrive-webdav.config @@ -9,3 +9,4 @@ config server option read_buffer_size '10485760' option cache_size '1000' option root '/' + option no_trash '0' diff --git a/aliyundrive-webdav/files/aliyundrive-webdav.init b/aliyundrive-webdav/files/aliyundrive-webdav.init index 6a5212653..7be1d164e 100755 --- a/aliyundrive-webdav/files/aliyundrive-webdav.init +++ b/aliyundrive-webdav/files/aliyundrive-webdav.init @@ -24,9 +24,18 @@ start_service() { local host=$(uci_get_by_type server host 127.0.0.1) local port=$(uci_get_by_type server port 8080) local root=$(uci_get_by_type server root /) + local no_trash=$(uci_get_by_type server no_trash 0) + + local extra_options="-I" + case "$no_trash" in + 1|on|true|yes|enabled) + extra_options="$extra_options --no-trash" + ;; + *) ;; + esac procd_open_instance - procd_set_param command /bin/sh -c "/usr/bin/$NAME -I --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1" + procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1" procd_set_param pidfile /var/run/$NAME.pid procd_set_param env REFRESH_TOKEN="$refresh_token" [[ ! -z "$auth_user" ]] && procd_append_param env WEBDAV_AUTH_USER="$auth_user" diff --git a/luci-app-aliyundrive-webdav/luasrc/model/cbi/aliyundrive-webdav/client.lua b/luci-app-aliyundrive-webdav/luasrc/model/cbi/aliyundrive-webdav/client.lua index 4d4ae3408..517317969 100644 --- a/luci-app-aliyundrive-webdav/luasrc/model/cbi/aliyundrive-webdav/client.lua +++ b/luci-app-aliyundrive-webdav/luasrc/model/cbi/aliyundrive-webdav/client.lua @@ -39,6 +39,9 @@ cache_size = e:option(Value, "cache_size", translate("Cache Size")) cache_size.default = "1000" cache_size.datatype = "uinteger" +no_trash = e:option(Flag, "no_trash", translate("Delete file permanently instead of trashing")) +no_trash.rmempty = false + debug = e:option(Flag, "debug", translate("Debug Mode")) debug.rmempty = false diff --git a/luci-app-aliyundrive-webdav/po/zh-cn/aliyundrive-webdav.po b/luci-app-aliyundrive-webdav/po/zh-cn/aliyundrive-webdav.po index c3cb79a52..1f825ce6f 100644 --- a/luci-app-aliyundrive-webdav/po/zh-cn/aliyundrive-webdav.po +++ b/luci-app-aliyundrive-webdav/po/zh-cn/aliyundrive-webdav.po @@ -60,3 +60,6 @@ msgstr " +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/ucl/download +PKG_HASH:=b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348 + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +HOST_FIXUP:=autoreconf +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST) + +HOST_CFLAGS += -std=gnu89 +TARGET_CFLAGS += -std=gnu89 + +CONFIGURE_ARGS += \ + --enable-static \ + --enable-shared \ + --disable-asm + +define Package/libucl + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Portable lossless data compression library + URL:=http://www.oberhumer.com/opensource/ucl/ +endef + +define Package/libucl/description +UCL is a portable lossless data compression library written in ANSI C. UCL +implements a number of compression algorithms that achieve an excellent +compression ratio while allowing *very* fast decompression. Decompression +requires no additional memory. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/ucl + $(CP) $(PKG_INSTALL_DIR)/usr/include/ucl/ucl{,conf}.h $(1)/usr/include/ucl/ + + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucl.{a,so*} $(1)/usr/lib/ +endef + +define Package/libucl/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucl.so.* $(1)/usr/lib/ +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,libucl)) diff --git a/openwrt-upx/ucl/patches/001-autoconf-compat.patch b/openwrt-upx/ucl/patches/001-autoconf-compat.patch new file mode 100644 index 000000000..7dda83d8e --- /dev/null +++ b/openwrt-upx/ucl/patches/001-autoconf-compat.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -48,7 +48,7 @@ AC_CANONICAL_TARGET + AM_MAINTAINER_MODE + + if test -z "$ac_abs_top_srcdir"; then +- _AC_SRCPATHS(.) ++ _AC_SRCDIRS(.) + fi + if test -r .Conf.settings1; then + . ./.Conf.settings1 diff --git a/openwrt-upx/upx/Makefile b/openwrt-upx/upx/Makefile new file mode 100644 index 000000000..9eeb4a1d1 --- /dev/null +++ b/openwrt-upx/upx/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2011-2020 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=upx +PKG_RELEASE:=1 + +PKG_MAINTAINER:=Xingwang Liao +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING LICENSE + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2021-04-23 +PKG_SOURCE_VERSION:=2dae2a39972bc7c562dd3b02444336050a0b242e +PKG_SOURCE_URL:=https://github.com/upx/upx.git +PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz + +HOST_BUILD_DEPENDS:=ucl/host + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Host/Compile + UPX_UCLDIR=$(STAGING_DIR_HOST) \ + $(MAKE) -C $(HOST_BUILD_DIR)/src \ + CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \ + CXX="$(HOSTCXX)" +endef + +define Host/Install + $(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/upx +endef + +define Package/upx + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libucl +libstdcpp +zlib + TITLE:=The Ultimate Packer for eXecutables + URL:=https://upx.github.io/ +endef + +define Package/upx/description +UPX is a free, portable, extendable, high-performance executable packer for +several different executable formats. It achieves an excellent compression ratio +and offers very fast decompression. Your executables suffer no memory overhead +or other drawbacks for most of the formats supported, because of in-place +decompression. +endef + +MAKE_PATH := src + +define Package/upx/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/upx.out $(1)/usr/bin/upx +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,upx))