Commit Graph

33 Commits (94d5f0a86e40543917a9ff7c0749b32cc2982d1b)

Author SHA1 Message Date
Alexander Larsson 0dcc7332f7 Handle uris better when detecting .flatpak[repo,ref] suffix
We fully parse the argument as (possibly) a uri, which means
we can handle an argument like:
 https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-builder.flatpakref?h=stable

Which doesn't work with a simple has_suffix call.
This is important because the flatpak.org site now references
these kinds of uris.

Fixes https://github.com/flatpak/flatpak/issues/659
2017-04-03 10:02:28 +02:00
Alexander Larsson 49b5304589 Update OCI support to latest version of spec
This is a major change in the OCI support, as the format of the OCI image
registries changed. Instead of now having a "ref" file for each image
in the repo it has a single index json file, where the ref name is now
a per-image annotation.

This allows us to support OCI much better, as we can now use the actual
flatpak ref as the OCI ref name, and we can find all the flatpak refs
in a remote.

So, with this you can just use:
 flatpak remote-add --oci remote-name URL

and then you can use the regular flatpak operations on the remote.
2017-03-13 14:31:36 +01:00
Alexander Larsson e1bf3eff52 Flatpak[ref|repo]: Add Version field
If this is set it has to be 1, or we fail.
This lets us later introduce incompatible changes.
2016-12-13 15:54:14 +01:00
Alexander Larsson c4cea2489f remote-add/modify: Fix updating remote-metadata for config
We recreate the OstreeRepo object in order to flush out any configuration
changes done via the system helper, so that changing the configuration works.

Should fix https://github.com/flatpak/flatpak/issues/413.
2016-12-13 12:00:44 +01:00
Alexander Larsson bb6e1d535f install: Support RuntimeRepo= key in flatpakref files
This allows an app to point to the repo where the runtime it uses
comes from, and the user will be asked to add that if its not
already configured.
2016-12-02 16:31:14 +01:00
Alexander Larsson 3896c8d683 Support relative pathnames in various --gpg=FILE commandline options
We juse use g_file_new_for_commandline_arg instead of g_file_new_for_path.
This is somewhat related to https://github.com/flatpak/flatpak/issues/401
but doesn't actually handle the specific case of tilde.
2016-11-15 10:44:26 +01:00
Alexander Larsson fbf663ac91 remote-add: LOCATION is not optional
Fixes https://github.com/flatpak/flatpak/issues/377
2016-10-31 08:56:45 +01:00
Alexander Larsson 4487d78e4e Allow remote-add --from --no-gpg-verify
This overrides the requirement of the gpg key found in the flatpakref
which can be useful at times.

This fixes: https://github.com/flatpak/flatpak/issues/369
2016-10-26 20:46:35 +02:00
Mario Sanchez Prada dbaaf65d3b Use g_key_file_load_from_data() instead of g_key_file_load_from_bytes()
The g_key_file_load_from_bytes() function was added in GLib 2.50, and that
is too high as flatpak wants to support centos7/rhel7, which is now in 2.42.
2016-10-24 11:45:57 +01:00
Alexander Larsson c3bea6c8fc remote-add: Assume --from if location ends with .flatpakrepo
If you try to set the flatpakrepo uri as a repo uri for a new remote
things get really confused, so lets try to do the right thing anyway.
2016-10-21 12:46:38 +02:00
Alexander Larsson f117985e37 remote-add: Make --from a boolean arg instead of a string arg
So before you did:
 flatpak --user remote-add --from=https://sdk.gnome.org/gnome.flatpakrepo gnome
Now you do:
 flatpak --user remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo

This is a somewhat break, but this means we handle --from the same in
remote-add and install, which seems important.
2016-10-19 18:00:12 +02:00
Alexander Larsson c70c453eab remote-add: Support installing .flatpakrepo files from http uri 2016-10-19 12:41:08 +02:00
Alexander Larsson b2af78fb6f remotes: Add no-use-for-deps property
If this is set for a remote we will never automatically look for
dependencies in it. This makes dependency search faster, as we
don't need to search in app-only remotes.
2016-10-19 11:34:22 +02:00
Mario Sanchez Prada 2cbb1da935 Added new parameter for the remote-modify built-in command: --update
This new command relies on flatpak_dir_update_remote_configuration()
and allows updating the local configuration for the remotes based on
the extra metadata present in the OSTree repo's summary file.

This parameter can still be combined with --title and --default-branch,
which take precedence when combined with --update.
2016-10-14 16:42:17 +01:00
Mario Sanchez Prada c492def9a7 Fetch the default branch when adding a remote from its repo's summary file
Just like we do with the title, fetch the default-branch from the
repository's summary file and use that information when adding a
remote reference from the command line.

https://github.com/flatpak/flatpak/issues/221
2016-10-14 16:23:15 +01:00
Mario Sanchez Prada 54598331cc Wait until a remote has been added before incorporating its extra metadata
We can't fetch the extra metadata from a repository's summary file before
having added it locally, since ostree_repo_remote_fetch_summary() will
fetch data by remote's name, and for that it needs to be added first.
2016-10-14 16:23:15 +01:00
Alexander Larsson bef4de5308 Support default-branch setting in remote configuration
For now this is a purely client side setting which lets you store
the default branch to use for a remote. This is mostly meant to
be used for UI tools, although the CLI could also be made to use this.

You can set this manually in the CLI with --default-branch, or via a
flatpakrepo file (new key DefaultBranch).
2016-10-06 11:36:28 +02:00
Alexander Larsson 4374b81174 Remove whitespace 2016-09-27 14:30:52 +02:00
Matthias Clasen 85f2f36baf Warn about extra arguments in flatpak remote-add 2016-09-27 14:30:11 +02:00
Alexander Larsson e256bf7570 remote-add: Make internal function static 2016-09-06 15:40:11 +02:00
Alexander Larsson 6578d37984 Drop libgsystem dependency 2016-08-22 16:00:33 +02:00
Matthias Clasen 75218c4a65 Fix license headers
We were referring to the nonexisting "version 2" of the
Lesser GPL. It should be "version 2.1".
2016-07-29 14:27:49 -04:00
Matthias Clasen 8732c5a8fb Translate errors
These show up in the UI and often refer to (translated) parts of
the UI.
2016-07-23 14:37:02 -04:00
Matthias Clasen 43da58db5f Mark commandline options for translations 2016-07-23 11:01:50 -04:00
Alexander Larsson 7e58da35af remote-add: Support remote-add --from=keyfile NAME
This allows you to have a single file that describes a repo.
It also allows a mimetype handle for it so that you can easily
install it via a single click.
2016-05-31 16:26:59 +02:00
Alexander Larsson 8533f06dc0 Add more completions 2016-05-30 14:54:22 +02:00
Alexander Larsson b24aff6580 Remove unused variables 2016-05-16 16:25:09 +02:00
Alexander Larsson 753cdc97fd Fix typo: flatpak_dir_modify_remove -> flatpak_dir_modify_remote 2016-05-13 13:59:48 +02:00
Alexander Larsson 12ac77138e add-remote: Support metalink=.. urls 2016-05-11 16:31:33 +02:00
Alexander Larsson 984e850fd6 remote-add: Use flatpak_dir_modify_remove 2016-05-11 16:27:43 +02:00
Alexander Larsson 9e4bb25b2c modify-remote: Move the actual config rewriting to FlatpakDir
This is in preparation for doing this in the system helper.
2016-05-11 15:43:40 +02:00
Alexander Larsson fcf137f25d Remove references to --gpg-key= as it never worked 2016-05-11 15:39:11 +02:00
Alexander Larsson c24528d369 Rename source files to flatpak 2016-05-09 09:00:20 +02:00