flathub / com.slack.Slack

https://flathub.org/apps/details/com.slack.Slack
36 stars 36 forks source link

Use an alternative data-source as defined by main project #132

Closed Eonfge closed 3 years ago

Eonfge commented 3 years ago

@barthalion Hey, after this afternoon's incident, I've looked into the source-url and found a possibly better source: This is the one that they directly link on their website. I'm not sure what the impact will be if we change this in the long run, but at this time the files are identical so that's good.

As for the x-data-checker, I hope it works because webpage-scraping is always hit-and-miss.

flathubbot commented 3 years ago

Started test build 52159

flathubbot commented 3 years ago

Build 52159 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50160/com.slack.Slack.flatpakref
barthalion commented 3 years ago

I haven't tried it with f-e-d-c directly but I can't see anything matching that regexp in the site source.

johanfleury commented 3 years ago

Can confirm:

$ curl -s https://slack.com/intl/en-nl/downloads/instructions/ubuntu | grep Version
$
$ curl -s https://slack.com/intl/en-nl/downloads/instructions/ubuntu | egrep -o 'https://downloads.slack-edge.com/linux_releases/slack-desktop-([0-9.]+)-amd64.deb'
https://downloads.slack-edge.com/linux_releases/slack-desktop-4.17.0-amd64.deb
$
Eonfge commented 3 years ago

Can confirm:

$ curl -s https://slack.com/intl/en-nl/downloads/instructions/ubuntu | grep Version
$
$ curl -s https://slack.com/intl/en-nl/downloads/instructions/ubuntu | egrep -o 'https://downloads.slack-edge.com/linux_releases/slack-desktop-([0-9.]+)-amd64.deb'
https://downloads.slack-edge.com/linux_releases/slack-desktop-4.17.0-amd64.deb
$

Could you tell me what to change... I'm not so familiar with this regex-trickery in the x-data-checker

johanfleury commented 3 years ago

I’m not an expert on how flatpak-external-data-checker works, but this seems to work:

"x-checker-data": {
    "type": "html",
    "url": "https://slack.com/intl/en-nl/downloads/instructions/ubuntu",
    "version-pattern": "https://downloads.slack-edge.com/linux_releases/slack-desktop-([\\d\\.]+)-amd64.deb",
    "url-pattern": "(https://downloads.slack-edge.com/linux_releases/slack-desktop-[\\d\\.]+-amd64.deb)"
}
$ python3 flatpak-external-data-checker --edit-only ../com.slack.Slack/com.slack.Slack.json
+ 2021-06-30 14:29:19,356    INFO src.checker: Checking 2 external data items
+ 2021-06-30 14:29:19,356    INFO src.checker: Started check [1/2] slack.deb (from com.slack.Slack.json)
+ 2021-06-30 14:29:19,359    INFO src.checker: Started check [2/2] pipewire.git (from com.slack.Slack.json)
+ 2021-06-30 14:29:19,800    INFO src.checker: Finished check [1/2] pipewire.git (from com.slack.Slack.json)
+ 2021-06-30 14:29:22,699    INFO src.lib.externaldata: Source slack.deb: got new version 4.17.0
+ 2021-06-30 14:29:22,699    INFO src.checker: Finished check [2/2] slack.deb (from com.slack.Slack.json)
CHANGE SOON: slack.deb
 Has a new version:
  URL:       https://downloads.slack-edge.com/linux_releases/slack-desktop-4.17.0-amd64.deb
  SHA256:    b1e7123f9e51d292b647fecd42236f2de3b3f863c631e8278d47e08b8aae8c1d
  Size:      60979198
  Version:   4.17.0
  Timestamp: 2021-06-02 16:39:13

+ 2021-06-30 14:29:22,700    INFO src.checker: Updating /home/jfleury/com.slack.Slack/com.slack.Slack.json
+ 2021-06-30 14:29:22,700    INFO src.checker: Preparing to update appdata /home/jfleury/com.slack.Slack/com.slack.Slack.appdata.xml
+ 2021-06-30 14:29:22,701 WARNING src.checker: Guessed upstream source: pipewire.git
flathubbot commented 3 years ago

Started test build 52260

flathubbot commented 3 years ago

Build 52260 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50258/com.slack.Slack.flatpakref