Support latest Desktop Entry Specification (1.1)
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.
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.
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 I guess we can build a more recent version of desktop-file-validate and ship that.
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.
I think Ubuntu 14.04 does not verify Version=1.1 yet. So we can't support that yet.
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
@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 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.
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?
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 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.
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.
Educate yes. Prevent them from doing otherwise if they need/choose to: no. A warning would be sufficient.
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.
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.
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.
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
We can discuss using a newer version of desktop-file-validate than what xenial uses once xenial is no longer supported.