Commit Graph

487 Commits (94d5f0a86e40543917a9ff7c0749b32cc2982d1b)

Author SHA1 Message Date
Alexander Larsson ad7e016349 repo-update: Don't leak from_parent 2016-11-28 16:12:38 +01:00
Alexander Larsson 3e9ce0034e repo-update: Don't leak delta_data 2016-11-28 16:12:21 +01:00
Alexander Larsson ddb40187c6 Fix various leaks found by valgrind 2016-11-28 15:17:04 +01:00
Mario Sanchez Prada 2c05e868d9 Fix wrong reference to the user installation instead of the system one
This seems like a simple typo introduced in eeaa8320, which is causing
to ignore the system installation when auto completing.
2016-11-25 08:46:48 +01:00
Alexander Larsson ca99d5be58 build-init: Give error if initializing with a partial dependency
If you're building a runtime and have a base runtime with expected
extensions, fail to build if the actually installed extension is
partial (i.e. if it has a subdir specified).

Fixes https://github.com/flatpak/flatpak/issues/390
2016-11-15 11:11:00 +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 a8e1738860 build-finish: Don't warn for all non-valid names during export
Its pretty common to e.g. ship an icon theme bundled in the app,
but you then don't want to have a warning for every file.
So, instead make this a debug message.
2016-11-11 14:55:27 +01:00
Alexander Larsson f48e863f4b oci: Don't allow closing the json writer twice
We're already checking if self->str != NUL before we get the
string, but closing the writer assumes self->str != NULL.
2016-11-11 10:53:05 +01:00
Alexander Larsson 966457593d build-sign: Don't crash if ref not found
As reported in https://github.com/flatpak/flatpak/issues/388
2016-11-11 10:42:29 +01:00
Mario Sanchez Prada e06e560f50 Fix typo when checking for installed refs in the system installation 2016-11-03 11:16:43 +00:00
Alexander Larsson 6e31932221 OCI: Generate an oci image dir structure instead of a runtime 2016-10-31 20:11:14 +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 f0380434e1 Remove check for OstreeRepoExportArchiveOptions.path_prefix
We now hard-depend on a recent enough ostree that has this.
2016-10-28 11:02:40 +02: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
Alexander Larsson 47906593b8 When installing to the system dir, don't consider --user dependencies
It makes no sense to allow you to install an application systemwide
if it only works for your user. However, its generally fine if to
install a per-user app that relies on a system-installed runtime.

In particular, this fixes installing system-wide extra-data apps where
we need the runtime to be system-installed to run the unpack script.
2016-10-26 20:41:33 +02:00
Alexander Larsson 224c4ee9e6 update --appstream: Don't stop at first error 2016-10-25 14:53:11 +02:00
Alexander Larsson 294c9bd7c3 update --appstream: Actually handle remote argument if specified 2016-10-25 14:39:55 +02:00
Alexander Larsson f8e405d212 install --from: Re-read config after adding origin remote 2016-10-25 10:50:47 +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 509a358ba3 Make looks_like_branch better
Fixes https://github.com/flatpak/flatpak/issues/359
2016-10-21 21:42:37 +02: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 25e39dfddd build-finish: Add --extra-data= argument 2016-10-21 08:57:42 +02:00
Alexander Larsson 906b3b5871 dir: When pulling/deploying an app, support xa.extra-data-sources
If the downloaded app has a "xa.extra-data-sources" property in
the commit, then we download these as part of the pull operation
and store the result in the commitmeta object in the repo.

Then during deploy we look at the xa.extra-data-sources properties
again and extract them from the commitmeta into /app/extra
in the app, and afterwards we run /app/bin/apply_extra in a minimal
sandbox that has read-write access to /app/extra, but nowhere else.

There are some complexities:

We need to re-verify when extracting, because the commitmeta is not
really signed, so we could have picked up random stuff there
from the upstream repo, or from an attacker misusing the system-helper
local install codepath.

When using the system-helper the pull will fail if the commitmeta
is to large, so we have some code in this case to manually transfer
the larger commitmeta on the side to the local-pull code.
2016-10-21 08:57:42 +02:00
Alexander Larsson f3c71cfbf8 build-export: Read Extra Data section and put in commit metadata
If you put a section like:

