Skip to content

Drop support p2p in favour of simpler side-loading scheme - #3476

Merged
alexlarsson merged 36 commits into
flatpak:masterfrom
alexlarsson:drop-p2p
Mar 25, 2020
Merged

alexlarsson merged 36 commits into
flatpak:masterfrom
alexlarsson:drop-p2p

Conversation

@alexlarsson

Copy link
Copy Markdown
Member

As discussed on the list: https://lists.freedesktop.org/archives/flatpak/2020-February/001912.html

Instead of using the ostree p2p APIs we support a much simpler approach that only allows sideloading via local repositories. We only use regular non-p2p codepaths for remote installs, and we never create any local collection-id refs. However, the remote repo does enable a collection id and all refs are commited bound to that. This allow us to use create-usb to create a sideloading repo.

There is a new global option xa.sideload-repos which is list of pahts to local repos we will sideload from. Then each app that wants to enable this sets xa.sideload-collection-id so that we know what collection id in the sideload repos to pull from.

Picking of the repo to install from happens when resolving the refs in FlatpakTransaction, and if we're sideloading we just pass the file: uri of the repo instead of the repo name to the regular ostree pull operation. There is some trickiness in the resolve to ensure we get the best (fastest, but available) source, but it is nothing compared to the full power of the ostree p2p battle-station.

This is an initial WIP, I want to go over the codebase more to see what can be streamlined. But, it would be good to get some external review at this point.

Known remaining issues:

  • We should add some new way to enable a sideload-collection-id that we can enable on e.g. flathub that doesn't also enable collection ids on older flatpak versions.
  • We should try to convert pre-existing remotes with collection ids enabled on startup.
  • Do we want e.g. flatpak remote-ls to list the available sideload refs when we're online (currently we get a summary load error).

@lgtm-com

lgtm-com Bot commented Mar 18, 2020

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging f773c64 into 6395d04 - view on LGTM.com

fixed alerts:

  • 3 for FIXME comment

@mwleeds

mwleeds commented Mar 18, 2020

Copy link
Copy Markdown
Contributor

Don't really have time for a full review right now but I wonder if xa.sideload-repos should be lowered to ostree and called sideload-repos, since we probably should make similar architectural changes to the USB OS update support in eos-updater if we make these changes.

And do you have any thoughts on how LAN updates fit into this? If it becomes a priority to get those working, are these changes going to make that much more difficult?

@alexlarsson

Copy link
Copy Markdown
Member Author

I dunno about lowering this, all the supporting code is in flatpak atm and I'm not sure how much it would help if ostree had some support, as most of the work is done in the resolve phase which revolves around pre-acquiring the metadata for pre-install permission checks. @cgwalters opinions?

@mwleeds I understand you don't have time for a full review of the code, but it would be nice if you can do a highlevel reveiew of the feature and see if it would work for the endless usecase (where you're currently using p2p). Maybe @ramcq can give some feedback too?

@alexlarsson

Copy link
Copy Markdown
Member Author

We probably also want a way to add temporary sideload repos on the commandline (or in the libflatpak APIs) for things like installers that don't want to mess with the global configuration.

@alexlarsson

Copy link
Copy Markdown
Member Author

Hmm, I guess with sideload repos lowered to ostree we could do pulls from the network a bit better. I.e if the sideloaded version is older than the upstream but still have some objects in common we could avoid downloading those.

@lgtm-com

lgtm-com Bot commented Mar 19, 2020

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 80792eb into 6395d04 - view on LGTM.com

fixed alerts:

  • 3 for FIXME comment

@alexlarsson

Copy link
Copy Markdown
Member Author

So, wrt LAN updates the way I see them working is that we set up a machine on the local network that runs what is essentially a caching http forwarder. It can be something like a custom nginx setup or even some app that endless works that you just install on some machine.

There are some alternatives to how this can be set up in flatpak on the client:

  • Just point the remote to the local uri
  • Auto-detect when you have access to the local mirror and supply an alternative url in the pull operation by passing the override-url option to ostree.
  • Use the pre-existing mirror support in ostree where you set the base uri to mirrorlist=$URL which will make ostree download that url and use it as possible sources of data (one url per line, will be used in order). The mirrorlist url can be a local file or on the network.

