flathub / eu.betterbird.Betterbird

https://flathub.org/apps/details/eu.betterbird.Betterbird
9 stars 1 forks source link

Version check on start page wrongly reports out-of-date #17

Closed mfschumann closed 1 year ago

mfschumann commented 1 year ago

The version check on the start page displayed directly after starting Betterbird wrongly reports an out-of-date version for the flatpak version of Betterbird. I think for the flatpak build we should either

@Betterbird What do you think?

Output for Flatpak of 102.2.2-bb16: image

Output for 102.2.2-bb16 downloaded from betterbird.eu: image

Betterbird commented 1 year ago

That is very surprising. The Flatpak build is the one you built from source? How is it possible that it was build on 6th September when our version was built on the 7th of September? As noted in the versions file: https://www.betterbird.eu/start/versions.txt 2022 09 07 22 26 49 is the timestamp of the Windows built, our Mac and Linux build were done on 22:40 and 22:56 respectively and are therefore later and don't trigger the message.

The label was applied to this revision https://github.com/Betterbird/thunderbird-patches/commit/497c37a256caa8271643185dd0e61658e4033a48 after 22:48 on 7th September.

@dbonner suggested in this aarch64 build instructions to set the time of the build machine to Madrid or Berlin to avoid this sort of issue.

All that said, the update check is in https://github.com/Betterbird/thunderbird-patches/blob/main/102/misc/03-misc-update-check.patch, amongst other things, so we'd have to refactor this so you can not include the update check.

In any case, if you do your builds after the label was applied with a machine set to the correct time zone, the issue shouldn't arise.

mfschumann commented 1 year ago

Thanks for the explanation.

Yes, the issue occurs with the version built from source on the flathub infrastructure.

I think the cause for the issue is the following: The flatpak manifest taken from org.mozilla.Thunderbird that I was using for calling the build commands sets MOZ_BUILD_DATE to the date from a file called sourcestamp.txt. I'm guessing that is the date at which the source archive was packed. That is of course always earlier than you have the chance to build Betterbird from the source. Commit https://github.com/flathub/eu.betterbird.Betterbird/commit/77957d6c8691b66c72bc7e1b41518939f110c447 changes this behavior to set MOZ_BUILD_DATE to the date the flatpak is built (with timezone Europe/Berlin as you suggested).

All in all, I think no change should be necessary on your side.

I will close this issue after confirming that the latest build works fine.

Betterbird commented 1 year ago

Thanks for that. BTW, I was on the completely wrong boat. Yes, BB does a version check when it starts, every seven days it polls the versions.txt file I referenced. If this contains a later date, it pops the about box.

However, you were referring ton the "in product" start page which is https://www.betterbird.eu/start/index.php

That PHP file isn't published, but I can tell you that BB accesses the start page with the build ID (see below) and the PHP script reads versions.txt (which handily lives in the same directory on the server) and compares the build ID it received as parameter with the one in the file.

You can see the parameterisation in the BB settings: https://www.betterbird.eu/start?locale=de&version=%VERSION%&channel=%CHANNEL%&os=%OS%&buildid=%APPBUILDID%

mfschumann commented 1 year ago

The version check after https://github.com/flathub/eu.betterbird.Betterbird/commit/77957d6c8691b66c72bc7e1b41518939f110c447 shows the correct build date. Closing this issue.