increase integration into Freedesktop.org compliant systems #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this is to make JFileSync3 easier to package or otherwise distribute and install on Freedesktop.org compliant systems. Relocatability, following the data directory layout, and a valid component description in the AppStream format are common requirements amongst both package-based, and container-based distribution channels.
JFileSync3 is not relocatable, not because of requirements of the JAR itself, or its wrapping shell script, but because the desktop file hard-codes a path to the shell script, and to the icon. The Freedesktop.org data directory layout allows for relative paths in the desktop entry file on Freedesktop.org conforming systems, and thus makes it relocatable.This change to the desktop entry makes it a requirement to have the usedbindirectory in the$PATHand thesharedirectory in$XDG_DATA_DIRS. Making it relocatable, and not having this requirement, are mutually exclusive, without a hack in the desktop entry such as using/bin/sh -cwithwhich JFileSync3command substitution and defaulting to the current hard-coded location. If desired, in order to retain compatibility with current zip archives, it could either contain two desktop entries, or there could be a second distZip flavour.The desktop entry specification recommends “a reversed DNS domain name controlled by the author of the application”, with the AppStream specification making this a requirement. Normally, this would match the internally used ID. However, JFileSync3 inherited JFileSync's
jfsnot following Java's naming convention. As such, hereio.github.mgoellnitz.JFileSync3is used as it is guaranteed to be a valid ID through existence of this repo.These changes only apply to the file structure inside the
xdgsubdirectory, and thus hopefully only apply to those Freedesktop.org conforming systems. However, this change was not tested on other systems.This leaves open questions, task, and decisions to be made:
$XDG_DATA_DIRSand$PATHor document new requirement?<update_contact/>for distros to use.<release/>s can have<description/>s. Should they here? If so, how best to integrate it into JFileSync3's release workflow?Relevant Freedesktop.org specifications: