From 341d5cc57d3e668ad25ddae6d23158e7958ef208 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 12 Dec 2020 21:57:38 +0100 Subject: [PATCH] fff-web-hood: separate package for hood file via HTTP There might be scenarios where a user only needs the hood file, but no WebUI (e.g. for 4M devices and node firmware), or only the WebUI, but no hood file (e.g. layer3 firmware). This separates the HTTP server (section) for the hood file into a separate package fff-web-hood. The new package is then only added to the node firmware. Signed-off-by: Adrian Schmutzler Reviewed-by: Robert Langhammer Acked-by: Christian Dresel --- src/packages/fff/fff-hoods/Makefile | 17 +++++++--- src/packages/fff/fff-web-hood/Makefile | 31 +++++++++++++++++++ .../files/etc/uci-defaults/93-fff-web-hood | 15 +++++++++ .../files/www/hood/.keep | 0 src/packages/fff/fff-web/Makefile | 2 +- .../{93-fff-uhttpd => 94-fff-web-ui} | 11 ++----- 6 files changed, 62 insertions(+), 14 deletions(-) create mode 100644 src/packages/fff/fff-web-hood/Makefile create mode 100644 src/packages/fff/fff-web-hood/files/etc/uci-defaults/93-fff-web-hood rename src/packages/fff/{fff-web => fff-web-hood}/files/www/hood/.keep (100%) rename src/packages/fff/fff-web/files/etc/uci-defaults/{93-fff-uhttpd => 94-fff-web-ui} (78%) diff --git a/src/packages/fff/fff-hoods/Makefile b/src/packages/fff/fff-hoods/Makefile index 54426e22..c17d807d 100644 --- a/src/packages/fff/fff-hoods/Makefile +++ b/src/packages/fff/fff-hoods/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-hoods -PKG_RELEASE:=16 +PKG_RELEASE:=17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -12,9 +12,18 @@ define Package/$(PKG_NAME) CATEGORY:=Freifunk TITLE:=Freifunk-Franken hoods URL:=http://www.freifunk-franken.de - DEPENDS:=+fff-hoodutils +fff-macnock +fff-vpn-select +fff-firewall \ - +fff-timeserver +fff-network +fff-wireless +jshn \ - +@BUSYBOX_CONFIG_WGET +@BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT + DEPENDS:= \ + +fff-firewall \ + +fff-hoodutils \ + +fff-macnock \ + +fff-network \ + +fff-timeserver \ + +fff-vpn-select \ + +fff-web-hood \ + +fff-wireless \ + +jshn \ + +@BUSYBOX_CONFIG_WGET \ + +@BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT endef define Package/$(PKG_NAME)/description diff --git a/src/packages/fff/fff-web-hood/Makefile b/src/packages/fff/fff-web-hood/Makefile new file mode 100644 index 00000000..e6f8363a --- /dev/null +++ b/src/packages/fff/fff-web-hood/Makefile @@ -0,0 +1,31 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=fff-web-hood +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/fff-web-hood + SECTION:=base + CATEGORY:=Freifunk + TITLE:=Freifunk-Franken web server for hood file + URL:=http://www.freifunk-franken.de + DEPENDS:=+uhttpd +endef + +define Package/fff-web-hood/description + This is a tiny web server to serve the hoodfile for + other nodes +endef + +define Build/Compile + # nothing +endef + +define Package/fff-web-hood/install + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,fff-web-hood)) diff --git a/src/packages/fff/fff-web-hood/files/etc/uci-defaults/93-fff-web-hood b/src/packages/fff/fff-web-hood/files/etc/uci-defaults/93-fff-web-hood new file mode 100644 index 00000000..45ea9bec --- /dev/null +++ b/src/packages/fff/fff-web-hood/files/etc/uci-defaults/93-fff-web-hood @@ -0,0 +1,15 @@ +uci -q delete uhttpd.main + +uci batch <