Commit Graph
694 Commits
Author SHA1 Message Date
Alexander Larsson e9c6f30177 run: Add instance-path to .flatpak-info
This is the instance ~/.var/app/$appid dir
2018-04-04 17:25:59 +02:00
Alexander Larsson 74c4006dbe run: Add --sandbox
This runs the app in a very tight sandbox, with no access to anything
except /app and /run and some read-only host things like fonts and icons.

You can additionally add explicit permissions on the commandline,
like --share=network to actually grant some access.

This also sets $FLATPAK_SANDBOX_DIR to ~/.var/app/$appid/sandbox in the
environment.
2018-04-04 17:25:59 +02:00
Alexander Larsson 8570dcab85 run: Allow specifying an exact commit and runtime-commit
This also looks for removed but live deploys so that an app
can be re-started as long as it is live.
2018-04-04 17:25:59 +02:00
Alexander Larsson 43bcf38105 flatpak-info: Add instance-specific extra args
So, if you run your instance with e.g. flatpak run --filesystem=/some/dir
you can now see this. This will be useful in the restart yourself
portal as we can then inherit such permissions.
2018-04-04 17:25:59 +02:00
Alexander Larsson 513c0c36f5 update: Don't print appstream errors when quiet 2018-04-04 17:25:37 +02:00
Alexander Larsson 20c8420128 update: Fix updates of non-primary arches
When updating with no arch is specified we now update
appdata for all supported arches, and we don't look for
updates only of the primary arch.
2018-04-04 17:25:37 +02:00
Alexander Larsson 394130793c uninstall: Pick installation automatically
When uninstalling, if no specific installation was specified with e.g.
--user or --system, automatically chose any unique match, or error
out if there are multiple alternatives.

Fixes #1321
2018-04-04 17:25:20 +02:00
Alexander Larsson 3184a011c3 build-commit-from: Add --timestamp
This lets you override the timestamp from the source commits

Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Alexander Larsson b9d8aeb175 build-export: Use parse_datetime() for --timestamp
This allows you more flexibility for defining the timestamp and
makes it compatilb with ostree commit.

Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Alexander Larsson 222d7e2382 Import parse_timestamp() from ostree
Closes: #1538
Approved by: alexlarsson
2018-04-04 15:08:49 +00:00
Alexander Larsson bad8cc27f1 update: Complete from all installations
We currently auto-pick installation for update when you didn't pick
any specific one, so we should complete from all of them too.

Closes: #1537
Approved by: mwleeds
2018-04-02 20:33:09 +00:00
Alexander Larsson b223590b6e Make flatpak remove an alias to flatpak uninstall
Yum, dnf and apt all use "remove" as the opposite of install, so
to make it easier for people coming from these.

Closes: #1536
Approved by: mwleeds
2018-03-30 07:06:00 +00:00
Alexander Larsson 1840a7189c build-commit-from: Don't critical if commit has no commitmeta
Closes: #1524
Approved by: alexlarsson
2018-03-27 10:48:49 +00:00
Corentin Noël 9bc5b72457 app: Do not share the Error object in all completion tasks
Completion on my system was triggering an assertion error:
`ostree_repo_open: assertion 'error == NULL || *error == NULL' failed`

