From 34a844949fc121e9394d3a470e13669ca61c4809 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sun, 18 Jun 2023 09:04:59 +0800 Subject: [PATCH 01/12] Delete luci-app-webd directory --- luci-app-webd/Makefile | 25 ---- luci-app-webd/README.md | 3 - luci-app-webd/luasrc/controller/webd.lua | 17 --- luci-app-webd/luasrc/model/cbi/webd.lua | 82 ------------ .../luasrc/view/webd/webd_status.htm | 27 ---- luci-app-webd/po/zh-cn/webd.po | 80 ------------ luci-app-webd/po/zh_Hans/webd.po | 80 ------------ luci-app-webd/root/etc/config/webd | 13 -- luci-app-webd/root/etc/init.d/webd | 120 ------------------ luci-app-webd/root/etc/uci-defaults/luci-webd | 11 -- .../usr/share/rpcd/acl.d/luci-app-webd.json | 11 -- 11 files changed, 469 deletions(-) delete mode 100755 luci-app-webd/Makefile delete mode 100644 luci-app-webd/README.md delete mode 100755 luci-app-webd/luasrc/controller/webd.lua delete mode 100755 luci-app-webd/luasrc/model/cbi/webd.lua delete mode 100755 luci-app-webd/luasrc/view/webd/webd_status.htm delete mode 100755 luci-app-webd/po/zh-cn/webd.po delete mode 100755 luci-app-webd/po/zh_Hans/webd.po delete mode 100755 luci-app-webd/root/etc/config/webd delete mode 100755 luci-app-webd/root/etc/init.d/webd delete mode 100755 luci-app-webd/root/etc/uci-defaults/luci-webd delete mode 100644 luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json diff --git a/luci-app-webd/Makefile b/luci-app-webd/Makefile deleted file mode 100755 index 7ebeb2321..000000000 --- a/luci-app-webd/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2020-2021 Hyy2001X - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-webd -PKG_VERSION:=1.3 -PKG_RELEASE:=3 - -LUCI_TITLE:=LuCI support for Webd Netdisk -LUCI_PKGARCH:=all - -LUCI_DEPENDS:= \ - +PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY:webd - -define Package/$(PKG_NAME)/config - -config PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY - bool "Include webd Binary" - default y - -endef - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-webd/README.md b/luci-app-webd/README.md deleted file mode 100644 index eda3ec5cd..000000000 --- a/luci-app-webd/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# luci-app-webd - -项目地址: https://webd.cf/ diff --git a/luci-app-webd/luasrc/controller/webd.lua b/luci-app-webd/luasrc/controller/webd.lua deleted file mode 100755 index 65bf78d04..000000000 --- a/luci-app-webd/luasrc/controller/webd.lua +++ /dev/null @@ -1,17 +0,0 @@ -module("luci.controller.webd",package.seeall) - -function index() - if not nixio.fs.access("/etc/config/webd") then - return - end - - entry({"admin", "nas", "webd"}, cbi("webd"), _("Webd Netdisk"),99) - entry({"admin", "nas", "webd", "status"}, call("act_status")).leaf = true -end - -function act_status() - local e = {} - e.running = luci.sys.call("pgrep webd > /dev/null") == 0 - luci.http.prepare_content("application/json") - luci.http.write_json(e) -end diff --git a/luci-app-webd/luasrc/model/cbi/webd.lua b/luci-app-webd/luasrc/model/cbi/webd.lua deleted file mode 100755 index 386d48b58..000000000 --- a/luci-app-webd/luasrc/model/cbi/webd.lua +++ /dev/null @@ -1,82 +0,0 @@ -m = Map("webd", translate("Webd Netdisk"), -translate("Webd - A lightweight self hosted netdisk") -.. [[ ]] -.. translate("Official Website") -.. [[]] -) - -m:section(SimpleSection).template = "webd/webd_status" - -s = m:section(TypedSection, "webd", translate("Basic Settings"), translate("Set the basic settings of Webd Netdisk")) -s.anonymous = true - -enable = s:option(Flag, "enable", translate("Enable")) -enable.default = 0 - -port = s:option(Value, "webd_port", translate("Listening Port")) -port.datatype = "port" -port.default = "9212" -port.rmempty = false - -enable_ipv6 = s:option(Flag, "enable_ipv6", translate("Listen IPv6"), translatef("Listen both IPv4 and IPv6 Address")) -enable_ipv6.default = 0 - -root = s:option(Value, "webd_root", translate("Local Directory"), translatef("Directory of Webd Netdisk")) -root.default = "/mnt" -root.rmempty = false - -enable_recyclebin = s:option(Flag, "enable_recyclebin", translate("Recycle Bin"), translatef("Automatically create recycle bin directory")) -enable_recyclebin.default = 1 - -enable_anonymous = s:option(Flag, "enable_anonymous", translate("Enable Anonymous Access"), translatef("Anonymous access is allowed when enabled (Not Safe)")) -enable_anonymous.default = 0 - -anonymous_perm = s:option(MultiValue, "anonymous_perm", translate("Anonymous Permission")) -anonymous_perm:value("r", translate("Read files")) -anonymous_perm:value("l", translate("Obtain file list")) -anonymous_perm:value("u", translate("Upload files")) -anonymous_perm:value("m", translate("Remove files")) -anonymous_perm:value("S", translate("Show hidden files")) -anonymous_perm:value("T", translate("Play media")) -anonymous_perm:depends("enable_anonymous", "1") -anonymous_perm.description = translate("At least one permission must be choosed to allow anonymous access") - -webd_bin = s:option(Value, "webd_bin", translate("Binary Path"), translatef("Webd Netdisk binary Path")) -webd_bin.default = "/usr/bin/webd" -webd_bin.rmempty = false - -webd_conf = s:option(Value, "webd_conf", translate("Config Path"), translatef("Webd Netdisk config Path")) -webd_conf.default = "/etc/webd.conf" -webd_conf.rmempty = false - -s = m:section(TypedSection, "users", translate("User Settings"), translate("Set the username, password and permissions. Maximum for 2 accounts")) -s.anonymous = true -s.addremove = true -s.template = "cbi/tblsection" - -username = s:option(Value, "username", translate("Username")) -username.rmempty = false - -password = s:option(Value, "password", translate("Password")) -password.rmempty = false -password.password=false - -enable_read = s:option(Flag, "enable_read", translate("Read files")) -enable_read.default = 1 - -enable_read_list = s:option(Flag, "enable_read_list", translate("Obtain file list")) -enable_read_list.default = 1 - -enable_upload = s:option(Flag, "enable_upload", translate("Upload files")) -enable_upload.default = 1 - -enable_move = s:option(Flag, "enable_move", translate("Remove files")) -enable_move.default = 1 - -enable_showhide = s:option(Flag, "enable_showhide", translate("Show hidden files")) -enable_showhide.default = 0 - -enable_play = s:option(Flag, "enable_play", translate("Play media")) -enable_play.default = 1 - -return m diff --git a/luci-app-webd/luasrc/view/webd/webd_status.htm b/luci-app-webd/luasrc/view/webd/webd_status.htm deleted file mode 100755 index 2df3e910d..000000000 --- a/luci-app-webd/luasrc/view/webd/webd_status.htm +++ /dev/null @@ -1,27 +0,0 @@ - - -
-

