Skip to content

builder-manifest: Run appstream-compose with no-partial-urls argument #652

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

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

Conversation

bbhtt
Copy link
Contributor

@bbhtt bbhtt commented Aug 6, 2025

See commits

Alternative to #576, closes #576

We can optionally pick up the meson/autotools bits from there, just to signal packagers that we ideally want >= 0.16.3 but then we have to bump CI or turn them into warnings.

@bbhtt bbhtt force-pushed the bbhtt/as-no-part-urls branch 2 times, most recently from 8aa56e5 to 40a7146 Compare August 6, 2025 03:04
bbhtt added 2 commits August 6, 2025 08:55
This could've been done with the libappstream API but since
flatpak-builder has until now avoided linking to it, we continue the
theme. It also matches the pattern in flatpak_version_check()

The CLI output format has been stable for 8+ years, see [1] [2]. We
prefer the library version incase of a mismatch as ultimately compose
will run with the features offered by the library

[1]: ximion/appstream@d83174a
[2]: https://github.com/ximion/appstream/blob/56ecd0067495213a64f3a490cbbc030fcfd5b8f1/tools/appstreamcli.c#L1594-L1604
When 0.16.3 is available

This is an alternative to flatpak#576

We check at runtime instead of build-time and downgrade instead of
erroring. Checking at build time is insufficient as there is no
guarantee flatpak-builder is run with the same appstream version it
was compiled with.

Ideally we want to compose with `--no-partial-urls` so a warning is
printed if it is not found.

`--no-partial-urls` makes the mirrored URLs in appstream catalogue
data the full URL. So if
`--mirror-screenshot-url=https://example.org/media` and the metainfo
has
`<screenshot><image>https://github.com/foobar.png</image></screenshot>`

After composing with `--no-partial-urls`, it will become
<screenshot><image>https://example.org/media/foobar.png</image></screenshot>`
instead of `/media/foobar.png`.

This is needed by Flathub and generally should be a standard
requirement for any software store (to have a full working URL
instead of a partial whatever-that-is).
@bbhtt bbhtt force-pushed the bbhtt/as-no-part-urls branch from 40a7146 to fba37bf Compare August 6, 2025 03:25
@bbhtt
Copy link
Contributor Author

bbhtt commented Aug 6, 2025

For optional testability, I need the last commit of #649 a41f2e4 merged.

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.

1 participant