Commit Graph

487 Commits (94d5f0a86e40543917a9ff7c0749b32cc2982d1b)

Author SHA1 Message Date
Alexander Larsson dddb4a2e44 export: Always make directories accessible
There is no reason ever to make a flatpak with a
directory that is not accessible, so make them all
readable and executable.
2017-04-24 15:51:56 +02:00
Alexander Larsson b4ee8581c3 build-update-repo: Spawn subprocesses when generating deltas
This means we can be parallel just like we were with threads,
but we're not using an enourmous amount of memory.
2017-04-19 22:16:17 +02:00
Alexander Larsson 9e80b3a1c1 build-update-repo: Add internal function to create a single delta
We will use this later to fork per-process delta creation instead
of threaded in order to use less memory.
2017-04-19 21:20:05 +02:00
Alexander Larsson fe56c08203 build: Always set personality to linux32 when cross-building
This means that autodetection during builds works much better.
Fixes https://github.com/flatpak/flatpak/issues/712
2017-04-19 19:36:55 +02:00
Alexander Larsson 7da0726514 build: Ensure we add the default dbus permissions
When using flatpak build, use the same default dbus
permissions (portal.*) as we do in flatpak run.

Fixes https://github.com/flatpak/flatpak/issues/717
2017-04-19 16:55:01 +02:00
Matthias Clasen 91c78e553c Quiet compiler warnings
These variables were unused.
2017-04-18 12:36:23 +02:00
Matthias Clasen 16a5188a64 Add a repo command
For now, this just prints bits of summary information in
human-readable form. This command could grow over time
to provide other functionality for managing local repositories.
2017-04-18 12:36:23 +02:00
Matthias Clasen dbfd5d82e7 Fix a compiler warning
Unused variable...
2017-04-18 12:34:19 +02:00
Matthias Clasen 9b002821ad flatpak info: Properly handle unmaintained extensions
We were misreporting these as uninstalled.
2017-04-18 12:34:19 +02:00
Matthias Clasen 9a661fd926 flatpak info: Show more information for extensions
Show the same data the we show for other refs, when we
list extensions. In addition, show the subpaths if there
are any. Note that this reveals that the installed size
for subpath'ed extensions is misleading, since it is
the installed size for the full extension.
2017-04-18 12:34:19 +02:00
Matthias Clasen 77cec62f51 Add a --show-extensions option to flatpak info
This option makes flatpak info list the found extension
that match the given ref.
2017-04-18 12:34:19 +02:00
Matthias Clasen 1d3e3132d7 Add more useful options to flatpak info
The new options are --show-size to show the installed size,
and --show-metadata, to show the metadata file.
2017-04-18 12:34:19 +02:00
Matthias Clasen ee54e2b099 Avoid confusing behavior of flatpak info
I have multiple branches of org.gnome.Platform install system-wide,
and non per-user. And flatpak info gives me:

flatpak info org.gnome.Platform
-> not installed
flatpak info --system org.gnome.Platform
-> multiple branches

This confusing behavior comes from the fact that we are querying
multiple locations and are not careful enough to collate the
errors we get properly. This commit changes things so that we
keep querying the next location as long as we get a 'not installed'
error, and we report the first 'multiple branches' error we get.
2017-04-18 12:34:19 +02:00
Matthias Clasen 581e6f6df5 Drop useless options from flatpak info
The --app and --runtime options are not really useful
for flatpak info, since you need to specify a full ID
anyway, and it is highly unlikely that you will have
ID clashes between apps and runtimes. Also, the options
are documented in a confusing way.
2017-04-18 12:34:19 +02:00
Matthias Clasen 81f688fc66 Fix --help output for --installation
This option takes an argument, so specify an argument
name in the GOptionEntry to make the --help output
come out right.
2017-04-10 08:12:54 +02:00
Alexander Larsson bbf5990adc build-update-repo: g_warning doesn't need newlines in the message 2017-04-07 16:35:25 +02:00
Alexander Larsson 3f9e72c793 builder: Support sdk-extensions also for apps
For apps this just means we ensure that the required sdk extension are
available.
2017-04-04 15:52:36 +02:00
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 5b0ad227e8 OCI: Verify signatures 2017-03-29 17:14:36 +02:00
Alexander Larsson 68035c1e4e OCI: Support signing build-bundld --oci output 2017-03-29 17:14:36 +02:00
Alexander Larsson 11943e7e40 OCI: Support OCI with system-helper by mirroring OCI repo
This allows us (when we later add signatures) to verify
the signatures of the OCI manifest, and can thus support
the system-helper.
2017-03-29 17:14:19 +02:00
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