aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--Report-web_2.html5
-rw-r--r--apt-panopticommon.lua29
-rwxr-xr-xapt-panopticon-report-email-web.lua12
-rwxr-xr-xapt-panopticon.lua28
-rwxr-xr-xupdate_apt-panopticon6
6 files changed, 65 insertions, 21 deletions
diff --git a/README.md b/README.md
index 7e5d6d2..57e5be6 100644
--- a/README.md
+++ b/README.md
@@ -29,11 +29,11 @@ The details of that are yet to be determined.
29 29
30 30
31You can get the source code from [https://sledjhamr.org/cgit/apt-panopticon/](https://sledjhamr.org/cgit/apt-panopticon/) (main repo) 31You can get the source code from [https://sledjhamr.org/cgit/apt-panopticon/](https://sledjhamr.org/cgit/apt-panopticon/) (main repo)
32and [https://git.devuan.dev/onefang/apt-panopticon](https://git.devuan.dev/onefang/apt-panopticon) (Devuan repo). 32and [https://git.devuan.org/onefang/apt-panopticon](https://git.devuan.org/onefang/apt-panopticon) (Devuan repo).
33You can get the cgp graphing source code from [https://sledjhamr.org/cgit/apt-panopticon_cgp/]() (main repo) 33You can get the cgp graphing source code from [https://sledjhamr.org/cgit/apt-panopticon_cgp/]() (main repo)
34and [https://git.devuan.dev/onefang/apt-panopticon_cgp](https://git.devuan.dev/onefang/apt-panopticon_cgp) (Devuan repo). 34and [https://git.devuan.org/onefang/apt-panopticon_cgp](https://git.devuan.org/onefang/apt-panopticon_cgp) (Devuan repo).
35 35
36The issue tracker is at [https://sledjhamr.org/mantisbt/project_page.php?project_id=13](https://sledjhamr.org/mantisbt/project_page.php?project_id=13) 36The issue tracker is at [https://sledjhamr.org/TODO/apt-panopticon/index.HTML](https://sledjhamr.org/TODO/apt-panopticon/index.HTML)
37 37
38 38
39Installation. 39Installation.
diff --git a/Report-web_2.html b/Report-web_2.html
index 592e8c6..2882179 100644
--- a/Report-web_2.html
+++ b/Report-web_2.html
@@ -1,5 +1,8 @@
1 <p><font style='background-color:red; color:black'>EXPERIMENTAL CODE - double check all results you see here, and read the logs if it's important.</font></p> 1 <p><font style='background-color:red; color:black'>EXPERIMENTAL CODE - double check all results you see here, and read the logs if it's important.</font></p>
2 <p>The full list of Devuan package mirrors is available at the URL: <a href='https://pkgmaster.devuan.org/mirror_list.txt'>https://pkgmaster.devuan.org/mirror_list.txt</a></p> 2 <p>The full list of Devuan package mirrors is available at the URL: <a href='https://pkgmaster.devuan.org/mirror_list.txt'>https://pkgmaster.devuan.org/mirror_list.txt</a></p>
3 <p>Due to the nature of the tests, some errors or warnings will be counted several times. &nbsp; The links in the table and DNS list go to the detailed testing logs.</p> 3 <p>Due to the nature of the tests, some errors or warnings will be counted several times. There will be some duplication.</p>
4 <p>Due to the nature of the tests, some errors or warnings will be counted several times. There will be some duplication.</p>
5 <p>Due to the nature of the tests, some errors or warnings will be counted several times. There will be some duplication.</p>
6 <p>The links in the table and DNS list go to the detailed testing logs.</p>
4 7
5 <hr> 8 <hr>
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua
index e31c22f..982ff21 100644
--- a/apt-panopticommon.lua
+++ b/apt-panopticommon.lua
@@ -90,7 +90,7 @@ APT.options =
90 { 90 {
91 typ = "number", 91 typ = "number",
92 help = "", 92 help = "",
93 value = 5, 93 value = 24,
94 }, 94 },
95 timeouts = 95 timeouts =
96 { 96 {
@@ -501,6 +501,8 @@ APT.readCmd = function(cmd)
501 table.insert(result, l) 501 table.insert(result, l)
502 end 502 end
503 end 503 end
504 -- While this does return the same things as os.execute(), it's just as useless.
505 output:close()
504 return result 506 return result
505end 507end
506 508
@@ -590,8 +592,9 @@ APT.exe = function(c)
590 I'm getting 7168 or 0. No idea what the fuck that is. 592 I'm getting 7168 or 0. No idea what the fuck that is.
591 local ok, rslt, status = os.execute(s) 593 local ok, rslt, status = os.execute(s)
592 ]] 594 ]]
595
593 local f = APT.readCmd(self.cmd, 'r') 596 local f = APT.readCmd(self.cmd, 'r')
594 -- The last line will be the command's returned status, collect everything else in result. 597 -- The last line will be the command's returned status, collect everything else in result.
595 self.status = '' -- Otherwise the result starts with 0. 598 self.status = '' -- Otherwise the result starts with 0.
596 self.result = '\n' 599 self.result = '\n'
597 for i,l in ipairs(f) do 600 for i,l in ipairs(f) do
@@ -608,6 +611,28 @@ APT.exe = function(c)
608 E("status |" .. self.status .. '| ' .. self.command) 611 E("status |" .. self.status .. '| ' .. self.command)
609 end 612 end
610 end 613 end
614
615--[[ While this is more reliable, it breaks stuff that's likely making assumptions that match the old way.
616TODO - fix it later.
617 local f = APT.readCmd(self.cmd .. '; echo "$?"', 'r')
618 -- The last line will be the command's returned status, collect everything else in result.
619 self.status = tonumber(f[#f])
620 f[#f] = nil
621 self.result = '\n'
622 for i,l in ipairs(f) do
623 self.result = self.result .. l .. "\n"
624 end
625 if (137 == self.status) or (124 == self.status) then
626 print("timeout killed " .. self.status .. ' ' .. self.command)
627 print('ERROR ' .. "timeout killed " .. self.status .. ' ' .. self.command)
628 elseif (nil == self.status) then
629 print("status |" .. "NIL" .. '| ' .. self.command)
630 E("status |" .. "NIL" .. '| ' .. self.command)
631 elseif (0 ~= self.status) then
632-- print("status |" .. self.status .. '| ' .. self.command)
633 E("status |" .. self.status .. '| ' .. self.command)
634 end
635]]
611 return self 636 return self
612 end 637 end
613 function exe:fork(host) 638 function exe:fork(host)
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 2a13975..de63274 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -444,7 +444,9 @@ if nil == email then C("opening mirrors file - " .. e) else
444 "The full results of the mirror checking is available at the URLs:\n\n" .. 444 "The full results of the mirror checking is available at the URLs:\n\n" ..
445 " https://borta.devuan.dev/apt-panopticon/results/Report-web.html\n (updated once every hour)\n" .. 445 " https://borta.devuan.dev/apt-panopticon/results/Report-web.html\n (updated once every hour)\n" ..
446 " https://sledjhamr.org/apt-panopticon/results/Report-web.html\n (updated once every ten minutes)\n\n" .. 446 " https://sledjhamr.org/apt-panopticon/results/Report-web.html\n (updated once every ten minutes)\n\n" ..
447 "Due to the nature of the tests, some errors or warnings will be \ncounted several times. " .. 447 "Due to the nature of the tests, some errors or warnings will be \ncounted several times. There will be some duplication.\n\n" ..
448 "Due to the nature of the tests, some errors or warnings will be \ncounted several times. There will be some duplication.\n\n" ..
449 "Due to the nature of the tests, some errors or warnings will be \ncounted several times. There will be some duplication.\n\n" ..
448 "Refer to the logs on the web page for details.\n\n" .. 450 "Refer to the logs on the web page for details.\n\n" ..
449 "Please see below the current status of the Devuan Package Mirror \nnetwork:\n\n" .. 451 "Please see below the current status of the Devuan Package Mirror \nnetwork:\n\n" ..
450 "==== package mirror status " .. os.date("!%F %H:%M") .. " GMT ====\n" .. 452 "==== package mirror status " .. os.date("!%F %H:%M") .. " GMT ====\n" ..
@@ -484,9 +486,9 @@ if nil == email then C("opening mirrors file - " .. e) else
484 "* This means that this protocol isn't actually supported, but the test was run ayway.\n\n" .. 486 "* This means that this protocol isn't actually supported, but the test was run ayway.\n\n" ..
485 "Thanks for your precious help in ensuring that Devuan GNU+Linux \nremains a universal, stable, dependable, free operating system.\n\n" .. 487 "Thanks for your precious help in ensuring that Devuan GNU+Linux \nremains a universal, stable, dependable, free operating system.\n\n" ..
486 "You can get the source code from https://sledjhamr.org/cgit/apt-panopticon/about/ (main repo)\n" .. 488 "You can get the source code from https://sledjhamr.org/cgit/apt-panopticon/about/ (main repo)\n" ..
487 "and from https://git.devuan.dev/onefang/apt-panopticon' (Devuan repo).\n" .. 489 "and from https://git.devuan.org/onefang/apt-panopticon' (Devuan repo).\n" ..
488 "You can get the cgp graphing source code from https://sledjhamr.org/cgit/apt-panopticon_cgp/about/ (main repo)\n" .. 490 "You can get the cgp graphing source code from https://sledjhamr.org/cgit/apt-panopticon_cgp/about/ (main repo)\n" ..
489 "and https://git.devuan.dev/onefang/apt-panopticon_cgp (Devuan repo)\n\n" .. 491 "and https://git.devuan.org/onefang/apt-panopticon_cgp (Devuan repo)\n\n" ..
490 "Love\n\n" .. 492 "Love\n\n" ..
491 "The Dev1Devs\n\n") 493 "The Dev1Devs\n\n")
492 email:close() 494 email:close()
@@ -621,9 +623,9 @@ if nil == web then C("opening mirrors file - " .. e) else
621 web:write( "<hr>\n<hr>\n<p>The <a href='Report-email.txt'>email report</a>. &nbsp; " .. 623 web:write( "<hr>\n<hr>\n<p>The <a href='Report-email.txt'>email report</a>. &nbsp; " ..
622 "All <a href='../results'>the logs and other output</a>. &nbsp; " .. 624 "All <a href='../results'>the logs and other output</a>. &nbsp; " ..
623 "You can get the <a href='https://sledjhamr.org/cgit/apt-panopticon/about/'>source code here (main repo)</a>" .. 625 "You can get the <a href='https://sledjhamr.org/cgit/apt-panopticon/about/'>source code here (main repo)</a>" ..
624 "and <a href='https://git.devuan.dev/onefang/apt-panopticon'>here (Devuan repo)</a>. &nbsp;" .. 626 "and <a href='https://git.devuan.org/onefang/apt-panopticon'>here (Devuan repo)</a>. &nbsp;" ..
625 "You can get the cgp graphing <a href='https://sledjhamr.org/cgit/apt-panopticon_cgp/about/'>source code here (main repo)</a>" .. 627 "You can get the cgp graphing <a href='https://sledjhamr.org/cgit/apt-panopticon_cgp/about/'>source code here (main repo)</a>" ..
626 "and <a href='https://git.devuan.dev/onefang/apt-panopticon_cgp'>here (Devuan repo)</a>.</p>\n" 628 "and <a href='https://git.devuan.org/onefang/apt-panopticon_cgp'>here (Devuan repo)</a>.</p>\n"
627 ) 629 )
628 local whn = APT.exe('TZ="GMT" ls -dl1 --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result:sub(2, -2) 630 local whn = APT.exe('TZ="GMT" ls -dl1 --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result:sub(2, -2)
629 web:write( "<p>This run took " .. (os.time() - tonumber("0" .. whn)) .. " seconds. &nbsp &nbsp apt-panopticon version " .. APT.version .. " </p>" .. 631 web:write( "<p>This run took " .. (os.time() - tonumber("0" .. whn)) .. " seconds. &nbsp &nbsp apt-panopticon version " .. APT.version .. " </p>" ..
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 5658d48..50e6177 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -21,7 +21,7 @@ local releaseFiles =
21 "Release.gpg", -- 21 "Release.gpg", --
22-- "InRelease", -- 3.7 MB 22-- "InRelease", -- 3.7 MB
23-- "main/binary-all/Packages.xz", -- 2.6 GB for all that changed recently. 23-- "main/binary-all/Packages.xz", -- 2.6 GB for all that changed recently.
24 -- Contents files. -- 3.3 GB 24-- Contents files. -- 3.3 GB
25-- "main/Contents-all.xz", 25-- "main/Contents-all.xz",
26-- "main/Contents-amd64.xz", 26-- "main/Contents-amd64.xz",
27-- "main/Contents-arm64.xz", 27-- "main/Contents-arm64.xz",
@@ -36,15 +36,16 @@ local notExist =
36local referenceDebs = 36local referenceDebs =
37{ 37{
38 -- Debian package. 38 -- Debian package.
39 "merged/pool/DEBIAN/main/d/debian-keyring/debian-keyring_2024.03.24_all.deb", 39 "merged/pool/DEBIAN/main/d/debian-keyring/debian-keyring_2025.03.23_all.deb",
40 -- Debian security package. NOTE this one should always be redirected? 40 -- Debian security package. NOTE this one should always be redirected?
41 "merged/pool/DEBIAN-SECURITY/updates/main/a/apt/apt-transport-https_1.8.2.2_all.deb", 41 "merged/pool/DEBIAN-SECURITY/updates/main/e/exim4/exim4_4.96-15+deb12u7_all.deb",
42} 42}
43local referenceDevs = 43local referenceDevs =
44{ 44{
45 -- Devuan package. NOTE this one should not get redirected, but that's more a warning than an error. 45 -- Devuan package. NOTE this one should not get redirected, but that's more a warning than an error.
46 "merged/pool/DEVUAN/main/d/devuan-keyring/devuan-keyring_2023.10.07_all.deb", -- Devuan keeps changing this since the key expiry incident. 46 "merged/pool/DEVUAN/main/d/devuan-keyring/devuan-keyring_2025.06.02_all.deb", -- Devuan keeps changing this since the key expiry incident.
47 "merged/pool/DEVUAN/main/b/base-files/base-files_13.2devuan1_all.deb", 47 -- Hmmm used to be _all, but it was split to the individual archs. Seems pointless, each one is the same size as the previous all.
48 "merged/pool/DEVUAN/main/b/base-files/base-files_13.8devuan1_amd64.deb",
48} 49}
49 50
50local keyring = "/usr/share/keyrings/devuan-archive-keyring.gpg" 51local keyring = "/usr/share/keyrings/devuan-archive-keyring.gpg"
@@ -276,7 +277,11 @@ checkHEAD = function (host, URL, r, retry, sanity)
276 if "http" == PU.scheme then 277 if "http" == PU.scheme then
277 hdr = '-H "Host: ' .. host .. '"' 278 hdr = '-H "Host: ' .. host .. '"'
278 end 279 end
279 IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' 280 if '-6' == APT.IPv46 then
281 IP = '--connect-to "' .. pu.host .. '::[' .. PU.host .. ']:"'
282 else
283 IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"'
284 end
280 fname = host .. "_" .. pu.host .. '_' .. PU.host .. "_" .. PU.path:gsub("/", "_") .. ".txt" 285 fname = host .. "_" .. pu.host .. '_' .. PU.host .. "_" .. PU.path:gsub("/", "_") .. ".txt"
281 end 286 end
282 os.execute('rm -f results/HEADERS_' .. fname .. ' 2>/dev/null; rm -f results/STATUS_' .. fname .. ' 2>/dev/null; touch results/STATUS_' .. fname) 287 os.execute('rm -f results/HEADERS_' .. fname .. ' 2>/dev/null; rm -f results/STATUS_' .. fname .. ' 2>/dev/null; touch results/STATUS_' .. fname)
@@ -307,6 +312,10 @@ checkHEAD = function (host, URL, r, retry, sanity)
307 if "https" == PU.scheme and APT.options.roundRobin.value == host then 312 if "https" == PU.scheme and APT.options.roundRobin.value == host then
308 I(spcd .. "Not testing " .. APT.lnk(URL) .. " mirrors wont have the correct HTTPS certificate for the round robin.", host) 313 I(spcd .. "Not testing " .. APT.lnk(URL) .. " mirrors wont have the correct HTTPS certificate for the round robin.", host)
309 return 314 return
315-- TODO - For some odd reason, sometimes one of these is nil. Dig deeper to figure out why.
316 elseif "https" == PU.scheme and (APT.mirrors[host] ~= nil) and (APT.mirrors[host].Protocols ~= nil) and (not APT.mirrors[host].Protocols.https) then
317 I(spcd .. "Not testing " .. APT.lnk(URL) .. " host doesn't support HTTPS.", host)
318 return
310 else 319 else
311 I(spcd .. check .. " " .. APT.lnk(URL), host) 320 I(spcd .. check .. " " .. APT.lnk(URL), host)
312 end 321 end
@@ -624,6 +633,10 @@ end
624 633
625 634
626local validateURL = function(m) 635local validateURL = function(m)
636 if "http://" == m.BaseURL:sub(1, 7) then
637 W("HTTP at beginning of BaseURL in mirror_list.txt! " .. m.BaseURL, "", "", m.FQDN)
638 m.BaseURL = m.BaseURL:sub(1, -2)
639 end
627 if " " == m.BaseURL:sub(-1, -1) then 640 if " " == m.BaseURL:sub(-1, -1) then
628 W("space at end of BaseURL in mirror_list.txt! " .. m.BaseURL, "", "", m.FQDN) 641 W("space at end of BaseURL in mirror_list.txt! " .. m.BaseURL, "", "", m.FQDN)
629 m.BaseURL = m.BaseURL:sub(1, -2) 642 m.BaseURL = m.BaseURL:sub(1, -2)
@@ -636,7 +649,7 @@ local validateURL = function(m)
636 if nil == p.path then p.path = '' end 649 if nil == p.path then p.path = '' end
637 if nil ~= p.port then p.authority = authority .. ':' .. p.port end 650 if nil ~= p.port then p.authority = authority .. ':' .. p.port end
638 if nil == m.FQDN then W("Something wrong in FQDN from mirror_list.txt! nil", "", "", p.authority) else 651 if nil == m.FQDN then W("Something wrong in FQDN from mirror_list.txt! nil", "", "", p.authority) else
639 if m.FQDN ~= p.authority then W("Something wrong in FDQN from mirror_list.txt! " .. m.FDQN, "", "", p.authority) end 652 if m.FQDN ~= p.authority then W("Something wrong in FQDN from mirror_list.txt! " .. m.FQDN, "", "", p.authority) end
640 end 653 end
641 if nil == m.BaseURL then W("Something wrong in BaseURL from mirror_list.txt! nil", "", "", p.authority) else 654 if nil == m.BaseURL then W("Something wrong in BaseURL from mirror_list.txt! nil", "", "", p.authority) else
642 if m.BaseURL ~= (p.authority .. p.path) then W("Something wrong in BaseURL from mirror_list.txt! " .. m.BaseURL, "", "", p.authority) end 655 if m.BaseURL ~= (p.authority .. p.path) then W("Something wrong in BaseURL from mirror_list.txt! " .. m.BaseURL, "", "", p.authority) end
@@ -1158,6 +1171,7 @@ if 0 < #arg then
1158 checkFiles(pu.host, pu.host, pu.path:sub(1, -1), file); 1171 checkFiles(pu.host, pu.host, pu.path:sub(1, -1), file);
1159 end 1172 end
1160 else 1173 else
1174 if "-6" == APT.IPv46 then arg[2] = '[' .. arg[2] .. ']' end
1161 checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) 1175 checkHost(pu.host, pu.host, pu.path, arg[2], arg[3])
1162 end 1176 end
1163 1177
diff --git a/update_apt-panopticon b/update_apt-panopticon
index dde18a5..969cc8f 100755
--- a/update_apt-panopticon
+++ b/update_apt-panopticon
@@ -6,12 +6,12 @@ PANOPATH="/var/www/html/apt-panopticon"
6cd ${PANOPATH}/apt-panopticon_cgp 6cd ${PANOPATH}/apt-panopticon_cgp
7if [ -d .git ] ; then 7if [ -d .git ] ; then
8 git pull > /dev/null 8 git pull > /dev/null
9 chown -R www-data:www-data * 9 chown -hR www-data:www-data *
10fi 10fi
11cd ${PANOPATH}/apt-panopticon 11cd ${PANOPATH}/apt-panopticon
12if [ -d .git ] ; then 12if [ -d .git ] ; then
13 git pull > /dev/null 13 git pull > /dev/null
14 chown -R www-data:www-data * 14 chown -hR www-data:www-data *
15fi 15fi
16 16
17# Check if the lock file still exists. 17# Check if the lock file still exists.
@@ -49,7 +49,7 @@ if [ -f apt-panopticon.lock ] ; then
49fi 49fi
50rm ../results; ln -s apt-panopticon/results ../results 50rm ../results; ln -s apt-panopticon/results ../results
51 51
52chown -R www-data:www-data * 52chown -hR www-data:www-data *
53 53
54# Clean up any mess left over from THIS failed run. 54# Clean up any mess left over from THIS failed run.
55find results_* -maxdepth 2 ! -name "pkgmaster.devuan.org" -name "*.*" -type d -print0 | xargs -0rt /bin/rm -fr 55find results_* -maxdepth 2 ! -name "pkgmaster.devuan.org" -name "*.*" -type d -print0 | xargs -0rt /bin/rm -fr