command:
`flatpak build-init build-dir bar.foo.Baz org.freedesktop.Sdk//1.6 org.freedesktop.Platform//1.6

Closes: #1491
Approved by: alexlarsson
2018-03-16 16:08:08 +00:00
Matthew Leeds 2051c77d27 remote-ls: Skip disabled remotes
The remote-ls command should skip remotes that have "xa.disable" set to
true or have no URL set, which can happen for remotes added for flatpak
bundle files.

Fixes https://github.com/flatpak/flatpak/issues/1427

Closes: #1457
Approved by: alexlarsson
2018-03-15 10:20:11 +00:00
Matthew Leeds 03387a7b58 remotes: Show the collection ID for each remote
If the --show-details option is passed to the remotes command, show the
collection ID for each remote, which the user might need to know if
they're using flatpak's P2P support.

Closes: #1458
Approved by: alexlarsson
2018-03-15 10:12:50 +00:00
Sam Spilsbury 817f020db3 run: Add option to disallow a11y bus proxying
This isn't needed for servers and starting the a11y bus on a
fresh session bus takes upwards of 15 seconds.

Fixes #1471

Closes: #1486
Approved by: alexlarsson
2018-03-15 09:43:00 +00:00
Patrick Griffis 45d1caa4cd search: Don't duplicate apps with different arches
Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Patrick Griffis 80d53028ba search: Minor cleanups
We don't need to duplicate the store for each arch only each
remote.

Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Matthew Leeds d5b4443ef3 search: Search all supported architectures
Currently the search command only searches remotes for apps and runtimes
that match the host architecture. This commit makes flatpak include all
supported architectures so for example you can see a 32-bit app on a
64-bit computer.

Fixes https://github.com/flatpak/flatpak/issues/1353

Closes: #1430
Approved by: alexlarsson
2018-02-19 08:21:39 +00:00
Alexander Larsson 6a6e25623a Fix flatpak build on atomic
On atomic, /home is a symlink to /var/home, which caused
problems in flatpak build when granting access to the homedir.
Due to a previous workaround (in 1aadc3ee40) we
make /var in the flatpak build sandbox be completely overridden
with $builddir/var so that the above symlink would not cause problems
in the persisted directory.

However, when we actually *want* to give access to that symlink this
causes problem.

In general, exposing /var in the sandbox has two uses:

 * Allowing persisting tmpfiles in /var/tmp between individual
   flatpak build commands (/tmp is per-build-command).
 * Creating flatpaks from packages, such as rpms, where
   we want to keep the rpm database (/var/lib/rpm) around during
   the entire build so that dependencies can be resolved.

In order to handle these /var/home issues while still allowing
the above issues we instead persist only /var/tmp and /var/lib.

Fixes https://github.com/flatpak/flatpak/issues/1407

Closes: #1421
Approved by: alexlarsson
2018-02-16 08:07:55 +00:00
Alexander Larsson 237b8ca9ff commit-from: Also copy/convert existing static deltas
When copying a commit, also bring forward any static deltas.
This is particularly interesting for flathub where we can
then generate static deltas on the build machines and then import
and sign it on the repo machine.

Closes: #1409
Approved by: alexlarsson
2018-02-13 14:30:50 +00:00
Patrick Griffis 00e13ff0bd build-bundle: Add --from-commit option
This allows building smaller bundles that are deltas
from a specific commit.

Closes: #1394
Approved by: alexlarsson
2018-02-12 14:48:08 +00:00
Matthew Leeds 6ed65fec8e build-export: Fix use of uninitialized memory
This fixes build-export so that it doesn't try to use uninitialized
memory in a timestamp object when creating appstream data. Before the
--timestamp option existed, a timestamp of 0 was used, so fall back to
that. Also, update a relevant comment.

Closes: #1408
Approved by: alexlarsson
2018-02-12 13:54:29 +00:00
Matthew Leeds 6e689bf06f search: Don't print anything when updating appstream data
For the "flatpak update" it makes sense to print a message when updating
the appstream data for each remote, but it makes less sense for the
search command, because it's output should just be the table of results.

Closes: #1352
Approved by: alexlarsson
2018-02-09 11:24:41 +00:00
Matthew Leeds 1b8c6e5ce9 app: Add more debug output
Closes: #1352
Approved by: alexlarsson
2018-02-09 11:24:41 +00:00
Matthew Leeds 5ec98e788f search: Only update appstream data if it's old
Updating the appstream data on every invocation of the search command
involves a lot of overhead, so instead only update it if it's at least a
day out of date. This is consistent with how tools like dnf work.

Closes: #1352
Approved by: alexlarsson
2018-02-09 11:24:41 +00:00
Matthew Leeds ab53313713 search: Update appstream data before searching
This commit changes the search command to update appstream data from
each remote before searching it for the specified text. This way
users don't need to know to run "flatpak update --appstream".

Fixes https://github.com/flatpak/flatpak/issues/1339

Closes: #1352
Approved by: alexlarsson
2018-02-09 11:24:41 +00:00
Matthew Leeds 9d87ef794d app: Move update_appstream to flatpak-builtin-utils.c
Move the update command's update_appstream function to flatpak-utils.c
so other commands can use it.

Closes: #1352
Approved by: alexlarsson
2018-02-09 11:24:41 +00:00
Matthew Leeds b80191fdcd app: Print a warning if xa.metadata doesn't exist
All flatpaks built using version 0.9.4 or newer should have the
xa.metadata field in the commit metadata, so warn if it doesn't exist.

This commit changes the info command to print a warning rather than
nothing and changes the info-remote command to print a warning rather
than error out.

Closes: #1351
Approved by: alexlarsson
2018-02-09 11:08:40 +00:00
Matthew Leeds 728bb4d02e info: Show collection ID if available
If flatpak is compiled with P2P support and the commit in question has a
collection ID in its metadata, show it.

Closes: #1351
Approved by: alexlarsson
2018-02-09 11:08:40 +00:00
Alexander Larsson f2a6c1db8d Remove document portal
This is now in xdg-desktop-portal. We keep a version of the document
portal dbus XML so that we avoid weird build dependencies.

Flatpak itself is technically not dependent on the document portal,
but it is very much recommended that you use it.

Closes: #1398
Approved by: alexlarsson
2018-02-09 09:23:26 +00:00
Alexander Larsson 4a369285a2 info: Add support for flatpak info --file-access
This allows you to see if a particular app has access
to a specific path.

Closes: #1387
Approved by: alexlarsson
2018-02-07 08:06:34 +00:00
Alexander Larsson ff945320aa Add info --show-permissions
This shows the active permissions for the app, including any overrides.

Closes: #1387
Approved by: alexlarsson
2018-02-07 08:06:34 +00:00
Matthew Leeds 32723a2b1d doc: Fix build-bundle docs
The build-bundle command takes a repository directory, not a build
directory.

Closes https://github.com/flatpak/flatpak/issues/1382

Closes: #1385
Approved by: alexlarsson
2018-02-06 09:10:42 +00:00
Robert McQueen a088c2b33d flatpak remote-ls -u: only consider apps from the current remote
Check that the origin from the deploy matches the current remote
before listing it as an upgrade.

Closes: #1373
Approved by: mwleeds
2018-02-02 05:37:52 +00:00
Alexander Larsson 3c9d3a316e Fix incorrect error message in update --appstream
When the specified remote existed, but had no updates we printed
a message like:  error: Remote "flathub" not found

Closes: #1363
Approved by: alexlarsson
2018-01-30 10:54:28 +00:00
Matthew Leeds 6c9d43d67f remote-info: Show collection ID if available
If flatpak is compiled with P2P support and the commit in question has a
collection ID in its metadata, show it.

Closes: #1312
Approved by: alexlarsson
2018-01-24 09:58:16 +00:00
Matthew Leeds bf07d6b596 remote-info: Fix --show-metadata behavior
When the --show-metadata option is used with remote-info, the metadata
variable is never initialized, causing flatpak to print "(null)". This
commit makes sure the variable is properly initialized so the metadata
prints correctly.

Closes: #1313
Approved by: alexlarsson
2018-01-24 09:48:51 +00:00
Matthew Leeds d9e4041eb1 app: Fix "multiple installations" prompt
When a remote is found in multiple installations and we ask "Which do
you want to use (0 to abort)?", the 0 choice isn't working because the
min value in the call to flatpak_number_prompt() was set to 1. Fix that
so the user can abort if they want.

Fixes https://github.com/flatpak/flatpak/issues/1305
2018-01-14 23:33:43 -08:00
Philip Withnall 6f5fef5501 app/main: Fix error handling for getting system dir list
The error wasn’t being propagated properly, leading to a NULL pointer
dereference.

Coverity CID: 1463075

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1267
Approved by: alexlarsson
2017-12-20 13:03:37 +00:00
AsciiWolf 9e92bef562 main: Fix typo in translatable string
Closes: #1260
Approved by: mwleeds
2017-12-15 23:52:54 +00:00
Alexander Larsson 659b02011a install: Support local paths/uris
If the remote is a local path (absolute or relative starting with ./)
then we convert this to a file: uri, which are now supported to
install directly from a local repo.

This is very useful when testing locally built apps.

Closes: #1244
Approved by: alexlarsson
2017-12-14 09:27:22 +00:00
Alexander Larsson 6e17756db6 install: Handle passing a file: uri as remote
Closes: #1244
Approved by: alexlarsson
2017-12-14 09:27:22 +00:00
Alexander Larsson 3ade86b292 install: Add --reinstall
If you're installing something and its already installed, we undeploy
the old install first before deploying the new. This makes it very
easy to switch an application from one remote to another, without
having to uninstall first, which is both painful and could cause
the download to be unnecessary large.

Closes: #1241
Approved by: alexlarsson
2017-12-14 09:04:38 +00:00
Alexander Larsson 97683cfbe1 override: Support global overrides
This lets you add overrides that affect all applications. Application
overrides have higher priority so will override the global overrides.

Closes: #1245
Approved by: alexlarsson
2017-12-14 08:49:23 +00:00
Alexander Larsson 2d1c4fd72b build-export: scan repo for hardlinks on commit
This is a no-op on regular (archive) repos, but on bare repos it is
an optimization if the source is a checkout from the repo. This
happens in flatpak-builder (https://github.com/flatpak/flatpak-builder/pull/81)
when it commits the build to the cache during --install without --repo.

Closes: #1249
Approved by: alexlarsson
2017-12-14 08:37:23 +00:00
Alexander Larsson 4e9c031005 update: Add information on wheter updates are per-user
Now that flatpak update does both per-user and systemwide
per default it makes a lot of sense to say which one is being
updated.

Closes: #1248
Approved by: alexlarsson
2017-12-14 08:20:34 +00:00
Alexander Larsson 62df4e083f update: Don't print progress when pulling appstream
This is just noise, these should not be large.

Closes: #1248
Approved by: alexlarsson
2017-12-14 08:20:34 +00:00
Alexander Larsson d56491766b update: Only update appstream if there are changes
This way we don't even pull if the summary has the same version
as the local version.

Closes: #1248
Approved by: alexlarsson
2017-12-14 08:20:34 +00:00