[Extra Data]
uri=https://sdk.gnome.org/gno%6De.flatpakrepo
checksum=ace1b504d32eefdf05b53044e6f785fe7886cc5657b5df034c3b9ac8e3aeb70c
size=1335
uri2=http://sdk.gnome.org/gedit.flatpakref
checksum2=d8baa109fb5fdcfe90379f3e93c5ab29f11772b42bf569bb3481e4aff489b0dd
size2=1472
name2=renamed.flatpakref

Then this information will be put in the commit object and the
later will be used when downloading the app.
2016-10-21 08:57:42 +02:00
Alexander Larsson daa2d79fd1 transaction: Fix error reportin in case an update fails 2016-10-20 14:26:38 +02:00
Alexander Larsson 9a45517536 update: Make --commit=ID actually download that commit
Before it would fail if the commit wasn't accidentally locally.
2016-10-20 09:15:10 +02:00
Alexander Larsson 1ea064c9b0 update: Add back support for --commit= 2016-10-19 18:12:50 +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 4c037b5381 install: Support http uris in install --from
This means you can do this:
     flatpak --user install --from https://sdk.gnome.org/gedit.flatpakref
2016-10-19 17:50:39 +02:00
Alexander Larsson f9c1cc40bb run: Support running a runtime directly
This means you can do:
  flatpak run org.freedesktop.Sdk
to get a shell in a sandbox with that runtime, but with an
empty /app.

You can also specify a particular runtime branch and command like so:
  flatpak run --command=ls org.gnome.Platform//3.22 /
2016-10-19 17:33:00 +02:00
Alexander Larsson 68a0e7f8f5 build-finish: Fix usage output
It was using the build-bundle output instead.
2016-10-19 12:53:16 +02:00
Alexander Larsson c70c453eab remote-add: Support installing .flatpakrepo files from http uri 2016-10-19 12:41:08 +02:00
Alexander Larsson 0999def431 uninstall: Only try to uninstall related apps that are installed 2016-10-19 12:41:08 +02:00
Alexander Larsson 28261d839e update/install: Install/Update runtime dependencies as needed
When an application requires a runtime that is not installed, search
for it and prompt for permissions to install it. Also, update required
runtimes when the app is being updated.
2016-10-19 12:40:49 +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 5c1bf1e3d9 Only override the default branch, if needed, after splitting a ref
Otherwise we'll be always trying to force the installation from the
default branch for a repo, regardless of whether the app being
installed is available for that branch.
2016-10-18 11:09:02 +01:00
Alexander Larsson 6345f0bae7 build-finish: Support exporting more than hicolor icons
We really want apps to be able to export e.g. HighContrast icons too.
2016-10-18 10:14:10 +02:00
Alexander Larsson e8cf8be8ab install: Check that runtime is installed before installing app 2016-10-17 17:54:35 +02:00
Alexander Larsson 9bb630d674 update: Don't reorder arguments 2016-10-17 17:33:10 +02:00
Alexander Larsson b2cc643f2c install: Actually handle more than two REFs 2016-10-17 17:28:28 +02:00
Alexander Larsson d248f0887b install: Don't print error if related refs were already installed 2016-10-17 17:28:09 +02:00
Alexander Larsson 8df193bc37 update: Fix completion of options 2016-10-17 17:27:34 +02:00
Alexander Larsson ee0ffbcb35 uninstall: Support multiple REFs 2016-10-17 17:27:16 +02:00
Alexander Larsson 5b11c03adc install: Don't override default_branch specified on commandline
Fixes issue pointed out in review at:
 https://github.com/flatpak/flatpak/pull/345
2016-10-17 12:34:32 +02:00
Alexander Larsson 0abdcd3f03 Merge pull request #345 from mariospr/issue221
Add server-side support for default-branch for remote repositories
2016-10-17 12:31:07 +02:00
Alexander Larsson d628350794 build-init: Support --base to create an application based on another 2016-10-17 11:37:19 +02:00
Alexander Larsson c1cc0b362a build-init: Factor out helper function copy_extensions() 2016-10-17 11:04:18 +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 44dcc77a18 Check and use the remote's default branch when installing flatpaks
If no branch is explicitly stated when installing a flatpak, and several
options (branches) are available for the same ID, we now check the remote's
default branch and use that one, if it's defined and available for the app.