The last setup is quite flexible in that it will automatically work when the mirror is available and fall back to the upstream otherwise. However, it will need some fixes in flatpak where it downloads files by itself which does not currently handle mirrorlist uris.

I also looked at using the mirrorlist support to handle sideloading individual objects, but the mirror support is http(s) only.

This allows us to print some separators for the logs also.

tests: Convert more tests to ok helper
We use some BASH_XTRACEFD hackery to hide the trace output from
the internals of the assert (and ok) functions, so that the
log output can focus on what is important, i.e. what asserts are
checked and what errors do they print.
@alexlarsson
alexlarsson force-pushed the drop-p2p branch 2 times, most recently from 9993752 to 5cf9bb8 Compare March 20, 2020 15:38
@alexlarsson

Copy link
Copy Markdown
Member Author

New version, now with testcase and fixes that were needed to make both appstream sideloading and --system sideloading work.

@lgtm-com

lgtm-com Bot commented Mar 20, 2020

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 5cf9bb8 into 6395d04 - view on LGTM.com

fixed alerts:

  • 3 for FIXME comment

@lgtm-com

lgtm-com Bot commented Mar 20, 2020

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging e947d5a into 6395d04 - view on LGTM.com

fixed alerts:

  • 3 for FIXME comment

@mwleeds

mwleeds commented Mar 21, 2020

Copy link
Copy Markdown
Contributor

As discussed on the list: https://lists.freedesktop.org/archives/flatpak/2020-February/001912.html

Instead of using the ostree p2p APIs we support a much simpler approach that only allows sideloading via local repositories. We only use regular non-p2p codepaths for remote installs, and we never create any local collection-id refs. However, the remote repo does enable a collection id and all refs are commited bound to that. This allow us to use create-usb to create a sideloading repo.

There is a new global option xa.sideload-repos which is list of pahts to local repos we will sideload from. Then each app that wants to enable this sets xa.sideload-collection-id so that we know what collection id in the sideload repos to pull from.

I don't get it. The commits already have collection IDs set in their metadata if the server is configured properly. Why add another option?

Picking of the repo to install from happens when resolving the refs in FlatpakTransaction, and if we're sideloading we just pass the file: uri of the repo instead of the repo name to the regular ostree pull operation. There is some trickiness in the resolve to ensure we get the best (fastest, but available) source, but it is nothing compared to the full power of the ostree p2p battle-station.

As you said in a later comment, I think it would be really helpful to pull what you can locally even if the Internet has a newer version of something, since that seems like a common use case. If it's too complicated to pull from both the local and online source in the same transaction, perhaps we could do two updates: the local one then the online one.

This is an initial WIP, I want to go over the codebase more to see what can be streamlined. But, it would be good to get some external review at this point.

Known remaining issues:

* We should add some new way to enable a sideload-collection-id that we can enable on e.g. flathub that doesn't also enable collection ids on older flatpak versions.

I'm not convinced it would be bad to enable collection IDs on existing versions of Flatpak. The known bugs were fixed a long time ago (see flathub/flathub#676 (comment)).

* We should try to convert pre-existing remotes with collection ids enabled on startup.

* Do we want e.g. flatpak remote-ls to list the available sideload refs when we're online (currently we get a summary load error).

return FALSE;

if (flatpak_deploy_data_has_subpaths (deploy_data))
return flatpak_fail (error, _("Related ref '%s' is only partially installed"), ref);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to fail? If you're offline and have your language, the person you're sharing it with probably has the same language right

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, its possible you want it. But it is more likely you're not even aware of this happening, which will cause you to generate a usb repo that may break for users in weird ways. I.e. the pull would just stop in the middle with some "missing object 123abc..." error.

Maybe we could have a switch that turns this into a warning instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, better to have a warning and ideally a more useful error message on the install side than "missing object".

@mwleeds

mwleeds commented Mar 21, 2020

Copy link
Copy Markdown
Contributor

@mwleeds I understand you don't have time for a full review of the code, but it would be nice if you can do a highlevel reveiew of the feature and see if it would work for the endless usecase (where you're currently using p2p).

What Endless needs is:

  • offline app/runtime installation using GNOME Software or the CLI
  • offline app/runtime updates using GNOME Software or the CLI

