-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using libappimageupdate for updating Linux clients #168
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
what is blocking this feature? is the tooling to generate the appimage part of this repo? it seems issue #2656 would be solved if this gets implemented |
https://github.com/nextcloud/client-building/tree/master/linux |
so that's where the proposed changes should be made? |
@TheAssassin do i understand correctly do that |
I don't provide support for linuxdeployqt. |
wait so linuxdeployqt does what appimagetool normally does or something? |
@Fuseteam So, linuxdeployqt generates AppDir specifically for Qt Applications It's also worthy to note that |
@antony-jr oh interesting. so then, if i understand correctly, the change needed to use libappimageupdate would need to need to done in |
Yes. You just need this argument in the linuxdeployqt program invocation
This update string should follow this spec https://github.com/AppImage/AppImageSpec/blob/master/draft.md#update-information A valid update string would look like this,
The delimiter here is the So the first part tells we will fetch the latest version from Github(there are other options, please see the spec). The release should contain at least the files shown in the below image (YOU DON'T NEED THE TORRENT FILE, IT's JUST MY SPECIAL CASE) About libappimageupdateIt's a C++ library for updating AppImages with the zsync algorithm. You need to use this if you want the delta updater inside your application. So you have to implement it inside the application. But there are external application to do this job. In this case the user would have to download the updater from https://github.com/AppImage/AppImageUpdate and use it to update your AppImage. AppImageLauncher which is used a lot has this inbuilt so the user don't have to download or install anything if AppImageLauncher is installed. EDIT: @Fuseteam you can take a look on how I deploy my application with the required update information https://github.com/antony-jr/AppImageUpdater/blob/mk2/.github/workflows/deploy.yml |
oh wow thanks;for the extensive write up @antony-jr i'll try it in the above script when i find a chance unless someone else picks it up |
+1 |
Haven't had a chance to look at this yet sadly |
@Fuseteam you only need to add a single argument and upload the zsync file to releases to enable delta updates. Here desktop/admin/linux/build-appimage.sh Line 97 in d06998a
it needs to be
and you need to upload the .zsync file (which will be generated by linuxdeployqt if zsync is installed in the build distro [apt install zsync]) along with your AppImage here desktop/admin/linux/upload-appimage.sh Line 72 in d06998a
|
@antony-jr well that seems easy enough, i however don't think i am able to upload files to releases...... If i created a PR thar would be my 'first contribution' |
Oops, thought you were a member. Sorry. |
@TheAssassin and @antony-jr could you help us with this PR : #3736 (comment) ? |
oooh i see its merged, looks like we'll be getting this in 3.4? |
The original issue is to consider using libappimageupdate for updating linux clients. The merge only embeds the required update information for NextCloud AppImage. So partially yes, you can delta update next cloud appimages from next release using the official AppImage Updater (https://github.com/AppImage/AppImageUpdate). But to do this without any third party application and directly within the next cloud application itself then they would have to use libappimageupdate. But IMO this is better since AppImageLauncher has the AppImage update built into it so it will give menu options to update next cloud automatically. |
ah cool thanks for the clarification |
I trtied to update from 3.4.0 to 3.4.1 with the help of AppImageLauncher but I get this error :
😞 |
@Thatoo Just as the error message says, the zsync file is missing in the release, the CI/CD should upload the .zsync file along with the AppImage. You can generate the .zsync file of the AppImage with a tool called zsync but linuxdeployqt does this automatically so just need to upload it. The file |
looks like it is included in the script |
@Fuseteam True but that's the issue why it's not working. We need to resolve it somehow. Someone who has access to the entire CI/CD pipeline and knowledge on how the release works might be able to fix this soon. I really have no clue how they do this and don't have time for that. 😕 |
true same here, it must be missed somewhere hmmm |
@antony-jr or @TheAssassin could it be linked to this issue not being solved #2848? desktop/admin/linux/upload-appimage.sh Line 28 in 3ab698a
|
No it's completely unrelated. The issue as it stands today is pretty simple. There is no .zsync file uploaded to the assets in the releases. This line desktop/admin/linux/upload-appimage.sh Line 74 in 3ec9c00
The upload url changes when you upload a file with different file name. But it seems you never create a new upload url(with the filename changed) for the zsync file and call upload release asset. |
the line 74 looks really similar to line 73, no? |
i love how i learn something new every time i get notif here xD |
taking another look desktop/admin/linux/upload-appimage.sh Line 27 in c2f72b5
looking at line 27 it sounds like it's not seeing/finding ./Nextcloud*.AppImage.zsync if it's generated at all
|
wait no i'm stupid; anthony already pointed it out desktop/admin/linux/upload-appimage.sh Lines 26 to 28 in c2f72b5
desktop/admin/linux/upload-appimage.sh Line 103 in c2f72b5
desktop/admin/linux/upload-appimage.sh Line 123 in c2f72b5
uploadUrl is only valid for $BASENAME which is based on $APPIMAGE not on $UPDATEdesktop/admin/linux/upload-appimage.sh Lines 70 to 75 in c2f72b5
so basically upload_release_asset should take two uploadurls as argument, one for $APPIMAGE and one for $UPDATE maybe something like this:
|
Yep. That's what I was trying to say without having to write code because I'm too lazy xD. Also it should check for any older .zsync file and delete just like how they delete old AppImage assets just to stay consistent I guess. |
Could you make a PR @Fuseteam ? |
ah cool guess i need to search how that works @Thatoo sure i can do that |
@Thatoo done, i just need to look into deleting the old zsync file now |
Thank you for this PR : https://github.com/nextcloud/desktop/pull/4529/files Once it's completed with the deletion of old zsync, we'll ask for review. |
@Thatoo i've found some remnants of $BASENAME, now i'm less confident if this will work as expected |
In this case, change back $BASENAME_APPIMAGE to $BASENAME and simply add $BASENAME_UPDATE. It is better to add than modify I guess.
I guess you just need to add
juste before the "done". |
thanks, i'm fairly confident i got all the desktop/admin/linux/upload-appimage.sh Lines 132 to 133 in 2e80905
|
@Thatoo thanks for the hint, i think this should be it. I've also cleared my doubts now, this should upload the zsync file as intended |
I have a doubt on
why did you change from
|
@Thatoo because as far as i understand we fetch the download url per asset over at desktop//admin/linux/upload-appimage.sh Lines 136 to 137 in 2abed2c
|
Ok, got it but did you not you forget a space in the middle of |
@Thatoo nice catch i've fixed it |
Looks like 3.5.4 still doesn't have the zsync information uploaded |
@gjedeer it is not merged yet, please wait untill the pull request gets merged |
May I ask why this seems stuck? |
our current tooling for producing AppImage relies on https://github.com/probonopd/linuxdeployqt |
@mgallien I asked the linuxdeployqt developer @probonopd if he has any ideas about this problem. From my understanding you're a single command line switch away from getting it to work:
|
There is an update check in the application that checks for new versions, but the users will have to download the new files themselves. On Linux, however, with AppImage being the main way for distributing the client software, you could use libappimageupdate, a library provided by the AppImage team, to automatically update the AppImage. This is done via the AppImage update mechanisms specified in the AppImage spec, and highly efficient due to the rsync-like delta update.
What has to be done for this is to start embedding so-called update information in the released AppImages. By adding
-u 'my update information'
to the appimagetool call. This causes appimagetool to generate a file with a.zsync
ending. This file needs to be put on a webserver with a fixed URL that will always be available, or, alternatively, you can make use of one of the "automagic" types such as the GitHub releases type etc. This file will point to the new release's location on your servers, from which AppImageUpdate will perform a delta file sync.For Linux, you could even replace the update check with libappimageupdate, but as it doesn't support meta information (yet), I guess you should combine that with your normal update check to make sure there really is an update available for download.
If you need help, we can assist with this process.
P.S.: We're working on a "standard" Qt UI developers can integrate so they don't have to do it yourself.
The text was updated successfully, but these errors were encountered: