2846 Commits

Author SHA1 Message Date
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
Colin Walters
841e6c10a6 ci: Rework to be based on FAH + priv container
Installing build dependencies directly on a host should be
considered an anti-pattern.  Steal some of the bits from
rpm-ostree's PAPR bits.

Another benefit here is we avoid duplicating the build dependencies again, since
we start using `yum-builddep.

We only have one context now, `f25-primary`, rather than having Clang
show up as a separate thing, since IMO it's not worth its own context.
2017-06-15 09:02:45 +02:00
Colin Walters
7ba38095c0 ci: mv .redhat-ci.yml → .papr.yml
It's got a new name: https://github.com/projectatomic/papr
2017-06-15 09:02:45 +02:00
Matthias Clasen
cb9b113efe Merge pull request #847 from AsciiWolf/cs-update
Update Czech translation
2017-06-13 14:06:46 -04:00
AsciiWolf
9902461f3c Update Czech translation 2017-06-13 16:04:47 +02:00
Alexander Larsson
bc7ebd20e2 builder: Allow .pyc files without .py
This is common for binary-only releases, for example as described
in:
https://lists.freedesktop.org/archives/flatpak/2017-June/000697.html
2017-06-13 11:17:06 +02:00
Colin Walters
daf36ba2af dir: Ensure ~/.local/share/flatpak is 0700
This goes into a big old topic about Unix homedir permissions; it's not uncommon
for general purpose OS vendors to have homedirs be 0755. In that case,
applications need to ensure confidentiality for data requiring it (classically
e.g. `~/.ssh`) by making the dirs `0700`.

While most of the data in the flatpak per-user dir probably isn't confidential
(debatably) we have a different issue; if container content includes suid or
world-writable files/dirs, then having that data accessible to other users
is obviously problematic.

We're going to fix flatpak/ostree to not create files with those modes
to begin with, but this simple fix closes off the attack route for
the per-user directory.

A different fix will be necessary for the system-wide repo.

See: https://github.com/flatpak/flatpak/pull/837
2017-06-08 17:00:20 +02:00
Colin Walters
4714f55ebd dir: Ensure we return on pull error to avoid error-overwrites
Looking at the git history, this code originally retried on
some cases for pull, then stopped doing so, then a later commit
added code after it, which made it incorrect.

Just do an early return again and drop the `res` variable.
2017-06-08 09:42:40 +02:00
Alexander Larsson
e5aa73f4a5 build-export: Canonicalize file permissions
This canonicalizes the file modes for directories to 0755, and
for files to 0755 for executables or 0644 otherwise.

This means we never get files/dirs writable by non-root in the
system repo, and we never get setuid/setgid/sticky-bit, all
which could potentially be a problem if we store them in the
system repo.

See https://github.com/flatpak/flatpak/pull/837 for some discussion
about this.
2017-06-08 08:50:46 +02:00
Matthias Clasen
27761c17d6 Merge pull request #835 from smcv/generated-dbus
Don't distribute gdbus-codegen-generated source in tarballs
2017-06-06 16:06:37 -04:00
Matthias Clasen
4bd408a438 Merge pull request #836 from smcv/better-diagnostics
testlibrary: Call g_assert_no_error first
2017-06-06 15:49:33 -04:00
Matthias Clasen
f1ad969b16 Merge pull request #838 from pwithnall/minor-fixes
Various minor fixes
2017-06-06 15:38:23 -04:00
Philip Withnall
0888ec4701 builder-options: Fix setting CPPFLAGS
They were being set to an uninitialised set of flags from cxxflags.
Spotted as a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 20:09:16 +01:00
Philip Withnall
9ef301beeb ls-remote: Drop unused variable
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 20:09:07 +01:00
Philip Withnall
95106a34d5 xdp-main: Fix a typo in a comparison
This was almost certainly meant to be a logical AND, not a bitwise one.
As spotted from compiler warnings.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:43:09 +01:00
Philip Withnall
a4d366f0d5 xdp-fuse: Add parentheses to clarify precedence in a conditional
As suggested by the compiler.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:43:09 +01:00
Philip Withnall
c835b38423 doc: Remove duplicate list entry from flatpak-remote.xml
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:42:54 +01:00
Philip Withnall
8daef223bb utils: Fix minor formatting issue in gtk-doc comment
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:42:54 +01:00
Philip Withnall
a664fd136a dir: Fix a minor memory leak
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-06-06 19:42:54 +01:00
Simon McVittie
37e52409aa Don't distribute gdbus-codegen-generated source in tarballs 2017-06-05 21:53:17 +01:00
Simon McVittie
7612232ab8 testlibrary: Call g_assert_no_error first
Failing tests produce much clearer diagnostics this way round.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-06-05 21:48:59 +01:00
Alexander Larsson
123518143d Update pofiles 0.9.5 2017-06-05 13:52:23 +02:00
Alexander Larsson
ce2b51e729 Bump version to 0.9.5 2017-06-05 13:36:16 +02:00
Alexander Larsson
575628717a Update NEWS for relase 2017-06-05 13:35:56 +02:00
Alexander Larsson
4119de9eae build-commit-from: Don't copy old xa.ref in metadata
This caused installations of the new commit to break because the
first xa.ref was used, which was the old one.
2017-06-05 12:45:20 +02:00
Alexander Larsson
1d9fe6fbf3 run: Allow --filesystem=xdg-*/subdir:ro
We previously required the directory to be writable to expose
it in the app-specific directory. However, the file was already
made visible in the regular location, and it was explicitly requested
by the app, so not allowing it to be there read-only makes no sense.

In particular, this allows KDE apps to use
--filesystem=xdg-config/kdeglobals:ro to allow apps to pick up global
configurations such as theme, etc, in a safe way.
2017-06-01 11:03:20 +02:00
Alexander Larsson
75d884046d run: Allow regular files for --filesystem=xdg-config/path
KDE needs this to put ~/.config/kdeglobals into the sandbox
2017-06-01 10:50:22 +02:00
Matthias Clasen
ea7077fcd4 Merge pull request #825 from AsciiWolf/cs-update
Update Czech translation
2017-05-31 10:12:12 -04:00
Alexander Larsson
05f9c8730c builder: Add --export-only feature
This allows you to export a previous build, and still get features
like debug and locale extensions.

Fixes https://github.com/flatpak/flatpak/issues/824
2017-05-31 14:08:36 +02:00
AsciiWolf
586b3ceec5 Update Czech translation 2017-05-31 12:43:27 +02:00
Alexander Larsson
bd22ff8d42 dbus-portal: Fix return value type of filtered NameHasOwner
Fixes https://github.com/flatpak/flatpak/issues/817
2017-05-31 08:58:08 +02:00