67 Commits

Author SHA1 Message Date
Phaedrus Leeds
b93d928679 .gitignore: Add tests/runtime-repo.stamp 2022-06-27 20:15:41 +01:00
Simon McVittie
134950e337 .gitignore: Be more specific about what we ignore
When we add a Meson build system, we will need to add a meson.build in the
subdirectories that were ignored by these rules. Ignore individual files
instead of entire subdirectories.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-03 13:54:23 +02:00
Phaedrus Leeds
7ddd02e440 gitignore: Add libglnx-config.h 2022-03-01 13:26:30 -08:00
Simon McVittie
4ce251882c tests: Add try-syscall helper
This exercises various syscalls. It's heavily based on the one from
<https://github.com/containers/bubblewrap/pull/459>, but with the
addition of a mode to output the numeric values of various expected
errno codes, which are not otherwise available to shell scripts.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-25 23:32:00 +01:00
Phaedrus Leeds
2181f4f171 .gitignore: Update for recent changes 2021-10-25 23:30:05 +01:00
Simon McVittie
33bb8a85ec build: Move Makefile-*.am.inc up one level
This takes them out of the directory that is "owned" by the subproject,
which will not be ignoring our Flatpak-specific generated files in
its .gitignore, and puts them in a directory that is "owned" by Flatpak,
which can ignore them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-26 11:50:05 +01:00
Simon McVittie
dd6b99d0d3 .gitignore: Ignore more generated files
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-25 12:07:08 +01:00
Phaedrus Leeds
7a2deb1ee7 gitignore: Ignore tests/services
These services are all generated at build time.
2020-10-01 11:12:21 +02:00
Matthew Leeds
33bec8d8c4 gitignore: Add built units in sideload-repos-systemd
I mistakenly omitted these in 9caf664fabc911419cc483125bf543c4550604c7
2020-07-21 09:02:35 +02:00
Matthew Leeds
9caf664fab Add systemd units to sideload from hotplugged USBs
Currently with the sideload implementation of offline updates you have
to manually create a symlink to your USB drive to sideload from it,
which is a regression compared to the previous implementation which
scanned all mounted filesystems in OstreeRepoFinderMount in libostree.
So this commit adds a few systemd units and a bash script so that any
time a USB drive is plugged in and automatically mounted by udisks, a
symlink to it is created in /run/flatpak/sideload-repos. When the drive
is unplugged the symlink is removed.

However this solution still has a lot of moving parts, so we may want to
instead have libflatpak use GVolumeMonitor and find the mounted
filesystems itself; see https://github.com/flatpak/flatpak/issues/3705

Fixes https://github.com/flatpak/flatpak/issues/3490
2020-06-23 09:37:10 +02:00
Matthew Leeds
0b498869dc .gitignore: Add flatpak-oci-authenticator 2020-03-25 17:24:18 -07:00
Alexander Larsson
4f2c4a5b1c Add schema for some ostree/flatpak variant type and generate header 2020-02-17 16:10:50 +01:00
Matthew Leeds
59aee7b9b9 .gitignore: Use full path for test-update-portal and test-portal-impl 2019-12-02 15:09:37 -08:00
Matthew Leeds
248029ceb8 .gitignore: Add tests/test-authenticator 2019-12-02 15:06:45 -08:00
Will Thompson
9d91d29c11 .gitignore: flatpak-permission-dbus.[ch] 2019-10-31 13:51:59 +00:00
Alexander Larsson
91d9fe9c60 tests: Add simple testing portal backend and wire it up to the tests
This only supports the AccessDialog call, and always just allows
everything. Still, it tests the entire codepath for authentication.
2019-10-02 14:57:11 +02:00
Alexander Larsson
c15c1946ff test: Add test for update-portal monitoring
We add socat to the test runtime, and then we use that to run a
test app outside the sandbox as if it was inside.

The testcase connects creates a monitor and ensure we properly get signals
for updates.
2019-10-02 14:57:11 +02:00
Matthew Leeds
9d2b73d42b .gitignore: Ignore doc/reference/libflatpak-docs.html 2019-06-14 16:23:07 -07:00
Alexander Larsson
80249b5f4d revokefs: Add demo to show how to revoke permissions
The demo starts two instances by the same users so
the revoke doesn't really enforce any separation, but
it demos how you would do it.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
4716ce8f2e revokefs: Initial non-revoking version
This is just a copy of rofiles-fuse with the write limits removed.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00
Matthew Leeds
368f7ae0b1 .gitignore: Ignore tags file
This is generated by the "ctags" command.
2019-02-15 15:42:00 -08:00
Matthew Leeds
b85f386a6b .gitignore: Add missing files
Closes: #2691
Approved by: matthiasclasen
2019-02-11 12:47:06 +00:00
Alexander Larsson
43c7e7eeec tests: Don't generate the .wrap tests, launch them via test-wrapper.sh
There is no need for these files to be generated on disk

Closes: #2170
Approved by: alexlarsson
2018-10-03 13:19:35 +00:00
Alexander Larsson
5fa3fbf19e tests: Autogenerate test matrix
Several tests have alternative wrappers that just set some feature
flags. For instance to switch between user and system and with or
without deltas. This change makes those wrappers automatically
generated from a simple description of the features.

For example the test-run.sh test goes from:
-       tests/test-run.sh \
-       tests/test-run-system.sh \
-       tests/test-run-deltas.sh \
-       tests/test-run-system-deltas.sh \
to
+       tests/test-run.sh{{user+system},{nodeltas+deltas}} \

There is some complexity here because the TESTS variable in automake
can't be runtime generated, so we rewrite it during "make
update-test-matrix" and commit the result to git.

