2877 Commits

Author SHA1 Message Date
Alexander Larsson
9a19ea7c13 Update pofiles 0.9.7 2017-06-30 23:08:15 +02:00
Alexander Larsson
67a568d513 Bump version to 0.9.7 2017-06-30 22:56:59 +02:00
Alexander Larsson
305512ba17 Update NEWS for release 2017-06-30 22:56:43 +02:00
Simon McVittie
8e03e7b719 build: Re-run gdbus-codegen if the Makefile changes
Changes to the Makefile could include changes to the options passed
to gdbus-codegen, which would invalidate the output.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:21:06 +02:00
Simon McVittie
f4c4abfb1e build: Only run each instance of gdbus-codegen once
A rule of the form

    foo.c foo.h: foo.in
        some-generator --output=foo foo.in

is essentially equivalent to writing the same rule once for each target:

    foo.c: foo.in
        some-generator --output=foo foo.in
    foo.h: foo.in
        some-generator --output=foo foo.in

In a parallel build, this can result in some-generator being run more
than once with the same inputs and outputs, leading to unpredictable
results if the outputs are overwritten in-place by two parallel copies
(particularly if the generator does not use the standard atomic-writing
trick of writing out a temporary file and renaming it over the top of
the intended name, which gdbus-codegen does not).

gdbus-codegen happens to write the .h file before the .c file, so
use the real build rules to generate the .c file, and consider the
.h file to be a side-effect.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:21:06 +02:00
Simon McVittie
8776d3c1f8 build: Check for system extensions before any other C compiling
AC_USE_SYSTEM_EXTENSIONS issues warnings unless it is the first
attempt to compile C code.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:18:22 +02:00
Simon McVittie
de8d982b40 .gitignore: Ignore all generated man pages
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:17:54 +02:00
Simon McVittie
501399a808 dbus-proxy: Don't clear dbus_address twice
It's sufficient to g_free it, which we do further down finalize().
This is not a double-free, because we used g_clear_pointer(),
but it's redundant.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:17:38 +02:00
Simon McVittie
c02920f28c dbus-proxy: Make miscellaneous globals static
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-06-30 21:17:38 +02:00
Alexander Larsson
d7d82d1f2a builder: When bundling git sources, reuse cache
Fixes https://github.com/flatpak/flatpak/issues/885
2017-06-30 18:00:14 +02:00
Philip Withnall
55ca5a9662 common/dir: Factor out body of update_remote_configuration_for_summary()
This will make it easier to add another version in upcoming commits
which gets the updated configuration from another source (an
ostree-metadata branch).

This commit introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 16:06:50 +02:00
Philip Withnall
07607e3e00 common/dir: Factor out common code to get and load the summary file
There was already a convenience method for this,
fetch_remote_summary_file(), but it wasn’t used uniformly throughout the
file. This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 16:06:50 +02:00
Philip Withnall
a8ad392750 common/dir: Factor out common code for getting repo metadata
There are several places which query keys in the metadata in the summary
file. Factor out a common function to do that, and write it in such a
way that it could be extended to read the metadata from somewhere else
in future (the plan being that metadata will move to an ostree-metadata
branch rather than the summary file).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 16:06:50 +02:00
Philip Withnall
7a550f2f68 build: Include config.h using CPPFLAGS
This ensures it’s always included in the build, regardless of whether
someone forgets to #include it from a C file.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 13:41:38 +02:00
Philip Withnall
15bc368188 builder: Rearrange args to do_export() to make mandatory ones obvious
Previously, the mandatory location, directory and branch positional
arguments were passed as part of the varargs. This meant the varargs
were conflating flags and positional arguments, making it harder to add
new positional arguments.

