2501 Commits

Author SHA1 Message Date
Alexander Larsson
a64fa115bb Update pofiles 0.9.2 2017-04-05 09:56:23 +02:00
Alexander Larsson
6c5a662da7 Bump version to 0.9.2 2017-04-05 09:52:30 +02:00
Alexander Larsson
585815ca59 Update NEWS for release 2017-04-05 09:51:00 +02:00
Alexander Larsson
3f9e72c793 builder: Support sdk-extensions also for apps
For apps this just means we ensure that the required sdk extension are
available.
2017-04-04 15:52:36 +02:00
Alexander Larsson
fae922584c builder: Add commit property to git source
If branch is unset this is just a nicer way to set a
particular commit. However if both are set, then we verify
that the branch/tag is at that particular commit. This is
a nice way to document that we want to use a particular tag
but still protect against the tag changing or a MITM attack
modifying what that tag means.
2017-04-04 15:21:11 +02:00
Alexander Larsson
3459ef8655 builder: Add disable-fsckobjects to git sources
This lets you work around clone problems for broken
git repositories.

Fixes https://github.com/flatpak/flatpak/issues/661
2017-04-04 14:31:48 +02:00
Simon McVittie
646b4c468b Use correct format string for guint64 on 32-bit
Signed-off-by: Simon McVittie <smcv@debian.org>
2017-04-04 12:17:28 +02:00
Simon McVittie
af3e9ecffd Build with large file support
gpgme is built with large file support by default, and checks that
its ABI (size of off_t) matches the ABI expected by library users
like flatpak. This caused build failures on Debian i386 and powerpc.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-04-04 12:17:28 +02:00
Emmanuele Bassi
8bbcf0b23b Use ostree's BARE_USER_ONLY flag (#674)
* Use ostree's BARE_USER_ONLY flag

Now that Ostree has a 'bare user only' mode for repositories, we should
use it.

This allows installing Flatpak run times inside different Docker layers.

Original patch by: Alexander Larsson <alexl@redhat.com>
Tested-by: Emmanuele Bassi <ebassi@gmail.com>

* Use the parent mode when creating a child repo

Instead of hard coding the repository mode, query the parent's mode.

* Gate bare-user-only repo creation behind an environment variable

We keep the default of bare-user repositories, but with an environment
variable we change new repositories to bare-user-only.
2017-04-03 16:31:18 +02:00
Piotr Drąg
31364707d5 Update Polish translation 2017-04-03 10:09:26 +02:00
Alexander Larsson
0dcc7332f7 Handle uris better when detecting .flatpak[repo,ref] suffix
We fully parse the argument as (possibly) a uri, which means
we can handle an argument like:
 https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-builder.flatpakref?h=stable

Which doesn't work with a simple has_suffix call.
This is important because the flatpak.org site now references
these kinds of uris.

Fixes https://github.com/flatpak/flatpak/issues/659
2017-04-03 10:02:28 +02:00
Alexander Larsson
3ff6d312de update: Only allow downgrades if a commit is explicitly specified
If you run "flatpak update" then we will never update to
a commit that is older than the currently installed one. This
protects against a man-in-the-middle attack that would otherwise
let the attacker downgrade to a previously signed version that
may have some vulnerability.
2017-04-03 09:45:45 +02:00
Alexander Larsson
266b9cb6f0 system-helper: Fix check for downgrade
We never want the system-helper to downgrade. If you want to run
not-the-latest version you need to be "real root". However, the
check for this was broken, as it compared the new commit with the
new commit, which was always ok. Instead check the timestamp
on the new commit with the current one.
2017-04-03 08:53:44 +02:00
Alexander Larsson
6a63a905bf dbus-proxy: Fix leak in setup phase
Sometimes we get an EAGAIN error in the due to the socket being
nonblocking. In the setup phase we just allocated the new buffer
and this causes a leak. Free it in this case.
2017-03-31 13:06:44 +02:00
Alexander Larsson
a87c15da87 dbus-proxy: Fix leak of get_arg0_string return value
In one place this was not freed. This converts both current
callers to g_autofree to make it consistent.
2017-03-31 13:06:44 +02:00
Alexander Larsson
0c05d48aca dbus: proxy fix leak in get_arg0_string
g_variant_get_child_value returns a new reference, so we have to free
it.
2017-03-31 13:06:44 +02:00
Alexander Larsson
18a45712cc dbus-proxy: Fix use-after free in header parsing
The header returned from parse_header contains references
to the buffer it was used to parse from, and in some
cases we dereference these headers after freeing the buffer.
For instance this happens when we're filtering a message, and
then we later look at the destination to figure out what
kind of error to send back.

