From 9ab93992d1fca1b9cfa09c54d39cc92d3699055a Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 5 Sep 2017 19:04:27 +0200
Subject: [PATCH] gluon-autoupdater: mirror URLs must start with http://

The older busybox-based wget erroneously accepted URLs without protocol.
Add validator to avoid building firmwares with broken autoupdates.
---
 package/gluon-autoupdater/check_site.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gluon-autoupdater/check_site.lua b/package/gluon-autoupdater/check_site.lua
index 3eb2e7213..f02d34c8a 100644
--- a/package/gluon-autoupdater/check_site.lua
+++ b/package/gluon-autoupdater/check_site.lua
@@ -6,7 +6,7 @@ local function check_branch(k, _)
    local prefix = string.format('autoupdater.branches[%q].', k)
 
    need_string(prefix .. 'name')
-   need_string_array(prefix .. 'mirrors')
+   need_string_array_match(prefix .. 'mirrors', '^http://')
    need_number(prefix .. 'good_signatures')
    need_string_array_match(prefix .. 'pubkeys', '^%x+$')
 end
-- 
GitLab