Move the mandatory positional arguments to separate parameters for
do_export(). This introduces no functional changes, but makes later
commits easier.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 13:41:38 +02:00
Emmanuele Bassi
4aa4f91a1f Add nullable annotations for progress callbacks
The progress callback arguments in the Flatpak.Installation installation
and update methods are nullable, so we should annotate them as such.
2017-06-30 10:32:14 +02:00
Philip Chimento
86bc5f39be builder: Use build-args during cleanup
Any build-args specified in the manifest should be used during the
cleanup and platform-cleanup stages. This is because if you are using
QEMU to build for another architecture, for example, you need to pass
--bind-mount in the build-args, and the bind mount also needs to be
present while running cleanup commands.
2017-06-30 10:23:52 +02:00
Philip Chimento
3b6f018809 docs: Remove --version from flatpak-build docs
This is not an option in flatpak-build; `flatpak build --version` prints
an unknown option error message.
2017-06-30 10:19:24 +02:00
Philip Withnall
c0837b8179 common: Split out self and repo arguments for a static function
This introduces no functional changes; it will simplify upcoming
commits.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 10:17:34 +02:00
Philip Withnall
2c931a9267 app/repo: Factor out common GVariant operation
Factor out a common GVariant child getter from all the print_*()
functions. This will make upcoming changes a little easier to integrate.

This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 10:17:34 +02:00
Philip Withnall
5a0e10969f tests: Add base-64 GPG keys to libtest declarations
These will be useful in upcoming tests, as they are in the right format
to be substituted into a .flatpakref file.

