Announcing automatically updating Linux LibreOffice builds

I’m finally ready to announce LibreOffice daily builds for Linux that integrate our new automatic updater. The work on the automatic updater has been going on for nearly a year now and is finally in a shape that we produce builds on TDF hardware that will automatically update using delta updates.

The current builds are 64-bit Linux builds created on SLES 12.2 and should run on most Linux distros. These builds are .tar.gz based archives that you can extract and just run. Note that we can’t update builds that are placed into locations that are not writeable by the current user (and due to missing support for signing executables and libraries on Linux there are no plans to change that).

Below you will find a short summary how the updating works and some of my open items until this feature can be shipped in release builds (hopefully already in the next major release). If you are not interested in the technical details, head to the daily builds directory and download the build (currently the only way to see that an update happened is through the version string in About dialog but future builds will open my test wiki page after a successful build).

Technical details

Our updater code is heavily based on the Mozilla updater code and was initially imported into the LibreOffice build system as part of GSoC 2015.

The update files are called mar files and contain bzip2 compressed update files. In addition to the update files (either complete or delta updates) mar files also contain signatures, version info and update channel information. We currently only use the signature support to ensure that the update files are valid LibreOffice update files produced by us and the version info to make sure that nobody can do a downgrade.

The update process is currently a two step process but I might change this to single step process later. The first step currently contacts our update server that knows about all available updater enabled builds and will tell the LibreOffice instance which update files to use and provide some additional information. Based on the response the LibreOffice instance will download the update file, verify that the file is correct (file size and hash), copy the existing installation and apply the update in the update directory. After the update has been applied the first stage is complete and we need to wait until the next start to replace the running LibreOffice instance with the freshly updated one. During the next start the updated build in the update directory replaces the existing installation.

We currently use a two step process to ensure that we are not blocking the user too long as downloading a complete update file can take several minutes (about 200 MB compared to around 2 MB for my current delta files) and ensuring that if one of the steps fails we still have a working build. However, anyone who has ever developed complex code on Windows knows that Windows prohibits access to files that are already open by another process. Therefore this approach does not work on Windows and I think the two step process has some potential for user profile corruption if the user profile is stored in the installation directory (e.g. by default in our archive based builds). The long term plan is currently to switch to an update process that first downloads the update file and during the next start applies the update in-place. This approach would work on Windows and should avoid all potentials for user profile corruptions.

Another huge problem of the automatic updater is how to handle the case that the user can not write to the installation directory (e.g. installed as a normal application on Windows). Mozilla handles this case on Windows through an additional updater service that elevates the privileges of the updater process. Currently my plan is to use the same concept for LibreOffice and the code for the updater service already compiles successfully on Windows. Using such a service requires us to make sure that the service can not be used by any executable that is not produced by the LibreOffice team which requires signatures checks during each step. As I could not find a way to reliably sign executables and libraries on Linux there is currently no supported planned for this feature outside of Windows.

The updater seems to work reliably on Linux already and many of the basic features that I have on my list are already implemented. Currently the one remaining feature that I still need to implement for all platforms is some form of an UI. The larger task is to get the updater working well on Windows, including the updater service and the MSI integration through MSP updates. In addition, I would like to implement some automatic tests that make sure that updates work and that updated builds and freshly installed builds are identical.

If you want to help with the work on improving the automatic updater and making it available in our next major release please talk to me. A good starting point might be tdf#108563, a simple easy hack in the online updater code.

As always I have to thank all developers working on LibreOffice, the TDF infrastructure team which provides all the services that are used to produce the builds and especially the Mozilla team for providing an awesome solution as open source that we can easily integrate.

Advertisements

About Markus Mohrhard

Hacking at Libreoffice calc
This entry was posted in Uncategorized. Bookmark the permalink.

24 Responses to Announcing automatically updating Linux LibreOffice builds

  1. Pingback: Announcing automatically updating Linux LibreOffice builds | clientonboardingheaven

  2. chaz6 says:

    It would be great if you could provide these daily builds as a single AppImage per application, rather than an archive of >5000 files. Thanks for your consideration 🙂

  3. Pingback: LibreOffice 6.0 to Automatically Update Itself on GNU/Linux, but There’s a Catch | Linux Press

  4. Maverick says:

    Hi there,

    I think this is related to automatic updates, and since i don’t know if you noticed, there’s a Mozilla engineer offering his help here:

    https://bugs.documentfoundation.org/show_bug.cgi?id=68274#c45

    Nice to this implemented (specially on SUSE and Windows :D)

  5. Jay LaCroix says:

    Seems like a waste of effort to me. It would make more sense to release LO via Snap. The technology is there, you just have to use it.

    • …or, if you want it in a distribution-neutral format, AppImage, which, unlike Snap, does not need something to be installed beforehand, works on most popular distributions out-of-the-box, and is a true community effort not controlled by Canonical or Red Hat. Since an AppImage is a single file, zsnyc-based binary delta updates are very easy to do. It’s being worked on: http://libreoffice.soluzioniopen.com/

    • Other says:

      I’m sorry, is Snap used on Windows? No?
      Then stop being a killjoy you miserable troll.

  6. Pingback: Pengembang Benamkan Fitur Pembaruan Otomatis pada LibreOffice 6.0 untuk GNU/Linux

  7. Pingback: Pengembang Benamkan Fitur Pembaruan Otomatis pada LibreOffice 6.0 untuk GNU/Linux - Montoska

  8. Pingback: LibreOffice 6.0 on Linux enables automatic updates - Open Source For You

  9. Awesome work Markus =) looking forward to the Windows piece too of course!

  10. angrypenguin says:

    Amazing. I just waiting for it. For now my distro provided only old LibreOffice version and I can’t upgrade it to new. I must wait for new OS release :/ But LibreOffice provides also rpm package and I use this rpm to make new LO version on my Linux distro but still not have any updated. So I need manually checking if new release it available and again download rpm and install it manualled. So this new build with auto update is amazing for me. So I can download tar archive, unpack it and when release coming I can get updates. Like with Mozilla Firefox downloaded directly from Mozilla website. So now I waiting for nice GUI for update mechanism (like on firefox) and to adding this auto update to stable LibreOffice branch (fresh and still).

    So I want to thanks all developer for this feature 🙂

  11. Christian Pietzsch says:

    Really excited about this. Even though Linux makes it easy to get updates.
    Thank you for your hard work

  12. Pingback: Links 24/6/2017: GNOME Music Improves, FreeBSD 11.1 Beta 3 | Techrights

  13. Pingback: Links 24/6/2017: GNOME Music Improves, FreeBSD 11.1 Beta 3 ~ MCJ™

  14. Pingback: LibreOffice 6.0 to Automatically Update Itself on GNU/Linux, but There’s a Catch | SmartArena Post

  15. Pingback: LibreOffice terá atualizador automático independente do sistema operacional – eXtremeMods – Tecnologia

  16. Pingback: LibreOffice terá atualizador automático independente do sistema operacional - PortaldoSaber

  17. stragu says:

    This is very exciting! It is already great news for Linux users like me. But, looking forward: am I right to think that we will soon get to a Windows installation process similar to Chrome’s, where LO is installed in the user’s space and does not require admin rights?

    If that is the case, I believe the implications in adoption are very big: for example, at the uni where I work, it would allow everyone to install LO on their work computer without having to ask IT to do it for them.

  18. Pingback: Podcast Ubuntu Portugal S00E02 « Ubuntu Portugal

  19. Pingback: La Conférence LibreOffice 2017 aura lieu à Rome en Italie, pour LibreOffice 6.0 | QuebecOS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s