- <%:Collecting data...%> -

-
\ No newline at end of file diff --git a/luci-app-webd/po/zh-cn/webd.po b/luci-app-webd/po/zh-cn/webd.po deleted file mode 100755 index b5ded6714..000000000 --- a/luci-app-webd/po/zh-cn/webd.po +++ /dev/null @@ -1,80 +0,0 @@ -msgid "Webd Netdisk" -msgstr "Webd 网盘" - -msgid "Official Website" -msgstr "官网" - -msgid "Basic Settings" -msgstr "基础设置" - -msgid "Set the basic settings of Webd Netdisk" -msgstr "配置 Webd 网盘的基础设置" - -msgid "Listening Port" -msgstr "监听端口" - -msgid "Webd - A lightweight self hosted netdisk" -msgstr "Webd 是一款轻量级的 (self-hosted) 自建网盘软件, 界面简洁易用, 速度快资源占用低" - -msgid "Listen IPv6" -msgstr "监听 IPv6" - -msgid "Listen both IPv4 and IPv6 Address" -msgstr "同时监听 IPv4 和 IPv6 地址" - -msgid "Enable Anonymous Access" -msgstr "允许匿名访问" - -msgid "Anonymous Permission" -msgstr "匿名访问权限" - -msgid "Anonymous access is allowed when enabled (Not Safe)" -msgstr "启用后将允许匿名用户访问 (不安全)" - -msgid "At least one permission must be choosed to allow anonymous access" -msgstr "若要允许匿名访问则勾选至少一个权限" - -msgid "Binary Path" -msgstr "程序路径" - -msgid "Webd Netdisk binary Path" -msgstr "Webd 网盘二进制程序路径" - -msgid "Config Path" -msgstr "配置文件路径" - -msgid "Webd Netdisk config Path" -msgstr "Webd 网盘配置文件路径" - -msgid "Local Directory" -msgstr "本地路径" - -msgid "Directory of Webd Netdisk" -msgstr "Webd 网盘监听路径" - -msgid "Recycle Bin" -msgstr "回收站" - -msgid "Automatically create recycle bin directory" -msgstr "允许自动创建回收站目录" - -msgid "Set the username, password and permissions. Maximum for 2 accounts" -msgstr "设置用户名和密码, 以及单个用户的权限, 最多支持设置两个账号" - -msgid "Read files" -msgstr "读取文件" - -msgid "Obtain file list" -msgstr "获取文件列表" - -msgid "Upload files" -msgstr "上传文件" - -msgid "Remove files" -msgstr "删除或移动文件" - -msgid "Show hidden files" -msgstr "显示隐藏文件" - -msgid "Play media" -msgstr "播放媒体" diff --git a/luci-app-webd/po/zh_Hans/webd.po b/luci-app-webd/po/zh_Hans/webd.po deleted file mode 100755 index b5ded6714..000000000 --- a/luci-app-webd/po/zh_Hans/webd.po +++ /dev/null @@ -1,80 +0,0 @@ -msgid "Webd Netdisk" -msgstr "Webd 网盘" - -msgid "Official Website" -msgstr "官网" - -msgid "Basic Settings" -msgstr "基础设置" - -msgid "Set the basic settings of Webd Netdisk" -msgstr "配置 Webd 网盘的基础设置" - -msgid "Listening Port" -msgstr "监听端口" - -msgid "Webd - A lightweight self hosted netdisk" -msgstr "Webd 是一款轻量级的 (self-hosted) 自建网盘软件, 界面简洁易用, 速度快资源占用低" - -msgid "Listen IPv6" -msgstr "监听 IPv6" - -msgid "Listen both IPv4 and IPv6 Address" -msgstr "同时监听 IPv4 和 IPv6 地址" - -msgid "Enable Anonymous Access" -msgstr "允许匿名访问" - -msgid "Anonymous Permission" -msgstr "匿名访问权限" - -msgid "Anonymous access is allowed when enabled (Not Safe)" -msgstr "启用后将允许匿名用户访问 (不安全)" - -msgid "At least one permission must be choosed to allow anonymous access" -msgstr "若要允许匿名访问则勾选至少一个权限" - -msgid "Binary Path" -msgstr "程序路径" - -msgid "Webd Netdisk binary Path" -msgstr "Webd 网盘二进制程序路径" - -msgid "Config Path" -msgstr "配置文件路径" - -msgid "Webd Netdisk config Path" -msgstr "Webd 网盘配置文件路径" - -msgid "Local Directory" -msgstr "本地路径" - -msgid "Directory of Webd Netdisk" -msgstr "Webd 网盘监听路径" - -msgid "Recycle Bin" -msgstr "回收站" - -msgid "Automatically create recycle bin directory" -msgstr "允许自动创建回收站目录" - -msgid "Set the username, password and permissions. Maximum for 2 accounts" -msgstr "设置用户名和密码, 以及单个用户的权限, 最多支持设置两个账号" - -msgid "Read files" -msgstr "读取文件" - -msgid "Obtain file list" -msgstr "获取文件列表" - -msgid "Upload files" -msgstr "上传文件" - -msgid "Remove files" -msgstr "删除或移动文件" - -msgid "Show hidden files" -msgstr "显示隐藏文件" - -msgid "Play media" -msgstr "播放媒体" diff --git a/luci-app-webd/root/etc/config/webd b/luci-app-webd/root/etc/config/webd deleted file mode 100755 index acd693997..000000000 --- a/luci-app-webd/root/etc/config/webd +++ /dev/null @@ -1,13 +0,0 @@ - -config webd - option enable '0' - option webd_port '9212' - -config users - option enable_read '1' - option enable_read_list '1' - option enable_upload '1' - option enable_move '1' - option enable_showhide '0' - option username 'root' - option password 'password' diff --git a/luci-app-webd/root/etc/init.d/webd b/luci-app-webd/root/etc/init.d/webd deleted file mode 100755 index 65355c365..000000000 --- a/luci-app-webd/root/etc/init.d/webd +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -USE_PROCD=1 -LOGGER="logger -t [Webd]" - -start_service() { - local basic_list="enable webd_conf webd_bin webd_port webd_root enable_recyclebin enable_anonymous anonymous_perm enable_ipv6" - local users_list="enable_read enable_read_list enable_upload enable_move enable_showhide" - for i in $(echo $basic_list);do - local eval $i="$(uci_get_by_type webd 0 $i)" - done;unset i - if [ "$enable" == 1 ] - then - [ ! -r "$webd_root" -o ! -d "$webd_root" ] && EXIT "Unable to access $webd_root,exit ..." - [ ! -x "$webd_bin" ] && EXIT "Unable to access $webd_bin,exit ..." - if [ "$enable_recyclebin" == 1 -a ! -d "$webd_root/.Trash" ] - then - ${LOGGER} "Creating Recycle Bin directory ..." - mkdir -p $webd_root/.Trash || EXIT "Failed to create Recycle Bin directory,exit ..." - fi - ${LOGGER} "Removing old config file ..." - rm -f $webd_conf - touch -a $webd_conf || EXIT "Failed to create config,exit ..." - [ "$enable_ipv6" == 1 ] && webd_port="[::]:${webd_port}" - if [ "$enable_anonymous" != 0 ] - then - if [ -n "$anonymous_perm" ] - then - - unset enable_anonymous - for i in $(echo $anonymous_perm);do - enable_anonymous="$enable_anonymous$i" - done - unset i - else - enable_anonymous=0 - uci set webd.@webd[0].enable_anonymous=0 - uci commit webd - fi - fi - echo "Webd.Listen $webd_port" >> $webd_conf - echo "Webd.Root $webd_root" >> $webd_conf - echo "Webd.Guest $enable_anonymous" >> $webd_conf - - for u in 0 1;do - for i in $(echo $users_list);do - eval ${i}=$(uci_get_by_type users $u $i 0) - echo "$users_list" | grep -q $i - [ "$?" == 0 ] && eval perm_bin=$(eval echo '$'perm_bin)$(uci_get_by_type users $u $i) - done - unset i - username=$(uci_get_by_type users $u username) - password=$(uci_get_by_type users $u password) - if [ -n "$username" ] - then - eval perm=$(perm_converter $(eval echo '$'perm_bin) | tail -n 1) - if [ -n "$(eval echo '$'perm)" ] - then - ${LOGGER} "Creating account for User $username ..." - echo "Webd.User $(eval echo '$'perm) $username $password" >> $webd_conf - else - ${LOGGER} "Removing excessive user config ..." - uci delete webd.@users[$u] - uci commit webd - fi - unset perm_bin - fi - done - unset u - ${LOGGER} "Killing old processes ..." - ps -efww | grep "$webd_bin" | awk '{print $1}' | xargs kill -9 2> /dev/null - ${LOGGER} "Starting Webd Netdisk Service ..." - procd_open_instance - procd_set_param command $webd_bin -c $webd_conf - procd_set_param respawn - procd_close_instance - else - stop_service - ${LOGGER} "Webd Netdisk Service is now disabled ..." - fi -} - -stop_service() { - ${LOGGER} "Stopping Webd Netdisk Service ..." -} - -service_triggers() { - procd_add_reload_trigger "webd" -} - -uci_get_by_type() { - local ret=$(uci get webd.@$1[$2].$3 2>/dev/null) - echo ${ret:=$4} -} - -EXIT() { - ${LOGGER} $* - exit -} - -perm_converter() { - local u i=1 - echo $1 | egrep -o [0-1] | while read X - do - if [ "$X" == 1 ] - then - case $i in - 1)u=r;; - 2)u=l;; - 3)u=u;; - 4)u=m;; - 5)u=S;; - esac - [ -n "$u" ] && a="$a$u" - echo "$a" - fi - i=$(($i + 1)) - done -} diff --git a/luci-app-webd/root/etc/uci-defaults/luci-webd b/luci-app-webd/root/etc/uci-defaults/luci-webd deleted file mode 100755 index 41934849f..000000000 --- a/luci-app-webd/root/etc/uci-defaults/luci-webd +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@webd[-1] - add ucitrack webd - set ucitrack.@webd[-1].init=webd - commit ucitrack -EOF - -rm -f /tmp/luci-indexcache -exit 0 diff --git a/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json b/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json deleted file mode 100644 index 8247638a0..000000000 --- a/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-webd": { - "description": "Grant UCI access for luci-app-webd", - "read": { - "uci": [ "webd" ] - }, - "write": { - "uci": [ "webd" ] - } - } -} From 87c5d642f43e1da917dc61119521f160953f5470 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sun, 18 Jun 2023 09:05:47 +0800 Subject: [PATCH 02/12] Delete webd directory --- webd/Makefile | 93 --------------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100755 webd/Makefile diff --git a/webd/Makefile b/webd/Makefile deleted file mode 100755 index ebd92acb7..000000000 --- a/webd/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 2020-2022 Hyy2001X -# See more information at https://webd.cf/ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=webd -PKG_VERSION:=20220512 -PKG_RELEASE:=$(AUTORELESE) - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=A Lightweight self-hosted netdisk application - DEPENDS:=@(arm||x86_64||mipsel||mips||aarch64) - URL:=https://webd.cf -endef - -ifeq ($(ARCH),aarch64) - ifeq ($(BOARD),cortex-a53) - TARGET_ARCH:=aarch64_cortex-a53.brcm2708-bcm2710 - endif - ifeq ($(BOARD),rockchip) - TARGET_ARCH:=aarch64_generic.rockchip-armv8 - endif - ifeq ($(BOARD),mvebu) - TARGET_ARCH:=arm_cortex-a9.mvebu-cortexa9 - endif -endif - -ifeq ($(ARCH),arm) - ifeq ($(BOARD),ipq806x) - TARGET_ARCH:=arm_cortex-a15.ipq806x - endif - ifeq ($(BOARD),ipq40xx) - TARGET_ARCH:=arm_cortex-a7.ipq40xx - endif - ifeq ($(BOARD),bcm53xx) - TARGET_ARCH:=arm_cortex-a9.bcm53xx - endif - ifeq ($(BOARD),oxnas) - TARGET_ARCH:=arm_mpcore.oxnas - endif - ifeq ($(BOARD),kirkwood) - TARGET_ARCH:=arm_xscale.kirkwood - endif -endif - -ifeq ($(ARCH),mipsel) - ifeq ($(BOARD),bcm47xx) - TARGET_ARCH:=mipsel_74kc.brcm47xx-mips74k - endif - ifeq ($(BOARD),ramips) - TARGET_ARCH:=mipsel_24kc.ramips-mt7620 - endif -endif - -ifeq ($(ARCH),mips) - ifeq ($(BOARD),ath79) - TARGET_ARCH:=mips_24kc.ath79 - endif - ifeq ($(BOARD),bcm63xx) - TARGET_ARCH:=mips_mips32.brcm63xx-uClibc - endif -endif - -ifeq ($(ARCH),x86_64) - TARGET_ARCH:=x86-64 -endif - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-openwrt-$(TARGET_ARCH).tar.gz -PKG_SOURCE_URL:=https://gwgw.ga/webd/$(PKG_VERSION)/ -PKG_HASH:=skip - -UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -define Build/Prepare - mkdir -p $(UNTAR_DIR) - tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(UNTAR_DIR) -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(UNTAR_DIR)/webd/webd $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME) - $(INSTALL_BIN) $(UNTAR_DIR)/webd/web/.player.htm $(1)/usr/share/$(PKG_NAME) -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) From 5ccde8884129433c6cdd6e74a22ea66b5382a3b7 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sun, 18 Jun 2023 10:12:02 +0800 Subject: [PATCH 03/12] fix webd makefile --- webd/Makefile | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/webd/Makefile b/webd/Makefile index ebd92acb7..fc8dec7c2 100755 --- a/webd/Makefile +++ b/webd/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=webd -PKG_VERSION:=20220512 +PKG_VERSION:=20230604 PKG_RELEASE:=$(AUTORELESE) include $(INCLUDE_DIR)/package.mk @@ -19,58 +19,61 @@ endef ifeq ($(ARCH),aarch64) ifeq ($(BOARD),cortex-a53) - TARGET_ARCH:=aarch64_cortex-a53.brcm2708-bcm2710 + TARGET_ARCH:=musl.brcm2708-bcm2710 endif ifeq ($(BOARD),rockchip) - TARGET_ARCH:=aarch64_generic.rockchip-armv8 - endif - ifeq ($(BOARD),mvebu) - TARGET_ARCH:=arm_cortex-a9.mvebu-cortexa9 + TARGET_ARCH:=musl.rockchip-armv8 endif endif ifeq ($(ARCH),arm) ifeq ($(BOARD),ipq806x) - TARGET_ARCH:=arm_cortex-a15.ipq806x + TARGET_ARCH:=muslgnueabi.ipq806x endif ifeq ($(BOARD),ipq40xx) - TARGET_ARCH:=arm_cortex-a7.ipq40xx + TARGET_ARCH:=muslgnueabi.ipq40xx endif ifeq ($(BOARD),bcm53xx) - TARGET_ARCH:=arm_cortex-a9.bcm53xx + TARGET_ARCH:=muslgnueabi.bcm53xx endif ifeq ($(BOARD),oxnas) - TARGET_ARCH:=arm_mpcore.oxnas + TARGET_ARCH:=muslgnueabi.oxnas endif ifeq ($(BOARD),kirkwood) - TARGET_ARCH:=arm_xscale.kirkwood + TARGET_ARCH:=muslgnueabi.kirkwood + endif + ifeq ($(BOARD),mvebu) + TARGET_ARCH:=muslgnueabi.mvebu-cortexa9 endif endif ifeq ($(ARCH),mipsel) ifeq ($(BOARD),bcm47xx) - TARGET_ARCH:=mipsel_74kc.brcm47xx-mips74k + TARGET_ARCH:=musl.brcm47xx-mips74k endif ifeq ($(BOARD),ramips) - TARGET_ARCH:=mipsel_24kc.ramips-mt7620 + TARGET_ARCH:=musl.ramips-mt7620 endif endif ifeq ($(ARCH),mips) ifeq ($(BOARD),ath79) - TARGET_ARCH:=mips_24kc.ath79 + TARGET_ARCH:=musl.ath79 endif ifeq ($(BOARD),bcm63xx) - TARGET_ARCH:=mips_mips32.brcm63xx-uClibc + TARGET_ARCH:=uclibc.brcm63xx + endif + ifeq ($(BOARD),ar71xx) + TARGET_ARCH:=uclibc.ar71xx endif endif ifeq ($(ARCH),x86_64) - TARGET_ARCH:=x86-64 + TARGET_ARCH:=musl.x86-64 endif -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-openwrt-$(TARGET_ARCH).tar.gz -PKG_SOURCE_URL:=https://gwgw.ga/webd/$(PKG_VERSION)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH)-openwrt-linux-$(TARGET_ARCH).tar.gz +PKG_SOURCE_URL:=https://cnt2.cf/fidx.html#/webd/$(PKG_VERSION)/ PKG_HASH:=skip UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) From 82c8e6b5720b54fae7d1ecb54de747fe1ad57420 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sun, 18 Jun 2023 10:15:04 +0800 Subject: [PATCH 04/12] Update date --- webd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webd/Makefile b/webd/Makefile index fc8dec7c2..ed4dc168c 100755 --- a/webd/Makefile +++ b/webd/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2022 Hyy2001X +# Copyright (C) 2020-2023 Hyy2001X # See more information at https://webd.cf/ include $(TOPDIR)/rules.mk From 48d7115c22cb82f1b95982a35e0bd57bca68497d Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 11:06:35 +0800 Subject: [PATCH 05/12] fix pkg url --- webd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webd/Makefile b/webd/Makefile index ed4dc168c..300f0ccf5 100755 --- a/webd/Makefile +++ b/webd/Makefile @@ -73,7 +73,7 @@ ifeq ($(ARCH),x86_64) endif PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH)-openwrt-linux-$(TARGET_ARCH).tar.gz -PKG_SOURCE_URL:=https://cnt2.cf/fidx.html#/webd/$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://cnt2.cf/fidx.html\#/webd/$(PKG_VERSION)/ PKG_HASH:=skip UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) From 21247645c3e05fd09acec46720f972dd3ad0ab90 Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 11:12:05 +0800 Subject: [PATCH 06/12] mkdir webd/Makefile --- webd/Makefile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 webd/Makefile diff --git a/webd/Makefile b/webd/Makefile new file mode 100644 index 000000000..e69de29bb From 8c10a6623a3180ef1dfc8d983ae4617f748930c4 Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 11:26:19 +0800 Subject: [PATCH 07/12] update webd Makefile --- webd/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webd/Makefile b/webd/Makefile index 300f0ccf5..18ab7d89c 100755 --- a/webd/Makefile +++ b/webd/Makefile @@ -1,3 +1,4 @@ +<<<<<<< HEAD # Copyright (C) 2020-2023 Hyy2001X # See more information at https://webd.cf/ @@ -94,3 +95,5 @@ define Package/$(PKG_NAME)/install endef $(eval $(call BuildPackage,$(PKG_NAME))) +======= +>>>>>>> main From c7ba0e65b091e0b04a7fcb9fd95228c9053f21cc Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 11:27:40 +0800 Subject: [PATCH 08/12] update webd/Makefile --- webd/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/webd/Makefile b/webd/Makefile index 18ab7d89c..300f0ccf5 100755 --- a/webd/Makefile +++ b/webd/Makefile @@ -1,4 +1,3 @@ -<<<<<<< HEAD # Copyright (C) 2020-2023 Hyy2001X # See more information at https://webd.cf/ @@ -95,5 +94,3 @@ define Package/$(PKG_NAME)/install endef $(eval $(call BuildPackage,$(PKG_NAME))) -======= ->>>>>>> main From 38db25803d1d4b67de352df5ba71230283891c0b Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 11:40:42 +0800 Subject: [PATCH 09/12] mkdir luci-app-webd --- luci-app-webd/Makefile | 25 ++++ luci-app-webd/README.md | 3 + luci-app-webd/luasrc/controller/webd.lua | 17 +++ luci-app-webd/luasrc/model/cbi/webd.lua | 82 ++++++++++++ .../luasrc/view/webd/webd_status.htm | 27 ++++ luci-app-webd/po/zh-cn/webd.po | 80 ++++++++++++ luci-app-webd/po/zh_Hans/webd.po | 80 ++++++++++++ luci-app-webd/root/etc/config/webd | 13 ++ luci-app-webd/root/etc/init.d/webd | 120 ++++++++++++++++++ luci-app-webd/root/etc/uci-defaults/luci-webd | 11 ++ .../usr/share/rpcd/acl.d/luci-app-webd.json | 11 ++ 11 files changed, 469 insertions(+) create mode 100644 luci-app-webd/Makefile create mode 100644 luci-app-webd/README.md create mode 100644 luci-app-webd/luasrc/controller/webd.lua create mode 100644 luci-app-webd/luasrc/model/cbi/webd.lua create mode 100644 luci-app-webd/luasrc/view/webd/webd_status.htm create mode 100644 luci-app-webd/po/zh-cn/webd.po create mode 100644 luci-app-webd/po/zh_Hans/webd.po create mode 100644 luci-app-webd/root/etc/config/webd create mode 100644 luci-app-webd/root/etc/init.d/webd create mode 100644 luci-app-webd/root/etc/uci-defaults/luci-webd create mode 100644 luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json diff --git a/luci-app-webd/Makefile b/luci-app-webd/Makefile new file mode 100644 index 000000000..7ebeb2321 --- /dev/null +++ b/luci-app-webd/Makefile @@ -0,0 +1,25 @@ +# Copyright (C) 2020-2021 Hyy2001X + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luci-app-webd +PKG_VERSION:=1.3 +PKG_RELEASE:=3 + +LUCI_TITLE:=LuCI support for Webd Netdisk +LUCI_PKGARCH:=all + +LUCI_DEPENDS:= \ + +PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY:webd + +define Package/$(PKG_NAME)/config + +config PACKAGE_$(PKG_NAME)_INCLUDE_WEBD_BINARY + bool "Include webd Binary" + default y + +endef + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-webd/README.md b/luci-app-webd/README.md new file mode 100644 index 000000000..eda3ec5cd --- /dev/null +++ b/luci-app-webd/README.md @@ -0,0 +1,3 @@ +# luci-app-webd + +项目地址: https://webd.cf/ diff --git a/luci-app-webd/luasrc/controller/webd.lua b/luci-app-webd/luasrc/controller/webd.lua new file mode 100644 index 000000000..65bf78d04 --- /dev/null +++ b/luci-app-webd/luasrc/controller/webd.lua @@ -0,0 +1,17 @@ +module("luci.controller.webd",package.seeall) + +function index() + if not nixio.fs.access("/etc/config/webd") then + return + end + + entry({"admin", "nas", "webd"}, cbi("webd"), _("Webd Netdisk"),99) + entry({"admin", "nas", "webd", "status"}, call("act_status")).leaf = true +end + +function act_status() + local e = {} + e.running = luci.sys.call("pgrep webd > /dev/null") == 0 + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end diff --git a/luci-app-webd/luasrc/model/cbi/webd.lua b/luci-app-webd/luasrc/model/cbi/webd.lua new file mode 100644 index 000000000..386d48b58 --- /dev/null +++ b/luci-app-webd/luasrc/model/cbi/webd.lua @@ -0,0 +1,82 @@ +m = Map("webd", translate("Webd Netdisk"), +translate("Webd - A lightweight self hosted netdisk") +.. [[ ]] +.. translate("Official Website") +.. [[]] +) + +m:section(SimpleSection).template = "webd/webd_status" + +s = m:section(TypedSection, "webd", translate("Basic Settings"), translate("Set the basic settings of Webd Netdisk")) +s.anonymous = true + +enable = s:option(Flag, "enable", translate("Enable")) +enable.default = 0 + +port = s:option(Value, "webd_port", translate("Listening Port")) +port.datatype = "port" +port.default = "9212" +port.rmempty = false + +enable_ipv6 = s:option(Flag, "enable_ipv6", translate("Listen IPv6"), translatef("Listen both IPv4 and IPv6 Address")) +enable_ipv6.default = 0 + +root = s:option(Value, "webd_root", translate("Local Directory"), translatef("Directory of Webd Netdisk")) +root.default = "/mnt" +root.rmempty = false + +enable_recyclebin = s:option(Flag, "enable_recyclebin", translate("Recycle Bin"), translatef("Automatically create recycle bin directory")) +enable_recyclebin.default = 1 + +enable_anonymous = s:option(Flag, "enable_anonymous", translate("Enable Anonymous Access"), translatef("Anonymous access is allowed when enabled (Not Safe)")) +enable_anonymous.default = 0 + +anonymous_perm = s:option(MultiValue, "anonymous_perm", translate("Anonymous Permission")) +anonymous_perm:value("r", translate("Read files")) +anonymous_perm:value("l", translate("Obtain file list")) +anonymous_perm:value("u", translate("Upload files")) +anonymous_perm:value("m", translate("Remove files")) +anonymous_perm:value("S", translate("Show hidden files")) +anonymous_perm:value("T", translate("Play media")) +anonymous_perm:depends("enable_anonymous", "1") +anonymous_perm.description = translate("At least one permission must be choosed to allow anonymous access") + +webd_bin = s:option(Value, "webd_bin", translate("Binary Path"), translatef("Webd Netdisk binary Path")) +webd_bin.default = "/usr/bin/webd" +webd_bin.rmempty = false + +webd_conf = s:option(Value, "webd_conf", translate("Config Path"), translatef("Webd Netdisk config Path")) +webd_conf.default = "/etc/webd.conf" +webd_conf.rmempty = false + +s = m:section(TypedSection, "users", translate("User Settings"), translate("Set the username, password and permissions. Maximum for 2 accounts")) +s.anonymous = true +s.addremove = true +s.template = "cbi/tblsection" + +username = s:option(Value, "username", translate("Username")) +username.rmempty = false + +password = s:option(Value, "password", translate("Password")) +password.rmempty = false +password.password=false + +enable_read = s:option(Flag, "enable_read", translate("Read files")) +enable_read.default = 1 + +enable_read_list = s:option(Flag, "enable_read_list", translate("Obtain file list")) +enable_read_list.default = 1 + +enable_upload = s:option(Flag, "enable_upload", translate("Upload files")) +enable_upload.default = 1 + +enable_move = s:option(Flag, "enable_move", translate("Remove files")) +enable_move.default = 1 + +enable_showhide = s:option(Flag, "enable_showhide", translate("Show hidden files")) +enable_showhide.default = 0 + +enable_play = s:option(Flag, "enable_play", translate("Play media")) +enable_play.default = 1 + +return m diff --git a/luci-app-webd/luasrc/view/webd/webd_status.htm b/luci-app-webd/luasrc/view/webd/webd_status.htm new file mode 100644 index 000000000..2df3e910d --- /dev/null +++ b/luci-app-webd/luasrc/view/webd/webd_status.htm @@ -0,0 +1,27 @@ + + +
+