https://github.com/flatpak/flatpak/issues/221
2016-10-14 16:42:17 +01:00
Mario Sanchez Prada 81d1bef4a0 Support --default-branch when updating the repository summary file
Add support for this flag in build-update-repo, so that we can define
a default branch in the server side, to be picked by the clients.

https://github.com/flatpak/flatpak/issues/221
2016-10-14 16:23:15 +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 70e9b2c737 update: Support specifying multiple arguments 2016-10-14 16:39:10 +02:00
Alexander Larsson 7018717ce2 install: Support installing multiple apps at the same time
Instead of using "NAME [BRANCH]" as the command list we now
support REF..., where each REF can be partial. This is easiest
explained by examples. Here are some valid refs:

  org.test.App - only app id
  app/org.test.App/x86_64/stable - full ref
  org.test.App/x86_64/stable - full ref without prefix
  org.test.App - only app id
  org.test.App//stable - only branch
  org.test.App/x86_64 - only arch

If any parts are left out they are wildcarded. Such parts are filled
first by looking at other command line arguments like --arch and
--app/--runtime. And finally by looking at what is available in the
remote. If there are multiple matches the user is told the options
in an error message.
2016-10-14 15:45:16 +02:00
Alexander Larsson c3606392aa common: Make flatpak_split_partial_ref_arg more regular and capable
Instead of in-place editing we return proper new strings. We
also handle kinds, both the defaults and supporting app/ and runtime/
prefixes.
2016-10-14 12:08:37 +02:00
Alexander Larsson c23316cb5d Add FlatpakKinds flag and use instead of booleans 2016-10-14 11:20:53 +02:00
Alexander Larsson 90bcc44e10 info: Minor cleanup 2016-10-06 12:31:54 +02: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 270707d5ca Make flatpak enter work
This completely regressed, and it seems complicated to fix it without
requiring extra privileges. So, the new version requires you to sudo
to run it, which is not great, but at least it makes it work for
all cases.
2016-09-28 20:20:17 +02:00
Alexander Larsson f9c11a8b55 Make "flatpak update --appstream" update for all branches
This fixes https://github.com/flatpak/flatpak/issues/331
2016-09-28 18:52:17 +02:00
matthiasclasen d8ee3c8e72 Merge pull request #235 from matthiasclasen/better-errors2
error message for flatpak build on non existing directory could be improved
2016-09-28 05:30:07 -04:00
matthiasclasen 92699d6fce Merge pull request #315 from matthiasclasen/better-errors
More decriptive "error: Build directory ... not finalized"
2016-09-28 05:27:56 -04:00
Alexander Larsson 4374b81174 Remove whitespace 2016-09-27 14:30:52 +02:00
Matthias Clasen 2c463d3751 Warn about extra arguments in flatpak build-import-bundle 2016-09-27 14:30:11 +02:00
Matthias Clasen 6cde704f0c Warn about extra arguments in flatpak build-init 2016-09-27 14:30:11 +02:00
Matthias Clasen 4bb8a2e0b6 Warn about extra arguments in flatpak build-sign 2016-09-27 14:30:11 +02:00
Matthias Clasen e8b05a2fa6 Warn about extra arguments in flatpak remote-ls 2016-09-27 14:30:11 +02:00
Matthias Clasen 0274bffac3 Warn about extra arguments in flatpak build-export 2016-09-27 14:30:11 +02:00
Matthias Clasen a9e6542354 Warn about extra arguments in flatpak document-unexport 2016-09-27 14:30:11 +02:00
Matthias Clasen fe5a4d724a Warn about extra arguments in flatpak document-list 2016-09-27 14:30:11 +02:00
Matthias Clasen e1a4e46650 Warn about extra arguments in flatpak document-info 2016-09-27 14:30:11 +02:00
Matthias Clasen c9bac3611f Warn about extra arguments in flatpak document-export 2016-09-27 14:30:11 +02:00
Matthias Clasen 361e90bdaa Warn about extra arguments in flatpak make-current 2016-09-27 14:30:11 +02:00
Matthias Clasen 4c0df29123 Warn about extra arguments in flatpak uninstall 2016-09-27 14:30:11 +02:00
Matthias Clasen cc82fd6da6 Warn about extra arguments in flatpak update 2016-09-27 14:30:11 +02:00
Matthias Clasen 902eae0ac6 Warn about extra arguments in flatpak install 2016-09-27 14:30:11 +02:00
Matthias Clasen 34e7158faf Warn about extra arguments in flatpak build-bundle 2016-09-27 14:30:11 +02:00
Matthias Clasen 6e679c4277 Warn about extra arguments in flatpak override 2016-09-27 14:30:11 +02:00
Matthias Clasen 23872464a0 Warn about extra arguments in flatpak info 2016-09-27 14:30:11 +02:00
Matthias Clasen 85f2f36baf Warn about extra arguments in flatpak remote-add 2016-09-27 14:30:11 +02:00
Matthias Clasen 689bd242d1 Warn about extra arguments in flatpak remote-delete 2016-09-27 14:30:11 +02:00
Matthias Clasen ab2280fa5c Warn about extra arguments in flatpak remote-list 2016-09-27 14:30:11 +02:00
Matthias Clasen 1e05119b63 Warn about extra arguments in flatpak list 2016-09-27 14:30:11 +02:00
Matthias Clasen 3d1f385148 Port remote-ls to FlatpakTablePrinter
This helps with consistent formatting.
2016-09-27 14:22:12 +02:00
Alexander Larsson 0501e1569c commit-from: Add "xa.commit-from" to the destination metadata
This is nice because it guarantees that we get a new commit id
which fixes various issues we had with conflicting commit ids
overriding each others signatures.
2016-09-27 12:39:44 +02:00
Alexander Larsson 8fa7f7fe09 Add --ostree-verbose
This enables debug logging for OSTree
2016-09-27 11:37:11 +02:00
Matthias Clasen 0e9125619c Improve an error message
When the build directory does not exist or looks uninitialized
in flatpak build, report a helpful message that points at
flatpak build-init.
2016-09-24 16:04:04 -04:00
Matthias Clasen 39e29f7cb1 Mention the commands to run in error messages
When complaining that a build directory has not been initialized
or finalized, mention the commands to do so.
2016-09-24 11:04:16 -04:00
Mario Sanchez Prada 0f005e7939 Fix typo and use the right function to get the system installation 2016-09-16 13:27:38 +00:00
Alexander Larsson dcfef2d29d install: Fix option args for --from
This doesn't have any args, since its type ARG_NONE.
This was causing commandline completion to add an "=" after --from
which isn't right.
2016-09-15 11:44:11 +02:00
Sebastian Rasmussen b21f4bf542 Prefer g_strerror() to strerror()
It handles encodins better, is thread-safe and more portable.
2016-09-15 01:22:54 +08:00
Alexander Larsson 14a11943bb update: Make --appstream work again
We need to handle opt_appstream before we try to parse the
given name as an app.
2016-09-14 16:22:55 +02:00
Matthias Clasen 06c7aca9f9 Make flatpak_is_valid_branch set a GError
Return detailed information about the problem with the branch in
the GError. Update all callers.
2016-09-13 13:28:42 -04:00
Timm Bäder f4bf8eb955 build-export: Add missing \n to g_print calls 2016-09-13 09:39:36 +02:00
Matthias Clasen b2b281e485 Make flatpak_is_valid_name set a GError
Return detailed information about the problem with the name in
the GError. Update all callers.
2016-09-12 23:25:54 -04:00
Alexander Larsson fba645a999 Remove unused local variables reported by clang 2016-09-12 11:11:35 +02:00
Alexander Larsson 7bd8bd472e Merge pull request #288 from muelli/sign
build-sign: fix short help message
2016-09-12 08:43:17 +02:00
Alexander Larsson 71500ae5ec Add support for .flatpakref files
These are similar to .flatpakrepo, but for a single app.