In both cases from repositories created with flatpak create-usb. Ideally we could update appstream data offline too but I don't know if we have that in the status quo.

So while I don't have a good grasp on these changes yet, if it can do those things it should work for us. I could potentially take a closer look next week, but if it might be reworked to lower sideload-repos into ostree, it seems like wasted effort to do a big review here.

@mwleeds

mwleeds commented Mar 21, 2020

Copy link
Copy Markdown
Contributor

Oh, and we also have:

  • a USB category in GNOME Software that shows the apps available on the USB using flatpak_installation_list_remotes_by_type() and flatpak_installation_list_remote_refs_sync()
  • the installation from the USB, whether from g-s or the CLI, requires no extra steps than inserting the USB and installing as you would from the Internet. So if sideload-repos is going to be a global config option we need a system service that sets it when you insert a USB with the right MIME type. We already launch gnome-software when such a USB is inserted, but if we were to implement setting sideload-repos there it would mean no offline updates for anyone not using gnome-software (e.g. someone not on Endless).

@alexlarsson

Copy link
Copy Markdown
Member Author

There is a new global option xa.sideload-repos which is list of pahts to local repos we will sideload from. Then each app that wants to enable this sets xa.sideload-collection-id so that we know what collection id in the sideload repos to pull from.

I don't get it. The commits already have collection IDs set in their metadata if the server is configured properly. Why add another option?

I'm not sure what you mean here. We have a remote "flathub" and a sideload repo containing mirror refs like (org.flathub.Stable, app/org.gnome.gedit/x86_64/stable). When we get a request to install gedit from flathub we must know what collection-id to look for in the sideload repo, and we don't want to set the regular per-remote collection-id option because that triggers p2p behaviour in ostree (and older flatpak versions) which we don't want. So, we use the remote.sideload-collection-id as part of the key when looking up in the sideload repo.

@alexlarsson

Copy link
Copy Markdown
Member Author

Picking of the repo to install from happens when resolving the refs in FlatpakTransaction, and if we're sideloading we just pass the file: uri of the repo instead of the repo name to the regular ostree pull operation. There is some trickiness in the resolve to ensure we get the best (fastest, but available) source, but it is nothing compared to the full power of the ostree p2p battle-station.

As you said in a later comment, I think it would be really helpful to pull what you can locally even if the Internet has a newer version of something, since that seems like a common use case. If it's too complicated to pull from both the local and online source in the same transaction, perhaps we could do two updates: the local one then the online one.

Its hard to do it outside of ostree, because we have no idea what objects from the old repo we will need until we start pulling the new version from the network. We could use the mirror functionality of ostree, but that unfortunately only works for http urls. We could pull whatever is the current version of the ref into the repo and then the latest from upstream, but that will cause a lot of i/o (and extra diskspace use) copying things that are unlikely to be used, especially as old sideload repos grow more and more stale.

@alexlarsson

Copy link
Copy Markdown
Member Author

I'm not convinced it would be bad to enable collection IDs on existing versions of Flatpak. The known bugs were fixed a long time ago (see flathub/flathub#676 (comment)).

But, if we land this PR, it will be known that long-term using collection-ids like in regular p2p is going to go away. Then it seems like a poor idea to enable if for users of older versions. For example, it may cause issues when a later flatpak update goes back to non-p2p.

@alexlarsson

Copy link
Copy Markdown
Member Author
  • a USB category in GNOME Software that shows the apps available on the USB using flatpak_installation_list_remotes_by_type() and flatpak_installation_list_remote_refs_sync()

Oh, interesting. Yeah, we should do this too. Also, probably mark FlatpakRemoteRefs that are available offline in general.

  • the installation from the USB, whether from g-s or the CLI, requires no extra steps than inserting the USB and installing as you would from the Internet. So if sideload-repos is going to be a global config option we need a system service that sets it when you insert a USB with the right MIME type. We already launch gnome-software when such a USB is inserted, but if we were to implement setting sideload-repos there it would mean no offline updates for anyone not using gnome-software (e.g. someone not on Endless).

I think the right place to do USB disk probing is in the udev scripts (or equivalent) anyway rather than every instance of flatpak probing all the disks all the time. That could also gives the sysadmin more control of what is probed etc. However, we should probably ship an example udev rule and the required tooling to make this easy to setup.

