-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Make metainfo and .desktop files spec compliant #5892
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some questions to this commit.
I also just noticed #5280, which makes similar changes. Could you have a look and see if there's anything in there that is missing in this PR?
<!-- See https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html --> | ||
<component type="desktop-application"> | ||
<id>cc.arduino.arduinoide.desktop</id> | ||
<metadata_license>FSFAP</metadata_license> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the FSFAP identifier predefined by the appstream specification? If not, I'm not sure if it is well-known enough to use the acronym here. Also, any pressing reason to change the license? The FSFAP looks easier to integrate with other licenses that CC-BY-SA, though.
Changing the license does involve consent of all contributors. In this case, that is @mavit (who originally wrote this file in #1572) and Federico, but I'm assuming his copyright is with Arduino, so that's not an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is well-defined and recommended for these texts, as it does not require a large license text to be shipped with the metainfo file and because it is very short. See https://spdx.org/licenses/FSFAP.html
In any case, I did not intend to change the license, that was by accident - CC-BY-SA-3.0 is totally fine and I changed it back in the new revision.
<updatecontact>[email protected]</updatecontact> | ||
</application> | ||
|
||
<update_contact>[email protected]</update_contact> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should update this to an arduino.cc address (developers mailing list perhaps)? @cmaglie?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I no-longer maintain the Fedora package of Arduino, so certainly wouldn't object to this.
if [ -f "${HOME}/.local/share/applications/arduino-arduinoide.desktop" ]; then | ||
rm "${HOME}/.local/share/applications/arduino-arduinoide.desktop" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a comment stating this was the name used in older scripts (perhaps add an OLD_RESOURCE_NAME var?)
@@ -6,7 +6,7 @@ | |||
# If called with the "-u" option, it will undo the changes. | |||
|
|||
# Resource name to use (including vendor prefix) | |||
RESOURCE_NAME=arduino-arduinoide | |||
RESOURCE_NAME=cc.arduino.arduinoide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the .desktop
suffix intentionally missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it gets added later in the script (so the ID can be used by multiple things)
I updated the patch with all changes from @mavit included. |
Merged, thanks! |
This resolves bug #5890
The AppStream/Metainfo spec has changed a bit, and the file shipped with Arduino doesn't work at all currently, since it was apparently written against a draft version of the initial spec which was never fully supported (congrats, looks like you were one of the earliest adopters!).
This patch updates the metainfo file to match the current version of the specification as found at https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html
Additionally, I also updated the .desktop file to follow the reverse-DNS scheme. This is a new requirement of the desktop-entry specification for modern applications to be D-Bus activatable and work well on Wayland.
The AppStream spec highly recommends using that scheme too, so I adapted it to be used in the .desktop and metainfo files.
You can read more about this at https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
If you have any questions, let me know!
You can validate the current metadata using
appstreamcli validate <metainfofile>
.NOTE: I haven't tested if the script works yet (but it should).
If the .desktop filename change is not wanted, we can also go without it - just let me know and I'll adapt the patch.