For example, if you have a file gedit.flatpakref with this:

[Flatpak Ref]
Title=GEdit
Name=org.gnome.gedit
Branch=stable
Url=http://sdk.gnome.org/repo-apps/
IsRuntime=False
GPGKey=mQENBFUUCGcBCAC/K9WeV4xCaKr3NKRqPXeY5mpaXAJyasLqCtrDx92WUgbu0voWrhohNAKpqizod2dvzc/XTxm3rHyIxmNfdhz1gaGhynU75Qw4aJVcly2eghTIl++gfDtOvrOZo/VuAq30f32dMIgHQdRwEpgCwz7WyjpqZYltPAEcCNL4MTChAfiHJeeiQ5ibystNBW8W6Ymf7sO4m4g5+/aOxI54oCOzD9TwBAe+yXcJJWtc2rAhMCjtyPJzxd0ZVXqIzCe1xRvJ6Rq7YCiMbiM2DQFWXKnmYQbj4TGNMnwNdAajCdrcBWEMSbzq7EzuThIJRd8Ky4BkEe1St6tuqwFaMZz+F9eXABEBAAG0KEdub21lIFNESyAzLjE2IDxnbm9tZS1vcy1saXN0QGdub21lLm9yZz6JATgEEwECACIFAlUUCGcCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEArkz6VV0VKBa5cH/0vXa31YgEjNk78gGFXqnQxdD1WYA87OYxDi189l4lA802EFTF4wCBuZyDOqdd5BhS3Ab0cR778DmZXRUP2gwe+1zTJypU2JMnDpkwJ4NK1VP6/tE4SAPrznBtmb76BKaWBqUfZ9Wq1zg3ugvqkZB/Exq+usypIOwQVp1KL58TrjBRda0HvRctzkNhr0qYAtkfLFe0GvksBp4vBm8uGwAx7fw/HbhIjQ9pekTwvB+5GwDPO/tSip/1bQfCS+XJB8Ffa04HYPLGedalnWBrwhYY+G/kn5Zh9L/AC8xeLwTJTHM212rBjPa9CWs9C6a57MSaeGIEHLC1hEyiJJ15w8jmY=

