Skip to content
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

Add flatpak build manifest and necessary extra data #1

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fpiesche
Copy link

@fpiesche fpiesche commented Nov 8, 2024

There's some TODOs here - feedback on these would be good! Other than that, this should be fairly directly in a shape where it's submissible to Flathub :)

@ngoquang2708
Copy link

ngoquang2708 commented Nov 8, 2024

Missing this shadps4-emu/shadPS4#1474 (comment).

@ngoquang2708
Copy link

How do we handle release/nightly update channels?

@fpiesche
Copy link
Author

fpiesche commented Nov 8, 2024

How do we handle release/nightly update channels?

Flathub itself is mostly intended for stable releases, and this manifest is geared around that (cf. the x-checker-data segments looking for tagged releases in the shadps4 git repo).

Flathub does have a beta channel that could be used for dev builds; the way this is handled is by adding a beta branch to the flathub/[app id] repo that's created once the project is submitted; the manifest in that channel will be built and published to the public Flathub beta repository.

@ngoquang2708
Copy link

published to the public Flathub beta repository.

So if user want to use the beta channel they have to add the Flathub beta repo manually?

@fpiesche
Copy link
Author

fpiesche commented Nov 8, 2024

published to the public Flathub beta repository.

So if user want to use the beta channel they have to add the Flathub beta repo manually?

Yup, and install from the beta repo specifically either using the relevant control in their graphical package manager, or via flatpak install flathub-beta net.shadps4.shadps4.

<project_license translate="no">GPL-2.0</project_license>
<launchable type="desktop-id" translate="no">net.shadps4.shadps4.desktop</launchable>
<url type="homepage" translate="no">https://shadps4.net/</url>
<icon type="remote" width="256" height="256" translate="no">https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/src/images/net.shadps4.shadps4.svg</icon>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid any frictions that block this PR from getting merged, I think you should update external links to point back to GH or preferably to official website. Then when everything is sorted out. You can make another PR to update for these links.

Copy link
Author

@fpiesche fpiesche Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jsdelivr links are just CDN mirrors for Github; jsdelivr is a free CDN for open-source projects backed by a number of the major commercial orgs in the CDN space - so any changes to these files in the github repository will be automatically reflected in the jsdelivr CDN cache.

GitHub notably has a very short cache expiry header on its "raw" file links, so end-user browser caching is much less effective than on a regular CDN or even a static web server; additionally github's raw files are served with wrong content-type headers for various file types, which can cause browser compatibility issues.

jsdelivr is just a thin layer that, without requiring any explicit uploads or configuration, can just wrap around links to files on a number of supported open-source hosting sites (eg github, npm, wordpress etc) with a simple change to the URL and will mirror them to a CDN built on a number of different providers' infrastructure and forward the requests there.

# don't include submodules, which shadps4 depends on (in the externals directory)
- type: git
url: https://github.com/shadps4-emu/shadPS4
tag: v.0.4.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this work with the releases xml?

Copy link
Author

@fpiesche fpiesche Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't interact at all - the releases.xml is a manually maintained file and used mostly for information. For example, Flathub uses it to generate the "what's new in [version]" segment on its web listings for apps. As Flathub's main channel is intended for stable releases, their submission guidelines request that builds use release versions of each app.

The tag specified here is simply the git tag to be checked out on the repository after it's checked out, ie. the version of the code to be built - combined with the x-checker-data spec monitoring for new tags in the repository here, whenever a new tag matching the tag-pattern in the x-checker-data spec is pushed to this repository, Flathub's infra will pick this up and automatically create a PR in the flathub/net.shadps4.shadps4 repository to update the manifest to this new tag and kick off a test build. As long as new shadps4 releases are tagged in the repository with a tag matching the pattern, the Flathub build will only require merging an automatically-created PR to roll the update out there.

As for the releases.xml, I'm working on (but haven't finished) a GitHub Action that can be run when a new GitHub release is created to plug the information from the GH release into the .releases.xml (or the metainfo.xml if required) and update the release tag to a new commit with the updated file. Once I've finished and tested this I'll be happy to PR a workflow to automatically maintain the releases.xml file :)

@fpiesche
Copy link
Author

fpiesche commented Nov 9, 2024

The 6.8 KDE runtime was rebuilt on Friday so should now have libfmt:

KDE Application Platform - Shared libraries used by KDE applications

          ID: org.kde.Platform
         Ref: runtime/org.kde.Platform/x86_64/6.8
        Arch: x86_64
      Branch: 6.8
     License: GPL-2.0+
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 1.0 GB

      Commit: a8f6c0c5ae504721f64ef55689e0ffb603b2c65a161edf2d59b7fa6433be8687
      Parent: 247722ce3a44978223909cc2f448ccca48efed9c8e73b56d98e6b12b9022e7ee
     Subject: build of org.kde.Sdk, Fri Nov  8 02:05:06 UTC 2024 (d09f5c1159e9d3c387ed5ebc9591dcb612ae5ac9)
        Date: 2024-11-08 10:37:05 +0000

sdk: org.kde.Sdk
command: shadps4

# TODO: vvvvv These can go away once shadPS4 PRs 1494 and 1495 are merged vvvvv
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be updated. im assuming the icon can be removed from this PR as well?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v.0.4.0 doesn't have these icons yet :(

@ngoquang2708
Copy link

A bit nitpick but manifest file extension should be in full form yaml.

# don't include submodules, which shadps4 depends on (in the externals directory)
- type: git
url: https://github.com/shadps4-emu/shadPS4
tag: v.0.4.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should follow RPCS3 and use main branch here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants