diff options
Diffstat (limited to '')
-rw-r--r-- | Report-web_3.html | 2 | ||||
-rw-r--r-- | Report-web_TABLE.html | 3 | ||||
-rw-r--r-- | apt-panopticommon.lua | 19 | ||||
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 16 | ||||
-rwxr-xr-x | apt-panopticon.lua | 16 |
5 files changed, 49 insertions, 7 deletions
diff --git a/Report-web_3.html b/Report-web_3.html index 915bd56..632e6f4 100644 --- a/Report-web_3.html +++ b/Report-web_3.html | |||
@@ -1,6 +1,8 @@ | |||
1 | <p><b class="TTitem" title="This is a tooltip with an explanation in it.">Tooltips</b> are things that have an explanation tooltip, hover over them.</p> | 1 | <p><b class="TTitem" title="This is a tooltip with an explanation in it.">Tooltips</b> are things that have an explanation tooltip, hover over them.</p> |
2 | <p><font color='red'><b>FAILED</b></font> or <font color='lime'><b>OK</b></font> means the tested thing is supported for that mirror.</p> | 2 | <p><font color='red'><b>FAILED</b></font> or <font color='lime'><b>OK</b></font> means the tested thing is supported for that mirror.</p> |
3 | <p><font color='darkred'><b>FAILED*</b></font> or <font color='darkgreen'><b>OK*</b></font> means the tested thing is unsupported for that mirror, but might have been tested anyway.</p> | 3 | <p><font color='darkred'><b>FAILED*</b></font> or <font color='darkgreen'><b>OK*</b></font> means the tested thing is unsupported for that mirror, but might have been tested anyway.</p> |
4 | <p><font color='grey'><b>untested</b></font> or <font color='dimgrey'><b>untested*</b></font> means that the tested thing wasn't tested. It might not be relevant, or might have depended on other tests passing.</p> | ||
5 | <p>NOTE: Any mirror that doesn't redirect to a Debian mirror coz it is a Debian mirror itself, doesn't have the Protocol and Redirect tests run.</p> | ||
4 | <p><font color='aqua'><b>timeout</b></font> or <font color='blue'><b>timeout</b></font> means the mirror had some timeouts, and tests where not yet aborted. The darker colour means unsupported by the mirror, but tested anyway.</p> | 6 | <p><font color='aqua'><b>timeout</b></font> or <font color='blue'><b>timeout</b></font> means the mirror had some timeouts, and tests where not yet aborted. The darker colour means unsupported by the mirror, but tested anyway.</p> |
5 | <p><font color='aqua'><b>TIMEOUT</b></font> or <font color='blue'><b>TIMEOUT</b></font> means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p> | 7 | <p><font color='aqua'><b>TIMEOUT</b></font> or <font color='blue'><b>TIMEOUT</b></font> means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p> |
6 | <p>NOTE: timeouts may be due to a problem on the testing computer, it might be busy with other things, or be having it's own network problems.</p> | 8 | <p>NOTE: timeouts may be due to a problem on the testing computer, it might be busy with other things, or be having it's own network problems.</p> |
diff --git a/Report-web_TABLE.html b/Report-web_TABLE.html index f3fd5d5..6ee14f4 100644 --- a/Report-web_TABLE.html +++ b/Report-web_TABLE.html | |||
@@ -125,6 +125,9 @@ | |||
125 | <p>Also shown is the mirrors scheduled time between updates, with "m" meaning minutes and "h" meaning hours. | 125 | <p>Also shown is the mirrors scheduled time between updates, with "m" meaning minutes and "h" meaning hours. |
126 | If this is showing a WARNING, it's likely that the mirror hasn't updated yet, but is due to update after this test was run. | 126 | If this is showing a WARNING, it's likely that the mirror hasn't updated yet, but is due to update after this test was run. |
127 | </p> | 127 | </p> |
128 | <p> | ||
129 | pkgmaster.devuan.org is the master that the other mirrors sync to, so it's untested. | ||
130 | </p> | ||
128 | </div> | 131 | </div> |
129 | </div> | 132 | </div> |
130 | </th> | 133 | </th> |
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index 52159dd..593fa32 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua | |||
@@ -435,13 +435,13 @@ local log = function(v, t, s, prot, test, host) | |||
435 | t = t .. "(" .. x .. ")" | 435 | t = t .. "(" .. x .. ")" |
436 | if "" ~= prot then | 436 | if "" ~= prot then |
437 | if "" == test then | 437 | if "" == test then |
438 | if nil == APT.results[prot] then APT.results[prot] = {errors = 0; warnings = 0; timeouts = 0} end | 438 | if nil == APT.results[prot] then APT.results[prot] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end |
439 | if v == 0 then APT.results[prot].errors = APT.results[prot].errors + 1 end | 439 | if v == 0 then APT.results[prot].errors = APT.results[prot].errors + 1 end |
440 | if v == 1 then APT.results[prot].warnings = APT.results[prot].warnings + 1 end | 440 | if v == 1 then APT.results[prot].warnings = APT.results[prot].warnings + 1 end |
441 | if v == 2 then APT.results[prot].timeouts = APT.results[prot].timeouts + 1 end | 441 | if v == 2 then APT.results[prot].timeouts = APT.results[prot].timeouts + 1 end |
442 | else | 442 | else |
443 | if nil == APT.results[prot] then APT.results[prot] = {errors = 0; warnings = 0; timeouts = 0} end | 443 | if nil == APT.results[prot] then APT.results[prot] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end |
444 | if nil == APT.results[prot][test] then APT.results[prot][test] = {errors = 0; warnings = 0; timeouts = 0} end | 444 | if nil == APT.results[prot][test] then APT.results[prot][test] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end |
445 | if v == 0 then APT.results[prot][test].errors = APT.results[prot][test].errors + 1 end | 445 | if v == 0 then APT.results[prot][test].errors = APT.results[prot][test].errors + 1 end |
446 | if v == 1 then APT.results[prot][test].warnings = APT.results[prot][test].warnings + 1 end | 446 | if v == 1 then APT.results[prot][test].warnings = APT.results[prot][test].warnings + 1 end |
447 | if v == 2 then APT.results[prot][test].timeouts = APT.results[prot][test].timeouts + 1 end | 447 | if v == 2 then APT.results[prot][test].timeouts = APT.results[prot][test].timeouts + 1 end |
@@ -496,6 +496,17 @@ APT.testing = function(t, host) | |||
496 | return false | 496 | return false |
497 | end | 497 | end |
498 | 498 | ||
499 | APT.tested = function(prot, test, host) | ||
500 | if "" == test then | ||
501 | if nil == APT.results[prot] then APT.results[prot] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end | ||
502 | APT.results[prot].tested = APT.results[prot].tested + 1; | ||
503 | else | ||
504 | if nil == APT.results[prot] then APT.results[prot] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end | ||
505 | if nil == APT.results[prot][test] then APT.results[prot][test] = {tested = 0; errors = 0; warnings = 0; timeouts = 0} end | ||
506 | APT.results[prot][test].tested = APT.results[prot][test].tested + 1; | ||
507 | end | ||
508 | end | ||
509 | |||
499 | APT.exe = function(c) | 510 | APT.exe = function(c) |
500 | local exe = {status = 0, result = '', log = true, cmd = c .. ' '} | 511 | local exe = {status = 0, result = '', log = true, cmd = c .. ' '} |
501 | 512 | ||
@@ -607,7 +618,7 @@ APT.plurals = function(e, w, t) | |||
607 | return result | 618 | return result |
608 | end | 619 | end |
609 | 620 | ||
610 | local typs = {'errors', 'warnings', 'timeouts'} | 621 | local typs = {'tested', 'errors', 'warnings', 'timeouts'} |
611 | APT.padResults = function(results) | 622 | APT.padResults = function(results) |
612 | local c = 0 | 623 | local c = 0 |
613 | if nil == results then results = {}; c = 999 end | 624 | if nil == results then results = {}; c = 999 end |
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index a9852c1..b21ba8a 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -51,15 +51,18 @@ local status = function(hosts, host, results, typ) | |||
51 | local e = 0 | 51 | local e = 0 |
52 | local w = 0 | 52 | local w = 0 |
53 | local t = 0 | 53 | local t = 0 |
54 | local d = 0 | ||
54 | local s = nil ~= hosts[host].Protocols[typ] | 55 | local s = nil ~= hosts[host].Protocols[typ] |
55 | local to = results.timeout | 56 | local to = results.timeout |
56 | if not APT.search(APT.protocols, typ) then s = true end | 57 | if not APT.search(APT.protocols, typ) then s = true end |
57 | if nil ~= results[typ] then | 58 | if nil ~= results[typ] then |
59 | d = results[typ].tested | ||
58 | e = results[typ].errors | 60 | e = results[typ].errors |
59 | w = results[typ].warnings | 61 | w = results[typ].warnings |
60 | t = results[typ].timeouts | 62 | t = results[typ].timeouts |
61 | for k, v in pairs(results[typ]) do | 63 | for k, v in pairs(results[typ]) do |
62 | if ("table" == type(v)) and ('redirects' ~= k) then | 64 | if ("table" == type(v)) and ('redirects' ~= k) then |
65 | if 0 <= v.tested then d = d + v.tested else to = true end | ||
63 | if 0 <= v.errors then e = e + v.errors else to = true end | 66 | if 0 <= v.errors then e = e + v.errors else to = true end |
64 | if 0 <= v.warnings then w = w + v.warnings else to = true end | 67 | if 0 <= v.warnings then w = w + v.warnings else to = true end |
65 | if 0 <= v.timeouts then t = t + v.timeouts else to = true end | 68 | if 0 <= v.timeouts then t = t + v.timeouts else to = true end |
@@ -71,6 +74,7 @@ local status = function(hosts, host, results, typ) | |||
71 | for i, u in pairs(v) do | 74 | for i, u in pairs(v) do |
72 | if "table" == type(u) then | 75 | if "table" == type(u) then |
73 | if typ == i then | 76 | if typ == i then |
77 | if 0 <= u.tested then d = d + u.tested end | ||
74 | if 0 <= u.errors then e = e + u.errors end | 78 | if 0 <= u.errors then e = e + u.errors end |
75 | if 0 <= u.warnings then w = w + u.warnings end | 79 | if 0 <= u.warnings then w = w + u.warnings end |
76 | if 0 <= u.timeouts then t = t + u.timeouts end | 80 | if 0 <= u.timeouts then t = t + u.timeouts end |
@@ -111,7 +115,7 @@ local status = function(hosts, host, results, typ) | |||
111 | else | 115 | else |
112 | faulty = faulty .. host .. " (" .. typ .. ")\n" | 116 | faulty = faulty .. host .. " (" .. typ .. ")\n" |
113 | end | 117 | end |
114 | else | 118 | elseif 0 < d then |
115 | result = "OK" | 119 | result = "OK" |
116 | if not s then result = result .. "*" end | 120 | if not s then result = result .. "*" end |
117 | if APT.html then | 121 | if APT.html then |
@@ -121,6 +125,16 @@ local status = function(hosts, host, results, typ) | |||
121 | result = "<font color='darkgreen'><b>OK*</b></font>" | 125 | result = "<font color='darkgreen'><b>OK*</b></font>" |
122 | end | 126 | end |
123 | end | 127 | end |
128 | else | ||
129 | result = "untested" | ||
130 | if not s then result = result .. "*" end | ||
131 | if APT.html then | ||
132 | if s then | ||
133 | result = "<font color='grey'><b>untested</b></font>" | ||
134 | else | ||
135 | result = "<font color='dimgrey'><b>untested*</b></font>" | ||
136 | end | ||
137 | end | ||
124 | end | 138 | end |
125 | return result .. APT.plurals(e, w, t) | 139 | return result .. APT.plurals(e, w, t) |
126 | end | 140 | end |
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index f166819..d8ee95b 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -290,6 +290,11 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
290 | IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. | 290 | IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. |
291 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' | 291 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' |
292 | ):Nice():log():Do().status | 292 | ):Nice():log():Do().status |
293 | if 0 < r then | ||
294 | APT.tested(PU.scheme, 'Redirects', host) | ||
295 | else | ||
296 | APT.tested(PU.scheme, '', host) | ||
297 | end | ||
293 | local code = "???" | 298 | local code = "???" |
294 | local cstr = "" | 299 | local cstr = "" |
295 | local location = nil | 300 | local location = nil |
@@ -359,14 +364,15 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
359 | if (pu.host == APT.options.roundRobin.value) and (nil ~= PU.path:find('merged/pool/DEVUAN/')) then | 364 | if (pu.host == APT.options.roundRobin.value) and (nil ~= PU.path:find('merged/pool/DEVUAN/')) then |
360 | E('DEVUAN packages must not be redirected to ' .. APT.options.roundRobin.value .. ' - ' .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, 'Redirects', host) | 365 | E('DEVUAN packages must not be redirected to ' .. APT.options.roundRobin.value .. ' - ' .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, 'Redirects', host) |
361 | end | 366 | end |
362 | if ('http' == location:sub(1, 4)) and (pu.scheme ~= PU.scheme) then -- Sometimes a location sans scheme is returned, this is not a protocol change. | 367 | if APT.testing("Protocol") then |
363 | if APT.testing("Protocol") then | 368 | if ('http' == location:sub(1, 4)) and (pu.scheme ~= PU.scheme) then -- Sometimes a location sans scheme is returned, this is not a protocol change. |
364 | if APT.options.roundRobin.value == host then -- Coz HTTPS shouldn't happen via the round robin. | 369 | if APT.options.roundRobin.value == host then -- Coz HTTPS shouldn't happen via the round robin. |
365 | E(spcd .. spcd .. "Protocol changed during redirect! " .. check .. " " .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, "Protocol", host) | 370 | E(spcd .. spcd .. "Protocol changed during redirect! " .. check .. " " .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, "Protocol", host) |
366 | end | 371 | end |
367 | W(spcd .. spcd .. "Protocol changed during redirect! " .. check .. " " .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, "Protocol", host) | 372 | W(spcd .. spcd .. "Protocol changed during redirect! " .. check .. " " .. APT.lnk(URL) .. arw .. APT.lnk(location), PU.scheme, "Protocol", host) |
368 | else | 373 | else |
369 | end | 374 | end |
375 | APT.tested(PU.scheme, 'Protocol', host) | ||
370 | end | 376 | end |
371 | 377 | ||
372 | if location == URL then | 378 | if location == URL then |
@@ -402,6 +408,7 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
402 | I(spcd .. spcd .. "Now checking redirected host " .. u .. ' for ' .. APT.lnk(URL) .. arw .. APT.lnk(location), host) | 408 | I(spcd .. spcd .. "Now checking redirected host " .. u .. ' for ' .. APT.lnk(URL) .. arw .. APT.lnk(location), host) |
403 | APT.exe(downloadLock .. "REDIR-" .. check .. ".log.txt" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file):Nice():log():fork() | 409 | APT.exe(downloadLock .. "REDIR-" .. check .. ".log.txt" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file):Nice():log():fork() |
404 | D(spcd .. 'logging to ' .. APT.logName(pu.host, nil, file)[2]) | 410 | D(spcd .. 'logging to ' .. APT.logName(pu.host, nil, file)[2]) |
411 | APT.tested(PU.scheme, 'Redirects', host) | ||
405 | end | 412 | end |
406 | end | 413 | end |
407 | elseif nil ~= PU.path:find('merged/pool/DEBIAN-SECURITY/') then | 414 | elseif nil ~= PU.path:find('merged/pool/DEBIAN-SECURITY/') then |
@@ -417,6 +424,7 @@ local checkTimeouts = function(host, scheme, URL) | |||
417 | URL = URL:gsub("/", "///") | 424 | URL = URL:gsub("/", "///") |
418 | URL = URL:gsub("///", "/", 1) | 425 | URL = URL:gsub("///", "/", 1) |
419 | checkHEAD(host, scheme .. "://" .. URL, 0, 0, true) | 426 | checkHEAD(host, scheme .. "://" .. URL, 0, 0, true) |
427 | APT.tested(scheme, 'URLSanity', host) | ||
420 | end | 428 | end |
421 | if nil ~= cor then | 429 | if nil ~= cor then |
422 | D('*>* About to resume coroutine after checkHEAD(' .. host .. ' , ' .. scheme .. ' :// ' .. URL .. ')') | 430 | D('*>* About to resume coroutine after checkHEAD(' .. host .. ' , ' .. scheme .. ' :// ' .. URL .. ')') |
@@ -700,11 +708,13 @@ local parseDebs = function(host) | |||
700 | if sha ~= fsha:sub(2, -2) then E('Package SHA256 sum mismatch - results/' .. host .. "/merged/" .. p, 'http', 'Integrity', host) end | 708 | if sha ~= fsha:sub(2, -2) then E('Package SHA256 sum mismatch - results/' .. host .. "/merged/" .. p, 'http', 'Integrity', host) end |
701 | -- TODO - maybe check the PGP key, though packages are mostly not signed. | 709 | -- TODO - maybe check the PGP key, though packages are mostly not signed. |
702 | end | 710 | end |
711 | APT.tested('http', 'Integrity', host) | ||
703 | end | 712 | end |
704 | if APT.testing("Updated") then | 713 | if APT.testing("Updated") then |
705 | if sz ~= fsz:sub(2, -2) then | 714 | if sz ~= fsz:sub(2, -2) then |
706 | E('Package size mismatch for ' .. host .. "/merged/" .. p, 'http', 'Updated', host) | 715 | E('Package size mismatch for ' .. host .. "/merged/" .. p, 'http', 'Updated', host) |
707 | end | 716 | end |
717 | APT.tested('http', 'Updated', host) | ||
708 | end | 718 | end |
709 | os.execute('rm -f results/' .. host .. "/merged/" .. p) | 719 | os.execute('rm -f results/' .. host .. "/merged/" .. p) |
710 | else | 720 | else |
@@ -839,6 +849,7 @@ local parseRelease = function(host) | |||
839 | " results/" .. host .. "/merged/dists/" .. n .. '/' .. o:sub(1, -5)):Nice():noErr():log():Do().status | 849 | " results/" .. host .. "/merged/dists/" .. n .. '/' .. o:sub(1, -5)):Nice():noErr():log():Do().status |
840 | if 0 ~= status then E("GPG check failed for " .. host .. "/merged/dists/" .. n .. '/' .. o, "http", "Integrity", host) end | 850 | if 0 ~= status then E("GPG check failed for " .. host .. "/merged/dists/" .. n .. '/' .. o, "http", "Integrity", host) end |
841 | -- TODO - should check the PGP sig of InRelease as well. | 851 | -- TODO - should check the PGP sig of InRelease as well. |
852 | APT.tested('http', 'Integrity', host) | ||
842 | end | 853 | end |
843 | os.execute('rm results/' .. host .. '/merged/dists/' .. n .. '/' .. o) | 854 | os.execute('rm results/' .. host .. '/merged/dists/' .. n .. '/' .. o) |
844 | end | 855 | end |
@@ -885,6 +896,7 @@ local parseRelease = function(host) | |||
885 | else | 896 | else |
886 | updated = true | 897 | updated = true |
887 | end | 898 | end |
899 | APT.tested('http', 'Updated', host) | ||
888 | end | 900 | end |
889 | end | 901 | end |
890 | 902 | ||