You can then install gedit with
  flatpak install --from gedit.flatpakref
2016-09-09 16:50:32 +02:00
Alexander Larsson 65a1ba186f bundles: Support updating from a bundle
Now:
 flatpak install --bundle $file
Will update the bundle if its already installed.
2016-09-09 14:54:38 +02:00
Tobias Mueller f75e5d117d build-sign: fix short help message 2016-09-08 15:35:02 +02:00
Alexander Larsson 352e761c0e run: Run dbus proxy under bubblewrap
This has two advantages. First of all (and most important) it
lets us put a /.flatpak-info file in it, so that the dbus peers
it talks to have the right "source" app id and sandboxed status.

Secondly, it lets us run the bus with readonly access to things,
thus being somewhat more secure.
2016-09-08 11:21:00 +02:00
Alexander Larsson 5bf37574f1 flatpak-info: Flatten the metadata to make it more easy to parse
The info file is always standalone, as it never needs to stack on top
of another context. This means we can remove all "negative" attributes
such as "shared=!network", making it easier to parse this file.
2016-09-07 14:32:10 +02:00
Alexander Larsson e1ad3a7a3c flatpak-info: Add application branch info
Note: This is only available in flatpak run, not flatpak build, where
this info is not available.
2016-09-07 12:31:56 +02:00
Alexander Larsson 0fc06022c8 flatpak-info: Add runtime path 2016-09-07 12:19:13 +02:00
Alexander Larsson e256bf7570 remote-add: Make internal function static 2016-09-06 15:40:11 +02:00
Alexander Larsson 3b90b00e39 build: Export a $XDG_RUN_DIR/flatpak-info file from flatpak build too
This way we know if we're in a sandbox or not even at build time,
and things like portal pickup etc, works.
2016-09-05 11:54:12 +02:00
Alexander Larsson a5536d0420 update: Don't stop the entire update if one app fails 2016-09-01 11:45:27 +02:00
Alexander Larsson e18ab46977 build-update-repo: Add some spew before starting the prune operation
This makes it more obvious what is happening, and which part is slow.
2016-08-29 12:06:16 +02:00
Alexander Larsson 874a67c721 Update: Don't double-call flatpak_dir_cleanup_removed
This is already called automatically from flatpak_dir_deploy_update.
In particular, in the system-installed case this will cause
a warning due to not being able to remove the old checkout with
permission denied.
2016-08-29 11:48:30 +02:00
Alexander Larsson d069ee808b builder: Make more of the validation warnings instead of errors
We don't want builds to break due to these, as we update flatpak
on the build servers. Also, use g_print instead of g_warning to
print the warnings.
2016-08-25 11:30:10 +02:00
Alexander Larsson e966d56543 Remove unwanted static deltas after summary is updated 2016-08-24 14:54:29 +02:00
Alexander Larsson 54c5f9a59e Allow specifying partial refs as name in commands
The commands: install, update, uninstall, info, make-current and run
now supports specifying a partial ref for the name. This is a different
way of specifying optional arch and branch arguments.

