Closed probonopd closed 7 years ago
Turns out it is actually a SSH problem, because zsync_curl build with openssl seems to be able to download from that URL just fine:
sudo apt-get -y install git devscripts autotools-dev libcurl4-openssl-dev
git clone https://github.com/probonopd/zsync-curl.git
cd zsync-curl/
./zsync-curl/build.sh
ldd /usr/local/bin/zsync_curl # Uses the system's OpenSSL
wget -c https://s3-eu-central-1.amazonaws.com/ds9-apps/kmail-master-appimage/kmail-git20170213-18:53:49-x86_64.AppImage
# I pressed Ctrl-C mid-download, to see whether zsync_curl can pick up from there
zsync_curl https://s3-eu-central-1.amazonaws.com/ds9-apps/kmail-master-appimage/kmail_latestversion.zsync
# Works
So we need to either make zsync_curl that gets bundled into AppImageUpdate use the system's OpenSSL (how? Given that there seem to be different versions floating around), or bundle OpenSSL into the AppImage, or fix whatever is the issue with the statically linked WolfSSL we have been using so far.
Possibly this is also the root cause of
To be confirmed.
Or we could use dlopen:
We've used dlopen() for loading the methods from the OpenSSL library. When MailerQ starts, it tries to locate a version of the OpenSSL library that is known to be sufficient for MailerQ, and it uses the functions from that library. By using dlopen() in such a way we've managed to create a single executable file that can be installed on many different Linux distributions, and that uses the version of OpenSSL that is available.
http://www.bruijntjes.net/blog/post/8c504e2f4a79ff837221d77183c88d00
AppImageUpdate version 443 and later should be able to download from S3 now, because they are using the semistatic build of zsync-curl
(that links to libcurl statically but to OpenSSL dynamically).
Please reports how it works for you.
Just fixed a bug in appimagetool
that would result in the SHA-1 of the zsync file to be wrong when the AppImage was signed (since the zsync file had been generated prior to signing the AppImage). https://github.com/probonopd/AppImageKit/commit/88853e9e80ac4badc2c62e42c2c1d8a2f9f275ae
To verify that this is not the case with your AppImage, run
wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage.zsync
strings *zsync | grep SHA-1 | cut -d " " -f 2
sha1sum *.AppImage
The signatures must match. If they don't, update your appimagetool
.
With this in place, I am now able to download from GitHub Releases with zsync-curl
successfully. Hence closing. Feel free to comment if you think that this needs to be reopened.
Running AppImageUpdate with increased verbosity
results in
Empty reply from server is bad here. So let's retrieve the same range of bytes using curl manually like this:
Looks like this works, which means that there must be a bug in zsync_curl which prevents this range of bytes from being downloaded, whereas manually downloding the same range of bytes succeeds. But why?
Is the
SSL connected
without any frurther information suspicious? Should we try AppImageUpdate or zsync_curl without WolfSSL statically linked and with OpenSSL instead to make sure that isn't the cause?