@alexlarsson

Copy link
Copy Markdown
Member Author

Actually, i wonder if we can just reusing the regular per-remote collection-id option. It does change some things wrt how refs are stored, but if we don't call the p2p APIs i think we'll get essentially normal behaviour. I'm gonna research this a bit.

@pwithnall

Copy link
Copy Markdown
Collaborator

(Just a brief comment to say that I’m not going to weigh in on this. I haven’t had time to work on P2P for a while, and evidently didn’t leave it in a finished enough state. I still think that the general solution of collection IDs and repo finders is appropriate, and that with some profiling work on the implementation of the repo finders, it would be a lot more usable. However, I don’t personally have time to do that work, so I’ll shut up. Carry on however you think is best. 🙂)

@lgtm-com

lgtm-com Bot commented Mar 23, 2020

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 294b67c into 6395d04 - view on LGTM.com

fixed alerts:

  • 3 for FIXME comment

@alexlarsson

Copy link
Copy Markdown
Member Author

I'm pretty satisfied with the state of this and am gonna merge it now. The main missing part is to write an example udev rule to automatically add sideload repos. I will file a separate issue for that.

@alexlarsson alexlarsson changed the title WIP: Drop support p2p Drop support p2p in favour of simpler side-loading scheme Mar 25, 2020
@alexlarsson
alexlarsson merged commit aa6d955 into flatpak:master Mar 25, 2020
@mwleeds mwleeds mentioned this pull request Jun 26, 2020
mwleeds added a commit to endlessm/flatpak that referenced this pull request Jul 11, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Jul 11, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Jul 11, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Jul 11, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to mwleeds/flatpak that referenced this pull request Jul 22, 2020
On versions of Flatpak prior to 1.7.1, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak#3476).

Flatpak does still put ostree-metadata on a drive in "flatpak
create-usb" if it exists locally. So this is a patch to fill the gap:
pull ostree-metadata any time we're fetching from a remote, so it will
be available when create-usb is run, so such USB drives will work with
computers running older flatpak versions, such as Endless OS versions
older than 3.9.0 (which is planned for November 2020).

Also, update the unit tests to check that this is working.

This has the additional benefit of checking that the locally configured
collection ID matches the one configured on the server side. A mismatch
would cause offline distribution to fail.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Aug 10, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Aug 21, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Aug 21, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
mwleeds added a commit to endlessm/flatpak that referenced this pull request Aug 26, 2020
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 5, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 5, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 10, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 10, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 11, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, drop changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, as it’s no longer
present in the test repositories.
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request May 14, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
pwithnall pushed a commit to endlessm/flatpak that referenced this pull request Oct 13, 2021
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
dbnicholson pushed a commit to endlessm/flatpak that referenced this pull request Jan 24, 2022
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
dbnicholson pushed a commit to endlessm/flatpak that referenced this pull request Feb 8, 2022
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
wjt pushed a commit to endlessm/flatpak that referenced this pull request May 17, 2022
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
dbnicholson pushed a commit to endlessm/flatpak that referenced this pull request Mar 24, 2023
On all recent versions of Endless, the offline app install functionality
depends on the "ostree-metadata" ref being available for each
collection. So for example a flash drive containing refs from both
eos-apps and flathub would have to have both
(com.endlessm.Apps, ostree-metadata)
and
(org.flathub.Stable, ostree-metadata)
on it. However Flatpak from 1.7.1 onward no longer depends on
ostree-metadata to do offline updates and therefore no longer pulls it
during online install/update operations (see
flatpak/flatpak#3476). Upstream Flatpak does
still put ostree-metadata on a drive in "flatpak create-usb" if it
exists locally. So this is a patch to fill the gap: pull
ostree-metadata any time we're fetching from a remote, so it will be
available when create-usb is run, so such USB drives will work with
computers running Endless OS versions older than 3.9.0.

Also, update the unit tests to check that this is working.

Rebase 1.10.2 (T31594): Fix minor rebase conflict, drop duplicate
definition of variable, enhance changes to `test-sideload.sh` which check
that the `ostree-metadata` ref is actually present, to ensure it’s
present in the test repositories (by dbn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants