Commit Graph

466 Commits

Author SHA1 Message Date
Colin Walters
64fd2c2a8d Bump libglnx, use new glnx_throw(), fix callers
One benefit here becomes immediately obvious - `flatpak_fail()` was lacking
`G_GNUC_PRINTF` which meant we missed a lot of type checking. Fix up the
callers.
2017-03-27 10:42:36 +02:00
Alexander Larsson
bf5191e401 build-export: Export all files with canonical permissions
These match what ostree checkout --user-mode will use
so that we can avoid fsck issues with bare-user-only.
2017-03-24 11:22:05 +01:00
Alexander Larsson
d7f2bf000e Re-fix typo 2017-03-16 21:21:54 +01:00
Matthias Clasen
459e1c2b31 Revert "Fix typo"
This reverts commit 0906e5a9b9.

This commit broke the build in GNOME continuous.
See http://build.gnome.org/continuous/buildmaster/builds/2017/03/16/41/build/
2017-03-16 15:08:51 -04:00
AsciiWolf
0906e5a9b9 Fix typo 2017-03-16 17:11:30 +01:00
Alexander Larsson
248a603e6a build: Allow dbus proxy access if explicitly given
If you do something like:
 flatpak build --talk-name=org.foo.Bar appdir
Then we now spawn a dbus proxy for the app.
However, we don't do this by default, even if the
runtime or the app metadata allows this, because
we want builds to normally be disconnected from
the build host.
2017-03-14 16:20:33 +01: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
2f50ad43cc build-bundle: Allow specifying a full ref
This is useful in some cases.
2017-03-13 14:31:24 +01:00
Richard Hughes
d6f4ea424d Allow specifying an ISO-8601 timestamp when using build-export
This allows us to build reproducable repo summaries, for instance in self tests.
2017-03-06 11:38:26 +01:00
Matthias Clasen
fccddf07e8 Merge pull request #594 from mwleeds/emit-runtime-error
run: Print an error for runtimes that aren't installed
2017-03-01 10:28:52 -05:00
Alexander Larsson
27b4b3906a build-finish: Add --metadata= support
This lets us set generic metadata keys
2017-02-28 17:50:32 +01:00
Alexander Larsson
e3d8e0df04 list-remotes: Handle remotes with no url specified 2017-02-28 10:56:24 +01:00
Alexander Larsson
2e639b81e2 list: Don't check error twice 2017-02-28 10:48:38 +01:00
Alexander Larsson
92b80fe672 build: Remove duplicated code for custom_usr 2017-02-28 10:38:43 +01:00
Matthew Leeds
6880818262 run: Print an error for runtimes that aren't installed
Currently if you pass flatpak-run an app that's not installed it prints
an error message to that effect, but if you pass it a runtime that's not
installed (and use the full ref format, e.g.
runtime/org.gnome.Sdk//master) it prints this message and crashes:

(flatpak run:15104): GLib-CRITICAL **: g_propagate_error: assertion 'src != NULL' failed
flatpak:ERROR:app/flatpak-main.c:394:flatpak_run: assertion failed: (success || error)

This commit makes flatpak print the appropriate error message, while
still printing an "app not found" error if the user didn't specify
whether the ref is an app or runtime.
2017-02-27 15:05:02 -06:00
Alexander Larsson
6793d90b82 update: Don't update related refs from different remote
In case you happen to have a reference A with a related reference
B (say a runtime and a GL extension), and they come from different
remotes, then updating A should not cause B to update from the same
remote as A, but rather the current remote.
2017-02-23 14:42:43 +01:00
Alexander Larsson
51e14fe33b Fix repeated download of locates on update
When we update an app and add updates for all the related
operations, such as locates, and it is already installed,
make sure we inherit the current subpaths rather than
use the default ones.

Fixes https://github.com/flatpak/flatpak/issues/587
2017-02-23 14:26:41 +01:00
Alexander Larsson
8f62e46265 Add flatpak --gl-drivers to show the active drivers 2017-02-06 14:37:27 +01:00
Alexander Larsson
193a88e171 flatpak build: Support --sdk-dir= and --metadata=
We need these to be able to run processes in the newly created platform
in flatpak-builder, which we need for cleanup-platform-commands support.
2017-02-06 10:22:09 +01:00
Alexander Larsson
402ff9d738 build: Set FLATPAK_DEST to the mountpoint we're building into 2017-02-02 09:18:29 +01:00
Alexander Larsson
7eeda3b7b3 list: Don't error out if a ref is in the repo, but not deployed 2017-02-02 09:18:03 +01:00
Alexander Larsson
5e1d456b8b extensions: Support subdirectory-suffix=foo
If directory is "foo" and the extension id ends with ".ext" and
subdirectory-suffix is "sub" then the extension point will
be "/usr/foo/ext/sub" rather than just "/usr/foo/ext".

This is very useful when the extension point naming scheme is
"reversed". For instance, this happens for the /usr/share/themes directory.
An extension point for a gtk3 theme would be in /usr/share/themes/$NAME/gtk-3.0,
which could be achived by using subdirectory-suffix=gtk-3.0.
2017-02-01 19:59:12 +01:00
Alexander Larsson
a3da0b3da8 extensions: Add add_ld_path property
If your extension points set this, then each extension will have
the corresponding subdirectory added to LD_LIBRARY_PATH.

We also support a priority property in the ExtensionOf group
in the extensions themselves to set the search order.
2017-02-01 19:46:25 +01:00
Alexander Larsson
cc6e72ce57 Respect flatpak required versions for runtimes (as well as apps) 2017-02-01 17:59:03 +01:00
Alexander Larsson
668a8d817b build: Fix support for flatpak-build and subdir extensions
In this case we need to create a tmpfs on the extension point
so that the real mountpoint can be created.
2017-02-01 17:59:03 +01:00
Alexander Larsson
bebd932976 build-finish: Add support for --sdk and --runtime
This lets you override the sdk and runtime used for the app.
You can build in one sdk/runtime but then run the final app
in another.
2017-01-30 10:30:40 +01:00
Alexander Larsson
ad51737f57 build-init: Support --type=extension and --type=runtime
This adds the lowlevel support for building extensions and
runtimes in a nicer way.
2017-01-26 18:19:46 +01:00
Alexander Larsson
e3555b4be0 build-init: Support prefs for sdk/runtime args
We now support specifying a general partial ref rather than just
the name for build-init.
2017-01-26 18:19:46 +01:00
Alexander Larsson
637f6e1c07 info: Split out pref lookup into helper function 2017-01-26 18:19:46 +01:00
Alexander Larsson
3f5311a444 build-finish: Support creating extension points 2017-01-26 18:19:46 +01:00
Alexander Larsson
fe0c8ef5af Fix unused variable 2017-01-26 18:19:46 +01:00
Alexander Larsson
19ea75c52c flatpak remotes: show both user and system by default
This makes it easier to know all that is available in a single
operation. We also show for each remote if it is user
or system.

See https://github.com/flatpak/flatpak/issues/505
2017-01-26 10:48:57 +01:00
Alexander Larsson
f0cad76ff8 Rename flatpak remote-list to flatpak remotes
The old name is deprecated and not documented, but still
works.

Fixes https://github.com/flatpak/flatpak/issues/482
2017-01-26 10:41:18 +01:00
Alexander Larsson
703824ab4b flatpak list: show more info by default
Even without -d this shows the whole ref, as well
as the source of the app (user/system) and if it
is a runtime.
This is important now as the default is to show
both user and system and both apps and runtime.
2017-01-26 10:29:07 +01:00
Alexander Larsson
aad7ccbf37 Make flatpak list show both apps and runtimes by default
This makes more sense and seems what people expect, as per:
https://github.com/flatpak/flatpak/issues/490
https://github.com/flatpak/flatpak/issues/505
2017-01-26 10:17:45 +01:00
Alexander Larsson
ab446ebac5 Make /etc writable when building a runtime
We make /etc just a symlink to /usr/etc when we're building a runtime
and /etc is supposed to be writable. Otherwise the bind-mount we
normally have there don't allow use to replace existing files in /etc.
2017-01-25 15:28:42 +01:00
Alexander Larsson
9bb9534f00 install: When installing app, if runtime update fails that is not fatal
For instance, if you're offline, but are installing a local app
we should not fail if the update of the runtime fails.

This fixes https://github.com/flatpak/flatpak/issues/507
2017-01-24 09:47:47 +01:00
Matt Watson
ee83b5a70d install: handle arch when installing from a flatpakref
Before this commit
$ flatpak install --arch someArch --from some.flatpakref
Would completely ignore the arch argument and only install for the
default flatpak architecture. Since flatpakref files don't include
an arch field, there's no reason we can't attempt to install the
arch specified on the command line.
2017-01-20 15:28:11 +01:00
Ikey Doherty
605c7ee87b Fix compiler warnings with uninitialised cleanup pointers
This change fixes GCC compiler warnings where a cleanup function was
specified on an uninitialised pointer, which in the view of GCC could
result in an errornous free of uninitialised memory, if the functions
that initialise them do not return NULL.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2017-01-19 10:05:13 +01:00
Alexander Larsson
c4f0f3245d Fix update of standalone bundle
We regressed on being able to install a bundle twice to update it.

This fixes https://github.com/flatpak/flatpak/issues/462
2017-01-16 11:51:14 +01:00
Alexander Larsson
0fd0978987 Fix test crash introduced with error message 2017-01-16 11:20:47 +01:00
Alexander Larsson
4e1bf67bff Print a warning if the remote metadata cache is not found 2017-01-12 10:45:44 +01:00
Alexander Larsson
f20e5f7823 bundles: Support dependencies and runtime-repo
If the bundle contains an origin link we can now install related
things from it, such as locale data.

You can also build the bundle with --runtime-repo=URL, where the url
points to a flatpakrepo file for a repo with runtimes. This works
similar to the RuntimeRepo= feature in flatpakref files.
2016-12-20 16:27:57 +01:00
Alexander Larsson
92a84cf61e install: Report errors when finding deps 2016-12-19 20:55:12 +01:00
Alexander Larsson
4ef4a7d982 transactions: Fix leak 2016-12-19 14:19:41 +01:00
Alexander Larsson
8d1d92fd4e remote-list: Fix leak of dirs 2016-12-19 14:19:41 +01:00
Alexander Larsson
7267669ee1 build-bundle: Fix leaks 2016-12-19 11:16:17 +01:00
Alexander Larsson
b066d863bc Remove unused variables 2016-12-19 10:08:18 +01:00
Mario Sanchez Prada
886eeb7d4a Support multiple --installation parameters for CLI commands
This affects `remote-list`, `list` and `info`, which can now pass
multiple installations to search for references in at the same time.
2016-12-17 00:56:10 +00:00
Mario Sanchez Prada
ed1b0e2b23 Add internal API: flatpak_dir_get_name()
This will allow us to refactor some code using in the CLI, when
we want to print the name of a FlatpakDir for detailed listings.
2016-12-17 00:56:10 +00:00