summaryrefslogtreecommitdiff
path: root/personal-pkgs-repo
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-05-02 09:54:20 +0200
committerKarel Kočí <karel.koci@nic.cz>2019-05-02 09:55:44 +0200
commitc4fb936ad961cfff7226f3fc5b844938927bfc55 (patch)
tree32222e89d212dcd7b7ccab05dd3ab61a15352460 /personal-pkgs-repo
parent311356df14662edce3c855fec1b9b5daad516be7 (diff)
downloadopenwrt-personal-pkgs-c4fb936ad961cfff7226f3fc5b844938927bfc55.tar.gz
openwrt-personal-pkgs-c4fb936ad961cfff7226f3fc5b844938927bfc55.tar.bz2
openwrt-personal-pkgs-c4fb936ad961cfff7226f3fc5b844938927bfc55.zip
Change how we distribute configuration
Up to now I was ditributing it directly but this changes that and we now read it from web dirrectly.
Diffstat (limited to 'personal-pkgs-repo')
-rw-r--r--personal-pkgs-repo/Makefile8
-rw-r--r--personal-pkgs-repo/files/updater.lua68
2 files changed, 5 insertions, 71 deletions
diff --git a/personal-pkgs-repo/Makefile b/personal-pkgs-repo/Makefile
index df91bbe..bf4f254 100644
--- a/personal-pkgs-repo/Makefile
+++ b/personal-pkgs-repo/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=personal-pkgs-repo
-PKG_VERSION:=1.4.9
+PKG_VERSION:=1.4.10
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
@@ -18,10 +18,6 @@ define Package/$(PKG_NAME)
TITLE:=Package with repository key and meta dependencies
endef
-define Build/Compile
- true
-endef
-
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/opkg/keys
$(INSTALL_DIR) $(1)/etc/updater/keys
@@ -59,4 +55,6 @@ feedsfile="$$IPKG_INSTROOT/etc/opkg/customfeeds.conf"
sed -i '/^src\/gz personal/d' "$$feedsfile"
endef
+Build/Compile:=:
+
$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/personal-pkgs-repo/files/updater.lua b/personal-pkgs-repo/files/updater.lua
index a14e06a..b0335b9 100644
--- a/personal-pkgs-repo/files/updater.lua
+++ b/personal-pkgs-repo/files/updater.lua
@@ -1,69 +1,5 @@
-local uci_cursor = uci.cursor(root_dir .. "/etc/config")
-
-local board
-local model = model or os_release["LEDE_DEVICE_PRODUCT"]
-if model:match('[Mm]ox') then
- board = "mox"
-elseif model:match('[Oo]mnia') then
- board = "omnia"
-else
- DIE("Unsupported board: " .. model)
-end
-
-local mode = uci_cursor:get("updater", "turris", "mode")
-local animal = uci_cursor:get("updater", "turris", "branch")
-if mode and mode ~= "branch" then
- DIE("Only branch mode allowed for personal-pkgs, used: " .. tostring(mode))
-end
-if animal ~= "hbd" and animal ~= "hbk" then
- DIE("Unsupported branch for personal-pkgs: " .. tostring(animal))
-end
-
-Repository("personal-pkgs", "https://cynerd.cz/repo/turris/" .. animal .. "/" .. board, {
+Script("personal-pkgs", "https://cynerd.cz/repo/turris/updater.lua", {
+ security = "Local",
pubkey = "file:///etc/updater/keys/personal-pkgs.pub",
ocsp = false
})
-
-----------------------------------------------------------------------------------
-Install("personal-pkgs-repo")
-Package("personal-pkgs-repo", { replan = "finished" })
-
-local tools = false
-local vpn = false
-local bigclown = false
-local sentinel = false
-
-uci_cursor:foreach("system", "system", function(s) hostname = s['hostname'] end)
-if hostname == "turris-prague" then
- tools = true
- vpn = true
- bigclown = true
- sentinel = true
- Install("6to4")
- Install("etherwake")
-elseif hostname == "turris-home" then
- tools = true
- vpn = true
- sentinel = true
- Install("transmission-daemon-openssl")
-end
-
-if tools then
- Install("grep", "coreutils-sha256sum")
- Install("iperf", "iperf3")
- Install("sysstat", "strace", "gdbserver")
- Install("shellrc-zsh")
-end
-if vpn then
- Install("luci-app-openvpn", "openvpn-openssl")
- Install("luci-app-wireguard", "wireguard")
-end
-if bigclown then
- Install("bigclown-gateway", "bigclown-mqtt2influxdb", "bigclown-control-tool")
- Install("mosquitto", "mosquitto-client")
- Install("bigclown-leds")
-end
-if sentinel then
- --Install("sentinel-minipot", "sentinel-nikola", "sentinel-dynfw-client")
- Install("sentinel-dynfw-client")
-end