From 284918bfaf2f6d7e46fb11377bb9a537b35dd58a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 3 Nov 2019 17:49:58 +0100 Subject: [PATCH] treewide: move templates and libraries not used by the core to luci-compat Signed-off-by: Jo-Philipp Wich --- applications/luci-app-adblock/Makefile | 2 +- applications/luci-app-ahcp/Makefile | 2 +- applications/luci-app-banip/Makefile | 2 +- applications/luci-app-bcp38/Makefile | 2 +- applications/luci-app-dcwapd/Makefile | 2 +- applications/luci-app-minidlna/Makefile | 2 +- applications/luci-app-mwan3/Makefile | 2 +- applications/luci-app-nlbwmon/Makefile | 2 +- applications/luci-app-ocserv/Makefile | 2 +- applications/luci-app-olsr/Makefile | 2 +- applications/luci-app-p910nd/Makefile | 2 +- .../luci-app-rp-pppoe-server/Makefile | 2 +- .../luci-app-shadowsocks-libev/Makefile | 2 +- applications/luci-app-statistics/Makefile | 2 +- applications/luci-app-travelmate/Makefile | 2 +- applications/luci-app-unbound/Makefile | 2 +- applications/luci-app-vnstat/Makefile | 2 +- .../luasrc/view/cbi/firewall_zoneforwards.htm | 73 ------------------- modules/luci-compat/Makefile | 19 +++++ .../luasrc/model/network.lua | 0 .../luasrc/model/network/proto_3g.lua | 0 .../luasrc/model/network/proto_4x6.lua | 0 .../luasrc/model/network/proto_6x4.lua | 0 .../luasrc/model/network/proto_dhcpv6.lua | 0 .../luasrc/model/network/proto_hnet.lua | 0 .../luasrc/model/network/proto_ipip.lua | 0 .../model/network/proto_modemmanager.lua | 0 .../luasrc/model/network/proto_ncm.lua | 0 .../model/network/proto_openconnect.lua | 0 .../luasrc/model/network/proto_ppp.lua | 0 .../luasrc/model/network/proto_pppossh.lua | 0 .../luasrc/model/network/proto_qmi.lua | 0 .../luasrc/model/network/proto_relay.lua | 0 .../luasrc/model/network/proto_vpnc.lua | 0 .../luasrc/model/network/proto_wireguard.lua | 0 .../luasrc/view/cbi/firewall_zonelist.htm | 0 .../luasrc/view/cbi/network_ifacelist.htm | 0 .../luasrc/view/cbi/network_netinfo.htm | 0 .../luasrc/view/cbi/network_netlist.htm | 0 39 files changed, 36 insertions(+), 90 deletions(-) delete mode 100644 modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm create mode 100644 modules/luci-compat/Makefile rename modules/{luci-base => luci-compat}/luasrc/model/network.lua (100%) rename {protocols/luci-proto-3g => modules/luci-compat}/luasrc/model/network/proto_3g.lua (100%) rename {protocols/luci-proto-ipv6 => modules/luci-compat}/luasrc/model/network/proto_4x6.lua (100%) rename {protocols/luci-proto-ipv6 => modules/luci-compat}/luasrc/model/network/proto_6x4.lua (100%) rename {protocols/luci-proto-ipv6 => modules/luci-compat}/luasrc/model/network/proto_dhcpv6.lua (100%) rename {protocols/luci-proto-hnet => modules/luci-compat}/luasrc/model/network/proto_hnet.lua (100%) rename {protocols/luci-proto-ipip => modules/luci-compat}/luasrc/model/network/proto_ipip.lua (100%) rename {protocols/luci-proto-modemmanager => modules/luci-compat}/luasrc/model/network/proto_modemmanager.lua (100%) rename {protocols/luci-proto-ncm => modules/luci-compat}/luasrc/model/network/proto_ncm.lua (100%) rename {protocols/luci-proto-openconnect => modules/luci-compat}/luasrc/model/network/proto_openconnect.lua (100%) rename {protocols/luci-proto-ppp => modules/luci-compat}/luasrc/model/network/proto_ppp.lua (100%) rename {protocols/luci-proto-pppossh => modules/luci-compat}/luasrc/model/network/proto_pppossh.lua (100%) rename {protocols/luci-proto-qmi => modules/luci-compat}/luasrc/model/network/proto_qmi.lua (100%) rename {protocols/luci-proto-relay => modules/luci-compat}/luasrc/model/network/proto_relay.lua (100%) rename {protocols/luci-proto-vpnc => modules/luci-compat}/luasrc/model/network/proto_vpnc.lua (100%) rename {protocols/luci-proto-wireguard => modules/luci-compat}/luasrc/model/network/proto_wireguard.lua (100%) rename modules/{luci-base => luci-compat}/luasrc/view/cbi/firewall_zonelist.htm (100%) rename modules/{luci-base => luci-compat}/luasrc/view/cbi/network_ifacelist.htm (100%) rename modules/{luci-base => luci-compat}/luasrc/view/cbi/network_netinfo.htm (100%) rename modules/{luci-base => luci-compat}/luasrc/view/cbi/network_netlist.htm (100%) diff --git a/applications/luci-app-adblock/Makefile b/applications/luci-app-adblock/Makefile index 2de2ed862..c51b9d8ed 100644 --- a/applications/luci-app-adblock/Makefile +++ b/applications/luci-app-adblock/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Adblock -LUCI_DEPENDS:=+adblock +luci-lib-jsonc +LUCI_DEPENDS:=+luci-compat +adblock +luci-lib-jsonc LUCI_PKGARCH:=all include ../../luci.mk diff --git a/applications/luci-app-ahcp/Makefile b/applications/luci-app-ahcp/Makefile index bb4d4158d..10859345e 100644 --- a/applications/luci-app-ahcp/Makefile +++ b/applications/luci-app-ahcp/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for AHCPd -LUCI_DEPENDS:=+ahcpd +LUCI_DEPENDS:=+luci-compat +ahcpd include ../../luci.mk diff --git a/applications/luci-app-banip/Makefile b/applications/luci-app-banip/Makefile index 1936bc36b..39712708b 100644 --- a/applications/luci-app-banip/Makefile +++ b/applications/luci-app-banip/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for banIP -LUCI_DEPENDS:=+banip +luci-lib-jsonc +LUCI_DEPENDS:=+luci-compat +banip +luci-lib-jsonc LUCI_PKGARCH:=all include ../../luci.mk diff --git a/applications/luci-app-bcp38/Makefile b/applications/luci-app-bcp38/Makefile index 9ab5a6701..a8a6e7402 100644 --- a/applications/luci-app-bcp38/Makefile +++ b/applications/luci-app-bcp38/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=BCP38 LuCI interface -LUCI_DEPENDS:=+luci-mod-admin-full +bcp38 +LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +bcp38 PKG_MAINTAINER:=Toke Høiland-Jørgensen PKG_LICENSE:=Apache-2.0 diff --git a/applications/luci-app-dcwapd/Makefile b/applications/luci-app-dcwapd/Makefile index 3396bcd29..3def090a7 100644 --- a/applications/luci-app-dcwapd/Makefile +++ b/applications/luci-app-dcwapd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Dual Channel Wi-Fi AP Daemon configuration module -LUCI_DEPENDS:=+dcwapd +LUCI_DEPENDS:=+luci-compat +dcwapd include ../../luci.mk diff --git a/applications/luci-app-minidlna/Makefile b/applications/luci-app-minidlna/Makefile index 4790aa32c..3d3ec4d52 100644 --- a/applications/luci-app-minidlna/Makefile +++ b/applications/luci-app-minidlna/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for miniDLNA -LUCI_DEPENDS:=+minidlna +LUCI_DEPENDS:=+luci-compat +minidlna include ../../luci.mk diff --git a/applications/luci-app-mwan3/Makefile b/applications/luci-app-mwan3/Makefile index c719cb134..50f87cd84 100644 --- a/applications/luci-app-mwan3/Makefile +++ b/applications/luci-app-mwan3/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for the MWAN3 multiwan hotplug script -LUCI_DEPENDS:=+mwan3 +libuci-lua +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio +LUCI_DEPENDS:=+luci-compat +mwan3 +libuci-lua +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio LUCI_PKGARCH:=all PKG_LICENSE:=GPLv2 diff --git a/applications/luci-app-nlbwmon/Makefile b/applications/luci-app-nlbwmon/Makefile index a00177f2c..c4b83e807 100644 --- a/applications/luci-app-nlbwmon/Makefile +++ b/applications/luci-app-nlbwmon/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Netlink based bandwidth accounting -LUCI_DEPENDS:=+nlbwmon +LUCI_DEPENDS:=+luci-compat +nlbwmon include ../../luci.mk diff --git a/applications/luci-app-ocserv/Makefile b/applications/luci-app-ocserv/Makefile index 3fbf4d2c1..2f2ea788e 100644 --- a/applications/luci-app-ocserv/Makefile +++ b/applications/luci-app-ocserv/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for OpenConnect VPN -LUCI_DEPENDS:=+ocserv +certtool +LUCI_DEPENDS:=+luci-compat +ocserv +certtool include ../../luci.mk diff --git a/applications/luci-app-olsr/Makefile b/applications/luci-app-olsr/Makefile index 6ce1ac255..b6432e6ac 100644 --- a/applications/luci-app-olsr/Makefile +++ b/applications/luci-app-olsr/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=OLSR configuration and status module -LUCI_DEPENDS:=+olsrd +olsrd-mod-jsoninfo +luci-lib-json +LUCI_DEPENDS:=+luci-compat +olsrd +olsrd-mod-jsoninfo +luci-lib-json include ../../luci.mk diff --git a/applications/luci-app-p910nd/Makefile b/applications/luci-app-p910nd/Makefile index adb35bd47..8c73f372f 100644 --- a/applications/luci-app-p910nd/Makefile +++ b/applications/luci-app-p910nd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=p910nd - Printer server module -LUCI_DEPENDS:=+p910nd +LUCI_DEPENDS:=+luci-compat +p910nd include ../../luci.mk diff --git a/applications/luci-app-rp-pppoe-server/Makefile b/applications/luci-app-rp-pppoe-server/Makefile index aa3ae538c..b4edfc949 100644 --- a/applications/luci-app-rp-pppoe-server/Makefile +++ b/applications/luci-app-rp-pppoe-server/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Roaring Penguin PPPoE Server -LUCI_DEPENDS:=+rp-pppoe-server +LUCI_DEPENDS:=+luci-compat +rp-pppoe-server include ../../luci.mk diff --git a/applications/luci-app-shadowsocks-libev/Makefile b/applications/luci-app-shadowsocks-libev/Makefile index d0923e07a..72195a711 100644 --- a/applications/luci-app-shadowsocks-libev/Makefile +++ b/applications/luci-app-shadowsocks-libev/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for shadowsocks-libev -LUCI_DEPENDS:= +LUCI_DEPENDS:=+luci-compat PKG_LICENSE:=Apache-2.0 diff --git a/applications/luci-app-statistics/Makefile b/applications/luci-app-statistics/Makefile index b552400fe..b38146c2c 100644 --- a/applications/luci-app-statistics/Makefile +++ b/applications/luci-app-statistics/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Statistics Application LUCI_DEPENDS:= \ - +luci-lib-iptparser \ + +luci-compat +luci-lib-iptparser \ +collectd +rrdtool1 +collectd-mod-rrdtool +collectd-mod-iwinfo \ +collectd-mod-cpu +collectd-mod-memory \ +collectd-mod-interface +collectd-mod-load +collectd-mod-network diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile index 58d9bf37d..4115dadbe 100644 --- a/applications/luci-app-travelmate/Makefile +++ b/applications/luci-app-travelmate/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for Travelmate -LUCI_DEPENDS:=+travelmate +luci-lib-jsonc +LUCI_DEPENDS:=+luci-compat +travelmate +luci-lib-jsonc LUCI_PKGARCH:=all include ../../luci.mk diff --git a/applications/luci-app-unbound/Makefile b/applications/luci-app-unbound/Makefile index 6b43adab3..9dd01ffed 100644 --- a/applications/luci-app-unbound/Makefile +++ b/applications/luci-app-unbound/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Unbound Recursive DNS Resolver Configuration -LUCI_DEPENDS:=+unbound-daemon +LUCI_DEPENDS:=+luci-compat +unbound-daemon include ../../luci.mk diff --git a/applications/luci-app-vnstat/Makefile b/applications/luci-app-vnstat/Makefile index 6d98610d6..c2e930632 100644 --- a/applications/luci-app-vnstat/Makefile +++ b/applications/luci-app-vnstat/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for VnStat -LUCI_DEPENDS:=+vnstat +vnstati +LUCI_DEPENDS:=+luci-compat +vnstat +vnstati include ../../luci.mk diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm deleted file mode 100644 index dc251dbd9..000000000 --- a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm +++ /dev/null @@ -1,73 +0,0 @@ -<%+cbi/valueheader%> - -<%- - local utl = require "luci.util" - local fwm = require "luci.model.firewall".init() - local nwm = require "luci.model.network".init() - - local zone, fwd, fz - local value = self:formvalue(section) - if not value or value == "-" then - value = self:cfgvalue(section) or self.default - end - - local def = fwm:get_defaults() - local zone = fwm:get_zone(value) - local empty = true - - local function render_zone(zone) --%> - -<%- - end --%> - -<% if zone then %> -
-
- <%=render_zone(zone)%> -
- -
- <% - for _, fwd in ipairs(zone:get_forwardings_by("src")) do - fz = fwd:dest_zone() - if fz then - empty = false - render_zone(fz) - end - end - if empty then - %> - - <% end %> -
-
-<% end %> - -<%+cbi/valuefooter%> diff --git a/modules/luci-compat/Makefile b/modules/luci-compat/Makefile new file mode 100644 index 000000000..d73ca070a --- /dev/null +++ b/modules/luci-compat/Makefile @@ -0,0 +1,19 @@ +# +# Copyright (C) 2019 Jo-Philipp Wich +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luci-compat + +LUCI_TYPE:=mod +LUCI_BASENAME:=compat + +LUCI_TITLE:=LuCI compatibility libraries +LUCI_DEPENDS:=+luci-base + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-compat/luasrc/model/network.lua similarity index 100% rename from modules/luci-base/luasrc/model/network.lua rename to modules/luci-compat/luasrc/model/network.lua diff --git a/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua b/modules/luci-compat/luasrc/model/network/proto_3g.lua similarity index 100% rename from protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua rename to modules/luci-compat/luasrc/model/network/proto_3g.lua diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua b/modules/luci-compat/luasrc/model/network/proto_4x6.lua similarity index 100% rename from protocols/luci-proto-ipv6/luasrc/model/network/proto_4x6.lua rename to modules/luci-compat/luasrc/model/network/proto_4x6.lua diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua b/modules/luci-compat/luasrc/model/network/proto_6x4.lua similarity index 100% rename from protocols/luci-proto-ipv6/luasrc/model/network/proto_6x4.lua rename to modules/luci-compat/luasrc/model/network/proto_6x4.lua diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_dhcpv6.lua b/modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua similarity index 100% rename from protocols/luci-proto-ipv6/luasrc/model/network/proto_dhcpv6.lua rename to modules/luci-compat/luasrc/model/network/proto_dhcpv6.lua diff --git a/protocols/luci-proto-hnet/luasrc/model/network/proto_hnet.lua b/modules/luci-compat/luasrc/model/network/proto_hnet.lua similarity index 100% rename from protocols/luci-proto-hnet/luasrc/model/network/proto_hnet.lua rename to modules/luci-compat/luasrc/model/network/proto_hnet.lua diff --git a/protocols/luci-proto-ipip/luasrc/model/network/proto_ipip.lua b/modules/luci-compat/luasrc/model/network/proto_ipip.lua similarity index 100% rename from protocols/luci-proto-ipip/luasrc/model/network/proto_ipip.lua rename to modules/luci-compat/luasrc/model/network/proto_ipip.lua diff --git a/protocols/luci-proto-modemmanager/luasrc/model/network/proto_modemmanager.lua b/modules/luci-compat/luasrc/model/network/proto_modemmanager.lua similarity index 100% rename from protocols/luci-proto-modemmanager/luasrc/model/network/proto_modemmanager.lua rename to modules/luci-compat/luasrc/model/network/proto_modemmanager.lua diff --git a/protocols/luci-proto-ncm/luasrc/model/network/proto_ncm.lua b/modules/luci-compat/luasrc/model/network/proto_ncm.lua similarity index 100% rename from protocols/luci-proto-ncm/luasrc/model/network/proto_ncm.lua rename to modules/luci-compat/luasrc/model/network/proto_ncm.lua diff --git a/protocols/luci-proto-openconnect/luasrc/model/network/proto_openconnect.lua b/modules/luci-compat/luasrc/model/network/proto_openconnect.lua similarity index 100% rename from protocols/luci-proto-openconnect/luasrc/model/network/proto_openconnect.lua rename to modules/luci-compat/luasrc/model/network/proto_openconnect.lua diff --git a/protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua b/modules/luci-compat/luasrc/model/network/proto_ppp.lua similarity index 100% rename from protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua rename to modules/luci-compat/luasrc/model/network/proto_ppp.lua diff --git a/protocols/luci-proto-pppossh/luasrc/model/network/proto_pppossh.lua b/modules/luci-compat/luasrc/model/network/proto_pppossh.lua similarity index 100% rename from protocols/luci-proto-pppossh/luasrc/model/network/proto_pppossh.lua rename to modules/luci-compat/luasrc/model/network/proto_pppossh.lua diff --git a/protocols/luci-proto-qmi/luasrc/model/network/proto_qmi.lua b/modules/luci-compat/luasrc/model/network/proto_qmi.lua similarity index 100% rename from protocols/luci-proto-qmi/luasrc/model/network/proto_qmi.lua rename to modules/luci-compat/luasrc/model/network/proto_qmi.lua diff --git a/protocols/luci-proto-relay/luasrc/model/network/proto_relay.lua b/modules/luci-compat/luasrc/model/network/proto_relay.lua similarity index 100% rename from protocols/luci-proto-relay/luasrc/model/network/proto_relay.lua rename to modules/luci-compat/luasrc/model/network/proto_relay.lua diff --git a/protocols/luci-proto-vpnc/luasrc/model/network/proto_vpnc.lua b/modules/luci-compat/luasrc/model/network/proto_vpnc.lua similarity index 100% rename from protocols/luci-proto-vpnc/luasrc/model/network/proto_vpnc.lua rename to modules/luci-compat/luasrc/model/network/proto_vpnc.lua diff --git a/protocols/luci-proto-wireguard/luasrc/model/network/proto_wireguard.lua b/modules/luci-compat/luasrc/model/network/proto_wireguard.lua similarity index 100% rename from protocols/luci-proto-wireguard/luasrc/model/network/proto_wireguard.lua rename to modules/luci-compat/luasrc/model/network/proto_wireguard.lua diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm b/modules/luci-compat/luasrc/view/cbi/firewall_zonelist.htm similarity index 100% rename from modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm rename to modules/luci-compat/luasrc/view/cbi/firewall_zonelist.htm diff --git a/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm b/modules/luci-compat/luasrc/view/cbi/network_ifacelist.htm similarity index 100% rename from modules/luci-base/luasrc/view/cbi/network_ifacelist.htm rename to modules/luci-compat/luasrc/view/cbi/network_ifacelist.htm diff --git a/modules/luci-base/luasrc/view/cbi/network_netinfo.htm b/modules/luci-compat/luasrc/view/cbi/network_netinfo.htm similarity index 100% rename from modules/luci-base/luasrc/view/cbi/network_netinfo.htm rename to modules/luci-compat/luasrc/view/cbi/network_netinfo.htm diff --git a/modules/luci-base/luasrc/view/cbi/network_netlist.htm b/modules/luci-compat/luasrc/view/cbi/network_netlist.htm similarity index 100% rename from modules/luci-base/luasrc/view/cbi/network_netlist.htm rename to modules/luci-compat/luasrc/view/cbi/network_netlist.htm -- 2.25.1