flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
141 stars 93 forks source link

builder-manifest: run appstream compose with --no-partial-urls #576

Open hfiguiere opened 11 months ago

hfiguiere commented 11 months ago

Only when mirroring. This is to be compatible with existing flatpak deployment and appstream-glib

See https://github.com/ximion/appstream/issues/505

Should fix https://github.com/flatpak/flatpak-builder/issues/573

This can be tested on flathub with https://github.com/flathub/org.flatpak.Builder/pull/196

bbhtt commented 11 months ago

This requires at least appstreamcli>=0.16.3 in meson.build.

I think it is fine, partials URLs when a baseurl is supplied doesn't make sense. The spec says icon/image should start with http(s)

Should fix https://github.com/flatpak/flatpak-builder/issues/573

I don't think this fixes that issue? --no-partial-urls does not change the location of screenshots, they are still in share/app-info/media. The expectation there is, builddir/screenshots (it's not that flatpak-builder does not create screenshot dir, but it changed the previous location)

barthalion commented 11 months ago

This fixes a problem we would experience in the Flathub backend, and --no-partial-urls was added per our request.

TingPing commented 10 months ago

This requires at least appstreamcli>=0.16.3 in meson.build.

I think this is all that's needed to land this.

hfiguiere commented 10 months ago

../meson.build:44:15: ERROR: Invalid version of program, need 'appstreamcli' ['>= 0.16.3'] found '0.16.1'.

I guess building on fedora 38 is a no go.

hfiguiere commented 10 months ago

Also it's a runtime dependency while this is a meson (build-time) check.

hfiguiere commented 10 months ago

done, but I don't think it will build in CI

hfiguiere commented 10 months ago

On CI:

Program appstreamcli found: NO found 0.15.2 but need: '>= 0.16.3' (/usr/bin/appstreamcli)
TingPing commented 10 months ago

Ubuntu 23.10 has 0.16.2... how annoying.

GeorgesStavracas commented 9 months ago

Ubuntu folks clarified that it's unlikely they'll ever update the appstream package, so either the Ubuntu workflows are dropped, or updated to a non-LTS version

hfiguiere commented 9 months ago

I'll reset the checks in meson and check at runtime in some way. Using CLI as an API...

barthalion commented 9 months ago

And this, in turn, explodes with this:

Unable to set icon policy: 64x64@1 icons were not selected for being cached, which is not permitted.

so I'm dropping it after all

hfiguiere commented 9 months ago

The approach here would be to degrade if the version of appstream is too low. But the check is a bit too hackish.

Checking in meson.build is kind of irrelevant since it's build time.