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
cockpit (type web-application) not considered for Debian #74
Comments
|
I also wonder about the warning itself. The AppStream spec does not forbid using a local icon for a web app. I'm not sure where Debian's meta-data generator lives, but at least to a large part it's just this project. |
|
There's quite a bit to unpack here... First, a "stock icon" doesn't mean that the icon has to be part of the default-set of defined names for XDG icon themes, it simply means "this icon can be found in any theme". So if you install an icon for Cockpit to <icon type="stock">org.cockpit_project.cockpit</icon>entry to you metainfo file, this problem will be fixed. Asgen doesn't allow local icons - even though they are technically valid - to push people in the direction of installing icons into the hicolor default theme directory, so people can provide multiple sizes. This actually raises an intriguing question though: Should the scope of a "stock" icon be limited to only stuff in the standard icon naming spec (here) and should we introduce a new type ("xdg"?) for the other icons, to be more clear? I just changed some code in GNOME Software which removed the (previously added) assumption that an AppStream "stock" icon would always be present, so there might be some confusion here. The counterargument is that any "xdg" icon type that would be added would essentially follow the same logic as a "stock" icon, so those would almost just be aliases, code-wise. @hughsie, what do you think? (Personally I am leaning more towards keeping things the way they are and clarifying the documentation text, but if there is more discussion needed here we should open a separate bug report against AppStream) As for the question "should appstream-generator allow local icons defined in the metainfo file?", I would say probably not, but if that's the case this should flow back into the specification. Asgen doing something unexpected and different from the spec is not acceptable. There's one more thing that is puzzling me: The Debian's generator lives here, at a proper CDN that's part of the project: https://appstream.debian.org/ (/me is proud how well-integrated AS is in Debian and how helpful the DSA were in the process - after I have them the YAML-version of AS, which in hindsight probably wasn't a good compromise ^^). You can find the raw hints output here: https://appstream.debian.org/hints/ |
|
@ximion: Thanks for your detailled reply! Moving the icon into /usr/share/icons/hicolor/AxB/apps/ sounds like a clean solution indeed. I wasn't aware of the /apps directory and just thought that this was reserved to the hicolor-icon-theme. On my (admittedly rather slim) system, I just have But indeed shows that lots of packages use that path.
That's correct. You install the package, enable the service, and the way to access it is https:// |
|
So do you think that fixing that icon error will make it appear in the Debian metadata? |
Yes - there is a slim chance that there are other issues that asgen didn't bother looking at since data generation already failed. But I don't think that's the case. To know with higher confidence, you can just run your file through The Btw, the spec doesn't explicitly allow a launchable=url tag for One problem with all of these components is that I think GNOME Software won't show any service, console-app and nowadays even webapp components, so depending on where you want this shown, this is an issue to consider. Btw, for creating the initial metadata, I made a webapp a while ago that you may find useful in future: Cheers, |
|
I tried to apply your suggestion: It doesn't seem to be about the name, if I change it to just "cockpit.png", it complains in the same way:
|
AppStream recommends using stock icons instead of "local" ones, so that the distro metadata generator can properly pick them up [1]. This breaks inclusion of cockpit's AppStream metadata into Debian [2]. This also has the nice side effect that the icons become themeable. [1] ximion/appstream-generator#74 [2] Error: web-app-without-icon: The component is a GUI web application, but it either has no icon set in its metainfo file, or we could not find a matching icon for this application. Warning: asv-metainfo-invalid-icon-type cockpit.appdata.xml:111 - local Metainfo files may only contain icons of type stock or remote, the set type is not allowed.
I did test that a few days ago (see original issue description), and at least in Fedora that web-application shows up. I suppose I could locally hack the appinfo files and see if it shows services. |
I think this is a bug in (I ran ascli on the template file and that produced a few errors because the file was incomplete, but icon-wise everything seemed fine) As for the webapps, you maybe don't have the latest GNOME Software yet: The GNOME design team AFAIR was very much against having services, console apps, etc. in there, and webapps were handled in a special way before that didn't run that well (webapp is definitely not the right component type for Cockpit...). Canonical uses GNOME Software for just about anything in a Snap package though and removed that restriction (which is kind of meh as well). |
Yes, that does work:
Indeed with For us it's and indeed that's not allowed by the spec, it only supports a systemd unit name. But that's not the point of cockpit, this isn't MySQL or timesyncd or similar. I suppose that's what threw me off back then :) That will take some time to adjust to, as we need to bring that into our CI containers and such, and see how to deal with RHEL. But if that's the designated successor, let's do that. The only nastiness is that the appstream package depends on appstream-data, which is huge, and unnecessary for this functionality.
I just downloaded today's F32 beta iso, and I can still see it, but maybe it's just not yet in 3.36.0 (even though that commit was 4 months ago..). Anyway, if it goes away from g-s, so be it, but at least I can use that to validate the changes to my xml. I changed it to type="service" (and also hacked the name, so that I can confirm that the xml change is taken into account); g-s still shows cockpit. In either case (web-application or service type), the "Launch" button is broken -- journal shows it's looking for a .desktop file of that name. But that's a g-s bug. So in summary:
Thanks for your great help @ximion! |
But
Both tools existed for a really long time, for historical reasons. Of course, personally I'm happy with people using AppStream (ascli) doesn't depends on any GUI/GDK stuff on purpose though, you may like that.
In Debian, when we still had a similar package, that issue was solved by having software centers depend on the -data package, since AppStream didn't really need it. Nowadays, we also only pull in icon data from the repository for AppStream if a software center depends on the right apt-config package: https://packages.debian.org/bullseye/apt-config-icons
Since this is Fedora, I would assume GNOME is up to date. Maybe I'm mistaken and this only affects stuff handled by the Epiphany plugin directly... (when in Purism's PureOS all webapps vanished, some people were upset...)
Indeed, I noticed that too on a few occasions (most notably WINE, which is a desktop-app without any launchable set)
Indeed, it's also what the Freedesktop specs recommend and the AppStream spec kind of expects people to know how GUI apps work, even though it is talking about Thanks for raising this issue, that is very helpful! |
I went through the AppStream hints of Debian's cockpit package recently, which shows some complaints:
Metainfo files may only contain icons of type
stockorremote, the set type is not allowed.Cockpit's AppStream data specifies
type="web-application"indeed. It's a bit weird as it gets delivered/installed as a proper distribution package, but you use it through a web browser. I. e. it's a "local web application".It also specifies
which is shipped by the "cockpit" package (rpm/deb). This seems correct to me, as there is no sensible other way to deliver the icon, except for putting it onto some web server (which is a privacy issue). It's not part of the usual stock icons, so I can't use that.
This doesn't seem to be a problem in Fedora. GNOME Software shows Cockpit just fine (including icon). There it gets processed into /usr/share/app-info/xmls/fedora.xml.gz as a locally cached icon:
and shipped in /usr/share/app-info/icons/fedora/64x64/cockpit.png (same for 128).
Debian has a different approach, it doesn't ship the AppStream metadata in a package (like Fedora's appstream-data), but as part of the package manager indexes: https://appstream.debian.org/data/bullseye/main/ . I don't see cockpit at all in Components-amd64.yml.xz and the icons-*.tar.gz is also missing cockpit.png. So supposedly the generation has skipped cockpit because of that error?
How can this be fixed?
Thank you!
The text was updated successfully, but these errors were encountered: