Improvements for `fdroid import`
- Auto-detect if it's a gradle build and add
gradle=yes
to Build - Try to find the used subdir with automagic :)
- Set UCM to RepoManifest if no tags are found in the repo.
- Find most common changelog files and add it to the metadata
- Find most common license files and check them against verified licenses (hashes?)
Edit:
On license auto-sensing:
Gitlab and github do some automatic detection for app licenses, which would be a nice thing for fdroidserver to handle as well. This would be useful for both, importing new apps and detecting license changes.
Expected workflow:
-
fdroidserver has a list of license texts, the corresponding SPDX license naming and a calculated hash value
-
fdroid import
andfdroid checkupdates
try to find COPYING and LICENSE files (and variants, like.txt
,.md
, lowercase etc.) and match its hash against its known values. -
Update the License: field of the metadata accordingly.
I don't want to rely completely on this, so we need to have an option to turn this off. Maybe have a second metadata field, e.g. License Check
(like Update Check), which could be set to Static
or we have a Auto License
field (like Auto Name), which gets always set, but is overwritten by License
field (if present). Lint could warn when those licenses do not match.