summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-03-21 09:38:48 +0100
committerKarel Kočí <karel.koci@nic.cz>2019-03-21 09:38:48 +0100
commitbd2a9ab20b470e808cd8f5156c3a2d872f752ea0 (patch)
tree37f3ac9a9e399ff80f247fbec4c6e4026d4a596c
parent8bb7ea981bb4bfbd69827068637f55bb671ed2ff (diff)
downloadopenwrt-personal-pkgs-bd2a9ab20b470e808cd8f5156c3a2d872f752ea0.tar.gz
openwrt-personal-pkgs-bd2a9ab20b470e808cd8f5156c3a2d872f752ea0.tar.bz2
openwrt-personal-pkgs-bd2a9ab20b470e808cd8f5156c3a2d872f752ea0.zip
personal-pkgs-repo: Update for new updater and changed lists
-rw-r--r--personal-pkgs-repo/Makefile2
-rw-r--r--personal-pkgs-repo/files/updater.lua11
-rw-r--r--updater-ng/files/turris.lua11
3 files changed, 10 insertions, 14 deletions
diff --git a/personal-pkgs-repo/Makefile b/personal-pkgs-repo/Makefile
index a0fb33d..6ec7341 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.4
+PKG_VERSION:=1.4.5
PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/personal-pkgs-repo/files/updater.lua b/personal-pkgs-repo/files/updater.lua
index 5f85763..79c6847 100644
--- a/personal-pkgs-repo/files/updater.lua
+++ b/personal-pkgs-repo/files/updater.lua
@@ -1,14 +1,13 @@
local uci_cursor = uci.cursor(root_dir .. "/etc/config")
local board
-if model:match('Mox') then
+local model = model or os_release["LEDE_DEVICE_PRODUCT"]
+if model:match('[Mm]ox') then
board = "mox"
-elseif model:match('Omnia') then
+elseif model:match('[Oo]mnia') then
board = "omnia"
-elseif model:match('^Turris$') then
- board = "turris"
else
- DIE("Unsupported board!")
+ DIE("Unsupported board: " .. model)
end
local mode = uci_cursor:get("updater", "turris", "mode")
@@ -17,7 +16,7 @@ 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 pernal-pkgs: " .. tostring(animal))
+ DIE("Unsupported branch for personal-pkgs: " .. tostring(animal))
end
Repository("personal-pkgs", "https://cynerd.cz/repo/turris/" .. animal .. "/" .. board, {
diff --git a/updater-ng/files/turris.lua b/updater-ng/files/turris.lua
index 7e90623..8ee114a 100644
--- a/updater-ng/files/turris.lua
+++ b/updater-ng/files/turris.lua
@@ -33,21 +33,19 @@ if mode == "version" and not version then
mode = "branch"
end
--- Common URL base to Turris OS repository
+-- Common URI to lists
+local base_url
if mode == "branch" then
- repo_base_uri = "https://repo.turris.cz/" .. branch
+ base_url = "https://repo.turris.cz/" .. branch .. "/lists/"
elseif mode == "version" then
- repo_base_uri = "https://repo.turris.cz/archive/" .. version
+ base_url = "https://repo.turris.cz/archive/" .. version .. "/lists/"
else
DIE("Invalid updater.turris.mode specified: " .. mode)
end
-Export('repo_base_uri')
-- Common connection settings for Turris OS scripts
local script_options = {
security = "Remote",
- ca = system_cas,
- crl = no_crl,
pubkey = {
"file:///etc/updater/keys/release.pub",
"file:///etc/updater/keys/standby.pub",
@@ -55,7 +53,6 @@ local script_options = {
}
}
-local base_url = repo_base_uri .. "/lists/"
-- The distribution base script. It contains the repository and bunch of basic packages
Script(base_url .. "base.lua", script_options)