Bug 161759 - If I installed LO using DEBs, the page at the update URL should also offer me DEBs
Summary: If I installed LO using DEBs, the page at the update URL should also offer me...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Updates
  Show dependency treegraph
 
Reported: 2024-06-24 09:48 UTC by Eyal Rozenberg
Modified: 2024-07-28 15:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-06-24 09:48:13 UTC
I've installed LibreOffice 24.2.3.2 on my machine using DEB files. Now that an update is available, I click the reddish "two arrows in circle" icon at the top, and get to a dialog. When I press "Download...", I'm taken to a web page:

https://www.libreoffice.org/download/download-libreoffice/

but the default there is to offer me RPMs for Linux. I should be sent to somewhere which will offer me DEBs instead.
Comment 1 Buovjaga 2024-06-24 11:22:19 UTC
In concrete terms, you want the URL to contain parameters that would then be interpreted by JavaScript on the website and offer an appropriate package (considering the upcoming website doesn't use PHP).
Comment 2 Eyal Rozenberg 2024-06-24 12:07:33 UTC
(In reply to Buovjaga from comment #1)
> In concrete terms, you want the URL to contain parameters that would then be
> interpreted by JavaScript on the website and offer an appropriate package
> (considering the upcoming website doesn't use PHP).

That is indeed the only way I can think off... it could be a different document address, or some GET parameters.
Comment 3 Stéphane Guillou (stragu) 2024-07-10 11:32:09 UTC
Testing on Ubuntu 22.04, Firefox gives me the deb packages pre-selected, while Chromium picks the RPM. Not sure why.
The URL is https://www.libreoffice.org/download/download/?lang=en-US&version=24.2.4

We can already send to a specific version and package type with e.g. https://www.libreoffice.org/download/download-libreoffice/?type=deb-x86_64&version=24.2.4

So we would only need to change something on LO's side, not the website (current one, at least).

But can LO already tell if it is installed as RPM or DEB?
And would the availability of this info depend on the setting Tools > Options > LibreOffice > Online Update > User Agent > Send OS version and basic hardware information?
Comment 4 Stéphane Guillou (stragu) 2024-07-10 12:17:30 UTC
As Noel said on IRC:

"it is possible, but might be quite a bit of work, hard to know up front"

Let's set to New, I agree that it would be helpful, although low in priority.
Comment 5 Eyal Rozenberg 2024-07-10 22:23:56 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> So we would only need to change something on LO's side, not the website
> (current one, at least).

Great :-)

> But can LO already tell if it is installed as RPM or DEB?

Of course! Bundle RPMs from a build/set-of-files which, when run uses the RPM URL, and bundle DEBs from a build/set-of-files which, when run, uses the DEB URL.

Now, that can mean an actual difference in source code (if we hard code the URL somehow), or it could be some default preferences file, or other configuration file which we could have differ, and then we'd need to read the URL from there (or perhaps just the kind of package from there?)

> And would the availability of this info depend on the setting Tools >
> Options > LibreOffice > Online Update > User Agent > Send OS version and
> basic hardware information?

Not exactly sure what you're asking. Availability to whom?

Anyway, if the URL used is not OS-specific, then the site can't even know whether you need an MSI/EXE Windows installer or not. But again, I may be misunderstanding here.
Comment 6 Buovjaga 2024-07-28 15:20:54 UTC
The unreleased new website shows both RPM and DEB download buttons on the download page to simplify things.

I just added support for URL parameters for the OS and architecture: https://git.libreoffice.org/infra/libreofficeorg/+/c05e87ce232056aec587b47ae98ed41ad46d722a

So now we have a way to guarantee the displayed buttons are what they should be.