For instance org.app.App//master is the same as "org.app.App master" or
"--branch=master org.app.App".

This is useful if you're cutting and pasting from e.g. the list -d output.
2016-08-24 09:18:00 +02:00
Alexander Larsson 23c1c22266 commit-from: Support specifying multiple refs
You can list refs, or specify none to mean every source ref
2016-08-23 16:13:04 +02:00
Alexander Larsson 0a3ca96da0 Add --no-update-summary to export, commit-from and import-bundle
We want this for e.g. the build system where we will do multiple
repo operations and then atomically regenerate the summary once.
2016-08-23 15:12:27 +02:00
Alexander Larsson 6386ea3222 build-import-bundle: Update repo similarly to build-export
This makes sure we update the summary, as well as take args for
gpg keys and whether to update the appstream branch.
2016-08-23 14:57:08 +02:00
Alexander Larsson 783cfce518 repo-update: Better static delta creation
We now do the creation of static deltas in parallel, and we
also remove unneeded static deltas.
2016-08-23 10:49:54 +02:00
Alexander Larsson 6578d37984 Drop libgsystem dependency 2016-08-22 16:00:33 +02:00
Alexander Larsson be8dae4693 Convert to glxn_* console helpers instead of gs_* 2016-08-22 15:08:59 +02:00
Alexander Larsson fcffefee26 Replace openat() calls from libgsystem 2016-08-22 14:12:31 +02:00
Alexander Larsson b8a5a0092c build-init: Use flatpak_cp_a instead ofgs_shutil_cp_a 2016-08-22 13:59:00 +02:00
Alexander Larsson 65f1cf993d Create and use flatpak_file_get_path_cached
This is simpler that the one in libgs, as well as lockless. Also, it
removes one more use of libgs.
2016-08-22 10:22:42 +02:00
Alexander Larsson 9c907c992d Replace gs_shutil_rm_rf with small helper wrapper over libglnx 2016-08-22 10:06:08 +02:00
Alexander Larsson e0bd22bfe8 Add flatpak_mkdir_p helper and use it
This replaces all current callers of gs_file_ensure_directory with
equivalent code.

Actually, two instances were calling gs_file_ensure_directory with
FALSE, i.e. error out on EEXIST, but those cases seem fine with the
do-nothing-if-exists semantics.
2016-08-22 09:29:24 +02:00
Alexander Larsson 1976639153 flatpak: Add build-commit-from command
This creates new commits based on a different repo/branch. Very useful
to e.g. import and sign verified correct commits from an autobuilder
repo.
2016-08-19 17:24:03 +02:00
Alexander Larsson 6d7427f1f7 Simplify appstream branch generation error messages
This removes references to spawning appstream-builder, which we don't
call anymore.
2016-08-19 16:50:59 +02:00
Alexander Larsson bbf0a57589 build-export: Only warn for Exec lines that are not found
There are various cases where this is ok. For instance to start
a binary in the runtime, such as in:
  https://github.com/flatpak/flatpak/issues/260
