signing key fingerprint should be sole ID for repos in the database
In order to support mirroring and other use cases well, the signing key fingerprint should be the sole ID used to determine the uniqueness of a repo. The signed repo metadata will then include canonical and official mirror URLs. The repo metadata will also still be trusted no matter where it comes from, as long as it has a valid signature from a trusted key. This then means that people can carry local mirrors, then when users add that local mirror to their F-Droid, it will automatically know the canonical and official mirror URLs since they are included in the signed metadata.
Once this in place, we have a lot of flexibility in mirroring. For example, we could have an "F-Droid Mirror" app that just makes it easy to mirror repos while keeping the original metadata. The mirror app can then advertise itself on local wifi via Bonjour, then any user who has opted into that mirror and already trusts the repo signing key would automatically receive updates from that mirror when its reachable.
Some areas that we'll need to think about changes:
- database representations of repos
- URL representation in UI, e.g.
ManageReposActivity
andRepoDetailsActivity
- flow of adding a new repo
Some user stories for this:
-
José has an Android phone, but there is no 3G Internet in his region. He can, however, get on WiFi at his school, or when he walks by a local hotel or café. He uses these occasions to download new apps and upgrade the ones he has. Once he gets to school, he wants to share these with all of his friends.
-
A human rights organization runs trainings in places where the internet is slow, expensive, and unreliable. In their trainings, they use apps, videos, and ebooks on the mobile devices. A trainer sets up an app store that includes all the needed apps, videos and publications. The trainees connect to the trainer's LibraryBox which is a mirror of the organizations official repo. After the trainings, the trainees continue to get updates via the internet since they are already setup for the official repo, and the official repo includes official mirrors.
ping @pserwylo @crwinfrey @n8fr8