The way it works is that make update-test-matrix takes the
TEST_MATRIX_SOURCE list, passes it to tests/expand-test-matrix.sh
which generates all the combinations in tests/Makefile-test-matrix.am.inc
where a test like tests/test-foo.sh{user+system} will get
converted to tests/test-foo.sh@user.wrap and tests/test-foo.sh@system.wrap.

We then have a pattern rule matchin tests/*.wrap which will generate
a wrapper that sets the right environment flags based on $0 and then
spawns the wrapper.

Closes: #2170
Approved by: alexlarsson
2018-10-03 13:19:35 +00:00
Owen W. Taylor
951aed561a Add flatpak_cache_http_uri: cache downloads based on HTTP headers
Add a new function, flatpak_cache_http_uri() that when passed an URL and
a local destination location, either a) downloads the content and stores
it at the destination location, storing HTTP cache header information
like Last-Modified, Etag into user xattrs (if available) or a separate
file or b) if the downloaded content is already present, checks the
header information to decide whether the downloaded content can be used
or needs to be revalidated witha conditional request.

Tests are added that use a special case test server that adds HTTP caching
headers and reacts to them based on query parameters. A small test binary
'httpcache' is added for the tests to use.

Closes: #1910
Approved by: alexlarsson
2018-08-09 12:49:35 +00:00
Alexander Larsson
efb92704fe Merge lib/* into common
This moves all the files from lib into common, and it also adds all the libflatpak
sources into libflatpak-common, making libflatpak just a wrapper around the common
helper library.

This move allows the CLI to use all the code from libflatpak. We were already doing
this with a few things like flatpak-error*.[ch], and we want to do it even more
when sharing FlatpakTransaction. This also allows use to slowly move
the CLI to using the libflatpak apis for some things.

Closes: #1706
Approved by: alexlarsson
2018-05-24 11:59:52 +00:00
Alexander Larsson
c570e09ac9 common: Rename all generated files to *-dbus-generated.[ch]
Easier to spot them this way

Closes: #1706
Approved by: alexlarsson
2018-05-24 11:59:52 +00:00
Matthew Leeds
c250857c59 .gitignore: Ignore app/parse-datetime.c
This is a generated file now, so tell git to ignore it.

Closes: #1646
Approved by: alexlarsson
2018-05-14 07:45:17 +00:00
Alexander Larsson
11ef9999b6 Add flatpak portal
This listens to org.freedesktop.portal.Flatpak and lets flatpak
sandboxes do flatpak specific things.

Initially this only allows access to "Spawn", which lets you start a
new copy of the current or latest version of the calling app,
optionally with sandboxing.

This allows the app to re-start itself with the latest version after
an update, and the sandboxing is useful for apps that want to manually
sandbox part of themselves.

You can also expose one or more subdirectories of
~/.var/app/$appid/sandbox/ to the app, read-write or read-only. This is
useful to communicate with the sandbox.
2018-04-04 17:25:59 +02:00
Matthew Leeds
1af693d8c4 .gitignore: Ignore flatpak-document-dbus.[ch]
These targets were added in commit f2a6c1db8 and don't need to be
tracked by git.

Closes: #1429
Approved by: alexlarsson
2018-02-19 08:22:05 +00:00
Alexander Larsson
f2a6c1db8d Remove document portal
This is now in xdg-desktop-portal. We keep a version of the document
portal dbus XML so that we avoid weird build dependencies.

Flatpak itself is technically not dependent on the document portal,
but it is very much recommended that you use it.

Closes: #1398
Approved by: alexlarsson
2018-02-09 09:23:26 +00:00
Matthew Leeds
cb57c599dd .gitignore: Ignore unit test artifacts
Running "make check" creates all these artifacts that we want git to
ignore.

Closes: #1191
Approved by: alexlarsson
2017-11-23 10:30:12 +00: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
Alexander Larsson
ec89340a26 tests: Add a second gpg keyring 2017-05-10 11:54:27 +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
Michal Rostecki
b9401590f6 Add all man5 files to .gitignore
flatpak-flatpakref.5 and flatpak-flatpakrepo.5 were not included
in .gitignore.
2017-01-04 15:34:54 +01:00
Simon McVittie
454764f059 .gitignore: ignore "make dist" output
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-08-01 11:16:53 +01:00
Simon McVittie
8b4f2c120c .gitignore: ignore more gettext output
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-08-01 11:16:12 +01:00
Ray Strode
f5ddf78c79 install dbus systemd service file snippet
flatpak currently installs a gdm env.d and a bash profile.d file to
ensure XDG_DATA_DIRS is set to the right value.  Neither is sufficient
when the dbus daemon is activated as a system --user service.

This commit adds a dbus service file snippet to frob its environment
variable for that case.
2016-07-26 13:33:31 -04:00
Matthew Leeds
3e467f6f64 Update .gitignore 2016-07-20 12:06:40 -04:00
Alexander Larsson
3f0cbf74b4 Update gitignore 2016-06-03 14:30:25 +02:00
Alexander Larsson
f68b21754a tests: Fix make-test-bundles.sh
This had bitrotted
2016-05-10 11:18:32 +02:00
Alexander Larsson
633bd42cc6 Update .gitignore 2016-05-09 14:23:45 +02:00
Alexander Larsson
28b549156a Split out permission store from session helper
This is now available as org.freedesktop.impl.portal.PermissionStore
2016-05-09 14:07:22 +02: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
2f465215e2 Add some missing files from the tests 2016-05-02 10:46:51 +02:00
Alexander Larsson
f55bb0edc9 Remove xdg-app-helper 2016-04-29 15:52:47 +02:00
Alexander Larsson
ee7be7f82d Build bwrap 2016-04-29 15:38:23 +02:00
Alexander Larsson
327f432219 tests: Add a basic test that just runs an app 2016-04-27 21:23:42 +02:00