Generated using `gpg2 --homedir test-keyring --armor --export
${FL_GPG_ID}`, then stripping the packet header and removing line
breaks.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 10:17:34 +02:00
Philip Withnall
0062cf69c0 tests: Add TEST_SKIP_CLEANUP env var for skipping test cleanup
This mirrors the same environment variable in OSTree’s unit tests, which
keeps the temporary directory around after tests have completed (or
failed) so the developer can examine it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-30 10:17:34 +02:00
Ankur Sinha (Ankur Sinha Gmail)
ceccd281c3 Fix example 2017-06-28 10:51:43 +02:00
Matthias Clasen
eff5a1b800 Merge pull request #865 from yurchor/master
Update Ukrainian translation
2017-06-27 14:08:16 -04:00
Philip Withnall
e3cac586bb common: Use bulk OstreeAsyncProgress API for setting keys
This results in one ‘changed’ signal emission rather than several at
once.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-26 16:42:54 +02:00
Alexander Larsson
7bc44f0903 builder: Allow building modules with no sources if buildsystem=simple
This makes a lot of sense to have for simple things like just directly
modifying the /app root.
2017-06-26 12:19:17 +02:00
Yuri Chornoivan
497a79aea0 Update Ukrainian translation 2017-06-24 15:54:37 +03:00
Yuri Chornoivan
246c3df57f Fix merging conflict 2017-06-24 15:53:31 +03:00
Simon McVittie
f71167e7ec One more try at not distributing gdbus-codegen-generated sources
Signed-off-by: Simon McVittie <smcv@debian.org>
2017-06-21 16:08:37 +02:00
Alexander Larsson
821851dcb2 flatpak_dir_read_latest: Return NULL, not FALSE on error 2017-06-21 10:23:20 +02:00
Alexander Larsson
5545293c6e update pofiles 0.9.6 2017-06-20 14:53:57 +02:00
Alexander Larsson
5e893f7e4a Update version to 0.9.6 2017-06-20 14:45:27 +02:00
Alexander Larsson
5404a3a710 Update NEWS for release 2017-06-20 14:44:58 +02:00
Alexander Larsson
1b584b42da builder: Inherit parent version for inherited extension
If you inherit an extension, and it has no explicit version, then
use the version of the parent, as that is what would automatically
be used for the parent.
2017-06-20 11:11:41 +02:00
Alexander Larsson
06b14a8960 export: Record flatpak version in default commit version 2017-06-20 09:45:26 +02:00
Alexander Larsson
9777ade7e4 builder: Add ExtensionOf group to created extensions (Debug/Locale) 2017-06-19 21:19:49 +02:00
Alexander Larsson
1820ebdc72 builder: Better handling of default-branch
Instead of constantly looking at the option we change the
manifest value if its unset. This means we can access the
default branch outside of builder-main.c, and that we get
it into the serialized manifest in the build.
2017-06-19 21:16:46 +02:00
Alexander Larsson
7ef78c8e2b tests: Increase timeouts waiting for file notification
For whatever reason .5 seconds was not enough time for me
to get a file notification message, so increase it to 1 sec.
2017-06-19 19:41:32 +02:00
Alexander Larsson
0bbb8354dc tests: Add tests for no world writable dirs & no setuid files 2017-06-19 19:41:00 +02:00
Alexander Larsson
67ffd9a0b6 Manually copy summary for update and appdata too 2017-06-19 15:01:19 +02:00
Joaquim Rocha
00802cc710 Re-create the cache repo if it is not bare-user
We need to re-create the cache repo if it has not been previously
configured as bare-user, so it avoids permissions related issues.
2017-06-19 14:34:43 +02:00
Joaquim Rocha
bfea681ad1 Force the cache repo to use the bare-user mode
Unless forced by the FLATPAK_OSTREE_REPO_MODE env var, we default cache
repos to bare-user mode. Otherwise it can lead to permissions problems
because, e.g. if the system repo is configured as a "bare" repo, then
the cache repo will be too and this will lead to fchown calls even if
the user is non-privileged.
2017-06-19 14:34:43 +02:00
Alexander Larsson
a21a8e0465 run: Fix use-after-free in case you were exporting the same path twice 2017-06-19 14:32:48 +02:00
Alexander Larsson
e987d92ad0 install: Manually save summary[.sig] in cache repo
With the latest ostree, pull --mirror does not mirror the
summary for partial pulls, so system-wide installs fail. We
fix it by manually updating the summary.
2017-06-19 13:09:33 +02:00
Alexander Larsson
87081cc47d Unless forced via FLATPAK_OSTREE_REPO_MODE user bare-user for cache repo
This way we don't break if some commit is not canonical when we
import to the system repo.
2017-06-19 12:56:02 +02:00
Alexander Larsson
8c6f31f9a8 builder: Add inherit-extensions features
This lets runtimes like the gnome and kde one easily inherit
extension points from the parent sdk.
2017-06-19 10:58:49 +02:00
Alexander Larsson
504a3a25ea info: Make --show-metadata machine parseable
This is useful mainly to parse the keyfile, and is not very
nice for pretty output.
2017-06-19 10:58:09 +02:00
Alexander Larsson
66e60be49d Default to bare-user-only repo
This means we work on systems without xattrs
Old installations keep using bare-user, and you can use
FLATPAK_OSTREE_REPO_MODE=user to force it.
2017-06-16 12:20:49 +02:00
Colin Walters
1e07f79b57 Use new libostree APIs to reject world-writable/suid content
This uses the new libostree APIs that landed recently to ensure
that we reject any files with mode outside of `0775` for system
helper pulls, and we also mask directory modes during checkout.

However, this does *not* fix up any already downloaded content.
For that, one could uninstall/reinstall; or a future patch could
do a one-time fixup pass.

Note that I am not aware of a way for flatpak applications to escalate their
privileges directly with this flaw; the bubblewrap `PR_SET_NO_NEW_PRIVS` turns
of setuid. However, in combination with code execution on the host via another
mechanism (e.g. unsandboxed app), a setuid app injected could be used to gain
full host privileges.

At this time we're not aware of any flatpak content exploiting this issue.

Closes: https://github.com/flatpak/flatpak/issues/845
2017-06-15 16:40:17 +02:00
Colin Walters
e50deccdd3 ci: Build ostree from git master
To assist https://github.com/flatpak/flatpak/pull/848
2017-06-15 09:02:45 +02:00