Skip to content

Conversation

@bbhtt
Copy link
Contributor

@bbhtt bbhtt commented Sep 8, 2025

Subject to API stability

1.5.0 unstable material.

This does not compile, as the asc-fonts private header is missing from appstream installation. The appstream-compose header needs to be patched right now to get it building Solved by stub header.

This adds a stub asc-font header to allow compiling with older
appstream. We don't want to bump the minimum too much as that makes it
impossible to package in LTS distros.
@bbhtt bbhtt force-pushed the bbhtt/appstream-api branch from 1ea21f9 to f9cc8fb Compare September 8, 2025 08:09
This allows all `<custom>` tags from metainfo files to reach
catalogue data. Custom tags are used by Flathub to store verification
and build information and often downstream vendors who use Flathub's
catalogue for their own app store want custom tags to identify or
highlight their own apps. For example cosmic using Flathub catalogue
data to highlight cosmic apps on cosmic store app etc.

Allowing individual custom tags one by one is annoying and this is what
libappstream-glib did before the port in 1.3.4. So this brings back
the old as-glib behaviour that was lost in >=1.3.4
Screencasts are generally unwanted in catalogue to as they are more
expensive to download, store in ref and serve. Also no appstore
currently supports showing them.

Appstream by default produces partial media URLs in catalogue after
mirroring but libappstream-glib did not and generally the full URL is
required by Flathub at least.
@bbhtt bbhtt force-pushed the bbhtt/appstream-api branch from f9cc8fb to 6fcd407 Compare September 8, 2025 08:29
@bbhtt
Copy link
Contributor Author

bbhtt commented Sep 8, 2025

Which version fixed this?

 In file included from /usr/include/appstream-compose/appstream-compose.h:32,
                 from ../src/builder-manifest.c:34:
/usr/include/appstream-compose/asc-globals.h:65:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
   65 | gchar                           **asc_globals_get_hint_tags ();
      | ^~~~~
cc1: some warnings being treated as errors

@bbhtt bbhtt marked this pull request as ready for review September 8, 2025 08:51
@bbhtt
Copy link
Contributor Author

bbhtt commented Sep 8, 2025

Also, would be nice to know around which version the API is expected to be stable. If I have to require a newer version anyway for that, I can drop the stub header, the AS_VERSION_CHECK, the bug above and other tiny things to simplify things for me.

@ximion
Copy link
Contributor

ximion commented Sep 8, 2025

Which version fixed this?

I have no idea. At least since 0.16.2, from 2y ago. This API has been used via introspection bindings from Python and D for the longest time.

Also, would be nice to know around which version the API is expected to be stable.

I don't know yet, there have been some changes very recently... The earliest possible version where I'd drop the unstable label is 1.1.1, then it had at least a little bit of time to be tested with the new appstream-generator.

That said, all of the API you are using is unlikely to change. The entirety of AscCompose is almost guaranteed to not change, it hasn't changed for years now.

#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif

#define I_KNOW_THE_APPSTREAM_COMPOSE_API_IS_SUBJECT_TO_CHANGE
Copy link
Contributor

Choose a reason for hiding this comment

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

this is gonna bite us in the future. :-/

Copy link
Contributor Author

@bbhtt bbhtt Sep 9, 2025

Choose a reason for hiding this comment

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

it's supposed to get "officially" stable at some point in the future then i can drop all these #664 (comment)

@bbhtt bbhtt added this to the 1.5.0 milestone Sep 9, 2025
@bbhtt
Copy link
Contributor Author

bbhtt commented Sep 18, 2025

Looks like appstream 1.1.0 switched libyaml with libfyaml (I've never heard of the latter). I guess this means >=1.1.0 will not reach Ubuntu 24.04?

@ximion
Copy link
Contributor

ximion commented Sep 18, 2025

Ubuntu wouldn't update to new major releases of basically anything anway, AFAIK it never updated an AppStream version after release.

The new release is rather trivial to backport though, libfyaml is available everywhere, also on Ubuntu 24.04.

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.

4 participants