I couldn't find any cases where this would let the client
do anything other than return a different error value, but
this is still possibly a security issue.
2017-03-31 13:06:44 +02:00
Alexander Larsson
557f9231a2 dbus-proxy: Make Buffer refcounted
This will be needed to fix some user-after-free issues.
2017-03-31 13:06:44 +02:00
Bartłomiej Piotrowski
ac8ef8f36f builder: make appstream-compose failure fatal 2017-03-30 15:48:38 +02:00
Alexander Larsson
41d9717113 Fix unused variable errors reported by clang 2017-03-30 10:01:24 +02:00
Alexander Larsson
f42a4d735b Fix ostree autoptr checks for git master
The export g_autoptr changes in ostree will be in the release 2017.4,
but the gnome CI is currently failing due to them also being in current
git master which is called 2017.3 atm. We fix this by checking against
2017.3 instead, which is safe, because the actual OSTREE_CHECK_VERSION
macro was added after the 2017.3 release too.
2017-03-30 10:01:24 +02:00
Alexander Larsson
ea114f5d6c CI: Add gpgme-devel to CI build environment 2017-03-30 10:01:24 +02:00
Matthias Clasen
a749602aee Split the manifest file docs off
Instead of one mega flatpak-builder man page, move the
file format documnentation to its own man page in the
right section, and shorten the flatpak-builder one.
2017-03-30 09:15:05 +02:00
Colin Walters
d40df323b4 utils: Prepare for libostree 2017.4 defining autocleanups
See: https://github.com/ostreedev/ostree/pull/756
2017-03-29 21:06:09 +02:00
Alexander Larsson
da4ea44e41 OCI: Use gpg signatures in tests-oci.sh 2017-03-29 18:04:54 +02:00
Alexander Larsson
7a6a109720 OCI: Fix signature checks on updates
We can't support updating to a specified digest, we must
always look in the index so that we can find the signature.
2017-03-29 18:04:13 +02:00
Alexander Larsson
5b0ad227e8 OCI: Verify signatures 2017-03-29 17:14:36 +02:00
Alexander Larsson
68035c1e4e OCI: Support signing build-bundld --oci output 2017-03-29 17:14:36 +02:00
Alexander Larsson
a7216cedd2 OCI: Add json format for atomic-based signatures 2017-03-29 17:14:36 +02:00
Alexander Larsson
5aeec78311 OCI: Add support for strict and mandatory json properties
Strict means there must be no unknown properties, and
mandatory means a property must be in the json object.
2017-03-29 17:14:36 +02:00
Alexander Larsson
ea803f1f80 OCI: Add flatpak_oci_sign_data 2017-03-29 17:14:36 +02:00
Alexander Larsson
b5c6140c58 update: Don't check for update short-circuit if we're not pulling
There is no need to do this, its just a waste of network bandwidth.
2017-03-29 17:14:19 +02:00
Alexander Larsson
11943e7e40 OCI: Support OCI with system-helper by mirroring OCI repo
This allows us (when we later add signatures) to verify
the signatures of the OCI manifest, and can thus support
the system-helper.
2017-03-29 17:14:19 +02:00
Alexander Larsson
759eee8cea OCI: Verify layer checksum while applying
This means we verify the exact data we use, which is
what was signed. In particular, this means in the
system-helper we don't open us up to the user
manipulating the file while it is being applied.
2017-03-29 17:14:19 +02:00
Alexander Larsson
980bd48f0e OCI: flatpak_pull_from_oci - verify manifest ref
This ensures the actual manifest ref matches what was specified
in the index. This is required as the goal is to sign/trust
the manifest, but not necessarily the index.
2017-03-29 17:14:19 +02:00
Alexander Larsson
c81e115bb2 OCI: Add flatpak_archive_read_open_fd_with_checksum
This will let us do the layer sha256 checksum during
layer apply, which means we don't read it multiple times,
and that its not modified inbetween.
2017-03-29 17:14:19 +02:00
Alexander Larsson
8b01230673 OCI: Add flatpak_oci_registry_mirror_blob
This lets you mirror a blob from a (possibly remote)
OCI registry into a local one. This will be the base
for the system-helper work for OCI.
2017-03-29 17:14:19 +02:00
Alexander Larsson
4a8d77d9af OCI: fstat in local_open_file helper
This verifies that all files are regular,
and avoid each caller having to fstat themselves.
2017-03-29 17:14:19 +02:00
Alexander Larsson
d39491b5fb oci: Break out get_digest_subpath helper function 2017-03-29 17:14:19 +02:00
Alexander Larsson
cac65fb6a1 FlatpakDir: Break out helper flatpak_dir_lookup_ref_from_summary
This just extracts some shared code into a helper funcion
2017-03-29 17:14:19 +02:00
Alexander Larsson
ff3f459e67 Add flatpak_oci_registry_get_uri 2017-03-29 17:14:19 +02:00
Matthew Leeds
d272a4d4cc builder: Don't pass --require-version along to build
The --require-version option works for build-finish but not build, so
don't pass it along when using a manifest to build.
2017-03-28 08:51:36 +02:00
Alexander Larsson
23b2eb6383 OCI: Verify that loaded OCI blobs have the correct checksum 2017-03-27 15:02:55 +02:00
Mario Sanchez Prada
38a1eeea0e Add new API to the docs
Some of this API has been added a while ago, but never
made it to the sections file, so add it now.
2017-03-27 14:11:43 +02:00
Alexander Larsson
37d4047af2 tests: Don't leak SimpleHTTPServers 2017-03-27 14:10:50 +02:00
Alexander Larsson
9281a0afc9 test-webserver.sh: Remove accidental debug spew 2017-03-27 13:46:58 +02:00
Matthew Leeds
543c0735f1 builder: Add a hint about --force-clean 2017-03-27 12:52:46 +02:00
Yuri Chornoivan
1cbd80ecf6 Update Ukrainian translation 2017-03-27 12:52:32 +02:00
Balázs Úr
a5bcd70616 Updated Hungarian translation 2017-03-27 12:51:23 +02:00
hanklank
34705f8400 Removed a commented string
An commented string had a typo.
2017-03-27 12:51:08 +02:00