Switch to zsync2 (#5810)

* Switch to zsync2

Requires https://github.com/koreader/koreader-base/pull/1036

* Simplify FBInk syntax

The weird-ass workarounds for -s's subopts handling are
no longer needed w/ FBInk >= 1.21.0

* Update base

* Re-enable HW dithering on Kindle
  (https://github.com/koreader/koreader-base/pull/1034)
* Update SQLite to 3.31.1
  (https://github.com/koreader/koreader-base/pull/1035)
* reMarkable port
  (https://github.com/koreader/koreader-base/pull/1023)
* zsync2
  (https://github.com/koreader/koreader-base/pull/1036)

* zsync2 means we can finally have nice things

(OpenStack backed storage)

* We also no longer need that insane workaround on ARM

* And comment out @chrox's mirror, which appears to be down.

* Warn that a malformed URL will horribly blow up in fun and interesting
ways
reviewable/pr5813/r1
NiLuJe 4 years ago committed by GitHub
parent 5499d85cbc
commit 9a20fb5836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit 26bb2a880350a67768da68bbc2872b185405e474
Subproject commit c258c33abc45d42bfd232bb55fec05be15ac068d

@ -19,20 +19,17 @@ local T = require("ffi/util").template
local ota_dir = DataStorage:getDataDir() .. "/ota/"
local OTAManager = {
-- NOTE: Each URL *MUST* end with a /
ota_servers = {
"http://ota.koreader.rocks:80/",
"http://vislab.bjmu.edu.cn:80/apps/koreader/ota/",
"http://ota.koreader.rocks/",
--[[
-- NOTE: Because we can't have nice things,
-- the HTTP frontend of these OpenStack storage containers doesn't actually properly support
-- HTTP/1.1 Range requests when multiple byte ranges are requested: they return bogus data when doing so,
-- which confuses zsync, causing it to retry indefinitely instead of aborting...
-- c.f., https://github.com/koreader/koreader-base/pull/699
"http://koreader-fr.ak-team.com:80/",
"http://koreader-pl.ak-team.com:80/",
"http://koreader-na.ak-team.com:80/",
-- NOTE: Seems down? Ping @chrox ;).
"http://vislab.bjmu.edu.cn/apps/koreader/ota/",
--]]
"http://koreader.ak-team.com:80/",
"http://koreader-fr.ak-team.com/",
"http://koreader-pl.ak-team.com/",
"http://koreader-na.ak-team.com/",
"http://koreader.ak-team.com/",
},
ota_channels = {
"stable",
@ -395,7 +392,7 @@ end
function OTAManager:zsync(full_dl)
if full_dl or self:_buildLocalPackage() == 0 then
local zsync_wrapper = "zsync"
local zsync_wrapper = "zsync2"
-- With visual feedback if supported...
if self.can_pretty_print then
zsync_wrapper = "spinning_zsync"

@ -23,7 +23,6 @@ pcall(dofile, path.."/koreader/patch.lua")
-- Cf. <https://github.com/koreader/koreader/issues/5347#issuecomment-529476693>.
android.execute("chmod", "755", "./sdcv")
android.execute("chmod", "755", "./tar")
android.execute("chmod", "755", "./zsync")
-- set TESSDATA_PREFIX env var
C.setenv("TESSDATA_PREFIX", path.."/koreader/data", 1)

@ -38,8 +38,8 @@ fi
done
) &
# Launch zsync, and remember its exit code...
./zsync "$@"
# Launch zsync2, and remember its exit code...
./zsync2 "$@"
rc=$?
# Kill the spinner subshell now that we're done

@ -257,7 +257,7 @@ while [ ${RETURN_VALUE} -ne 0 ]; do
# The idea for the margins being to leave enough room for an fbink -Z bar, small horizontal margins, and a font size based on what 6pt looked like @ 265dpi
./fbink -q -b -O -t regular=./fonts/droid/DroidSansMono.ttf,top=$((viewHeight / 2 + FONTH * 2 + FONTH / 2)),left=$((viewWidth / 60)),right=$((viewWidth / 60)),px=$((viewHeight / 64)) "${crashLog}"
# So far, we hadn't triggered an actual screen refresh, do that now, to make sure everything is bundled in a single flashing refresh.
./fbink -q -f -s top=0,left=0
./fbink -q -f -s
# Cue a lemming's faceplant sound effect!
{

Loading…
Cancel
Save