+ <%:Collecting data...%> +

+
\ No newline at end of file diff --git a/luci-app-webd/po/zh-cn/webd.po b/luci-app-webd/po/zh-cn/webd.po new file mode 100644 index 000000000..b5ded6714 --- /dev/null +++ b/luci-app-webd/po/zh-cn/webd.po @@ -0,0 +1,80 @@ +msgid "Webd Netdisk" +msgstr "Webd 网盘" + +msgid "Official Website" +msgstr "官网" + +msgid "Basic Settings" +msgstr "基础设置" + +msgid "Set the basic settings of Webd Netdisk" +msgstr "配置 Webd 网盘的基础设置" + +msgid "Listening Port" +msgstr "监听端口" + +msgid "Webd - A lightweight self hosted netdisk" +msgstr "Webd 是一款轻量级的 (self-hosted) 自建网盘软件, 界面简洁易用, 速度快资源占用低" + +msgid "Listen IPv6" +msgstr "监听 IPv6" + +msgid "Listen both IPv4 and IPv6 Address" +msgstr "同时监听 IPv4 和 IPv6 地址" + +msgid "Enable Anonymous Access" +msgstr "允许匿名访问" + +msgid "Anonymous Permission" +msgstr "匿名访问权限" + +msgid "Anonymous access is allowed when enabled (Not Safe)" +msgstr "启用后将允许匿名用户访问 (不安全)" + +msgid "At least one permission must be choosed to allow anonymous access" +msgstr "若要允许匿名访问则勾选至少一个权限" + +msgid "Binary Path" +msgstr "程序路径" + +msgid "Webd Netdisk binary Path" +msgstr "Webd 网盘二进制程序路径" + +msgid "Config Path" +msgstr "配置文件路径" + +msgid "Webd Netdisk config Path" +msgstr "Webd 网盘配置文件路径" + +msgid "Local Directory" +msgstr "本地路径" + +msgid "Directory of Webd Netdisk" +msgstr "Webd 网盘监听路径" + +msgid "Recycle Bin" +msgstr "回收站" + +msgid "Automatically create recycle bin directory" +msgstr "允许自动创建回收站目录" + +msgid "Set the username, password and permissions. Maximum for 2 accounts" +msgstr "设置用户名和密码, 以及单个用户的权限, 最多支持设置两个账号" + +msgid "Read files" +msgstr "读取文件" + +msgid "Obtain file list" +msgstr "获取文件列表" + +msgid "Upload files" +msgstr "上传文件" + +msgid "Remove files" +msgstr "删除或移动文件" + +msgid "Show hidden files" +msgstr "显示隐藏文件" + +msgid "Play media" +msgstr "播放媒体" diff --git a/luci-app-webd/po/zh_Hans/webd.po b/luci-app-webd/po/zh_Hans/webd.po new file mode 100644 index 000000000..b5ded6714 --- /dev/null +++ b/luci-app-webd/po/zh_Hans/webd.po @@ -0,0 +1,80 @@ +msgid "Webd Netdisk" +msgstr "Webd 网盘" + +msgid "Official Website" +msgstr "官网" + +msgid "Basic Settings" +msgstr "基础设置" + +msgid "Set the basic settings of Webd Netdisk" +msgstr "配置 Webd 网盘的基础设置" + +msgid "Listening Port" +msgstr "监听端口" + +msgid "Webd - A lightweight self hosted netdisk" +msgstr "Webd 是一款轻量级的 (self-hosted) 自建网盘软件, 界面简洁易用, 速度快资源占用低" + +msgid "Listen IPv6" +msgstr "监听 IPv6" + +msgid "Listen both IPv4 and IPv6 Address" +msgstr "同时监听 IPv4 和 IPv6 地址" + +msgid "Enable Anonymous Access" +msgstr "允许匿名访问" + +msgid "Anonymous Permission" +msgstr "匿名访问权限" + +msgid "Anonymous access is allowed when enabled (Not Safe)" +msgstr "启用后将允许匿名用户访问 (不安全)" + +msgid "At least one permission must be choosed to allow anonymous access" +msgstr "若要允许匿名访问则勾选至少一个权限" + +msgid "Binary Path" +msgstr "程序路径" + +msgid "Webd Netdisk binary Path" +msgstr "Webd 网盘二进制程序路径" + +msgid "Config Path" +msgstr "配置文件路径" + +msgid "Webd Netdisk config Path" +msgstr "Webd 网盘配置文件路径" + +msgid "Local Directory" +msgstr "本地路径" + +msgid "Directory of Webd Netdisk" +msgstr "Webd 网盘监听路径" + +msgid "Recycle Bin" +msgstr "回收站" + +msgid "Automatically create recycle bin directory" +msgstr "允许自动创建回收站目录" + +msgid "Set the username, password and permissions. Maximum for 2 accounts" +msgstr "设置用户名和密码, 以及单个用户的权限, 最多支持设置两个账号" + +msgid "Read files" +msgstr "读取文件" + +msgid "Obtain file list" +msgstr "获取文件列表" + +msgid "Upload files" +msgstr "上传文件" + +msgid "Remove files" +msgstr "删除或移动文件" + +msgid "Show hidden files" +msgstr "显示隐藏文件" + +msgid "Play media" +msgstr "播放媒体" diff --git a/luci-app-webd/root/etc/config/webd b/luci-app-webd/root/etc/config/webd new file mode 100644 index 000000000..acd693997 --- /dev/null +++ b/luci-app-webd/root/etc/config/webd @@ -0,0 +1,13 @@ + +config webd + option enable '0' + option webd_port '9212' + +config users + option enable_read '1' + option enable_read_list '1' + option enable_upload '1' + option enable_move '1' + option enable_showhide '0' + option username 'root' + option password 'password' diff --git a/luci-app-webd/root/etc/init.d/webd b/luci-app-webd/root/etc/init.d/webd new file mode 100644 index 000000000..65355c365 --- /dev/null +++ b/luci-app-webd/root/etc/init.d/webd @@ -0,0 +1,120 @@ +#!/bin/sh /etc/rc.common + +START=99 +USE_PROCD=1 +LOGGER="logger -t [Webd]" + +start_service() { + local basic_list="enable webd_conf webd_bin webd_port webd_root enable_recyclebin enable_anonymous anonymous_perm enable_ipv6" + local users_list="enable_read enable_read_list enable_upload enable_move enable_showhide" + for i in $(echo $basic_list);do + local eval $i="$(uci_get_by_type webd 0 $i)" + done;unset i + if [ "$enable" == 1 ] + then + [ ! -r "$webd_root" -o ! -d "$webd_root" ] && EXIT "Unable to access $webd_root,exit ..." + [ ! -x "$webd_bin" ] && EXIT "Unable to access $webd_bin,exit ..." + if [ "$enable_recyclebin" == 1 -a ! -d "$webd_root/.Trash" ] + then + ${LOGGER} "Creating Recycle Bin directory ..." + mkdir -p $webd_root/.Trash || EXIT "Failed to create Recycle Bin directory,exit ..." + fi + ${LOGGER} "Removing old config file ..." + rm -f $webd_conf + touch -a $webd_conf || EXIT "Failed to create config,exit ..." + [ "$enable_ipv6" == 1 ] && webd_port="[::]:${webd_port}" + if [ "$enable_anonymous" != 0 ] + then + if [ -n "$anonymous_perm" ] + then + + unset enable_anonymous + for i in $(echo $anonymous_perm);do + enable_anonymous="$enable_anonymous$i" + done + unset i + else + enable_anonymous=0 + uci set webd.@webd[0].enable_anonymous=0 + uci commit webd + fi + fi + echo "Webd.Listen $webd_port" >> $webd_conf + echo "Webd.Root $webd_root" >> $webd_conf + echo "Webd.Guest $enable_anonymous" >> $webd_conf + + for u in 0 1;do + for i in $(echo $users_list);do + eval ${i}=$(uci_get_by_type users $u $i 0) + echo "$users_list" | grep -q $i + [ "$?" == 0 ] && eval perm_bin=$(eval echo '$'perm_bin)$(uci_get_by_type users $u $i) + done + unset i + username=$(uci_get_by_type users $u username) + password=$(uci_get_by_type users $u password) + if [ -n "$username" ] + then + eval perm=$(perm_converter $(eval echo '$'perm_bin) | tail -n 1) + if [ -n "$(eval echo '$'perm)" ] + then + ${LOGGER} "Creating account for User $username ..." + echo "Webd.User $(eval echo '$'perm) $username $password" >> $webd_conf + else + ${LOGGER} "Removing excessive user config ..." + uci delete webd.@users[$u] + uci commit webd + fi + unset perm_bin + fi + done + unset u + ${LOGGER} "Killing old processes ..." + ps -efww | grep "$webd_bin" | awk '{print $1}' | xargs kill -9 2> /dev/null + ${LOGGER} "Starting Webd Netdisk Service ..." + procd_open_instance + procd_set_param command $webd_bin -c $webd_conf + procd_set_param respawn + procd_close_instance + else + stop_service + ${LOGGER} "Webd Netdisk Service is now disabled ..." + fi +} + +stop_service() { + ${LOGGER} "Stopping Webd Netdisk Service ..." +} + +service_triggers() { + procd_add_reload_trigger "webd" +} + +uci_get_by_type() { + local ret=$(uci get webd.@$1[$2].$3 2>/dev/null) + echo ${ret:=$4} +} + +EXIT() { + ${LOGGER} $* + exit +} + +perm_converter() { + local u i=1 + echo $1 | egrep -o [0-1] | while read X + do + if [ "$X" == 1 ] + then + case $i in + 1)u=r;; + 2)u=l;; + 3)u=u;; + 4)u=m;; + 5)u=S;; + esac + [ -n "$u" ] && a="$a$u" + echo "$a" + fi + i=$(($i + 1)) + done +} diff --git a/luci-app-webd/root/etc/uci-defaults/luci-webd b/luci-app-webd/root/etc/uci-defaults/luci-webd new file mode 100644 index 000000000..41934849f --- /dev/null +++ b/luci-app-webd/root/etc/uci-defaults/luci-webd @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q batch <<-EOF >/dev/null + delete ucitrack.@webd[-1] + add ucitrack webd + set ucitrack.@webd[-1].init=webd + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json b/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json new file mode 100644 index 000000000..8247638a0 --- /dev/null +++ b/luci-app-webd/root/usr/share/rpcd/acl.d/luci-app-webd.json @@ -0,0 +1,11 @@ +{ + "luci-app-webd": { + "description": "Grant UCI access for luci-app-webd", + "read": { + "uci": [ "webd" ] + }, + "write": { + "uci": [ "webd" ] + } + } +} From 7b61cba3216d6175040066c8608a4ba099b6cbd4 Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 12:43:24 +0800 Subject: [PATCH 10/12] try to fix pkg_url --- webd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webd/Makefile b/webd/Makefile index 300f0ccf5..c2378e879 100644 --- a/webd/Makefile +++ b/webd/Makefile @@ -73,7 +73,8 @@ ifeq ($(ARCH),x86_64) endif PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH)-openwrt-linux-$(TARGET_ARCH).tar.gz -PKG_SOURCE_URL:=https://cnt2.cf/fidx.html\#/webd/$(PKG_VERSION)/ +SOURCE_URL:=https://cnt2.cf/fidx.html\# +PKG_SOURCE_URL:=$(SOURCE_URL)/webd/$(PKG_VERSION)/ PKG_HASH:=skip UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) From 1e71e6040a3843419dd185f64bee8621a7bd0d3b Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 13:13:13 +0800 Subject: [PATCH 11/12] try fix pkg url --- webd/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webd/Makefile b/webd/Makefile index c2378e879..1f0e81f79 100644 --- a/webd/Makefile +++ b/webd/Makefile @@ -73,8 +73,7 @@ ifeq ($(ARCH),x86_64) endif PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH)-openwrt-linux-$(TARGET_ARCH).tar.gz -SOURCE_URL:=https://cnt2.cf/fidx.html\# -PKG_SOURCE_URL:=$(SOURCE_URL)/webd/$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://cnt2.cf/fidx.html/webd/$(PKG_VERSION)/ PKG_HASH:=skip UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) From b3aa9aef78b5b18265de2cf354625d0217f598e0 Mon Sep 17 00:00:00 2001 From: GD-Slime <1289744583@qq.com> Date: Sun, 18 Jun 2023 13:15:30 +0800 Subject: [PATCH 12/12] try to fix pkg url --- webd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webd/Makefile b/webd/Makefile index 1f0e81f79..96c132a93 100644 --- a/webd/Makefile +++ b/webd/Makefile @@ -73,7 +73,7 @@ ifeq ($(ARCH),x86_64) endif PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(ARCH)-openwrt-linux-$(TARGET_ARCH).tar.gz -PKG_SOURCE_URL:=https://cnt2.cf/fidx.html/webd/$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://cnt2.cf/webd/$(PKG_VERSION)/ PKG_HASH:=skip UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)