AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

Support latest Desktop Entry Specification (1.1)

Open tastytea opened this issue 7 years ago • 18 comments

I run: appimagetool-x86_64.AppImage "AppImage"

I get the error:

appimagetool, continuous build (commit d185526), build 1855 built on 2018-10-07 20:18:45 UTC
WARNING: appstreamcli command is missing, please install it if you want to use AppStream metadata
/home/tastytea/Projekte/whyblocked/build/AppImage/de.tastytea.Whyblocked.desktop: error: value "1.1" for key "Version" in group "Desktop Entry" is not a known version
/home/tastytea/Projekte/whyblocked/build/AppImage/de.tastytea.Whyblocked.desktop: warning: key "Keywords" in group "Desktop Entry" is a reserved key for KDE
ERROR: Desktop file contains errors. Please fix them. Please see
       https://standards.freedesktop.org/desktop-entry-spec/latest/
       for more information.

According to the specification that the error message points to, Version=1.1 is perfectly fine and Keywords is not reserved.

tastytea avatar Oct 20 '18 21:10 tastytea

Would you mind to share the Desktop file that is producing this error?

But you should know that desktop file validation is performed by means of the desktop-file-validate command. So please, first test your desktop file directly with the command in your build environment. If it passes the validation then this bug belongs to us. Otherwise, you will have to write to the desktop-file-validate developers.

azubieta avatar Oct 20 '18 21:10 azubieta

It validates with desktop-file-validate from desktop-file-utils-0.23.

Here is the file:

https://schlomp.space/tastytea/whyblocked/raw/branch/master/de.tastytea.Whyblocked.desktop

[Desktop Entry]
Type=Application
Version=1.1
Name=Whyblocked
Comment=Reminds you why you blocked someone
Comment[de]=Erinnert dich, warum du jemanden blockiertest
Icon=de.tastytea.Whyblocked
Exec=whyblocked-gui
Terminal=false
Categories=Utility;
Keywords=blocklist;social-network;
StartupNotify=true
StartupWMClass=Whyblocked

tastytea avatar Oct 20 '18 21:10 tastytea

@tastytea I guess we can build a more recent version of desktop-file-validate and ship that.

TheAssassin avatar Oct 20 '18 21:10 TheAssassin

We want the desktop files to validate on the oldest still-supported versions of Ubuntu LTS, which currently is 14.04. Because we want AppImages to be compatible with all still-supported LTS releases of Ubuntu. So we should use the desktop-file-validate from that version.

probonopd avatar Oct 21 '18 11:10 probonopd

I think Ubuntu 14.04 does not verify Version=1.1 yet. So we can't support that yet.

probonopd avatar Oct 21 '18 12:10 probonopd

That's a bug in the version shipped with Ubuntu 14.04. I'll get back to you once it's fixed.

https://bugs.launchpad.net/ubuntu/+source/desktop-file-utils/+bug/1799067

tastytea avatar Oct 21 '18 17:10 tastytea

@probonopd that doesn't really make sense. We don't build on trusty. So the version we bundle is most likely the one shipped with CentOS 6.

TheAssassin avatar Oct 21 '18 18:10 TheAssassin

@TheAssassin correct. I meant to say we should under no circumstance support a newer version of the desktop specification than the one that the oldest still-targeted OSes support.

probonopd avatar Oct 21 '18 18:10 probonopd

Why not? We're just linting the file, after all. And 99% of all AppImages don't target CentOS 6 any more (many don't even target trusty for instance), so why not allow their desktop files to pass linting?

TheAssassin avatar Oct 21 '18 18:10 TheAssassin

Because the desktop file, like all ingredients of the AppImage, should target the oldest still-supported distributions. I have not tested what happens when you confront a 1.0-supporting desktop with a 1.1 desktop file. It might work, it might break...

probonopd avatar Oct 22 '18 16:10 probonopd

@probonopd in case of desktop files, a desktop environment developer told me once they basically ignore the version number and get what they need, best-effort-like.

TheAssassin avatar Oct 22 '18 19:10 TheAssassin

Isn't it good practice to educate AppImage creators to use develop against and test with tools from the oldest still-supported distros to ensure the applications are compatible with all currently supported distributions? (It's also a philosophical thing.) Never depend on anything "new" until we can assume that everyone has it.

probonopd avatar Oct 23 '18 17:10 probonopd

Educate yes. Prevent them from doing otherwise if they need/choose to: no. A warning would be sufficient.

TheAssassin avatar Oct 23 '18 22:10 TheAssassin

Ubuntu is not going to fix desktop-file-utils in trusty, because they fix only major issues and security problems on trusty at this point.

I agree that tests should be done with tools from the oldest supported distro, but I would like an option to ignore linting errors.

tastytea avatar Oct 29 '18 08:10 tastytea

I have faced with the same problem using:

$ appimagetool --version
appimagetool, continuous build (commit df8b13c), build 2121 built on 2020-05-08 09:52:11 UTC

during build of AppImage files for Psi and Psi+ projects.

Error:

/path/to/psi-plus.desktop: error: value "1.1" for key "Version" in group "Desktop Entry" is not a known version
ERROR: Desktop file contains errors. Please fix them. Please see
       https://standards.freedesktop.org/desktop-entry-spec/1.0/n       for more information.

Desktop file: psi.desktop

Currently I added a workaround using sed in my build scripts. But it would be better to see this bug is fixed in upstream.

tehnick avatar Jun 08 '20 17:06 tehnick

That's a bug in the version shipped with Ubuntu 14.04. I'll get back to you once it's fixed. https://bugs.launchpad.net/ubuntu/+source/desktop-file-utils/+bug/1799067

This bug will never be fixed nor in Ubuntu 14.04, nor in Ubuntu 16.04.

tehnick avatar Jun 08 '20 17:06 tehnick

I agree that tests should be done with tools from the oldest supported distro, but I would like an option to ignore linting errors.

+1

tehnick avatar Jun 08 '20 17:06 tehnick

We can discuss using a newer version of desktop-file-validate than what xenial uses once xenial is no longer supported.

probonopd avatar Jun 14 '20 13:06 probonopd