Commit Graph

2445 Commits (2618a19716856d2b107acc0b5b63838e1379ef45)
 

Author SHA1 Message Date
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 62286cf779 Support runtime-less extra-data
This is going to be needed for the nvidia driver to solve
https://github.com/flatpak/flatpak/issues/595
2017-02-28 18:10:06 +01: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 44399bcf5f builder: Add only-arches and skip-arches for sources 2017-02-28 17:41:45 +01:00
Alexander Larsson 0379c01981 builder: Add build-arches and skip-arches to modules
This lets you avoid modules on some arches.
2017-02-28 12:07:53 +01:00
Alexander Larsson c3322fd9e9 builder: Add no-make-install to modules
This is useful for modules that don't have a make install rule.
You can use the new build-commands which is run after make to
create your own custom installation phase.

Fixes https://github.com/flatpak/flatpak/issues/458
2017-02-28 11:30:59 +01:00
Alexander Larsson 352eb84189 builder: Add builder_cache_checksum_compat_boolean 2017-02-28 11:29:39 +01:00
Alexander Larsson 0b448c5f68 builder: Handle chdir failures when spawning shell 2017-02-28 11:11:28 +01:00
Alexander Larsson 78b5c2fbf5 Fix error check when loading configuration 2017-02-28 11:06:06 +01:00
Alexander Larsson e9429d6759 builder: Silence unused return value warning 2017-02-28 11:05:01 +01:00
Alexander Larsson 9d9bd184c7 zero-mtime: Handle error when enumerating directory 2017-02-28 11:02:32 +01:00
Alexander Larsson d24c5f1423 run: Handle error when enumerating /etc 2017-02-28 11:00:01 +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 4db1e74090 utils: Fix flatpak_bundle_load typo
If we failed to look up the app metadata we would
clear out a different out argument instead.
2017-02-28 10:46:56 +01:00
Alexander Larsson b2b6dd3af2 Avoid possible null dereference
If the link fails to resolve the return value will be NULL, so we shouldn't use
it before checking for NULL.
2017-02-28 10:44:54 +01:00
Alexander Larsson e1e27559d1 utils: Fix list_unmtainained_refs
There was a stray goto out that caused it to only look at the first
element in the system dirs list.
2017-02-28 10:41:29 +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
Matthew Leeds 6d0f86d868 doc: Mention that flatpak-run can be used with runtimes
The ability to use flatpak-run to enter into a shell in a runtime was
added in flatpak 0.6.13 but the docs weren't updated to reflect that.
This commit updates the flatpak-run documentation to explain the
functionality.
2017-02-27 15:04:37 -06:00
Alexander Larsson 83600f7c1b builder: Always clone git repos with transport.fsckObjects
This way we detect any corrupt (or malicious) objects
2017-02-27 16:17:57 +01:00
Richard Hughes d2307ca8b1 Don't include newlines in error messages 2017-02-24 17:03:03 +00:00
Alexander Larsson aaf923bd37 builder: Use separate rofiles-fuse mounts for each module
We're doing a post-commit checkout directly to the app dir, which
means the fuse filesystem cache may get out of sync with the backing
directory. So, to ensure this doesn't happen we mount a fresh rofiles
fs for each build.
2017-02-24 14:16:12 +01:00
Alexander Larsson f8388e7fdf Don't print stderr/stdout from emergency fuse unmount 2017-02-24 14:16:12 +01:00
Alexander Larsson c0da3e49b9 builder: Use splice in rofiles-fuse mount 2017-02-24 14:16:12 +01:00
Alexander Larsson 576854fc7b tests: Make python mtime test modified file same size
This doesn't really affect the current test, but it makes
a difference for using python3 which also stores the size
in the cache.
2017-02-24 14:16:12 +01:00
Alexander Larsson 8983834f92 builder: Fix up .py[co] invalidation
Since we now only look at changed files we need to handle
the case where a .py file changed and the .pyc didn't, and
remove the now stale .pyc files.

Previously we looked at all files, so we detected this via
the stale .pyc file.
2017-02-24 14:16:12 +01:00
Thibault Saunier 75388609b3 scripts: Add a script to allow bisecting failures
The CLI is pretty similare to the `git bisect` one and works as follow:

  $ flatpak-bisect org.app.App start # Update application and get the history
  $ flatpak-bisect org.app.App bad # Sets current commit as first bad commit
  $ flatpak-bisect org.app.App checkout GoodHash # Checkout the first known good commit
  $ flatpak-bisect org.app.App good # Sets GoodHash as first good commit