2016-08-19 15:58:15 +02:00
Alexander Larsson db67edcc98 Fix validation of service files
We need to rewrite /app absolute paths just like we do for
desktop files.
2016-08-19 10:47:40 +02:00
Alexander Larsson 92d9d9e4dc Update: Fix crashed when updating runtimes
The debug spew were looking for the "current" ref, but there is
no such thing for runtimes, only apps.
2016-08-17 15:32:11 +02:00
Alexander Larsson c978377dd1 build-export: Don't fail desktpo validation for absolute pathnames in Exec= 2016-08-11 13:02:20 +02:00
Bastien Nocera 1bd1c73429 build: Better description for --runtime option
"non-devel runtime" isn't an expression in the Flatpak vocabulary, so
explain what it really does.
2016-08-06 16:43:47 +02:00
matthiasclasen fe133c7204 Merge pull request #233 from matthiasclasen/reduce-icon-validation
Reduce icon validation
2016-08-04 18:45:39 -04:00
Matthias Clasen d4fd5738f7 flatpak update: Improve output
Print out if an update did not do anything, and generally
improve the output.
2016-08-04 18:41:57 -04:00
Matthias Clasen eaebfd8cc2 Remove a misleading error message
NAME is not, in fact, required.
2016-08-04 18:39:11 -04:00
Matthias Clasen 8124016247 flatpak update: fail if not installed
Print a diagnostic and fail if the application or runtime
does not exist in flatpak update.
2016-08-04 15:48:45 -04:00
Matthias Clasen ecb3000e2e Reduce icon validation
While it is frowned upon nowadays, there are still applications
that use system-provided icons for the Icon field in their desktop
file.

Reduce the error to a warning to allow this for now.
2016-08-04 07:49:36 -04:00
Matthias Clasen b42bc359f6 Validate exports in build-export
Do some basic validation of the exported desktop files, service
files and icons.

Suggested by Bastien Nocera.
2016-07-29 18:41:25 -04: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
Alexander Larsson 003ef9ee2e Revert "Set up logging to the journal" 2016-07-29 00:24:43 +02:00
Matthias Clasen 003d96e3df Add an --arch option to flatpak list
This enables filtering by arch when listing installations.
2016-07-26 13:39:57 -04:00
Matthias Clasen a60f18c183 Add a --journal option to flatpak run
The --journal option takes one of the values yes, no, auto.
2016-07-25 10:36:00 -04:00
Matthias Clasen 40ae16ffeb Consistency fixes
Don't append a newline to flatpak_fail messages, we don't do that
in most places.
2016-07-23 14:42:58 -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 ad34562383 Translate main context summary
We need to use the translations, not just mark the strings
for extraction.
2016-07-23 11:20:28 -04:00
Matthias Clasen 43da58db5f Mark commandline options for translations 2016-07-23 11:01:50 -04:00
Alexander Larsson 51663de427 Remove unused variables 2016-07-01 14:45:53 +02:00
Alexander Larsson 5ab628d0ee Install/update/uninstall related refs
Any "related" references from the same remote are automatically
handled when installing, unless you specify --no-related.

The set of related refs is based on the declared extensions for
the main ref. By default, all such extensions are automatically
installed/updated unless they have "no-autodownload" set to false
in the extension info, and its not already installed locally.

Only extensions marked as "autodelete" will be automatically deleted
when you remove the main ref.

There is some special handling:

Any *.Debug or *.Locale extension is automatically treated as "autodelete".

A *.Locale extension that is autodownloaded will be subsetted using subpaths
such that existing subpaths are kept, and the current locale is added.
2016-06-30 16:55:32 +02:00
Alexander Larsson 853227a3d6 extensions: Minor cleanup
We now store the path to the extension files in the FlatpakExtension
returned from list_extensions instead of having each called look
them up.
2016-06-29 12:20:16 +02:00
Simon McVittie ee99e8afff Add BWRAP and --with-system-bubblewrap configure arguments
This lets distributors share a system copy of bubblewrap (>= 0.1.0)
between Flatpak and any other projects that benefit from it, if they are
careful to keep new versions in sync. The default is still to use the
bundled submodule, ensuring compatibility and simplifying dependencies.

Enable $PATH search everywhere that runs bwrap, so that $BWRAP doesn't
necessarily need to be a fully-qualified path.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-26 11:09:03 +01:00
Alexander Larsson 640bf9e69c remote-ls: Better multiarch support
By default, only show supported refs. Use --arch to limit it
to a specific arch, or --arch=* to list all.
2016-06-23 13:08:12 +02:00
Alexander Larsson db192586de make-current: Use find_installed_ref()
This means you don't have to specify the arch if you don't want.
It will still find supported apps.
2016-06-23 12:54:45 +02:00