Commit Graph

21 Commits (642a5a81a180dc0bfb7d2e2b7759eb03d4b87e70)

Author SHA1 Message Date
Philip Withnall f47a696392 build: Add AM_* variables to all per-target special variables
For example, add $(AM_CFLAGS) to mumble_CFLAGS. Since $(WARN_CFLAGS) is
only added to $(AM_CFLAGS), this fixes the lack of inclusion of the
compiler warning flags in the compilation of half of flatpak.

Note that $(AM_*) variables are only used by automake if a more specific
(per-target) special variable is not defined instead. So if you define
mumble_CFLAGS, AM_CFLAGS will not be used for that target unless
explicitly included in mumble_CFLAGS.

See
https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.

Do the same for $(AM_LIBADD), $(AM_LDFLAGS), etc. These are not
currently defined, but it’s good practice to include them in
mumble_LIBADD (etc.) just in case they’re defined in future. Hopefully
their inclusions will be cargo-culted to any new targets which are
added, retaining full coverage of the code base.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 15:05:58 +01: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 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
Matthias Clasen 75b84b4bfe Include the generated document portal code in common
Move the sources from app/ to common/. We will use this
code from common/ in subsequent commits.
2017-05-03 13:27:52 +02:00
Matthias Clasen 62b8ae2953 table printer: move to its own source files
This is a pretty standalone object, and it is nicer to
have it in its own files. All users have been updated
to include the new flatpak-table-printer.h header.
2017-05-02 14:56:04 +02:00
Alexander Larsson ea803f1f80 OCI: Add flatpak_oci_sign_data 2017-03-29 17:14:36 +02:00
Alexander Larsson 63c1aace83 Import OCI initial support to common/* 2016-12-08 17:43:03 +01:00
Alexander Larsson b744cd2493 Add backport of g_autoptr support for json-glib 2016-11-29 10:14:33 +01:00
Ismo Puustinen 2d26a7d0a6 Create directories before attempting to generate code into them
If flatpak is built from a separate build directory, code generation
fails because the directory structure is not in place. Create the
necessary directories before code generation.
2016-08-26 12:36:35 +03:00
Simon McVittie c18626f11c common: don't distribute generated GDBus files in tarballs
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-06-12 10:35:13 +01:00
Alexander Larsson 8abbc0186e Rename everything but the on-disk location to flatpak 2016-05-09 11:11:55 +02:00
Alexander Larsson ba37b22d78 Rename library to libflatpak 2016-05-09 09:46:26 +02:00
Alexander Larsson c24528d369 Rename source files to flatpak 2016-05-09 09:00:20 +02:00
Alexander Larsson f55bb0edc9 Remove xdg-app-helper 2016-04-29 15:52:47 +02:00
Alexander Larsson 4c3bf179e2 Use bubblewrap instead of xdg-app-helper
Bubblewrap is a new tool from project atomic. Its similar to the old
xdg-app-helper, but even more minimal, and a bit more generic. Its designed
to be easy to git submodule install, but at some point we will probably
support using the system installed version too.

Using bubblewraps lets us share the load of security mainainance and
allows other people to use bubblewrap to do their own unprivileged
sandboxes.
2016-04-29 15:52:44 +02:00
Simon McVittie 73b0adfe0a Hide non-public symbols from libglnx and libxdgapp-common
This avoids exporting glnx_*, calc_sizes(), etc. However, we do want to
export xdg_app_error_quark(), so do that.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-01-28 23:43:30 +01:00
Alexander Larsson 6349b3ffc1 helper: Make user namespace support vs setuid a runtime, not build-time option
We now check at runtime if we have raised privs, and only if not so do we try
to use unprivileged user namespaces. This means you can build xdg-app however,
and then setuid/setcap the binary however you want afterwards.
2016-01-28 09:43:45 +01:00
Alexander Larsson 4177f358cb common: Make it explicit that XdgAppError are portal errors 2015-12-08 12:16:38 +01:00
Alexander Larsson b761aa05a7 common: Move typedef to separate header to avoid circular deps 2015-12-07 12:26:44 +01:00
Alexander Larsson 106a5b06ec Rename lib/ to common/ in preparation for public xdg-app library 2015-11-26 22:05:38 +01:00