Commit Graph

2474 Commits

Author SHA1 Message Date
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
Josef Andersson
75bd27bd06 Updated Swedish translation 2017-03-27 12:51:08 +02:00
Alexander Larsson
b3ddba3ab0 Add forgotten file 2017-03-27 12:46:24 +02:00
Alexander Larsson
7b906ce8ea Drop -Werror for aggregate-returns
gvdb is using this, so the CI was failing
2017-03-27 12:44:54 +02:00
Alexander Larsson
32eb260d24 Stop using ostree trivial-httpd
This isn't always available in recent ostree.
This work is based on https://github.com/flatpak/flatpak/pull/658 and
fixes https://github.com/ostreedev/ostree/pull/723
2017-03-27 12:30:38 +02:00
Alexander Larsson
82aad1ccb1 Correctly find system unmaintained extensions
We should not terminate the extension search just because
an earlier directory succeeds. Even non-existant directories
succeed, and anyway we should continue searching even if it
wasn't empty, because multiple subdir extensions may match.

Fixes https://github.com/flatpak/flatpak/issues/654
2017-03-27 11:18:16 +02:00
Alexander Larsson
7d5767333a Fix build if libdwarf dir missing
I was getting errors from -Werror=missing-include-dirs due to
$includedir/libdwarf not existing when builing in a different
prefix than /usr.
2017-03-27 10:55:40 +02:00
Colin Walters
2618a19716 Import ostree's compiler warnings, fix up callers
In ostree I maintain what I consider a "baseline" set of compiler
warnings that should *always* be fatal for a modern C project.

I noticed while working on a previous patch that a `-Werror=format`
warning wasn't fatal.

There are a few that are really, really important like
`-Werror=missing-prototypes`. I also take some like `-Werror=misleading-indentation`
which already caught some bugs.  See also https://lwn.net/Articles/678019/
2017-03-27 10:42:36 +02:00
Colin Walters
64fd2c2a8d Bump libglnx, use new glnx_throw(), fix callers
One benefit here becomes immediately obvious - `flatpak_fail()` was lacking
`G_GNUC_PRINTF` which meant we missed a lot of type checking. Fix up the
callers.
2017-03-27 10:42:36 +02:00
AsciiWolf
04f8f3b564 Update Czech translation 2017-03-27 10:33:20 +02:00
AsciiWolf
a65f522db1 Fix pofiles typo 2017-03-27 10:33:20 +02:00
Matthias Clasen
e0067ef2d0 document more metadata keys
A bunch of keys got added in code recently, and the
flatpak-metadata(5) man page has not been kept up-to-date.
2017-03-27 08:59:06 +02:00
Alexander Larsson
bf5191e401 build-export: Export all files with canonical permissions
These match what ostree checkout --user-mode will use
so that we can avoid fsck issues with bare-user-only.
2017-03-24 11:22:05 +01:00
Alexander Larsson
b00b8b1601 builder: Add --default-branch=BRANCH 2017-03-21 13:16:29 +01:00
Alexander Larsson
c7086364be builder: Handle absolute paths in command
Don't fail with "not found" in this case because we're checking
the absolute path on the host, not in the final sandbox.
2017-03-20 17:55:14 +01:00
Alexander Larsson
d7f2bf000e Re-fix typo 2017-03-16 21:21:54 +01:00
Alexander Larsson
9a62c456e3 builder: Remove all SDK extension from the platform
Instead of hardoding the locale and debug one.
This allows us to have SDK-specific extensions that
are not in the platform
2017-03-16 21:20:29 +01:00
Matthias Clasen
459e1c2b31 Revert "Fix typo"
This reverts commit 0906e5a9b9.

This commit broke the build in GNOME continuous.
See http://build.gnome.org/continuous/buildmaster/builds/2017/03/16/41/build/
2017-03-16 15:08:51 -04:00
AsciiWolf
0906e5a9b9 Fix typo 2017-03-16 17:11:30 +01:00
Alexander Larsson
6967756877 Update pofiles 0.9.1 2017-03-15 10:43:25 +01:00
Alexander Larsson
3385c9dc5c Fix some warnings reported by clang 2017-03-15 10:17:26 +01:00
André Klitzing
567802749c Fix some issues with musl
* Use realpath instead of canonicalize_file_name
* Add missing include
2017-03-15 10:14:39 +01:00
Alexander Larsson
afc2dd3d75 Update minimal automake to 1.13.4
It doesn't build on the current minimum of 1.11.
Fixes https://github.com/flatpak/flatpak/issues/621
2017-03-15 09:54:37 +01:00
Alexander Larsson
dcccb3c807 Bump glib dependency to 2.44
This is required for e.g. G_DECLARE_FINAL_TYPE, and most current
distros have this now.

This fixes https://github.com/flatpak/flatpak/issues/622

For distributions that want to build against older glib, see
the issue above, it has patches to make that work.
2017-03-15 09:44:28 +01:00
Alexander Larsson
f993e1154e Update NEWS for release 2017-03-15 09:43:50 +01:00
Alexander Larsson
72e36b90a0 builder: Keep cache per arch
This just adds the arch name to the cache branch names, which
means a build on a different arch will not invalidate the other
arch:s build.

Fixes https://github.com/flatpak/flatpak/issues/628
2017-03-15 09:43:50 +01:00
Simon McVittie
e572311a26 Improve and simplify profile snippet
Avoid setting a temporary variable flatpak_dirs which, while not
exported to the environment, would still be defined as a
shell "parameter" (variable) in the login shell itself.

Consistently put the Flatpak directories before other XDG_DATA_DIRS,
rather than putting them last if XDG_DATA_DIRS happens to be already
set.

Expand XDG_DATA_HOME if necessary, rather than assuming it will
always be ~/.local/share.

I don't know exactly which shells source profile.d, but it's possible
that one of them might only implement POSIX test syntax, so prefer
[ x = y ] over [ x == y ].

Fix some insufficient quoting that could have gone wrong if
XDG_DATA_DIRS somehow contained spaces.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-03-14 21:48:58 +01:00
Alexander Larsson
18f27f701b flatpak-builder --run: Always enable the dbus proxy
This means we're able to own our own id as a name, etc.
2017-03-14 16:27:51 +01:00