... Here it starts bisection and checkouts a commit on the way, the user should launch the
app to check if the commit is good or bad and run:

  $ flatpak-bisect org.app.App good # if commit is good
  $ flatpak-bisect org.app.App bad # if commit is bad

flatpak-bisect will tell when the first bad commit is found.

Fixes https://github.com/flatpak/flatpak/issues/530
2017-02-23 17:41:06 +01:00
Richard Hughes 6125dabf58 Return the container from flatpak_get_system_installations()
This matches what other functions in libflatpak do, and also fixes a memory
leak in the error path.
2017-02-23 17:26:45 +01:00
Matthias Clasen a95dbc8e9b Document --from-git and --from-git-branch 2017-02-23 17:15:35 +01:00
Alexander Larsson 3556272094 CI: require ostree package too
The libs were split out into its own package
2017-02-23 17:11:51 +01:00
Alexander Larsson 4fdac9e5d4 document portal: Disable spice_read as it seems broken
We're getting "fuse: copy from pipe: short read" from
libfuse and a broken filesystem with this. See
https://github.com/flatpak/flatpak/issues/570

I've tried to look into if this is fixable, but I can't
really find any way we could do things differently that
may help, so the fix is to disable spice_read.
2017-02-23 16:55:49 +01:00
Mario Sanchez Prada d0b5b51076 Initialize g_autofree string to NULL, not to crash when early returning
Otherwise, anytime we fail in ostree_repo_write_metadata() will cause
an invalid free to happen, and flatpak to crash.
2017-02-23 14:27:22 +00: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 cc03a2b94b Don't remove origin remotes if some other ref uses it
This fixes https://github.com/flatpak/flatpak/issues/586
2017-02-23 13:52:35 +01:00
Alexander Larsson c07bc50779 Import NEWS entries from the 0.8 branch to master 2017-02-23 11:55:43 +01:00
Alexander Larsson 364499939d builder: Add --skip-if-unchanged
This lets you skip rebuilds unless the actual json changes.
This is useful for continuos builds that only run if the json
changes, not on any commit to any git source.
2017-02-22 15:12:59 +01:00
Alexander Larsson 90674fafa0 builder: Don't mirror submodules if told not to 2017-02-22 15:12:59 +01:00
Ray Strode a82708cb10 run: propagate wildcard xauth entries to app bundle
At the moment, flatpak applications are only given FamilyLocal family
xauth cookies from the Xauthority file.  This is so, the sandboxed
application doesn't inadvertently get access to displays on other
computers.

But FamilyLocal isn't the only xauth family that's local.  FamilyWild
entries can be local as well.

Furthermore, FamilyWild entries are preferable to FamilyLocal entries
when found, because they don't break if the system hostname is changed.

This commit makes FamilyWild xauth entries get propagated in the same
way as their FamilyLocal counterparts.
2017-02-22 14:47:14 +01:00
Alexander Larsson 61db31bb00 builder: Add ensure-writable to module 2017-02-22 09:48:00 +01:00
Alexander Larsson 2c71298d53 builder: Its break_hardlink, not unbreak_hardlink 2017-02-22 09:43:57 +01:00
Alexander Larsson 67dc4a153f builder: Add builder_cache_checksum_compat_strv
This lets us add strv:s without invalidating old caches
if the empty strv means same as before
2017-02-22 09:42:13 +01:00
Alexander Larsson 359d4fa96b builder: Add builder_cache_get_files() to get all files in cache 2017-02-22 09:41:40 +01:00
Alexander Larsson 082efe8951 Properly quote all commandlines we print
Fixes https://github.com/flatpak/flatpak/issues/236
2017-02-21 18:56:11 +01:00
Alexander Larsson d27799518d Fix no-systemd-user warning (it doesn't affect sandboxing anymore) 2017-02-21 15:41:43 +01:00
Alexander Larsson 608374e57a builder: Checksum cleanup-platform for platform 2017-02-21 15:09:50 +01:00
Alexander Larsson 1ca3c86552 builder: Add support for --from-git=URL
This allows you to build a json manifest that is stored in a git repo.

Closes: https://github.com/flatpak/flatpak/issues/511
2017-02-21 11:58:40 +01:00
Alexander Larsson b136e7fdc6 builder: extract git mirroring code to builder-git.c
This way we can resuse it outside the git source
2017-02-21 11:58:35 +01:00
Alexander Larsson e71e4221a9 builder: Separate run-dir and base-dir
We always put the state in the .flatpak-builder subdirectory of where
you ran flatpak-builder, independent on the location of the json
manifest. This makes sense in general, but is also extra important
when we want to check out the json from git inside the .flatpak-buidler
directory.
2017-02-21 11:50:58 +01:00