mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-02 03:51:28 -05:00
Copying refs from the system repo into a repo on a USB drive requires the summary in the system repo to be up to date (and similarly for other flatpak installations like a per-user one). At the moment we expect the user to run `sudo ostree summary -u` before `flatpak create-usb` which is a bad user experience. Another option is to set `core.auto-update-summary` to true on the ostree repo config, but there are significant performance concerns with that: it involves updating the summary after every transaction rather than only when we need it. So this commit changes the create-usb command to use the "UpdateSummary" system-helper method to update the summary in the source repo before copying to the destination. This strategy allows us to continue to let non-root users use `flatpak create-usb`. This commit also tries to update the remote repo metadata and appstream data for each remote before copying to the USB, because we can now do that without invalidating the summary. Closes: #1945 Approved by: alexlarsson
197 lines
7.5 KiB
XML
197 lines
7.5 KiB
XML
<?xml version='1.0'?> <!--*-nxml-*-->
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
|
|
|
<refentry id="flatpak-create-usb">
|
|
|
|
<refentryinfo>
|
|
<title>flatpak create-usb</title>
|
|
<productname>flatpak</productname>
|
|
|
|
<authorgroup>
|
|
<author>
|
|
<contrib>Developer</contrib>
|
|
<firstname>Matthew</firstname>
|
|
<surname>Leeds</surname>
|
|
<email>matthew.leeds@endlessm.com</email>
|
|
</author>
|
|
</authorgroup>
|
|
</refentryinfo>
|
|
|
|
<refmeta>
|
|
<refentrytitle>flatpak create-usb</refentrytitle>
|
|
<manvolnum>1</manvolnum>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>flatpak-create-usb</refname>
|
|
<refpurpose>Copy apps and/or runtimes onto removable media.</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
<cmdsynopsis>
|
|
<command>flatpak create-usb</command>
|
|
<arg choice="opt" rep="repeat">OPTION</arg>
|
|
<arg choice="plain">MOUNT-PATH</arg>
|
|
<arg choice="plain" rep="repeat">REF</arg>
|
|
</cmdsynopsis>
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
Copies the specified apps and/or runtimes <arg choice="plain">REF</arg>s onto the removable
|
|
media mounted at <arg choice="plain">MOUNT-PATH</arg>, along with all the dependencies and
|
|
metadata needed for installing them. This is one way of transferring flatpaks
|
|
between computers that doesn't require an Internet connection. After using
|
|
this comand, the USB drive can be connected to another computer and
|
|
<command>flatpak install</command> will prefer to install from it rather than
|
|
the Internet if the refs are the newest available. For this process to work a
|
|
collection ID must be configured on the relevant remotes on both the source
|
|
and destination computers, and on the remote server.
|
|
</para>
|
|
<para>
|
|
Each <arg choice="plain">REF</arg> argument is a full or partial indentifier in the
|
|
flatpak ref format, which looks like "(app|runtime)/ID/ARCH/BRANCH". All elements
|
|
except ID are optional and can be left out, including the slashes,
|
|
so most of the time you need only specify ID. Any part left out will be matched
|
|
against what is installed, and if there are multiple matches an error message
|
|
will list the alternatives.
|
|
</para>
|
|
<para>
|
|
By default this looks for both installed apps and runtimes
|
|
with the given <arg choice="plain">REF</arg>, but you can
|
|
limit this by using the --app or --runtime option.
|
|
</para>
|
|
<para>
|
|
All <arg choice="plain">REF</arg>s must be in the same installation (user, system, or other).
|
|
Otherwise it's ambiguous which repository metadata refs to put on the USB drive.
|
|
</para>
|
|
<para>
|
|
By default <command>flatpak create-usb</command> uses <filename>.ostree/repo</filename>
|
|
as the destination directory under <arg choice="plain">MOUNT-PATH</arg> but if you
|
|
specify another location using <option>--destination-repo</option>
|
|
a symbolic link will be created for you in <filename>.ostree/repos.d</filename>.
|
|
This ensures that either way the repository will be found by flatpak (and other
|
|
consumers of libostree) for install/update operations.
|
|
</para>
|
|
<para>
|
|
Unless overridden with the --system, --user, or --installation
|
|
options, this command searches both the system-wide installation
|
|
and the per-user one for <arg choice="plain">REF</arg> and errors
|
|
out if it exists in more than one.
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Options</title>
|
|
|
|
<para>The following options are understood:</para>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><option>-h</option></term>
|
|
<term><option>--help</option></term>
|
|
|
|
<listitem><para>
|
|
Show help options and exit.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--user</option></term>
|
|
|
|
<listitem><para>
|
|
Uninstalls from a per-user installation.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--system</option></term>
|
|
|
|
<listitem><para>
|
|
Uninstalls from the default system-wide installation.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--installation=NAME</option></term>
|
|
|
|
<listitem><para>
|
|
Copies refs from a system-wide installation specified by
|
|
<arg choice="plain">NAME</arg> among those defined in
|
|
<filename>/etc/flatpak/installations.d/</filename>. Using
|
|
<arg choice="plain">--installation=default</arg> is
|
|
equivalent to using <arg choice="plain">--system</arg>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--app</option></term>
|
|
|
|
<listitem><para>
|
|
Assume that all <arg choice="plain">REF</arg>s are apps if not explicitly specified.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--runtime</option></term>
|
|
<listitem><para>
|
|
Assume that all <arg choice="plain">REF</arg>s are runtimes if not explicitly specified.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--destination-repo</option>=DEST</term>
|
|
|
|
<listitem><para>
|
|
Create the repository in DEST under MOUNT-PATH, rather than
|
|
the default location.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>-v</option></term>
|
|
<term><option>--verbose</option></term>
|
|
|
|
<listitem><para>
|
|
Print debug information during command processing.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>--ostree-verbose</option></term>
|
|
|
|
<listitem><para>
|
|
Print OSTree debug information during command processing.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Examples</title>
|
|
|
|
<para>
|
|
<command>$ flatpak create-usb /run/media/mwleeds/1a9b4cb2-a7ef-4d9b-91a5-6eaf8fdd2bf6/ com.endlessm.wiki_art.en</command>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>See also</title>
|
|
|
|
<para>
|
|
<citerefentry><refentrytitle>flatpak</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
<citerefentry><refentrytitle>flatpak-install</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
<citerefentry><refentrytitle>flatpak-list</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
<citerefentry><refentrytitle>ostree-create-usb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|