Commit Graph

16 Commits

Author SHA1 Message Date
Phaedrus Leeds
53a0b528bf Add DeploySideloadCollectionID flatpakref/flatpakrepo key
When Flatpak's P2P updates support was replaced with the "sideloading"
implementation in 1.7.1, a new server side repo config key
"deploy-sideload-collection-id" was added which gets set when you pass
"--deploy-sideload-collection-id" to "flatpak build-update-repo", and
has the effect of setting "xa.deploy-collection-id" in the repo metadata
that is pulled by clients, which itself causes a collection id to be set
on the remote for clients using Flatpak >= 1.7.1.

This commit adds an analogous key in flatpakref and flatpakrepo files,
so the collection id can be set when the remote is configured, rather
than later on when the repo metadata is pulled and acted upon. As before
with DeployCollectionID, it has no difference in function compared to
DeployCollectionID or CollectionID and the only difference is which
Flatpak versions are affected.

It would've been better if this were added in 1.7.1 when the sideload
support was added, but alas here we are.

(Also update the docs and unit tests)
2022-08-16 10:37:36 +02:00
Phaedrus Leeds
b098191252 Fix capitalization of "false" in flatpakref keyfiles
g_key_file_get_boolean() only accepts lower case "true" and "false", so
correct some instances of "False" in key files. This makes no functional
difference as long as the error pointer isn't checked since
g_key_file_get_boolean() also returns false when it can't parse the
value as a boolean. But it still seems good to be correct, and someone
could interpret the existence of "IsRuntime=False" as implying that
"IsRuntime=True" will work, which it doesn't.
2021-10-15 00:38:15 +01:00
Matthew Leeds
845a877ce1 Prioritize an app's origin for its runtime
Currently when searching for a remote to provide the runtime for an app,
we search remotes in priority order. This commit makes it so we search
the remote providing the app before others with the same priority, and
otherwise still search in priority order.  This means for the common
case where every remote has the default priority of 1, the app's origin
will have the first chance to provide the runtime. This behavior seems
logical, but the impetus for this change was also to keep a unit test
passing in eos-updater[1] after a port to FlatpakTransaction.

Originally the eos-updater unit test was written to prioritize the
origin remote regardless of the priorities on any other remote, but
during code review it was decided to let higher priority remotes stay
above the app's origin.

In practice it's usually true that only one remote provides a runtime
and priorities aren't set at all, so this is an edge case that probably
doesn't come up much.

A unit test and documentation updates are included.

[1] eede0a8b9c/tests/test-update-install-flatpaks.c (L1919)
2020-08-17 09:21:30 +02:00
Jan Tojnar
eb57c7c07b Unify DocBook DTDs
Previously, there were three different DTDs used. Let's switch to a single one.

We will go with 4.5, since it is latest version that does not have any backwards incompatible changes.
2020-08-10 15:14:38 +02:00
Matthew Leeds
d3b7bfa92d doc: Fix capitalization of gedit
It's gedit not GEdit[1][2].

[1] https://wiki.gnome.org/Apps/Gedit
[2] https://flathub.org/apps/details/org.gnome.gedit

Closes: #2788
Approved by: matthiasclasen
2019-03-30 13:02:10 +00:00
Matthew Leeds
12d5ee74f3 doc/flatpakref: Fix description of Name key
The Name key specifies the ID of the app or runtime, not the ID of the
app's runtime.

Closes: #2760
Approved by: matthiasclasen
2019-03-15 18:16:54 +00:00
Matthew Leeds
348fcc3f97 Add a DeployCollectionID key to replace CollectionID
This commit adds a key called DeployCollectionID to the flatpakref and
flatpakrepo file formats, which is intended to replace the CollectionID
key (which is still supported but deprecated). The reason for the change
is the same as for the metadata key change from xa.collection-id to
ostree.deploy-collection-id, which is that old versions of Flatpak
(roughly 0.9.8 through 1.0.1 depending on compile time options) hit
various bugs when collection IDs are in use. Flathub will soon enable
the metadata key to deploy collection IDs, and this change means Flathub
can also deploy the collection ID in flatpakref and flatpakrepo files
without affecting old clients.

Adding DeployCollectionID to the flatpakref and flatpakrepo files will
mean the flathub remote can be automatically configured with a
collection ID without depending on the metadata key to do that.

Closes: #2329
Approved by: alexlarsson
2018-11-16 09:17:07 +00:00
Matthew Leeds
eda5dee589 doc/flatpakref: Fix a typo 2018-11-15 15:35:47 -08:00
Matthew Leeds
af8da20426 doc: Fix a mistake in the RuntimeRepo docs 2018-11-15 14:07:24 -08:00
Matthias Clasen
f79c9c7539 Document the SuggestRemoteName key
Found it missing from the docs while writing tests.

Closes: #2199
Approved by: alexlarsson
2018-10-10 08:03:35 +00:00
Matthew Leeds
012e47cb7d doc: Uncomment and tweak P2P docs
Now that P2P support is enabled unconditionally, uncomment the
P2P-related parts of the man pages.

Closes: #1803
Approved by: alexlarsson
2018-06-20 08:05:02 +00:00
Philip Withnall
ae7d960372 common: Support collection IDs in flatpak{ref,repo} and bundle files
These are loaded from the ref/repo/bundle metadata and added to the new
remote configuration.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-18 14:23:03 +02:00
Matthias Clasen
514886dd13 Document flatpakref format extensions
gnome-software is reading some extra keys. Document them.
2017-05-12 12:27:16 +02:00
Matthias Clasen
16bdb672a9 Document RuntimeRepo key
Not being documented makes it hard to know that this actually
takes the url of a flatpakrepo file, as opposed to the other url
key in this file, which takes the url to a remote.
2017-01-16 13:38:15 +01:00
Matthias Clasen
18dddfca64 Add a cross-reference to flatpakrepo 2016-09-14 10:45:10 -04:00
Matthias Clasen
c5559141ff Document the flatpakref file format
Add a man page with details about this file format: flatpak-flatpakref.5
2016-09-13 14:59:37 -04:00