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

vcs-browser URL type in metadata.xml #3243

Open
kfjahnke opened this issue Sep 6, 2023 · 8 comments
Open

vcs-browser URL type in metadata.xml #3243

kfjahnke opened this issue Sep 6, 2023 · 8 comments

Comments

@kfjahnke
Copy link
Contributor

kfjahnke commented Sep 6, 2023

freedesktop.org specifies the content of metadata.xml in this document. In the url/ part, the specification lists a URL type 'vcs-browser':

`vcs-browser

URLs of this type should point to a webpage on which the user can browse the sourcecode. `

I tried to include this file in my metadata.xml, but it failed the validation. Maybe it's a new addition to the list of URL types, and the validation code is not yet ready to accept it? Including it actually fails the validation, so maybe code is needed to ignore it, if it's unwanted.

@probonopd
Copy link
Member

Maybe it's a new addition to the list of URL types, and the validation code is not yet ready to accept it?

Most likely... these specs seems to be a moving target so that it's almost impossible to keep up. Can you find out in which version it was added to appstreamcli?

@kfjahnke
Copy link
Contributor Author

kfjahnke commented Sep 7, 2023

this post mentioned a 'recent' addition of the vcs-browser URL type 'a year ago'. And this one also complains about it - also 'a year ago'. So the new URL type seems to have been around for a while. I can't figure out the precise version when it was added, but it should have been more than a year ago, if that is any help to you.

@probonopd
Copy link
Member

Since the appstreamcli versions that came out a year ago won't run on the oldest still-supported LTS releases of distritbutions at this time, we can't use such new additions to the spec yet. Maybe revisit in ~3 years...

@kfjahnke kfjahnke mentioned this issue Sep 15, 2023
@kfjahnke
Copy link
Contributor Author

Re. ubpm: here we have a project also using this URL type. I think people handing in AppImages for inclusion in the catalog will rather follow the specification than figuring out that using this URL type makes the outdated appstreamcli version you use fail. What to do? Since the input is XML, one might filter it to throw out the offending element, which should not be too hard - probably easier than trying to mess with appstreamcli and build a version which ignores the element.

@kfjahnke
Copy link
Contributor Author

Filtering the XML: to specifically remove the url with type=vcs-browser, one might use xmlstarlet:
xmlstarlet ed -L -d "component/url[@type='vcs-browser']" some.xml (working in-place)
cat some.xml | xmlstarlet ed -d "component/url[@type='vcs-browser']" > filtered.xml (not working in-place)

@probonopd
Copy link
Member

Sooner or later we may drop support for AppStream due to it being a moving target.

@kfjahnke
Copy link
Contributor Author

Do you mean to drop appstreamcli to process/validate the metadata, or to use a different system of providing the metadata altogether? While it's used, prefiltering the XML is a viable option, and I've seen xmlstarlet used in your project, so it wouldn't add another dependency. For vcs-browser, it would avoid the pitfall that the exit code is the same for runs with errors as for runs with warnings (namely, 3), which is unfortunate and makes it more difficult to handle recent additions.

@probonopd
Copy link
Member

I mean that the AppStream format is not ideal for AppImage because it keeps changing over time. We need a format that will not change over time (only additions like new fields should be allowed, not changes in the existing fields). Ideally something in YAML that can be easily created from existing AppStream. But right now I don't have the time currently to think about this.

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

No branches or pull requests

2 participants